Change 29531 by [EMAIL PROTECTED] on 2006/12/12 13:32:01

        Subject: [PATCH] mg.c: #ifdef only the different bits
        From: [EMAIL PROTECTED] (Jarkko Hietaniemi)
        Date: Tue, 12 Dec 2006 15:18:53 +0200 (EET)
        Message-Id: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/mg.c#464 edit

Differences ...

==== //depot/perl/mg.c#464 (text) ====
Index: perl/mg.c
--- perl/mg.c#463~29530~        2006-12-12 03:36:41.000000000 -0800
+++ perl/mg.c   2006-12-12 05:32:01.000000000 -0800
@@ -2629,20 +2629,20 @@
            }
            else {
                /* Shorter than original, will be padded. */
-               Copy(s, PL_origargv[0], len, char);
-               PL_origargv[0][len] = 0;
 #ifdef PERL_DARWIN
-               /* Special case for darwin: see [perl #38868] */
-               memset(PL_origargv[0] + len + 1,
-                      (int)'\0', PL_origalen - len - 1);
+               /* Special case for Mac OS X: see [perl #38868] */
+               const int pad = 0;
 #else
                /* Is the space counterintuitive?  Yes.
                 * (You were expecting \0?)
                 * Does it work?  Seems to.  (In Linux 2.4.20 at least.)
                 * --jhi */
-               memset(PL_origargv[0] + len + 1,
-                      (int)' ',  PL_origalen - len - 1);
+               const int pad = ' ';
 #endif
+               Copy(s, PL_origargv[0], len, char);
+               PL_origargv[0][len] = 0;
+               memset(PL_origargv[0] + len + 1,
+                      pad,  PL_origalen - len - 1);
            }
            PL_origargv[0][PL_origalen-1] = 0;
            for (i = 1; i < PL_origargc; i++)
End of Patch.

Reply via email to