aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cparser/files/patch-firm_machine-c
blob: d1de83080bda3e469ac09db2cfe2752c3cea827e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$FreeBSD$

By rdivacky@, enables cparser to work out of the box on amd64

--- work/cparser-0.9.12/driver/firm_machine.c   2011-04-14 16:51:46.000000000 +0200
+++ /tmp/firm_machine.c 2011-08-12 22:04:40.000000000 +0200
@@ -77,12 +77,18 @@
 machine_triple_t *firm_get_host_machine(void)
 {
    machine_triple_t *machine = XMALLOC(machine_triple_t);
+#ifdef __amd64__
+   machine->cpu_type = xstrdup("x86_64");
+#else
    machine->cpu_type = xstrdup("i386");
+#endif
    machine->manufacturer = xstrdup("unknown");
 #if defined(_WIN32) || defined(__CYGWIN__)
    machine->operating_system = xstrdup("win32");
 #elif defined(__APPLE__)
    machine->operating_system = xstrdup("darwin");
+#elif defined(__FreeBSD__)
+   machine->operating_system = xstrdup("bsd");
 #else
    machine->operating_system = xstrdup("linux");
 #endif