VirtualBox

Changeset 942 in kBuild


Ignore:
Timestamp:
May 26, 2007 11:19:22 PM (18 years ago)
Author:
bird
Message:

Always use the GNU make getopt stuff.

Location:
trunk/src/gmakenew
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gmakenew/Makefile.kmk

    r937 r942  
    5050        kmkbuiltin/strmode.c \
    5151        kmkbuiltin/strlcpy.c \
     52        getopt.c \
     53        getopt1.c \
    5254        electric.c
    5355
     
    6567        kmkbuiltin/fts.c \
    6668        glob/glob.c \
    67         glob/fnmatch.c \
    68         getopt.c \
    69         getopt1.c
     69        glob/fnmatch.c
    7070
    7171kmkmissing_SOURCES.win += \
     72        kmkbuiltin/mscfakes.c \
     73        kmkbuiltin/fts.c
    7274        glob/glob.c \
    7375        glob/fnmatch.c \
    74         getopt.c \
    75         getopt1.c \
    7676        getloadavg.c \
    7777        w32/subproc/misc.c \
     
    7979        w32/subproc/w32err.c \
    8080        w32/compat/dirent.c \
    81         w32/pathstuff.c \
    82         kmkbuiltin/mscfakes.c \
    83         kmkbuiltin/fts.c
     81        w32/pathstuff.c
    8482
    8583#
  • trunk/src/gmakenew/kmkbuiltin/cat.c

    r813 r942  
    105105        optarg = NULL;
    106106        optopt = 0;
    107 #if defined(__FreeBSD__) || defined(__EMX__) || defined(__APPLE__)
    108         optreset = 1;
    109         optind = 1;
    110 #else
    111107        optind = 0; /* init */
    112 #endif
    113108
    114109#ifdef kmk_builtin_cat /* kmk did this already. */
  • trunk/src/gmakenew/kmkbuiltin/cp.c

    r809 r942  
    139139        optarg = NULL;
    140140        optopt = 0;
    141 #if defined(__FreeBSD__) || defined(__EMX__) || defined(__APPLE__)
    142         optreset = 1;
    143         optind = 1;
    144 #else
    145141        optind = 0; /* init */
    146 #endif
    147142
    148143        Hflag = Lflag = Pflag = 0;
  • trunk/src/gmakenew/kmkbuiltin/install.c

    r809 r942  
    154154        optarg = NULL;
    155155        optopt = 0;
    156 #if defined(__FreeBSD__) || defined(__EMX__) || defined(__APPLE__)
    157         optreset = 1;
    158         optind = 1;
    159 #else
    160156        optind = 0; /* init */
    161 #endif
    162157
    163158        iflags = 0;
  • trunk/src/gmakenew/kmkbuiltin/ln.c

    r809 r942  
    9292        optarg = NULL;
    9393        optopt = 0;
    94 #if defined(__FreeBSD__) || defined(__EMX__) || defined(__APPLE__)
    95         optreset = 1;
    96         optind = 1;
    97 #else
    9894        optind = 0; /* init */
    99 #endif
    10095
    10196#if 0 /* kmk: we don't need this. */
  • trunk/src/gmakenew/kmkbuiltin/mkdir.c

    r809 r942  
    8282        mode = NULL;
    8383
    84     /* reinitialize globals */
    85     vflag = 0;
    86 
    87     /* kmk: reset getopt and set progname */
    88     g_progname = argv[0];
    89     opterr = 1;
    90     optarg = NULL;
    91     optopt = 0;
    92 #if defined(__FreeBSD__) || defined(__EMX__) || defined(__APPLE__)
    93     optreset = 1;
    94     optind = 1;
    95 #else
    96     optind = 0; /* init */
    97 #endif
     84        /* reinitialize globals */
     85        vflag = 0;
     86
     87        /* kmk: reset getopt and set progname */
     88        g_progname = argv[0];
     89        opterr = 1;
     90        optarg = NULL;
     91        optopt = 0;
     92        optind = 0; /* init */
    9893        while ((ch = getopt(argc, argv, "m:pv")) != -1)
    9994                switch(ch) {
  • trunk/src/gmakenew/kmkbuiltin/mv.c

    r813 r942  
    132132        optarg = NULL;
    133133        optopt = 0;
    134 #if defined(__FreeBSD__) || defined(__EMX__) || defined(__APPLE__)
    135         optreset = 1;
    136         optind = 1;
    137 #else
    138134        optind = 0; /* init */
    139 #endif
    140135
    141136        while ((ch = getopt(argc, argv, "finv")) != -1)
  • trunk/src/gmakenew/kmkbuiltin/printf.c

    r813 r942  
    146146        optarg = NULL;
    147147        optopt = 0;
    148 #if defined(__FreeBSD__) || defined(__EMX__) || defined(__APPLE__)
    149         optreset = 1;
    150         optind = 1;
    151 #else
    152148        optind = 0; /* init */
    153 #endif
    154149
    155150#if !defined(SHELL) && !defined(BUILTIN) && !defined(kmk_builtin_printf) /* kmk did this already. */
  • trunk/src/gmakenew/kmkbuiltin/rm.c

    r809 r942  
    123123        optarg = NULL;
    124124        optopt = 0;
    125 #if defined(__FreeBSD__) || defined(__EMX__) || defined(__APPLE__)
    126         optreset = 1;
    127         optind = 1;
    128 #else
    129125        optind = 0; /* init */
    130 #endif
    131126
    132127#if 0 /* kmk: we don't need this */
  • trunk/src/gmakenew/kmkbuiltin/rmdir.c

    r813 r942  
    8787        optarg = NULL;
    8888        optopt = 0;
    89 #if defined(__FreeBSD__) || defined(__EMX__) || defined(__APPLE__)
    90         optreset = 1;
    91         optind = 1;
    92 #else
    9389        optind = 0; /* init */
    94 #endif
    9590        while ((ch = getopt_long(argc, argv, "pv", long_options, NULL)) != -1)
    9691                switch(ch) {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette