diff -urN portability.0/AdaMain.py portability/AdaMain.py
--- portability.0/AdaMain.py	2007-11-07 09:21:09.000000000 +0100
+++ portability/AdaMain.py	2007-12-16 21:58:35.000000000 +0100
@@ -17,7 +17,7 @@
     package AC renames Ada.Command_line;
 
     type charp_array is array(%(predef)s.natural_int range <>) 
-        of aliased %(predef)s.charp;
+        of aliased %(predef)s.const_charp;
 
     argc : %(predef)s.int := %(predef)s.int(AC.Argument_Count);
 
@@ -31,7 +31,7 @@
         argv(i) := %(predef)s.new_string(AC.argument( integer(i) ));
     end loop;
 
-    %(cmain)s.main(argc, argv(0)'access );
+    AC.Set_Exit_Status (AC.Exit_Status(%(cmain)s.main(argc, argv(0)'access )));
 
 end %(unit)s;
 ''' # end text
diff -urN portability.0/Makefile portability/Makefile
--- portability.0/Makefile	2007-11-07 09:21:08.000000000 +0100
+++ portability/Makefile	2007-11-30 21:30:03.000000000 +0100
@@ -17,7 +17,7 @@
 Makefile.config: setup
 	./setup
 
-include Makefile.config
+## include Makefile.config
 
 ## This variable can override the 'ar' executable on your system.
 #
@@ -224,13 +224,13 @@
 
 # This is the executable for C2Ada.
 #
-c2ada:		$(FEOBJS) $(LOCAL_LIBS) config.o
+c2ada:		$(FEOBJS) $(LOCAL_LIBS)
 		@echo "LOCAL_LIBS = $(LOCAL_LIBS)" 
 		@echo "LDFLAGS = $(LDFLAGS)" 
 		@echo "LIBS = $(LIBS)" 
 		@echo "PYTHONLIBS = $(PYTHONLIBS)"
 		$(LINKER) $(LDFLAGS) $(FEOBJS) $(LOCAL_LIBS) \
-                $(LIBS) config.o $(PYTHONLIBS) \
+                $(LIBS) $(PYTHONLIBS) \
 		-o c2ada
 
 #cbpp:	cbpp.o $(LOCAL_LIBS)
@@ -250,7 +250,7 @@
 		$(AR) rc $@ $(COMMON_OBJS)
 		$(RANLIB) $@
 
-clean::;	- rm -f cbind cbfe cbpp cdep
+clean::;	- rm -f cbind cbfe cbpp cdep c2ada
 clean::;	- rm -f *.o *.d *.pyc
 clean::;	- rm -f $(LOCAL_LIBS)
 clean::;	- rm -f hostinfo.h htype htype.o
@@ -308,5 +308,5 @@
 %.d: %.c
 	$(SHELL) -ec 'gcc -MM $(CFLAGS) $< | sed "s/$*\\.o[n:]*/$@ &/g" >$@'
 
-include $(SRCS:.c=.d)
+## include $(SRCS:.c=.d)
 
diff -urN portability.0/c.adb portability/c.adb
--- portability.0/c.adb	2007-11-07 09:21:09.000000000 +0100
+++ portability/c.adb	2007-12-16 20:36:16.000000000 +0100
@@ -44,4 +44,20 @@
 	return Interfaces.C.Char'Val(Character'Pos(C));
     end To_C;
 
+    function New_String (S: String) return charp is
+      function New_String (S: String) return Interfaces.C.Strings.chars_ptr 
+        renames Interfaces.C.Strings.New_String;
+      function To_charp is new Ada.Unchecked_Conversion(Interfaces.C.Strings.chars_ptr, charp);
+    begin
+      return To_charp(New_String(S));
+    end New_String;
+
+    function New_String (S: String) return const_charp is
+      function New_String (S: String) return Interfaces.C.Strings.chars_ptr 
+        renames Interfaces.C.Strings.New_String;
+      function To_const_charp is new Ada.Unchecked_Conversion(Interfaces.C.Strings.chars_ptr, const_charp);
+    begin
+      return To_const_charp(New_String(S));
+    end New_String;
+
 end C;
diff -urN portability.0/c.ads portability/c.ads
--- portability.0/c.ads	2007-11-07 09:21:09.000000000 +0100
+++ portability/c.ads	2007-12-16 21:05:53.000000000 +0100
@@ -1,7 +1,7 @@
 -- $Source: /home/CVSROOT/c2ada/c.ads,v $ 
 -- $Revision: 1.1.1.1 $ $Date: 1999/02/02 12:01:51 $ $Author: nabbasi $ 
 with Interfaces.C;
--- with X.Strings;
+with Interfaces.C.Strings;
 with System;
 
 package C is
@@ -24,6 +24,9 @@
     subtype long           is Interfaces.C.Long;
     subtype unsigned_long  is Interfaces.C.Unsigned_Long;
 
+    subtype long_long      is Interfaces.C.Unsigned_Long;
+    subtype unsigned_long_long      is Interfaces.C.Unsigned_Long;
+
     subtype float          is Interfaces.C.C_Float;
     subtype double         is Interfaces.C.Double;
 
@@ -59,10 +62,10 @@
     -- Allocate new nul-terminated strings and return pointers
     -- *******************************************************
 
-    -- function New_String (S: String) return charp 
+    function New_String (S: String) return charp;
 	-- renames X.Strings.New_String;
 
-    -- function New_String (S: String) return const_charp 
+    function New_String (S: String) return const_charp;
 	-- renames X.Strings.New_String;
 
     -- *************************************************
diff -urN portability.0/gen.c portability/gen.c
--- portability.0/gen.c	2007-11-07 09:21:09.000000000 +0100
+++ portability/gen.c	2007-12-16 11:08:37.000000000 +0100
@@ -480,7 +480,7 @@
     /* Generate immediately visible string ops, consts */
     putf("%>subtype Char_Array is %s.Char_Array;\n", 4, predef_pkg);
     putf("%>use type Char_Array;\n", 4);
-    putf("%>function \"&\"( S : Char_Array; C : %s.Char)", 4,
+    putf("%>function \"&\"( S : Char_Array; T : %s.Char)", 4,
 	 predef_pkg);
     putf(" return Char_Array\n");
     putf("%>renames %s.\"&\";\n", 8, "Interfaces.C");
@@ -1694,7 +1694,8 @@
     }
     if (is_fp) {
 	put_char('\n');
-	putf("%>pragma Convention(C, %s);\n\n", 4, sym->sym_ada_name);
+	if (ada_compiler != GNAT)
+	  putf("%>pragma Convention(C, %s);\n\n", 4, sym->sym_ada_name);
     }
     if (sym->private) {
 	symbol_pt nullsym = private_type_null(sym);
@@ -2145,7 +2146,8 @@
 	put_char(';');
 	c_comment_or_position(sym);
 
-	putf("%>pragma Convention(C, %s);\n\n", indent, fname);
+	if (ada_compiler != GNAT)
+	  putf("%>pragma Convention(C, %s);\n\n", indent, fname);
     }
 }
 
@@ -2665,7 +2667,8 @@
 
 	    boolean was_to_spec = output_is_spec();
 	    output_to(is_spec);
-	    putf("%>pragma Convention(C, %s);", 4, sym->sym_ada_name);
+	    if (ada_compiler != GNAT)
+	      putf("%>pragma Convention(C, %s);", 4, sym->sym_ada_name);
 	    output_to(was_to_spec); 
 	}
 	new_line();
@@ -3128,6 +3131,8 @@
      */
     if (!cur_unit_is_child_of_predef()) {
 	putf("with %s;\n", predef_pkg);
+	put_string("with Interfaces.C;\n");
+	put_string("with System;\n");
     }
 
     /* Include the <predef>.Ops package to get definitions
diff -urN portability.0/stdarg.ads portability/stdarg.ads
--- portability.0/stdarg.ads	1970-01-01 01:00:00.000000000 +0100
+++ portability/stdarg.ads	2007-12-16 21:50:07.000000000 +0100
@@ -0,0 +1,9 @@
+with System;
+
+package Stdarg is
+  subtype Arg is System.Address;
+  type Args is array (Natural range 0..0) of aliased Arg;
+  type Arglist is access Args;
+  pragma Convention(C, Arglist);
+  Empty : constant Arglist := null;
+end Stdarg;
