[Xfce4-commits] [xfce/libxfce4ui] 01/01: Fix this use of "defined" may not be portable

noreply at xfce.org noreply at xfce.org
Sun Apr 14 23:39:30 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/libxfce4ui.

commit 9e5a1578186b8ed59f1c83da0a9aa824e70eeffc
Author: Andre Miranda <andreldm at xfce.org>
Date:   Sun Apr 14 18:39:15 2019 -0300

    Fix this use of "defined" may not be portable
---
 libxfce4ui/make-libxfce4ui-alias.pl | 44 ++++++++++++++++++-------------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/libxfce4ui/make-libxfce4ui-alias.pl b/libxfce4ui/make-libxfce4ui-alias.pl
index 0a2ac5d..8caa42e 100644
--- a/libxfce4ui/make-libxfce4ui-alias.pl
+++ b/libxfce4ui/make-libxfce4ui-alias.pl
@@ -36,26 +36,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;
 
@@ -107,9 +87,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