convert-from-bsd-to-posix-string-and-memory-functions-20010807
[openafs.git] / src / config / param.i386_win95.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 #ifndef AFS_PARAM_H
11 #define AFS_PARAM_H
12
13
14 #define AFS_NT40_ENV        1
15 #define AFSLITTLE_ENDIAN    1
16 #define AFS_64BIT_IOPS_ENV  1
17 #define AFS_NAMEI_ENV       1   /* User space interface to file system */
18 #define AFS_HAVE_STATVFS    0   /* System doesn't support statvfs */
19 #define AFS_WIN95_ENV       1
20
21 #include <afs/afs_sysnames.h>
22 #define SYS_NAME_ID     SYS_NAME_ID_i386_win95
23
24 #include <stdlib.h>
25 #include <string.h>
26 #include <stddef.h>
27
28 /*
29  * NT makes size_t a typedef for unsigned int (e.g. in <stddef.h>)
30  * and has no typedef for ssize_t (a signed size_t).
31  * So, we make our own.
32  */
33 typedef int ssize_t;
34
35 /* these macros define Unix-style functions missing in  VC++5.0/NT4.0 */
36 #define MAXPATHLEN _MAX_PATH
37
38 #if 0
39 #define memset(A, 0, S) memset((void*)(A), 0, (size_t)(S))
40 #define memcpy(B, A, S) memcpy((void*)(B), (void*)(A), (size_t)(S))
41 /* There is a minor syntactic difference between memcmp and bcmp... */
42 #define memcmp(A, B, S) (memcmp((void*)(A), (void*)(B), (size_t)(S)) ? 1 : 0)
43 #define strchr(s, c)             strchr(s, c)
44 #define strrchr(s, c)            strrchr(s, c)
45 #endif
46 #define strcasecmp(s1,s2)       _stricmp(s1,s2) 
47 #define strncasecmp(s1,s2,n)    _strnicmp(s1,s2,n)
48 #define sleep(seconds)          Sleep((seconds) * 1000)
49 #define fsync(fileno)           _commit(fileno)
50 #define ftruncate(fd, size)     _chsize((fd), (long)(size))
51 #define strtoll(str, cp, base)  strtoi64((str), (cp), (base))
52 #define strtoull(str, cp, base) strtoui64((str), (cp), (base))
53
54 #define random()                rand()
55 #define srandom(a)              srand(a)
56
57 #define popen(cmd, mode)        _popen((cmd), (mode))
58 #define pclose(stream)          _pclose(stream)
59 typedef char * caddr_t;
60
61 #define pipe(fdp)               _pipe(fdp, 4096, _O_BINARY)
62 #endif /* AFS_PARAM_H */