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