argp-namefrob.h
上传用户:shenzhenrh
上传日期:2013-05-12
资源大小:2904k
文件大小:3k
源码类别:

信息检索与抽取

开发平台:

Unix_Linux

  1. /* Name frobnication for compiling argp outside of glibc
  2.    Copyright (C) 1997 Free Software Foundation, Inc.
  3.    This file is part of the GNU C Library.
  4.    Written by Miles Bader <miles@gnu.ai.mit.edu>.
  5.    The GNU C Library is free software; you can redistribute it and/or
  6.    modify it under the terms of the GNU Library General Public License as
  7.    published by the Free Software Foundation; either version 2 of the
  8.    License, or (at your option) any later version.
  9.    The GNU C Library is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12.    Library General Public License for more details.
  13.    You should have received a copy of the GNU Library General Public
  14.    License along with the GNU C Library; see the file COPYING.LIB.  If not,
  15.    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  16.    Boston, MA 02111-1307, USA.  */
  17. #if !_LIBC
  18. /* This code is written for inclusion in gnu-libc, and uses names in the
  19.    namespace reserved for libc.  If we're not compiling in libc, define those
  20.    names to be the normal ones instead.  */
  21. /* argp-parse functions */
  22. #undef __argp_parse
  23. #define __argp_parse argp_parse
  24. #undef __option_is_end
  25. #define __option_is_end _option_is_end
  26. #undef __option_is_short
  27. #define __option_is_short _option_is_short
  28. #undef __argp_input
  29. #define __argp_input _argp_input
  30. /* argp-help functions */
  31. #undef __argp_help
  32. #define __argp_help argp_help
  33. #undef __argp_error
  34. #define __argp_error argp_error
  35. #undef __argp_failure
  36. #define __argp_failure argp_failure
  37. #undef __argp_state_help
  38. #define __argp_state_help argp_state_help
  39. #undef __argp_usage
  40. #define __argp_usage argp_usage
  41. /* argp-fmtstream functions */
  42. #undef __argp_make_fmtstream
  43. #define __argp_make_fmtstream argp_make_fmtstream
  44. #undef __argp_fmtstream_free
  45. #define __argp_fmtstream_free argp_fmtstream_free
  46. #undef __argp_fmtstream_putc
  47. #define __argp_fmtstream_putc argp_fmtstream_putc
  48. #undef __argp_fmtstream_puts
  49. #define __argp_fmtstream_puts argp_fmtstream_puts
  50. #undef __argp_fmtstream_write
  51. #define __argp_fmtstream_write argp_fmtstream_write
  52. #undef __argp_fmtstream_printf
  53. #define __argp_fmtstream_printf argp_fmtstream_printf
  54. #undef __argp_fmtstream_set_lmargin
  55. #define __argp_fmtstream_set_lmargin argp_fmtstream_set_lmargin
  56. #undef __argp_fmtstream_set_rmargin
  57. #define __argp_fmtstream_set_rmargin argp_fmtstream_set_rmargin
  58. #undef __argp_fmtstream_set_wmargin
  59. #define __argp_fmtstream_set_wmargin argp_fmtstream_set_wmargin
  60. #undef __argp_fmtstream_point
  61. #define __argp_fmtstream_point argp_fmtstream_point
  62. #undef __argp_fmtstream_update
  63. #define __argp_fmtstream_update _argp_fmtstream_update
  64. #undef __argp_fmtstream_ensure
  65. #define __argp_fmtstream_ensure _argp_fmtstream_ensure
  66. #undef __argp_fmtstream_lmargin
  67. #define __argp_fmtstream_lmargin argp_fmtstream_lmargin
  68. #undef __argp_fmtstream_rmargin
  69. #define __argp_fmtstream_rmargin argp_fmtstream_rmargin
  70. #undef __argp_fmtstream_wmargin
  71. #define __argp_fmtstream_wmargin argp_fmtstream_wmargin
  72. /* normal libc functions we call */
  73. #undef __sleep
  74. #define __sleep sleep
  75. #undef __strcasecmp
  76. #define __strcasecmp strcasecmp
  77. #undef __vsnprintf
  78. #define __vsnprintf vsnprintf
  79. #endif /* !_LIBC */
  80. #ifndef __set_errno
  81. #define __set_errno(e) (errno = (e))
  82. #endif