[netperf-talk] MSDOS changes
Rick Jones
rick.jones2 at hp.com
Thu Aug 14 10:15:43 PDT 2008
Gisle Vanem wrote:
> I finally got the netserver working on MSDOS (djgpp).
> It was a small change; djgpp does have fork(), but it's
> really a no-op (doesn't really work). So MSDOS must call
> process_request() in the parent as VMS etc. does. Attached diffs-3.txt.
It might be my mail client, or something else, but my attempt to apply
the patch ran into some troubles:
raj at tardy:~/netperf2_trunk$ patch < diffs-3.txt
missing header for unified diff at line 3 of patch
can't find file to patch at input line 3
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|<div class="moz-text-flowed" style="font-family: -moz-fixed">---
SVN-Latest/src/netserver.c Sat Jul 26 20:47:44 2008
|+++ netserver.c Thu Aug 14 15:39:34 2008
--------------------------
File to patch: src/netserver.c
patching file src/netserver.c
Hunk #1 succeeded at 225 with fuzz 1.
Hunk #5 FAILED at 689.
Hunk #6 succeeded at 700 (offset -2 lines).
Hunk #7 FAILED at 769.
Hunk #8 FAILED at 802.
Hunk #9 succeeded at 897 (offset -4 lines).
patch unexpectedly ends in middle of line
3 out of 9 hunks FAILED -- saving rejects to file src/netserver.c.rej
patch unexpectedly ends in middle of line
If you can give it a quick check on the very latest top-of-trunk
(assuming you haven't already) that would be great. Otherwise, it will
take me a little while to get to a point where I can apply the patch by
hand.
happy benchmarking,
rick jones
I wonder if we need to switch to some sort of #ifdef HAVE_USABLE_FORK or
something... :)
> PS. Is there a way to avoid netperf sending IP-fragments
> in the UDP_STREAM test?
>
> --gv
> --- SVN-Latest/src/netserver.c Sat Jul 26 20:47:44 2008
> +++ netserver.c Thu Aug 14 15:39:34 2008
> @@ -225,7 +225,7 @@
> if (!debug)
> {
> fclose(where);
> -#if !defined(WIN32) && !defined(MPE) && !defined(__VMS)
> +#if !defined(WIN32) && !defined(MPE) && !defined(__VMS) && !defined(MSDOS)
> /* For Unix: reopen the debug write file descriptor to "/dev/null" */
> /* and redirect stdout to it. */
> fflush (stdout);
> @@ -245,7 +245,7 @@
> perror ("netserver: duplicate /dev/null write file descr. to
> stdout");
> exit (1);
> }
> -#endif /* !WIN32 !MPE !__VMS */
> +#endif /* !WIN32 !MPE !__VMS !MSDOS */
> }
> break;
>
> @@ -496,10 +496,10 @@
> int error;
> int not_listening;
>
> -#if !defined(WIN32) && !defined(MPE) && !defined(__VMS)
> +#if !defined(WIN32) && !defined(MPE) && !defined(__VMS) && !defined(MSDOS)
> FILE *rd_null_fp; /* Used to redirect from "/dev/null". */
> FILE *wr_null_fp; /* Used to redirect to "/dev/null". */
> -#endif /* !WIN32 !MPE !__VMS */
> +#endif /* !WIN32 !MPE !__VMS !MDOS */
>
> if (debug) {
> fprintf(stderr,
> @@ -614,7 +614,7 @@
> setpgrp();
> */
>
> -#if !defined(WIN32) && !defined(MPE) && !defined(__VMS) &&
> !defined(VMWARE_UW)
> +#if !defined(WIN32) && !defined(MPE) && !defined(__VMS) &&
> !defined(VMWARE_UW) && !defined(MSDOS)
> /* Flush the standard I/O file descriptors before forking. */
> fflush (stdin);
> fflush (stdout);
> @@ -689,11 +689,9 @@
> #define SIGCLD SIGCHLD
> #endif /* SIGCLD */
>
> -#ifndef MSDOS
> signal(SIGCLD, SIG_IGN);
> -#endif
>
> -#endif /* !WIN32 !MPE !__VMS */
> +#endif /* !WIN32 !MPE !__VMS !MSDOS */
>
> for (;;)
> {
> @@ -704,7 +702,7 @@
> printf("server_control: accept failed errno %d\n",errno);
> exit(1);
> }
> -#if defined(MPE) || defined(__VMS) || defined(VMWARE_UW)
> +#if defined(MPE) || defined(__VMS) || defined(VMWARE_UW) || defined(MSDOS)
> /*
> * Since we cannot fork this process , we cant fire any threads
> * as they all share the same global data . So we better allow
> @@ -773,9 +771,7 @@
> free(cmdline);
> }
> #else
> -#ifndef MSDOS
> signal(SIGCLD, SIG_IGN);
> -#endif
> #if defined(HAVE_FORK)
> switch (fork())
> #else
> @@ -808,16 +804,16 @@
> #endif /* DONT_WAIT */
> break;
> }
> -#endif /* !WIN32 !MPE !__VMS */
> +#endif /* !WIN32 !MPE !__VMS !MSDOS */
> } /*for*/
> -#if !defined(WIN32) && !defined(MPE) && !defined(__VMS) &&
> !defined(VMWARE_UW)
> +#if !defined(WIN32) && !defined(MPE) && !defined(__VMS) &&
> !defined(VMWARE_UW) && !defined(MSDOS)
> break; /*case 0*/
>
> default:
> exit (0);
>
> }
> -#endif /* !WIN32 !MPE !__VMS */
> +#endif /* !WIN32 !MPE !__VMS !MSDOS */
> }
>
> #ifdef WIN32
> @@ -905,6 +901,9 @@
> case 'd':
> /* we want to set the debug file name sometime */
> debug++;
> +#ifdef MSDOS
> + dbug_init();
> +#endif
> break;
> case 'L':
> not_inetd = 1;
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> netperf-talk mailing list
> netperf-talk at netperf.org
> http://www.netperf.org/cgi-bin/mailman/listinfo/netperf-talk
More information about the netperf-talk
mailing list