1da2e3ebdSchin 2da2e3ebdSchin /* : : generated by proto : : */ 3da2e3ebdSchin /*********************************************************************** 4da2e3ebdSchin * * 5da2e3ebdSchin * This software is part of the ast package * 6*3e14f97fSRoger A. Faulkner * Copyright (c) 1985-2010 AT&T Intellectual Property * 7da2e3ebdSchin * and is licensed under the * 8da2e3ebdSchin * Common Public License, Version 1.0 * 97c2fbfb3SApril Chin * by AT&T Intellectual Property * 10da2e3ebdSchin * * 11da2e3ebdSchin * A copy of the License is available at * 12da2e3ebdSchin * http://www.opensource.org/licenses/cpl1.0.txt * 13da2e3ebdSchin * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * 14da2e3ebdSchin * * 15da2e3ebdSchin * Information and Software Systems Research * 16da2e3ebdSchin * AT&T Research * 17da2e3ebdSchin * Florham Park NJ * 18da2e3ebdSchin * * 19da2e3ebdSchin * Glenn Fowler <gsf@research.att.com> * 20da2e3ebdSchin * David Korn <dgk@research.att.com> * 21da2e3ebdSchin * Phong Vo <kpv@research.att.com> * 22da2e3ebdSchin * * 23da2e3ebdSchin ***********************************************************************/ 24da2e3ebdSchin 25da2e3ebdSchin /* 26da2e3ebdSchin * Advanced Software Technology Library 27da2e3ebdSchin * AT&T Research 28da2e3ebdSchin * 29da2e3ebdSchin * std + posix + ast 30da2e3ebdSchin */ 31da2e3ebdSchin 32da2e3ebdSchin #ifndef _AST_H 33da2e3ebdSchin #if !defined(__PROTO__) 34da2e3ebdSchin #include <prototyped.h> 35da2e3ebdSchin #endif 36da2e3ebdSchin #if !defined(__LINKAGE__) 37da2e3ebdSchin #define __LINKAGE__ /* 2004-08-11 transition */ 38da2e3ebdSchin #endif 39da2e3ebdSchin 40da2e3ebdSchin #define _AST_H 41da2e3ebdSchin 42da2e3ebdSchin #include <ast_version.h> 43da2e3ebdSchin 44da2e3ebdSchin #ifndef _AST_STD_H 45da2e3ebdSchin #include <ast_std.h> 46da2e3ebdSchin #endif 47da2e3ebdSchin 48da2e3ebdSchin #ifndef _SFIO_H 49da2e3ebdSchin #include <sfio.h> 50da2e3ebdSchin #endif 51da2e3ebdSchin 52da2e3ebdSchin #ifndef ast 53da2e3ebdSchin #define ast _ast_info 54da2e3ebdSchin #endif 55da2e3ebdSchin 56da2e3ebdSchin #ifndef PATH_MAX 57da2e3ebdSchin #define PATH_MAX 1024 58da2e3ebdSchin #endif 59da2e3ebdSchin 60da2e3ebdSchin /* 61da2e3ebdSchin * workaround botched headers that assume <stdio.h> 62da2e3ebdSchin */ 63da2e3ebdSchin 64da2e3ebdSchin #ifndef FILE 65da2e3ebdSchin #ifndef _SFIO_H 66da2e3ebdSchin struct _sfio_s; 67da2e3ebdSchin #endif 68da2e3ebdSchin #define FILE struct _sfio_s 69da2e3ebdSchin #ifndef __FILE_typedef 70da2e3ebdSchin #define __FILE_typedef 1 71da2e3ebdSchin #endif 72da2e3ebdSchin #ifndef _FILEDEFED 73da2e3ebdSchin #define _FILEDEFED 1 74da2e3ebdSchin #endif 75da2e3ebdSchin #endif 76da2e3ebdSchin 77da2e3ebdSchin /* 78da2e3ebdSchin * exit() support -- this matches shell exit codes 79da2e3ebdSchin */ 80da2e3ebdSchin 81da2e3ebdSchin #define EXIT_BITS 8 /* # exit status bits */ 82da2e3ebdSchin 83da2e3ebdSchin #define EXIT_USAGE 2 /* usage exit code */ 84da2e3ebdSchin #define EXIT_QUIT ((1<<(EXIT_BITS))-1) /* parent should quit */ 85da2e3ebdSchin #define EXIT_NOTFOUND ((1<<(EXIT_BITS-1))-1) /* command not found */ 86da2e3ebdSchin #define EXIT_NOEXEC ((1<<(EXIT_BITS-1))-2) /* other exec error */ 87da2e3ebdSchin 88da2e3ebdSchin #define EXIT_CODE(x) ((x)&((1<<EXIT_BITS)-1)) 89da2e3ebdSchin #define EXIT_CORE(x) (EXIT_CODE(x)|(1<<EXIT_BITS)|(1<<(EXIT_BITS-1))) 90da2e3ebdSchin #define EXIT_TERM(x) (EXIT_CODE(x)|(1<<EXIT_BITS)) 91da2e3ebdSchin 92da2e3ebdSchin /* 93da2e3ebdSchin * NOTE: for compatibility the following work for EXIT_BITS={7,8} 94da2e3ebdSchin */ 95da2e3ebdSchin 96da2e3ebdSchin #define EXIT_STATUS(x) (((x)&((1<<(EXIT_BITS-2))-1))?(x):EXIT_CODE((x)>>EXIT_BITS)) 97da2e3ebdSchin 98da2e3ebdSchin #define EXITED_CORE(x) (((x)&((1<<EXIT_BITS)|(1<<(EXIT_BITS-1))))==((1<<EXIT_BITS)|(1<<(EXIT_BITS-1)))||((x)&((1<<(EXIT_BITS-1))|(1<<(EXIT_BITS-2))))==((1<<(EXIT_BITS-1))|(1<<(EXIT_BITS-2)))) 99da2e3ebdSchin #define EXITED_TERM(x) ((x)&((1<<EXIT_BITS)|(1<<(EXIT_BITS-1)))) 100da2e3ebdSchin 101da2e3ebdSchin /* 102da2e3ebdSchin * astconflist() flags 103da2e3ebdSchin */ 104da2e3ebdSchin 105da2e3ebdSchin #define ASTCONF_parse 0x0001 106da2e3ebdSchin #define ASTCONF_write 0x0002 107da2e3ebdSchin #define ASTCONF_read 0x0004 108da2e3ebdSchin #define ASTCONF_lower 0x0008 109da2e3ebdSchin #define ASTCONF_base 0x0010 110da2e3ebdSchin #define ASTCONF_defined 0x0020 111da2e3ebdSchin #define ASTCONF_quote 0x0040 112da2e3ebdSchin #define ASTCONF_table 0x0080 113da2e3ebdSchin #define ASTCONF_matchcall 0x0100 114da2e3ebdSchin #define ASTCONF_matchname 0x0200 115da2e3ebdSchin #define ASTCONF_matchstandard 0x0400 116da2e3ebdSchin #define ASTCONF_error 0x0800 117da2e3ebdSchin #define ASTCONF_system 0x1000 118da2e3ebdSchin #define ASTCONF_AST 0x2000 119da2e3ebdSchin 120da2e3ebdSchin /* 121da2e3ebdSchin * pathcanon() flags 122da2e3ebdSchin */ 123da2e3ebdSchin 124da2e3ebdSchin #define PATH_PHYSICAL 01 125da2e3ebdSchin #define PATH_DOTDOT 02 126da2e3ebdSchin #define PATH_EXISTS 04 127da2e3ebdSchin #define PATH_VERIFIED(n) (((n)&01777)<<5) 128da2e3ebdSchin 129da2e3ebdSchin /* 130da2e3ebdSchin * pathaccess() flags 131da2e3ebdSchin */ 132da2e3ebdSchin 133da2e3ebdSchin #define PATH_READ 004 134da2e3ebdSchin #define PATH_WRITE 002 135da2e3ebdSchin #define PATH_EXECUTE 001 136da2e3ebdSchin #define PATH_REGULAR 010 137da2e3ebdSchin #define PATH_ABSOLUTE 020 138da2e3ebdSchin 139da2e3ebdSchin /* 140da2e3ebdSchin * touch() flags 141da2e3ebdSchin */ 142da2e3ebdSchin 143da2e3ebdSchin #define PATH_TOUCH_CREATE 01 144da2e3ebdSchin #define PATH_TOUCH_VERBATIM 02 145da2e3ebdSchin 146da2e3ebdSchin /* 147da2e3ebdSchin * pathcheck() info 148da2e3ebdSchin */ 149da2e3ebdSchin 150da2e3ebdSchin typedef struct 151da2e3ebdSchin { 152da2e3ebdSchin unsigned long date; 153da2e3ebdSchin char* feature; 154da2e3ebdSchin char* host; 155da2e3ebdSchin char* user; 156da2e3ebdSchin } Pathcheck_t; 157da2e3ebdSchin 158da2e3ebdSchin /* 159da2e3ebdSchin * strgrpmatch() flags 160da2e3ebdSchin */ 161da2e3ebdSchin 162da2e3ebdSchin #define STR_MAXIMAL 01 /* maximal match */ 163da2e3ebdSchin #define STR_LEFT 02 /* implicit left anchor */ 164da2e3ebdSchin #define STR_RIGHT 04 /* implicit right anchor */ 165da2e3ebdSchin #define STR_ICASE 010 /* ignore case */ 166da2e3ebdSchin #define STR_GROUP 020 /* (|&) inside [@|&](...) only */ 167da2e3ebdSchin 168da2e3ebdSchin /* 169da2e3ebdSchin * fmtquote() flags 170da2e3ebdSchin */ 171da2e3ebdSchin 172da2e3ebdSchin #define FMT_ALWAYS 0x01 /* always quote */ 173da2e3ebdSchin #define FMT_ESCAPED 0x02 /* already escaped */ 174da2e3ebdSchin #define FMT_SHELL 0x04 /* escape $ ` too */ 175da2e3ebdSchin #define FMT_WIDE 0x08 /* don't escape 8 bit chars */ 176da2e3ebdSchin #define FMT_PARAM 0x10 /* disable FMT_SHELL ${$( quote */ 177da2e3ebdSchin 178da2e3ebdSchin /* 179da2e3ebdSchin * multibyte macros 180da2e3ebdSchin */ 181da2e3ebdSchin 182da2e3ebdSchin #define mbmax() (ast.mb_cur_max) 183da2e3ebdSchin #define mberr() (ast.tmp_int<0) 184da2e3ebdSchin 185da2e3ebdSchin #define mbcoll() (ast.mb_xfrm!=0) 186da2e3ebdSchin #define mbwide() (mbmax()>1) 187da2e3ebdSchin 18834f9b3eeSRoland Mainz #define mbchar(p) (mbwide()?((ast.tmp_int=(*ast.mb_towc)(&ast.tmp_wchar,(char*)(p),mbmax()))>0?((p+=ast.tmp_int),ast.tmp_wchar):(p+=ast.mb_sync+1,ast.tmp_int)):(*(unsigned char*)(p++))) 189da2e3ebdSchin #define mbinit() (mbwide()?(*ast.mb_towc)((wchar_t*)0,(char*)0,mbmax()):0) 190da2e3ebdSchin #define mbsize(p) (mbwide()?(*ast.mb_len)((char*)(p),mbmax()):((p),1)) 191da2e3ebdSchin #define mbconv(s,w) (ast.mb_conv?(*ast.mb_conv)(s,w):((*(s)=(w)),1)) 192da2e3ebdSchin #define mbwidth(w) (ast.mb_width&&((ast.tmp_int=(*ast.mb_width)(w))>=0||(w)>UCHAR_MAX)?ast.tmp_int:1) 193da2e3ebdSchin #define mbxfrm(t,f,n) (mbcoll()?(*ast.mb_xfrm)((char*)(t),(char*)(f),n):0) 194da2e3ebdSchin 195da2e3ebdSchin /* 196da2e3ebdSchin * common macros 197da2e3ebdSchin */ 198da2e3ebdSchin 199da2e3ebdSchin #define elementsof(x) (sizeof(x)/sizeof(x[0])) 200da2e3ebdSchin #define integralof(x) (((char*)(x))-((char*)0)) 201da2e3ebdSchin #define newof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)calloc(1,sizeof(t)*(n)+(x))) 202da2e3ebdSchin #define oldof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)malloc(sizeof(t)*(n)+(x))) 203da2e3ebdSchin #define pointerof(x) ((__V_*)((char*)0+(x))) 204da2e3ebdSchin #define roundof(x,y) (((x)+(y)-1)&~((y)-1)) 205da2e3ebdSchin #define ssizeof(x) ((int)sizeof(x)) 206da2e3ebdSchin 207da2e3ebdSchin #define streq(a,b) (*(a)==*(b)&&!strcmp(a,b)) 208da2e3ebdSchin #define strneq(a,b,n) (*(a)==*(b)&&!strncmp(a,b,n)) 209da2e3ebdSchin #define strsignal(s) fmtsignal(s) 210da2e3ebdSchin 211da2e3ebdSchin #if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus) 212da2e3ebdSchin #define NiL 0 213da2e3ebdSchin #define NoP(x) (void)(x) 214da2e3ebdSchin #else 215da2e3ebdSchin #define NiL ((char*)0) 216da2e3ebdSchin #define NoP(x) (&x,1) 217da2e3ebdSchin #endif 218da2e3ebdSchin 219da2e3ebdSchin #if !defined(NoF) 220da2e3ebdSchin #if defined(__STDC__) || defined(__STDPP__) 221da2e3ebdSchin #define NoF(x) void _DATA_ ## x () {} 222da2e3ebdSchin #else 223da2e3ebdSchin #define NoF(x) void _DATA_/**/x () {} 224da2e3ebdSchin #endif 225da2e3ebdSchin #if !defined(_DATA_) 226da2e3ebdSchin #define _DATA_ 227da2e3ebdSchin #endif 228da2e3ebdSchin #endif 229da2e3ebdSchin 230da2e3ebdSchin #if !defined(NoN) 231da2e3ebdSchin #if defined(__STDC__) || defined(__STDPP__) 232da2e3ebdSchin #define NoN(x) void _STUB_ ## x () {} 233da2e3ebdSchin #else 234da2e3ebdSchin #define NoN(x) void _STUB_/**/x () {} 235da2e3ebdSchin #endif 236da2e3ebdSchin #if !defined(_STUB_) 237da2e3ebdSchin #define _STUB_ 238da2e3ebdSchin #endif 239da2e3ebdSchin #endif 240da2e3ebdSchin 241da2e3ebdSchin #define NOT_USED(x) NoP(x) 242da2e3ebdSchin 243da2e3ebdSchin typedef int (*Error_f) __PROTO__((__V_*, __V_*, int, ...)); 244da2e3ebdSchin 245da2e3ebdSchin typedef int (*Ast_confdisc_f) __PROTO__((const char*, const char*, const char*)); 246da2e3ebdSchin typedef int (*Strcmp_context_f) __PROTO__((const char*, const char*, __V_*)); 247da2e3ebdSchin typedef int (*Strcmp_f) __PROTO__((const char*, const char*)); 248da2e3ebdSchin 249da2e3ebdSchin #if _BLD_ast && defined(__EXPORT__) 250da2e3ebdSchin #undef __MANGLE__ 251da2e3ebdSchin #define __MANGLE__ __LINKAGE__ __EXPORT__ 252da2e3ebdSchin #endif 253da2e3ebdSchin 254da2e3ebdSchin extern __MANGLE__ char* astgetconf __PROTO__((const char*, const char*, const char*, int, Error_f)); 255da2e3ebdSchin extern __MANGLE__ char* astconf __PROTO__((const char*, const char*, const char*)); 256da2e3ebdSchin extern __MANGLE__ Ast_confdisc_f astconfdisc __PROTO__((Ast_confdisc_f)); 257da2e3ebdSchin extern __MANGLE__ void astconflist __PROTO__((Sfio_t*, const char*, int, const char*)); 258da2e3ebdSchin extern __MANGLE__ off_t astcopy __PROTO__((int, int, off_t)); 259da2e3ebdSchin extern __MANGLE__ int astlicense __PROTO__((char*, int, char*, char*, int, int, int)); 260da2e3ebdSchin extern __MANGLE__ int astquery __PROTO__((int, const char*, ...)); 261da2e3ebdSchin extern __MANGLE__ void astwinsize __PROTO__((int, int*, int*)); 262da2e3ebdSchin 263da2e3ebdSchin extern __MANGLE__ ssize_t base64encode __PROTO__((const __V_*, size_t, __V_**, __V_*, size_t, __V_**)); 264da2e3ebdSchin extern __MANGLE__ ssize_t base64decode __PROTO__((const __V_*, size_t, __V_**, __V_*, size_t, __V_**)); 265da2e3ebdSchin extern __MANGLE__ int chresc __PROTO__((const char*, char**)); 266da2e3ebdSchin extern __MANGLE__ int chrtoi __PROTO__((const char*)); 267da2e3ebdSchin extern __MANGLE__ int eaccess __PROTO__((const char*, int)); 268da2e3ebdSchin extern __MANGLE__ char* fmtbase __PROTO__((long, int, int)); 269da2e3ebdSchin extern __MANGLE__ char* fmtbasell __PROTO__((intmax_t, int, int)); 270da2e3ebdSchin #define fmtbase(a,b,c) fmtbasell((intmax_t)(a),b,c) /* until 2003-09-01 */ 271da2e3ebdSchin extern __MANGLE__ char* fmtbuf __PROTO__((size_t)); 272da2e3ebdSchin extern __MANGLE__ char* fmtclock __PROTO__((Sfulong_t)); 273da2e3ebdSchin extern __MANGLE__ char* fmtelapsed __PROTO__((unsigned long, int)); 274da2e3ebdSchin extern __MANGLE__ char* fmterror __PROTO__((int)); 275da2e3ebdSchin extern __MANGLE__ char* fmtesc __PROTO__((const char*)); 276da2e3ebdSchin extern __MANGLE__ char* fmtesq __PROTO__((const char*, const char*)); 277da2e3ebdSchin extern __MANGLE__ char* fmtident __PROTO__((const char*)); 278da2e3ebdSchin extern __MANGLE__ char* fmtip4 __PROTO__((uint32_t, int)); 279da2e3ebdSchin extern __MANGLE__ char* fmtfmt __PROTO__((const char*)); 280da2e3ebdSchin extern __MANGLE__ char* fmtgid __PROTO__((int)); 281da2e3ebdSchin extern __MANGLE__ char* fmtmatch __PROTO__((const char*)); 282da2e3ebdSchin extern __MANGLE__ char* fmtmode __PROTO__((int, int)); 283da2e3ebdSchin extern __MANGLE__ char* fmtnesq __PROTO__((const char*, const char*, size_t)); 284da2e3ebdSchin extern __MANGLE__ char* fmtnum __PROTO__((unsigned long, int)); 285da2e3ebdSchin extern __MANGLE__ char* fmtperm __PROTO__((int)); 286da2e3ebdSchin extern __MANGLE__ char* fmtquote __PROTO__((const char*, const char*, const char*, size_t, int)); 287da2e3ebdSchin extern __MANGLE__ char* fmtre __PROTO__((const char*)); 288da2e3ebdSchin extern __MANGLE__ char* fmtscale __PROTO__((Sfulong_t, int)); 289da2e3ebdSchin extern __MANGLE__ char* fmtsignal __PROTO__((int)); 290da2e3ebdSchin extern __MANGLE__ char* fmttime __PROTO__((const char*, time_t)); 291da2e3ebdSchin extern __MANGLE__ char* fmtuid __PROTO__((int)); 292da2e3ebdSchin extern __MANGLE__ char* fmtversion __PROTO__((unsigned long)); 293da2e3ebdSchin extern __MANGLE__ __V_* memdup __PROTO__((const __V_*, size_t)); 294da2e3ebdSchin extern __MANGLE__ void memfatal __PROTO__((void)); 295da2e3ebdSchin extern __MANGLE__ unsigned int memhash __PROTO__((const __V_*, int)); 296da2e3ebdSchin extern __MANGLE__ unsigned long memsum __PROTO__((const __V_*, int, unsigned long)); 297da2e3ebdSchin extern __MANGLE__ char* pathaccess __PROTO__((char*, const char*, const char*, const char*, int)); 298da2e3ebdSchin extern __MANGLE__ char* pathbin __PROTO__((void)); 299da2e3ebdSchin extern __MANGLE__ char* pathcanon __PROTO__((char*, int)); 300da2e3ebdSchin extern __MANGLE__ char* pathcat __PROTO__((char*, const char*, int, const char*, const char*)); 301da2e3ebdSchin extern __MANGLE__ int pathcd __PROTO__((const char*, const char*)); 302da2e3ebdSchin extern __MANGLE__ int pathcheck __PROTO__((const char*, const char*, Pathcheck_t*)); 303da2e3ebdSchin extern __MANGLE__ int pathexists __PROTO__((char*, int)); 304da2e3ebdSchin extern __MANGLE__ char* pathfind __PROTO__((const char*, const char*, const char*, char*, size_t)); 305da2e3ebdSchin extern __MANGLE__ int pathgetlink __PROTO__((const char*, char*, int)); 306da2e3ebdSchin extern __MANGLE__ int pathinclude __PROTO__((const char*)); 307da2e3ebdSchin extern __MANGLE__ char* pathkey __PROTO__((char*, char*, const char*, const char*, const char*)); 308da2e3ebdSchin extern __MANGLE__ size_t pathnative __PROTO__((const char*, char*, size_t)); 309da2e3ebdSchin extern __MANGLE__ char* pathpath __PROTO__((char*, const char*, const char*, int)); 310da2e3ebdSchin extern __MANGLE__ size_t pathposix __PROTO__((const char*, char*, size_t)); 311da2e3ebdSchin extern __MANGLE__ char* pathprobe __PROTO__((char*, char*, const char*, const char*, const char*, int)); 31234f9b3eeSRoland Mainz extern __MANGLE__ size_t pathprog __PROTO__((const char*, char*, size_t)); 313da2e3ebdSchin extern __MANGLE__ char* pathrepl __PROTO__((char*, const char*, const char*)); 314da2e3ebdSchin extern __MANGLE__ int pathsetlink __PROTO__((const char*, const char*)); 315da2e3ebdSchin extern __MANGLE__ char* pathshell __PROTO__((void)); 316da2e3ebdSchin extern __MANGLE__ char* pathtemp __PROTO__((char*, size_t, const char*, const char*, int*)); 317da2e3ebdSchin extern __MANGLE__ char* pathtmp __PROTO__((char*, const char*, const char*, int*)); 318da2e3ebdSchin extern __MANGLE__ char* setenviron __PROTO__((const char*)); 319da2e3ebdSchin extern __MANGLE__ int stracmp __PROTO__((const char*, const char*)); 320da2e3ebdSchin extern __MANGLE__ char* strcopy __PROTO__((char*, const char*)); 321da2e3ebdSchin extern __MANGLE__ unsigned long strelapsed __PROTO__((const char*, char**, int)); 322da2e3ebdSchin extern __MANGLE__ int stresc __PROTO__((char*)); 323da2e3ebdSchin extern __MANGLE__ long streval __PROTO__((const char*, char**, long(*)(const char*, char**))); 324da2e3ebdSchin extern __MANGLE__ long strexpr __PROTO__((const char*, char**, long(*)(const char*, char**, __V_*), __V_*)); 325da2e3ebdSchin extern __MANGLE__ int strgid __PROTO__((const char*)); 326da2e3ebdSchin extern __MANGLE__ int strgrpmatch __PROTO__((const char*, const char*, int*, int, int)); 327da2e3ebdSchin extern __MANGLE__ unsigned int strhash __PROTO__((const char*)); 328da2e3ebdSchin extern __MANGLE__ __V_* strlook __PROTO__((const __V_*, size_t, const char*)); 329da2e3ebdSchin extern __MANGLE__ int strmatch __PROTO__((const char*, const char*)); 330da2e3ebdSchin extern __MANGLE__ int strmode __PROTO__((const char*)); 331da2e3ebdSchin extern __MANGLE__ int strnacmp __PROTO__((const char*, const char*, size_t)); 332da2e3ebdSchin extern __MANGLE__ char* strncopy __PROTO__((char*, const char*, size_t)); 33334f9b3eeSRoland Mainz extern __MANGLE__ int strnpcmp __PROTO__((const char*, const char*, size_t)); 334da2e3ebdSchin extern __MANGLE__ double strntod __PROTO__((const char*, size_t, char**)); 335da2e3ebdSchin extern __MANGLE__ _ast_fltmax_t strntold __PROTO__((const char*, size_t, char**)); 336da2e3ebdSchin extern __MANGLE__ long strntol __PROTO__((const char*, size_t, char**, int)); 337da2e3ebdSchin extern __MANGLE__ intmax_t strntoll __PROTO__((const char*, size_t, char**, int)); 3387c2fbfb3SApril Chin extern __MANGLE__ long strnton __PROTO__((const char*, size_t, char**, char*, int)); 339da2e3ebdSchin extern __MANGLE__ unsigned long strntoul __PROTO__((const char*, size_t, char**, int)); 3407c2fbfb3SApril Chin extern __MANGLE__ intmax_t strntonll __PROTO__((const char*, size_t, char**, char*, int)); 341da2e3ebdSchin extern __MANGLE__ uintmax_t strntoull __PROTO__((const char*, size_t, char**, int)); 34234f9b3eeSRoland Mainz extern __MANGLE__ int strnvcmp __PROTO__((const char*, const char*, size_t)); 343da2e3ebdSchin extern __MANGLE__ int stropt __PROTO__((const char*, const __V_*, int, int(*)(__V_*, const __V_*, int, const char*), __V_*)); 34434f9b3eeSRoland Mainz extern __MANGLE__ int strpcmp __PROTO__((const char*, const char*)); 345da2e3ebdSchin extern __MANGLE__ int strperm __PROTO__((const char*, char**, int)); 346da2e3ebdSchin extern __MANGLE__ __V_* strpsearch __PROTO__((const __V_*, size_t, size_t, const char*, char**)); 347da2e3ebdSchin extern __MANGLE__ __V_* strsearch __PROTO__((const __V_*, size_t, size_t, Strcmp_f, const char*, __V_*)); 348da2e3ebdSchin extern __MANGLE__ void strsort __PROTO__((char**, int, int(*)(const char*, const char*))); 349da2e3ebdSchin extern __MANGLE__ char* strsubmatch __PROTO__((const char*, const char*, int)); 350da2e3ebdSchin extern __MANGLE__ unsigned long strsum __PROTO__((const char*, unsigned long)); 351da2e3ebdSchin extern __MANGLE__ char* strtape __PROTO__((const char*, char**)); 352da2e3ebdSchin extern __MANGLE__ int strtoip4 __PROTO__((const char*, char**, uint32_t*, unsigned char*)); 353da2e3ebdSchin extern __MANGLE__ long strton __PROTO__((const char*, char**, char*, int)); 354da2e3ebdSchin extern __MANGLE__ intmax_t strtonll __PROTO__((const char*, char**, char*, int)); 355da2e3ebdSchin extern __MANGLE__ int struid __PROTO__((const char*)); 356da2e3ebdSchin extern __MANGLE__ int struniq __PROTO__((char**, int)); 35734f9b3eeSRoland Mainz extern __MANGLE__ int strvcmp __PROTO__((const char*, const char*)); 358da2e3ebdSchin 359da2e3ebdSchin #undef __MANGLE__ 360da2e3ebdSchin #define __MANGLE__ __LINKAGE__ 361da2e3ebdSchin 362da2e3ebdSchin /* 363da2e3ebdSchin * C library global data symbols not prototyped by <unistd.h> 364da2e3ebdSchin */ 365da2e3ebdSchin 366da2e3ebdSchin #if !defined(environ) && defined(__DYNAMIC__) 367da2e3ebdSchin #define environ __DYNAMIC__(environ) 368da2e3ebdSchin #else 369da2e3ebdSchin extern __MANGLE__ char** environ; 370da2e3ebdSchin #endif 371da2e3ebdSchin 372da2e3ebdSchin /* 373da2e3ebdSchin * really handy malloc()/free() (__FILE__,__LINE__,__FUNCTION__) tracing 374da2e3ebdSchin * make with VMDEBUG==1 or debug=1 or CCFLAGS=$(CC.DEBUG) 375da2e3ebdSchin * VMDEBUG==0 disables 376da2e3ebdSchin * at runtime export VMDEBUG or VMTRACE per vmalloc.3 377da2e3ebdSchin * to list originating call locations 378da2e3ebdSchin */ 379da2e3ebdSchin 380da2e3ebdSchin #if !_std_malloc && !defined(VMFL) && !defined(_VMHDR_H) && \ 381da2e3ebdSchin (!defined(VMDEBUG) || VMDEBUG) && (VMDEBUG || _BLD_DEBUG) 382da2e3ebdSchin 383da2e3ebdSchin #define VMFL 1 384da2e3ebdSchin #include <vmalloc.h> 385da2e3ebdSchin 386da2e3ebdSchin #endif 387da2e3ebdSchin 388da2e3ebdSchin #endif 389