dnl Checks for library functions.
AC_CHECK_FUNCS([select])
gt_SIGINFO
-gt_SETLOCALE
AC_C_BIGENDIAN([endianness=1], [endianness=0],
[echo "AC-C-BIGENDIAN fails to work on your system." | sed -e 's,-,_,g' 1>&2
## Makefile for the gettext-tools/m4 directory of GNU gettext
-## Copyright (C) 2003-2010, 2013, 2017-2019 Free Software Foundation, Inc.
+## Copyright (C) 2003-2010, 2013, 2017-2020 Free Software Foundation, Inc.
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
exported.m4 \
hostname.m4 \
locale-de.m4 \
-setlocale.m4 \
siginfo.m4
+++ /dev/null
-# setlocale.m4 serial 4 (gettext-0.18)
-dnl Copyright (C) 2001-2002, 2006, 2009 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-# Check for setlocale declaration.
-
-AC_DEFUN([gt_SETLOCALE],[
-AC_MSG_CHECKING([for setlocale declaration])
-AC_CACHE_VAL(gt_cv_proto_setlocale, [
-AC_TRY_COMPILE([
-#include <stdlib.h>
-#include <locale.h>
-extern
-#ifdef __cplusplus
-"C"
-#endif
-#if defined(__STDC__) || defined(__cplusplus)
-char *setlocale (int category, char *locale);
-#else
-char *setlocale();
-#endif
-], [], gt_cv_proto_setlocale_arg1="", gt_cv_proto_setlocale_arg1="const")
-gt_cv_proto_setlocale="extern char *setlocale (int category, $gt_cv_proto_setlocale_arg1 char *locale);"])
-gt_cv_proto_setlocale=`echo "[$]gt_cv_proto_setlocale" | tr -s ' ' | sed -e 's/( /(/'`
-AC_MSG_RESULT([
- $gt_cv_proto_setlocale])
-AC_DEFINE_UNQUOTED(SETLOCALE_CONST,$gt_cv_proto_setlocale_arg1,
- [Define as const if the declaration of setlocale() needs const.])
-])
#undef setlocale
#if defined _WIN32 && !defined __CYGWIN__
# define setlocale fake_setlocale
-extern char *setlocale (int category, SETLOCALE_CONST char *locale);
+extern char *setlocale (int category, const char *locale);
#endif
#define _(string) gettext (string)
#undef setlocale
#if defined _WIN32 && !defined __CYGWIN__
# define setlocale fake_setlocale
-extern char *setlocale (int category, SETLOCALE_CONST char *locale);
+extern char *setlocale (int category, const char *locale);
#endif
#define _(string) gettext (string)
#undef setlocale
#if defined _WIN32 && !defined __CYGWIN__
# define setlocale fake_setlocale
-extern char *setlocale (int category, SETLOCALE_CONST char *locale);
+extern char *setlocale (int category, const char *locale);
#endif
int
/* Fake setlocale - platform independent, for testing purposes.
- Copyright (C) 2001-2002, 2019 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2019-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
actually change the behaviour of locale dependent functions.
Assumes setenv()/putenv() is not called. */
char *
-setlocale (int category, SETLOCALE_CONST char *locale)
+setlocale (int category, const char *locale)
{
static char C_string[] = "C";
static char *current_locale = C_string;
#if defined _WIN32 && !defined __CYGWIN__
# undef setlocale
# define setlocale fake_setlocale
-extern char *setlocale (int category, SETLOCALE_CONST char *locale);
+extern char *setlocale (int category, const char *locale);
#endif
#define _(str) gettext (str)
#if defined _WIN32 && !defined __CYGWIN__
# undef setlocale
# define setlocale fake_setlocale
-extern char *setlocale (int category, SETLOCALE_CONST char *locale);
+extern char *setlocale (int category, const char *locale);
#endif
#define _(str) gettext (str)