Changeset 25433
- Timestamp:
- 05/10/08 16:30:34 (6 days ago)
- Files:
-
- haiku/trunk/headers/posix/assert.h (modified) (2 diffs)
- haiku/trunk/headers/posix/ctype.h (modified) (1 diff)
- haiku/trunk/headers/posix/fcntl.h (modified) (1 diff)
- haiku/trunk/headers/posix/inttypes.h (modified) (1 diff)
- haiku/trunk/headers/posix/libio.h (modified) (2 diffs)
- haiku/trunk/headers/posix/limits.h (modified) (1 diff)
- haiku/trunk/headers/posix/math.h (modified) (2 diffs)
- haiku/trunk/headers/posix/netinet/in.h (modified) (1 diff)
- haiku/trunk/headers/posix/netinet/ip_var.h (modified) (2 diffs)
- haiku/trunk/headers/posix/net/route.h (modified) (1 diff)
- haiku/trunk/headers/posix/pthread.h (modified) (4 diffs)
- haiku/trunk/headers/posix/setjmp.h (modified) (1 diff)
- haiku/trunk/headers/posix/shadow.h (modified) (1 diff)
- haiku/trunk/headers/posix/signal.h (modified) (3 diffs)
- haiku/trunk/headers/posix/size_t.h (modified) (1 diff)
- haiku/trunk/headers/posix/stdint.h (modified) (2 diffs)
- haiku/trunk/headers/posix/stdio.h (modified) (1 diff)
- haiku/trunk/headers/posix/stdio_post.h (modified) (2 diffs)
- haiku/trunk/headers/posix/string.h (modified) (2 diffs)
- haiku/trunk/headers/posix/sys/mman.h (modified) (4 diffs)
- haiku/trunk/headers/posix/sys/poll.h (modified) (1 diff)
- haiku/trunk/headers/posix/sys/resource.h (modified) (2 diffs)
- haiku/trunk/headers/posix/sys/stat.h (modified) (2 diffs)
- haiku/trunk/headers/posix/sys/wait.h (modified) (3 diffs)
- haiku/trunk/headers/posix/unistd.h (modified) (1 diff)
- haiku/trunk/headers/posix/wchar.h (modified) (2 diffs)
- haiku/trunk/headers/posix/wchar_t.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
haiku/trunk/headers/posix/assert.h
r8240 r25433 8 8 9 9 #ifndef NDEBUG 10 / / defining NDEBUG disables assert() functionality10 /* defining NDEBUG disables assert() functionality */ 11 11 12 12 #ifdef __cplusplus … … 27 27 ((assertion) ? (void)0 : __assert_fail(#assertion, __FILE__, __LINE__, __PRETTY_FUNCTION__)) 28 28 29 #else / / NDEBUG30 # define assert(condition) ;29 #else /* NDEBUG */ 30 # define assert(condition) ((void)0) 31 31 #endif 32 32 haiku/trunk/headers/posix/ctype.h
r20386 r25433 75 75 #endif 76 76 77 #endif / / _CTYPE_H77 #endif /* _CTYPE_H */ haiku/trunk/headers/posix/fcntl.h
r23836 r25433 54 54 #define O_DSYNC 0x00040000 /* write synchronized I/O data integrity */ 55 55 56 / / TODO: currently not implemented additions:56 /* TODO: currently not implemented additions: */ 57 57 #define O_NOFOLLOW 0x00080000 58 58 /* should we implement this? it's similar to O_NOTRAVERSE but will fail on symlinks */ haiku/trunk/headers/posix/inttypes.h
r24039 r25433 205 205 extern intmax_t strtoimax(const char *string, char **_end, int base); 206 206 extern uintmax_t strtoumax(const char *string, char **_end, int base); 207 / /extern intmax_t wcstoimax(const __wchar_t *, __wchar_t **, int);208 / /extern uintmax_t wcstoumax(const __wchar_t *, __wchar_t **, int);207 /* extern intmax_t wcstoimax(const __wchar_t *, __wchar_t **, int); */ 208 /* extern uintmax_t wcstoumax(const __wchar_t *, __wchar_t **, int); */ 209 209 210 210 #ifdef __cplusplus haiku/trunk/headers/posix/libio.h
r7363 r25433 139 139 140 140 int _fileno; 141 / / int _blksize;141 /* int _blksize; */ 142 142 int _flags2; 143 143 off_t _old_offset; /* This used to be _offset but it's too small. */ … … 152 152 153 153 off_t _offset; 154 / /#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T154 /* #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T */ 155 155 /* Wide character stream stuff. */ 156 156 struct _IO_codecvt *_codecvt; 157 157 struct _IO_wide_data *_wide_data; 158 / /#else159 //void *__pad1;160 //void *__pad2;161 //#endif 158 /* #else 159 * void *__pad1; 160 * void *__pad2; 161 * #endif */ 162 162 int _mode; 163 163 /* Make sure we don't get into trouble again. */ haiku/trunk/headers/posix/limits.h
r24668 r25433 1 1 #ifndef _LIBC_LIMITS_H_ 2 2 #define _LIBC_LIMITS_H_ 3 / / Note: The header guard is checked in gcc's limits.h.3 /* Note: The header guard is checked in gcc's limits.h. */ 4 4 5 5 #include <float.h> /* for DBL_DIG, FLT_DIG, etc */ haiku/trunk/headers/posix/math.h
r24412 r25433 35 35 #define HUGE_VALF (((__huge_valf_t) { __l: __HUGE_VALF_v }).__f) 36 36 37 / / ToDo: define HUGE_VALL for long doubles37 /* ToDo: define HUGE_VALL for long doubles */ 38 38 39 39 #define __NAN_VALF_v 0x7fc00000L … … 147 147 extern long lroundl(long double x); 148 148 149 / / TODO: add and fix those!149 /* TODO: add and fix those! */ 150 150 extern /*long*/ double lgamma(/*long*/ double x); 151 151 haiku/trunk/headers/posix/netinet/in.h
r22643 r25433 23 23 */ 24 24 #ifndef htonl 25 / / extern uint32_t __swap_int32(uint32_t);/* private */25 /* extern uint32_t __swap_int32(uint32_t); */ /* private */ 26 26 extern unsigned long __swap_int32(unsigned long); /* private */ 27 27 extern uint16_t __swap_int16(uint16_t); /* private */ haiku/trunk/headers/posix/netinet/ip_var.h
r18010 r25433 139 139 }; 140 140 141 / /#ifdef _KERNEL_MODE141 /* #ifdef _KERNEL_MODE */ 142 142 143 143 #define IP_FORWARDING 0x1 /* most of ip header exists */ … … 148 148 149 149 #if 0 150 / /struct ipstat ipstat;150 /* struct ipstat ipstat; */ 151 151 152 152 void ipv4_input(struct mbuf *, int); haiku/trunk/headers/posix/net/route.h
r20494 r25433 21 21 #define RTF_LOCAL 0x00200000 22 22 23 / /This structure is used to pass routes to and from the network stack24 // (via struct ifreq) 23 /* This structure is used to pass routes to and from the network stack 24 * (via struct ifreq) */ 25 25 26 26 struct route_entry { haiku/trunk/headers/posix/pthread.h
r25390 r25433 73 73 #define PTHREAD_PRIO_PROTECT 2 74 74 75 / /extern pthread_mutexattr_t pthread_mutexattr_default;75 /* extern pthread_mutexattr_t pthread_mutexattr_default; */ 76 76 77 77 /* private structure */ … … 177 177 #if 0 /* Unimplemented attribute functions: */ 178 178 179 / / mandatory!179 /* mandatory! */ 180 180 extern int pthread_attr_getschedparam(const pthread_attr_t *attr, 181 181 struct sched_param *param); … … 183 183 const struct sched_param *param); 184 184 185 / / [TPS]185 /* [TPS] */ 186 186 extern int pthread_attr_getinheritsched(const pthread_attr_t *attr, 187 187 int *inheritsched); … … 195 195 extern int pthread_attr_setscope(pthread_attr_t *attr, int contentionscope); 196 196 197 / / [XSI]197 /* [XSI] */ 198 198 extern int pthread_attr_getguardsize(const pthread_attr_t *attr, 199 199 size_t *guardsize); 200 200 extern int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize); 201 201 202 / / [TSA]202 /* [TSA] */ 203 203 extern int pthread_attr_getstackaddr(const pthread_attr_t *attr, 204 204 void **stackaddr); 205 205 extern int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr); 206 206 207 / / [TSA TSS]207 /* [TSA TSS] */ 208 208 extern int pthread_attr_getstack(const pthread_attr_t *attr, 209 209 void **stackaddr, size_t *stacksize); haiku/trunk/headers/posix/setjmp.h
r22703 r25433 8 8 #include <signal.h> 9 9 10 / / include architecture specific definitions10 /* include architecture specific definitions */ 11 11 #ifdef __INTEL__ 12 12 #include <arch/x86/arch_setjmp.h> haiku/trunk/headers/posix/shadow.h
r25002 r25433 50 50 51 51 52 #endif / / _SHADOW_H_52 #endif /* _SHADOW_H_ */ haiku/trunk/headers/posix/signal.h
r24444 r25433 26 26 #define SIG_HOLD ((sighandler_t)3) /* the signal was hold */ 27 27 28 / /TODO: Support this structure, or more precisely the SA_SIGINFO flag. To do29 //this properly we need real-time signal support. Both are commented out for30 // the time being to not make "configure" scripts think we do support them. 28 /* TODO: Support this structure, or more precisely the SA_SIGINFO flag. To do 29 * this properly we need real-time signal support. Both are commented out for 30 * the time being to not make "configure" scripts think we do support them. */ 31 31 #if 0 32 32 typedef struct { … … 62 62 #define SA_RESTART 0x10 63 63 #define SA_ONSTACK 0x20 64 / /#define SA_SIGINFO 0x4064 /* #define SA_SIGINFO 0x40 */ 65 65 #define SA_NOMASK SA_NODEFER 66 66 #define SA_STACK SA_ONSTACK … … 249 249 typedef struct vregs vregs; 250 250 251 / / include architecture specific definitions251 /* include architecture specific definitions */ 252 252 #ifdef __INTEL__ 253 253 #include <arch/x86/signal.h> haiku/trunk/headers/posix/size_t.h
r24413 r25433 8 8 #include <stddef.h> 9 9 10 / /TODO: ATM gcc's stddef.h defines ssize_t for BeOS.h. We should fix this.11 //typedef long signed int ssize_t; 10 /* TODO: ATM gcc's stddef.h defines ssize_t for BeOS.h. We should fix this. 11 * typedef long signed int ssize_t; */ 12 12 13 13 #endif /* _SIZE_T_H_ */ haiku/trunk/headers/posix/stdint.h
r24654 r25433 132 132 #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) 133 133 134 / / Macros of Integer Constant Expressions134 /* Macros of Integer Constant Expressions */ 135 135 #define INT8_C(value) value 136 136 #define INT16_C(value) value … … 143 143 #define UINT64_C(value) value ## ULL 144 144 145 / / Macros for greatest-width integer constant expressions145 /* Macros for greatest-width integer constant expressions */ 146 146 #define INTMAX_C(value) value ## LL 147 147 #define UINTMAX_C(value) value ## ULL haiku/trunk/headers/posix/stdio.h
r24413 r25433 11 11 12 12 13 / /Dodge gcc 2.95.3's fixincludes hack stdio_va_list by including this string:14 // __gnuc_va_list 13 /* Dodge gcc 2.95.3's fixincludes hack stdio_va_list by including this string: 14 * __gnuc_va_list */ 15 15 16 16 haiku/trunk/headers/posix/stdio_post.h
r24565 r25433 5 5 #define _STDIO_POST_H_ 6 6 7 / / "Private"/inline functions of our BeOS compatible stdio implementation7 /* "Private"/inline functions of our BeOS compatible stdio implementation */ 8 8 9 / /ToDo: this is a work in progress to make our stdio10 //BeOS' GNU/libio (almost) binary compatible11 // We may not yet be compatible! 9 /* ToDo: this is a work in progress to make our stdio 10 * BeOS' GNU/libio (almost) binary compatible 11 * We may not yet be compatible! */ 12 12 13 13 #ifndef _STDIO_H_ … … 20 20 21 21 extern char _single_threaded; 22 / /this boolean value is true (1) if there is only the main thread23 //running - as soon as you spawn the first thread, it's set to24 // false (0)22 /* this boolean value is true (1) if there is only the main thread 23 * running - as soon as you spawn the first thread, it's set to 24 * false (0) */ 25 25 26 26 #ifdef __cplusplus haiku/trunk/headers/posix/string.h
r24525 r25433 38 38 39 39 extern char *strchrnul(const char *string, int character); 40 / / this is a GNU extension40 /* this is a GNU extension */ 41 41 42 42 extern char *strpbrk(const char *string, const char *set); … … 67 67 extern size_t strnlen(const char *string, size_t count); 68 68 69 / /extern char *strlwr(char *string);70 / /extern char *strupr(char *string);69 /* extern char *strlwr(char *string); */ 70 /* extern char *strupr(char *string); */ 71 71 72 / /extern char *strsep(char **stringPointer, const char *delimiter);72 /* extern char *strsep(char **stringPointer, const char *delimiter); */ 73 73 74 74 extern const char *strsignal(int signal); haiku/trunk/headers/posix/sys/mman.h
r25374 r25433 10 10 11 11 12 / / memory protection for mmap() and others12 /* memory protection for mmap() and others */ 13 13 #define PROT_READ 0x01 14 14 #define PROT_WRITE 0x02 … … 16 16 #define PROT_NONE 0x00 17 17 18 / / mmap() flags18 /* mmap() flags */ 19 19 #define MAP_SHARED 0x01 /* changes are seen by others */ 20 20 #define MAP_PRIVATE 0x02 /* changes are only seen by caller */ … … 23 23 #define MAP_ANON MAP_ANONYMOUS 24 24 25 / / mmap() error return code25 /* mmap() error return code */ 26 26 #define MAP_FAILED ((void*)-1) 27 27 … … 39 39 40 40 41 #endif / / _SYS_MMAN_H41 #endif /* _SYS_MMAN_H */ haiku/trunk/headers/posix/sys/poll.h
r24864 r25433 8 8 9 9 #include <poll.h> 10 / / for compatibility with legacy applications10 /* for compatibility with legacy applications */ 11 11 12 12 haiku/trunk/headers/posix/sys/resource.h
r17545 r25433 18 18 }; 19 19 20 / / ToDo: the only supported mode is RLIMIT_NOFILE right now20 /* ToDo: the only supported mode is RLIMIT_NOFILE right now */ 21 21 #define RLIMIT_CORE 0 /* size of the core file */ 22 22 #define RLIMIT_CPU 1 /* CPU time per team */ … … 63 63 extern int setrlimit(int resource, const struct rlimit * rlp); 64 64 65 / /ToDo: The following POSIX calls are missing (in BeOS as well):66 //int getpriority(int which, id_t who);67 //int setpriority(int which, id_t who, int priority); 65 /* ToDo: The following POSIX calls are missing (in BeOS as well): 66 * int getpriority(int which, id_t who); 67 * int setpriority(int which, id_t who, int priority); */ 68 68 69 69 #ifdef __cplusplus haiku/trunk/headers/posix/sys/stat.h
r24881 r25433 25 25 time_t st_crtime; /* creation time */ 26 26 27 / /Haiku extensions:28 //TODO: we might also define special types for files and TTYs29 //TODO: we should find another solution for this, as BStatable::GetStat()30 // can only retrieve the R5 stat structure27 /* Haiku extensions: 28 * TODO: we might also define special types for files and TTYs 29 * TODO: we should find another solution for this, as BStatable::GetStat() 30 * can only retrieve the R5 stat structure */ 31 31 unsigned int st_type; /* attribute/index type */ 32 32 }; … … 111 111 extern mode_t umask(mode_t cmask); 112 112 113 / / This achieves backwards compatibility with R5114 #if 0 / /def HAIKU_TARGET_PLATFORM_HAIKU113 /* This achieves backwards compatibility with R5 */ 114 #if 0 /* def HAIKU_TARGET_PLATFORM_HAIKU */ 115 115 #define stat(fd, st) _stat(fd, st, sizeof(struct stat)) 116 116 #define fstat(fd, st) _fstat(fd, st, sizeof(struct stat)) 117 117 #define lstat(fd, st) _lstat(fd, st, sizeof(struct stat)) 118 118 #else 119 / / ... and this fixes the build for R5 for now119 /* ... and this fixes the build for R5 for now */ 120 120 extern int stat(const char *path, struct stat *st); 121 121 extern int fstat(int fd, struct stat *st); haiku/trunk/headers/posix/sys/wait.h
r24444 r25433 28 28 #define WIFCONTINUED(value) ((value) & 0x20000) 29 29 30 / /TODO: waitid() is part of the real-time signal extension. Uncomment when31 // implemented! 30 /* TODO: waitid() is part of the real-time signal extension. Uncomment when 31 * implemented! */ 32 32 #if 0 33 33 /* ID types for waitid() */ … … 37 37 P_PGID /* wait for any child whose process group ID matches */ 38 38 } idtype_t; 39 #endif / / 039 #endif /* 0 */ 40 40 41 41 … … 46 46 extern pid_t wait(int *_status); 47 47 extern pid_t waitpid(pid_t pid, int *_status, int options); 48 / /extern int waitid(idtype_t idType, id_t id, siginfo_t *info, int options);48 /* extern int waitid(idtype_t idType, id_t id, siginfo_t *info, int options); */ 49 49 50 50 #ifdef __cplusplus haiku/trunk/headers/posix/unistd.h
r25361 r25433 209 209 extern int optind, opterr, optopt; 210 210 211 / / ToDo: should be moved to stdlib.h211 /* ToDo: should be moved to stdlib.h */ 212 212 extern char **environ; 213 213 haiku/trunk/headers/posix/wchar.h
r24413 r25433 11 11 #include <stdio.h> 12 12 13 / /stddef.h is not supposed to define wint_t, but gcc 2.95.3's one does.14 // In all other cases we will do that. 13 /* stddef.h is not supposed to define wint_t, but gcc 2.95.3's one does. 14 * In all other cases we will do that. */ 15 15 #ifndef _WINT_T 16 16 #define _WINT_T … … 22 22 typedef __WINT_TYPE__ wint_t; 23 23 24 #endif / / _WINT_T24 #endif /* _WINT_T */ 25 25 26 26 typedef int wctype_t; haiku/trunk/headers/posix/wchar_t.h
r24413 r25433 4 4 */ 5 5 6 / / Include GCC's stddef.h. It defines wchar_t.6 /* Include GCC's stddef.h. It defines wchar_t. */ 7 7 #include <stddef.h>
