From a5783da8a9a70b1b265038c68d49a41e061b25c6 Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Sat, 18 Sep 1999 19:13:38 +0000 Subject: [PATCH] - Make Win32 compile again --- php4dll.dsp | 16 ++++++++++++ php4dllts.dsp | 68 ++++++------------------------------------------- win32/readdir.c | 3 ++- 3 files changed, 26 insertions(+), 61 deletions(-) diff --git a/php4dll.dsp b/php4dll.dsp index 6e398f40878..957f5cfd20c 100644 --- a/php4dll.dsp +++ b/php4dll.dsp @@ -131,6 +131,10 @@ SOURCE=.\php3_realpath.c # End Source File # Begin Source File +SOURCE=.\php_content_types.c +# End Source File +# Begin Source File + SOURCE=.\php_ini.c # End Source File # Begin Source File @@ -215,6 +219,10 @@ SOURCE=.\php3_realpath.h # End Source File # Begin Source File +SOURCE=.\php_content_types.h +# End Source File +# Begin Source File + SOURCE=.\php_globals.h # End Source File # Begin Source File @@ -363,6 +371,10 @@ SOURCE=.\ext\session\mod_files.c # End Source File # Begin Source File +SOURCE=.\ext\session\mod_user.c +# End Source File +# Begin Source File + SOURCE=.\ext\bcmath\number.c # End Source File # Begin Source File @@ -500,6 +512,10 @@ SOURCE=.\ext\standard\mime.h # End Source File # Begin Source File +SOURCE=.\ext\session\mod_user.h +# End Source File +# Begin Source File + SOURCE=.\ext\bcmath\number.h # End Source File # Begin Source File diff --git a/php4dllts.dsp b/php4dllts.dsp index 1e07cd2e222..5ef16a9d794 100644 --- a/php4dllts.dsp +++ b/php4dllts.dsp @@ -375,6 +375,10 @@ SOURCE=.\ext\session\mod_files.c # End Source File # Begin Source File +SOURCE=.\ext\session\mod_user.c +# End Source File +# Begin Source File + SOURCE=.\ext\bcmath\number.c # End Source File # Begin Source File @@ -400,17 +404,7 @@ SOURCE=.\ext\odbc\php_odbc.c # Begin Source File SOURCE=.\ext\pcre\php_pcre.c - -!IF "$(CFG)" == "php4dllts - Win32 Debug_TS" - # ADD CPP /D "STATIC" - -!ELSEIF "$(CFG)" == "php4dllts - Win32 Release_TS" - -# ADD CPP /D "STATIC" - -!ENDIF - # End Source File # Begin Source File @@ -518,6 +512,10 @@ SOURCE=.\ext\standard\md5.h # End Source File # Begin Source File +SOURCE=.\ext\session\mod_user.h +# End Source File +# Begin Source File + SOURCE=.\ext\bcmath\number.h # End Source File # Begin Source File @@ -610,77 +608,27 @@ SOURCE=.\ext\standard\url.h # Begin Source File SOURCE=.\ext\pcre\pcrelib\chartables.c - -!IF "$(CFG)" == "php4dllts - Win32 Debug_TS" - # ADD CPP /D "STATIC" - -!ELSEIF "$(CFG)" == "php4dllts - Win32 Release_TS" - -# ADD CPP /D "STATIC" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\ext\pcre\pcrelib\get.c - -!IF "$(CFG)" == "php4dllts - Win32 Debug_TS" - # ADD CPP /D "STATIC" - -!ELSEIF "$(CFG)" == "php4dllts - Win32 Release_TS" - -# ADD CPP /D "STATIC" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\ext\pcre\pcrelib\maketables.c - -!IF "$(CFG)" == "php4dllts - Win32 Debug_TS" - # ADD CPP /D "STATIC" - -!ELSEIF "$(CFG)" == "php4dllts - Win32 Release_TS" - -# ADD CPP /D "STATIC" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\ext\pcre\pcrelib\pcre.c - -!IF "$(CFG)" == "php4dllts - Win32 Debug_TS" - # ADD CPP /D "STATIC" - -!ELSEIF "$(CFG)" == "php4dllts - Win32 Release_TS" - -# ADD CPP /D "STATIC" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\ext\pcre\pcrelib\study.c - -!IF "$(CFG)" == "php4dllts - Win32 Debug_TS" - # ADD CPP /D "STATIC" - -!ELSEIF "$(CFG)" == "php4dllts - Win32 Release_TS" - -# ADD CPP /D "STATIC" - -!ENDIF - # End Source File # End Group # Begin Group "Header Files No. 3" diff --git a/win32/readdir.c b/win32/readdir.c index 2ebec905e3f..5a680ff5a74 100644 --- a/win32/readdir.c +++ b/win32/readdir.c @@ -4,6 +4,7 @@ #define NEEDRDH 1 #include "readdir.h" +#include "php.h" /********************************************************************** * Implement dirent-style opendir/readdir/closedir on Window 95/NT @@ -62,7 +63,7 @@ struct dirent *readdir(DIR * dp) } dp->offset++; - strncpy(dp->dent.d_name, dp->fileinfo.name, _MAX_FNAME); + strlcpy(dp->dent.d_name, dp->fileinfo.name, _MAX_FNAME+1); dp->dent.d_ino = 1; dp->dent.d_reclen = strlen(dp->dent.d_name); dp->dent.d_off = dp->offset;