Skip to content
Snippets Groups Projects
Select Git revision
  • cf2caa24bbcfbd443654a510786c952bd9af680e
  • master default protected
  • hpke
  • ppc-chacha-4core
  • delete-internal-name-mangling
  • master-updates
  • ppc-gcm
  • ppc-chacha-2core
  • refactor-ecc-mod
  • ppc-chacha-core
  • use-mpn_cnd-functions
  • optimize-ecc-invert
  • default-m4-quote-char
  • power-asm-wip
  • test-fat
  • chacha-3core-neon
  • x86_64-salsa20-2core
  • salsa20-2core-neon
  • bcrypt
  • arm-salsa20-chacha-vsra
  • test-shlib-dir
  • nettle_3.6_release_20200429
  • nettle_3.6rc3
  • nettle_3.6rc2
  • nettle_3.6rc1
  • nettle_3.5.1_release_20190627
  • nettle_3.5_release_20190626
  • nettle_3.5rc1
  • nettle_3.4.1_release_20181204
  • nettle_3.4.1rc1
  • nettle_3.4_release_20171119
  • nettle_3.4rc2
  • nettle_3.4rc1
  • nettle_3.3_release_20161001
  • nettle_3.2_release_20160128
  • nettle_3.1.1_release_20150424
  • nettle_3.1_release_20150407
  • nettle_3.1rc3
  • nettle_3.1rc2
  • nettle_3.1rc1
  • nettle_3.0_release_20140607
41 results

getopt1.c

Blame
  • Forked from Nettle / nettle
    Source project has a limited visibility.
    • Niels Möller's avatar
      65f4dcd4
      Moved files here. · 65f4dcd4
      Niels Möller authored
      Linked into the directories that need them by ./.bootstrap.
      
      Rev: misc/getopt.c:1.1
      Rev: misc/getopt.h:1.1
      Rev: misc/getopt1.c:1.1
      65f4dcd4
      History
      Moved files here.
      Niels Möller authored
      Linked into the directories that need them by ./.bootstrap.
      
      Rev: misc/getopt.c:1.1
      Rev: misc/getopt.h:1.1
      Rev: misc/getopt1.c:1.1
    getopt1.c 4.36 KiB
    /* getopt_long and getopt_long_only entry points for GNU getopt.
       Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
         Free Software Foundation, Inc.
       This file is part of the GNU C Library.
    
       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,
       Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    
    #ifdef HAVE_CONFIG_H
    #include <config.h>
    #endif
    
    #include "getopt.h"
    
    #if !defined __STDC__ || !__STDC__
    /* This is a separate conditional since some stdc systems
       reject `defined (const)'.  */
    #ifndef const
    #define const
    #endif
    #endif
    
    #include <stdio.h>
    
    /* 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.  */
    
    #define GETOPT_INTERFACE_VERSION 2
    #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
    #include <gnu-versions.h>
    #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
    #define ELIDE_CODE
    #endif
    #endif
    
    #ifndef ELIDE_CODE
    
    
    /* This needs to come after some library #include
       to get __GNU_LIBRARY__ defined.  */
    #ifdef __GNU_LIBRARY__
    #include <stdlib.h>
    #endif
    
    #ifndef	NULL
    #define NULL 0
    #endif
    
    int
    getopt_long (argc, argv, options, long_options, opt_index)
         int argc;
         char *const *argv;
         const char *options;
         const struct option *long_options;