2
* sys.h -- 1) very system dependent functions and macros
3
* 2) include for <unistd.h> or <io.h>
4
* 3) defines for u8, u16, u32
6
* sys.h is a part of binkd project
8
* Copyright (C) 1996 Dima Maloff, 5047/13
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version. See COPYING.
17
* $Id: sys.h,v 2.0 2001/01/10 12:12:39 gul Exp $
20
* Revision 2.0 2001/01/10 12:12:39 gul
21
* Binkd is under CVS again
23
* Revision 1.3 1997/10/23 03:34:15 mff
24
* many, many changes (forget to ci a version or two)
26
* Revision 1.1 1996/12/14 07:13:04 mff
59
#define PID() gettid()
61
#define PID() ((int)(0xffff & GetCurrentThreadId()))
64
#define PID() getpid()
66
#define PID() ((int)gettid())
70
#define PID() ((int)getpid())
77
#if defined(UNIX) || defined(AMIGA)
78
/* To be sure rename will fail if the target exists */
79
extern int o_rename (const char *from, const char *to);
80
#define RENAME(f,t) o_rename(f,t)
82
#define RENAME(f,t) rename(f,t)
86
#define sleep(a) Sleep(a*1000)
87
#define _beginthread(a,b,c,d) _beginthread(a,c,d)
91
void sleep(unsigned seconds);
92
#define _beginthread(a,b,c,d) a(d)
94
//_beginthread(void (* __thread)(void *),void * z,unsigned stk,void *arg);
99
#define ENOTDIR EBADTYPE
102
typedef unsigned char u8;
103
typedef unsigned short u16;
104
typedef unsigned long u32;
107
* Get free space in a directory
109
unsigned long getfree (char *path);
112
* Set up break handler, set up exit list if needed
114
int set_break_handlers (void);
117
* Runs a new thread or forks
119
int branch (void (*) (void *), void *, size_t);
122
* From breaksig.c -- binkd runs this from exitlist or
123
* from signal handler (Under NT)
125
void exitfunc (void);