[2944] in BarnOwl Developers
[barnowl/barnowl] f54b07: Use g_get_host_name instead of gethostname and MAX...
daemon@ATHENA.MIT.EDU (noreply@github.com)
Sun Feb 27 11:53:19 2011
Date: Sun, 27 Feb 2011 08:53:17 -0800
To: barnowl-dev@MIT.EDU
From: noreply@github.com
Branch: refs/heads/master
Home: https://github.com/barnowl/barnowl
Commit: f54b07d89051a95846d26991aeb7e8b4cd630aff
https://github.com/barnowl/barnowl/commit/f54b07d89051a95846d26991aeb7e8b4cd630aff
Author: David Benjamin <davidben@mit.edu>
Date: 2011-02-26 (Sat, 26 Feb 2011)
Changed paths:
M global.c
M message.c
M owl.h
M variable.c
Log Message:
-----------
Use g_get_host_name instead of gethostname and MAXHOSTNAMELEN
This lets us punt thishost from owl_global. g_get_host_name implements
the same localhost fallback, so we really don't need it.
Also, Solaris gets upset about MAXHOSTNAMELEN when you define
_XOPEN_SOURCE=500 without __EXTENSIONS__, if we ever care to get rid of
that. (That said, glib's answer to this is lame. They just hardcode 100
and even forget to NUL-terminate the buffer; POSIX is apparently
braindead and leaves truncation undefined. glibc is kind enough to give
you ENAMETOOLONG.)