资源简介
linux系统下端口映射工具rinetd
代码片段和文件信息
/* THIS IS HERE FOR WIN32‘s BENEFIT ONLY. */
/* Getopt for GNU.
NOTE: getopt is now part of the C library so if you don‘t know what
“Keep this file name-space clean“ means talk to roland@gnu.ai.mit.edu
before changing it!
Copyright (C) 1987 88 89 90 91 92 1993
Free Software Foundation Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 or (at your option) any
later version.
This program is distributed in the hope that it will be useful
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not write to the Free Software
Foundation 675 Mass Ave Cambridge MA 02139 USA. */
#ifdef HAVE_CONFIG_H
#include “config.h“
#endif
#ifndef __STDC__
# ifndef const
# define const
# endif
#endif
/* This tells Alpha OSF/1 not to define a getopt prototype in . */
#ifndef _NO_PROTO
#define _NO_PROTO
#endif
#include
/* Comment out all this code if we are using the GNU C Library and are not
actually compiling the library itself. This code is part of the GNU C
Library but also included in many other GNU distributions. Compiling
and linking in this code is a waste when using the GNU C library
(especially if it is a shared library). Rather than having every GNU
program understand ‘configure --with-gnu-libc‘ and omit the object files
it is simpler to just do this in the source for each such file. */
#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
/* This needs to come after some library #include
to get __GNU_LIBRARY__ defined. */
#ifdef __GNU_LIBRARY__
/* Don‘t include stdlib.h for non-GNU C libraries because some of them
contain conflicting prototypes for getopt. */
#include
#endif /* GNU C library. */
/* If GETOPT_COMPAT is defined ‘+‘ as well as ‘--‘ can introduce a
long-named option. Because this is not POSIX.2 compliant it is
being phased out. */
/* #define GETOPT_COMPAT */
/* This version of ‘getopt‘ appears to the caller like standard Unix ‘getopt‘
but it behaves differently for the user since it allows the user
to intersperse the options with the other arguments.
As ‘getopt‘ works it permutes the elements of ARGV so that
when it is done all the options precede everything else. Thus
all application programs are extended to handle flexible argument order.
Setting the environment variable POSIXLY_CORRECT disables permutation.
Then the behavior is completely standard.
GNU application programs can use a third alternative mode in which
they can distinguish the
评论
共有 条评论