diff options
Diffstat (limited to 'src/net/java/games/gluegen/GlueGen.java')
-rw-r--r-- | src/net/java/games/gluegen/GlueGen.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/net/java/games/gluegen/GlueGen.java b/src/net/java/games/gluegen/GlueGen.java index 2e5f3421a..6c343a5ee 100644 --- a/src/net/java/games/gluegen/GlueGen.java +++ b/src/net/java/games/gluegen/GlueGen.java @@ -141,7 +141,14 @@ public class GlueGen implements GlueEmitterControls { } HeaderParser headerParser = new HeaderParser(); - MachineDescription machDesc = new MachineDescription32Bit(); + MachineDescription machDesc; + String os = System.getProperty("os.name").toLowerCase(); + String cpu = System.getProperty("os.arch").toLowerCase(); + if (os.startsWith("linux") && cpu.equals("amd64")) { + machDesc = new MachineDescription64Bit(); + } else { + machDesc = new MachineDescription32Bit(); + } headerParser.setMachineDescription(machDesc); TypeDictionary td = new TypeDictionary(); headerParser.setTypedefDictionary(td); |