[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNATS 4 build problems on Solaris

From: Yngve Svendsen
Subject: GNATS 4 build problems on Solaris
Date: Tue, 31 Jul 2001 16:31:51 +0200

Today's CVS version of GNATS 4 does not compile on Solaris with GCC 2.95.2. The following happens:

gcc -c -I. -I. -I./../include -g -O2 -W -Wall -W -Wall -ansi -pedantic -Werror -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wno-format -DHAVE_CONFIG_H -DGNATSD_USER_ACCESS_FILE=\"/usr/local/etc/gnats/gnatsd.access\" -DGNATSD_HOST_ACCESS_FILE=\"/usr/local/etc/gnats/gnatsd.host_access\" -DDEFAULT_GNATS_SERVICE=\"support\" -DGLOBAL_DB_LIST_FILE=\"/usr/local/etc/gnats/databases\" -DGNATS_USER=\"gnats\" misc.c
cc1: warnings being treated as errors
misc.c: In function `value_is_empty':
misc.c:656: warning: subscript has type `char'
gmake[1]: *** [misc.o] Error 1
gmake[1]: Leaving directory `/usr/local/src/gnats-600/gnats/gnats'
gmake: *** [all-gnats] Error 2

Turns out that isspace() requires an explicit cast to int on Solaris. The following little patch fixes it:

Index: misc.c
RCS file: /cvs/gnats/gnats/gnats/misc.c,v
retrieving revision 1.31
diff -u -p -r1.31 misc.c
--- misc.c      2001/07/15 17:31:59     1.31
+++ misc.c      2001/07/31 14:34:12
@@ -653,7 +653,7 @@ value_is_empty (const char *string)
     unsigned int i;
     for (i = 0; i < strlen (string); i++)
-      if (! isspace (string[i]))
+      if (! isspace ((int)string[i]))
        return FALSE;
     return TRUE;

Yngve Svendsen
Gnatsweb maintainer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]