home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / nspr30-e.zip / nspr30-e / include / md / sunos4.h < prev   
C/C++ Source or Header  |  1998-07-21  |  4KB  |  147 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /*
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  * 
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  * 
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #ifndef pr_sunos4_h___
  20. #define pr_sunos4_h___
  21.  
  22. #ifndef SVR4
  23.  
  24. /*
  25. ** Hodge podge of random missing prototypes for the Sunos4 system
  26. */
  27. #include <stdio.h>
  28. #include <stdarg.h>
  29. #include <time.h>
  30. #include <limits.h>
  31. #include <sys/types.h>
  32.  
  33. #define PATH_MAX _POSIX_PATH_MAX
  34.  
  35. struct timeval;
  36. struct timezone;
  37. struct itimerval;
  38. struct sockaddr;
  39. struct stat;
  40. struct tm;
  41.  
  42. /* ctype.h */
  43. extern int tolower(int);
  44. extern int toupper(int);
  45.  
  46. /* errno.h */
  47. extern char *sys_errlist[];
  48. extern int sys_nerr;
  49.  
  50. #define strerror(e) sys_errlist[((unsigned)(e) < sys_nerr) ? e : 0]
  51.  
  52. extern void perror(const char *);
  53.  
  54. /* getopt */
  55. extern char *optarg;
  56. extern int optind;
  57. extern int getopt(int argc, char **argv, char *spec);
  58.  
  59. /* math.h */
  60. extern int srandom(long val);
  61. extern long random(void);
  62.  
  63. /* memory.h */
  64. #define memmove(to,from,len) bcopy((char*)(from),(char*)(to),len)
  65.  
  66. extern void bcopy(const char *, char *, int);
  67.  
  68. /* signal.h */
  69. /*
  70. ** SunOS4 sigaction hides interrupts by default, so we can safely define
  71. ** SA_RESTART to 0.
  72. */
  73. #define SA_RESTART 0
  74. #define SA_SIGINFO 0
  75.  
  76. /* stdio.h */
  77. extern int printf(const char *, ...);
  78. extern int fprintf(FILE *, const char *, ...);
  79. extern int vprintf(const char *, va_list);
  80. extern int vfprintf(FILE *, const char *, va_list);
  81. extern char *vsprintf(char *, const char *, va_list);
  82. extern int scanf(const char *, ...);
  83. extern int sscanf(const char *, const char *, ...);
  84. extern int fscanf(FILE *, const char *, ...);
  85. extern int fgetc(FILE *);
  86. extern int fputc(int, FILE *);
  87. extern int fputs(const char *, FILE *);
  88. extern int puts(const char *);
  89. extern int fread(void *, size_t, size_t, FILE *);
  90. extern int fwrite(const char *, int, int, FILE *);
  91. extern int fseek(FILE *, long, int);
  92. extern long ftell(FILE *);
  93. extern int rewind(FILE *);
  94. extern int fflush(FILE *);
  95. extern int _flsbuf(unsigned char, FILE *);
  96. extern int fclose(FILE *);
  97. extern int remove(const char *);
  98. extern int setvbuf(FILE *, char *, int, size_t);
  99. extern int system(const char *);
  100. extern FILE *popen(const char *, const char *);
  101. extern int pclose(FILE *);
  102.  
  103. /* stdlib.h */
  104. #define strtoul strtol
  105.  
  106. extern int isatty(int fildes);
  107. extern long strtol(const char *, char **, int);
  108. extern int putenv(const char *);
  109. extern void srand48(long);
  110. extern long lrand48(void);
  111. extern double drand48(void);
  112.  
  113. /* string.h */
  114. extern int strcasecmp(const char *, const char *);
  115. extern int strncasecmp(const char *, const char *, size_t);
  116. extern int strcoll(const char *, const char *);
  117.  
  118. /* time.h */
  119. extern time_t mktime(struct tm *);
  120. extern size_t strftime(char *, size_t, const char *, const struct tm *);
  121. extern int gettimeofday(struct timeval *, struct timezone *);
  122. extern int setitimer(int, struct itimerval *, struct itimerval *);
  123. extern time_t time(time_t *);
  124. extern time_t timegm(struct tm *);
  125. extern struct tm *localtime(const time_t *);
  126. extern struct tm *gmtime(const time_t *);
  127.  
  128. /* unistd.h */
  129. extern int rename(const char *, const char *);
  130. extern int ioctl(int, int, int *arg);
  131. extern int connect(int, struct sockaddr *, int);
  132. extern int readlink(const char *, char *, int);
  133. extern int symlink(const char *, const char *);
  134. extern int ftruncate(int, off_t);
  135. extern int fchmod(int, mode_t);
  136. extern int fchown(int, uid_t, gid_t);
  137. extern int lstat(const char *, struct stat *);
  138. extern int fstat(int, struct stat *);
  139. extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
  140. extern int gethostname(char *, int);
  141. extern char *getwd(char *);
  142. extern int getpagesize(void);
  143.  
  144. #endif /* SVR4 */
  145.  
  146. #endif /* pr_sunos4_h___ */
  147.