RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Ralf S. Engelschall
Root: /v/rpm/cvs Email: rse@rpm5.org
Module: rpm Date: 19-Jul-2007 16:51:03
Branch: HEAD Handle: 2007071915510300
Modified files:
rpm system.h
Log:
Final step in getting RPM 5 building with the non-GCC-derived compiler
Sun Studio 12 (under Fedora 7): the __FUNCTION__ is a GCC'ism. C99 has
__func__ but we cannot assume this is always available for us. So, stay
with the GCC symbol name but provide a proper fallback so RPM can be
compiled with non-GCC compilers, too.
Summary:
Revision Changes Path
2.69 +9 -0 rpm/system.h
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/system.h
============================================================================
$ cvs diff -u -r2.68 -r2.69 system.h
--- rpm/system.h 16 Jul 2007 09:14:56 -0000 2.68
+++ rpm/system.h 19 Jul 2007 14:51:03 -0000 2.69
@@ -709,4 +709,13 @@
}
#endif
+/* provide fallback definition for GCC function name symbol */
+#if !defined(__FUNCTION__) || !(defined(__GNUC__) && __GNUC__ >= 2)
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#define __FUNCTION__ __func__
+#else
+#define __FUNCTION__ "<unknown>"
+#endif
+#endif
+
#endif /* H_SYSTEM */
@@ .
Received on Thu Jul 19 16:51:04 2007