Ignore:
Timestamp:
Nov 26, 2006, 2:46:21 PM (19 years ago)
Author:
bird
Message:

MSC hacking.

Location:
trunk/src/ash/win
Files:
1 added
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/ash/win/mscfakes.h

    r630 r632  
    3131#include <direct.h>
    3232#include <time.h>
     33#include <fcntl.h>
     34#include <limits.h>
    3335#undef setmode
    34 #include "getopt.h"
     36//#include "getopt.h"
     37
     38#if !defined(__GNUC__) && !defined(__attribute__)
     39#define __attribute__(a)
     40#endif
     41
     42typedef int pid_t;
    3543
    3644#define S_ISDIR(m)  (((m) & _S_IFMT) == _S_IFDIR)
     
    115123#define mkfifo(path, mode) -1
    116124#define mknod(path, mode, devno) -1
     125#define pipe(v) _pipe(v,0,0)
    117126int mkstemp(char *temp);
    118127#define readlink(link, buf, size) -1
    119128#define reallocf(old, size) realloc(old, size)
     129#define strcasecmp stricmp
     130#define strncasecmp strnicmp
    120131#if _MSC_VER < 1400
    121132int snprintf(char *buf, size_t size, const char *fmt, ...);
     
    127138int utimes(const char *pszPath, const struct timeval *paTimes);
    128139int writev(int fd, const struct iovec *vector, int count);
     140#define F_DUPFD 0
     141#define F_GETFD 1
     142#define F_SETFD 2
     143#define F_GETFL 3
     144#define F_SETFL 4
     145#define FD_CLOEXEC 1
     146#define O_NONBLOCK 0 /// @todo
     147#define EWOULDBLOCK 512
     148int fcntl (int, int, ...);
     149
     150/* signal hacks */
     151typedef struct sigset
     152{   
     153    unsigned long __bitmap[1];
     154} sigset_t;
     155int     sigprocmask(int, const sigset_t *, sigset_t *);
     156#define SIG_BLOCK           1
     157#define SIG_UNBLOCK         2
     158#define SIG_SETMASK         3
     159
     160#define SIGTTIN 0
     161#define SIGTSTP 0
     162#define SIGTTOU 0
     163#define SIGCONT 0
     164#define SIGPIPE 0
     165#define SIGQUIT 0
     166#define SIGHUP 0
     167#ifndef NSIG
     168#define NSIG 32
     169#endif
     170extern const char *const sys_siglist[NSIG];
     171
     172int     kill(pid_t, int);
     173int     sigaction(int, const struct sigaction *, struct sigaction *);
     174//int   sigaddset(sigset_t *, int);
     175//int   sigdelset(sigset_t *, int);
     176int     sigemptyset(sigset_t *);
     177//int   sigfillset(sigset_t *);
     178//int   sigismember(const sigset_t *, int);
     179//int   sigpending(sigset_t *);
     180//int   sigsuspend(const sigset_t *);
     181//int   sigwait(const sigset_t *, int *);
    129182
    130183#endif /* _MSC_VER */
Note: See TracChangeset for help on using the changeset viewer.