]> git.sur5r.net Git - openldap/blob - libraries/msdos/msdos.h
Update files in preparation for 2.0-alpha
[openldap] / libraries / msdos / msdos.h
1 /* ldapmsdos.h */
2 /*
3  * Copyright (c) 1992 Regents of the University of Michigan.
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms are permitted
7  * provided that this notice is preserved and that due credit is given
8  * to the University of Michigan at Ann Arbor. The name of the University
9  * may not be used to endorse or promote products derived from this
10  * software without specific prior written permission. This software
11  * is provided ``as is'' without express or implied warranty.
12  */
13
14 #ifdef PCNFS
15 #include <sys/tk_types.h>
16 #include <sys/socket.h>
17 #include <sys/nfs_time.h>
18 #endif /* PCNFS */
19
20 #ifdef NCSA
21 #define NCSADOMAINFIX   1       /* see README.dos */
22
23 typedef unsigned short us;
24 typedef unsigned long ul;
25 #define ntohs(i) ((us)( (((us)i & 0xff) << 8)  + (((us)i & 0xff00) >> 8) ))
26 #define ntohl(i) ((ul)( (((ul)i & 0xff) << 24) + (((ul)i & 0xff00) << 8) + \
27                         (((ul)i & 0xff0000) >> 8) +  \
28                         (((ul)i & 0xff000000) >> 24) ))
29 #define htons(i) ntohs(i)
30 #define htonl(i) ntohl(i)
31
32 typedef unsigned long ip_addr;
33 typedef unsigned long u_long;
34 typedef unsigned short u_short;
35 typedef unsigned char u_char;
36
37 extern int ncsainit( void );
38 extern int ncsaopen( unsigned long addr, short port );
39 extern int nread(int connection_id, char *buff, int buff_size);
40 #endif /* NCSA */
41
42 #if defined( PCNFS ) || defined( NCSA )
43 #include <malloc.h>
44
45 struct timeval {
46         long tv_sec;
47         long tv_usec;
48 };
49 #endif /* PCNFS */
50
51 #define strcasecmp(a,b) stricmp(a,b)
52 #define strncasecmp(a,b,len) strnicmp(a,b,len)