[Xfce4-commits] [xfce/exo] 01/01: Renable expansion-to-define flag

noreply at xfce.org noreply at xfce.org
Sun Apr 14 23:35:36 CEST 2019


This is an automated email from the git hooks/post-receive script.

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/exo.

commit c853d80cf046960fa1ed044c3b900679b5734999
Author: Andre Miranda <andreldm at xfce.org>
Date:   Sun Apr 14 18:34:46 2019 -0300

    Renable expansion-to-define flag
---
 configure.ac.in       |  5 -----
 exo/make-exo-alias.pl | 44 ++++++++++++++++++++++----------------------
 2 files changed, 22 insertions(+), 27 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 9281a9e..33c601d 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -243,11 +243,6 @@ dnl *************************************
 XDT_SUPPORTED_FLAGS([GTK_DOC_EXTRA_CFLAGS], [-Wno-sign-compare])
 AC_SUBST([GTK_DOC_EXTRA_CFLAGS])
 
-dnl **********************************************
-dnl *** Disable -Wexpansion-to-defined (gcc 7) ***
-dnl **********************************************
-XDT_SUPPORTED_FLAGS([CFLAGS], [-Wno-expansion-to-defined])
-
 dnl *************************************
 dnl *** Use GSEAL if possible         ***
 dnl *************************************
diff --git a/exo/make-exo-alias.pl b/exo/make-exo-alias.pl
index d627d9a..5d423ea 100644
--- a/exo/make-exo-alias.pl
+++ b/exo/make-exo-alias.pl
@@ -35,26 +35,6 @@ print <<EOF;
 
 EOF
 
-if ($option_def)
-  {
-    print <<EOF
-#undef IN_HEADER
-#define IN_HEADER(x) 1
-
-#undef IN_SOURCE
-#define IN_SOURCE defined
-
-EOF
-  }
-else
-  {
-    print <<EOF
-#define IN_HEADER defined
-#define IN_SOURCE(x) 1
-
-EOF
-  }
-
 my $in_comment = 0;
 my $in_skipped_section = 0;
 
@@ -106,9 +86,29 @@ while (<>)
         next;
       }
    
-    if ($_ =~ /^\#if.*(IN_SOURCE|IN_HEADER)/)
+    if ($_ =~ /^\#if.*IN_SOURCE\((.*)\)/)
       {
-        print $_;
+        if ($option_def)
+          {
+            print "#ifdef $1\n";
+          }
+        else
+          {
+            print "#if 1\n";
+          }
+        next;
+      }
+
+    if ($_ =~ /^\#if.*IN_HEADER\((.*)\)/)
+      {
+        if ($option_def)
+          {
+            print "#if 1\n";
+          }
+        else
+          {
+            print "#ifdef $1\n";
+          }
         next;
       }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list