# FTIME header.c replace with HAVE_FTIME
# GETTIMEOFDAY header.c replace with HAVE_GETTIMEOFDAY
# SYSV_SYSTEM_DIR lha_macro.h replace with HAVE_DIRENT_H
-# HAVE_TM_ZONE header.c replace with HAVE_TM_GMTOFF
+# HAVE_TM_ZONE header.c replace with HAVE_STRUCT_TM_TM_GMTOFF
LHA_MAIN_SRC lha.h lha_macro.h
# LONG_MAX lha_macro.h
# LONG_MIN lha_macro.h
NOT_COMPATIBLE_MODE header.c lhext.c
NOT_USED header.c
NOVOID lha_macro.h
-# NO_INODE lharc.c replace with !HAVE_ST_INO (???)
+# NO_INODE lharc.c replace with !HAVE_STRUCT_STAT_ST_INO
# HAVE_NO_LCHOWN lhext.c replace with !HAVE_LCHOWN
NULL lha_macro.h
OSK header.c
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
+/* Define to 1 if `st_ino' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_INO
+
+/* Define to 1 if `tm_gmtoff' is member of `struct tm'. */
+#undef HAVE_STRUCT_TM_TM_GMTOFF
+
/* Define to 1 if `tm_zone' is member of `struct tm'. */
#undef HAVE_STRUCT_TM_TM_ZONE
-/* Define if your struct stat has st_ino */
-#undef HAVE_ST_INO
-
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_DIR_H
/* Define to 1 if you have the `timelocal' function. */
#undef HAVE_TIMELOCAL
-/* Define if your struct tm has tm_gmtoff */
-#undef HAVE_TM_GMTOFF
-
/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
`HAVE_STRUCT_TM_TM_ZONE' instead. */
#undef HAVE_TM_ZONE
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
-AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
-[AC_TRY_COMPILE([
-#if TM_IN_SYS_TIME
-#include <sys/time.h>
+AC_CHECK_MEMBERS([struct tm.tm_gmtoff, struct stat.st_ino],,,
+[
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
#else
-#include <time.h>
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
#endif
- ], [struct tm t; t.tm_gmtoff;],
- ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)
-])
-
-if test "x$ac_cv_struct_tm_gmtoff" = xyes; then
- AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if your struct tm has tm_gmtoff])
-fi
-
-AC_CACHE_CHECK([for st_ino in struct stat], ac_cv_struct_st_ino,
-[AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/stat.h>
- ], [struct stat s; s.st_ino;],
- ac_cv_struct_st_ino=yes, ac_cv_struct_st_ino=no)
])
-if test "x$ac_cv_struct_st_ino" = xyes; then
- AC_DEFINE(HAVE_ST_INO, 1, [Define if your struct stat has st_ino])
-fi
-
dnl Checks for library functions.
AC_TYPE_SIGNAL
AC_FUNC_FORK
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
-AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
+AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_member_struct_tm_tm_gmtoff,
[AC_TRY_COMPILE([
#if TM_IN_SYS_TIME
#include <sys/time.h>
#include <time.h>
#endif
], [struct tm t; t.tm_gmtoff;],
- ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)
+ ac_cv_member_struct_tm_tm_gmtoff=yes,
+ ac_cv_member_struct_tm_tm_gmtoff=no)
])
-if test "x$ac_cv_struct_tm_gmtoff" = xyes; then
- AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if your struct tm has tm_gmtoff])
+if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then
+ AC_DEFINE(HAVE_STRUCT_TM_TM_GMTOFF, 1,
+ [Define if your struct tm has tm_gmtoff])
fi
-AC_CACHE_CHECK([for st_ino in struct stat], ac_cv_struct_st_ino,
+AC_CACHE_CHECK([for st_ino in struct stat], ac_cv_member_struct_stat_st_ino,
[AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/stat.h>
], [struct stat s; s.st_ino;],
- ac_cv_struct_st_ino=yes, ac_cv_struct_st_ino=no)
+ ac_cv_member_struct_stat_st_ino=yes,
+ ac_cv_member_struct_stat_st_ino=no)
])
-if test "x$ac_cv_struct_st_ino" = xyes; then
- AC_DEFINE(HAVE_ST_INO, 1, [Define if your struct stat has st_ino])
+if test "x$ac_cv_member_struct_stat_st_ino" = xyes; then
+ AC_DEFINE(HAVE_STRUCT_STAT_ST_INO, 1,
+ [Define if your struct stat has st_ino])
fi
dnl Checks for library functions.
/* ------------------------------------------------------------------------ */
#if !defined(HAVE_TZSET) && !defined(HAVE_FTIME) /* maybe defined(HAVE_GETTIMEOFDAY) */
{
-#ifdef HAVE_TM_GMTOFF
+#ifdef HAVE_STRUCT_TM_TM_GMTOFF
time_t tt;
time(&tt);
return -localtime(&tt)->tm_gmtoff;
-#else /* HAVE_TM_GMTOFF */
+#else /* HAVE_STRUCT_TM_TM_GMTOFF */
struct timeval tp;
struct timezone tzp;
gettimeofday(&tp, &tzp);/* specific to 4.3BSD */
* 60L : 0));
*/
return (tzp.tz_minuteswest * 60L);
-#endif /* HAVE_TM_GMTOFF */
+#endif /* HAVE_STRUCT_TM_TM_GMTOFF */
}
#endif
#endif /* defined(HAVE_FTIME) || defined(HAVE_GETTIMEOFDAY) ||
newname[len + n] = '\0';
if (GETSTAT(newname, &fil_stbuf) < 0)
continue;
-#if !defined(HAVE_ST_INO) || __MINGW32__
+#if !defined(HAVE_STRUCT_STAT_ST_INO) || __MINGW32__
if ( dp->d_name[0] != '.' ||
(n != 1 &&
(dp->d_name[1] != '.' ||