[PATCH:xmag] Protect config.h with HAVE_CONFIG_H.

2015-07-21 Thread Thomas Klausner
Signed-off-by: Thomas Klausner w...@netbsd.org
---
 Scale.c | 2 ++
 xmag.c  | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/Scale.c b/Scale.c
index f32aeec..ce2064a 100644
--- a/Scale.c
+++ b/Scale.c
@@ -30,7 +30,9 @@ from The Open Group.
  * Author:  Davor Matic, MIT X Consortium
  */
 
+#ifdef HAVE_CONFIG_H
 #include config.h
+#endif
 
 #include stdio.h
 #include ctype.h
diff --git a/xmag.c b/xmag.c
index e1d6505..c4a88ea 100644
--- a/xmag.c
+++ b/xmag.c
@@ -26,7 +26,9 @@ from The Open Group.
 
 */
 
+#ifdef HAVE_CONFIG_H
 #include config.h
+#endif
 
 #include stdlib.h/* for exit() and abs() */
 #include stdio.h
-- 
2.4.6

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH:xmag] Protect config.h with HAVE_CONFIG_H.

2015-07-21 Thread Alan Coopersmith

On 07/21/15 02:07 PM, Thomas Klausner wrote:

Signed-off-by: Thomas Klausner w...@netbsd.org
---
  Scale.c | 2 ++
  xmag.c  | 2 ++
  2 files changed, 4 insertions(+)

diff --git a/Scale.c b/Scale.c
index f32aeec..ce2064a 100644
--- a/Scale.c
+++ b/Scale.c
@@ -30,7 +30,9 @@ from The Open Group.
   * Author:  Davor Matic, MIT X Consortium
   */

+#ifdef HAVE_CONFIG_H
  #include config.h
+#endif

  #include stdio.h
  #include ctype.h
diff --git a/xmag.c b/xmag.c
index e1d6505..c4a88ea 100644
--- a/xmag.c
+++ b/xmag.c
@@ -26,7 +26,9 @@ from The Open Group.

  */

+#ifdef HAVE_CONFIG_H
  #include config.h
+#endif

  #include stdlib.h /* for exit() and abs() */
  #include stdio.h



Reviewed-by: Alan Coopersmith alan.coopersm...@oracle.com

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel