Mercurial > emacs
comparison src/strftime.c @ 20010:cb0800f5aa96
automatically generated from GPLed version
author | Paul Eggert <eggert@twinsun.com> |
---|---|
date | Tue, 30 Sep 1997 18:13:00 +0000 |
parents | 278944a16af3 |
children | f722b33c682d |
comparison
equal
deleted
inserted
replaced
20009:09bc233eb018 | 20010:cb0800f5aa96 |
---|---|
34 # define MULTIBYTE_IS_FORMAT_SAFE 1 | 34 # define MULTIBYTE_IS_FORMAT_SAFE 1 |
35 # define STDC_HEADERS 1 | 35 # define STDC_HEADERS 1 |
36 # include "../locale/localeinfo.h" | 36 # include "../locale/localeinfo.h" |
37 #endif | 37 #endif |
38 | 38 |
39 #if defined emacs && !defined HAVE_BCOPY | |
40 # define HAVE_MEMCPY 1 | |
41 #endif | |
42 | |
39 #include <ctype.h> | 43 #include <ctype.h> |
40 #include <sys/types.h> /* Some systems define `time_t' here. */ | 44 #include <sys/types.h> /* Some systems define `time_t' here. */ |
41 | 45 |
42 #ifdef TIME_WITH_SYS_TIME | 46 #ifdef TIME_WITH_SYS_TIME |
43 # include <sys/time.h> | 47 # include <sys/time.h> |
138 # define tzset __tzset | 142 # define tzset __tzset |
139 #else | 143 #else |
140 # if ! HAVE_LOCALTIME_R | 144 # if ! HAVE_LOCALTIME_R |
141 # if ! HAVE_TM_GMTOFF | 145 # if ! HAVE_TM_GMTOFF |
142 /* Approximate gmtime_r as best we can in its absence. */ | 146 /* Approximate gmtime_r as best we can in its absence. */ |
147 # undef gmtime_r | |
143 # define gmtime_r my_gmtime_r | 148 # define gmtime_r my_gmtime_r |
144 static struct tm *gmtime_r __P ((const time_t *, struct tm *)); | 149 static struct tm *gmtime_r __P ((const time_t *, struct tm *)); |
145 static struct tm * | 150 static struct tm * |
146 gmtime_r (t, tp) | 151 gmtime_r (t, tp) |
147 const time_t *t; | 152 const time_t *t; |
154 return tp; | 159 return tp; |
155 } | 160 } |
156 # endif /* ! HAVE_TM_GMTOFF */ | 161 # endif /* ! HAVE_TM_GMTOFF */ |
157 | 162 |
158 /* Approximate localtime_r as best we can in its absence. */ | 163 /* Approximate localtime_r as best we can in its absence. */ |
164 # undef localtime_r | |
159 # define localtime_r my_ftime_localtime_r | 165 # define localtime_r my_ftime_localtime_r |
160 static struct tm *localtime_r __P ((const time_t *, struct tm *)); | 166 static struct tm *localtime_r __P ((const time_t *, struct tm *)); |
161 static struct tm * | 167 static struct tm * |
162 localtime_r (t, tp) | 168 localtime_r (t, tp) |
163 const time_t *t; | 169 const time_t *t; |
327 #define ISO_WEEK_START_WDAY 1 /* Monday */ | 333 #define ISO_WEEK_START_WDAY 1 /* Monday */ |
328 #define ISO_WEEK1_WDAY 4 /* Thursday */ | 334 #define ISO_WEEK1_WDAY 4 /* Thursday */ |
329 #define YDAY_MINIMUM (-366) | 335 #define YDAY_MINIMUM (-366) |
330 static int iso_week_days __P ((int, int)); | 336 static int iso_week_days __P ((int, int)); |
331 #ifdef __GNUC__ | 337 #ifdef __GNUC__ |
332 inline | 338 __inline__ |
333 #endif | 339 #endif |
334 static int | 340 static int |
335 iso_week_days (yday, wday) | 341 iso_week_days (yday, wday) |
336 int yday; | 342 int yday; |
337 int wday; | 343 int wday; |