summaryrefslogtreecommitdiff
path: root/build.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-06-08 16:07:05 +0300
committerPanu Matilainen <pmatilai@redhat.com>2007-06-08 16:07:05 +0300
commitf32c97f621ae8726130c042db66481c1336cf620 (patch)
treef3f17f6e93c7c055af06f3a48210da2e8ec1a1dc /build.c
parent2045bd1814b44536eb006a03e96ef167eb873a96 (diff)
downloadlibrpm-tizen-f32c97f621ae8726130c042db66481c1336cf620.tar.gz
librpm-tizen-f32c97f621ae8726130c042db66481c1336cf620.tar.bz2
librpm-tizen-f32c97f621ae8726130c042db66481c1336cf620.zip
Allow characters >127 that don't fit the current locale in the
specfile (e.g. latin1 in utf-8 locale). Patch from OpenSuSE.
Diffstat (limited to 'build.c')
-rw-r--r--build.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/build.c b/build.c
index 3c96a19ca..a8ad5384c 100644
--- a/build.c
+++ b/build.c
@@ -87,8 +87,13 @@ static int isSpecFile(const char * specfile)
/*@switchbreak@*/ break;
/*@-boundsread@*/
default:
+#if 0
if (checking && !(isprint(*s) || isspace(*s))) return 0;
/*@switchbreak@*/ break;
+#else
+ if (checking && !(isprint(*s) || isspace(*s)) && *(unsigned char *)s < 32) return 0;
+ /*@switchbreak@*/ break;
+#endif
/*@=boundsread@*/
}
}