--- Begin Message ---
Subject: |
fix for Solaris 10/cc |
Date: |
Tue, 20 Dec 2005 15:33:02 +0000 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.4 (gnu/linux) |
This change to configure.ac allows building with both cc v5.8 and cc
v5.6 on Solaris 10. I also corrected a couple of typos to fix
warnings (but there are still a fair few mainly from signed/unsigned
type errors).
Index: configure.ac
===================================================================
--- configure.ac (revision 163)
+++ configure.ac (working copy)
@@ -568,7 +568,13 @@
solaris2*)
AC_DEFINE(SOLARIS)
AC_DEFINE(__BIT_TYPES_DEFINED__) # avoid conflict with db.h
- AC_DEFINE(_POSIX_C_SOURCE)
+ AC_PREPROC_IFELSE([
+ AC_LANG_PROGRAM([[
+#define _POSIX_C_SOURCE 1
+#include <unistd.h>
+ ]], [])],
+ [AC_DEFINE(_POSIX_C_SOURCE)],
+ [AC_DEFINE(_POSIX_C_SOURCE, 200112L)])
AC_DEFINE(__EXTENSIONS__)
LIBS="$LIBS -lelf -lsec"
;;
@@ -770,7 +776,7 @@
AM_CONDITIONAL(BUILD_DOC, test x$want_doc = xtrue)
AC_OUTPUT(pub/Makefile src/Makefile contrib/Makefile inputs/Makefile \
-Makefile doc/Makefile src/cflex.l contrib/vicf )
+Makefile doc/Makefile src/cflex.l)
AC_MSG_WARN(=====================================================)
Index: src/cf.extern.h
===================================================================
--- src/cf.extern.h (revision 163)
+++ src/cf.extern.h (working copy)
@@ -45,7 +45,7 @@
extern int GOTMETHODARGS;
extern struct Item *QUERYVARS;
-extern struct Item *METHODRETURNVARS;;
+extern struct Item *METHODRETURNVARS;
extern struct Item *METHODRETURNCLASSES;
extern char METHODFILENAME[CF_BUFSIZE];
extern char *VMETHODPROTO[];
Index: src/log.c
===================================================================
--- src/log.c (revision 163)
+++ src/log.c (working copy)
@@ -39,7 +39,7 @@
{ char value[CF_BUFSIZE];
int facility = LOG_USER;
- static lastsyslog=0;
+ static int lastsyslog=0;
if (GetMacroValue(CONTEXTID,"SyslogFacility"))
{
--- End Message ---