Changeset 629 for trunk/src/ash/eval.c
- Timestamp:
- Nov 26, 2006, 12:47:02 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ash/eval.c
r626 r629 51 51 #include <sys/types.h> 52 52 #include <sys/wait.h> 53 #ifdef HAVE_SYSCTL_H 53 54 #include <sys/sysctl.h> 55 #endif 54 56 55 57 /* … … 604 606 syspath(void) 605 607 { 608 #ifdef CTL_USER 606 609 static char *sys_path = NULL; 607 610 static int mib[] = {CTL_USER, USER_CS_PATH}; 611 #endif 608 612 #ifdef PC_PATH_SEP 609 613 static char def_path[] = "PATH=/usr/bin;/bin;/usr/sbin;/sbin"; … … 611 615 static char def_path[] = "PATH=/usr/bin:/bin:/usr/sbin:/sbin"; 612 616 #endif 617 #ifdef CTL_USER 613 618 size_t len; 614 619 … … 625 630 } 626 631 return sys_path; 632 #else 633 return def_path; 634 #endif 627 635 } 628 636 … … 1009 1017 optptr = NULL; 1010 1018 /* and getopt */ 1019 #if defined(__FreeBSD__) || defined(__EMX__) || defined(__APPLE__) 1011 1020 optreset = 1; 1012 1021 optind = 1; 1022 #else 1023 optind = 0; /* init */ 1024 #endif 1025 1013 1026 exitstatus = cmdentry.u.bltin(argc, argv); 1014 1027 } else {
Note:
See TracChangeset
for help on using the changeset viewer.