Changeset 25433

Show
Ignore:
Timestamp:
05/10/08 16:30:34 (6 days ago)
Author:
bonefish
Message:
Patch by Andreas Faerber:
Replaced single-line comments by multi-line comments for ANSI C
compliance.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • haiku/trunk/headers/posix/assert.h

    r8240 r25433  
    88 
    99#ifndef NDEBUG 
    10         // defining NDEBUG disables assert() functionality 
     10        /* defining NDEBUG disables assert() functionality */ 
    1111 
    1212#ifdef __cplusplus 
     
    2727        ((assertion) ? (void)0 : __assert_fail(#assertion, __FILE__, __LINE__, __PRETTY_FUNCTION__)) 
    2828 
    29 #else   // NDEBUG 
    30 #       define assert(condition) ; 
     29#else   /* NDEBUG */ 
     30#       define assert(condition) ((void)0) 
    3131#endif 
    3232 
  • haiku/trunk/headers/posix/ctype.h

    r20386 r25433  
    7575#endif 
    7676 
    77 #endif // _CTYPE_H 
     77#endif /* _CTYPE_H */ 
  • haiku/trunk/headers/posix/fcntl.h

    r23836 r25433  
    5454#define O_DSYNC                 0x00040000      /* write synchronized I/O data integrity */ 
    5555 
    56 // TODO: currently not implemented additions: 
     56/* TODO: currently not implemented additions: */ 
    5757#define O_NOFOLLOW              0x00080000 
    5858        /* should we implement this? it's similar to O_NOTRAVERSE but will fail on symlinks */ 
  • haiku/trunk/headers/posix/inttypes.h

    r24039 r25433  
    205205extern intmax_t         strtoimax(const char *string, char **_end, int base); 
    206206extern 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); */ 
    209209 
    210210#ifdef __cplusplus 
  • haiku/trunk/headers/posix/libio.h

    r7363 r25433  
    139139 
    140140        int             _fileno; 
    141 //     int             _blksize; 
     141/*     int             _blksize; */ 
    142142        int             _flags2; 
    143143        off_t   _old_offset; /* This used to be _offset but it's too small. */ 
     
    152152 
    153153        off_t   _offset; 
    154 //#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T 
     154/* #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T */ 
    155155        /* Wide character stream stuff.  */ 
    156156        struct _IO_codecvt *_codecvt; 
    157157        struct _IO_wide_data *_wide_data; 
    158 //#else 
    159 //    void    *__pad1; 
    160 //    void    *__pad2; 
    161 //#endif 
     158/* #else 
     159 *    void    *__pad1; 
     160 *    void    *__pad2; 
     161 * #endif */ 
    162162        int _mode; 
    163163        /* Make sure we don't get into trouble again.  */ 
  • haiku/trunk/headers/posix/limits.h

    r24668 r25433  
    11#ifndef _LIBC_LIMITS_H_ 
    22#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. */ 
    44 
    55#include <float.h>              /* for DBL_DIG, FLT_DIG, etc */ 
  • haiku/trunk/headers/posix/math.h

    r24412 r25433  
    3535#define HUGE_VALF               (((__huge_valf_t) { __l: __HUGE_VALF_v }).__f) 
    3636 
    37 // ToDo: define HUGE_VALL for long doubles 
     37/* ToDo: define HUGE_VALL for long doubles */ 
    3838 
    3939#define __NAN_VALF_v    0x7fc00000L 
     
    147147extern long             lroundl(long double x); 
    148148 
    149 // TODO: add and fix those! 
     149/* TODO: add and fix those! */ 
    150150extern /*long*/ double  lgamma(/*long*/ double x); 
    151151 
  • haiku/trunk/headers/posix/netinet/in.h

    r22643 r25433  
    2323 */ 
    2424#ifndef htonl 
    25 //     extern uint32_t __swap_int32(uint32_t);        /* private */ 
     25/*     extern uint32_t __swap_int32(uint32_t); */     /* private */ 
    2626        extern unsigned long __swap_int32(unsigned long);       /* private */ 
    2727        extern uint16_t __swap_int16(uint16_t); /* private */ 
  • haiku/trunk/headers/posix/netinet/ip_var.h

    r18010 r25433  
    139139}; 
    140140 
    141 //#ifdef _KERNEL_MODE 
     141/* #ifdef _KERNEL_MODE */ 
    142142 
    143143#define IP_FORWARDING                   0x1                             /* most of ip header exists */ 
     
    148148 
    149149#if 0 
    150 //struct ipstat ipstat; 
     150/* struct ipstat ipstat; */ 
    151151 
    152152void  ipv4_input(struct mbuf *, int); 
  • haiku/trunk/headers/posix/net/route.h

    r20494 r25433  
    2121#define RTF_LOCAL               0x00200000 
    2222 
    23 // This structure is used to pass routes to and from the network stack 
    24 // (via struct ifreq) 
     23/* This structure is used to pass routes to and from the network stack 
     24 * (via struct ifreq) */ 
    2525 
    2626struct route_entry { 
  • haiku/trunk/headers/posix/pthread.h

    r25390 r25433  
    7373#define PTHREAD_PRIO_PROTECT            2 
    7474 
    75 //extern pthread_mutexattr_t pthread_mutexattr_default; 
     75/* extern pthread_mutexattr_t pthread_mutexattr_default; */ 
    7676 
    7777/* private structure */ 
     
    177177#if 0   /* Unimplemented attribute functions: */ 
    178178 
    179 // mandatory! 
     179/* mandatory! */ 
    180180extern int pthread_attr_getschedparam(const pthread_attr_t *attr, 
    181181        struct sched_param *param); 
     
    183183        const struct sched_param *param); 
    184184 
    185 // [TPS] 
     185/* [TPS] */ 
    186186extern int pthread_attr_getinheritsched(const pthread_attr_t *attr, 
    187187        int *inheritsched); 
     
    195195extern int pthread_attr_setscope(pthread_attr_t *attr, int contentionscope); 
    196196 
    197 // [XSI] 
     197/* [XSI] */ 
    198198extern int pthread_attr_getguardsize(const pthread_attr_t *attr, 
    199199        size_t *guardsize); 
    200200extern int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize); 
    201201 
    202 // [TSA] 
     202/* [TSA] */ 
    203203extern int pthread_attr_getstackaddr(const pthread_attr_t *attr, 
    204204        void **stackaddr); 
    205205extern int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr); 
    206206 
    207 // [TSA TSS] 
     207/* [TSA TSS] */ 
    208208extern int pthread_attr_getstack(const pthread_attr_t *attr, 
    209209        void **stackaddr, size_t *stacksize); 
  • haiku/trunk/headers/posix/setjmp.h

    r22703 r25433  
    88#include <signal.h> 
    99 
    10 // include architecture specific definitions 
     10/* include architecture specific definitions */ 
    1111#ifdef __INTEL__ 
    1212        #include <arch/x86/arch_setjmp.h> 
  • haiku/trunk/headers/posix/shadow.h

    r25002 r25433  
    5050 
    5151 
    52 #endif  // _SHADOW_H_ 
     52#endif  /* _SHADOW_H_ */ 
  • haiku/trunk/headers/posix/signal.h

    r24444 r25433  
    2626#define SIG_HOLD        ((sighandler_t)3)       /* the signal was hold */ 
    2727 
    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. 
     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. */ 
    3131#if 0 
    3232typedef struct { 
     
    6262#define SA_RESTART              0x10 
    6363#define SA_ONSTACK              0x20 
    64 //#define SA_SIGINFO           0x40 
     64/* #define SA_SIGINFO          0x40 */ 
    6565#define SA_NOMASK               SA_NODEFER 
    6666#define SA_STACK                SA_ONSTACK 
     
    249249typedef struct vregs vregs; 
    250250 
    251 // include architecture specific definitions 
     251/* include architecture specific definitions */ 
    252252#ifdef __INTEL__ 
    253253        #include <arch/x86/signal.h> 
  • haiku/trunk/headers/posix/size_t.h

    r24413 r25433  
    88#include <stddef.h> 
    99 
    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; */ 
    1212 
    1313#endif /* _SIZE_T_H_ */ 
  • haiku/trunk/headers/posix/stdint.h

    r24654 r25433  
    132132#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) 
    133133 
    134 // Macros of Integer Constant Expressions 
     134/* Macros of Integer Constant Expressions */ 
    135135#define INT8_C(value)   value 
    136136#define INT16_C(value)  value 
     
    143143#define UINT64_C(value) value ## ULL 
    144144 
    145 // Macros for greatest-width integer constant expressions 
     145/* Macros for greatest-width integer constant expressions */ 
    146146#define INTMAX_C(value)         value ## LL 
    147147#define UINTMAX_C(value)        value ## ULL 
  • haiku/trunk/headers/posix/stdio.h

    r24413 r25433  
    1111 
    1212 
    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 */ 
    1515 
    1616 
  • haiku/trunk/headers/posix/stdio_post.h

    r24565 r25433  
    55#define _STDIO_POST_H_ 
    66 
    7 // "Private"/inline functions of our BeOS compatible stdio implementation 
     7/* "Private"/inline functions of our BeOS compatible stdio implementation */ 
    88 
    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! 
     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! */ 
    1212 
    1313#ifndef _STDIO_H_ 
     
    2020 
    2121extern char _single_threaded; 
    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) 
     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) */ 
    2525 
    2626#ifdef __cplusplus 
  • haiku/trunk/headers/posix/string.h

    r24525 r25433  
    3838 
    3939extern char             *strchrnul(const char *string, int character); 
    40         // this is a GNU extension 
     40        /* this is a GNU extension */ 
    4141 
    4242extern char             *strpbrk(const char *string, const char *set); 
     
    6767extern size_t   strnlen(const char *string, size_t count); 
    6868 
    69 //extern char          *strlwr(char *string); 
    70 //extern char          *strupr(char *string); 
     69/* extern char         *strlwr(char *string); */ 
     70/* extern char         *strupr(char *string); */ 
    7171 
    72 //extern char          *strsep(char **stringPointer, const char *delimiter); 
     72/* extern char         *strsep(char **stringPointer, const char *delimiter); */ 
    7373 
    7474extern const char       *strsignal(int signal); 
  • haiku/trunk/headers/posix/sys/mman.h

    r25374 r25433  
    1010 
    1111 
    12 // memory protection for mmap() and others 
     12/* memory protection for mmap() and others */ 
    1313#define PROT_READ               0x01 
    1414#define PROT_WRITE              0x02 
     
    1616#define PROT_NONE               0x00 
    1717 
    18 // mmap() flags 
     18/* mmap() flags */ 
    1919#define MAP_SHARED              0x01                    /* changes are seen by others */ 
    2020#define MAP_PRIVATE             0x02                    /* changes are only seen by caller */ 
     
    2323#define MAP_ANON                MAP_ANONYMOUS 
    2424 
    25 // mmap() error return code 
     25/* mmap() error return code */ 
    2626#define MAP_FAILED              ((void*)-1) 
    2727 
     
    3939 
    4040 
    41 #endif  // _SYS_MMAN_H 
     41#endif  /* _SYS_MMAN_H */ 
  • haiku/trunk/headers/posix/sys/poll.h

    r24864 r25433  
    88 
    99#include <poll.h> 
    10         // for compatibility with legacy applications 
     10        /* for compatibility with legacy applications */ 
    1111 
    1212 
  • haiku/trunk/headers/posix/sys/resource.h

    r17545 r25433  
    1818}; 
    1919 
    20 // ToDo: the only supported mode is RLIMIT_NOFILE right now 
     20/* ToDo: the only supported mode is RLIMIT_NOFILE right now */ 
    2121#define RLIMIT_CORE             0       /* size of the core file */ 
    2222#define RLIMIT_CPU              1       /* CPU time per team */ 
     
    6363extern int setrlimit(int resource, const struct rlimit * rlp); 
    6464 
    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); */ 
    6868 
    6969#ifdef __cplusplus 
  • haiku/trunk/headers/posix/sys/stat.h

    r24881 r25433  
    2525        time_t                  st_crtime;              /* creation time */ 
    2626 
    27         // 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 
     27        /* 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 */ 
    3131        unsigned int    st_type;                /* attribute/index type */ 
    3232}; 
     
    111111extern mode_t umask(mode_t cmask); 
    112112 
    113 // This achieves backwards compatibility with R5 
    114 #if 0 //def HAIKU_TARGET_PLATFORM_HAIKU 
     113/* This achieves backwards compatibility with R5 */ 
     114#if 0 /* def HAIKU_TARGET_PLATFORM_HAIKU */ 
    115115#define stat(fd, st) _stat(fd, st, sizeof(struct stat)) 
    116116#define fstat(fd, st) _fstat(fd, st, sizeof(struct stat)) 
    117117#define lstat(fd, st) _lstat(fd, st, sizeof(struct stat)) 
    118118#else 
    119 // ... and this fixes the build for R5 for now 
     119/* ... and this fixes the build for R5 for now */ 
    120120extern int    stat(const char *path, struct stat *st); 
    121121extern int    fstat(int fd, struct stat *st); 
  • haiku/trunk/headers/posix/sys/wait.h

    r24444 r25433  
    2828#define WIFCONTINUED(value)     ((value) & 0x20000) 
    2929 
    30 // TODO: waitid() is part of the real-time signal extension. Uncomment when 
    31 // implemented! 
     30/* TODO: waitid() is part of the real-time signal extension. Uncomment when 
     31 * implemented! */ 
    3232#if 0 
    3333/* ID types for waitid() */ 
     
    3737        P_PGID          /* wait for any child whose process group ID matches */ 
    3838} idtype_t; 
    39 #endif  // 0 
     39#endif  /* 0 */ 
    4040 
    4141 
     
    4646extern pid_t wait(int *_status); 
    4747extern 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); */ 
    4949 
    5050#ifdef __cplusplus 
  • haiku/trunk/headers/posix/unistd.h

    r25361 r25433  
    209209extern int optind, opterr, optopt; 
    210210 
    211 // ToDo: should be moved to stdlib.h 
     211/* ToDo: should be moved to stdlib.h */ 
    212212extern char **environ; 
    213213 
  • haiku/trunk/headers/posix/wchar.h

    r24413 r25433  
    1111#include <stdio.h> 
    1212 
    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. */ 
    1515#ifndef _WINT_T 
    1616#define _WINT_T 
     
    2222typedef __WINT_TYPE__ wint_t; 
    2323 
    24 #endif  // _WINT_T 
     24#endif  /* _WINT_T */ 
    2525 
    2626typedef int wctype_t; 
  • haiku/trunk/headers/posix/wchar_t.h

    r24413 r25433  
    44 */ 
    55 
    6 // Include GCC's stddef.h. It defines wchar_t. 
     6/* Include GCC's stddef.h. It defines wchar_t. */ 
    77#include <stddef.h>