Changeset 629 for trunk/src/ash/eval.c


Ignore:
Timestamp:
Nov 26, 2006, 12:47:02 PM (19 years ago)
Author:
bird
Message:

porting in progress.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ash/eval.c

    r626 r629  
    5151#include <sys/types.h>
    5252#include <sys/wait.h>
     53#ifdef HAVE_SYSCTL_H
    5354#include <sys/sysctl.h>
     55#endif
    5456
    5557/*
     
    604606syspath(void)
    605607{
     608#ifdef CTL_USER
    606609        static char *sys_path = NULL;
    607610        static int mib[] = {CTL_USER, USER_CS_PATH};
     611#endif
    608612#ifdef PC_PATH_SEP
    609613        static char def_path[] = "PATH=/usr/bin;/bin;/usr/sbin;/sbin";
     
    611615        static char def_path[] = "PATH=/usr/bin:/bin:/usr/sbin:/sbin";
    612616#endif
     617#ifdef CTL_USER
    613618        size_t len;
    614619
     
    625630        }
    626631        return sys_path;
     632#else
     633    return def_path;
     634#endif
    627635}
    628636
     
    10091017                        optptr = NULL;
    10101018                        /* and getopt */
     1019#if defined(__FreeBSD__) || defined(__EMX__) || defined(__APPLE__)
    10111020                        optreset = 1;
    10121021                        optind = 1;
     1022#else
     1023                        optind = 0; /* init */
     1024#endif
     1025
    10131026                        exitstatus = cmdentry.u.bltin(argc, argv);
    10141027                } else {
Note: See TracChangeset for help on using the changeset viewer.