Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libintl.h problem #3

Open
hathlife opened this issue Apr 3, 2018 · 7 comments
Open

libintl.h problem #3

hathlife opened this issue Apr 3, 2018 · 7 comments
Assignees

Comments

@hathlife
Copy link

hathlife commented Apr 3, 2018

I do not know how you did before ,but It's 2018 now,and now the NDK kit provided by Google does not longer contain libintl.h header.I tried to find some replacement,but they all won't work.
So I just want to ask you for the header(or libraries) that you used to build.

@eugals eugals self-assigned this Apr 3, 2018
@eugals
Copy link
Owner

eugals commented Apr 3, 2018

@hathlife

So I just want to ask you for the header(or libraries) that you used to build.

I've upgraded my machine some time ago, so now I don't have any NDK installed at hand, sorry.

I'll take a look what can be done to restore the build later this week though.

@eugals eugals added the bug label Apr 3, 2018
eugals added a commit that referenced this issue Apr 3, 2018
```
[armeabi-v7a] Compile thumb  : ffi <= sysv.S
C:/Work/GTKAndroid/clibs/gtk/../ffi/distsrc/src/arm/sysv.S: Assembler
messages:
C:/Work/GTKAndroid/clibs/gtk/../ffi/distsrc/src/arm/sysv.S:210: Error:
selected processor does not support `stfeqs f0,[r2]' in ARM mode
C:/Work/GTKAndroid/clibs/gtk/../ffi/distsrc/src/arm/sysv.S:215: Error:
selected processor does not support `stfeqd f0,[r2]' in ARM mode
C:/Work/GTKAndroid/clibs/gtk/../ffi/distsrc/src/arm/sysv.S:283: Error:
selected processor does not support `ldfs f0,[sp]' in ARM mode
C:/Work/GTKAndroid/clibs/gtk/../ffi/distsrc/src/arm/sysv.S:286: Error:
selected processor does not support `ldfd f0,[sp]' in ARM mode
C:/Work/GTKAndroid/clibs/gtk/../ffi/distsrc/src/arm/sysv.S:289: Error:
selected processor does not support `ldfd f0,[sp]' in ARM mode
clang.exe: error: assembler command failed with exit code 1 (use -v to
see invocation)
```
related to #3
@eugals
Copy link
Owner

eugals commented Apr 3, 2018

@hathlife

OK, the good news is I've resolved this libintl.h problem as well as several other ones along the road.
So the compilation phase finishes successfully now.

The bad news is the linker fails with the following error now:

clibs/gtk/../atk/distsrc/atk/atkobject.c:1571: error: undefined reference to 'dgettext'
clibs/gtk/../atk/distsrc/atk/atkvalue.c:743: error: undefined reference to 'dgettext'
clibs/gtk/../gio/../glib/distsrc/gio/gresource.c:291: error: undefined reference to 'gettext'
clibs/gtk/../gio/../glib/distsrc/gio/gresource.c:456: error: undefined reference to 'gettext'
clibs/gtk/../gio/../glib/distsrc/gio/gresource.c:539: error: undefined reference to 'gettext'
clibs/gtk/../gio/../glib/distsrc/gio/gresource.c:556: error: undefined reference to 'gettext'
clibs/gtk/../gio/../glib/distsrc/gio/gdbusmessage.c:3464: error: undefined reference to 'major'
clibs/gtk/../gio/../glib/distsrc/gio/gdbusmessage.c:3464: error: undefined reference to 'minor'
clibs/gtk/../gio/../glib/distsrc/gio/gdbusmessage.c:3474: error: undefined reference to 'major'
clibs/gtk/../gio/../glib/distsrc/gio/gdbusmessage.c:3474: error: undefined reference to 'minor'
clibs/gtk/../gio/../glib/distsrc/gio/gunixconnection.c:159: error: undefined reference to 'ngettext'
clibs/gtk/../gio/../glib/distsrc/gio/gunixconnection.c:193: error: undefined reference to 'ngettext'
clibs/gtk/../gio/../glib/distsrc/gio/gunixconnection.c:554: error: undefined reference to 'ngettext'
clibs/gtk/../gdk-pixbuf/distsrc/gdk-pixbuf/gdk-pixbuf-util.c:384: error: undefined reference to 'bindtextdomain'
clibs/gtk/../gdk-pixbuf/distsrc/gdk-pixbuf/gdk-pixbuf-util.c:386: error: undefined reference to 'bind_textdomain_codeset'
clibs/gtk/../fontconfig/distsrc/src/fcfreetype.c:700: error: undefined reference to 'iconv_open'
clibs/gtk/../fontconfig/distsrc/src/fcfreetype.c:710: error: undefined reference to 'iconv_close'
clibs/gtk/../fontconfig/distsrc/src/fcfreetype.c:719: error: undefined reference to 'iconv'
clibs/gtk/../fontconfig/distsrc/src/fcfreetype.c:724: error: undefined reference to 'iconv_close'
clibs/gtk/../fontconfig/distsrc/src/fcfreetype.c:729: error: undefined reference to 'iconv_close'
clibs/gtk/../glib/distsrc\glib/gconvert.c:176: error: undefined reference to 'iconv_open'
clibs/gtk/../glib/distsrc\glib/gconvert.c:279: error: undefined reference to 'iconv'
clibs/gtk/../glib/distsrc\glib/gconvert.c:302: error: undefined reference to 'iconv_close'

As I understand the problem is in the android/support which was previously providing all those symbols but now it doesn't.
I have no quick solution to this problem at present and I can't say when exactly I'll find time to make a deep look into it as I'm busy with other projects, sorry.

@hathlife
Copy link
Author

hathlife commented Apr 4, 2018

It seems that I should manually complie libiconv & gettext libraries for NDK. I would try it later after class.
or you can add these two libs in to cilb/ .

@hathlife
Copy link
Author

hathlife commented Apr 4, 2018

I find a replacement of gettext: https://github.com/hathlife/libintl-lite/
you can try it when you are free.

@hathlife
Copy link
Author

hathlife commented Apr 6, 2018

Here’s the patch about how to fix libffi complie issue for armeabi-v7a architecture:
http://danilogiulianelli.blogspot.com/2013/01/?m=1

@hathlife
Copy link
Author

hathlife commented Apr 17, 2018

Using a prebuilt gettext library to build . and I get this:

In file included from /mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/ggettext.c:43:
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:134:23: error: expected identifier or '('
extern char *gettext (const char *__msgid)
                      ^
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:134:23: error: expected ')'
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:134:14: note: to match this '('
extern char *gettext (const char *__msgid)
             ^
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/glibintl.h:33:25: note: expanded from macro 'gettext'
#define gettext(String) (String)
                        ^
In file included from /mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/ggettext.c:43:
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:152:50: error: expected identifier or '('
extern char *dgettext (const char *__domainname, const char *__msgid)
                                                 ^
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:152:50: error: expected ')'
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:152:14: note: to match this '('
extern char *dgettext (const char *__domainname, const char *__msgid)
             ^
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/glibintl.h:34:33: note: expanded from macro 'dgettext'
#define dgettext(Domain,String) (String)
                                ^
In file included from /mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/ggettext.c:43:
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:172:51: error: expected identifier or '('
extern char *dcgettext (const char *__domainname, const char *__msgid,
                                                  ^
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:172:51: error: expected ')'
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:172:14: note: to match this '('
extern char *dcgettext (const char *__domainname, const char *__msgid,
             ^
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/glibintl.h:35:39: note: expanded from macro 'dcgettext'
#define dcgettext(Domain,String,Type) (String)
                                      ^
In file included from /mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/ggettext.c:43:
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:217:25: error: expected identifier or '('
                        unsigned long int __n)
                        ^
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:217:25: error: expected ')'
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:215:14: note: to match this '('
extern char *dngettext (const char *__domainname,
             ^
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/glibintl.h:36:46: note: expanded from macro 'dngettext'
#define dngettext(Domain,String1,String2,N) ((N) == 1 ? (String1) : (String2))
                                             ^
In file included from /mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/ggettext.c:43:
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:215:14: error: expected ')'
extern char *dngettext (const char *__domainname,
             ^
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/glibintl.h:36:50: note: expanded from macro 'dngettext'
#define dngettext(Domain,String1,String2,N) ((N) == 1 ? (String1) : (String2))
                                                 ^
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:215:14: note: to match this '('
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/glibintl.h:36:45: note: expanded from macro 'dngettext'
#define dngettext(Domain,String1,String2,N) ((N) == 1 ? (String1) : (String2))
                                            ^
In file included from /mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/ggettext.c:43:
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:261:26: error: expected identifier or '('
extern char *textdomain (const char *__domainname)
                         ^
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:261:26: error: expected ')'
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:261:14: note: to match this '('
extern char *textdomain (const char *__domainname)
             ^
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/glibintl.h:32:29: note: expanded from macro 'textdomain'
#define textdomain(String) ((String) ? (String) : "messages")
                            ^
In file included from /mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/ggettext.c:43:
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:261:14: error: expected ')'
extern char *textdomain (const char *__domainname)
             ^
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/glibintl.h:32:38: note: expanded from macro 'textdomain'
#define textdomain(String) ((String) ? (String) : "messages")
                                     ^
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:261:14: note: to match this '('
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/glibintl.h:32:28: note: expanded from macro 'textdomain'
#define textdomain(String) ((String) ? (String) : "messages")
                           ^
In file included from /mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/ggettext.c:43:
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:279:30: error: expected identifier or '('
extern char *bindtextdomain (const char *__domainname, const char *__dirname)
                             ^
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:279:30: error: expected ')'
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:279:14: note: to match this '('
extern char *bindtextdomain (const char *__domainname, const char *__dirname)
             ^
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/glibintl.h:37:42: note: expanded from macro 'bindtextdomain' #define bindtextdomain(Domain,Directory) (Domain)
                                         ^
In file included from /mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/ggettext.c:43:
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:299:8: error: expected identifier or '('
       _INTL_ASM (libintl_bind_textdomain_codeset);
       ^
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/../gettext/libintl.h:104:27: note: expanded from macro '_INTL_ASM'
# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
                          ^
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/ggettext.c:107:23: warning: expression result unused
      [-Wunused-value]
      bindtextdomain (GETTEXT_PACKAGE, GLIB_LOCALE_DIR);
                      ^~~~~~~~~~~~~~~
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/config.h.win32:38:25: note: expanded from macro 'GETTEXT_PACKAGE' #define GETTEXT_PACKAGE "glib20"
                        ^~~~~~~~
/mnt/e/android_project/GTKAndroid/clibs/gtk/../glib/distsrc/glib/glibintl.h:37:43: note: expanded from macro 'bindtextdomain' #define bindtextdomain(Domain,Directory) (Domain)
                                          ^~~~~~
1 warning and 15 errors generated.
make: *** [/mnt/e/android_project/GTKAndroid/app/obj/local/armeabi-v7a/objs-debug/glib/ggettext.o] Error 1
make: *** Waiting for unfinished jobs....
toonaive@DESKTOP-GP3EUEU:/mnt/e/android_project/GTKAndroid/app/jni$

It seems that something wrong with header file

here is:

/* Message catalogs for internationalization.
   Copyright (C) 1995-1997, 2000-2016 Free Software Foundation, Inc.

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published by
   the Free Software Foundation; either version 2.1 of the License, 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 Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

#ifndef _LIBINTL_H
#define _LIBINTL_H 1

#include <locale.h>
#if (defined __APPLE__ && defined __MACH__) && 0
# include <xlocale.h>
#endif

/* The LC_MESSAGES locale category is the category used by the functions
   gettext() and dgettext().  It is specified in POSIX, but not in ANSI C.
   On systems that don't define it, use an arbitrary value instead.
   On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
   then includes <libintl.h> (i.e. this file!) and then only defines
   LC_MESSAGES.  To avoid a redefinition warning, don't define LC_MESSAGES
   in this case.  */
#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
# define LC_MESSAGES 1729
#endif

/* We define an additional symbol to signal that we use the GNU
   implementation of gettext.  */
#define __USE_GNU_GETTEXT 1

/* Provide information about the supported file formats.  Returns the
   maximum minor revision number supported for a given major revision.  */
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
  ((major) == 0 || (major) == 1 ? 1 : -1)

/* Resolve a platform specific conflict on DJGPP.  GNU gettext takes
   precedence over _conio_gettext.  */
#ifdef __DJGPP__
# undef gettext
#endif

#ifdef __cplusplus
extern "C" {
#endif


/* Version number: (major<<16) + (minor<<8) + subminor */
#define LIBINTL_VERSION 0x001308
extern int libintl_version;


/* We redirect the functions to those prefixed with "libintl_".  This is
   necessary, because some systems define gettext/textdomain/... in the C
   library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
   If we used the unprefixed names, there would be cases where the
   definition in the C library would override the one in the libintl.so
   shared library.  Recall that on ELF systems, the symbols are looked
   up in the following order:
     1. in the executable,
     2. in the shared libraries specified on the link command line, in order,
     3. in the dependencies of the shared libraries specified on the link
        command line,
     4. in the dlopen()ed shared libraries, in the order in which they were
        dlopen()ed.
   The definition in the C library would override the one in libintl.so if
   either
     * -lc is given on the link command line and -lintl isn't, or
     * -lc is given on the link command line before -lintl, or
     * libintl.so is a dependency of a dlopen()ed shared library but not
       linked to the executable at link time.
   Since Solaris gettext() behaves differently than GNU gettext(), this
   would be unacceptable.

   The redirection happens by default through macros in C, so that &gettext
   is independent of the compilation unit, but through inline functions in
   C++, in order not to interfere with the name mangling of class fields or
   class methods called 'gettext'.  */

/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
   If he doesn't, we choose the method.  A third possible method is
   _INTL_REDIRECT_ASM, supported only by GCC.  */
#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
# if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
#  define _INTL_REDIRECT_ASM
# else
#  ifdef __cplusplus
#   define _INTL_REDIRECT_INLINE
#  else
#   define _INTL_REDIRECT_MACROS
#  endif
# endif
#endif
/* Auxiliary macros.  */
#ifdef _INTL_REDIRECT_ASM
# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
# define _INTL_STRINGIFY(prefix) #prefix
#else
# define _INTL_ASM(cname)
#endif

/* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return
   its n-th argument literally.  This enables GCC to warn for example about
   printf (gettext ("foo %y")).  */
#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && defined __cplusplus)
# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n)))
#else
# define _INTL_MAY_RETURN_STRING_ARG(n)
#endif

/* Look up MSGID in the current default message catalog for the current
   LC_MESSAGES locale.  If not found, returns MSGID itself (the default
   text).  */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_gettext (const char *__msgid)
       _INTL_MAY_RETURN_STRING_ARG (1);
static inline char *gettext (const char *__msgid)
{
  return libintl_gettext (__msgid);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define gettext libintl_gettext
#endif
extern char *gettext (const char *__msgid)
       _INTL_ASM (libintl_gettext)
       _INTL_MAY_RETURN_STRING_ARG (1);
#endif

/* Look up MSGID in the DOMAINNAME message catalog for the current
   LC_MESSAGES locale.  */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_dgettext (const char *__domainname, const char *__msgid)
       _INTL_MAY_RETURN_STRING_ARG (2);
static inline char *dgettext (const char *__domainname, const char *__msgid)
{
  return libintl_dgettext (__domainname, __msgid);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define dgettext libintl_dgettext
#endif
extern char *dgettext (const char *__domainname, const char *__msgid)
       _INTL_ASM (libintl_dgettext)
       _INTL_MAY_RETURN_STRING_ARG (2);
#endif

/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
   locale.  */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
                                int __category)
       _INTL_MAY_RETURN_STRING_ARG (2);
static inline char *dcgettext (const char *__domainname, const char *__msgid,
                               int __category)
{
  return libintl_dcgettext (__domainname, __msgid, __category);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define dcgettext libintl_dcgettext
#endif
extern char *dcgettext (const char *__domainname, const char *__msgid,
                        int __category)
       _INTL_ASM (libintl_dcgettext)
       _INTL_MAY_RETURN_STRING_ARG (2);
#endif


/* Similar to 'gettext' but select the plural form corresponding to the
   number N.  */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
                               unsigned long int __n)
       _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
static inline char *ngettext (const char *__msgid1, const char *__msgid2,
                              unsigned long int __n)
{
  return libintl_ngettext (__msgid1, __msgid2, __n);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define ngettext libintl_ngettext
#endif
extern char *ngettext (const char *__msgid1, const char *__msgid2,
                       unsigned long int __n)
       _INTL_ASM (libintl_ngettext)
       _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
#endif

/* Similar to 'dgettext' but select the plural form corresponding to the
   number N.  */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
                                const char *__msgid2, unsigned long int __n)
       _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
static inline char *dngettext (const char *__domainname, const char *__msgid1,
                               const char *__msgid2, unsigned long int __n)
{
  return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define dngettext libintl_dngettext
#endif
extern char *dngettext (const char *__domainname,
                        const char *__msgid1, const char *__msgid2,
                        unsigned long int __n)
       _INTL_ASM (libintl_dngettext)
       _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
#endif

/* Similar to 'dcgettext' but select the plural form corresponding to the
   number N.  */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_dcngettext (const char *__domainname,
                                 const char *__msgid1, const char *__msgid2,
                                 unsigned long int __n, int __category)
       _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
static inline char *dcngettext (const char *__domainname,
                                const char *__msgid1, const char *__msgid2,
                                unsigned long int __n, int __category)
{
  return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define dcngettext libintl_dcngettext
#endif
extern char *dcngettext (const char *__domainname,
                         const char *__msgid1, const char *__msgid2,
                         unsigned long int __n, int __category)
       _INTL_ASM (libintl_dcngettext)
       _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
#endif



/* Set the current default message catalog to DOMAINNAME.
   If DOMAINNAME is null, return the current default.
   If DOMAINNAME is "", reset to the default of "messages".  */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_textdomain (const char *__domainname);
static inline char *textdomain (const char *__domainname)
{
  return libintl_textdomain (__domainname);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define textdomain libintl_textdomain
#endif
extern char *textdomain (const char *__domainname)
       _INTL_ASM (libintl_textdomain);
#endif

/* Specify that the DOMAINNAME message catalog will be found
   in DIRNAME rather than in the system locale data base.  */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_bindtextdomain (const char *__domainname,
                                     const char *__dirname);
static inline char *bindtextdomain (const char *__domainname,
                                    const char *__dirname)
{
  return libintl_bindtextdomain (__domainname, __dirname);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define bindtextdomain libintl_bindtextdomain
#endif
extern char *bindtextdomain (const char *__domainname, const char *__dirname)
       _INTL_ASM (libintl_bindtextdomain);
#endif

/* Specify the character encoding in which the messages from the
   DOMAINNAME message catalog will be returned.  */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_bind_textdomain_codeset (const char *__domainname,
                                              const char *__codeset);
static inline char *bind_textdomain_codeset (const char *__domainname,
                                             const char *__codeset)
{
  return libintl_bind_textdomain_codeset (__domainname, __codeset);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define bind_textdomain_codeset libintl_bind_textdomain_codeset
#endif
extern char *bind_textdomain_codeset (const char *__domainname,
                                      const char *__codeset)
       _INTL_ASM (libintl_bind_textdomain_codeset);
#endif



/* Support for format strings with positions in *printf(), following the
   POSIX/XSI specification.
   Note: These replacements for the *printf() functions are visible only
   in source files that #include <libintl.h> or #include "gettext.h".
   Packages that use *printf() in source files that don't refer to _()
   or gettext() but for which the format string could be the return value
   of _() or gettext() need to add this #include.  Oh well.  */

#if !1

#include <stdio.h>
#include <stddef.h>

/* Get va_list.  */
#if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER
# include <stdarg.h>
#else
# include <varargs.h>
#endif

#if !(defined fprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef fprintf
#define fprintf libintl_fprintf
extern int fprintf (FILE *, const char *, ...);
#endif
#if !(defined vfprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef vfprintf
#define vfprintf libintl_vfprintf
extern int vfprintf (FILE *, const char *, va_list);
#endif

#if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */
#undef printf
#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
/* Don't break __attribute__((format(printf,M,N))).
   This redefinition is only possible because the libc in NetBSD, Cygwin,
   mingw does not have a function __printf__.
   Alternatively, we could have done this redirection only when compiling with
   __GNUC__, together with a symbol redirection:
       extern int printf (const char *, ...)
              __asm__ (#__USER_LABEL_PREFIX__ "libintl_printf");
   But doing it now would introduce a binary incompatibility with already
   distributed versions of libintl on these systems.  */
# define libintl_printf __printf__
#endif
#define printf libintl_printf
extern int printf (const char *, ...);
#endif
#if !(defined vprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef vprintf
#define vprintf libintl_vprintf
extern int vprintf (const char *, va_list);
#endif

#if !(defined sprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef sprintf
#define sprintf libintl_sprintf
extern int sprintf (char *, const char *, ...);
#endif
#if !(defined vsprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef vsprintf
#define vsprintf libintl_vsprintf
extern int vsprintf (char *, const char *, va_list);
#endif

#if 1

#if !(defined snprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef snprintf
#define snprintf libintl_snprintf
extern int snprintf (char *, size_t, const char *, ...);
#endif
#if !(defined vsnprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef vsnprintf
#define vsnprintf libintl_vsnprintf
extern int vsnprintf (char *, size_t, const char *, va_list);
#endif

#endif

#if 1

#if !(defined asprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef asprintf
#define asprintf libintl_asprintf
extern int asprintf (char **, const char *, ...);
#endif
#if !(defined vasprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef vasprintf
#define vasprintf libintl_vasprintf
extern int vasprintf (char **, const char *, va_list);
#endif

#endif

#if 0

#undef fwprintf
#define fwprintf libintl_fwprintf
extern int fwprintf (FILE *, const wchar_t *, ...);
#undef vfwprintf
#define vfwprintf libintl_vfwprintf
extern int vfwprintf (FILE *, const wchar_t *, va_list);

#undef wprintf
#define wprintf libintl_wprintf
extern int wprintf (const wchar_t *, ...);
#undef vwprintf
#define vwprintf libintl_vwprintf
extern int vwprintf (const wchar_t *, va_list);

#undef swprintf
#define swprintf libintl_swprintf
extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
#undef vswprintf
#define vswprintf libintl_vswprintf
extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);

#endif

#endif


/* Support for the locale chosen by the user.  */
#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__

#ifndef GNULIB_defined_setlocale /* don't override gnulib */
#undef setlocale
#define setlocale libintl_setlocale
extern char *setlocale (int, const char *);
#endif

#if 0

#undef newlocale
#define newlocale libintl_newlocale
extern locale_t newlocale (int, const char *, locale_t);

#endif

#endif


/* Support for relocatable packages.  */

/* Sets the original and the current installation prefix of the package.
   Relocation simply replaces a pathname starting with the original prefix
   by the corresponding pathname with the current prefix instead.  Both
   prefixes should be directory names without trailing slash (i.e. use ""
   instead of "/").  */
#define libintl_set_relocation_prefix libintl_set_relocation_prefix
extern void
       libintl_set_relocation_prefix (const char *orig_prefix,
                                      const char *curr_prefix);


#ifdef __cplusplus
}
#endif

#endif /* libintl.h */

I did not change anything in the header.

Any idea?

If you agree I wish to make a pull request.

@eugals
Copy link
Owner

eugals commented Apr 17, 2018

@hathlife

If you agree I wish to make a pull request.

Why don't you just continue working on this on our own repository?
And later when I have more time I could take a look at your progress, pull the updates or maybe just add a link to your repo into my readme.md.

As you probably could guess I'm not too interested in investing too much attention into this old project. I don't believe it worth the efforts, and it is also just too far from my current area of interest.

eugals added a commit that referenced this issue Apr 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants