From 15024f87a2067a5b1796c43993925e781fb7c372 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 10 Aug 2001 10:38:11 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r81426, which included commits to RCS files with non-trunk default branches. --- contrib/cvs/contrib/listen2.c | 107 ----------------------- contrib/cvs/contrib/listen2.mak | 188 ---------------------------------------- 2 files changed, 295 deletions(-) delete mode 100644 contrib/cvs/contrib/listen2.c delete mode 100644 contrib/cvs/contrib/listen2.mak diff --git a/contrib/cvs/contrib/listen2.c b/contrib/cvs/contrib/listen2.c deleted file mode 100644 index 20cfc6c..0000000 --- a/contrib/cvs/contrib/listen2.c +++ /dev/null @@ -1,107 +0,0 @@ -/* This will develop into the inted-like program which - we may want to use for a server on Win95/NT. Right now - it is just a test program ("telnet foo 2401" and you'll - get a message). */ - -#include -#include -#include -#include - -int -main () -{ - struct sockaddr_in sa; - SOCKET t; - SOCKET s; - WSADATA data; - - if (WSAStartup (MAKEWORD (1, 1), &data)) - { - fprintf (stderr, "cvs: unable to initialize winsock\n"); - exit (1); - } - - t = socket (PF_INET, SOCK_STREAM, 0); - if (t == INVALID_SOCKET) - { - printf ("Error in socket(): %d\n", WSAGetLastError ()); - exit (1); - } - sa.sin_family = AF_INET; - sa.sin_addr.s_addr = INADDR_ANY; - sa.sin_port = htons (2401); - if (bind (t, (struct sockaddr *) &sa, sizeof (sa)) != 0) - { - printf ("Cannot bind(): %d\n", WSAGetLastError ()); - exit (1); - } - if (listen (t, 1) != 0) - { - printf ("Cannot listen(): %d\n", WSAGetLastError ()); - exit (1); - } - while (1) - { - int sasize = sizeof (sa); - -#if 0 - int save_stdin, save_stdout; -#endif - - s = accept (t, (struct sockaddr *) &sa, &sasize); - if (s == INVALID_SOCKET) - { - printf ("Cannot accept(): %d\n", WSAGetLastError ()); - exit (1); - } -#if 0 - /* This, of course, does not work because sockets are - not file descriptors and file descriptors are not - sockets. Duh! */ - save_stdin = _dup (0); - if (save_stdin < 0) - { - printf ("Cannot save stdin: %s\n", strerror (errno)); - exit (1); - } - save_stdout = _dup (1); - if (save_stdout < 0) - { - printf ("Cannot save stdout: %s\n", strerror (errno)); - exit (1); - } - if (_dup2 (s, 0) < 0) - { - printf ("Cannot dup stdin: %s\n", strerror (errno)); - exit (1); - } - if (_dup2 (s, 1) < 0) - { - printf ("Cannot dup stdout: %s\n", strerror (errno)); - exit (1); - } - /* Of course this will be "cvs" eventually, but "netstat" - is for testing. */ - if (_spawnl (_P_DETACH, "netstat", "netstat", NULL) < 0) - { - printf ("Cannot spawn subprocess: %s\n", strerror (errno)); - exit (1); - } -#else - if (send (s, "hello, world\n", 13, 0) == SOCKET_ERROR) - { - /* Note that we do not detect the case in which we sent - less than the requested number of bytes. */ - printf ("Cannot send(): %d\n", WSAGetLastError ()); - exit (1); - } -#endif - if (closesocket (s) != 0) - { - printf ("Cannot closesocket(): %d\n", WSAGetLastError ()); - exit (1); - } - } - return 0; -} diff --git a/contrib/cvs/contrib/listen2.mak b/contrib/cvs/contrib/listen2.mak deleted file mode 100644 index 12a80ce..0000000 --- a/contrib/cvs/contrib/listen2.mak +++ /dev/null @@ -1,188 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 40001 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -!IF "$(CFG)" == "" -CFG=listen2 - Win32 Debug -!MESSAGE No configuration specified. Defaulting to listen2 - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "listen2 - Win32 Release" && "$(CFG)" !=\ - "listen2 - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "listen2.mak" CFG="listen2 - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "listen2 - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "listen2 - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -RSC=rc.exe -CPP=cl.exe - -!IF "$(CFG)" == "listen2 - 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 "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\listen2.exe" - -CLEAN : - -@erase ".\Release\listen2.exe" - -@erase ".\Release\listen2.obj" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ - /Fp"$(INTDIR)/listen2.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS= -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/listen2.bsc" -BSC32_SBRS= -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 /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib wsock32.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib wsock32.lib /nologo\ - /subsystem:console /incremental:no /pdb:"$(OUTDIR)/listen2.pdb" /machine:I386\ - /out:"$(OUTDIR)/listen2.exe" -LINK32_OBJS= \ - "$(INTDIR)/listen2.obj" - -"$(OUTDIR)\listen2.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "listen2 - 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 Target_Dir "" -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\listen2.exe" - -CLEAN : - -@erase ".\Debug\listen2.exe" - -@erase ".\Debug\listen2.obj" - -@erase ".\Debug\listen2.ilk" - -@erase ".\Debug\listen2.pdb" - -@erase ".\Debug\vc40.pdb" - -@erase ".\Debug\vc40.idb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\ - /Fp"$(INTDIR)/listen2.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Debug/ -CPP_SBRS= -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/listen2.bsc" -BSC32_SBRS= -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 /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib wsock32.lib /nologo\ - /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/listen2.pdb" /debug\ - /machine:I386 /out:"$(OUTDIR)/listen2.exe" -LINK32_OBJS= \ - "$(INTDIR)/listen2.obj" - -"$(OUTDIR)\listen2.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!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) $< - -################################################################################ -# Begin Target - -# Name "listen2 - Win32 Release" -# Name "listen2 - Win32 Debug" - -!IF "$(CFG)" == "listen2 - Win32 Release" - -!ELSEIF "$(CFG)" == "listen2 - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\listen2.c - -"$(INTDIR)\listen2.obj" : $(SOURCE) "$(INTDIR)" - - -# End Source File -# End Target -# End Project -################################################################################ -- cgit v1.1