Conversion to a CMake build to be able to compile using Visual Studio

--- CMakeLists.txt	1970-01-01 01:00:00.000000000 +0100
+++ CMakeLists.txt	2013-06-02 02:32:39.804490200 +0200
@@ -0,0 +1,152 @@
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+# This file is in the public domain
+
+cmake_minimum_required(VERSION 2.8)
+
+project(libintl)
+
+##############################################################################
+#
+# Build libintl on Windows
+#
+##############################################################################
+
+set(LIBINTL_MAJOR 1)
+set(LIBINTL_MINOR 14)
+
+set(LIBINTL_VERSION_STRING "${LIBFFI_MAJOR}.${LIBFFI_MINOR}")
+
+##############################################################################
+#  Configure
+##############################################################################
+
+set(HAVE_VISIBILITY 0)
+set(HAVE_WCHAR_T 0)
+set(ICONV_CONST const)
+set(C_INLINE __inline)
+set(HAVE_GETCWD 1)
+set(HAVE_POSIX_PRINTF 1)
+set(HAVE_SNPRINTF 1)
+set(HAVE_ASPRINTF 1)
+set(HAVE_WPRINTF 1)
+
+configure_file(${CMAKE_SOURCE_DIR}/gettext-runtime/config.h.cmake
+               ${CMAKE_BINARY_DIR}/gettext-runtime/config.h)
+
+configure_file(${CMAKE_SOURCE_DIR}/gettext-runtime/intl/libgnuintl.h.in
+               ${CMAKE_BINARY_DIR}/gettext-runtime/intl/libgnuintl.h)
+
+configure_file(${CMAKE_SOURCE_DIR}/gettext-runtime/intl/libgnuintl.h.in
+               ${CMAKE_BINARY_DIR}/gettext-runtime/intl/libintl.h)
+
+##############################################################################
+#  Set the include flags/paths
+##############################################################################
+
+# Speed up build process excluding unused header files
+add_definitions(-DWIN32_LEAN_AND_MEAN)
+# force the correct version for the redist manifest
+add_definitions(-D_BIND_TO_CURRENT_MFC_VERSION=1 -D_BIND_TO_CURRENT_CRT_VERSION=1)
+# turn off security warnings for system calls
+add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE)
+                                                                                                                          
+add_definitions(
+	-DHAVE_CONFIG_H
+	-DLOCALEDIR=\"dummy\"
+	-DLOCALE_ALIAS_PATH=\"dummy\"
+	-DLIBDIR=dummy
+	-DPACKAGE_VERSION_MAJOR=${LIBINTL_MAJOR}
+	-DPACKAGE_VERSION_MINOR=${LIBINTL_MINOR}
+	-DPACKAGE_VERSION_SUBMINOR=0
+	-DPACKAGE_VERSION_STRING=\"1.14\"
+	-DBUILDING_DLL=1
+	-DIN_LIBINTL   # FIXME what does this mean?!
+)
+
+include_directories(
+	${CMAKE_BINARY_DIR}/gettext-runtime
+	${CMAKE_BINARY_DIR}/gettext-runtime/intl
+	${CMAKE_SOURCE_DIR}/gettext-runtime
+	${CMAKE_SOURCE_DIR}/gettext-runtime/intl
+)
+
+##############################################################################
+#  Build libintl
+##############################################################################
+
+add_library(intl SHARED
+	gettext-runtime/intl/bindtextdom.c
+	gettext-runtime/intl/dcgettext.c
+	gettext-runtime/intl/dgettext.c
+	gettext-runtime/intl/gettext.c
+	gettext-runtime/intl/finddomain.c
+	gettext-runtime/intl/hash-string.c
+	gettext-runtime/intl/loadmsgcat.c
+	gettext-runtime/intl/localealias.c
+	gettext-runtime/intl/textdomain.c
+	gettext-runtime/intl/l10nflist.c
+	gettext-runtime/intl/explodename.c
+	gettext-runtime/intl/dcigettext.c
+	gettext-runtime/intl/dcngettext.c
+	gettext-runtime/intl/dngettext.c
+	gettext-runtime/intl/ngettext.c
+	gettext-runtime/intl/plural.c
+	gettext-runtime/intl/plural-exp.c
+	gettext-runtime/intl/localcharset.c
+	gettext-runtime/intl/lock.c
+	gettext-runtime/intl/relocatable.c
+	gettext-runtime/intl/langprefs.c
+	gettext-runtime/intl/localename.c
+	gettext-runtime/intl/log.c
+	gettext-runtime/intl/printf.c
+	gettext-runtime/intl/version.c
+	gettext-runtime/intl/osdep.c
+	gettext-runtime/intl/intl-compat.c
+	gettext-runtime/intl/libintl.rc
+)
+
+##############################################################################
+#  Install
+##############################################################################
+
+install(TARGETS intl
+	RUNTIME DESTINATION bin
+	LIBRARY DESTINATION lib
+	ARCHIVE DESTINATION lib
+)
+
+install(FILES
+	${CMAKE_BINARY_DIR}/gettext-runtime/intl/libintl.h
+	DESTINATION include
+)
+
+#install(FILES
+#	${CMAKE_BINARY_DIR}/libintl.pc
+#	DESTINATION lib/pkgconfig
+#)
+
+#install(FILES
+#	${CMAKE_SOURCE_DIR}/COPYING.LIB
+#	${CMAKE_SOURCE_DIR}/README
+#	DESTINATION .
+#)
+
+##############################################################################
+#  Create the package
+##############################################################################
+
+set(CPACK_PACKAGE_VERSION_MAJOR       ${LIBINTL_MAJOR})
+set(CPACK_PACKAGE_VERSION_MINOR       ${LIBINTL_MINOR})
+set(CPACK_PACKAGE_VENDOR              "http://www.gnu.org/software/gettext/")
+set(CPACK_PACKAGE_CONTACT             "bug-gnu-gettext@gnu.org")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "An internationalization and localization (i18n) system")
+#set(CPACK_RESOURCE_FILE_LICENSE       "${CMAKE_SOURCE_DIR}/COPYING.LIB")
+#set(CPACK_RESOURCE_FILE_README        "${CMAKE_SOURCE_DIR}/README")
+if(WIN32)
+  set(CPACK_GENERATOR                 "ZIP")
+else()
+  set(CPACK_GENERATOR                 "TGZ")
+endif()
+
+include(CPack)

