~blowry/file

bacd2d4546837a5c6878499a5d9482434f100802 — Christos Zoulas 12 years ago 6f54ea9
recent changes.
6 files changed, 26 insertions(+), 4 deletions(-)

M ChangeLog
M Makefile.am
M acinclude.m4
M configure.ac
M src/file.c
M src/getopt_long.c
M ChangeLog => ChangeLog +6 -0
@@ 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.

M Makefile.am => Makefile.am +2 -0
@@ 1,3 1,5 @@
#ACLOCAL_AMFLAGS = -I m4

EXTRA_DIST = MAINT

SUBDIRS = src magic tests doc python

M acinclude.m4 => acinclude.m4 +11 -0
@@ 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
])

M configure.ac => configure.ac +3 -0
@@ 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([

M src/file.c => src/file.c +2 -2
@@ 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"

M src/getopt_long.c => src/getopt_long.c +2 -2
@@ 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"