Back to index

lightning-sunbird  0.9+nobinonly
sunos4.h
Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is the Netscape security libraries.
00015  *
00016  * The Initial Developer of the Original Code is
00017  * Netscape Communications Corporation.
00018  * Portions created by the Initial Developer are Copyright (C) 1994-2000
00019  * the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *
00023  * Alternatively, the contents of this file may be used under the terms of
00024  * either the GNU General Public License Version 2 or later (the "GPL"), or
00025  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00026  * in which case the provisions of the GPL or the LGPL are applicable instead
00027  * of those above. If you wish to allow use of your version of this file only
00028  * under the terms of either the GPL or the LGPL, and not to allow others to
00029  * use your version of this file under the terms of the MPL, indicate your
00030  * decision by deleting the provisions above and replace them with the notice
00031  * and other provisions required by the GPL or the LGPL. If you do not delete
00032  * the provisions above, a recipient may use your version of this file under
00033  * the terms of any one of the MPL, the GPL or the LGPL.
00034  *
00035  * ***** END LICENSE BLOCK ***** */
00036 
00037 #ifndef pr_sunos4_h___
00038 #define pr_sunos4_h___
00039 
00040 #ifndef SVR4
00041 
00042 /*
00043 ** Hodge podge of random missing prototypes for the Sunos4 system
00044 */
00045 #include <stdio.h>
00046 #include <stdarg.h>
00047 #include <time.h>
00048 #include <limits.h>
00049 #include <sys/types.h>
00050 
00051 #define PATH_MAX _POSIX_PATH_MAX
00052 
00053 struct timeval;
00054 struct timezone;
00055 struct itimerval;
00056 struct sockaddr;
00057 struct stat;
00058 struct tm;
00059 
00060 /* ctype.h */
00061 extern int tolower(int);
00062 extern int toupper(int);
00063 
00064 /* errno.h */
00065 extern char *sys_errlist[];
00066 extern int sys_nerr;
00067 
00068 #define strerror(e) sys_errlist[((unsigned)(e) < sys_nerr) ? e : 0]
00069 
00070 extern void perror(const char *);
00071 
00072 /* getopt */
00073 extern char *optarg;
00074 extern int optind;
00075 extern int getopt(int argc, char **argv, char *spec);
00076 
00077 /* math.h */
00078 extern int srandom(long val);
00079 extern long random(void);
00080 
00081 /* memory.h */
00082 #define memmove(to,from,len) bcopy((char*)(from),(char*)(to),len)
00083 
00084 extern void bcopy(const char *, char *, int);
00085 
00086 /* signal.h */
00087 /*
00088 ** SunOS4 sigaction hides interrupts by default, so we can safely define
00089 ** SA_RESTART to 0 (HP-UX is a counter-example -- its sigaction does not
00090 ** hide interrupts but lacks an SA_RESTART option; you must use sigvector
00091 ** and tweak the sigcontext from within each signal handler!).
00092 */
00093 #define SA_RESTART 0
00094 #define SA_SIGINFO 0
00095 
00096 /* stdio.h */
00097 extern int printf(const char *, ...);
00098 extern int fprintf(FILE *, const char *, ...);
00099 extern int vprintf(const char *, va_list);
00100 extern int vfprintf(FILE *, const char *, va_list);
00101 extern char *vsprintf(char *, const char *, va_list);
00102 extern int scanf(const char *, ...);
00103 extern int sscanf(const char *, const char *, ...);
00104 extern int fscanf(FILE *, const char *, ...);
00105 extern int fgetc(FILE *);
00106 extern int fputc(int, FILE *);
00107 extern int fputs(const char *, FILE *);
00108 extern int puts(const char *);
00109 extern int fread(void *, size_t, size_t, FILE *);
00110 extern int fwrite(const char *, int, int, FILE *);
00111 extern int fseek(FILE *, long, int);
00112 extern long ftell(FILE *);
00113 extern int rewind(FILE *);
00114 extern int fflush(FILE *);
00115 extern int _flsbuf(unsigned char, FILE *);
00116 extern int fclose(FILE *);
00117 extern int remove(const char *);
00118 extern int setvbuf(FILE *, char *, int, size_t);
00119 extern int system(const char *);
00120 extern FILE *popen(const char *, const char *);
00121 extern int pclose(FILE *);
00122 
00123 /* stdlib.h */
00124 #define strtoul strtol
00125 
00126 extern int isatty(int fildes);
00127 extern long strtol(const char *, char **, int);
00128 extern int putenv(const char *);
00129 extern void srand48(long);
00130 extern long lrand48(void);
00131 extern double drand48(void);
00132 
00133 /* string.h */
00134 extern int strcasecmp(const char *, const char *);
00135 extern int strncasecmp(const char *, const char *, size_t);
00136 extern int strcoll(const char *, const char *);
00137 
00138 /* time.h */
00139 extern time_t mktime(struct tm *);
00140 extern size_t strftime(char *, size_t, const char *, const struct tm *);
00141 extern int gettimeofday(struct timeval *, struct timezone *);
00142 extern int setitimer(int, struct itimerval *, struct itimerval *);
00143 extern time_t time(time_t *);
00144 extern time_t timegm(struct tm *);
00145 extern struct tm *localtime(const time_t *);
00146 extern struct tm *gmtime(const time_t *);
00147 
00148 /* unistd.h */
00149 extern int rename(const char *, const char *);
00150 extern int ioctl(int, int, int *arg);
00151 extern int connect(int, struct sockaddr *, int);
00152 extern int readlink(const char *, char *, int);
00153 extern int symlink(const char *, const char *);
00154 extern int ftruncate(int, off_t);
00155 extern int fchmod(int, mode_t);
00156 extern int fchown(int, uid_t, gid_t);
00157 extern int lstat(const char *, struct stat *);
00158 extern int fstat(int, struct stat *);
00159 extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
00160 extern int gethostname(char *, int);
00161 extern char *getwd(char *);
00162 extern int getpagesize(void);
00163 
00164 #endif /* SVR4 */
00165 
00166 #endif /* pr_sunos4_h___ */