rbb 99/06/01 11:15:58
Modified: apr/include apr_fnmatch.h apr_lib.h apr_md5.h apr_win.h
apr/lib apr_cpystrn.c apr_execve.c apr_fnmatch.c apr_md5.c
apr_pools.c apr_slack.c apr_snprintf.c
Added: apr/lib lib.dsp
Log:
The lib directory now compiles on Windows.
Revision Changes Path
1.2 +4 -1 apache-apr/apr/include/apr_fnmatch.h
Index: apr_fnmatch.h
===================================================================
RCS file: /home/cvs/apache-apr/apr/include/apr_fnmatch.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apr_fnmatch.h 1999/03/24 18:39:09 1.1
+++ apr_fnmatch.h 1999/06/01 18:15:14 1.2
@@ -34,8 +34,11 @@
*/
/* This file has been modified by the Apache Group. */
-
+#ifndef WIN32
#include "apr_config.h"
+#else
+#include "apr_win.h"
+#endif
#ifndef _APR_FNMATCH_H_
#define _APR_FNMATCH_H_
1.7 +3 -1 apache-apr/apr/include/apr_lib.h
Index: apr_lib.h
===================================================================
RCS file: /home/cvs/apache-apr/apr/include/apr_lib.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- apr_lib.h 1999/06/01 17:11:44 1.6
+++ apr_lib.h 1999/06/01 18:15:16 1.7
@@ -128,7 +128,7 @@
#define ap_isalpha(x) (0)
#define ap_isdigit(x) (0)
-#define ap_tolower(c) (tolower(((unsigned char)(c))))
+#define apr_tolower(c) (tolower(((unsigned char)(c))))
/*
* Small utility macros to make things easier to read. Not usually a
@@ -325,6 +325,8 @@
void *data, enum kill_conditions kill_how,
BUFF **pipe_in, BUFF **pipe_out, BUFF **pipe_err);
#endif /* 0 */
+
+API_EXPORT(char *) apr_cpystrn(char *dst, const char *src, size_t dst_size);
/*
* Routine definitions that only work on Windows.
1.2 +4 -0 apache-apr/apr/include/apr_md5.h
Index: apr_md5.h
===================================================================
RCS file: /home/cvs/apache-apr/apr/include/apr_md5.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apr_md5.h 1999/03/24 18:39:09 1.1
+++ apr_md5.h 1999/06/01 18:15:17 1.2
@@ -88,6 +88,10 @@
#ifndef APACHE_MD5_H
#define APACHE_MD5_H
+#ifdef WIN32
+#include "apr_win.h"
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
1.2 +5 -0 apache-apr/apr/include/apr_win.h
Index: apr_win.h
===================================================================
RCS file: /home/cvs/apache-apr/apr/include/apr_win.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apr_win.h 1999/06/01 14:59:03 1.1
+++ apr_win.h 1999/06/01 18:15:18 1.2
@@ -63,13 +63,18 @@
typedef _off_t off_t;
typedef int pid_t;
+typedef void Sigfunc(int);
#define __attribute__(__x)
+#define APR_INLINE
#define HUGE_STRING_LEN 8192
#define API_EXPORT(x) x
#define API_EXPORT_NONSTD(x) x
+
+#define strcasecmp(s1, s2) stricmp(s1, s2)
+#define sleep(t) Sleep(t * 1000)
#endif /*APR_WIN_H*/
#endif /*WIN32*/
1.2 +4 -2 apache-apr/apr/lib/apr_cpystrn.c
Index: apr_cpystrn.c
===================================================================
RCS file: /home/cvs/apache-apr/apr/lib/apr_cpystrn.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apr_cpystrn.c 1999/03/24 18:39:11 1.1
+++ apr_cpystrn.c 1999/06/01 18:15:25 1.2
@@ -54,9 +54,11 @@
* project, please see <http://www.apache.org/>.
*
*/
-
+#ifndef WIN32
#include "apr_config.h"
-
+#else
+#include "apr_win.h"
+#endif
/*
* Apache's "replacement" for the strncpy() function. We roll our
* own to implement these specific changes:
1.2 +2 -2 apache-apr/apr/lib/apr_execve.c
Index: apr_execve.c
===================================================================
RCS file: /home/cvs/apache-apr/apr/lib/apr_execve.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apr_execve.c 1999/03/24 18:39:11 1.1
+++ apr_execve.c 1999/06/01 18:15:27 1.2
@@ -89,9 +89,9 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-
+#ifndef WIN32
#include "apr_config.h"
-
+#endif
/*---------------------------------------------------------------*/
#ifdef NEED_HASHBANG_EMUL
1.2 +4 -1 apache-apr/apr/lib/apr_fnmatch.c
Index: apr_fnmatch.c
===================================================================
RCS file: /home/cvs/apache-apr/apr/lib/apr_fnmatch.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apr_fnmatch.c 1999/03/24 18:39:12 1.1
+++ apr_fnmatch.c 1999/06/01 18:15:28 1.2
@@ -42,9 +42,12 @@
* Function fnmatch() as specified in POSIX 1003.2-1992, section B.6.
* Compares a filename or pathname to a pattern.
*/
-
+#ifndef WIN32
#include "apr_config.h"
+#endif
#include "apr_fnmatch.h"
+#include "apr_lib.h"
+#include <string.h>
#define EOS '\0'
1.2 +5 -3 apache-apr/apr/lib/apr_md5.c
Index: apr_md5.c
===================================================================
RCS file: /home/cvs/apache-apr/apr/lib/apr_md5.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apr_md5.c 1999/03/24 18:39:12 1.1
+++ apr_md5.c 1999/06/01 18:15:33 1.2
@@ -98,8 +98,9 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning
Kamp
*
----------------------------------------------------------------------------
*/
-
+#ifndef WIN32
#include "apr_config.h"
+#endif
#include "apr_md5.h"
#include "apr_lib.h"
@@ -580,8 +581,9 @@
API_EXPORT(char *) apr_validate_password(const char *passwd, const char
*hash)
{
char sample[120];
+#ifndef WIN32
char *crypt_pw;
-
+#endif
if (!strncmp(hash, apr1_id, strlen(apr1_id))) {
/*
* The hash was created using our custom algorithm.
@@ -593,7 +595,7 @@
* It's not our algorithm, so feed it to crypt() if possible.
*/
#ifdef WIN32
- return "crypt() unavailable on Win32, cannot validate password";
+ apr_cpystrn(sample, passwd, sizeof(sample) - 1);
#else
crypt_pw = crypt(passwd, hash);
apr_cpystrn(sample, crypt_pw, sizeof(sample) - 1);
1.5 +5 -0 apache-apr/apr/lib/apr_pools.c
Index: apr_pools.c
===================================================================
RCS file: /home/cvs/apache-apr/apr/lib/apr_pools.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- apr_pools.c 1999/05/27 19:02:29 1.4
+++ apr_pools.c 1999/06/01 18:15:35 1.5
@@ -62,7 +62,12 @@
* rst --- 4/95 --- 6/95
*/
+#ifndef WIN32
#include "apr_config.h"
+#else
+#include "apr_win.h"
+#endif
+
#include "apr_general.h"
#include "apr_pools.h"
#include "apr_lib.h"
1.2 +5 -0 apache-apr/apr/lib/apr_slack.c
Index: apr_slack.c
===================================================================
RCS file: /home/cvs/apache-apr/apr/lib/apr_slack.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apr_slack.c 1999/03/24 18:39:12 1.1
+++ apr_slack.c 1999/06/01 18:15:36 1.2
@@ -63,7 +63,12 @@
*
*/
+#ifndef WIN32
#include "apr_config.h"
+#else
+#include "apr_win.h"
+#endif
+
#ifdef APACHE
#include "http_log.h"
#endif
1.3 +7 -0 apache-apr/apr/lib/apr_snprintf.c
Index: apr_snprintf.c
===================================================================
RCS file: /home/cvs/apache-apr/apr/lib/apr_snprintf.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- apr_snprintf.c 1999/05/10 17:46:22 1.2
+++ apr_snprintf.c 1999/06/01 18:15:37 1.3
@@ -58,8 +58,15 @@
* <[EMAIL PROTECTED]> for xinetd.
*/
+#ifndef WIN32
#include "apr_config.h"
+#else
+#include "apr_win.h"
+#include <winsock2.h>
+#endif
+
#include "apr_lib.h"
+#include <math.h>
typedef enum {
NO = 0, YES = 1
1.1 apache-apr/apr/lib/lib.dsp
Index: lib.dsp
===================================================================
# Microsoft Developer Studio Project File - Name="lib" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=lib - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "lib.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "lib.mak" CFG="lib - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "lib - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "lib - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "lib - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"
/YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX
/FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib
odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib
odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
!ELSEIF "$(CFG)" == "lib - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D
"_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\include" /I "..\..\include"
/D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib
odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib
odbccp32.lib ws2_32.lib /nologo /subsystem:windows /dll /debug /machine:I386
/pdbtype:sept
!ENDIF
# Begin Target
# Name "lib - Win32 Release"
# Name "lib - Win32 Debug"
# Begin Source File
SOURCE=.\apr_cpystrn.c
# End Source File
# Begin Source File
SOURCE=.\apr_execve.c
# End Source File
# Begin Source File
SOURCE=.\apr_fnmatch.c
# End Source File
# Begin Source File
SOURCE=.\apr_md5.c
# End Source File
# Begin Source File
SOURCE=.\apr_pools.c
# End Source File
# Begin Source File
SOURCE=.\apr_slack.c
# End Source File
# Begin Source File
SOURCE=.\apr_snprintf.c
# End Source File
# End Target
# End Project