diff --git a/development/cmake/intl/libgnuintl.h b/development/cmake/intl/libgnuintl.h.cmake similarity index 95% rename from development/cmake/intl/libgnuintl.h rename to development/cmake/intl/libgnuintl.h.cmake index 1d6a275c61..4fd53e0d21 100644 --- a/development/cmake/intl/libgnuintl.h +++ b/development/cmake/intl/libgnuintl.h.cmake @@ -19,6 +19,10 @@ #ifndef _LIBINTL_H #define _LIBINTL_H 1 +#cmakedefine01 HAVE_POSIX_PRINTF +#cmakedefine01 HAVE_ASPRINTF +#cmakedefine01 HAVE_WPRINTF + #include /* The LC_MESSAGES locale category is the category used by the functions @@ -52,6 +56,11 @@ extern "C" { #endif +/* Version number: (major<<16) + (minor<<8) + subminor */ +#define LIBINTL_VERSION 0x001000 +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). @@ -217,6 +226,8 @@ extern char *dcngettext (const char *__domainname, #endif +#ifndef IN_LIBGLOCALE + /* 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". */ @@ -271,6 +282,8 @@ extern char *bind_textdomain_codeset (const char *__domainname, _INTL_ASM (libintl_bind_textdomain_codeset); #endif +#endif /* IN_LIBGLOCALE */ + /* Support for format strings with positions in *printf(), following the POSIX/XSI specification. @@ -300,6 +313,12 @@ extern int fprintf (FILE *, const char *, ...); extern int vfprintf (FILE *, const char *, va_list); #undef printf +#if defined __NetBSD__ || 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__. */ +# define libintl_printf __printf__ +#endif #define printf libintl_printf extern int printf (const char *, ...); #undef vprintf diff --git a/intl/CMakeLists.txt b/intl/CMakeLists.txt index 1051110fee..d6aac566df 100644 --- a/intl/CMakeLists.txt +++ b/intl/CMakeLists.txt @@ -7,8 +7,8 @@ project(intl) # libgnuintl.h.in => libintl.h -configure_file("${TOP_SRC_DIR}/${LYX_CMAKE_DIR}/intl/libgnuintl.h" ${CMAKE_CURRENT_BINARY_DIR}/libgnuintl.h COPYONLY) -configure_file("${TOP_SRC_DIR}/${LYX_CMAKE_DIR}/intl/libgnuintl.h" ${CMAKE_CURRENT_BINARY_DIR}/libintl.h COPYONLY) +configure_file("${TOP_SRC_DIR}/${LYX_CMAKE_DIR}/intl/libgnuintl.h.cmake" ${CMAKE_CURRENT_BINARY_DIR}/libgnuintl.h) +configure_file("${TOP_SRC_DIR}/${LYX_CMAKE_DIR}/intl/libgnuintl.h.cmake" ${CMAKE_CURRENT_BINARY_DIR}/libintl.h) add_definitions(