[svn:parrot] r37741 - in trunk: config/gen/config_h config/gen/platform/generic src

cotto at svn.parrot.org cotto at svn.parrot.org
Thu Mar 26 07:40:03 UTC 2009


Author: cotto
Date: Thu Mar 26 07:40:01 2009
New Revision: 37741
URL: https://trac.parrot.org/parrot/changeset/37741

Log:
[h] move inclusions of execinfo and dlfnc headers into a template, fixing make cover on Linux x86

Modified:
   trunk/config/gen/config_h/feature_h.in
   trunk/config/gen/platform/generic/dl.c
   trunk/src/exceptions.c

Modified: trunk/config/gen/config_h/feature_h.in
==============================================================================
--- trunk/config/gen/config_h/feature_h.in	Thu Mar 26 05:07:50 2009	(r37740)
+++ trunk/config/gen/config_h/feature_h.in	Thu Mar 26 07:40:01 2009	(r37741)
@@ -145,10 +145,15 @@
 if (defined @backtrace@) {
     print OUT <<"END_PRINT";
 #define PARROT_HAS_BACKTRACE
+#include <execinfo.h>
+//__USE_GNU seems to mess up stdio.h on Linux; only include it for dlfcn.h ifndef
 #ifndef __USE_GNU
 #  define __USE_GNU
+#  include <dlfcn.h>
+#  undef __USE_GNU
+#else
+#  include <dlfcn.h>
 #endif
-#include <dlfcn.h>
 END_PRINT
 }
 

Modified: trunk/config/gen/platform/generic/dl.c
==============================================================================
--- trunk/config/gen/platform/generic/dl.c	Thu Mar 26 05:07:50 2009	(r37740)
+++ trunk/config/gen/platform/generic/dl.c	Thu Mar 26 07:40:01 2009	(r37741)
@@ -21,10 +21,6 @@
 
 */
 
-#ifdef PARROT_HAS_HEADER_DLFCN
-#  include <dlfcn.h>
-#endif
-
 #define PARROT_DLOPEN_FLAGS RTLD_LAZY
 
 /*

Modified: trunk/src/exceptions.c
==============================================================================
--- trunk/src/exceptions.c	Thu Mar 26 05:07:50 2009	(r37740)
+++ trunk/src/exceptions.c	Thu Mar 26 07:40:01 2009	(r37741)
@@ -23,13 +23,6 @@
 #include "exceptions.str"
 #include "pmc/pmc_continuation.h"
 
-#ifdef PARROT_HAS_BACKTRACE
-#  include <execinfo.h>
-#  ifdef PARROT_HAS_DLINFO
-#    include <dlfcn.h>
-#  endif
-#endif
-
 /* HEADERIZER HFILE: include/parrot/exceptions.h */
 
 /* HEADERIZER BEGIN: static */


More information about the parrot-commits mailing list