[Monetdb-developers] HOST_NAME_MAX op mac os 10.5
Dear all, I use HOST_NAME_MAX in my code. Compiling the code on a CWI machine does not have any problem, however, compilation on Mac OS 10.5 complains that HOST_NAME_MAX is not defined. fgrep on mac 10.5 says: $fgrep -r HOST_NAME_MAX /usr/include/* /usr/include/limits.h:#define _POSIX_HOST_NAME_MAX 255 /usr/include/unistd.h:#define _SC_HOST_NAME_MAX 72 How (and where) can I add proper check to define HOST_NAME_MAX for darwin 9? Thanks! Jennie
On 28-05-2008 17:44:17 +0200, Ying Zhang wrote:
Dear all,
I use HOST_NAME_MAX in my code. Compiling the code on a CWI machine does not have any problem, however, compilation on Mac OS 10.5 complains that HOST_NAME_MAX is not defined. fgrep on mac 10.5 says:
$fgrep -r HOST_NAME_MAX /usr/include/* /usr/include/limits.h:#define _POSIX_HOST_NAME_MAX 255 /usr/include/unistd.h:#define _SC_HOST_NAME_MAX 72
How (and where) can I add proper check to define HOST_NAME_MAX for darwin 9?
Create a configure check, or define it within guards when it's not defined.
On 29-05-2008 09:38:35 +0200, Fabian Groffen wrote:
On 28-05-2008 17:44:17 +0200, Ying Zhang wrote:
Dear all,
I use HOST_NAME_MAX in my code. Compiling the code on a CWI machine does not have any problem, however, compilation on Mac OS 10.5 complains that HOST_NAME_MAX is not defined. fgrep on mac 10.5 says:
$fgrep -r HOST_NAME_MAX /usr/include/* /usr/include/limits.h:#define _POSIX_HOST_NAME_MAX 255 /usr/include/unistd.h:#define _SC_HOST_NAME_MAX 72
How (and where) can I add proper check to define HOST_NAME_MAX for darwin 9?
Create a configure check, or define it within guards when it's not defined.
PS. since OSX 10.5 is UNIX 2003, you probably define HOST_NAME_MAX as _POSIX_HOST_NAME_MAX. Note that on Solaris (10): [hathor:usr/portage/scripts] % grep HOST_NAME_MAX /usr/include/* /usr/include/limits.h:#define _POSIX_HOST_NAME_MAX 255 [hathor:usr/portage/scripts] % grep HOST_NAME_MAX /usr/include/sys/* /usr/include/sys/unistd.h:#define _SC_HOST_NAME_MAX 735
Fabian Groffen wrote:
On 29-05-2008 09:38:35 +0200, Fabian Groffen wrote:
On 28-05-2008 17:44:17 +0200, Ying Zhang wrote:
Dear all,
I use HOST_NAME_MAX in my code. Compiling the code on a CWI machine does not have any problem, however, compilation on Mac OS 10.5 complains that HOST_NAME_MAX is not defined. fgrep on mac 10.5 says:
$fgrep -r HOST_NAME_MAX /usr/include/* /usr/include/limits.h:#define _POSIX_HOST_NAME_MAX 255 /usr/include/unistd.h:#define _SC_HOST_NAME_MAX 72
How (and where) can I add proper check to define HOST_NAME_MAX for darwin 9? Create a configure check, or define it within guards when it's not defined.
PS. since OSX 10.5 is UNIX 2003, you probably define HOST_NAME_MAX as _POSIX_HOST_NAME_MAX.
Note that on Solaris (10):
[hathor:usr/portage/scripts] % grep HOST_NAME_MAX /usr/include/* /usr/include/limits.h:#define _POSIX_HOST_NAME_MAX 255 [hathor:usr/portage/scripts] % grep HOST_NAME_MAX /usr/include/sys/* /usr/include/sys/unistd.h:#define _SC_HOST_NAME_MAX 735
Note that _SC_HOST_NAME_MAX is the argument to sysconf (see man sysconf) to find out what the kernel's value for HOST_NAME_MAX is. It is not itself the value. -- Sjoerd Mullender
participants (3)
-
Fabian Groffen
-
Sjoerd Mullender
-
Ying Zhang