You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@hyperreal.org on 1999/12/09 22:01:14 UTC
cvs commit: apache-2.0/src/lib/apr/time/win32 atime.h time.c
rbb 99/12/09 13:01:10
Modified: src/lib/apr/file_io/win32 dir.c fileio.h filestat.c open.c
readwrite.c
src/lib/apr/include apr_errno.h apr_general.h apr_win.h
src/lib/apr/lib apr_cpystrn.c apr_getpass.c apr_pools.c
apr_slack.c apr_snprintf.c apr_tables.c
src/lib/apr/misc/win32 names.c start.c
src/lib/apr/threadproc/win32 thread.c
src/lib/apr/time/win32 atime.h time.c
Added: src/lib/apr/include apr_winconfig.h
Log:
Make APR compile on Windows again. The changes that I introduced for
autoconf had the undesirable effect of killing the Windows build.
This still generates a few warnings, but at least it provides us with
working code.
Revision Changes Path
1.8 +1 -1 apache-2.0/src/lib/apr/file_io/win32/dir.c
Index: dir.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/win32/dir.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- dir.c 1999/11/05 21:26:07 1.7
+++ dir.c 1999/12/09 21:00:05 1.8
@@ -65,7 +65,7 @@
#include <sys/stat.h>
#endif
#ifdef WIN32
-#include "apr_win.h"
+#include "apr_winconfig.h"
#include <windows.h>
#endif
#include "fileio.h"
1.3 +4 -1 apache-2.0/src/lib/apr/file_io/win32/fileio.h
Index: fileio.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/win32/fileio.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- fileio.h 1999/09/24 18:49:02 1.2
+++ fileio.h 1999/12/09 21:00:06 1.3
@@ -71,10 +71,13 @@
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
#ifdef HAVE_UIO_H
#include <sys/uio.h>
#endif
-#include "apr_win.h"
+#include "apr_winconfig.h"
#include "apr_pools.h"
#include "apr_general.h"
#include "apr_file_io.h"
1.3 +1 -1 apache-2.0/src/lib/apr/file_io/win32/filestat.c
Index: filestat.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/win32/filestat.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- filestat.c 1999/09/24 18:49:02 1.2
+++ filestat.c 1999/12/09 21:00:08 1.3
@@ -53,7 +53,7 @@
*
*/
-#include "apr_win.h"
+#include "apr_winconfig.h"
#include "fileio.h"
#include "apr_file_io.h"
#include "apr_general.h"
1.12 +1 -1 apache-2.0/src/lib/apr/file_io/win32/open.c
Index: open.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/win32/open.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- open.c 1999/11/05 21:26:09 1.11
+++ open.c 1999/12/09 21:00:09 1.12
@@ -53,7 +53,7 @@
*
*/
#ifdef WIN32
-#include "apr_win.h"
+#include "apr_winconfig.h"
#endif
#include "fileio.h"
#include "apr_file_io.h"
1.9 +1 -0 apache-2.0/src/lib/apr/file_io/win32/readwrite.c
Index: readwrite.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/win32/readwrite.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- readwrite.c 1999/11/05 21:16:18 1.8
+++ readwrite.c 1999/12/09 21:00:10 1.9
@@ -58,6 +58,7 @@
#include "apr_general.h"
#include "apr_lib.h"
#include "apr_errno.h"
+#include <malloc.h>
#include <windows.h>
#define GetFilePointer(hfile) SetFilePointer(hfile,0,NULL, FILE_CURRENT)
1.11 +4 -0 apache-2.0/src/lib/apr/include/apr_errno.h
Index: apr_errno.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_errno.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- apr_errno.h 1999/12/01 18:39:12 1.10
+++ apr_errno.h 1999/12/09 21:00:20 1.11
@@ -54,7 +54,11 @@
*/
#include <errno.h>
+#if WIN32
+#include "apr_win.h"
+#else
#include "apr.h"
+#endif
#ifndef APR_ERRNO_H
#define APR_ERRNO_H
1.13 +3 -3 apache-2.0/src/lib/apr/include/apr_general.h
Index: apr_general.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_general.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- apr_general.h 1999/12/01 20:35:24 1.12
+++ apr_general.h 1999/12/09 21:00:22 1.13
@@ -53,10 +53,10 @@
*
*/
-#include "apr.h"
-
#ifdef WIN32
-#include <windows.h>
+#include "apr_win.h"
+#else
+#include "apr.h"
#endif
#if APR_HAVE_STDIO_H
1.7 +57 -85 apache-2.0/src/lib/apr/include/apr_win.h
Index: apr_win.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_win.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- apr_win.h 1999/11/11 15:10:06 1.6
+++ apr_win.h 1999/12/09 21:00:25 1.7
@@ -54,9 +54,9 @@
*/
#ifdef WIN32
+#ifndef APRWIN_H
+#define APRWIN_H
-#ifndef APR_WIN_H
-#define APR_WIN_H
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
@@ -70,97 +70,69 @@
#include <windows.h>
#include <winsock2.h>
#include <mswsock.h>
-#include <sys\types.h>
+#include <sys/types.h>
#include <stddef.h>
#include <stdio.h>
#include <time.h>
-/* Use this section to define all of the HAVE_FOO_H
- * that are required to build properly.
- */
-#define HAVE_CONIO_H 1
+#define ap_inline
+#define __attribute__(__x)
+#define ENUM_BITFIELD(e,n,w) signed int n : w
+
+#define APR_HAVE_ERRNO_H 1
+#define APR_HAVE_DIRENT_H 0
+#define APR_HAVE_FCNTL_H 0
+#define APR_HAVE_NETINET_IN_H 0
+#define APR_HAVE_PTHREAD_H 0
+#define APR_HAVE_STDARG_H 1
+#define APR_HAVE_STDIO_H 1
+#define APR_HAVE_SYS_TYPES_H 1
+#define APR_HAVE_SYS_UIO_H 0
+
+#define APR_USE_FLOCK_SERIALIZE 0
+#define APR_USE_SYSVSEM_SERIALIZE 0
+#define APR_USE_FCNTL_SERIALIZE 0
+#define APR_USE_PROC_PTHREAD_SERIALIZE 0
+#define APR_USE_PTHREAD_SERIALIZE 0
+
+#if APR_HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
-typedef enum {APR_WIN_NT, APR_WIN_95, APR_WIN_98} ap_oslevel_e;
+/* APR Feature Macros */
+#define APR_HAS_THREADS 1
+#define APR_HAS_SENDFILE 0
+#define APR_HAS_MMAP 0
+
+/* Typedefs that APR needs. */
+
+typedef short ap_int16_t;
+typedef unsigned short ap_uint16_t;
+
+typedef int ap_int32_t;
+typedef unsigned int ap_uint32_t;
+
+typedef __int64 ap_int64_t;
+typedef unsigned __int64 ap_uint64_t;
+
+typedef int ap_size_t;
+typedef int ap_ssize_t;
+typedef _off_t ap_off_t;
+typedef int pid_t;
+
+/* Definitions that APR programs need to work properly. */
+
+#define API_THREAD_FUNC __stdcall
+#define API_EXPORT(type) type
+#define API_EXPORT_NONSTD(type) type
+#define API_VAR_IMPORT extern _declspec(dllimport)
-#define SIGHUP 1
-/* 2 is used for SIGINT on windows */
-#define SIGQUIT 3
-/* 4 is used for SIGILL on windows */
-#define SIGTRAP 5
-#define SIGIOT 6
-#define SIGBUS 7
-/* 8 is used for SIGFPE on windows */
-#define SIGKILL 9
-#define SIGUSR1 10
-/* 11 is used for SIGSEGV on windows */
-#define SIGUSR2 12
-#define SIGPIPE 13
-#define SIGALRM 14
-/* 15 is used for SIGTERM on windows */
-#define SIGSTKFLT 16
-#define SIGCHLD 17
-#define SIGCONT 18
-#define SIGSTOP 19
-#define SIGTSTP 20
-/* 21 is used for SIGBREAK on windows */
-/* 22 is used for SIGABRT on windows */
-#define SIGTTIN 23
-#define SIGTTOU 24
-#define SIGURG 25
-#define SIGXCPU 26
-#define SIGXFSZ 27
-#define SIGVTALRM 28
-#define SIGPROF 29
-#define SIGWINCH 30
-#define SIGIO 31
-
-#define __attribute__(__x)
-
-#define API_EXPORT(x) x
-#define API_EXPORT_NONSTD(x) x
-#define API_THREAD_FUNC __stdcall
-#define API_VAR_IMPORT extern _declspec(dllimport)
-
-/* APR COMPATABILITY FUNCTIONS
- * This section should be used to define functions and
- * macros which are need to make Windows features look
- * like POSIX features.
- */
+
+
/* struct iovec is needed to emulate Unix writev */
struct iovec {
char* iov_base;
int iov_len;
};
-
-typedef _off_t off_t;
-typedef int ssize_t;
-typedef int pid_t;
-typedef void (Sigfunc)(int);
-
-#define strcasecmp(s1, s2) stricmp(s1, s2)
-#define sleep(t) Sleep(t * 1000)
-
-
-/* APR FEATURE MACROS.
- * This section should be used to define feature macros
- * that the windows port needs.
- */
-#define APR_HAS_THREADS 1
-
-#define SIZEOF_SHORT 2
-#define SIZEOF_INT 4
-#define SIZEOF_LONGLONG 8
-#define SIZEOF_CHAR 1
-#define SIZEOF_SSIZE_T SIZEOF_INT
-
-/* APR WINDOWS-ONLY FUNCTIONS
- * This section should define those functions which are
- * only found in the windows version of APR.
- */
-
-time_t WinTimeToUnixTime(FILETIME *);
-unsigned __stdcall SignalHandling(void *);
-int thread_ready(void);
-
-#endif /*APR_WIN_H*/
-#endif /*WIN32*/
+#endif /* APRWIN_H */
+#endif /* WIN32 */
1.1 apache-2.0/src/lib/apr/include/apr_winconfig.h
Index: apr_winconfig.h
===================================================================
/* ====================================================================
* Copyright (c) 1999 The Apache Group. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the Apache Group
* for use in the Apache HTTP server project (http://www.apache.org/)."
*
* 4. The names "Apache Server" and "Apache Group" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the Apache Group
* for use in the Apache HTTP server project (http://www.apache.org/)."
*
* THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Group.
* For more information on the Apache Group and the Apache HTTP server
* project, please see <http://www.apache.org/>.
*
*/
#ifdef WIN32
#ifndef APR_WINCONFIG_H
#define APR_WINCONFIG_H
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef _WIN32_WINNT
/*
* Compile the server including all the Windows NT 4.0 header files by
* default.
*/
#define _WIN32_WINNT 0x0400
#endif
#include <windows.h>
#include <winsock2.h>
#include <mswsock.h>
#include <sys/types.h>
#include <stddef.h>
#include <stdio.h>
#include <time.h>
/* Use this section to define all of the HAVE_FOO_H
* that are required to build properly.
*/
#define HAVE_CONIO_H 1
#define HAVE_MALLOC_H 1
#define HAVE_STDLIB_H 1
typedef enum {APR_WIN_NT, APR_WIN_95, APR_WIN_98} ap_oslevel_e;
#define SIGHUP 1
/* 2 is used for SIGINT on windows */
#define SIGQUIT 3
/* 4 is used for SIGILL on windows */
#define SIGTRAP 5
#define SIGIOT 6
#define SIGBUS 7
/* 8 is used for SIGFPE on windows */
#define SIGKILL 9
#define SIGUSR1 10
/* 11 is used for SIGSEGV on windows */
#define SIGUSR2 12
#define SIGPIPE 13
#define SIGALRM 14
/* 15 is used for SIGTERM on windows */
#define SIGSTKFLT 16
#define SIGCHLD 17
#define SIGCONT 18
#define SIGSTOP 19
#define SIGTSTP 20
/* 21 is used for SIGBREAK on windows */
/* 22 is used for SIGABRT on windows */
#define SIGTTIN 23
#define SIGTTOU 24
#define SIGURG 25
#define SIGXCPU 26
#define SIGXFSZ 27
#define SIGVTALRM 28
#define SIGPROF 29
#define SIGWINCH 30
#define SIGIO 31
#define __attribute__(__x)
/* APR COMPATABILITY FUNCTIONS
* This section should be used to define functions and
* macros which are need to make Windows features look
* like POSIX features.
*/
typedef void (Sigfunc)(int);
#define strcasecmp(s1, s2) stricmp(s1, s2)
#define sleep(t) Sleep(t * 1000)
/* APR FEATURE MACROS.
* This section should be used to define feature macros
* that the windows port needs.
*/
#define APR_HAS_THREADS 1
#define SIZEOF_SHORT 2
#define SIZEOF_INT 4
#define SIZEOF_LONGLONG 8
#define SIZEOF_CHAR 1
#define SIZEOF_SSIZE_T SIZEOF_INT
/* APR WINDOWS-ONLY FUNCTIONS
* This section should define those functions which are
* only found in the windows version of APR.
*/
time_t WinTimeToUnixTime(FILETIME *);
unsigned __stdcall SignalHandling(void *);
int thread_ready(void);
#endif /*APR_WINCONFIG_H*/
#endif /*WIN32*/
1.9 +1 -1 apache-2.0/src/lib/apr/lib/apr_cpystrn.c
Index: apr_cpystrn.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_cpystrn.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- apr_cpystrn.c 1999/12/01 18:39:34 1.8
+++ apr_cpystrn.c 1999/12/09 21:00:41 1.9
@@ -57,7 +57,7 @@
#ifndef WIN32
#include "apr_config.h"
#else
-#include "apr_win.h"
+#include "apr_winconfig.h"
#endif
#include "apr_lib.h"
1.9 +1 -1 apache-2.0/src/lib/apr/lib/apr_getpass.c
Index: apr_getpass.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_getpass.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- apr_getpass.c 1999/12/01 18:39:34 1.8
+++ apr_getpass.c 1999/12/09 21:00:42 1.9
@@ -63,7 +63,7 @@
#ifndef WIN32
#include "apr_config.h"
#else
-#include "apr_win.h"
+#include "apr_winconfig.h"
#endif
#include "apr_lib.h"
#include "apr_errno.h"
1.28 +1 -1 apache-2.0/src/lib/apr/lib/apr_pools.c
Index: apr_pools.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_pools.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- apr_pools.c 1999/12/06 22:37:22 1.27
+++ apr_pools.c 1999/12/09 21:00:43 1.28
@@ -65,7 +65,7 @@
#ifndef WIN32
#include "apr_config.h"
#else
-#include "apr_win.h"
+#include "apr_winconfig.h"
#endif
#include "apr_general.h"
1.4 +1 -1 apache-2.0/src/lib/apr/lib/apr_slack.c
Index: apr_slack.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_slack.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- apr_slack.c 1999/10/01 16:18:32 1.3
+++ apr_slack.c 1999/12/09 21:00:44 1.4
@@ -66,7 +66,7 @@
#ifndef WIN32
#include "apr_config.h"
#else
-#include "apr_win.h"
+#include "apr_winconfig.h"
#endif
#ifdef APACHE
1.4 +1 -1 apache-2.0/src/lib/apr/lib/apr_snprintf.c
Index: apr_snprintf.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_snprintf.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- apr_snprintf.c 1999/12/01 18:39:36 1.3
+++ apr_snprintf.c 1999/12/09 21:00:44 1.4
@@ -62,7 +62,7 @@
#include "apr_config.h"
#else
#include <winsock2.h>
-#include "apr_win.h"
+#include "apr_winconfig.h"
#endif
#include "apr_lib.h"
1.8 +1 -1 apache-2.0/src/lib/apr/lib/apr_tables.c
Index: apr_tables.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_tables.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- apr_tables.c 1999/12/02 17:05:40 1.7
+++ apr_tables.c 1999/12/09 21:00:45 1.8
@@ -65,7 +65,7 @@
#ifndef WIN32
#include "apr_config.h"
#else
-#include "apr_win.h"
+#include "apr_winconfig.h"
#endif
#include "apr_general.h"
1.2 +1 -1 apache-2.0/src/lib/apr/misc/win32/names.c
Index: names.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/win32/names.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- names.c 1999/08/17 15:59:42 1.1
+++ names.c 1999/12/09 21:00:50 1.2
@@ -53,7 +53,7 @@
*
*/
#ifdef WIN32
-#include "apr_win.h"
+#include "apr_winconfig.h"
#endif
#include "apr_file_io.h"
#include "apr_general.h"
1.11 +1 -1 apache-2.0/src/lib/apr/misc/win32/start.c
Index: start.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/win32/start.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- start.c 1999/11/29 23:29:29 1.10
+++ start.c 1999/12/09 21:00:51 1.11
@@ -53,7 +53,7 @@
*
*/
-#include "apr_win.h"
+#include "apr_winconfig.h"
#include "misc.h"
#include "apr_general.h"
#include "apr_errno.h"
1.9 +1 -1 apache-2.0/src/lib/apr/threadproc/win32/thread.c
Index: thread.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/win32/thread.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- thread.c 1999/10/15 14:20:27 1.8
+++ thread.c 1999/12/09 21:00:56 1.9
@@ -52,7 +52,7 @@
* project, please see <http://www.apache.org/>.
*
*/
-#include "apr_win.h"
+#include "apr_winconfig.h"
#include "threadproc.h"
#include "apr_thread_proc.h"
#include "apr_general.h"
1.2 +1 -0 apache-2.0/src/lib/apr/time/win32/atime.h
Index: atime.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/time/win32/atime.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- atime.h 1999/08/17 15:59:53 1.1
+++ atime.h 1999/12/09 21:01:02 1.2
@@ -56,6 +56,7 @@
#ifndef ATIME_H
#define ATIME_H
+#include "apr_winconfig.h"
#include "apr_time.h"
#include <time.h>
1.4 +0 -1 apache-2.0/src/lib/apr/time/win32/time.c
Index: time.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/time/win32/time.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- time.c 1999/10/04 22:37:06 1.3
+++ time.c 1999/12/09 21:01:05 1.4
@@ -52,7 +52,6 @@
* project, please see <http://www.apache.org/>.
*
*/
-
#include "atime.h"
#include "apr_time.h"
#include "apr_general.h"