diff options
Diffstat (limited to 'module')
-rw-r--r-- | module/c/preprocessor2.scm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/module/c/preprocessor2.scm b/module/c/preprocessor2.scm index e63103dc..9cf94302 100644 --- a/module/c/preprocessor2.scm +++ b/module/c/preprocessor2.scm @@ -812,13 +812,23 @@ (define* (make-default-environment key: (now (localtime (current-time)))) (-> (string-append + ;; /* 6.10.8 Predefined macro names */ + ;; /* 6.10.8.1 Mandatory macros */ "#define __STDC__ 1\n" "#define __STDC_HOSTED__ 1\n" "#define __STDC_VERSION__ 201112L\n" ;; TODO format should always be in ;; english, and not tranlated (format #f "#define __DATE__ \"~a\"~%" (strftime "%b %_d %Y" now)) - (format #f "#define __TIME__ \"~a\"~%" (strftime "%H:%M:%S" now))) + (format #f "#define __TIME__ \"~a\"~%" (strftime "%H:%M:%S" now)) + + ;; /* 6.10.8.2 Environment macros */ + ;; /* 6.10.8.3 Conditional feature macros */ + "#define __STDC_NO_ATOMICS__ 1\n" + "#define __STDC_NO_COMPLEX__ 1\n" + "#define __STDC_NO_THREADS__ 1\n" + "#define __STDC_NO_VLA__ 1\n" + ) (preprocess-string (make-environment)) (value-ref 0))) |