]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix some errors in the SSL tests.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 16 Jun 2010 18:02:57 +0000 (18:02 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 16 Jun 2010 18:02:57 +0000 (18:02 +0000)
Need to check for the st_gen member in struct stat.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@9159 7a7537e8-13f0-0310-91df-b6672ffda945

config-scripts/cups-common.m4
config-scripts/cups-ssl.m4
config.h.in
cups/file.c

index 0c9032e9ede2eead4d46741e68444f622b5a9c4a..5a46565a6d31e7022d97d5f8490b6f5000208d9c 100644 (file)
@@ -183,6 +183,14 @@ AC_TRY_COMPILE([#include <time.h>],[struct tm t;
        AC_DEFINE(HAVE_TM_GMTOFF),
        AC_MSG_RESULT(no))
 
+dnl See if the stat structure has the st_gen member...
+AC_MSG_CHECKING(for st_gen member in stat structure)
+AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat t;
+       int o = t.st_gen;],
+       AC_MSG_RESULT(yes)
+       AC_DEFINE(HAVE_ST_GEN),
+       AC_MSG_RESULT(no))
+
 dnl See if we have the removefile(3) function for securely removing files
 AC_CHECK_FUNCS(removefile)
 
index c7382563aa861811a9980745cdb7ca61f68746f8..ff3f00ba413c5c0e08d32c04a2ffc15abe23ee36 100644 (file)
@@ -68,7 +68,7 @@ if test x$enable_ssl != xno; then
            SSLFLAGS=`$PKGCONFIG --cflags gnutls`
            AC_DEFINE(HAVE_SSL)
            AC_DEFINE(HAVE_GNUTLS)
-       elif "x$LIBGNUTLSCONFIG" != x; then
+       elif test "x$LIBGNUTLSCONFIG" != x; then
            have_ssl=1
            SSLLIBS=`$LIBGNUTLSCONFIG --libs`
            SSLFLAGS=`$LIBGNUTLSCONFIG --cflags`
@@ -80,7 +80,7 @@ if test x$enable_ssl != xno; then
             if $PKGCONFIG --exists gcrypt; then
                SSLLIBS="$SSLLIBS `$PKGCONFIG --libs gcrypt`"
                SSLFLAGS="$SSLFLAGS `$PKGCONFIG --cflags gcrypt`"
-           elif "x$LIBGCRYPTCONFIG" != x; then
+           elif test "x$LIBGCRYPTCONFIG" != x; then
                SSLLIBS="$SSLLIBS `$LIBGCRYPTCONFIG --libs`"
                SSLFLAGS="$SSLFLAGS `$LIBGCRYPTCONFIG --cflags`"
            fi
index 52a5b93e304940ad5bcb2962836ecc72cf44fe3c..6934dca8e64ac22d35effc2c8c24517fee9922bc 100644 (file)
 #undef HAVE_SYS_IOCTL_H
 
 
+/*
+ * Does the "stat" structure contain the "st_gen" member?
+ */
+
+#undef HAVE_ST_GEN
+
+
 /*
  * Does the "tm" structure contain the "tm_gmtoff" member?
  */
index d90aab1c5453d82efca3df8e01b3a201e039b4eb..68c67ad7bde24a30645d3fc93003e64f3f89d81a 100644 (file)
@@ -2294,7 +2294,9 @@ cups_open(const char *filename,           /* I - Filename */
   if (S_ISLNK(linkinfo.st_mode) ||
       fileinfo.st_dev != linkinfo.st_dev ||
       fileinfo.st_ino != linkinfo.st_ino ||
+#ifdef HAVE_ST_GEN
       fileinfo.st_gen != linkinfo.st_gen ||
+#endif /* HAVE_ST_GEN */
       fileinfo.st_nlink != linkinfo.st_nlink ||
       fileinfo.st_mode != linkinfo.st_mode)
   {