gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-gtk] branch master updated: -remove platform.h dependency


From: gnunet
Subject: [gnunet-gtk] branch master updated: -remove platform.h dependency
Date: Mon, 05 Dec 2022 04:50:52 +0100

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

martin-schanzenbach pushed a commit to branch master
in repository gnunet-gtk.

The following commit(s) were added to refs/heads/master by this push:
     new e5063df3 -remove platform.h dependency
e5063df3 is described below

commit e5063df3ca6099beec7b160f47bec9465590ac74
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Mon Dec 5 12:50:44 2022 +0900

    -remove platform.h dependency
---
 src/fs/gnunet-fs-gtk.h      |  2 +-
 src/include/gettext.h       | 72 +++++++++++++++++++++++++++++++++++++++++++++
 src/include/gnunet_gtk.h    | 10 ++++++-
 src/setup/gnunet-setup.h    |  2 +-
 src/statistics/functions.c  |  1 -
 src/statistics/statistics.c |  1 -
 6 files changed, 83 insertions(+), 5 deletions(-)

diff --git a/src/fs/gnunet-fs-gtk.h b/src/fs/gnunet-fs-gtk.h
index 5fb46ddf..4a323459 100644
--- a/src/fs/gnunet-fs-gtk.h
+++ b/src/fs/gnunet-fs-gtk.h
@@ -34,7 +34,7 @@
 #if HAVE_EXTRACTOR_H
 #include <extractor.h>
 #endif
-
+#include <sys/stat.h>
 
 /**
  * Context for a GNS lookup for starting a search.
diff --git a/src/include/gettext.h b/src/include/gettext.h
new file mode 100644
index 00000000..6e98f197
--- /dev/null
+++ b/src/include/gettext.h
@@ -0,0 +1,72 @@
+/* Convenience header for conditional use of GNU <libintl.h>.
+   Copyright Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 3, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+   USA.  */
+
+#ifndef _LIBGETTEXT_H
+#define _LIBGETTEXT_H 1
+
+/* NLS can be disabled through the configure --disable-nls option.  */
+#if ENABLE_NLS
+
+/* Get declarations of GNU message catalog functions.  */
+
+#include <libintl.h>
+
+#else
+
+/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
+   chokes if dcgettext is defined as a macro.  So include it now, to make
+   later inclusions of <locale.h> a NOP.  We don't include <libintl.h>
+   as well because people using "gettext.h" will not include <libintl.h>,
+   and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
+   is GNUNET_OK.  */
+#if defined(__sun)
+#include <locale.h>
+#endif
+
+/* Disabled NLS.
+   The casts to 'const char *' serve the purpose of producing warnings
+   for invalid uses of the value returned from these functions.
+   On pre-ANSI systems without 'const', the config.h file is supposed to
+   contain "#define const".  */
+#define gettext(Msgid) ((const char *) (Msgid))
+#define dgettext(Domainname, Msgid) ((const char *) (Msgid))
+#define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
+#define ngettext(Msgid1, Msgid2, N) \
+  ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+#define dngettext(Domainname, Msgid1, Msgid2, N) \
+  ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+#define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
+  ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+/* slight modification here to avoid warnings: generate GNUNET_NO code,
+   not even the cast... */
+#define textdomain(Domainname)
+#define bindtextdomain(Domainname, Dirname)
+#define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
+
+#endif
+
+/* A pseudo function call that serves as a marker for the automated
+   extraction of messages, but does not call gettext().  The run-time
+   translation is done at a different place in the code.
+   The argument, String, should be a literal string.  Concatenated strings
+   and other string expressions won't work.
+   The macro's expansion is not parenthesized, so that it is suitable as
+   initializer for static 'char[]' or 'const char[]' variables.  */
+#define gettext_noop(String) String
+
+#endif /* _LIBGETTEXT_H */
diff --git a/src/include/gnunet_gtk.h b/src/include/gnunet_gtk.h
index a2fdb67e..d495f5c2 100644
--- a/src/include/gnunet_gtk.h
+++ b/src/include/gnunet_gtk.h
@@ -33,13 +33,13 @@
 #endif
 #endif
 
-#include <gnunet/platform.h>
 #include <gnunet/gnunet_util_lib.h>
 #include <gnunet/gnunet_extractor_compat.h>
 #include <gnunet/gnunet_fs_service.h>
 #include <gtk/gtk.h>
 #include <gladeui/glade.h>
 #include <gdk/gdkkeysyms.h>
+#include "gettext.h"
 #ifndef GDK_KEY_Return
 #define GDK_KEY_Return GDK_Return
 #endif
@@ -47,6 +47,13 @@
 #define GDK_KEY_Delete GDK_Delete
 #endif
 
+#define _(String) dgettext (PACKAGE, String)
+
+#define DIR_SEPARATOR_STR "/"
+
+#define DIR_SEPARATOR '/'
+
+
 /**
  * Handle for our main loop.
  */
@@ -439,5 +446,6 @@ GNUNET_GTK_get_selected_anonymity_combo_level (GtkComboBox 
*combo,
                                                guint *p_level);
 
 
+
 #endif
 /* end of gnunet_gtk.h */
diff --git a/src/setup/gnunet-setup.h b/src/setup/gnunet-setup.h
index c4f54f1c..c59acd1f 100644
--- a/src/setup/gnunet-setup.h
+++ b/src/setup/gnunet-setup.h
@@ -30,7 +30,7 @@
 #include <gnunet/gnunet_util_lib.h>
 #include <gladeui/glade.h>
 #include <gtk/gtk.h>
-
+#include <pwd.h>
 
 /**
  * Name of the configuration file.
diff --git a/src/statistics/functions.c b/src/statistics/functions.c
index ca265b53..9ca97b67 100644
--- a/src/statistics/functions.c
+++ b/src/statistics/functions.c
@@ -19,7 +19,6 @@
 
 */
 
-#include "platform.h"
 #include "gnunetgtk_common.h"
 #include <GNUnet/gnunet_util_cron.h>
 #include <GNUnet/gnunet_stats_lib.h>
diff --git a/src/statistics/statistics.c b/src/statistics/statistics.c
index ddab959f..f4f4df9d 100644
--- a/src/statistics/statistics.c
+++ b/src/statistics/statistics.c
@@ -21,7 +21,6 @@
      gnome-system-monitor v2.0.5, Copyright (C) 2001 Kevin Vandersloot
 */
 
-#include "platform.h"
 #include "gnunetgtk_common.h"
 #include <GNUnet/gnunet_stats_lib.h>
 #include <GNUnet/gnunet_getoption_lib.h>

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]