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
62bbea8e
Commit
62bbea8e
authored
Mar 01, 2011
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config.h: idempotent-wrap the generated config.h
parent
870fa5e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
config.h
config.h
+3
-0
tools/configurator/configurator.c
tools/configurator/configurator.c
+4
-1
No files found.
config.h
View file @
62bbea8e
#ifndef CCAN_CONFIG_H
#define CCAN_CONFIG_H
/* Generated by CCAN configurator */
#define CCAN_COMPILER "cc"
#define CCAN_CFLAGS "-g -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations"
...
...
@@ -34,3 +36,4 @@
#define HAVE_TYPEOF 1
#define HAVE_UTIME 1
#define HAVE_WARN_UNUSED_RESULT 1
#endif
/* CCAN_CONFIG_H */
tools/configurator/configurator.c
View file @
62bbea8e
...
...
@@ -337,10 +337,13 @@ int main(int argc, char *argv[])
unlink
(
INPUT_FILE
);
cmd
[
strlen
(
cmd
)
-
strlen
(
" -o "
OUTPUT_FILE
" "
INPUT_FILE
)]
=
'\0'
;
printf
(
"/* Generated by CCAN configurator */
\n
"
);
printf
(
"#ifndef CCAN_CONFIG_H
\n
"
"#define CCAN_CONFIG_H
\n
"
"/* Generated by CCAN configurator */
\n
"
);
printf
(
"#define CCAN_COMPILER
\"
%s
\"\n
"
,
argv
[
1
]);
printf
(
"#define CCAN_CFLAGS
\"
%s
\"\n\n
"
,
cmd
+
strlen
(
argv
[
1
])
+
1
);
for
(
i
=
0
;
i
<
sizeof
(
tests
)
/
sizeof
(
tests
[
0
]);
i
++
)
printf
(
"#define %s %u
\n
"
,
tests
[
i
].
name
,
tests
[
i
].
answer
);
printf
(
"#endif /* CCAN_CONFIG_H */
\n
"
);
return
0
;
}
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