pkgsrc/archivers/unshield/patches/patch-ab
adam ffed70b9d0 Changes 0.6:
fix use of -L (lowercase) option with -d
2013-10-23 18:22:44 +00:00

33 lines
887 B
Text

$NetBSD: patch-ab,v 1.4 2013/10/23 18:22:44 adam Exp $
--- src/unshield.c.orig 2009-06-18 05:11:31.000000000 +0000
+++ src/unshield.c
@@ -2,5 +2,5 @@
#ifdef __linux__
#define _BSD_SOURCE 1
-#define _POSIX_C_SOURCE 2
+/* #define _POSIX_C_SOURCE 2 */
#endif
#include <sys/types.h>
@@ -299,8 +299,8 @@ static bool extract_file(Unshield* unshi
default:
- if (!isprint(*p))
+ if (!isprint((unsigned char)*p))
*p = '_';
else if (make_lowercase)
- *p = tolower(*p);
+ *p = tolower((unsigned char)*p);
break;;
}
@@ -319,8 +319,8 @@ static bool extract_file(Unshield* unshi
for (p = filename + strlen(dirname); *p != '\0'; p++)
{
- if (!isprint(*p))
+ if (!isprint((unsigned char)*p))
*p = '_';
else if (make_lowercase)
- *p = tolower(*p);
+ *p = tolower((unsigned char)*p);
}