You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ak...@hyperreal.org on 1997/11/25 05:07:13 UTC
cvs commit: apachen/src/os/win32 main_win32.c
akosut 97/11/24 20:07:13
Modified: src Apache.dsp Apache.mak
src/main http_main.c
Added: src/os/win32 main_win32.c
Removed: src/main dummy.c
Log:
Move the Win32 main() function out of ApacheCore.dll. Replace it
with an apache_main(), which is called by a main() function in
os/win32/main_win32.c.
Reviewed by: Ben Laurie
Revision Changes Path
1.7 +1 -1 apachen/src/Apache.dsp
Index: Apache.dsp
===================================================================
RCS file: /export/home/cvs/apachen/src/Apache.dsp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -u -r1.6 -r1.7
--- Apache.dsp 1997/10/20 20:19:07 1.6
+++ Apache.dsp 1997/11/25 04:07:09 1.7
@@ -86,7 +86,7 @@
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
# Begin Source File
-SOURCE=.\main\dummy.c
+SOURCE=.\os\win32\main_win32.c
# End Source File
# End Group
# Begin Group "Header Files"
1.7 +6 -6 apachen/src/Apache.mak
Index: Apache.mak
===================================================================
RCS file: /export/home/cvs/apachen/src/Apache.mak,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -u -r1.6 -r1.7
--- Apache.mak 1997/10/20 20:19:08 1.6
+++ Apache.mak 1997/11/25 04:07:09 1.7
@@ -47,7 +47,7 @@
!ENDIF
CLEAN :
- -@erase "$(INTDIR)\dummy.obj"
+ -@erase "$(INTDIR)\main_win32.obj"
-@erase "$(INTDIR)\vc50.idb"
-@erase "$(OUTDIR)\Apache.exe"
@@ -68,7 +68,7 @@
/incremental:no /pdb:"$(OUTDIR)\Apache.pdb" /machine:I386\
/out:"$(OUTDIR)\Apache.exe"
LINK32_OBJS= \
- "$(INTDIR)\dummy.obj"
+ "$(INTDIR)\main_win32.obj"
"$(OUTDIR)\Apache.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
@@ -94,7 +94,7 @@
!ENDIF
CLEAN :
- -@erase "$(INTDIR)\dummy.obj"
+ -@erase "$(INTDIR)\main_win32.obj"
-@erase "$(INTDIR)\vc50.idb"
-@erase "$(INTDIR)\vc50.pdb"
-@erase "$(OUTDIR)\Apache.exe"
@@ -118,7 +118,7 @@
/incremental:yes /pdb:"$(OUTDIR)\Apache.pdb" /debug /machine:I386\
/out:"$(OUTDIR)\Apache.exe"
LINK32_OBJS= \
- "$(INTDIR)\dummy.obj"
+ "$(INTDIR)\main_win32.obj"
"$(OUTDIR)\Apache.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
@@ -159,9 +159,9 @@
!IF "$(CFG)" == "Apache - Win32 Release" || "$(CFG)" == "Apache - Win32 Debug"
-SOURCE=.\main\dummy.c
+SOURCE=.\os\win32\main_win32.c
-"$(INTDIR)\dummy.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\main_win32.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
1.254 +5 -1 apachen/src/main/http_main.c
Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
retrieving revision 1.253
retrieving revision 1.254
diff -u -u -r1.253 -r1.254
--- http_main.c 1997/11/22 02:04:44 1.253
+++ http_main.c 1997/11/25 04:07:11 1.254
@@ -4264,8 +4264,12 @@
return (0);
}
+#ifdef WIN32
__declspec(dllexport)
- int main(int argc, char *argv[])
+ int apache_main(int argc, char *argv[])
+#else
+int main(int argc, char *argv[])
+#endif
{
int c;
int child = 0;
1.1 apachen/src/os/win32/main_win32.c
Index: main_win32.c
===================================================================
/* main_win32.c - Apache executable stub file for Win32
* This file's purpose in life is to load, and call the
* "real" main function, apache_main(), located in ApacheCore.dll
*
* This was done because having the main() function in a DLL,
* although Win32 allows it, seemed wrong. Also, MSVC++ won't
* link an executable without at least one object file. This
* satistifies that requirement.
*/
__declspec(dllexport) int apache_main(int argc, char *argv[]);
int main(int argc, char *argv[])
{
apache_main(argc, argv);
}