--- gettext-runtime/config.h.cmake	1970-01-01 01:00:00.000000000 +0100
+++ gettext-runtime/config.h.cmake	2013-06-02 02:21:00.861133600 +0200
@@ -0,0 +1,581 @@
+/*
+  Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+
+  This file is in the public domain
+ */
+
+/* Define to 1 if translation of program messages to the user's native
+   language is requested. */
+#cmakedefine ENABLE_NLS 1
+
+/* Define to 1 if the package shall run at any location in the filesystem. */
+#cmakedefine ENABLE_RELOCATABLE 1
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#cmakedefine HAVE_ALLOCA 1
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+   */
+#cmakedefine HAVE_ALLOCA_H 1
+
+/* Define to 1 if you have the `argz_count' function. */
+#cmakedefine HAVE_ARGZ_COUNT 1
+
+/* Define to 1 if you have the <argz.h> header file. */
+#cmakedefine HAVE_ARGZ_H 1
+
+/* Define to 1 if you have the `argz_next' function. */
+#cmakedefine HAVE_ARGZ_NEXT 1
+
+/* Define to 1 if you have the `argz_stringify' function. */
+#cmakedefine HAVE_ARGZ_STRINGIFY 1
+
+/* Define to 1 if you have the `asprintf' function. */
+#define HAVE_ASPRINTF @HAVE_ASPRINTF@
+
+/* Define to 1 if you have the `wprintf' function. */
+#define HAVE_WPRINTF @HAVE_WPRINTF@
+
+/* Define to 1 if you have the `atexit' function. */
+#cmakedefine HAVE_ATEXIT 1
+
+/* Define to 1 if you have the <bp-sym.h> header file. */
+#cmakedefine HAVE_BP_SYM_H 1
+
+/* Define to 1 if the compiler understands __builtin_expect. */
+#cmakedefine HAVE_BUILTIN_EXPECT 1
+
+/* Define to 1 if you have the `canonicalize_file_name' function. */
+#cmakedefine HAVE_CANONICALIZE_FILE_NAME 1
+
+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+   CoreFoundation framework. */
+#cmakedefine HAVE_CFLOCALECOPYCURRENT 1
+
+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+   the CoreFoundation framework. */
+#cmakedefine HAVE_CFPREFERENCESCOPYAPPVALUE 1
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+   */
+#cmakedefine HAVE_DCGETTEXT 1
+
+/* Define to 1 if you have the declaration of `canonicalize_file_name', and to
+   0 if you don't. */
+#cmakedefine HAVE_DECL_CANONICALIZE_FILE_NAME 1
+
+/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_CLEARERR_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL_FEOF_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_FERROR_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_FFLUSH_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_FGETS_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_FPUTC_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_FPUTS_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_FREAD_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_FWRITE_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_GETCHAR_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL_GETC_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
+   */
+#cmakedefine HAVE_DECL_GETENV 1
+
+/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
+   you don't. */
+#cmakedefine HAVE_DECL_PUTCHAR_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL_PUTC_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
+   */
+#cmakedefine HAVE_DECL_STRDUP 1
+
+/* Define to 1 if you have the declaration of `strerror', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL_STRERROR 1
+
+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL_STRERROR_R 1
+
+/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL_STRNLEN 1
+
+/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL_WCWIDTH 1
+
+/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL__SNPRINTF 1
+
+/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL__SNWPRINTF 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#cmakedefine HAVE_DLFCN_H 1
+
+/* Define if you have the declaration of environ. */
+#cmakedefine HAVE_ENVIRON_DECL 1
+
+/* Define to 1 if you have the `fwprintf' function. */
+#cmakedefine HAVE_FWPRINTF 1
+
+/* Define to 1 if you have the `getcwd' function. */
+#cmakedefine HAVE_GETCWD 1
+
+/* Define to 1 if you have the `getegid' function. */
+#cmakedefine HAVE_GETEGID 1
+
+/* Define to 1 if you have the `geteuid' function. */
+#cmakedefine HAVE_GETEUID 1
+
+/* Define to 1 if you have the `getgid' function. */
+#cmakedefine HAVE_GETGID 1
+
+/* Define to 1 if you have the <getopt.h> header file. */
+#cmakedefine HAVE_GETOPT_H 1
+
+/* Define to 1 if you have the `getopt_long_only' function. */
+#cmakedefine HAVE_GETOPT_LONG_ONLY 1
+
+/* Define to 1 if you have the `getpagesize' function. */
+#cmakedefine HAVE_GETPAGESIZE 1
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#cmakedefine HAVE_GETTEXT 1
+
+/* Define to 1 if you have the `getuid' function. */
+#cmakedefine HAVE_GETUID 1
+
+/* Define if you have the iconv() function and it works. */
+#cmakedefine HAVE_ICONV 1
+
+/* Define to 1 if you have the <iconv.h> header file. */
+#cmakedefine HAVE_ICONV_H 1
+
+/* Define if your compiler supports the #include_next directive. */
+#cmakedefine HAVE_INCLUDE_NEXT 1
+
+/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
+#cmakedefine HAVE_INTMAX_T 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#cmakedefine HAVE_INTTYPES_H 1
+
+/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
+   declares uintmax_t. */
+#cmakedefine HAVE_INTTYPES_H_WITH_UINTMAX 1
+
+/* Define to 1 if you have the `iswcntrl' function. */
+#cmakedefine HAVE_ISWCNTRL 1
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#cmakedefine HAVE_LANGINFO_CODESET 1
+
+/* Define if your <locale.h> file defines LC_MESSAGES. */
+#cmakedefine HAVE_LC_MESSAGES 1
+
+/* Define to 1 if you have the <limits.h> header file. */
+#cmakedefine HAVE_LIMITS_H 1
+
+/* Define to 1 if the system has the type `long long int'. */
+#cmakedefine HAVE_LONG_LONG_INT 1
+
+/* Define to 1 if you have the <mach-o/dyld.h> header file. */
+#cmakedefine HAVE_MACH_O_DYLD_H 1
+
+/* Define if the 'malloc' function is POSIX compliant. */
+#cmakedefine HAVE_MALLOC_POSIX 1
+
+/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
+#cmakedefine HAVE_MBRTOWC 1
+
+/* Define to 1 if <wchar.h> declares mbstate_t. */
+#cmakedefine HAVE_MBSTATE_T 1
+
+/* Define to 1 if you have the `memchr' function. */
+#cmakedefine HAVE_MEMCHR 1
+
+/* Define to 1 if you have the `memmove' function. */
+#cmakedefine HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#cmakedefine HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `mempcpy' function. */
+#cmakedefine HAVE_MEMPCPY 1
+
+/* Define to 1 if you have a working `mmap' system call. */
+#cmakedefine HAVE_MMAP 1
+
+/* Define to 1 if you have the `munmap' function. */
+#cmakedefine HAVE_MUNMAP 1
+
+/* Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro if
+   _GNU_SOURCE is defined. */
+#cmakedefine HAVE_NL_LOCALE_NAME 1
+
+/* Define if your printf() function supports format strings with positions. */
+#define HAVE_POSIX_PRINTF @HAVE_POSIX_PRINTF@
+
+/* Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE. */
+#cmakedefine HAVE_PTHREAD_MUTEX_RECURSIVE 1
+
+/* Define if the POSIX multithreading library has read/write locks. */
+#cmakedefine HAVE_PTHREAD_RWLOCK 1
+
+/* Define to 1 if you have the `putenv' function. */
+#cmakedefine HAVE_PUTENV 1
+
+/* Define to 1 if you have the `readlink' function. */
+#cmakedefine HAVE_READLINK 1
+
+/* Define to 1 if you have the <search.h> header file. */
+#cmakedefine HAVE_SEARCH_H 1
+
+/* Define to 1 if you have the `setenv' function. */
+#cmakedefine HAVE_SETENV 1
+
+/* Define to 1 if you have the `setlocale' function. */
+#cmakedefine HAVE_SETLOCALE 1
+
+/* Define to 1 if 'sig_atomic_t' is a signed integer type. */
+#cmakedefine HAVE_SIGNED_SIG_ATOMIC_T 1
+
+/* Define to 1 if 'wchar_t' is a signed integer type. */
+#cmakedefine HAVE_SIGNED_WCHAR_T 1
+
+/* Define to 1 if 'wint_t' is a signed integer type. */
+#cmakedefine HAVE_SIGNED_WINT_T 1
+
+/* Define to 1 if you have the `snprintf' function. */
+#define HAVE_SNPRINTF @HAVE_SNPRINTF@
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#cmakedefine HAVE_STDBOOL_H 1
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#cmakedefine HAVE_STDDEF_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#cmakedefine HAVE_STDINT_H 1
+
+/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
+   uintmax_t. */
+#cmakedefine HAVE_STDINT_H_WITH_UINTMAX 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#cmakedefine HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `stpcpy' function. */
+#cmakedefine HAVE_STPCPY 1
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#cmakedefine HAVE_STRCASECMP 1
+
+/* Define to 1 if you have the `strdup' function. */
+#cmakedefine HAVE_STRDUP 1
+
+/* Define to 1 if you have the `strerror_r' function. */
+#cmakedefine HAVE_STRERROR_R 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#cmakedefine HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#cmakedefine HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strtol' function. */
+#cmakedefine HAVE_STRTOL 1
+
+/* Define to 1 if you have the `strtoul' function. */
+#cmakedefine HAVE_STRTOUL 1
+
+/* Define to 1 if you have the <sys/bitypes.h> header file. */
+#cmakedefine HAVE_SYS_BITYPES_H 1
+
+/* Define to 1 if you have the <sys/inttypes.h> header file. */
+#cmakedefine HAVE_SYS_INTTYPES_H 1
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#cmakedefine HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#cmakedefine HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#cmakedefine HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the `tsearch' function. */
+#cmakedefine HAVE_TSEARCH 1
+
+/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
+#cmakedefine HAVE_UINTMAX_T 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#cmakedefine HAVE_UNISTD_H 1
+
+/* Define to 1 if the system has the type `unsigned long long int'. */
+#cmakedefine HAVE_UNSIGNED_LONG_LONG_INT 1
+
+/* Define to 1 or 0, depending whether the compiler supports simple visibility
+   declarations. */
+#define HAVE_VISIBILITY @HAVE_VISIBILITY@
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#cmakedefine HAVE_WCHAR_H 1
+
+/* Define if you have the 'wchar_t' type. */
+#define HAVE_WCHAR_T @HAVE_WCHAR_T@
+
+/* Define to 1 if you have the `wcslen' function. */
+#cmakedefine HAVE_WCSLEN 1
+
+/* Define to 1 if you have the <wctype.h> header file. */
+#cmakedefine HAVE_WCTYPE_H 1
+
+/* Define to 1 if you have the `wcwidth' function. */
+#cmakedefine HAVE_WCWIDTH 1
+
+/* Define if you have the 'wint_t' type. */
+#cmakedefine HAVE_WINT_T 1
+
+/* Define to 1 if the system has the type `_Bool'. */
+#cmakedefine HAVE__BOOL 1
+
+/* Define to 1 if you have the `_NSGetExecutablePath' function. */
+#cmakedefine HAVE__NSGETEXECUTABLEPATH 1
+
+/* Define to 1 if you have the `__fsetlocking' function. */
+#cmakedefine HAVE___FSETLOCKING 1
+
+/* Define as const if the declaration of iconv() needs const. */
+#define ICONV_CONST @ICONV_CONST@
+
+/* Define to the value of ${prefix}, as a string. */
+#cmakedefine INSTALLPREFIX 1
+
+/* Define if integer division by zero raises signal SIGFPE. */
+#cmakedefine INTDIV0_RAISES_SIGFPE 1
+
+/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */
+#cmakedefine MALLOC_0_IS_NONNULL 1
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#cmakedefine NO_MINUS_C_MINUS_O 1
+
+/* Name of package */
+#cmakedefine PACKAGE 1
+
+/* Define to the address where bug reports for this package should be sent. */
+#cmakedefine PACKAGE_BUGREPORT 1
+
+/* Define to the full name of this package. */
+#cmakedefine PACKAGE_NAME 1
+
+/* Define to the full name and version of this package. */
+#cmakedefine PACKAGE_STRING 1
+
+/* Define to the one symbol short name of this package. */
+#cmakedefine PACKAGE_TARNAME 1
+
+/* Define to the version of this package. */
+#cmakedefine PACKAGE_VERSION 1
+
+/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
+#cmakedefine PRI_MACROS_BROKEN 1
+
+/* Define if the pthread_in_use() detection is hard. */
+#cmakedefine PTHREAD_IN_USE_DETECTION_HARD 1
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+   'ptrdiff_t'. */
+#cmakedefine PTRDIFF_T_SUFFIX 1
+
+/* Define this to 1 if strerror is broken. */
+#cmakedefine REPLACE_STRERROR 1
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+   'sig_atomic_t'. */
+#cmakedefine SIG_ATOMIC_T_SUFFIX 1
+
+/* Define as the maximum value of type 'size_t', if the system doesn't define
+   it. */
+#cmakedefine SIZE_MAX 1
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+   'size_t'. */
+#cmakedefine SIZE_T_SUFFIX 1
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at runtime.
+	STACK_DIRECTION > 0 => grows toward higher addresses
+	STACK_DIRECTION < 0 => grows toward lower addresses
+	STACK_DIRECTION = 0 => direction of growth unknown */
+#cmakedefine STACK_DIRECTION 1
+
+/* Define to 1 if you have the ANSI C header files. */
+#cmakedefine STDC_HEADERS 1
+
+/* Define to 1 if strerror_r returns char *. */
+#cmakedefine STRERROR_R_CHAR_P 1
+
+/* Define if the POSIX multithreading library can be used. */
+#cmakedefine USE_POSIX_THREADS 1
+
+/* Define if references to the POSIX multithreading library should be made
+   weak. */
+#cmakedefine USE_POSIX_THREADS_WEAK 1
+
+/* Define if the GNU Pth multithreading library can be used. */
+#cmakedefine USE_PTH_THREADS 1
+
+/* Define if references to the GNU Pth multithreading library should be made
+   weak. */
+#cmakedefine USE_PTH_THREADS_WEAK 1
+
+/* Define if the old Solaris multithreading library can be used. */
+#cmakedefine USE_SOLARIS_THREADS 1
+
+/* Define if references to the old Solaris multithreading library should be
+   made weak. */
+#cmakedefine USE_SOLARIS_THREADS_WEAK 1
+
+/* Define to 1 if you want getc etc. to use unlocked I/O if available.
+   Unlocked I/O can improve performance in unithreaded apps, but it is not
+   safe for multithreaded apps. */
+#cmakedefine USE_UNLOCKED_IO 1
+
+/* Define if the Win32 multithreading API can be used. */
+#cmakedefine USE_WIN32_THREADS 1
+
+/* Version number of package */
+#cmakedefine VERSION 1
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+   'wchar_t'. */
+#cmakedefine WCHAR_T_SUFFIX 1
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+   'wint_t'. */
+#cmakedefine WINT_T_SUFFIX 1
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#define inline @C_INLINE@
+#endif
+
+/* Define to a type if <wchar.h> does not define. */
+#cmakedefine mbstate_t 1
+
+/* Define as the type of the result of subtracting two pointers, if the system
+   doesn't define it. */
+#cmakedefine ptrdiff_t 1
+
+/* Define to a replacement function name for realpath(). */
+#cmakedefine realpath 1
+
+/* Define to the equivalent of the C99 'restrict' keyword, or to
+   nothing if this is not supported.  Do not define if restrict is
+   supported directly.  */
+#cmakedefine restrict 1
+/* Work around a bug in Sun C++: it does not support _Restrict, even
+   though the corresponding Sun C compiler does, which causes
+   "#define restrict _Restrict" in the previous line.  Perhaps some future
+   version of Sun C++ will work with _Restrict; if so, it'll probably
+   define __RESTRICT, just as Sun C does.  */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+#endif
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#cmakedefine size_t 1
+
+/* Define as a signed type of the same size as size_t. */
+#cmakedefine ssize_t 1
+
+/* Define to rpl_strnlen if the replacement function should be used. */
+#cmakedefine strnlen 1
+
+/* Define to unsigned long or unsigned long long if <stdint.h> and
+   <inttypes.h> don't define. */
+#define intmax_t __int64
+#define uintmax_t unsigned __int64
+
+#define __libc_lock_t                   gl_lock_t
+#define __libc_lock_define              gl_lock_define
+#define __libc_lock_define_initialized  gl_lock_define_initialized
+#define __libc_lock_init                gl_lock_init
+#define __libc_lock_lock                gl_lock_lock
+#define __libc_lock_unlock              gl_lock_unlock
+#define __libc_lock_recursive_t                   gl_recursive_lock_t
+#define __libc_lock_define_recursive              gl_recursive_lock_define
+#define __libc_lock_define_initialized_recursive  gl_recursive_lock_define_initialized
+#define __libc_lock_init_recursive                gl_recursive_lock_init
+#define __libc_lock_lock_recursive                gl_recursive_lock_lock
+#define __libc_lock_unlock_recursive              gl_recursive_lock_unlock
+#define glthread_in_use  libintl_thread_in_use
+#define glthread_lock_init     libintl_lock_init
+#define glthread_lock_lock     libintl_lock_lock
+#define glthread_lock_unlock   libintl_lock_unlock
+#define glthread_lock_destroy  libintl_lock_destroy
+#define glthread_rwlock_init     libintl_rwlock_init
+#define glthread_rwlock_rdlock   libintl_rwlock_rdlock
+#define glthread_rwlock_wrlock   libintl_rwlock_wrlock
+#define glthread_rwlock_unlock   libintl_rwlock_unlock
+#define glthread_rwlock_destroy  libintl_rwlock_destroy
+#define glthread_recursive_lock_init     libintl_recursive_lock_init
+#define glthread_recursive_lock_lock     libintl_recursive_lock_lock
+#define glthread_recursive_lock_unlock   libintl_recursive_lock_unlock
+#define glthread_recursive_lock_destroy  libintl_recursive_lock_destroy
+#define glthread_once                 libintl_once
+#define glthread_once_call            libintl_once_call
+#define glthread_once_singlethreaded  libintl_once_singlethreaded
+
+
+
+/* On Windows, variables that may be in a DLL must be marked specially.  */
+#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER
+# define DLL_VARIABLE __declspec (dllimport)
+#else
+# define DLL_VARIABLE
+#endif

