VirtualBox

Changeset 616 in kBuild for trunk/src/gmake/kmkbuiltin/setmode.c


Ignore:
Timestamp:
Nov 26, 2006 6:40:55 AM (18 years ago)
Author:
bird
Message:

Ported the new setmode to MSC.

File:
1 edited

Legend:

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

    r615 r616  
    3333 */
    3434
    35 #include <sys/cdefs.h>
     35/*#include <sys/cdefs.h>*/
    3636#if defined(LIBC_SCCS) && !defined(lint)
    3737#if 0
     
    4242#endif /* LIBC_SCCS and not lint */
    4343
    44 #include "namespace.h"
     44/*#include "namespace.h"*/
    4545#include <sys/types.h>
    4646#include <sys/stat.h>
     
    5151#include <signal.h>
    5252#include <stdlib.h>
     53#ifndef _MSC_VER
    5354#include <unistd.h>
     55#else
     56#include "mscfakes.h"
     57#endif
    5458
    5559#ifdef SETMODE_DEBUG
     
    5761#endif
    5862
    59 #ifdef __weak_alias
     63/*#ifdef __weak_alias
    6064__weak_alias(getmode,_getmode)
    6165__weak_alias(setmode,_setmode)
    62 #endif
     66#endif*/
    6367
    6468#define SET_LEN 6               /* initial # of bitcmd struct to malloc */
     
    7781#define CMD2_UBITS      0x10
    7882
    79 static BITCMD   *addcmd __P((BITCMD *, int, int, int, u_int));
    80 static void      compress_mode __P((BITCMD *));
     83static BITCMD   *addcmd(BITCMD *, int, int, int, u_int);
     84static void      compress_mode(BITCMD *);
    8185#ifdef SETMODE_DEBUG
    82 static void      dumpmode __P((BITCMD *));
    83 #endif
     86static void      dumpmode(BITCMD *);
     87#endif
     88
     89#ifndef _DIAGASSERT
     90# define _DIAGASSERT assert
     91#endif
     92
     93#ifndef S_ISTXT
     94# ifdef S_ISVTX
     95#  define S_ISTXT S_ISVTX
     96# else
     97#  define S_ISTXT 0
     98# endif
     99#endif /* !S_ISTXT */
    84100
    85101/*
     
    186202        char op, *ep;
    187203        BITCMD *set, *saveset, *endset;
     204#ifndef _MSC_VER
    188205        sigset_t signset, sigoset;
     206#endif
    189207        mode_t mask;
    190208        int equalopdone = 0;    /* pacify gcc */
     
    200218         * as best we can.
    201219         */
     220#ifndef _MSC_VER
    202221        sigfillset(&signset);
    203222        (void)sigprocmask(SIG_BLOCK, &signset, &sigoset);
     223#endif
    204224        (void)umask(mask = umask(0));
    205225        mask = ~mask;
     226#ifndef _MSC_VER
    206227        (void)sigprocmask(SIG_SETMASK, &sigoset, NULL);
     228#endif
    207229
    208230        setlen = SET_LEN + 2;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette