[Xfce4-commits] [xfce/xfconf] 01/01: Fix this use of "defined" may not be portable
noreply at xfce.org
noreply at xfce.org
Sun Apr 14 23:40:42 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/xfconf.
commit 255db425a00c5557079aeebc69da5d710e3a9f5c
Author: Andre Miranda <andreldm at xfce.org>
Date: Sun Apr 14 18:40:32 2019 -0300
Fix this use of "defined" may not be portable
---
common/make-exo-alias.pl | 46 +++++++++++++++++++++++-----------------------
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/common/make-exo-alias.pl b/common/make-exo-alias.pl
index ffc8189..aec17d8 100644
--- a/common/make-exo-alias.pl
+++ b/common/make-exo-alias.pl
@@ -34,26 +34,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;
@@ -104,10 +84,30 @@ while (<>)
print $_;
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