comparison liboctave/oct-time.cc @ 3597:26662775f4e9

[project @ 2000-02-12 02:24:41 by jwe]
author jwe
date Sat, 12 Feb 2000 02:24:46 +0000
parents 5eef8a2294bd
children 0ecd1696605d
comparison
equal deleted inserted replaced
3596:edcaebe1b81b 3597:26662775f4e9
22 22
23 #ifdef HAVE_CONFIG_H 23 #ifdef HAVE_CONFIG_H
24 #include <config.h> 24 #include <config.h>
25 #endif 25 #endif
26 26
27 // I am told that without _BSD_SOURCE, tm_zone won't be declared on
28 // some systems. Defining _XOPEN_SOURCE provides the declaration for
29 // strptime on some others.
30 //
31 // These defines go here, before any system header files are included,
32 // because the system header files may define other macros that are
33 // actually used to determine the feature set. If we wait until after
34 // some system header file is included, it may be too late.
35
36 #if !defined (_BSD_SOURCE)
37 #define _BSD_SOURCE 1
38 #define OCTAVE_UNDEFINE_BSD_SOURCE
39 #endif
40
41 #if !defined (_XOPEN_SOURCE)
42 #define _XOPEN_SOURCE 1
43 #define OCTAVE_UNDEFINE_XOPEN_SOURCE
44 #endif
45
27 #include <climits> 46 #include <climits>
28 #include <cmath> 47 #include <cmath>
29 48
30 #include "lo-error.h" 49 #include "lo-error.h"
31 #include "lo-utils.h" 50 #include "lo-utils.h"
32 #define __USE_XOPEN
33 #include "oct-time.h" 51 #include "oct-time.h"
52
53 #if defined (OCTAVE_UNDEFINE_BSD_SOURCE)
54 #undef _BSD_SOURCE
55 #endif
56
57 #if defined (OCTAVE_UNDEFINE_XOPEN_SOURCE)
58 #undef _XOPEN_SOURCE
59 #endif
34 60
35 #if !defined (HAVE_STRPTIME) 61 #if !defined (HAVE_STRPTIME)
36 extern "C" char *strptime (const char *buf, const char *format, struct tm *tm); 62 extern "C" char *strptime (const char *buf, const char *format, struct tm *tm);
37 #endif 63 #endif
38 64