-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use CFLAGS environment variable
- Loading branch information
1 parent
3887d98
commit 6ea4f52
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* Test CFLAGS env parsing | ||
* run me successfully only with: | ||
* CFLAGS="-DALLOWED=1" cjit test/cflags.c | ||
*/ | ||
|
||
#if !defined(ALLOWED) || (ALLOWED != 1) | ||
|
||
#error Running this program is not allowed. Please compile with -DALLOWED=1 | ||
|
||
#else | ||
|
||
#include <stdio.h> | ||
|
||
int main(void) | ||
{ | ||
printf("Success.\n"); | ||
return 0; | ||
} | ||
#endif |