Subject: using !defined instead of !
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 10/03/2003 15:36:11
nbcompat.h has:

#if !LLONG_MAX
# define LLONG_MAX      0x7fffffffffffffffLL    /* max long long */
#endif

#if !ULLONG_MAX

Building under BSD/OS, I get:

In file included from getopt_long.c:43:
nbcompat.h:484: syntax error
nbcompat.h:488: syntax error
*** Error code 1


I simply changed to:

#if !defined(LLONG_MAX)
# define LLONG_MAX      0x7fffffffffffffffLL    /* max long long */
#endif

#if !defined(ULLONG_MAX)


Is that the way it should be?

I guess this is an issue with the cpp. It is gcc 2.95.3.

I notice other lines that probably should be fixed too.

(I noticed this in bootstrap-pkgsrc and in the pkgtools/libnbcompat; funny
to use bootstrap-pkgsrc and then immediately told to build and install new
pkgtools/pkg_install.)

   Jeremy C. Reed
   http://bsd.reedmedia.net/