diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-01-31 10:59:36 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-01-31 10:59:36 -0800 |
commit | 4cca0de78b08fac283390274521a7af83c7cf63a (patch) | |
tree | f90ef48f3cbfe9229d7238d359d9be5081a66aeb | |
parent | 986d21a21dc31040269c9ad8ce8b04a96f6d18ee (diff) |
header fixes for building python from source
-rw-r--r-- | system/include/libc/stdio.h | 2 | ||||
-rw-r--r-- | system/include/libc/sys/resource.h | 16 | ||||
-rw-r--r-- | system/include/libc/sys/termios.h | 8 | ||||
-rw-r--r-- | system/include/sys/statvfs.h | 5 |
4 files changed, 29 insertions, 2 deletions
diff --git a/system/include/libc/stdio.h b/system/include/libc/stdio.h index 1b0c30f5..19e460a3 100644 --- a/system/include/libc/stdio.h +++ b/system/include/libc/stdio.h @@ -670,7 +670,7 @@ _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) { __swbuf_r(_REENT, (int)(x), p) == EOF : (*(p)->_p = (x), (p)->_p++, 0)) #define L_cuserid 9 /* posix says it goes in stdio.h :( */ -#ifdef __CYGWIN__ +#if defined(__CYGWIN__) || defined(EMSCRIPTEN) #define L_ctermid 16 #endif #endif diff --git a/system/include/libc/sys/resource.h b/system/include/libc/sys/resource.h index 37757e88..a7fbe4dd 100644 --- a/system/include/libc/sys/resource.h +++ b/system/include/libc/sys/resource.h @@ -9,7 +9,21 @@ struct rusage { struct timeval ru_utime; /* user time used */ struct timeval ru_stime; /* system time used */ - int ru_maxrss; /* XXX Emscripten */ + /* XXX Emscripten */ + int ru_maxrss; + int ru_ixrss; + int ru_idrss; + int ru_isrss; + int ru_minflt; + int ru_majflt; + int ru_nswap; + int ru_inblock; + int ru_oublock; + int ru_msgsnd; + int ru_msgrcv; + int ru_nsignals; + int ru_nvcsw; + int ru_nivcsw; }; /* XXX Emscripten */ diff --git a/system/include/libc/sys/termios.h b/system/include/libc/sys/termios.h index 14174a43..88e8ad16 100644 --- a/system/include/libc/sys/termios.h +++ b/system/include/libc/sys/termios.h @@ -262,6 +262,14 @@ __END_DECLS #endif /* !KERNEL */ +/* XXX Emscripten */ +struct winsize { + unsigned short ws_row; + unsigned short ws_col; + unsigned short ws_xpixel; + unsigned short ws_ypixel; +}; + /* * END OF PROTECTED INCLUDE. */ diff --git a/system/include/sys/statvfs.h b/system/include/sys/statvfs.h index 9b7490b5..cf0a8c96 100644 --- a/system/include/sys/statvfs.h +++ b/system/include/sys/statvfs.h @@ -1,4 +1,7 @@ +#ifndef _SYS_STATVFS_H +#define _SYS_STATVFS_H + #ifdef __cplusplus extern "C" { #endif @@ -23,3 +26,5 @@ int statvfs(char *path, struct statvfs *s); } #endif +#endif + |