Back to index

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