Commit | Line | Data |
---|---|---|
a83a2cd1 AB |
1 | #ifndef _AMIGAOS_H |
2 | #define _AMIGAOS_H | |
3 | ||
4 | /* prototypes and defines missing from current OS4 SDK; */ | |
5 | ||
6 | /* netinet/in.h */ | |
7 | ||
8 | // #define INADDR_LOOPBACK 0x7f00001UL | |
9 | ||
10 | /* unistd.h */ | |
11 | ||
12 | #include <stdio.h> | |
13 | ||
14 | #if defined(__CLIB2__) | |
738ab09f | 15 | #include <dos.h> |
a83a2cd1 AB |
16 | #endif |
17 | #if defined(__NEWLIB__) | |
738ab09f | 18 | #include <amiga_platform.h> |
a83a2cd1 AB |
19 | #endif |
20 | ||
21 | #if 1 | |
738ab09f AB |
22 | int myexecve(bool isperlthread, const char *path, char *argv[], char *env[]); |
23 | int myexecvp(bool isperlthread, const char *filename, char *argv[]); | |
24 | int myexecv(bool isperlthread, const char *path, char *argv[]); | |
25 | int myexecl(bool isperlthread, const char *path, ...); | |
a83a2cd1 AB |
26 | #endif |
27 | ||
738ab09f AB |
28 | #define execve(path, argv, env) myexecve(TRUE, path, argv, env) |
29 | #define execvp(filename, argv) myexecvp(TRUE, filename, argv) | |
30 | #define execv(path, argv) myexecv(TRUE, path, argv) | |
31 | #define execl(path, ...) myexecl(TRUE, path, __VA_ARGS__) | |
a83a2cd1 AB |
32 | |
33 | int pipe(int filedes[2]); | |
34 | ||
35 | FILE *amigaos_popen(const char *cmd, const char *mode); | |
36 | void amigaos4_obtain_environ(); | |
37 | void amigaos4_release_environ(); | |
38 | ||
738ab09f AB |
39 | char *mystrdup(const char *s); |
40 | ||
41 | char *convert_path_u2a(const char *filename); | |
42 | char *convert_path_a2u(const char *filename); | |
43 | ||
a83a2cd1 AB |
44 | /* signal.h */ |
45 | ||
46 | // #define SIGQUIT SIGABRT | |
47 | ||
48 | void ___makeenviron() __attribute__((constructor)); | |
49 | void ___freeenviron() __attribute__((destructor)); | |
50 | ||
51 | long amigaos_get_file(int fd); | |
52 | ||
53 | // BOOL constructed; | |
54 | ||
1cd70adf AB |
55 | /* emulated flock stuff */ |
56 | ||
57 | #define LOCK_SH 1 /* Shared lock. */ | |
58 | #define LOCK_EX 2 /* Exclusive lock. */ | |
59 | #define LOCK_UN 8 /* Unlock. */ | |
60 | #define LOCK_NB 4 /* Don't block when locking. */ | |
61 | ||
62 | extern int flock(int fd, int operation); | |
63 | ||
64 | #define flock(a, b) amigaos_flock((a), (b)) | |
65 | ||
a83a2cd1 | 66 | #endif |