Change 22436 broke the Windows build.
Rafael Garcia-Suarez [Fri, 5 Mar 2004 08:53:08 +0000 (08:53 +0000)]
Fix by Steve Hay.

p4raw-id: //depot/perl@22441

ext/POSIX/POSIX.xs

index abafefe..0919905 100644 (file)
@@ -1806,9 +1806,18 @@ access(filename, mode)
 
 char *
 ctermid(s = 0)
-       char *          s = safemalloc((size_t) L_ctermid);
+       char *          s = 0;
+    CODE:
+#ifdef HAS_CTERMID_R
+       s = safemalloc((size_t) L_ctermid);
+#endif
+       RETVAL = ctermid(s);
+    OUTPUT:
+       RETVAL
     CLEANUP:
+#ifdef HAS_CTERMID_R
        Safefree(s);
+#endif
 
 char *
 cuserid(s = 0)