1 2 /* : : generated by proto : : */ 3 /*********************************************************************** 4 * * 5 * This software is part of the ast package * 6 * Copyright (c) 1985-2010 AT&T Intellectual Property * 7 * and is licensed under the * 8 * Common Public License, Version 1.0 * 9 * by AT&T Intellectual Property * 10 * * 11 * A copy of the License is available at * 12 * http://www.opensource.org/licenses/cpl1.0.txt * 13 * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * 14 * * 15 * Information and Software Systems Research * 16 * AT&T Research * 17 * Florham Park NJ * 18 * * 19 * Glenn Fowler <gsf@research.att.com> * 20 * David Korn <dgk@research.att.com> * 21 * Phong Vo <kpv@research.att.com> * 22 * * 23 ***********************************************************************/ 24 25 /* 26 * Advanced Software Technology Library 27 * AT&T Research 28 * 29 * a union of standard headers that works 30 * with local extensions enabled 31 * and local omission compensation 32 */ 33 34 #ifndef _AST_STD_H 35 #if !defined(__PROTO__) 36 #include <prototyped.h> 37 #endif 38 #if !defined(__LINKAGE__) 39 #define __LINKAGE__ /* 2004-08-11 transition */ 40 #endif 41 42 #define _AST_STD_H 1 43 #define _AST_STD_I 1 44 45 #include <ast_common.h> 46 47 #if _BLD_ast 48 #define _BLD_cdt 1 49 #define _BLD_sfio 1 50 #if !_UWIN 51 #define _BLD_vmalloc 1 52 #endif 53 #endif 54 55 #ifdef _SFSTDIO_H 56 #define _SKIP_SFSTDIO_H 57 #else 58 #define _SFSTDIO_H 59 #ifndef FILE 60 #ifndef _SFIO_H 61 struct _sfio_s; 62 #endif 63 #define FILE struct _sfio_s 64 #ifndef __FILE_typedef 65 #define __FILE_typedef 1 66 #endif 67 #ifndef _FILEDEFED 68 #define _FILEDEFED 1 69 #endif 70 #endif 71 #endif 72 73 #include <ast_lib.h> 74 #include <ast_sys.h> 75 #include <ast_getopt.h> /* <stdlib.h> does this */ 76 #include <ast_fcntl.h> 77 #include <ast_limits.h> 78 #include <ast_botch.h> 79 80 #ifdef _SKIP_SFSTDIO_H 81 #undef _SKIP_SFSTDIO_H 82 #else 83 #undef _SFSTDIO_H 84 #undef FILE 85 #endif 86 87 /* locale stuff */ 88 89 #if !_hdr_locale 90 91 struct lconv 92 { 93 char* decimal_point; 94 char* thousands_sep; 95 char* grouping; 96 char* int_curr_symbol; 97 char* currency_symbol; 98 char* mon_decimal_point; 99 char* mon_thousands_sep; 100 char* mon_grouping; 101 char* positive_sign; 102 char* negative_sign; 103 char int_frac_digits; 104 char frac_digits; 105 char p_cs_precedes; 106 char p_sep_by_space; 107 char n_cs_precedes; 108 char n_sep_by_space; 109 char p_sign_posn; 110 char n_sign_posn; 111 }; 112 113 #endif 114 115 #if _BLD_ast && defined(__EXPORT__) 116 #undef __MANGLE__ 117 #define __MANGLE__ __LINKAGE__ __EXPORT__ 118 #endif 119 120 #if !_UWIN /* for ast54 compatibility */ 121 122 #undef getenv 123 #define getenv _ast_getenv 124 125 #undef setenviron 126 #define setenviron _ast_setenviron 127 128 extern __MANGLE__ char* getenv __PROTO__((const char*)); 129 130 #endif 131 132 #undef localeconv 133 #define localeconv _ast_localeconv 134 135 #undef setlocale 136 #define setlocale _ast_setlocale 137 138 #undef strerror 139 #define strerror _ast_strerror 140 141 extern __MANGLE__ struct lconv* localeconv __PROTO__((void)); 142 extern __MANGLE__ char* setenviron __PROTO__((const char*)); 143 extern __MANGLE__ char* setlocale __PROTO__((int, const char*)); 144 extern __MANGLE__ char* strerror __PROTO__((int)); 145 146 #define AST_MESSAGE_SET 3 /* see <mc.h> mcindex() */ 147 148 /* 149 * maintain this order when adding categories 150 */ 151 152 #define AST_LC_ALL 0 153 #define AST_LC_COLLATE 1 154 #define AST_LC_CTYPE 2 155 #define AST_LC_MESSAGES 3 156 #define AST_LC_MONETARY 4 157 #define AST_LC_NUMERIC 5 158 #define AST_LC_TIME 6 159 #define AST_LC_IDENTIFICATION 7 160 #define AST_LC_ADDRESS 8 161 #define AST_LC_NAME 9 162 #define AST_LC_TELEPHONE 10 163 #define AST_LC_XLITERATE 11 164 #define AST_LC_MEASUREMENT 12 165 #define AST_LC_PAPER 13 166 #define AST_LC_COUNT 14 167 #define AST_LC_LANG 255 168 169 #define AST_LC_internal 1 170 #define AST_LC_setenv (1L<<27) 171 #define AST_LC_find (1L<<28) 172 #define AST_LC_debug (1L<<29) 173 #define AST_LC_setlocale (1L<<30) 174 #define AST_LC_translate (1L<<31) 175 176 #ifndef LC_ALL 177 #define LC_ALL (-AST_LC_ALL) 178 #endif 179 #ifndef LC_COLLATE 180 #define LC_COLLATE (-AST_LC_COLLATE) 181 #endif 182 #ifndef LC_CTYPE 183 #define LC_CTYPE (-AST_LC_CTYPE) 184 #endif 185 #ifndef LC_MESSAGES 186 #define LC_MESSAGES (-AST_LC_MESSAGES) 187 #endif 188 #ifndef LC_MONETARY 189 #define LC_MONETARY (-AST_LC_MONETARY) 190 #endif 191 #ifndef LC_NUMERIC 192 #define LC_NUMERIC (-AST_LC_NUMERIC) 193 #endif 194 #ifndef LC_TIME 195 #define LC_TIME (-AST_LC_TIME) 196 #endif 197 #ifndef LC_ADDRESS 198 #define LC_ADDRESS (-AST_LC_ADDRESS) 199 #endif 200 #ifndef LC_IDENTIFICATION 201 #define LC_IDENTIFICATION (-AST_LC_IDENTIFICATION) 202 #endif 203 #ifndef LC_NAME 204 #define LC_NAME (-AST_LC_NAME) 205 #endif 206 #ifndef LC_TELEPHONE 207 #define LC_TELEPHONE (-AST_LC_TELEPHONE) 208 #endif 209 #ifndef LC_XLITERATE 210 #define LC_XLITERATE (-AST_LC_XLITERATE) 211 #endif 212 #ifndef LC_MEASUREMENT 213 #define LC_MEASUREMENT (-AST_LC_MEASUREMENT) 214 #endif 215 #ifndef LC_PAPER 216 #define LC_PAPER (-AST_LC_PAPER) 217 #endif 218 #ifndef LC_LANG 219 #define LC_LANG (-AST_LC_LANG) 220 #endif 221 222 #undef __MANGLE__ 223 #define __MANGLE__ __LINKAGE__ 224 225 #undef strcoll 226 #if _std_strcoll 227 #define strcoll _ast_info.collate 228 #else 229 #define strcoll strcmp 230 #endif 231 232 typedef struct 233 { 234 235 char* id; 236 237 struct 238 { 239 uint32_t serial; 240 uint32_t set; 241 } locale; 242 243 long tmp_long; 244 size_t tmp_size; 245 short tmp_short; 246 char tmp_char; 247 wchar_t tmp_wchar; 248 249 int (*collate) __PROTO__((const char*, const char*)); 250 251 int tmp_int; 252 __V_* tmp_pointer; 253 254 int mb_cur_max; 255 int (*mb_len) __PROTO__((const char*, size_t)); 256 int (*mb_towc) __PROTO__((wchar_t*, const char*, size_t)); 257 size_t (*mb_xfrm) __PROTO__((char*, const char*, size_t)); 258 int (*mb_width) __PROTO__((wchar_t)); 259 int (*mb_conv) __PROTO__((char*, wchar_t)); 260 261 uint32_t env_serial; 262 uint32_t mb_sync; 263 uint32_t version; 264 265 char pad[936]; 266 267 } _Ast_info_t; 268 269 #if _BLD_ast && defined(__EXPORT__) 270 #undef __MANGLE__ 271 #define __MANGLE__ __LINKAGE__ __EXPORT__ 272 #endif 273 #if !_BLD_ast && defined(__IMPORT__) 274 #undef __MANGLE__ 275 #define __MANGLE__ __LINKAGE__ __IMPORT__ 276 #endif 277 278 extern __MANGLE__ _Ast_info_t _ast_info; 279 280 #undef __MANGLE__ 281 #define __MANGLE__ __LINKAGE__ 282 283 /* largefile hackery -- ast uses the large versions by default */ 284 285 #if _typ_off64_t 286 #undef off_t 287 #define off_t off64_t 288 #endif 289 #if !defined(ftruncate) && _lib_ftruncate64 290 #define ftruncate ftruncate64 291 extern __MANGLE__ int ftruncate64 __PROTO__((int, off64_t)); 292 #endif 293 #if !defined(lseek) && _lib_lseek64 294 #define lseek lseek64 295 extern __MANGLE__ off64_t lseek64 __PROTO__((int, off64_t, int)); 296 #endif 297 #if !defined(truncate) && _lib_truncate64 298 #define truncate truncate64 299 extern __MANGLE__ int truncate64 __PROTO__((const char*, off64_t)); 300 #endif 301 302 /* direct macro access for bsd crossover */ 303 304 #if !defined(__cplusplus) 305 306 #if !defined(memcpy) && !defined(_lib_memcpy) && defined(_lib_bcopy) 307 #define memcpy(t,f,n) (bcopy(f,t,n),(t)) 308 #endif 309 310 #if !defined(memzero) && !defined(_lib_memzero) 311 #if defined(_lib_memset) || !defined(_lib_bzero) 312 #define memzero(b,n) memset(b,0,n) 313 #else 314 #define memzero(b,n) (bzero(b,n),(b)) 315 #endif 316 #endif 317 318 #endif 319 320 #if !defined(remove) 321 extern __MANGLE__ int remove __PROTO__((const char*)); 322 #endif 323 324 #if !defined(rename) 325 extern __MANGLE__ int rename __PROTO__((const char*, const char*)); 326 #endif 327 328 #if !defined(strchr) && !defined(_lib_strchr) && defined(_lib_index) 329 #define strchr(s,c) index(s,c) 330 #endif 331 332 #if !defined(strrchr) && !defined(_lib_strrchr) && defined(_lib_rindex) 333 #define strrchr(s,c) rindex(s,c) 334 #endif 335 336 /* and now introducing prototypes botched by the standard(s) */ 337 338 #if _BLD_ast && defined(__EXPORT__) 339 #undef __MANGLE__ 340 #define __MANGLE__ __LINKAGE__ __EXPORT__ 341 #endif 342 343 #undef getpgrp 344 #define getpgrp() _ast_getpgrp() 345 extern __MANGLE__ int _ast_getpgrp __PROTO__((void)); 346 347 #undef __MANGLE__ 348 #define __MANGLE__ __LINKAGE__ 349 350 /* 351 * and finally, standard interfaces hijacked by ast 352 * _AST_STD_I delays headers that require <ast_map.h> 353 */ 354 355 #include <ast_map.h> 356 357 #undef _AST_STD_I 358 359 #if _AST_GETOPT_H < 0 360 #undef _AST_GETOPT_H 361 #include <ast_getopt.h> 362 #endif 363 364 #if _GETOPT_H < 0 365 #undef _GETOPT_H 366 #include <getopt.h> 367 #endif 368 369 #if _REGEX_H < 0 370 #undef _REGEX_H 371 #include <regex.h> 372 #endif 373 374 #endif 375