gnunet-fuse

GNUnet file-sharing directory mounting via FUSE
Log | Files | Refs | Submodules | README | LICENSE

commit f30089aa653700d6cbd7c5de8f6e0e0d2bcd5a60
parent 5e3ae1e8d8b6bf440b36ea2a6f553d4d365a8110
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Mon,  5 Dec 2022 13:30:32 +0900

Fix build against gnunet master (0.19)

Diffstat:
MINSTALL | 6+++---
Mconfigure.ac | 2+-
Msrc/fuse/ext_api.c | 5++---
Asrc/fuse/gettext.h | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/fuse/gnunet-fuse.c | 2+-
Msrc/fuse/gnunet-fuse.h | 13+++++++++++--
6 files changed, 90 insertions(+), 10 deletions(-)

diff --git a/INSTALL b/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* - Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software -Foundation, Inc. + Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free +Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -225,7 +225,7 @@ order to use an ANSI C compiler: and if that doesn't work, install pre-built binaries of GCC for HP-UX. - HP-UX 'make' updates targets which have the same time stamps as their + HP-UX 'make' updates targets which have the same timestamps as their prerequisites, which makes it generally unusable when shipped generated files such as 'configure' are involved. Use GNU 'make' instead. diff --git a/configure.ac b/configure.ac @@ -165,7 +165,7 @@ then gnunet=1 EXT_LIB_PATH="-L${lookin}/lib $EXT_LIB_PATH" ] - ),,[#include <gnunet/platform.h>] + ),, ) fi diff --git a/src/fuse/ext_api.c b/src/fuse/ext_api.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - Copyright (C) + Copyright (C) GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -21,9 +21,8 @@ /** * @file fuse/fuse_api.c * @brief API for ext - * @author + * @author */ -#include <gnunet/platform.h> #include <gnunet/gnunet_util_lib.h> #include "gnunet_fuse_service.h" diff --git a/src/fuse/gettext.h b/src/fuse/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/fuse/gnunet-fuse.c b/src/fuse/gnunet-fuse.c @@ -85,7 +85,7 @@ process_directory_entry (void *cls, const struct GNUNET_FS_Uri * uri, const struct - GNUNET_CONTAINER_MetaData * + GNUNET_FS_MetaData * meta, size_t length, const void *data) { diff --git a/src/fuse/gnunet-fuse.h b/src/fuse/gnunet-fuse.h @@ -25,10 +25,19 @@ #ifndef GNUNET_FUSE_H #define GNUNET_FUSE_H -#include <gnunet/platform.h> +#include <stdio.h> +#include <sys/ioctl.h> +#include <sys/wait.h> +#include <errno.h> +#include <signal.h> +#include <unistd.h> #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_resolver_service.h> #include <gnunet/gnunet_fs_service.h> +#include "gettext.h" + +#define _(String) dgettext (PACKAGE, String) + #define FUSE_USE_VERSION 26 #include <fuse.h> @@ -87,7 +96,7 @@ struct GNUNET_FUSE_PathInfo /** * meta data to corresponding path (can be NULL) */ - struct GNUNET_CONTAINER_MetaData *meta; + struct GNUNET_FS_MetaData *meta; /** * Name of the file for this path (i.e. "home"). '/' for the root (all other