Commit ef1e10af authored by giles's avatar giles

MacOS X 10.4 only defines timezone with _XOPEN_SOURCE. Check for this.

This is timezone the global variable, not the function, used by 
httpdate.c. Always defining _XOPEN_SOURCE directly in the requisite
files is another option, and probably safe.


git-svn-id: http://svn.annodex.net/liboggz/trunk@3670 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent f9961b54
......@@ -307,8 +307,30 @@ AC_SUBST(OGGZ_OFF_MAX)
AC_CHECK_TYPES(ssize_t)
AC_CHECK_SIZEOF(ssize_t,4)
# Checks for header files.
# MacOS 10.4 only declares timezone for _XOPEN_SOURCE. Check for this.
AC_MSG_CHECKING([for timezone])
AC_COMPILE_IFELSE(
AC_LANG_PROGRAM([#include <time.h>], [
int seconds = 1234567;
seconds -= timezone;
]), AC_MSG_RESULT([ok]),
AC_MSG_RESULT([no])
AC_MSG_CHECKING([for timezone with _XOPEN_SOURCE])
AC_COMPILE_IFELSE(
AC_LANG_PROGRAM([
#define _XOPEN_SOURCE
#include <time.h>
], [
int seconds = 1234567;
seconds -= timezone;
]),
dnl _XOPEN_SOURCE is required
AC_MSG_RESULT([ok])
AC_DEFINE([_XOPEN_SOURCE], [1], [we need _XOPEN for timezone]),
dnl it didn't work even with _XOPEN_SOURCE; httpdate will break
AC_MSG_RESULT([no])
)
)
# Checks for typedefs, structures, and compiler characteristics.
......
#include "config.h"
#include <stdio.h>
#include <string.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment