WvStreams
|
00001 /* Name frobnication for compiling argp outside of glibc 00002 Copyright (C) 1997 Free Software Foundation, Inc. 00003 This file is part of the GNU C Library. 00004 Written by Miles Bader <miles@gnu.ai.mit.edu>. 00005 00006 The GNU C Library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public License as 00008 published by the Free Software Foundation; either version 2 of the 00009 License, or (at your option) any later version. 00010 00011 The GNU C Library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public 00017 License along with the GNU C Library; see the file COPYING.LIB. If not, 00018 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00019 Boston, MA 02111-1307, USA. */ 00020 00021 #if !_LIBC 00022 /* This code is written for inclusion in gnu-libc, and uses names in the 00023 namespace reserved for libc. If we're not compiling in libc, define those 00024 names to be the normal ones instead. */ 00025 00026 /* argp-parse functions */ 00027 #undef __argp_parse 00028 #define __argp_parse argp_parse 00029 #undef __option_is_end 00030 #define __option_is_end _option_is_end 00031 #undef __option_is_short 00032 #define __option_is_short _option_is_short 00033 #undef __argp_input 00034 #define __argp_input _argp_input 00035 00036 /* argp-help functions */ 00037 #undef __argp_help 00038 #define __argp_help argp_help 00039 #undef __argp_error 00040 #define __argp_error argp_error 00041 #undef __argp_failure 00042 #define __argp_failure argp_failure 00043 #undef __argp_state_help 00044 #define __argp_state_help argp_state_help 00045 #undef __argp_usage 00046 #define __argp_usage argp_usage 00047 #undef __argp_basename 00048 #define __argp_basename _argp_basename 00049 #undef __argp_short_program_name 00050 #define __argp_short_program_name _argp_short_program_name 00051 00052 /* argp-fmtstream functions */ 00053 #undef __argp_make_fmtstream 00054 #define __argp_make_fmtstream argp_make_fmtstream 00055 #undef __argp_fmtstream_free 00056 #define __argp_fmtstream_free argp_fmtstream_free 00057 #undef __argp_fmtstream_putc 00058 #define __argp_fmtstream_putc argp_fmtstream_putc 00059 #undef __argp_fmtstream_puts 00060 #define __argp_fmtstream_puts argp_fmtstream_puts 00061 #undef __argp_fmtstream_write 00062 #define __argp_fmtstream_write argp_fmtstream_write 00063 #undef __argp_fmtstream_printf 00064 #define __argp_fmtstream_printf argp_fmtstream_printf 00065 #undef __argp_fmtstream_set_lmargin 00066 #define __argp_fmtstream_set_lmargin argp_fmtstream_set_lmargin 00067 #undef __argp_fmtstream_set_rmargin 00068 #define __argp_fmtstream_set_rmargin argp_fmtstream_set_rmargin 00069 #undef __argp_fmtstream_set_wmargin 00070 #define __argp_fmtstream_set_wmargin argp_fmtstream_set_wmargin 00071 #undef __argp_fmtstream_point 00072 #define __argp_fmtstream_point argp_fmtstream_point 00073 #undef __argp_fmtstream_update 00074 #define __argp_fmtstream_update _argp_fmtstream_update 00075 #undef __argp_fmtstream_ensure 00076 #define __argp_fmtstream_ensure _argp_fmtstream_ensure 00077 #undef __argp_fmtstream_lmargin 00078 #define __argp_fmtstream_lmargin argp_fmtstream_lmargin 00079 #undef __argp_fmtstream_rmargin 00080 #define __argp_fmtstream_rmargin argp_fmtstream_rmargin 00081 #undef __argp_fmtstream_wmargin 00082 #define __argp_fmtstream_wmargin argp_fmtstream_wmargin 00083 00084 /* normal libc functions we call */ 00085 #undef __sleep 00086 #ifndef _WIN32 00087 #define __sleep sleep 00088 #else 00089 #define WIN32_LEAN_AND_MEAN 00090 #include <windows.h> 00091 #define __sleep(x) Sleep(x * 1000) 00092 #endif 00093 #undef __strcasecmp 00094 #define __strcasecmp strcasecmp 00095 #undef __vsnprintf 00096 #define __vsnprintf vsnprintf 00097 00098 #endif /* !_LIBC */ 00099 00100 #ifndef __set_errno 00101 #define __set_errno(e) (errno = (e)) 00102 #endif