annotate m4/wmemchr.m4 @ 40186:8964917f9574

autoupdate
author Karl Berry <karl@freefriends.org>
date Mon, 18 Feb 2019 08:02:49 -0800
parents b06060465f09
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15817
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
1 # wmemchr.m4 serial 3
40057
b06060465f09 maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents: 19484
diff changeset
2 dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
14267
9ccff8d6fbbe New module 'wmemchr'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
9ccff8d6fbbe New module 'wmemchr'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
9ccff8d6fbbe New module 'wmemchr'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
9ccff8d6fbbe New module 'wmemchr'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
9ccff8d6fbbe New module 'wmemchr'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 AC_DEFUN([gl_FUNC_WMEMCHR],
9ccff8d6fbbe New module 'wmemchr'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 [
14269
2841c44d4d34 New module 'wmemchr', part 3.
Bruno Haible <bruno@clisp.org>
parents: 14267
diff changeset
9 AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
15817
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
10 dnl We cannot use AC_CHECK_FUNCS here, because the MSVC 9 header files
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
11 dnl provide this function as an inline function definition.
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
12 AC_CACHE_CHECK([for wmemchr], [gl_cv_func_wmemchr],
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
13 [AC_COMPILE_IFELSE(
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
14 [AC_LANG_PROGRAM([[
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
15 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
16 <wchar.h>.
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
17 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
18 before <wchar.h>. */
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
19 #include <stddef.h>
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
20 #include <stdio.h>
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
21 #include <time.h>
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
22 #include <wchar.h>
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
23 ]],
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
24 [[return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);]])
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
25 ],
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
26 [gl_cv_func_wmemchr=yes],
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
27 [gl_cv_func_wmemchr=no])
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
28 ])
5d2a7ba94045 wmemchr: Support for MSVC.
Bruno Haible <bruno@clisp.org>
parents: 15169
diff changeset
29 if test $gl_cv_func_wmemchr = no; then
14269
2841c44d4d34 New module 'wmemchr', part 3.
Bruno Haible <bruno@clisp.org>
parents: 14267
diff changeset
30 HAVE_WMEMCHR=0
2841c44d4d34 New module 'wmemchr', part 3.
Bruno Haible <bruno@clisp.org>
parents: 14267
diff changeset
31 fi
14267
9ccff8d6fbbe New module 'wmemchr'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 ])