freebsd-ports/lang/cparser/files/patch-firm_machine-c
Armin Pirkovitsch 27261637fc - Update to 0.9.14
- Switch to OptionsNG
- Add Options for DEBUG
- Update pkg-descr and WWW:
- Trim Makefile headers
- Add USES= pkgconfig
- Remove shlib versions

- Update MAINTAINER to my FreeBSD address

PR:           ports/175920
Submitted by: Po-Chien Lin <linpc _AT_ cs.nctu.edu.tw>
Approved by:  beat (mentor)
2013-04-30 17:48:36 +00:00

25 lines
790 B
Text

$FreeBSD$
By rdivacky@, enables cparser to work out of the box on amd64
--- driver/firm_machine.c 2011-04-14 16:51:46.000000000 +0200
+++ driver/firm_machine.c 2011-08-12 22:04:40.000000000 +0200
@@ -108,12 +108,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