Commit | Line | Data |
---|---|---|
660f21b7 SC |
1 | #include <fcntl.h> |
2 | #include <errno.h> | |
3 | #include <stdio.h> | |
8215bbac | 4 | #include <sys/types.h> |
660f21b7 SC |
5 | #include <sys/stat.h> |
6 | #include <ctype.h> | |
7 | #include <string.h> | |
c5ab244b SEF |
8 | #include <unistd.h> |
9 | ||
660f21b7 SC |
10 | #ifndef O_ACCMODE |
11 | #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR) | |
12 | #endif | |
c5ab244b | 13 | #ifndef SEEK_SET |
660f21b7 SC |
14 | #define SEEK_SET 0 |
15 | #define SEEK_CUR 1 | |
c5ab244b SEF |
16 | #endif |
17 | ||
06d0bdef JG |
18 | #define POSIX_UTIME |
19 | ||
20 | /* Some things that need to be defined in order to make code written for | |
21 | BSD Unix compile under System V Unix. */ | |
660f21b7 | 22 | |
c5ab244b | 23 | /*#include <memory.h>*/ |
660f21b7 SC |
24 | #define bcmp(b1,b2,len) memcmp(b1,b2,len) |
25 | #define bcopy(src,dst,len) memcpy(dst,src,len) | |
26 | #define bzero(s,n) memset(s,0,n) | |
27 | ||
28 | #include <string.h> | |
29 | #define index(s,c) strchr(s,c) | |
30 | #define rindex(s,c) strrchr(s,c) | |
31 | ||
67099990 | 32 | #ifndef DONTDECLARE_MALLOC |
302c8ab1 | 33 | extern PTR EXFUN(malloc,(unsigned)); |
56a56f4c | 34 | extern PTR EXFUN(realloc, (PTR, unsigned)); |
302c8ab1 | 35 | extern void EXFUN(free,(PTR)); |
67099990 SC |
36 | #endif |
37 | ||
660f21b7 SC |
38 | /* EXACT TYPES */ |
39 | typedef char int8e_type; | |
40 | typedef unsigned char uint8e_type; | |
41 | typedef short int16e_type; | |
42 | typedef unsigned short uint16e_type; | |
43 | typedef int int32e_type; | |
44 | typedef unsigned int uint32e_type; | |
45 | ||
46 | /* CORRECT SIZE OR GREATER */ | |
47 | typedef char int8_type; | |
48 | typedef unsigned char uint8_type; | |
49 | typedef short int16_type; | |
50 | typedef unsigned short uint16_type; | |
51 | typedef int int32_type; | |
52 | typedef unsigned int uint32_type; | |
53 | ||
a5431adc | 54 | #include "fopen-same.h" |