The R Project SVN R

Rev

Rev 36229 | Rev 36622 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36229 Rev 36496
Line 38... Line 38...
38
 
38
 
39
#ifdef HAVE_CONFIG_H
39
#ifdef HAVE_CONFIG_H
40
# include <config.h>
40
# include <config.h>
41
#endif
41
#endif
42
 
42
 
43
#if defined(HAVE_GLIBC2) && !defined(__USE_BSD)
-
 
44
# define __USE_BSD		/* so that we get unsetenv() */
43
#include <Defn.h>  /* This sets suitable glibc features */
45
# include <stdlib.h>
-
 
46
# undef __USE_BSD		/* used later */
-
 
47
#else
44
 
48
# include <stdlib.h>
-
 
49
#endif
-
 
50
 
45
 
-
 
46
/* _XOPEN_SOURCE is not normally defined */
51
#if defined(HAVE_WORKING_STRPTIME) && defined(HAVE_GLIBC2) && !defined(__USE_XOPEN)
47
#if defined(HAVE_WORKING_STRPTIME) && defined(HAVE_GLIBC2) && !defined(_XOPEN_SOURCE)
52
# define __USE_XOPEN		/* so that we get strptime() */
48
# define _XOPEN_SOURCE		/* so that we get strptime() */
53
# include <time.h>
49
# include <time.h>
54
# undef __USE_XOPEN		/* just to make sure */
50
# undef _XOPEN_SOURCE		/* just to make sure */
55
#else
51
#else
56
# include <time.h>
52
# include <time.h>
57
#endif
53
#endif
58
 
54
 
59
#include "Defn.h"
55
#include <Defn.h>
60
 
56
 
61
/* The glibc in RH8.0 is broken and assumes that dates before 1970-01-01
57
/* The glibc in RH8.0 is broken and assumes that dates before 1970-01-01
62
   do not exist. So does Windows, but at least there we do not need a
58
   do not exist. So does Windows, but at least there we do not need a
63
   run-time test.  As from 1.6.2, test the actual mktime code and cache the
59
   run-time test.  As from 1.6.2, test the actual mktime code and cache the
64
   result on glibc >= 2.2. (It seems this started between 2.2.5 and 2.3,
60
   result on glibc >= 2.2. (It seems this started between 2.2.5 and 2.3,