Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 99170e0c in mainline


Ignore:
Timestamp:
2018-09-29T14:56:56Z (3 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master
Children:
1938b381
Parents:
10d65d70
Message:

Actually use compiler's <stddef.h>

Files:
1 deleted
9 edited
2 moved

Legend:

Unmodified
Added
Removed
  • abi/include/_bits/WEOF.h

    r10d65d70 r99170e0c  
    4141#define _BITS_WEOF_H_
    4242
    43 #include <_bits/macros.h>
     43/* wint_t is always int */
    4444
    45 #define WEOF  __WINT_EOF__
     45#define WEOF  (-1)
    4646
    4747#endif
  • abi/include/_bits/native.h

    r10d65d70 r99170e0c  
    4646#define _BITS_NATIVE_H_
    4747
    48 #include <_bits/macros.h>
     48#include <inttypes.h>
    4949
    50 #define ATOMIC_COUNT_MIN  __UINTPTR_MIN__
    51 #define ATOMIC_COUNT_MAX  __UINTPTR_MAX__
     50typedef uintptr_t pfn_t;
     51typedef uintptr_t ipl_t;
     52typedef uintptr_t sysarg_t;
     53typedef intptr_t  native_t;
    5254
    53 typedef __UINTPTR_TYPE__ pfn_t;
    54 typedef __UINTPTR_TYPE__ ipl_t;
    55 typedef __UINTPTR_TYPE__ sysarg_t;
    56 typedef __INTPTR_TYPE__  native_t;
    57 
    58 #define PRIdn  __PRIdPTR__  /**< Format for native_t. */
    59 #define PRIun  __PRIuPTR__  /**< Format for sysarg_t. */
    60 #define PRIxn  __PRIxPTR__  /**< Format for hexadecimal sysarg_t. */
     55#define PRIdn  PRIdPTR  /**< Format for native_t. */
     56#define PRIun  PRIuPTR  /**< Format for sysarg_t. */
     57#define PRIxn  PRIxPTR  /**< Format for hexadecimal sysarg_t. */
    6158
    6259#endif
  • abi/include/_bits/ptrdiff_t.h

    r10d65d70 r99170e0c  
    4141#define _BITS_PTRDIFF_T_H_
    4242
    43 #include <_bits/macros.h>
    44 
    45 typedef __PTRDIFF_TYPE__ ptrdiff_t;
     43#define __need_ptrdiff_t
     44#include <stddef.h>
    4645
    4746#endif
  • abi/include/_bits/size_t.h

    r10d65d70 r99170e0c  
    4141#define _BITS_SIZE_T_H_
    4242
    43 #include <_bits/macros.h>
    44 
    45 typedef __SIZE_TYPE__ size_t;
     43#define __need_size_t
     44#include <stddef.h>
    4645
    4746#endif
  • abi/include/_bits/ssize_t.h

    r10d65d70 r99170e0c  
    4141#define _BITS_SSIZE_T_H_
    4242
    43 #include <_bits/macros.h>
     43#include <stdint.h>
    4444
    45 typedef __PTRDIFF_TYPE__ ssize_t;
     45typedef intptr_t ssize_t;
    4646
    47 #define SSIZE_MIN  __PTRDIFF_MIN__
    48 #define SSIZE_MAX  __PTRDIFF_MAX__
     47#define SSIZE_MIN  INTPTR_MIN
     48#define SSIZE_MAX  INTPTR_MAX
    4949
    5050#endif
  • abi/include/_bits/stdint.h

    r10d65d70 r99170e0c  
    180180#define WINT_MAX  __WINT_MAX__
    181181
    182 #include <_bits/WCHAR_MIN.h>
    183 #include <_bits/WCHAR_MAX.h>
     182#include <_bits/wchar_limits.h>
    184183
    185184/* Use nonstandard 128-bit types if they are supported by the compiler. */
  • abi/include/_bits/wchar_limits.h

    r10d65d70 r99170e0c  
    4141#define _BITS_WCHAR_MIN_H_
    4242
    43 #include <_bits/macros.h>
     43/* wchar_t should always be signed int in HelenOS. */
    4444
    45 #define WCHAR_MIN  __WCHAR_MIN__
     45#include <_bits/wchar_t.h>
     46
     47#ifndef __cplusplus
     48_Static_assert(((wchar_t)-1) < 0, "wchar_t is not int");
     49_Static_assert(sizeof(wchar_t) == 4, "wchar_t is not int");
     50#endif
     51
     52#ifndef WCHAR_MAX
     53#define WCHAR_MAX  0x7fffffff
     54#endif
     55#ifndef WCHAR_MIN
     56#define WCHAR_MIN  (-WCHAR_MIN - 1)
     57#endif
    4658
    4759#endif
  • abi/include/_bits/wchar_t.h

    r10d65d70 r99170e0c  
    4141#define _BITS_WCHAR_T_H_
    4242
    43 #include <_bits/macros.h>
    44 
    45 #ifndef __cplusplus
    46 typedef __WCHAR_TYPE__ wchar_t;
    47 #endif
     43#define __need_wchar_t
     44#include <stddef.h>
    4845
    4946#endif
  • abi/include/_bits/wint_t.h

    r10d65d70 r99170e0c  
    4141#define _BITS_WINT_T_H_
    4242
    43 #include <_bits/macros.h>
    44 
    45 typedef __WINT_TYPE__ wint_t;
     43#define __need_wint_t
     44#include <stddef.h>
    4645
    4746#endif
  • uspace/lib/c/include/wchar.h

    r10d65d70 r99170e0c  
    4343#include <_bits/size_t.h>
    4444#include <_bits/wchar_t.h>
     45#include <_bits/wchar_limits.h>
    4546#include <_bits/wint_t.h>
    46 #include <_bits/WEOF.h>
    47 
    4847#include <_bits/NULL.h>
    49 #include <_bits/WCHAR_MIN.h>
    50 #include <_bits/WCHAR_MAX.h>
    5148#include <_bits/WEOF.h>
    5249
Note: See TracChangeset for help on using the changeset viewer.