Patch for a clean build



Hi again,
	I've attached a patch against 0.4.3 that gives me a clean
build(at least on linux-2.4.3, perl 5.005_03 and ORBit 0.5.7 anyways).

	I'll go through each of the changes quickly in the order that
they appear in the patch

   o specify prototypes behavior, xsubpp was complaining
   o typecast to avoid 'const' warning - hackish, I know ;)
   o two 'value computed is not used' - avoided in the perl headers by
     putting the void cast in front.
   o free_interface_info not used anywhere
   o check 'items' like the rest of the XS code. Could't find where to
     get hold of the interface name for the croak, though :(
   o MIN and MAX are not surrounded by #ifndef in /sys/param.h.

Good Luck,
Mark
diff -ur CORBA-ORBit-0.4.3.old/Makefile.PL CORBA-ORBit-0.4.3/Makefile.PL
--- CORBA-ORBit-0.4.3.old/Makefile.PL	Thu Apr  5 15:27:57 2001
+++ CORBA-ORBit-0.4.3/Makefile.PL	Thu Apr  5 17:35:22 2001
@@ -38,6 +38,7 @@
     'INC'	=> $orbit_cflags,
     'OBJECT'    => join(" ", @OBJECTS),
 #    'XSOPT'     => '-nolinenumbers',
+    'XSOPT'     => '-prototypes',
     'OPTIMIZE'  => '-g -Wall',
 #    'OPTIMIZE'  => '-O2 -Wall',
     'MAP_TARGET' => 'orbitperl',
Only in CORBA-ORBit-0.4.3: Makefile.old
diff -ur CORBA-ORBit-0.4.3.old/demarshal.c CORBA-ORBit-0.4.3/demarshal.c
--- CORBA-ORBit-0.4.3.old/demarshal.c	Thu Apr  5 15:27:57 2001
+++ CORBA-ORBit-0.4.3/demarshal.c	Thu Apr  5 17:53:00 2001
@@ -324,7 +324,7 @@
 		return NULL;
 	    }
 	    
-	    av_push (av, newSVpv(tc->subnames[i], 0));
+	    av_push (av, newSVpv((char *)tc->subnames[i], 0));
 	    av_push (av, val);
 	}
 	
diff -ur CORBA-ORBit-0.4.3.old/exttypes.c CORBA-ORBit-0.4.3/exttypes.c
--- CORBA-ORBit-0.4.3.old/exttypes.c	Thu Apr  5 15:27:57 2001
+++ CORBA-ORBit-0.4.3/exttypes.c	Thu Apr  5 17:59:11 2001
@@ -8,7 +8,7 @@
 {
     SV *rv;
     SV *result = newSV(0);
-    SvUPGRADE (result, SVt_NV);
+    (void)SvUPGRADE (result, SVt_NV);
     
     LL_VALUE(result) = val;
 
@@ -23,7 +23,7 @@
 {
     SV *rv;
     SV *result = newSV(0);
-    SvUPGRADE (result, SVt_NV);
+    (void)SvUPGRADE (result, SVt_NV);
     
     ULL_VALUE(result) = val;
 
diff -ur CORBA-ORBit-0.4.3.old/interfaces.c CORBA-ORBit-0.4.3/interfaces.c
--- CORBA-ORBit-0.4.3.old/interfaces.c	Thu Apr  5 15:27:57 2001
+++ CORBA-ORBit-0.4.3/interfaces.c	Thu Apr  5 18:27:52 2001
@@ -22,14 +22,6 @@
 	return (PORBitIfaceInfo *)SvIV(*result);
 }
 
-static void
-free_interface_info (PORBitIfaceInfo *info)
-{
-    g_free (info->pkg);
-    CORBA_free (info->desc);
-    g_free (info);
-}
-
 static PORBitIfaceInfo *
 store_interface_description (CORBA_InterfaceDef_FullInterfaceDescription *desc,
 			     const char *package_name)
@@ -120,6 +112,8 @@
 
 XS(_porbit_repoid) {
     dXSARGS;
+    if (items != 1)
+        croak("Usage: _repoid(self)");
 
     ST(0) = (SV *)CvXSUBANY(cv).any_ptr;
 
diff -ur CORBA-ORBit-0.4.3.old/porbit-perl.h CORBA-ORBit-0.4.3/porbit-perl.h
--- CORBA-ORBit-0.4.3.old/porbit-perl.h	Thu Apr  5 15:27:57 2001
+++ CORBA-ORBit-0.4.3/porbit-perl.h	Thu Apr  5 15:45:00 2001
@@ -5,6 +5,8 @@
  */
 #include "EXTERN.h"
 #undef DEBUG
+#undef MIN
+#undef MAX
 #include "perl.h"
 #undef DEBUG
 #include "XSUB.h"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]