--- gettext-runtime/intl/dcigettext.c	2013-05-23 19:51:26.975343900 +0200
+++ gettext-runtime/intl/dcigettext.c	2013-06-02 01:55:14.154983100 +0200
@@ -644,7 +644,7 @@
 	  for (;;)
 	    {
 	      resolved_dirname = (char *) alloca (path_max + dirname_len);
-	      ADD_BLOCK (block_list, tmp_dirname);
+	      ADD_BLOCK (block_list, resolved_dirname);
 
 	      __set_errno (0);
 	      ret = getcwd (resolved_dirname, path_max);

--- gettext-runtime/intl/localename.c	2013-05-23 19:51:27.251721700 +0200
+++ gettext-runtime/intl/localename.c	2013-06-02 02:02:58.478510400 +0200
@@ -612,9 +612,11 @@
 # ifndef SUBLANG_SERBIAN_CYRILLIC
 # define SUBLANG_SERBIAN_CYRILLIC 0x03
 # endif
-# ifndef SUBLANG_SINDHI_PAKISTAN
-# define SUBLANG_SINDHI_PAKISTAN 0x01
+# ifndef SUBLANG_SINDHI_INDIA
+# define SUBLANG_SINDHI_INDIA 0x01
 # endif
+# undef SUBLANG_SINDHI_PAKISTAN
+# define SUBLANG_SINDHI_PAKISTAN 0x02
 # ifndef SUBLANG_SINDHI_AFGHANISTAN
 # define SUBLANG_SINDHI_AFGHANISTAN 0x02
 # endif
@@ -1386,8 +1388,9 @@
       case LANG_SINDHI:
 	switch (sub)
 	  {
+	  case SUBLANG_SINDHI_INDIA: return "sd_IN";
 	  case SUBLANG_SINDHI_PAKISTAN: return "sd_PK";
-	  case SUBLANG_SINDHI_AFGHANISTAN: return "sd_AF";
+	  /* case SUBLANG_SINDHI_AFGHANISTAN: return "sd_AF"; */
 	  }
 	return "sd";
       case LANG_SINHALESE: return "si_LK";

--- gettext-runtime/intl/printf-parse.c	2013-05-23 19:51:27.393328700 +0200
+++ gettext-runtime/intl/printf-parse.c	2013-06-02 01:06:56.784864600 +0200
@@ -58,7 +58,9 @@
 #  include <inttypes.h>
 # endif
 #else
-# include <stdint.h>
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
 #endif
 
 /* malloc(), realloc(), free().  */

--- gettext-runtime/intl/libgnuintl.h.in.ORIG	2007-11-02 01:23:43.000000000 +0100
+++ gettext-runtime/intl/libgnuintl.h.in	2013-06-28 12:19:05.836623974 +0200
@@ -87,7 +87,7 @@
 /* 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 _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS || defined _MSC_VER)
 # if __GNUC__ >= 2 && !(__APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
 #  define _INTL_REDIRECT_ASM
 # else
