diff options
Diffstat (limited to 'system/include/libc/sys')
-rw-r--r-- | system/include/libc/sys/_default_fcntl.h | 1 | ||||
-rw-r--r-- | system/include/libc/sys/dirent.h | 1 | ||||
-rw-r--r-- | system/include/libc/sys/resource.h | 7 | ||||
-rw-r--r-- | system/include/libc/sys/signal.h | 6 | ||||
-rw-r--r-- | system/include/libc/sys/stat.h | 3 | ||||
-rw-r--r-- | system/include/libc/sys/time.h | 3 | ||||
-rw-r--r-- | system/include/libc/sys/unistd.h | 1 | ||||
-rw-r--r-- | system/include/libc/sys/utime.h | 2 |
8 files changed, 21 insertions, 3 deletions
diff --git a/system/include/libc/sys/_default_fcntl.h b/system/include/libc/sys/_default_fcntl.h index 0bc4fcfa..0f2ffb07 100644 --- a/system/include/libc/sys/_default_fcntl.h +++ b/system/include/libc/sys/_default_fcntl.h @@ -186,6 +186,7 @@ struct eflock { #include <sys/stat.h> /* sigh. for the mode bits for open/creat */ extern int open _PARAMS ((const char *, int, ...)); +extern int open64 _PARAMS ((const char *, int, ...)); /* XXX Emscripten */ extern int creat _PARAMS ((const char *, mode_t)); extern int fcntl _PARAMS ((int, int, ...)); #ifdef __CYGWIN__ diff --git a/system/include/libc/sys/dirent.h b/system/include/libc/sys/dirent.h index edcc5746..da0eb4ac 100644 --- a/system/include/libc/sys/dirent.h +++ b/system/include/libc/sys/dirent.h @@ -9,6 +9,7 @@ extern "C" { #endif /* XXX Emscripten */ +#include <sys/types.h> struct dirent { ino_t d_ino; char d_name[MAXNAMLEN]; diff --git a/system/include/libc/sys/resource.h b/system/include/libc/sys/resource.h index fb5d10f2..37757e88 100644 --- a/system/include/libc/sys/resource.h +++ b/system/include/libc/sys/resource.h @@ -16,7 +16,14 @@ struct rusage { int getrusage(int who, struct rusage *r_usage); /* XXX Emscripten */ +#define RLIMIT_CORE 100 #define RLIMIT_CPU 1 +#define RLIMIT_DATA 2 +#define RLIMIT_FSIZE 3 +#define RLIMIT_NOFILE 4 +#define RLIMIT_STACK 5 +#define RLIMIT_AS 6 + typedef unsigned rlim_t; struct rlimit { rlim_t rlim_cur; diff --git a/system/include/libc/sys/signal.h b/system/include/libc/sys/signal.h index e1c2b34a..543b626e 100644 --- a/system/include/libc/sys/signal.h +++ b/system/include/libc/sys/signal.h @@ -14,7 +14,7 @@ extern "C" { typedef unsigned long sigset_t; -#if defined(__rtems__) +#if defined(__rtems__) || defined(EMSCRIPTEN) #if defined(_POSIX_REALTIME_SIGNALS) @@ -71,6 +71,8 @@ typedef struct { #define SA_NOCLDSTOP 1 /* Do not generate SIGCHLD when children stop */ #define SA_SIGINFO 2 /* Invoke the signal catching function with */ /* three arguments instead of one. */ +#define SA_NODEFER 4 /* XXX Emscripten */ +#define SA_RESETHAND 8 /* XXX Emscripten */ /* struct sigaction notes from POSIX: * @@ -80,7 +82,7 @@ typedef struct { * application should not use both simultaneously. */ -typedef void (*_sig_func_ptr)(); +typedef void (*_sig_func_ptr)(int); /* XXX Emscripten */ struct sigaction { int sa_flags; /* Special flags to affect behavior of signal */ diff --git a/system/include/libc/sys/stat.h b/system/include/libc/sys/stat.h index fd955d66..b31dc079 100644 --- a/system/include/libc/sys/stat.h +++ b/system/include/libc/sys/stat.h @@ -145,13 +145,16 @@ struct stat int _EXFUN(chmod,( const char *__path, mode_t __mode )); int _EXFUN(fchmod,(int __fd, mode_t __mode)); int _EXFUN(fstat,( int __fd, struct stat *__sbuf )); +int _EXFUN(fstat64,( int __fd, struct stat *__sbuf )); /* XXX Emscripten */ int _EXFUN(mkdir,( const char *_path, mode_t __mode )); int _EXFUN(mkfifo,( const char *__path, mode_t __mode )); int _EXFUN(stat,( const char *__path, struct stat *__sbuf )); +int _EXFUN(stat64,( const char *__path, struct stat *__sbuf )); /* XXX Emscripten */ mode_t _EXFUN(umask,( mode_t __mask )); #if defined(EMSCRIPTEN) || defined (__SPU__) || defined(__rtems__) || defined(__CYGWIN__) && !defined(__INSIDE_CYGWIN__) int _EXFUN(lstat,( const char *__path, struct stat *__buf )); +int _EXFUN(lstat64,( const char *__path, struct stat *__buf )); /* XXX Emscripten */ int _EXFUN(mknod,( const char *__path, mode_t __mode, dev_t __dev )); #endif diff --git a/system/include/libc/sys/time.h b/system/include/libc/sys/time.h index d48839f6..2bd2421e 100644 --- a/system/include/libc/sys/time.h +++ b/system/include/libc/sys/time.h @@ -7,6 +7,7 @@ #include <_ansi.h> #include <sys/types.h> +#include <time.h> /* XXX Emscripten */ #ifdef __cplusplus extern "C" { @@ -40,7 +41,7 @@ struct itimerval { }; /* BSD time macros used by RTEMS code */ -#if defined (__rtems__) || defined (__CYGWIN__) +#if defined (__rtems__) || defined (__CYGWIN__) || defined (EMSCRIPTEN) /* Convenience macros for operations on timevals. NOTE: `timercmp' does not work for >= or <=. */ diff --git a/system/include/libc/sys/unistd.h b/system/include/libc/sys/unistd.h index 06259b66..05b9286a 100644 --- a/system/include/libc/sys/unistd.h +++ b/system/include/libc/sys/unistd.h @@ -116,6 +116,7 @@ int _EXFUN(linkat, (int __dirfd1, const char *__path1, int __dirfd2, const c int _EXFUN(nice, (int __nice_value )); #if !defined(__INSIDE_CYGWIN__) off_t _EXFUN(lseek, (int __fildes, off_t __offset, int __whence )); +off_t _EXFUN(lseek64, (int __fildes, off_t __offset, int __whence )); /* XXX Emscripten */ #endif #if defined(EMSCRIPTEN) || defined(__SPU__) || defined(__CYGWIN__) #define F_ULOCK 0 diff --git a/system/include/libc/sys/utime.h b/system/include/libc/sys/utime.h index cf08b164..07fa6c2a 100644 --- a/system/include/libc/sys/utime.h +++ b/system/include/libc/sys/utime.h @@ -9,6 +9,8 @@ extern "C" { #endif +#include <time.h> /* XXX Emscripten */ + struct utimbuf { time_t actime; |