httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Sutton <...@hyperreal.org>
Subject cvs commit: apachen/src/os/win32 ApacheOS.dsp ApacheOS.mak os.c os.h
Date Fri, 12 Sep 1997 08:03:52 GMT
pcs         97/09/12 01:03:52

  Added:       src/os/win32 ApacheOS.dsp ApacheOS.mak os.c os.h
  Log:
  Add ApacheOS project to build the OS abstraction libary (in DLL form)
  for Win32 systems. This project/makefile also copies the required header(s)
  (currently just os.h) to src/main, so must be build *before* any other
  project/makefile.
  
  Revision  Changes    Path
  1.1                  apachen/src/os/win32/ApacheOS.dsp
  
  Index: ApacheOS.dsp
  ===================================================================
  # Microsoft Developer Studio Project File - Name="ApacheOS" - Package Owner=<4>
  # Microsoft Developer Studio Generated Build File, Format Version 5.00
  # ** DO NOT EDIT **
  
  # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
  
  CFG=ApacheOS - 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 "ApacheOS.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 "ApacheOS.mak" CFG="ApacheOS - Win32 Debug"
  !MESSAGE 
  !MESSAGE Possible choices for configuration are:
  !MESSAGE 
  !MESSAGE "ApacheOS - Win32 Release" (based on\
   "Win32 (x86) Dynamic-Link Library")
  !MESSAGE "ApacheOS - 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)" == "ApacheOS - 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 "ApacheOSR"
  # PROP Intermediate_Dir "ApacheOSR"
  # PROP Ignore_Export_Lib 0
  # 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 0x809 /d "NDEBUG"
  # ADD RSC /l 0x809 /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
  # Begin Custom Build - Copy os.h to main
  ProjDir=.
  InputPath=.\ApacheOSR\ApacheOS.dll
  SOURCE=$(InputPath)
  
  "$(ProjDir)\..\..\main\os.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
  	COPY os.h $(ProjDir)\..\..\main
  
  # End Custom Build
  
  !ELSEIF  "$(CFG)" == "ApacheOS - Win32 Debug"
  
  # PROP BASE Use_MFC 0
  # PROP BASE Use_Debug_Libraries 1
  # PROP BASE Output_Dir "ApacheOS"
  # PROP BASE Intermediate_Dir "ApacheOS"
  # PROP BASE Target_Dir ""
  # PROP Use_MFC 0
  # PROP Use_Debug_Libraries 1
  # PROP Output_Dir "ApacheOSD"
  # PROP Intermediate_Dir "ApacheOSD"
  # 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 /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 0x809 /d "_DEBUG"
  # ADD RSC /l 0x809 /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 /nologo /subsystem:windows /dll /debug
