gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog configure.ac libbase/tu_types.h...


From: Markus Gothe
Subject: [Gnash-commit] gnash ChangeLog configure.ac libbase/tu_types.h...
Date: Wed, 11 Oct 2006 18:53:53 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Markus Gothe <nihilus>  06/10/11 18:53:53

Modified files:
        .              : ChangeLog configure.ac 
        libbase        : tu_types.h 
        plugin         : plugin.h 

Log message:
                * configure.ac: Check for __FUNCTION__, __PRETTY__FUNCTION and 
                  __func__.
                * libbase/tu_types.h, plugin.h: Redefine __FUNCTION__.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1151&r2=1.1152
http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.149&r2=1.150
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/tu_types.h?cvsroot=gnash&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/plugin.h?cvsroot=gnash&r1=1.26&r2=1.27

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1151
retrieving revision 1.1152
diff -u -b -r1.1151 -r1.1152
--- ChangeLog   11 Oct 2006 17:04:51 -0000      1.1151
+++ ChangeLog   11 Oct 2006 18:53:53 -0000      1.1152
@@ -1,3 +1,9 @@
+2006-10-11 Markus Gothe <address@hidden>
+
+       * configure.ac: Check for __FUNCTION__, __PRETTY__FUNCTION and 
+         __func__.
+       * libbase/tu_types.h, plugin.h: Redefine __FUNCTION__.
+
 2006-10-11 Sandro Santilli <address@hidden>
 
        * testsuite/Makefile.am: descend in actionscript.all last

Index: configure.ac
===================================================================
RCS file: /sources/gnash/gnash/configure.ac,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -b -r1.149 -r1.150
--- configure.ac        11 Oct 2006 16:25:12 -0000      1.149
+++ configure.ac        11 Oct 2006 18:53:53 -0000      1.150
@@ -33,7 +33,7 @@
 dnl also makes it possible to release a modified version which carries
 dnl forward this exception.
 
-dnl $Id: configure.ac,v 1.149 2006/10/11 16:25:12 strk Exp $
+dnl $Id: configure.ac,v 1.150 2006/10/11 18:53:53 nihilus Exp $
 
 AC_PREREQ(2.50)
 AC_INIT(gnash, 0.7.1-cvs)
@@ -409,6 +409,45 @@
   AC_DEFINE(HAVE_ISFINITE, [], [Has isfinite])
 fi
 
+AC_CACHE_CHECK([whether $CC implements __PRETTY_FUNCTION__], 
ac_cv_cc_implements___PRETTY_FUNCTION__, [
+        AC_TRY_LINK([
+#include <stdio.h>
+], 
+                [ printf("%s", __PRETTY_FUNCTION__); ], 
+                [ ac_cv_cc_implements___PRETTY_FUNCTION__="yes" ],
+                [ ac_cv_cc_implements___PRETTY_FUNCTION__="no" ]
+        )
+])
+if test "x$ac_cv_cc_implements___PRETTY_FUNCTION__" = "xyes" ; then
+        AC_DEFINE(HAVE_PRETTY_FUNCTION, [1], [__PRETTY_FUNCTION__ is defined])
+fi
+
+AC_CACHE_CHECK([whether $CC implements __FUNCTION__], 
ac_cv_cc_implements___FUNCTION__, [
+        AC_TRY_LINK([
+#include <stdio.h>
+], 
+                [ printf("%s", __FUNCTION__); ], 
+                [ ac_cv_cc_implements___FUNCTION__="yes" ],
+                [ ac_cv_cc_implements___FUNCTION__="no" ]
+        )
+])
+if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
+        AC_DEFINE(HAVE_FUNCTION, [1], [__FUNCTION__ is defined])
+fi
+
+AC_CACHE_CHECK([whether $CC implements __func__], 
ac_cv_cc_implements___func__, [
+        AC_TRY_LINK([
+#include <stdio.h>
+], 
+                [ printf("%s", __func__); ], 
+                [ ac_cv_cc_implements___func__="yes" ],
+                [ ac_cv_cc_implements___func__="no" ]
+        )
+])
+if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
+        AC_DEFINE(HAVE_func, [1], [__func__ is defined])
+fi
+
 AC_REPLACE_FUNCS(getopt)
 
 AC_CHECK_FUNCS(sysconf)

Index: libbase/tu_types.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/tu_types.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- libbase/tu_types.h  21 Sep 2006 06:41:11 -0000      1.25
+++ libbase/tu_types.h  11 Oct 2006 18:53:53 -0000      1.26
@@ -59,12 +59,17 @@
 # include <inttypes.h>
 #endif
 
-#if ((!defined(__PRETTY_FUNCTION__) || !defined(__FUNCTION__)) && 
!defined(_WIN32) && !defined(WIN32) && !defined(__GNUC))
-       #ifndef __FUNCTION__    
+#ifndef HAVE_FUNCTION
+       #ifndef HAVE_func
                #define dummystr(x) # x
                #define dummyestr(x) dummystr(x)
                #define __FUNCTION__ __FILE__":"dummyestr(__LINE__)             
+       #else
+               #define __FUNCTION__ __func__   
        #endif
+#endif
+
+#ifndef HAVE_PRETTY_FUNCTION
        #define __PRETTY_FUNCTION__ __FUNCTION__
 #endif
 

Index: plugin/plugin.h
===================================================================
RCS file: /sources/gnash/gnash/plugin/plugin.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- plugin/plugin.h     7 Oct 2006 19:21:49 -0000       1.26
+++ plugin/plugin.h     11 Oct 2006 18:53:53 -0000      1.27
@@ -35,7 +35,7 @@
 // 
 //
 
-/* $Id: plugin.h,v 1.26 2006/10/07 19:21:49 nihilus Exp $ */
+/* $Id: plugin.h,v 1.27 2006/10/11 18:53:53 nihilus Exp $ */
 
 #ifndef __PLUGIN_H__
 #define __PLUGIN_H__
@@ -44,12 +44,17 @@
 #include "config.h"
 #endif
 
-#if ((!defined(__PRETTY_FUNCTION__) || !defined(__FUNCTION__)) && 
!defined(_WIN32) && !defined(WIN32) && !defined(__GNUC))
-       #ifndef __FUNCTION__    
+#ifndef HAVE_FUNCTION
+       #ifndef HAVE_func
                #define dummystr(x) # x
                #define dummyestr(x) dummystr(x)
                #define __FUNCTION__ __FILE__":"dummyestr(__LINE__)             
+       #else
+               #define __FUNCTION__ __func__   
        #endif
+#endif
+
+#ifndef HAVE_PRETTY_FUNCTION
        #define __PRETTY_FUNCTION__ __FUNCTION__
 #endif
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]