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
082d651f
Commit
082d651f
authored
Mar 28, 2011
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configure.h: HAVE_ISBLANK
This isn't on RHEL4, for example: isascii() and isblank() are not in C89.
parent
b0a59bdc
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
0 deletions
+12
-0
ccan/str/debug.c
ccan/str/debug.c
+2
-0
ccan/str/str.h
ccan/str/str.h
+4
-0
ccan/str/str_debug.h
ccan/str/str_debug.h
+2
-0
config.h
config.h
+1
-0
tools/configurator/configurator.c
tools/configurator/configurator.c
+3
-0
No files found.
ccan/str/debug.c
View file @
082d651f
...
...
@@ -24,11 +24,13 @@ int str_isascii(int i)
return
isascii
(
i
);
}
#if HAVE_ISBLANK
int
str_isblank
(
int
i
)
{
assert
(
i
>=
-
1
&&
i
<
256
);
return
isblank
(
i
);
}
#endif
int
str_iscntrl
(
int
i
)
{
...
...
ccan/str/str.h
View file @
082d651f
...
...
@@ -91,10 +91,12 @@ static inline bool cisascii(char c)
{
return
isascii
((
unsigned
char
)
c
);
}
#if HAVE_ISBLANK
static
inline
bool
cisblank
(
char
c
)
{
return
isblank
((
unsigned
char
)
c
);
}
#endif
static
inline
bool
ciscntrl
(
char
c
)
{
return
iscntrl
((
unsigned
char
)
c
);
...
...
@@ -166,7 +168,9 @@ static inline bool cisxdigit(char c)
#define isalnum(i) str_isalnum(str_check_arg_(i))
#define isalpha(i) str_isalpha(str_check_arg_(i))
#define isascii(i) str_isascii(str_check_arg_(i))
#if HAVE_ISBLANK
#define isblank(i) str_isblank(str_check_arg_(i))
#endif
#define iscntrl(i) str_iscntrl(str_check_arg_(i))
#define isdigit(i) str_isdigit(str_check_arg_(i))
#define isgraph(i) str_isgraph(str_check_arg_(i))
...
...
ccan/str/str_debug.h
View file @
082d651f
...
...
@@ -8,7 +8,9 @@
int
str_isalnum
(
int
i
);
int
str_isalpha
(
int
i
);
int
str_isascii
(
int
i
);
#if HAVE_ISBLANK
int
str_isblank
(
int
i
);
#endif
int
str_iscntrl
(
int
i
);
int
str_isdigit
(
int
i
);
int
str_isgraph
(
int
i
);
...
...
config.h
View file @
082d651f
...
...
@@ -31,6 +31,7 @@
#define HAVE_FOR_LOOP_DECLARATION 0
#define HAVE_FLEXIBLE_ARRAY_MEMBER 1
#define HAVE_GETPAGESIZE 1
#define HAVE_ISBLANK 1
#define HAVE_LITTLE_ENDIAN 1
#define HAVE_MEMMEM 1
#define HAVE_MMAP 1
...
...
tools/configurator/configurator.c
View file @
082d651f
...
...
@@ -102,6 +102,9 @@ static struct test tests[] = {
{
"HAVE_GETPAGESIZE"
,
DEFINES_FUNC
,
NULL
,
"#include <unistd.h>
\n
"
"static int func(void) { return getpagesize(); }"
},
{
"HAVE_ISBLANK"
,
DEFINES_FUNC
,
NULL
,
"#include <ctype.h>
\n
"
"static int func(void) { return isblank(' '); }"
},
{
"HAVE_LITTLE_ENDIAN"
,
INSIDE_MAIN
|
EXECUTE
,
NULL
,
"union { int i; char c[sizeof(int)]; } u;
\n
"
"u.i = 0x01020304;
\n
"
...
...
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