windows: native versions of ih_pread and ih_pwrite
[openafs.git] / src / config / afsconfig-windows.h
index 9237e56..d23a8c0 100644 (file)
 /* Define as the return type of signal handlers (int or void).  */
 #undef RETSIGTYPE
 
+
+/* The size of `long', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
 /* Define to `unsigned' if <sys/types.h> doesn't define.  */
-//#undef size_t unsigned int 
+//#undef size_t unsigned int
 
 /* Define if you have the ANSI C header files.  */
 #undef STDC_HEADERS
 /* Define if you have the connect function.  */
 #undef HAVE_CONNECT
 
-/* Define if you have the getdtablesize function.  */
-#undef HAVE_GETDTABLESIZE
-
 /* Define if you have the gethostbyname function.  */
 #define HAVE_GETHOSTBYNAME
 
-/* Define if you have the random function.  */
-#define HAVE_RANDOM
-
-/* Define if you have the re_comp function.  */
-#undef HAVE_RE_COMP
-
-/* Define if you have the re_exec function.  */
-#undef HAVE_RE_EXEC
-
 /* Define if you have the res_search function.  */
 #undef HAVE_RES_SEARCH
 
 /* Define if you have the socket function.  */
 #define HAVE_SOCKET
 
-/* Define if you have the srandom function.  */
-#undef HAVE_SRANDOM
-
-/* Define if you have the utimes function.  */
-#define HAVE_UTIMES
-
 /* Define if you have the <direct.h> header file.  */
 #undef HAVE_DIRECT_H
 
 /* Define if you have the <dirent.h> header file.  */
-#undef HAVE_DIRENT_H
+#define HAVE_DIRENT_H 1
 
 /* Define if you have the <fcntl.h> header file.  */
 #define HAVE_FCNTL_H
 
-/* Define if you have the <io.h> header file.  */
-#define HAVE_IO_H
-
-/* Define if you have the <malloc.h> header file.  */
-#define HAVE_MALLOC_H
-
 /* Define if you have the <mntent.h> header file.  */
 #undef HAVE_MNTENT_H
 
 /* Define if you have the <security/pam_modules.h> header file.  */
 #undef HAVE_SECURITY_PAM_MODULES_H
 
-/* Define if you have the <siad.h> header file.  */
-#undef HAVE_SIAD_H
-
 /* Define if you have the <signal.h> header file.  */
 #define HAVE_SIGNAL_H
 
 /* Define if you have the <unistd.h> header file.  */
 #undef HAVE_UNISTD_H
 
-/* Define if you have the <usersec.h> header file.  */
-#undef HAVE_USERSEC_H
-
 /* Define if you have the <windows.h> header file.  */
 #define HAVE_WINDOWS_H
 
 /* Define if you have the <winsock2.h> header file.  */
 #define HAVE_WINSOCK2_H
 
+/* Define if you have vsnprintf */
+#define HAVE_VSNPRINTF 1
+
+/* Define if you have snprintf */
+#define HAVE_SNPRINTF 1
+
 /* Name of package */
 #undef PACKAGE
 
 /* define if struct ufsvfs has vfs_dqrwlock */
 #undef HAVE_VFS_DQRWLOCK
 
+/* define if you have pread() and pwrite() */
+#define HAVE_PIO 1
+
 #undef PACKAGE
 #undef VERSION
-#define RCSID(msg) \
-static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
 
 #undef HAVE_CONNECT
 //#undef HAVE_GETHOSTBYNAME
 #undef HAVE_RES_SEARCH
 //#undef HAVE_SOCKET
 
-#if ENDIANESS_IN_SYS_PARAM_H
+#ifdef ENDIANESS_IN_SYS_PARAM_H
 # ifndef KERNEL
 #  include <sys/types.h>
 #  include <sys/param.h>
@@ -204,9 +184,7 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
 # endif
 #endif
 
-#undef AFS_AFSDB_ENV
-#undef AFS_NAMEI_ENV
-#undef BOS_RESTRICTED_MODE
+#define AFS_NAMEI_ENV 1
 
 #undef FAST_RESTART
 #undef BITMAP_LATER
@@ -221,3 +199,16 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
 #if defined(ENABLE_REDHAT_BUILDSYS) && defined(KERNEL) && defined(REDHAT_FIX)
 #include "redhat-fix.h"
 #endif
+
+/* Windows does not provide socklen_t prior to WDK 6.0 */
+#undef HAVE_SOCKLEN_T
+
+#if (_MSC_VER < 1400)
+typedef int errno_t;
+#endif
+
+/* Windows only supports BSD variants */
+#define S_IRUSR _S_IREAD
+#define S_IWUSR _S_IWRITE
+
+#define HAVE_CONIO_H 1