Skip to content

Instantly share code, notes, and snippets.

@pogliamarci
Last active December 18, 2015 14:28
Show Gist options
  • Save pogliamarci/5797104 to your computer and use it in GitHub Desktop.
Save pogliamarci/5797104 to your computer and use it in GitHub Desktop.
Patch to make ACSE compile under OSX (changed dependency from malloc.h with dependency from stdlib.h)
diff -Naur ../acse_1.1.0/VERSION acse_1.1.0/VERSION
--- ../acse_1.1.0/VERSION 2008-12-27 03:15:42.000000000 +0100
+++ acse_1.1.0/VERSION 2014-02-05 15:49:16.945461917 +0100
@@ -1 +1 @@
-1.1.0
+1.1.1
diff -Naur ../acse_1.1.0/acse/Acse.y acse_1.1.0/acse/Acse.y
--- ../acse_1.1.0/acse/Acse.y 2008-12-23 17:02:28.000000000 +0100
+++ acse_1.1.0/acse/Acse.y 2014-02-05 15:49:16.945461917 +0100
@@ -17,7 +17,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
-#include <malloc.h>
#include "axe_struct.h"
#include "axe_engine.h"
#include "symbol_table.h"
diff -Naur ../acse_1.1.0/acse/axe_engine.c acse_1.1.0/acse/axe_engine.c
--- ../acse_1.1.0/acse/axe_engine.c 2008-12-15 17:44:34.000000000 +0100
+++ acse_1.1.0/acse/axe_engine.c 2014-02-05 15:49:16.945461917 +0100
@@ -9,7 +9,7 @@
#include <assert.h>
#include <string.h>
-#include <malloc.h>
+#include <stdlib.h>
#include "axe_engine.h"
#include "symbol_table.h"
#include "axe_errors.h"
diff -Naur ../acse_1.1.0/acse/axe_reg_alloc.c acse_1.1.0/acse/axe_reg_alloc.c
--- ../acse_1.1.0/acse/axe_reg_alloc.c 2008-12-24 03:23:16.000000000 +0100
+++ acse_1.1.0/acse/axe_reg_alloc.c 2014-02-05 15:49:38.924911192 +0100
@@ -516,8 +516,8 @@
t_live_interval pattern;
if (id == RA_EXCLUDED_VARIABLE)
- return;
-
+ return NULL;
+
pattern.varID = id;
/* search for the current live interval */
element_found = CustomfindElement(intervals, &pattern, compareIntervalIDs);
diff -Naur ../acse_1.1.0/acse/axe_struct.h acse_1.1.0/acse/axe_struct.h
--- ../acse_1.1.0/acse/axe_struct.h 2008-11-21 12:47:02.000000000 +0100
+++ acse_1.1.0/acse/axe_struct.h 2014-02-05 15:49:16.945461917 +0100
@@ -10,7 +10,7 @@
#ifndef _AXE_STRUCT_H
#define _AXE_STRUCT_H
-#include <malloc.h>
+#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include "axe_constants.h"
diff -Naur ../acse_1.1.0/acse/collections.h acse_1.1.0/acse/collections.h
--- ../acse_1.1.0/acse/collections.h 2008-11-21 12:47:02.000000000 +0100
+++ acse_1.1.0/acse/collections.h 2014-02-05 15:49:16.945461917 +0100
@@ -12,7 +12,6 @@
#include <stdlib.h>
#include <stdio.h>
-#include <malloc.h>
#include <string.h>
/* macros */
diff -Naur ../acse_1.1.0/assembler/asm_engine.c acse_1.1.0/assembler/asm_engine.c
--- ../acse_1.1.0/assembler/asm_engine.c 2008-11-21 12:47:02.000000000 +0100
+++ acse_1.1.0/assembler/asm_engine.c 2014-02-05 15:49:16.945461917 +0100
@@ -11,7 +11,6 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
-#include <malloc.h>
#include "asm_engine.h"
#include "asm_debug.h"
diff -Naur ../acse_1.1.0/assembler/asm_struct.h acse_1.1.0/assembler/asm_struct.h
--- ../acse_1.1.0/assembler/asm_struct.h 2008-11-21 12:47:02.000000000 +0100
+++ acse_1.1.0/assembler/asm_struct.h 2014-02-05 15:49:16.945461917 +0100
@@ -12,7 +12,6 @@
#include <stdlib.h>
#include <stdio.h>
-#include <malloc.h>
#include <string.h>
#include <assert.h>
#include "asm_constants.h"
diff -Naur ../acse_1.1.0/assembler/assembler.y acse_1.1.0/assembler/assembler.y
--- ../acse_1.1.0/assembler/assembler.y 2008-11-21 12:47:02.000000000 +0100
+++ acse_1.1.0/assembler/assembler.y 2014-02-05 15:49:16.948795170 +0100
@@ -10,7 +10,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include <malloc.h>
#include "asm_struct.h"
#include "asm_engine.h"
diff -Naur ../acse_1.1.0/assembler/collections.h acse_1.1.0/assembler/collections.h
--- ../acse_1.1.0/assembler/collections.h 2008-11-21 12:47:02.000000000 +0100
+++ acse_1.1.0/assembler/collections.h 2014-02-05 15:49:16.948795170 +0100
@@ -12,7 +12,6 @@
#include <stdlib.h>
#include <stdio.h>
-#include <malloc.h>
#include <string.h>
/* macros */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment