Changeset 374 for trunk/src


Ignore:
Timestamp:
Dec 18, 2005, 5:30:55 AM (20 years ago)
Author:
bird
Message:

Made it build on OS/2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gmake/kmkbuiltin/install.c

    r371 r374  
    5151#ifdef USE_MMAP
    5252#include <sys/mman.h>
    53 #endif 
     53#endif
    5454#include <sys/mount.h>
    5555#include <sys/wait.h>
    5656#include <sys/time.h>
    57 #else
    58 #include <process.h>
    5957#endif
    6058#include <sys/stat.h>
     
    6866#include <paths.h>
    6967#include <pwd.h>
    70 #endif 
     68#endif
    7169#include <stdio.h>
    7270#include <stdlib.h>
     
    7775#else
    7876#include "mscfakes.h"
    79 #endif
     77#endif
     78#if defined(__EMX__) || defined(_MSC_VER)
     79# include <process.h>
     80#endif
    8081
    8182extern void * setmode(const char *p);
     
    8485#ifndef __unused
    8586# define __unused
    86 #endif 
     87#endif
    8788
    8889#ifndef MAXBSIZE
    8990# define MAXBSIZE 16384
    90 #endif 
     91#endif
    9192
    9293/* Bootstrap aid - this doesn't exist in most older releases */
     
    108109#ifndef EFTYPE
    109110# define EFTYPE EINVAL
    110 #endif 
     111#endif
    111112
    112113static gid_t gid;
     
    126127#ifdef USE_MMAP
    127128static int      trymmap(int);
    128 #endif 
     129#endif
    129130static int      usage(void);
    130131
     
    229230                        gid = gp->gr_gid;
    230231                else
    231 #endif 
     232#endif
    232233                {
    233234                        gid = (gid_t)numeric_id(group, "group");
     
    244245                        uid = pp->pw_uid;
    245246                else
    246 #endif 
     247#endif
    247248                {
    248249                        uid = (uid_t)numeric_id(owner, "user");
     
    335336
    336337        /* If try to install NULL file to a directory, fails. */
    337         if (flags & DIRECTORY 
     338        if (flags & DIRECTORY
    338339#if defined(__EMX__) || defined(_MSC_VER)
    339340            || (   stricmp(from_name, _PATH_DEVNULL)
     
    341342#ifdef __EMX__
    342343                && stricmp(from_name, "/dev/nul")
    343 #endif 
     344#endif
    344345               )
    345346#else
     
    427428
    428429        if (dostrip) {
    429 #if defined(__EMX__) || defined(_MSC_VER) 
     430#if defined(__EMX__) || defined(_MSC_VER)
    430431                /* close before we strip. */
    431432                close(to_fd);
    432433                to_fd = -1;
    433 #endif 
     434#endif
    434435                rc = strip(tempcopy ? tempfile : to_name);
    435436                if (rc)
     
    440441                 * that does not work in-place -- like GNU binutils strip.
    441442                 */
    442 #if !defined(__EMX__) && !defined(_MSC_VER) 
     443#if !defined(__EMX__) && !defined(_MSC_VER)
    443444                close(to_fd);
    444 #endif 
     445#endif
    445446                to_fd = open(tempcopy ? tempfile : to_name, O_RDONLY | O_BINARY, 0);
    446447                if (to_fd < 0) {
     
    484485                                tvb[1].tv_usec = 0;
    485486                                (void)utimes(tempfile, tvb);
    486                         } else 
     487                        } else
    487488#endif
    488489                        {
     
    866867                }
    867868        }
    868 #endif 
     869#endif
    869870}
    870871
     
    908909 *      print a usage message and die
    909910 */
    910 static int 
     911static int
    911912usage()
    912913{
     
    943944        return (0);
    944945}
    945 #endif 
     946#endif
Note: See TracChangeset for help on using the changeset viewer.