/machine:I386 /pdbtype:sept
  # Begin Custom Build - Copy os.h to main
  ProjDir=.
  InputPath=.\ApacheOSD\ApacheOS.dll
  SOURCE=$(InputPath)
  
  "$(ProjDir)\..\..\main\os.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
  	COPY os.h $(ProjDir)\..\..\main
  
  # End Custom Build
  
  !ENDIF 
  
  # Begin Target
  
  # Name "ApacheOS - Win32 Release"
  # Name "ApacheOS - Win32 Debug"
  # Begin Group "Source Files"
  
  # PROP Default_Filter "c"
  # Begin Source File
  
  SOURCE=.\os.c
  # End Source File
  # End Group
  # Begin Group "Header Files"
  
  # PROP Default_Filter ""
  # Begin Source File
  
  SOURCE=.\os.h
  # End Source File
  # End Group
  # End Target
  # End Project
  
  
  
  1.1                  apachen/src/os/win32/ApacheOS.mak
  
  Index: ApacheOS.mak
  ===================================================================
  # Microsoft Developer Studio Generated NMAKE File, Based on ApacheOS.dsp
  !IF "$(CFG)" == ""
  CFG=ApacheOS - Win32 Debug
  !MESSAGE No configuration specified. Defaulting to ApacheOS - Win32 Debug.
  !ENDIF 
  
  !IF "$(CFG)" != "ApacheOS - Win32 Release" && "$(CFG)" !=\
   "ApacheOS - Win32 Debug"
  !MESSAGE Invalid configuration "$(CFG)" specified.
  !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 "ApacheOS.mak" CFG="ApacheOS - Win32 Debug"
  !MESSAGE 
  !MESSAGE Possible choices for configuration are:
  !MESSAGE 
  !MESSAGE "ApacheOS - Win32 Release" (based on\
   "Win32 (x86) Dynamic-Link Library")
  !MESSAGE "ApacheOS - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
  !MESSAGE 
  !ERROR An invalid configuration is specified.
  !ENDIF 
  
  !IF "$(OS)" == "Windows_NT"
  NULL=
  !ELSE 
  NULL=nul
  !ENDIF 
  
  CPP=cl.exe
  MTL=midl.exe
  RSC=rc.exe
  
  !IF  "$(CFG)" == "ApacheOS - Win32 Release"
  
  OUTDIR=.\ApacheOSR
  INTDIR=.\ApacheOSR
  # Begin Custom Macros
  OutDir=.\ApacheOSR
  ProjDir=.
  # End Custom Macros
  
  !IF "$(RECURSE)" == "0" 
  
  ALL : "$(OUTDIR)\ApacheOS.dll" "$(ProjDir)\..\..\main\os.h"
  
  !ELSE 
  
  ALL : "$(OUTDIR)\ApacheOS.dll" "$(ProjDir)\..\..\main\os.h"
  
  !ENDIF 
  
  CLEAN :
  	-@erase "$(INTDIR)\os.obj"
  	-@erase "$(INTDIR)\vc50.idb"
  	-@erase "$(OUTDIR)\ApacheOS.dll"
  	-@erase "$(OUTDIR)\ApacheOS.exp"
  	-@erase "$(OUTDIR)\ApacheOS.lib"
  	-@erase "$(ProjDir)\..\..\main\os.h"
  
  "$(OUTDIR)" :
      if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
  
  CPP_PROJ=/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
   /Fp"$(INTDIR)\ApacheOS.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
  CPP_OBJS=.\ApacheOSR/
  CPP_SBRS=.
  MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 
  BSC32=bscmake.exe
  BSC32_FLAGS=/nologo /o"$(OUTDIR)\ApacheOS.bsc" 
  BSC32_SBRS= \
  	
  LINK32=link.exe
  LINK32_FLAGS=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 /incremental:no\
   /pdb:"$(OUTDIR)\ApacheOS.pdb" /machine:I386 /out:"$(OUTDIR)\ApacheOS.dll"\
   /implib:"$(OUTDIR)\ApacheOS.lib" 
  LINK32_OBJS= \
  	"$(INTDIR)\os.obj"
  
  "$(OUTDIR)\ApacheOS.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      $(LINK32) @<<
    $(LINK32_FLAGS) $(LINK32_OBJS)
  <<
  
  ProjDir=.
  InputPath=.\ApacheOSR\ApacheOS.dll
  SOURCE=$(InputPath)
  
  "$(ProjDir)\..\..\main\os.h"	 : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
  	COPY os.h $(ProjDir)\..\..\main
  
  !ELSEIF  "$(CFG)" == "ApacheOS - Win32 Debug"
  
  OUTDIR=.\ApacheOSD
  INTDIR=.\ApacheOSD
  # Begin Custom Macros
  OutDir=.\ApacheOSD
  ProjDir=.
  # End Custom Macros
  
  !IF "$(RECURSE)" == "0" 
  
  ALL : "$(OUTDIR)\ApacheOS.dll" "$(ProjDir)\..\..\main\os.h"
  
  !ELSE 
  
  ALL : "$(OUTDIR)\ApacheOS.dll" "$(ProjDir)\..\..\main\os.h"
  
  !ENDIF 
  
  CLEAN :
  	-@erase "$(INTDIR)\os.obj"
  	-@erase "$(INTDIR)\vc50.idb"
  	-@erase "$(INTDIR)\vc50.pdb"
  	-@erase "$(OUTDIR)\ApacheOS.dll"
  	-@erase "$(OUTDIR)\ApacheOS.exp"
  	-@erase "$(OUTDIR)\ApacheOS.ilk"
  	-@erase "$(OUTDIR)\ApacheOS.lib"
  	-@erase "$(OUTDIR)\ApacheOS.pdb"
  	-@erase "$(ProjDir)\..\..\main\os.h"
  
  "$(OUTDIR)" :
      if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
  
  CPP_PROJ=/nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS"\
   /Fp"$(INTDIR)\ApacheOS.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
  CPP_OBJS=.\ApacheOSD/
  CPP_SBRS=.
  MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 
  BSC32=bscmake.exe
  BSC32_FLAGS=/nologo /o"$(OUTDIR)\ApacheOS.bsc" 
  BSC32_SBRS= \
  	
  LINK32=link.exe
  LINK32_FLAGS=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 /incremental:yes\
   /pdb:"$(OUTDIR)\ApacheOS.pdb" /debug /machine:I386\
   /out:"$(OUTDIR)\ApacheOS.dll" /implib:"$(OUTDIR)\ApacheOS.lib" /pdbtype:sept 
  LINK32_OBJS= \
  	"$(INTDIR)\os.obj"
  
  "$(OUTDIR)\ApacheOS.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      $(LINK32) @<<
    $(LINK32_FLAGS) $(LINK32_OBJS)
  <<
  
  ProjDir=.
  InputPath=.\ApacheOSD\ApacheOS.dll
  SOURCE=$(InputPath)
  
  "$(ProjDir)\..\..\main\os.h"	 : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
  	COPY os.h $(ProjDir)\..\..\main
  
  !ENDIF 
  
  .c{$(CPP_OBJS)}.obj::
     $(CPP) @<<
     $(CPP_PROJ) $< 
  <<
  
  .cpp{$(CPP_OBJS)}.obj::
     $(CPP) @<<
     $(CPP_PROJ) $< 
  <<
  
  .cxx{$(CPP_OBJS)}.obj::
     $(CPP) @<<
     $(CPP_PROJ) $< 
  <<
  
  .c{$(CPP_SBRS)}.sbr::
     $(CPP) @<<
     $(CPP_PROJ) $< 
  <<
  
  .cpp{$(CPP_SBRS)}.sbr::
     $(CPP) @<<
     $(CPP_PROJ) $< 
  <<
  
  .cxx{$(CPP_SBRS)}.sbr::
     $(CPP) @<<
     $(CPP_PROJ) $< 
  <<
  
  
  !IF "$(CFG)" == "ApacheOS - Win32 Release" || "$(CFG)" ==\
   "ApacheOS - Win32 Debug"
  SOURCE=.\os.c
  DEP_CPP_OS_C0=\
  	".\os.h"\
  	
  
  "$(INTDIR)\os.obj" : $(SOURCE) $(DEP_CPP_OS_C0) "$(INTDIR)"
  
  
  
  !ENDIF 
  
  
  
  
  1.1                  apachen/src/os/win32/os.c
  
  Index: os.c
  ===================================================================
  /*
   * This file will include OS specific functions which are not inlineable.
   * Any inlineable functions should be defined in os-inline.c instead.
   */
  
  #include "os.h"
  
  API_EXPORT(int)ap_is_path_absolute(char *file)
  {
    return (file && file[0] == '/' ? 1 : 0);
  }
  
  
  
  1.1                  apachen/src/os/win32/os.h
  
  Index: os.h
  ===================================================================
  /*
   * This file in included in all Apache source code. It contains definitions
   * of facilities available on _this_ operating system (HAVE_* macros),
   * and prototypes of OS specific functions defined in os.c or os-inline.c
   */
  
  /* Put your NT stuff here - Ambarish */
  
  /* temporarily replace crypt */
  /* char *crypt(const char *pw, const char *salt); */
  #define crypt(buf,salt)	    (buf)
  
  /* Although DIR_TYPE is dirent (see nt/readdir.h) we need direct.h for
     chdir() */
  #include <direct.h>
  
  #define WIN32_LEAN_AND_MEAN
  #define STRICT
  #define NO_UNISTD_H
  #define NO_WRITEV
  #define NO_SETSID
  #define NO_USE_SIGACTION
  #define NEED_PROCESS_H
  #define USE_LONGJMP
  #define HAVE_MMAP
  #define MULTITHREAD
  #define HAVE_CANONICAL_FILENAME
  typedef int uid_t;
  typedef int gid_t;
  typedef int pid_t;
  typedef int mode_t;
  typedef char * caddr_t;
  
  /*
  Define export types. API_EXPORT_NONSTD is a nasty hack to avoid having to declare
  every configuration function as __stdcall.
  */
  
  #define API_EXPORT(type)    __declspec(dllexport) type __stdcall
  #define API_EXPORT_NONSTD(type)    __declspec(dllexport) type
  #ifdef IS_MODULE
  # define API_VAR_EXPORT		__declspec(dllimport)
  #else
  # define API_VAR_EXPORT		__declspec(dllexport)
  #endif
  #define MODULE_VAR_EXPORT   __declspec(dllexport)
  
  #define strcasecmp(s1, s2) stricmp(s1, s2)
  #define strncasecmp(s1, s2, n) strnicmp(s1, s2, n)
  #define lstat(x, y) stat(x, y)
  #define S_ISLNK(m) (0)
  #define S_ISREG(m) ((m & _S_IFREG) == _S_IFREG)
  #ifndef S_ISDIR
  #define S_ISDIR(m) (((m) & S_IFDIR) == S_IFDIR)
  #endif
  #ifndef S_ISREG
  #define S_ISREG(m)      (((m)&(S_IFREG)) == (S_IFREG))
  #endif
  #define STDIN_FILENO  0
  #define STDOUT_FILENO 1
  #define STDERR_FILENO 2
  #define JMP_BUF jmp_buf
  #define sleep(t) Sleep(t*1000)
  #define O_CREAT _O_CREAT
  #define O_RDWR _O_RDWR
  #define SIGPIPE 17
  /* Seems Windows is not a subgenius */
  #define NO_SLACK
  #include <stddef.h>
  /* Unknown system - Edit these to match */
  
  
  API_EXPORT(int)ap_is_path_absolute(char *f);
  
  
  

Mime
View raw message