Changeset 1204 for trunk/src


Ignore:
Timestamp:
Oct 7, 2007, 4:19:01 PM (18 years ago)
Author:
bird
Message:

Made miscbltin.c compile.

Location:
trunk/src/kash
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/Makefile.kmk

    r1203 r1204  
    4747        exec.c \
    4848        expand.c \
     49        miscbltin.c \
    4950        \
    5051        jobs.c \
    51         miscbltin.c \
    5252        parser.c \
    5353        redir.c \
  • trunk/src/kash/miscbltin.c

    r1203 r1204  
    4848 */
    4949
    50 #include <sys/types.h>          /* quad_t */
    51 #include <sys/param.h>          /* BSD4_4 */
     50#include <sys/types.h>
    5251#include <sys/stat.h>
    5352#include <sys/time.h>
     
    5756#include <ctype.h>
    5857#include <errno.h>
     58#ifndef _MSC_VER
     59# include "mscfakes.h"
     60#endif
    5961
    6062#include "shell.h"
     
    8991
    9092int
    91 readcmd(int argc, char **argv)
     93readcmd(shinstance *psh, int argc, char **argv)
    9294{
    9395        char **ap;
     
    107109        while ((i = nextopt(psh, "p:r")) != '\0') {
    108110                if (i == 'p')
    109                         prompt = optionarg;
     111                        prompt = psh->optionarg;
    110112                else
    111113                        rflag = 1;
     
    214216
    215217int
    216 umaskcmd(int argc, char **argv)
     218umaskcmd(shinstance *psh, int argc, char **argv)
    217219{
    218220        char *ap;
     
    354356
    355357int
    356 ulimitcmd(int argc, char **argv)
     358ulimitcmd(shinstance *psh, int argc, char **argv)
    357359{
    358360        int     c;
     
    418420                        out1fmt(psh, "%-20s ", l->name);
    419421                        if (val == RLIM_INFINITY)
    420                                 out1fmt("unlimited\n");
     422                                out1fmt(psh, "unlimited\n");
    421423                        else
    422424                        {
    423425                                val /= l->factor;
    424 #ifdef BSD4_4
    425426                                out1fmt(psh, "%lld\n", (long long) val);
    426 #else
    427                                 out1fmt(psh, "%ld\n", (long) val);
    428 #endif
    429427                        }
    430428                }
     
    451449                {
    452450                        val /= l->factor;
    453 #ifdef BSD4_4
    454451                        out1fmt(psh, "%lld\n", (long long) val);
    455 #else
    456                         out1fmt(psh, "%ld\n", (long) val);
    457 #endif
    458452                }
    459453        }
  • trunk/src/kash/win/mscfakes.h

    r881 r1204  
    197197//int   sigwait(const sigset_t *, int *);
    198198int     siginterrupt(int, int);
     199#undef setmode
     200void *  setmode(const char *p);
     201mode_t  getmode(const void *bbox, mode_t omode);
    199202
    200203#endif /* _MSC_VER */
  • trunk/src/kash/win/sys/resource.h

    r819 r1204  
    101101#define RLIM_NLIMITS    12              /* number of resource limits */ /* bird: was 11 */
    102102
    103 #define RLIM_INFINITY   (((rlim_t)1 << 63) - 1)
     103#define RLIM_INFINITY   (0x7fffffffffffffffLL)
    104104/* XXX Missing: RLIM_SAVED_MAX, RLIM_SAVED_CUR */
    105105
     
    135135/* XXX 2nd arg to [gs]etpriority() should be an id_t */
    136136//int   getpriority(int, /*int*/ id_t);         /* bird: SuS uses id_t */
    137 //int   getrlimit(int, struct rlimit *);
     137int     getrlimit(int, struct rlimit *);
    138138int     getrusage(int, struct rusage *);
    139139//int   setpriority(int, /*int*/ id_t, int);    /* bird: SuS uses id_t */
Note: See TracChangeset for help on using the changeset viewer.