0001-c-std.patch 833 B

12345678910111213141516171819202122
  1. Some older toolchains do not recognize c11 as a valid standard.
  2. Since the code actually builds well with c99, use that instead.
  3. The only two non-standard features used are // comments
  4. and for(int i ...) declarations in C.
  5. Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
  6. --- a/SConstruct
  7. +++ b/SConstruct
  8. @@ -9,9 +9,8 @@ mydir = os.getcwd()
  9. #Set default C++ building flags for both libraries and executables
  10. default_env = Environment(ENV = os.environ)
  11. default_env.Append(CPPPATH = [mydir + '/include'])
  12. -default_env.Append(CCFLAGS = ' -Wall -pedantic')
  13. -default_env.Append(CFLAGS = ' -std=c11')
  14. -default_env.Append(CXXFLAGS = ' -std=c++11')
  15. +default_env.Append(CFLAGS = ' -Wall')
  16. +default_env.Append(CFLAGS = ' -std=c99')
  17. #default_env.Append(CCFLAGS = ' -O2 -fomit-frame-pointer')
  18. default_env.Append(CCFLAGS = ' -O0 -g')