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