[80133] trunk/dports/devel/gperf

jeremyhu at macports.org jeremyhu at macports.org
Mon Jul 4 23:23:21 PDT 2011


Revision: 80133
          http://trac.macports.org/changeset/80133
Author:   jeremyhu at macports.org
Date:     2011-07-04 23:23:18 -0700 (Mon, 04 Jul 2011)
Log Message:
-----------
gperf: Ok, one last time cleaning up this inline-foo.

Modified Paths:
--------------
    trunk/dports/devel/gperf/Portfile
    trunk/dports/devel/gperf/files/c99.patch

Modified: trunk/dports/devel/gperf/Portfile
===================================================================
--- trunk/dports/devel/gperf/Portfile	2011-07-05 05:42:07 UTC (rev 80132)
+++ trunk/dports/devel/gperf/Portfile	2011-07-05 06:23:18 UTC (rev 80133)
@@ -5,7 +5,7 @@
 
 name			gperf
 version			3.0.4
-revision                1
+revision                2
 categories		devel
 maintainers		mcalhoun openmaintainer
 description		GNU perfect hash generator

Modified: trunk/dports/devel/gperf/files/c99.patch
===================================================================
--- trunk/dports/devel/gperf/files/c99.patch	2011-07-05 05:42:07 UTC (rev 80132)
+++ trunk/dports/devel/gperf/files/c99.patch	2011-07-05 06:23:18 UTC (rev 80133)
@@ -1,39 +1,18 @@
 --- src/output.cc.orig	2011-07-03 10:13:13.000000000 -0700
 +++ src/output.cc	2011-07-03 10:17:43.000000000 -0700
-@@ -745,12 +745,12 @@ Output::output_hash_function () const
+@@ -745,12 +745,10 @@ Output::output_hash_function () const
    if (option[CPLUSPLUS])
      printf ("inline ");
    else if (option[KRC] | option[C] | option[ANSIC])
 -    printf ("#ifdef __GNUC__\n"
-+    printf ("#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC_STDC_INLINE__)\n"
++    printf ("#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)\n"
 +            "inline\n"
 +            "#elif defined(__GNUC__)\n"
              "__inline\n"
 -            "#else\n"
 -            "#ifdef __cplusplus\n"
-+            "#elif defined(__cplusplus)\n"
-             "inline\n"
+-            "inline\n"
 -            "#endif\n"
              "#endif\n");
  
    if (/* The function does not use the 'str' argument?  */
-@@ -1892,12 +1892,13 @@ Output::output_lookup_function () const
-          warning: C99 inline functions are not supported; using GNU89
-          warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute
-        It defines a macro __GNUC_GNU_INLINE__ to indicate this situation.  */
--    printf ("#ifdef __GNUC__\n"
--            "__inline\n"
--            "#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__\n"
--            "__attribute__ ((__gnu_inline__))\n"
--            "#endif\n"
--            "#endif\n");
-+   printf ("#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC_STDC_INLINE__)\n"
-+           "static inline\n"
-+           "#elif defined(__GNUC__)\n"
-+           "__inline\n"
-+           "#elif defined(__cplusplus)\n"
-+           "inline\n"
-+           "#endif\n");
- 
-   printf ("%s%s\n",
-           const_for_struct, _return_type);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110704/71ad4244/attachment-0001.html>


More information about the macports-changes mailing list