Fix FreeBSD build.
[haiku.git] / headers / glibc / _G_config.h
blobb202b04222923d3aff22d29aa95b4c7908c0c8bf
1 /* This file is needed by libio to define various configuration parameters.
2 These are always the same in the GNU C library. */
4 #ifndef _G_config_h
5 #define _G_config_h 1
7 // bonefish: Not needed.
8 // #include <libc-symbols.h>
9 // #include <bits/types.h>
11 #define _GLIBCPP_USE_THREADS
12 #define _GLIBCPP_USE_WCHAR_T
14 #ifndef _IO_MTSAFE_IO
15 #define _IO_MTSAFE_IO
16 #endif
18 /* Define types for libio in terms of the standard internal type names. */
20 #include <sys/types.h>
21 #define __need_size_t
22 #define __need_wchar_t
23 #define __need_wint_t
24 #define __need_NULL
25 #define __need_ptrdiff_t
26 #include <stddef.h>
28 //#include <wchar.h>
30 #ifndef _WINT_T
31 /* Integral type unchanged by default argument promotions that can
32 hold any value corresponding to members of the extended character
33 set, as well as at least one value that does not correspond to any
34 member of the extended character set. */
35 # define _WINT_T
36 typedef unsigned int wint_t;
37 #endif
39 /* For use as part of glibc (native) or as part of libstdc++ (maybe
40 not glibc) */
41 #ifndef __c_mbstate_t_defined
42 # define __c_mbstate_t_defined 1
43 # ifdef _GLIBCPP_USE_WCHAR_T
44 typedef struct
46 int count;
47 wint_t value;
48 } __c_mbstate_t;
49 # endif
50 #endif
51 #undef __need_mbstate_t
53 typedef size_t _G_size_t;
56 #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
57 typedef struct
59 off_t __pos;
60 __c_mbstate_t __state;
61 } _G_fpos_t;
63 typedef struct
65 off_t __pos;
66 __c_mbstate_t __state;
67 } _G_fpos64_t;
68 #else
69 typedef off_t _G_fpos_t;
70 typedef off_t _G_fpos64_t;
71 #endif
72 #define __off_t off_t
73 #define _G_ssize_t ssize_t
74 #define _G_off_t off_t
75 #define _G_off64_t off_t
76 #define _G_pid_t pid_t
77 #define _G_uid_t uid_t
78 #define _G_wchar_t wchar_t
79 #define _G_wint_t wint_t
80 #define _G_stat64 stat
82 // bonefish: Not needed.
83 // #include <iconv/gconv.h>
84 // typedef union
85 // {
86 // struct __gconv_info __cd;
87 // struct
88 // {
89 // struct __gconv_info __cd;
90 // struct __gconv_step_data __data;
91 // } __combined;
92 // } _G_iconv_t;
95 typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
96 typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
97 typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
98 typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
100 #define _G_HAVE_BOOL 1
103 /* These library features are always available in the GNU C library. */
104 #define _G_HAVE_ATEXIT 1
105 #define _G_HAVE_SYS_CDEFS 1
106 #define _G_HAVE_SYS_WAIT 1
107 #define _G_NEED_STDARG_H 1
108 #define _G_va_list __gnuc_va_list
110 #define _G_HAVE_PRINTF_FP 1
111 //#define _G_HAVE_MMAP 1
112 #define _G_HAVE_LONG_DOUBLE_IO 1
113 #define _G_HAVE_IO_FILE_OPEN 1
114 #define _G_HAVE_IO_GETLINE_INFO 1
116 #define _G_IO_IO_FILE_VERSION 0x20001
118 //#define _G_OPEN64 __open64
119 //#define _G_LSEEK64 __lseek64
120 //#define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf)
122 /* This is defined by <bits/stat.h> if `st_blksize' exists. */
123 /*#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)*/
125 #define _G_BUFSIZ 8192
127 /* These are the vtbl details for ELF. */
128 #define _G_NAMES_HAVE_UNDERSCORE 0
129 #define _G_VTABLE_LABEL_HAS_LENGTH 1
130 // avoid vtable-thunks, as BeOS never used those:
131 #ifdef _G_USING_THUNKS
132 #undef _G_USING_THUNKS
133 #endif /* _G_USING_THUNKS */
134 #define _G_VTABLE_LABEL_PREFIX "_vt."
135 #define _G_VTABLE_LABEL_PREFIX_ID _vt.
137 #define _G_INTERNAL_CCS "UCS4"
138 #define _G_HAVE_WEAK_SYMBOL 1
139 #define _G_STDIO_USES_LIBIO 1
141 #if defined __cplusplus || defined __STDC__
142 # define _G_ARGS(ARGLIST) ARGLIST
143 #else
144 # define _G_ARGS(ARGLIST) ()
145 #endif
147 #endif /* _G_config.h */