home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / glibc-1.06 / time / private.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-15  |  3.3 KB  |  169 lines

  1. #ifndef PRIVATE_H
  2.  
  3. #define PRIVATE_H
  4.  
  5. /*
  6. ** This header is for use ONLY with the time conversion code.
  7. ** There is no guarantee that it will remain unchanged,
  8. ** or that it will remain at all.
  9. ** Do NOT copy it to any system include directory.
  10. ** Thank you!
  11. */
  12.  
  13. /*
  14. ** ID
  15. */
  16.  
  17. #ifndef lint
  18. #ifndef NOID
  19. static char    privatehid[] = "@(#)private.h    7.1";
  20. #endif /* !defined NOID */
  21. #endif /* !defined lint */
  22.  
  23. /*
  24. ** const
  25. */
  26.  
  27. #ifndef const
  28. #ifndef __STDC__
  29. #define const
  30. #endif /* !defined __STDC__ */
  31. #endif /* !defined const */
  32.  
  33. /*
  34. ** void
  35. */
  36.  
  37. #ifndef void
  38. #ifndef __STDC__
  39. #ifndef vax
  40. #ifndef sun
  41. #define void    char
  42. #endif /* !defined sun */
  43. #endif /* !defined vax */
  44. #endif /* !defined __STDC__ */
  45. #endif /* !defined void */
  46.  
  47. /*
  48. ** P((args))
  49. */
  50.  
  51. #ifndef P
  52. #ifdef __STDC__
  53. #define P(x)    x
  54. #else /* !defined __STDC__ */
  55. #define ASTERISK    *
  56. #define P(x)    ( /ASTERISK x ASTERISK/ )
  57. #endif /* !defined __STDC__ */
  58. #endif /* !defined P */
  59.  
  60. /*
  61. ** genericptr_t
  62. */
  63.  
  64. #ifdef __STDC__
  65. typedef void *        genericptr_t;
  66. #else /* !defined __STDC__ */
  67. typedef char *        genericptr_t;
  68. #endif /* !defined __STDC__ */
  69.  
  70. #include "sys/types.h"    /* for time_t */
  71. #include "stdio.h"
  72. #include "ctype.h"
  73. #include "errno.h"
  74. #include "string.h"
  75. #ifndef _TIME_
  76. #include "time.h"
  77. #endif /* !defined _TIME_ */
  78.  
  79. #ifndef remove
  80. extern int    unlink P((const char * filename));
  81. #define remove    unlink
  82. #endif /* !defined remove */
  83.  
  84. #ifndef FILENAME_MAX
  85.  
  86. #ifndef MAXPATHLEN
  87. #ifdef unix
  88. #include "sys/param.h"
  89. #endif /* defined unix */
  90. #endif /* !defined MAXPATHLEN */
  91.  
  92. #ifdef MAXPATHLEN
  93. #define FILENAME_MAX    MAXPATHLEN
  94. #else /* !defined MAXPATHLEN */
  95. #define FILENAME_MAX    1024        /* Pure guesswork */
  96. #endif /* !defined MAXPATHLEN */
  97.  
  98. #endif /* !defined FILENAME_MAX */
  99.  
  100. #ifndef EXIT_SUCCESS
  101. #define EXIT_SUCCESS    0
  102. #endif /* !defined EXIT_SUCCESS */
  103.  
  104. #ifndef EXIT_FAILURE
  105. #define EXIT_FAILURE    1
  106. #endif /* !defined EXIT_FAILURE */
  107.  
  108. #ifdef __STDC__
  109.  
  110. #define alloc_size_t    size_t
  111. #define qsort_size_t    size_t
  112. #define fwrite_size_t    size_t
  113.  
  114. #else /* !defined __STDC__ */
  115.  
  116. #ifndef alloc_size_t
  117. #define alloc_size_t    unsigned
  118. #endif /* !defined alloc_size_t */
  119.  
  120. #ifndef qsort_size_t
  121. #ifdef USG
  122. #define qsort_size_t    unsigned
  123. #else /* !defined USG */
  124. #define qsort_size_t    int
  125. #endif /* !defined USG */
  126. #endif /* !defined qsort_size_t */
  127.  
  128. #ifndef fwrite_size_t
  129. #define fwrite_size_t    int
  130. #endif /* !defined fwrite_size_t */
  131.  
  132. #ifndef USG
  133. extern char *        sprintf P((char * buf, const char * format, ...));
  134. #endif /* !defined USG */
  135.  
  136. #endif /* !defined __STDC__ */
  137.  
  138. /*
  139. ** Ensure that these are declared--redundantly declaring them shouldn't hurt.
  140. */
  141.  
  142. extern char *        getenv P((const char * name));
  143. extern genericptr_t    malloc P((alloc_size_t size));
  144. extern genericptr_t    calloc P((alloc_size_t nelem, alloc_size_t elsize));
  145. extern genericptr_t    realloc P((genericptr_t oldptr, alloc_size_t newsize));
  146.  
  147. #ifdef USG
  148. extern void        exit P((int s));
  149. extern void        qsort P((genericptr_t base, qsort_size_t nelem,
  150.                 qsort_size_t elsize, int (*comp)()));
  151. extern void        perror P((const char * string));
  152. extern void        free P((char * buf));
  153. #endif /* defined USG */
  154.  
  155. #ifndef TRUE
  156. #define TRUE    1
  157. #endif /* !defined TRUE */
  158.  
  159. #ifndef FALSE
  160. #define FALSE    0
  161. #endif /* !defined FALSE */
  162.  
  163. /*
  164. ** UNIX is a registered trademark of AT&T.
  165. ** VAX is a trademark of Digital Equipment Corporation.
  166. */
  167.  
  168. #endif /* !defined PRIVATE_H */
  169.