Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
00e61068
Commit
00e61068
authored
Apr 27, 2011
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
str: fix tests on unsigned chars, and !HAVE_ISBLANK.
parent
5c922794
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
18 additions
and
25 deletions
+18
-25
ccan/str/test/compile_fail-isalnum.c
ccan/str/test/compile_fail-isalnum.c
+1
-2
ccan/str/test/compile_fail-isalpha.c
ccan/str/test/compile_fail-isalpha.c
+1
-2
ccan/str/test/compile_fail-isascii.c
ccan/str/test/compile_fail-isascii.c
+1
-2
ccan/str/test/compile_fail-isblank.c
ccan/str/test/compile_fail-isblank.c
+6
-3
ccan/str/test/compile_fail-iscntrl.c
ccan/str/test/compile_fail-iscntrl.c
+1
-2
ccan/str/test/compile_fail-isdigit.c
ccan/str/test/compile_fail-isdigit.c
+1
-2
ccan/str/test/compile_fail-islower.c
ccan/str/test/compile_fail-islower.c
+1
-2
ccan/str/test/compile_fail-isprint.c
ccan/str/test/compile_fail-isprint.c
+1
-2
ccan/str/test/compile_fail-ispunct.c
ccan/str/test/compile_fail-ispunct.c
+1
-2
ccan/str/test/compile_fail-isspace.c
ccan/str/test/compile_fail-isspace.c
+1
-2
ccan/str/test/compile_fail-isupper.c
ccan/str/test/compile_fail-isupper.c
+1
-2
ccan/str/test/compile_fail-isxdigit.c
ccan/str/test/compile_fail-isxdigit.c
+1
-2
tools/configurator/configurator.c
tools/configurator/configurator.c
+1
-0
No files found.
ccan/str/test/compile_fail-isalnum.c
View file @
00e61068
...
...
@@ -15,8 +15,7 @@ int main(int argc, char *argv[])
#ifdef FAIL
/* Fake fail on unsigned char platforms. */
c
=
255
;
BUILD_ASSERT
(
c
<
0
);
BUILD_ASSERT
((
char
)
255
<
0
);
#endif
return
isalnum
(
c
);
...
...
ccan/str/test/compile_fail-isalpha.c
View file @
00e61068
...
...
@@ -15,8 +15,7 @@ int main(int argc, char *argv[])
#ifdef FAIL
/* Fake fail on unsigned char platforms. */
c
=
255
;
BUILD_ASSERT
(
c
<
0
);
BUILD_ASSERT
((
char
)
255
<
0
);
#endif
return
isalpha
(
c
);
...
...
ccan/str/test/compile_fail-isascii.c
View file @
00e61068
...
...
@@ -15,8 +15,7 @@ int main(int argc, char *argv[])
#ifdef FAIL
/* Fake fail on unsigned char platforms. */
c
=
255
;
BUILD_ASSERT
(
c
<
0
);
BUILD_ASSERT
((
char
)
255
<
0
);
#endif
return
isascii
(
c
);
...
...
ccan/str/test/compile_fail-isblank.c
View file @
00e61068
...
...
@@ -4,7 +4,7 @@
int
main
(
int
argc
,
char
*
argv
[])
{
#ifdef FAIL
#if !HAVE_BUILTIN_TYPES_COMPATIBLE_P || !HAVE_TYPEOF
#if !HAVE_BUILTIN_TYPES_COMPATIBLE_P || !HAVE_TYPEOF
|| !HAVE_ISBLANK
#error We need typeof to check isblank.
#endif
char
...
...
@@ -15,9 +15,12 @@ int main(int argc, char *argv[])
#ifdef FAIL
/* Fake fail on unsigned char platforms. */
c
=
255
;
BUILD_ASSERT
(
c
<
0
);
BUILD_ASSERT
((
char
)
255
<
0
);
#endif
#if HAVE_ISBLANK
return
isblank
(
c
);
#else
return
c
;
#endif
}
ccan/str/test/compile_fail-iscntrl.c
View file @
00e61068
...
...
@@ -15,8 +15,7 @@ int main(int argc, char *argv[])
#ifdef FAIL
/* Fake fail on unsigned char platforms. */
c
=
255
;
BUILD_ASSERT
(
c
<
0
);
BUILD_ASSERT
((
char
)
255
<
0
);
#endif
return
iscntrl
(
c
);
...
...
ccan/str/test/compile_fail-isdigit.c
View file @
00e61068
...
...
@@ -15,8 +15,7 @@ int main(int argc, char *argv[])
#ifdef FAIL
/* Fake fail on unsigned char platforms. */
c
=
255
;
BUILD_ASSERT
(
c
<
0
);
BUILD_ASSERT
((
char
)
255
<
0
);
#endif
return
isdigit
(
c
);
...
...
ccan/str/test/compile_fail-islower.c
View file @
00e61068
...
...
@@ -15,8 +15,7 @@ int main(int argc, char *argv[])
#ifdef FAIL
/* Fake fail on unsigned char platforms. */
c
=
255
;
BUILD_ASSERT
(
c
<
0
);
BUILD_ASSERT
((
char
)
255
<
0
);
#endif
return
islower
(
c
);
...
...
ccan/str/test/compile_fail-isprint.c
View file @
00e61068
...
...
@@ -15,8 +15,7 @@ int main(int argc, char *argv[])
#ifdef FAIL
/* Fake fail on unsigned char platforms. */
c
=
255
;
BUILD_ASSERT
(
c
<
0
);
BUILD_ASSERT
((
char
)
255
<
0
);
#endif
return
isprint
(
c
);
...
...
ccan/str/test/compile_fail-ispunct.c
View file @
00e61068
...
...
@@ -15,8 +15,7 @@ int main(int argc, char *argv[])
#ifdef FAIL
/* Fake fail on unsigned char platforms. */
c
=
255
;
BUILD_ASSERT
(
c
<
0
);
BUILD_ASSERT
((
char
)
255
<
0
);
#endif
return
ispunct
(
c
);
...
...
ccan/str/test/compile_fail-isspace.c
View file @
00e61068
...
...
@@ -15,8 +15,7 @@ int main(int argc, char *argv[])
#ifdef FAIL
/* Fake fail on unsigned char platforms. */
c
=
255
;
BUILD_ASSERT
(
c
<
0
);
BUILD_ASSERT
((
char
)
255
<
0
);
#endif
return
isspace
(
c
);
...
...
ccan/str/test/compile_fail-isupper.c
View file @
00e61068
...
...
@@ -15,8 +15,7 @@ int main(int argc, char *argv[])
#ifdef FAIL
/* Fake fail on unsigned char platforms. */
c
=
255
;
BUILD_ASSERT
(
c
<
0
);
BUILD_ASSERT
((
char
)
255
<
0
);
#endif
return
isupper
(
c
);
...
...
ccan/str/test/compile_fail-isxdigit.c
View file @
00e61068
...
...
@@ -15,8 +15,7 @@ int main(int argc, char *argv[])
#ifdef FAIL
/* Fake fail on unsigned char platforms. */
c
=
255
;
BUILD_ASSERT
(
c
<
0
);
BUILD_ASSERT
((
char
)
255
<
0
);
#endif
return
isxdigit
(
c
);
...
...
tools/configurator/configurator.c
View file @
00e61068
...
...
@@ -116,6 +116,7 @@ static struct test tests[] = {
"#include <unistd.h>
\n
"
"static int func(void) { return getpagesize(); }"
},
{
"HAVE_ISBLANK"
,
DEFINES_FUNC
,
NULL
,
"#define _GNU_SOURCE
\n
"
"#include <ctype.h>
\n
"
"static int func(void) { return isblank(' '); }"
},
{
"HAVE_LITTLE_ENDIAN"
,
INSIDE_MAIN
|
EXECUTE
,
NULL
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment