* libc/posix/execvp.c: Remove obsolete CYGWIN32 considerations throughout.
* signal.h: Change comment to reflect __CYGWIN__ rather than __CYGWIN32__. * popen.c (popen): Use __CYGWIN_ rather than __CYGWIN32__. * system.c (_system_r): Ditto.
This commit is contained in:
		| @@ -1,3 +1,11 @@ | |||||||
|  | 2001-10-22  Christopher Faylor  <cgf@redhat.com> | ||||||
|  |  | ||||||
|  | 	* libc/posix/execvp.c: Remove obsolete CYGWIN32 considerations | ||||||
|  | 	throughout. | ||||||
|  | 	* signal.h: Change comment to reflect __CYGWIN__ rather than __CYGWIN32__. | ||||||
|  | 	* popen.c (popen): Use __CYGWIN_ rather than __CYGWIN32__. | ||||||
|  | 	* system.c (_system_r): Ditto. | ||||||
|  |  | ||||||
| 2001-10-17  Corinna Vinschen  <corinna@vinschen.de> | 2001-10-17  Corinna Vinschen  <corinna@vinschen.de> | ||||||
|  |  | ||||||
| 	* libc/include/sys/unistd.h: Add prototype for fchdir() when | 	* libc/include/sys/unistd.h: Add prototype for fchdir() when | ||||||
|   | |||||||
| @@ -178,7 +178,7 @@ int _EXFUN(sigqueue, (pid_t pid, int signo, const union sigval value)); | |||||||
|  |  | ||||||
| #endif /* defined(_POSIX_REALTIME_SIGNALS) */ | #endif /* defined(_POSIX_REALTIME_SIGNALS) */ | ||||||
|  |  | ||||||
| #endif /* defined(__CYGWIN32__) || defined(__rtems__) */ | #endif /* defined(__CYGWIN__) || defined(__rtems__) */ | ||||||
|  |  | ||||||
| /* #endif __STRICT_ANSI__ */ | /* #endif __STRICT_ANSI__ */ | ||||||
|  |  | ||||||
|   | |||||||
| @@ -11,12 +11,7 @@ | |||||||
| #include <errno.h> | #include <errno.h> | ||||||
| #include <ctype.h> | #include <ctype.h> | ||||||
|  |  | ||||||
| #ifdef __CYGWIN32__ |  | ||||||
| static char path_delim; |  | ||||||
| #define PATH_DELIM path_delim |  | ||||||
| #else |  | ||||||
| #define PATH_DELIM ':' | #define PATH_DELIM ':' | ||||||
| #endif |  | ||||||
|  |  | ||||||
| /* | /* | ||||||
|  * Copy string, until c or <nul> is encountered. |  * Copy string, until c or <nul> is encountered. | ||||||
| @@ -52,25 +47,9 @@ _DEFUN (execvp, (file, argv), | |||||||
|  |  | ||||||
|   /* If FILE contains a directory, don't search $PATH.  */ |   /* If FILE contains a directory, don't search $PATH.  */ | ||||||
|   if (strchr (file, '/') |   if (strchr (file, '/') | ||||||
| #ifdef __CYGWIN32__ |  | ||||||
|       || strchr (file, '\\') |  | ||||||
| #endif |  | ||||||
|       ) |       ) | ||||||
|     return execv (file, argv); |     return execv (file, argv); | ||||||
|  |  | ||||||
| #ifdef __CYGWIN32__ |  | ||||||
|   /* If a drive letter is passed, the path is still an absolute one. |  | ||||||
|      Technically this isn't true, but Cygwin is currently defined so |  | ||||||
|      that it is.  */ |  | ||||||
|   if ((isalpha (file[0]) && file[1] == ':') |  | ||||||
|       || file[0] == '\\') |  | ||||||
|     return execv (file, argv); |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| #ifdef __CYGWIN32__ |  | ||||||
|   path_delim = cygwin_posix_path_list_p (path) ? ':' : ';'; |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
|   while (*path) |   while (*path) | ||||||
|     { |     { | ||||||
|       strccpy (buf, path, PATH_DELIM); |       strccpy (buf, path, PATH_DELIM); | ||||||
|   | |||||||
| @@ -106,7 +106,7 @@ popen(program, type) | |||||||
| 			(void)close(pdes[1]); | 			(void)close(pdes[1]); | ||||||
| 		} | 		} | ||||||
| 		execl(_PATH_BSHELL, "sh", "-c", program, NULL); | 		execl(_PATH_BSHELL, "sh", "-c", program, NULL); | ||||||
| #ifdef __CYGWIN32__ | #ifdef __CYGWIN__ | ||||||
| 		/* On cygwin32, we may not have /bin/sh.  In that | 		/* On cygwin32, we may not have /bin/sh.  In that | ||||||
|                    case, try to find sh on PATH.  */ |                    case, try to find sh on PATH.  */ | ||||||
| 		execlp("sh", "sh", "-c", program, NULL); | 		execlp("sh", "sh", "-c", program, NULL); | ||||||
|   | |||||||
| @@ -81,7 +81,7 @@ _system_r (ptr, s) | |||||||
|      For now we always return 0 and leave it to each target to explicitly |      For now we always return 0 and leave it to each target to explicitly | ||||||
|      handle otherwise (this can always be relaxed in the future).  */ |      handle otherwise (this can always be relaxed in the future).  */ | ||||||
|  |  | ||||||
| #if defined (unix) || defined (__CYGWIN32__) | #if defined (unix) || defined (__CYGWIN__) | ||||||
|   if (s == NULL) |   if (s == NULL) | ||||||
|     return 1; |     return 1; | ||||||
|   return do_system (ptr, s); |   return do_system (ptr, s); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user