- Timestamp:
- Dec 18, 2005, 5:30:55 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gmake/kmkbuiltin/install.c
r371 r374 51 51 #ifdef USE_MMAP 52 52 #include <sys/mman.h> 53 #endif 53 #endif 54 54 #include <sys/mount.h> 55 55 #include <sys/wait.h> 56 56 #include <sys/time.h> 57 #else58 #include <process.h>59 57 #endif 60 58 #include <sys/stat.h> … … 68 66 #include <paths.h> 69 67 #include <pwd.h> 70 #endif 68 #endif 71 69 #include <stdio.h> 72 70 #include <stdlib.h> … … 77 75 #else 78 76 #include "mscfakes.h" 79 #endif 77 #endif 78 #if defined(__EMX__) || defined(_MSC_VER) 79 # include <process.h> 80 #endif 80 81 81 82 extern void * setmode(const char *p); … … 84 85 #ifndef __unused 85 86 # define __unused 86 #endif 87 #endif 87 88 88 89 #ifndef MAXBSIZE 89 90 # define MAXBSIZE 16384 90 #endif 91 #endif 91 92 92 93 /* Bootstrap aid - this doesn't exist in most older releases */ … … 108 109 #ifndef EFTYPE 109 110 # define EFTYPE EINVAL 110 #endif 111 #endif 111 112 112 113 static gid_t gid; … … 126 127 #ifdef USE_MMAP 127 128 static int trymmap(int); 128 #endif 129 #endif 129 130 static int usage(void); 130 131 … … 229 230 gid = gp->gr_gid; 230 231 else 231 #endif 232 #endif 232 233 { 233 234 gid = (gid_t)numeric_id(group, "group"); … … 244 245 uid = pp->pw_uid; 245 246 else 246 #endif 247 #endif 247 248 { 248 249 uid = (uid_t)numeric_id(owner, "user"); … … 335 336 336 337 /* If try to install NULL file to a directory, fails. */ 337 if (flags & DIRECTORY 338 if (flags & DIRECTORY 338 339 #if defined(__EMX__) || defined(_MSC_VER) 339 340 || ( stricmp(from_name, _PATH_DEVNULL) … … 341 342 #ifdef __EMX__ 342 343 && stricmp(from_name, "/dev/nul") 343 #endif 344 #endif 344 345 ) 345 346 #else … … 427 428 428 429 if (dostrip) { 429 #if defined(__EMX__) || defined(_MSC_VER) 430 #if defined(__EMX__) || defined(_MSC_VER) 430 431 /* close before we strip. */ 431 432 close(to_fd); 432 433 to_fd = -1; 433 #endif 434 #endif 434 435 rc = strip(tempcopy ? tempfile : to_name); 435 436 if (rc) … … 440 441 * that does not work in-place -- like GNU binutils strip. 441 442 */ 442 #if !defined(__EMX__) && !defined(_MSC_VER) 443 #if !defined(__EMX__) && !defined(_MSC_VER) 443 444 close(to_fd); 444 #endif 445 #endif 445 446 to_fd = open(tempcopy ? tempfile : to_name, O_RDONLY | O_BINARY, 0); 446 447 if (to_fd < 0) { … … 484 485 tvb[1].tv_usec = 0; 485 486 (void)utimes(tempfile, tvb); 486 } else 487 } else 487 488 #endif 488 489 { … … 866 867 } 867 868 } 868 #endif 869 #endif 869 870 } 870 871 … … 908 909 * print a usage message and die 909 910 */ 910 static int 911 static int 911 912 usage() 912 913 { … … 943 944 return (0); 944 945 } 945 #endif 946 #endif
Note:
See TracChangeset
for help on using the changeset viewer.