2 * Copyright 2000, International Business Machines Corporation and others.
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
10 #ifndef _PARAM_NT35_H_
11 #define _PARAM_NT35_H_
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 */
20 #include <afs/afs_sysnames.h>
21 #define SYS_NAME_ID SYS_NAME_ID_i386_nt35
28 * NT makes size_t a typedef for unsigned int (e.g. in <stddef.h>)
29 * and has no typedef for ssize_t (a signed size_t).
30 * So, we make our own.
34 /* these macros define Unix-style functions missing in VC++5.0/NT4.0 */
35 #define MAXPATHLEN _MAX_PATH
37 #define bzero(A, S) memset((void*)(A), 0, (size_t)(S))
38 #define bcopy(A, B, S) memcpy((void*)(B), (void*)(A), (size_t)(S))
39 /* There is a minor syntactic difference between memcmp and bcmp... */
40 #define bcmp(A,B,S) (memcmp((void*)(A), (void*)(B), (size_t)(S)) ? 1 : 0)
41 #define strcasecmp(s1,s2) _stricmp(s1,s2)
42 #define strncasecmp(s1,s2,n) _strnicmp(s1,s2,n)
43 #define index(s, c) strchr(s, c)
44 #define rindex(s, c) strrchr(s, c)
45 #define sleep(seconds) Sleep((seconds) * 1000)
46 #define fsync(fileno) _commit(fileno)
47 #define ftruncate(fd, size) _chsize((fd), (long)(size))
48 #define strtoll(str, cp, base) strtoi64((str), (cp), (base))
49 #define strtoull(str, cp, base) strtoui64((str), (cp), (base))
51 #define random() rand()
52 #define srandom(a) srand(a)
54 #define popen(cmd, mode) _popen((cmd), (mode))
55 #define pclose(stream) _pclose(stream)
56 typedef char * caddr_t;
58 #define pipe(fdp) _pipe(fdp, 4096, _O_BINARY)
59 #endif /* _PARAM_NT35_H_ */