da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/***********************************************************************
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* This software is part of the ast package *
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner* Copyright (c) 1985-2010 AT&T Intellectual Property *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* and is licensed under the *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Common Public License, Version 1.0 *
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin* by AT&T Intellectual Property *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* A copy of the License is available at *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* http://www.opensource.org/licenses/cpl1.0.txt *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Information and Software Systems Research *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* AT&T Research *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Florham Park NJ *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Glenn Fowler <gsf@research.att.com> *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* David Korn <dgk@research.att.com> *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Phong Vo <kpv@research.att.com> *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin***********************************************************************/
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#pragma prototyped
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/*
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * some systems may pull in <ast_common.h> and its <ast_map.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * which we are in the process of generating ... this prevents it
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define _def_map_ast 1
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include "FEATURE/lib"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include "FEATURE/mmap"
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner#include "FEATURE/options"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include "FEATURE/vmalloc"
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner#include "FEATURE/eaccess"
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner#if _opt_map_libc && !defined(_map_libc)
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner#define _map_libc 1
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinint
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinmain()
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#pragma prototyped\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("/*\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf(" * prototypes provided for standard interfaces hijacked\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf(" * by ast and mapped to _ast_* but already prototyped\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf(" * unmapped in native headers included by <ast_std.h>\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf(" */\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#if _BLD_ast && defined(__EXPORT__)\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define extern __EXPORT__\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#endif\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if __MVS__
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#undef _map_libc
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define _map_libc 1
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("/* mvs.390 libc.dll routines can't be intercepted by user dlls */\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef _mem_dd_fd_DIR\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef _typ_long_double\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _map_libc
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#undef _map_malloc
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define _map_malloc 1
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define _map_libc 1\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef basename\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define basename _ast_basename\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef dirname\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define dirname _ast_dirname\n");
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner#if !_lib_eaccess
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef eaccess\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define eaccess _ast_eaccess\n");
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if !_lib_execvpe
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef execvpe\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define execvpe _ast_execvpe\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern int execvpe(const char*, char* const[], char* const[]);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef fnmatch\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define fnmatch _ast_fnmatch\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef fts_children\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define fts_children _ast_fts_children\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef fts_close\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define fts_close _ast_fts_close\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef fts_flags\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define fts_flags _ast_fts_flags\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef fts_notify\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define fts_notify _ast_fts_notify\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef fts_open\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define fts_open _ast_fts_open\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef fts_read\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define fts_read _ast_fts_read\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef fts_set\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define fts_set _ast_fts_set\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef ftw\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define ftw _ast_ftw\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef ftwalk\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define ftwalk _ast_ftwalk\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef ftwflags\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define ftwflags _ast_ftwflags\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if !_WINIX
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef getcwd\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define getcwd _ast_getcwd\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern char* getcwd(char*, size_t);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef getdate\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define getdate _ast_getdate\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _lib_getopt || _lib_getsubopt || _lib_getopt_long || _lib_getopt_long_only
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef getopt\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define getopt _ast_getopt\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef getsubopt\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define getsubopt _ast_getsubopt\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef getopt_long\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define getopt_long _ast_getopt_long\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef getopt_long_only\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define getopt_long_only _ast_getopt_long_only\n");
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin printf("#undef optopt\n");
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin printf("#define optopt _ast_optopt\n");
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin printf("#undef optarg\n");
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin printf("#define optarg _ast_optarg\n");
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin printf("#undef optind\n");
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin printf("#define optind _ast_optind\n");
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin printf("#undef opterr\n");
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin printf("#define opterr _ast_opterr\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef getwd\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define getwd _ast_getwd\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern char* getwd(char*);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef glob\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define glob _ast_glob\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef globfree\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define globfree _ast_globfree\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef memdup\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define memdup _ast_memdup\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef memfatal\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define memfatal _ast_memfatal\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef memhash\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define memhash _ast_memhash\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef memsum\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define memsum _ast_memsum\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef mkstemp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define mkstemp _ast_mkstemp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern int mkstemp(char*);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef mktemp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define mktemp _ast_mktemp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern char* mktemp(char*);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef mktime\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define mktime _ast_mktime\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef nftw\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define nftw _ast_nftw\n");
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin printf("#undef optctx\n");
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin printf("#define optctx _ast_optctx\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef optesc\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define optesc _ast_optesc\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef optget\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define optget _ast_optget\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef opthelp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define opthelp _ast_opthelp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef optjoin\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define optjoin _ast_optjoin\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef optstr\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define optstr _ast_optstr\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef optusage\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define optusage _ast_optusage\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathaccess\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathaccess _ast_pathaccess\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathbin\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathbin _ast_pathbin\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathcanon\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathcanon _ast_pathcanon\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathcat\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathcat _ast_pathcat\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathcd\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathcd _ast_pathcd\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathcheck\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathcheck _ast_pathcheck\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathexists\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathexists _ast_pathexists\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathfind\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathfind _ast_pathfind\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathgetlink\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathgetlink _ast_pathgetlink\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathinclude\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathinclude _ast_pathinclude\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathkey\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathkey _ast_pathkey\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathnative\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathnative _ast_pathnative\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathpath\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathpath _ast_pathpath\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathposix\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathposix _ast_pathposix\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathprobe\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathprobe _ast_pathprobe\n");
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz printf("#undef pathprog\n");
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz printf("#define pathprog _ast_pathprog\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathrepl\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathrepl _ast_pathrepl\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathsetlink\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathsetlink _ast_pathsetlink\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathshell\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathshell _ast_pathshell\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathstat\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathstat _ast_pathstat\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathtemp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathtemp _ast_pathtemp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pathtmp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pathtmp _ast_pathtmp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef procclose\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define procclose _ast_procclose\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef procfree\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define procfree _ast_procfree\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef procopen\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define procopen _ast_procopen\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef procrun\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define procrun _ast_procrun\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef putenv\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define putenv _ast_putenv\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef re_comp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define re_comp _ast_re_comp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef re_exec\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define re_exec _ast_re_exec\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef realpath\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define realpath _ast_realpath\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern char* realpath(const char*, char*);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regaddclass\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regaddclass _ast_regaddclass\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regalloc\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regalloc _ast_regalloc\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regcache\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regcache _ast_regcache\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regclass\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regclass _ast_regclass\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regcmp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regcmp _ast_regcmp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regcollate\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regcollate _ast_regcollate\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regcomb\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regcomb _ast_regcomb\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regcomp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regcomp _ast_regcomp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regdecomp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regdecomp _ast_regdecomp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regdup\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regdup _ast_regdup\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regerror\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regerror _ast_regerror\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regex\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regex _ast_regex\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regexec\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regexec _ast_regexec\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regfatal\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regfatal _ast_regfatal\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regfatalpat\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regfatalpat _ast_regfatalpat\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regfree\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regfree _ast_regfree\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regncomp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regncomp _ast_regncomp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regnexec\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regnexec _ast_regnexec\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regrecord\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regrecord _ast_regrecord\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regrexec\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regrexec _ast_regrexec\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regstat\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regstat _ast_regstat\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regsub\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regsub _ast_regsub\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regsubcomp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regsubcomp _ast_regsubcomp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regsubexec\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regsubexec _ast_regsubexec\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regsubflags\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regsubflags _ast_regsubflags\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef regsubfree\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define regsubfree _ast_regsubfree\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef remove\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define remove _ast_remove\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern int remove(const char*);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef resolvepath\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define resolvepath _ast_resolvepath\n");
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin printf("extern int resolvepath(const char*, char*, size_t);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef setenv\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define setenv _ast_setenv\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern int setenv(const char*, const char*, int);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef setenviron\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define setenviron _ast_setenviron\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef sigcritical\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define sigcritical _ast_sigcritical\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef signal\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define signal _ast_signal\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef sigunblock\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define sigunblock _ast_sigunblock\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef stracmp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define stracmp _ast_stracmp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strcopy\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strcopy _ast_strcopy\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strelapsed\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strelapsed _ast_strelapsed\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef stresc\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define stresc _ast_stresc\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef streval\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define streval _ast_streval\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strexpr\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strexpr _ast_strexpr\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strftime\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strftime _ast_strftime\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strgid\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strgid _ast_strgid\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strgrpmatch\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strgrpmatch _ast_strgrpmatch\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strhash\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strhash _ast_strhash\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strkey\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strkey _ast_strkey\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strlcat\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strlcat _ast_strlcat\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern size_t strlcat(char*, const char*, size_t);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strlcpy\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strlcpy _ast_strlcpy\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern size_t strlcpy(char*, const char*, size_t);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strlook\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strlook _ast_strlook\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strmatch\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strmatch _ast_strmatch\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _map_libc || _lib_strmode
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strmode\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strmode _ast_strmode\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _map_libc
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strnacmp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strnacmp _ast_strnacmp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strncopy\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strncopy _ast_strncopy\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strntod\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strntod _ast_strntod\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strntol\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strntol _ast_strntol\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strntold\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strntold _ast_strntold\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strntoll\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strntoll _ast_strntoll\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strntoul\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strntoul _ast_strntoul\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strntoull\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strntoull _ast_strntoull\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef stropt\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define stropt _ast_stropt\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strperm\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strperm _ast_strperm\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strpsearch\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strpsearch _ast_strpsearch\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if !_lib_strptime
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strptime\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strptime _ast_strptime\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strsearch\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strsearch _ast_strsearch\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strsort\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strsort _ast_strsort\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strsubmatch\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strsubmatch _ast_strsubmatch\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strsum\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strsum _ast_strsum\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strtape\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strtape _ast_strtape\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strtoip4\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strtoip4 _ast_strtoip4\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strton\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strton _ast_strton\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strtonll\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strtonll _ast_strtonll\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef struid\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define struid _ast_struid\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef struniq\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define struniq _ast_struniq\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef system\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define system _ast_system\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern int system(const char*);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef tempnam\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define tempnam _ast_tempnam\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern char* tempnam(const char*, const char*);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef tmpnam\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define tmpnam _ast_tmpnam\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern char* tmpnam(char*);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef touch\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define touch _ast_touch\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef wordexp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define wordexp _ast_wordexp\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef wordfree\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define wordfree _ast_wordfree\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef unsetenv\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define unsetenv _ast_unsetenv\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _std_malloc
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("/* no local malloc override */\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define _std_malloc 1\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#else
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _map_malloc
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("/* cannot override local malloc */\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define _map_malloc 1\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef calloc\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define calloc _ast_calloc\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern void* calloc(size_t, size_t);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef cfree\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define cfree _ast_cfree\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern void cfree(void*);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef free\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define free _ast_free\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern void free(void*);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _lib_mallinfo
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef mallinfo\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define mallinfo _ast_mallinfo\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef malloc\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define malloc _ast_malloc\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern void* malloc(size_t);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _lib_mallopt
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef mallopt\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define mallopt _ast_mallopt\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _lib_memalign
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef memalign\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define memalign _ast_memalign\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern void* memalign(size_t, size_t);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _lib_mstats
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef mstats\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define mstats _ast_mstats\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _lib_pvalloc
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef pvalloc\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define pvalloc _ast_pvalloc\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef realloc\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define realloc _ast_realloc\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern void* realloc(void*, size_t);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strdup\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strdup _ast_strdup\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern char* strdup(const char*);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _lib_valloc
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef valloc\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define valloc _ast_valloc\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern void* valloc(size_t);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /*
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * overriding <stdlib.h> strto*() is problematic to say the least
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _map_libc || _std_strtol
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if !__CYGWIN__
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strtol\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strtol _ast_strtol\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strtoul\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strtoul _ast_strtoul\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strtoll\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strtoll _ast_strtoll\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strtoull\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strtoull _ast_strtoull\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _map_libc || _std_strtod
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strtod\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strtod _ast_strtod\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _map_libc || _std_strtold
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef strtold\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#define strtold _ast_strtold\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if !__CYGWIN__
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _npt_strtol || _map_libc || _std_strtol
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _npt_strtol && !_map_libc && !_std_strtol
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#ifndef _ISOC99_SOURCE\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern long strtol(const char*, char**, int);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _npt_strtol && !_map_libc && !_std_strtol
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#endif\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _npt_strtoul || _map_libc || _std_strtol
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _npt_strtoul && !_map_libc && !_std_strtol
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#ifndef _ISOC99_SOURCE\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern unsigned long strtoul(const char*, char**, int);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _npt_strtoul && !_map_libc && !_std_strtol
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#endif\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _npt_strtod || _map_libc || _std_strtod
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _npt_strtod && !_map_libc && !_std_strtod
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#ifndef _ISOC99_SOURCE\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern double strtod(const char*, char**);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _npt_strtod && !_map_libc && !_std_strtod
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#endif\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#if !_UWIN\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef extern\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#endif\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _npt_strtold || _map_libc || _std_strtold
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _npt_strtold && !_map_libc && !_std_strtold
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#ifndef _ISOC99_SOURCE\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern _ast_fltmax_t strtold(const char*, char**);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _npt_strtold && !_map_libc && !_std_strtold
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#endif\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef extern\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _npt_strtoll || _map_libc || _std_strtol
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _npt_strtoll && !_map_libc && !_std_strtol
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#ifndef _ISOC99_SOURCE\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern _ast_intmax_t strtoll(const char*, char**, int);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _npt_strtoll && !_map_libc && !_std_strtol
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#endif\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _npt_strtoull || _map_libc || _std_strtol
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _npt_strtoull && !_map_libc && !_std_strtol
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#ifndef _ISOC99_SOURCE\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("extern unsigned _ast_intmax_t strtoull(const char*, char**, int);\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if _npt_strtoull && !_map_libc && !_std_strtoul
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#endif\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin printf("#undef extern\n");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return 0;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin}