summaryrefslogtreecommitdiff
path: root/archivers/unshield/patches/patch-ab
blob: fd35356a3b4a3982fe5bb1b332e0aa8b498404fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$NetBSD: patch-ab,v 1.3 2008/05/14 11:56:26 jmcneill Exp $

--- src/unshield.c.orig	2008-05-05 21:38:10.000000000 -0400
+++ 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; *p != '\0'; p++)
   {
-    if (!isprint(*p))
+    if (!isprint((unsigned char)*p))
       *p = '_';
     else if (make_lowercase)
-      *p = tolower(*p);
+      *p = tolower((unsigned char)*p);
   }