Skip to content

Commit

Permalink
Fix issue with fenv.h and Ubuntu 12.04
Browse files Browse the repository at this point in the history
If the values from fenv.h aren't found by the C preprocessor, it uses
the default ones for x86/x64
  • Loading branch information
andrioni committed Aug 28, 2013
1 parent 285b238 commit 773b60e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ errno_h.jl:
@$(PRINT_PERL) echo '#include "errno.h"' | $(CPP) -dM - | perl -nle 'print "const $$1 = int32($$2)" if /^#define\s+(E\w+)\s+(\d+)\s*$$/' | sort > $@

fenv_constants.jl: ../src/fenv_constants.h
$(QUIET_PERL) ${CC} -E -P -DJULIA ../src/fenv_constants.h | tail -n 8 > $@
@$(PRINT_PERL) ${CPP} -P -DJULIA ../src/fenv_constants.h | tail -n 8 | perl -ple 's/\sFE_UN\w+/ 0x10/g; s/\sFE_O\w+/ 0x08/g; s/\sFE_DI\w+/ 0x04/g; s/\sFE_INV\w+/ 0x01/g; s/\sFE_TON\w+/ 0x00/g; s/\sFE_UP\w+/ 0x800/g; s/\sFE_DO\w+/ 0x400/g; s/\sFE_TOW\w+/ 0xc00/g' > $@

file_constants.jl: ../src/file_constants.h
@$(PRINT_PERL) $(CPP) -P -DJULIA ../src/file_constants.h | perl -nle 'print "$$1 0o$$2" if /^(\s*const\s+[A-z_]+\s+=)\s+(0[0-9]*)\s*$$/; print "$$1" if /^\s*(const\s+[A-z_]+\s+=\s+([1-9]|0x)[0-9A-z]*)\s*$$/' > $@
Expand Down

0 comments on commit 773b60e

Please sign in to comment.