New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 80133


Ignore:
Timestamp:
07/04/11 23:23:18 (4 years ago)
Author:
jeremyhu@…
Message:

gperf: Ok, one last time cleaning up this inline-foo.

Location:
trunk/dports/devel/gperf
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/devel/gperf/Portfile

    r80132 r80133  
    66name                    gperf 
    77version                 3.0.4 
    8 revision                1 
     8revision                2 
    99categories              devel 
    1010maintainers             mcalhoun openmaintainer 
  • trunk/dports/devel/gperf/files/c99.patch

    r80132 r80133  
    11--- src/output.cc.orig  2011-07-03 10:13:13.000000000 -0700 
    22+++ src/output.cc       2011-07-03 10:17:43.000000000 -0700 
    3 @@ -745,12 +745,12 @@ Output::output_hash_function () const 
     3@@ -745,12 +745,10 @@ Output::output_hash_function () const 
    44   if (option[CPLUSPLUS]) 
    55     printf ("inline "); 
    66   else if (option[KRC] | option[C] | option[ANSIC]) 
    77-    printf ("#ifdef __GNUC__\n" 
    8 +    printf ("#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC_STDC_INLINE__)\n" 
     8+    printf ("#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)\n" 
    99+            "inline\n" 
    1010+            "#elif defined(__GNUC__)\n" 
     
    1212-            "#else\n" 
    1313-            "#ifdef __cplusplus\n" 
    14 +            "#elif defined(__cplusplus)\n" 
    15              "inline\n" 
     14-            "inline\n" 
    1615-            "#endif\n" 
    1716             "#endif\n"); 
    1817  
    1918   if (/* The function does not use the 'str' argument?  */ 
    20 @@ -1892,12 +1892,13 @@ Output::output_lookup_function () const 
    21           warning: C99 inline functions are not supported; using GNU89 
    22           warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute 
    23         It defines a macro __GNUC_GNU_INLINE__ to indicate this situation.  */ 
    24 -    printf ("#ifdef __GNUC__\n" 
    25 -            "__inline\n" 
    26 -            "#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__\n" 
    27 -            "__attribute__ ((__gnu_inline__))\n" 
    28 -            "#endif\n" 
    29 -            "#endif\n"); 
    30 +   printf ("#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC_STDC_INLINE__)\n" 
    31 +           "static inline\n" 
    32 +           "#elif defined(__GNUC__)\n" 
    33 +           "__inline\n" 
    34 +           "#elif defined(__cplusplus)\n" 
    35 +           "inline\n" 
    36 +           "#endif\n"); 
    37   
    38    printf ("%s%s\n", 
    39            const_for_struct, _return_type); 
Note: See TracChangeset for help on using the changeset viewer.