[libgda/LIBGDA_5.2] Use #ifdef HAVE_LOCALE_H



commit 84895a98071a167b9ad776a481babfc4e497d816
Author: Vivien Malerba <malerba gnome-db org>
Date:   Sat Feb 6 19:06:20 2016 +0100

    Use #ifdef HAVE_LOCALE_H

 testing/gda-test-connection.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/testing/gda-test-connection.c b/testing/gda-test-connection.c
index 152c743..fece2ec 100644
--- a/testing/gda-test-connection.c
+++ b/testing/gda-test-connection.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006 - 2011 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2006 - 2016 Vivien Malerba <malerba gnome-db org>
  * Copyright (C) 2010 David King <davidk openismus com>
  * Copyright (C) 2016 Ting-Wei Lan <lantw44 gmail com>
  *
@@ -19,7 +19,9 @@
  */
 #include <libgda/libgda.h>
 #include <glib/gi18n-lib.h>
-#include <locale.h>
+#ifdef HAVE_LOCALE_H
+  #include <locale.h>
+#endif
 
 /* options */
 gchar *pass = NULL;
@@ -47,7 +49,9 @@ main (int argc, char **argv)
        GdaConnection *cnc;
        gchar *auth_string = NULL;
 
+#ifdef HAVE_LOCALE_H
        setlocale (LC_ALL, "");
+#endif
 
        /* command line parsing */
        context = g_option_context_new ("Tests opening a connection");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]