]> granicus.if.org Git - file/commitdiff
recent changes.
authorChristos Zoulas <christos@zoulas.com>
Fri, 13 Feb 2009 18:48:05 +0000 (18:48 +0000)
committerChristos Zoulas <christos@zoulas.com>
Fri, 13 Feb 2009 18:48:05 +0000 (18:48 +0000)
ChangeLog
Makefile.am
acinclude.m4
configure.ac
src/file.c
src/getopt_long.c

index b9d35795b2e45543cfdb34b4d0b9844ec942b45f..f9336dd1d6bc465cade25f1e5cb5dab417353007 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-02-13 13:45  Christos Zoulas <christos@zoulas.com>
+
+       * look for struct option to determine if getopt.h is usable for IRIX.
+
+       * sanitize cdf document strings
+
 2009-02-04 13:25  Christos Zoulas <christos@zoulas.com>
 
        * fix OS/2 warnings.
index 0300b9f47f4b69cb6bc06d77a1761cd997c19332..6ecf0be3770e0388949118b3f7fc805f260d1902 100644 (file)
@@ -1,3 +1,5 @@
+#ACLOCAL_AMFLAGS = -I m4
+
 EXTRA_DIST = MAINT
 
 SUBDIRS = src magic tests doc python
index 31677b18215b96063670b96280ba0824f242fd1d..ff6a657d7d370c694bf423c02774f259a00ff787 100644 (file)
@@ -9,6 +9,7 @@ AC_CACHE_CHECK([for tm_zone in struct tm], ac_cv_struct_tm_zone,
 if test "$ac_cv_struct_tm_zone" = yes; then
   AC_DEFINE(HAVE_TM_ZONE,1,[HAVE_TM_ZONE])
 fi
+
 AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
 [AC_TRY_LINK(
 changequote(<<, >>)dnl
@@ -29,6 +30,7 @@ AC_CACHE_CHECK([for tm_isdst in struct tm], ac_cv_struct_tm_isdst,
 if test "$ac_cv_struct_tm_isdst" = yes; then
   AC_DEFINE(HAVE_TM_ISDST,1,[HAVE_TM_ISDST])
 fi
+
 AC_CACHE_CHECK(for daylight, ac_cv_var_daylight,
 [AC_TRY_LINK(
 changequote(<<, >>)dnl
@@ -42,3 +44,12 @@ changequote([, ])dnl
     AC_DEFINE(HAVE_DAYLIGHT,1,[HAVE_DAYLIGHT])
   fi
 ])
+
+AC_DEFUN([AC_STRUCT_OPTION_GETOPT_H],
+[AC_CACHE_CHECK([for struct option in getopt], ac_cv_struct_option_getopt_h,
+[AC_TRY_COMPILE([#include <getopt.h>], [struct option op; op.name;],
+  ac_cv_struct_option_getopt_h=yes, ac_cv_struct_option_getopt_h=no)])
+if test "$ac_cv_struct_option_getopt_h" = yes; then
+  AC_DEFINE(HAVE_STRUCT_OPTION,1,[HAVE_STRUCT_OPTION])
+fi
+])
index 071ee28124ce3227700ca44813a1e6a78f725364..4fea9fd8379efeba5d548c34169d30d79d785200 100644 (file)
@@ -2,6 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
 AC_INIT(file, 5.00, christos@astron.com)
 AM_INIT_AUTOMAKE
 AM_CONFIG_HEADER(config.h)
+#AC_CONFIG_MACRO_DIR([m4])
 
 AC_MSG_CHECKING(for builtin ELF support)
 AC_ARG_ENABLE(elf,
@@ -82,6 +83,8 @@ AC_SYS_LARGEFILE
 AC_FUNC_FSEEKO
 AC_TYPE_MBSTATE_T
 
+AC_STRUCT_OPTION_GETOPT_H
+
 AC_CHECK_TYPES([uint8_t, uint16_t, uint32_t, int32_t, uint64_t, int64_t])
 AC_CHECK_SIZEOF(long long)
 AH_BOTTOM([
index 806d2ec6d5b45fab855dc79b3f86588de75ffda6..91a5b416a352b0c705815300f1cc9813be0442eb 100644 (file)
@@ -32,7 +32,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: file.c,v 1.129 2008/12/03 18:05:18 christos Exp $")
+FILE_RCSID("@(#)$File: file.c,v 1.130 2009/02/03 20:27:51 christos Exp $")
 #endif /* lint */
 
 #include "magic.h"
@@ -61,7 +61,7 @@ FILE_RCSID("@(#)$File: file.c,v 1.129 2008/12/03 18:05:18 christos Exp $")
 #include <wchar.h>
 #endif
 
-#ifdef HAVE_GETOPT_H
+#if defined(HAVE_GETOPT_H) && defined(HAVE_STRUCT_OPTION)
 #include <getopt.h>
 #else
 #include "mygetopt.h"
index cb5c06a3db12b6d1c08b7da29d6135738b6a8b07..f0fb1b0dc7aeb069dd1f6eac199bf8484b864833 100644 (file)
@@ -32,7 +32,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: getopt_long.c,v 1.4 2008/11/04 16:38:28 christos Exp $")
+FILE_RCSID("@(#)$File: getopt_long.c,v 1.5 2009/02/03 20:27:51 christos Exp $")
 #endif /* lint */
 
 #include <assert.h>
@@ -42,7 +42,7 @@ FILE_RCSID("@(#)$File: getopt_long.c,v 1.4 2008/11/04 16:38:28 christos Exp $")
 #define warnx printf
 #endif
 #include <errno.h>
-#ifdef HAVE_GETOPT_H
+#if defined(HAVE_GETOPT_H) && defined(HAVE_STRUCT_OPTION)
 #include <getopt.h>
 #else
 #include "mygetopt.h"