Fix duplicate declaration of struct tm and related functions by adding an WINCE_NSPRPUB_RELEASE_4_2_BETA1
authornelsonb%netscape.com
Tue, 25 Jun 2002 22:58:43 +0000
branchWINCE_NSPRPUB_RELEASE_4_2_BETA1
changeset 2419 fbba7033487762743b10403a34fb4dfb7087ff51
parent 2332 d8b2a066646bf3dbb945f16b2ac93a23dad167f4
push idunknown
push userunknown
push dateunknown
Fix duplicate declaration of struct tm and related functions by adding an ifdef. The othe declaration is in MFC's wcealt.h.
pr/include/md/_wince_libc.h
--- a/pr/include/md/_wince_libc.h
+++ b/pr/include/md/_wince_libc.h
@@ -65,16 +65,18 @@ typedef int ptrdiff_t; /* pointer differ
 
 #define ERANGE 34
 
 #define errno (*PR_GetOSErrorAddress())
 
 
 /* The following definitions are generally expected in <time.h> */
 
+#ifndef _TM_DEFINED
+#define _TM_DEFINED
 /*
  * struct tm
  *
  * And related windows specific functions to mimic LIBC's tm funcs.
  */
 struct tm {
     int tm_sec;
     int tm_min;
@@ -91,16 +93,17 @@ struct tm {
 
 /*
  * subset of the function prototypes provided by <time.h>
  */
 
 _NSPRIMP struct tm* gmtime(const time_t* inTimeT);
 _NSPRIMP struct tm* localtime(const time_t* inTimeT);
 _NSPRIMP time_t mktime(struct tm* inTM);
+#endif
 _NSPRIMP size_t strftime(char *strDest, size_t maxsize, const char *format,
                          const struct tm *timeptr);
 
 
 #ifdef  __cplusplus
 }
 #endif