pp_sys.c: Use macro instead of reinventing it
authorKarl Williamson <public@khwilliamson.com>
Thu, 20 Jun 2013 19:13:40 +0000 (13:13 -0600)
committerKarl Williamson <public@khwilliamson.com>
Sun, 7 Jul 2013 19:29:44 +0000 (13:29 -0600)
The Strerror macro is defined properly to handle either case here.

pp_sys.c

index af415df..793de40 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3667,13 +3667,7 @@ S_dooneliner(pTHX_ const char *cmd, const char *filename)
                 ; e++)
            {
                /* you don't see this */
-               const char * const errmsg =
-#ifdef HAS_SYS_ERRLIST
-                   sys_errlist[e]
-#else
-                   strerror(e)
-#endif
-                   ;
+               const char * const errmsg = Strerror(e) ;
                if (!errmsg)
                    break;
                if (instr(s, errmsg)) {