Mercurial > hg > octave-nkf > gnulib-hg
annotate m4/ssize_t.m4 @ 17729:874a5cc03904
test-userspec: don't look up numeric user names
* tests/test-userspec.c: I found a system for which getpwnam("0")
returned a pointer to a non-root user's entry, and that made the
test fail.
(T): Prefix each numeric input with "+", to inhibit lookup.
author | Jim Meyering <meyering@fb.com> |
---|---|
date | Fri, 18 Jul 2014 14:16:44 -0700 |
parents | 344018b6e5d7 |
children | ab58d4870664 |
rev | line source |
---|---|
13577
d53740f6f336
Modernize AC_TRY_COMPILE invocations.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
1 # ssize_t.m4 serial 5 (gettext-0.18.2) |
17587 | 2 dnl Copyright (C) 2001-2003, 2006, 2010-2014 Free Software Foundation, Inc. |
5585
adff74659d81
Use an all-permissive copyright notice, recommended by RMS.
Bruno Haible <bruno@clisp.org>
parents:
4892
diff
changeset
|
3 dnl This file is free software; the Free Software Foundation |
adff74659d81
Use an all-permissive copyright notice, recommended by RMS.
Bruno Haible <bruno@clisp.org>
parents:
4892
diff
changeset
|
4 dnl gives unlimited permission to copy and/or distribute it, |
adff74659d81
Use an all-permissive copyright notice, recommended by RMS.
Bruno Haible <bruno@clisp.org>
parents:
4892
diff
changeset
|
5 dnl with or without modifications, as long as this notice is preserved. |
4403
8c6310a47379
Test for ssize_t. Needed for portability to mingw32.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
6 |
8c6310a47379
Test for ssize_t. Needed for portability to mingw32.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
7 dnl From Bruno Haible. |
8c6310a47379
Test for ssize_t. Needed for portability to mingw32.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 dnl Test whether ssize_t is defined. |
8c6310a47379
Test for ssize_t. Needed for portability to mingw32.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
9 |
8c6310a47379
Test for ssize_t. Needed for portability to mingw32.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
10 AC_DEFUN([gt_TYPE_SSIZE_T], |
8c6310a47379
Test for ssize_t. Needed for portability to mingw32.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
11 [ |
6822
57111fdd7d81
* m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
Eric Blake <ebb9@byu.net>
parents:
5585
diff
changeset
|
12 AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t], |
13577
d53740f6f336
Modernize AC_TRY_COMPILE invocations.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
13 [AC_COMPILE_IFELSE( |
d53740f6f336
Modernize AC_TRY_COMPILE invocations.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
14 [AC_LANG_PROGRAM( |
d53740f6f336
Modernize AC_TRY_COMPILE invocations.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
15 [[#include <sys/types.h>]], |
d53740f6f336
Modernize AC_TRY_COMPILE invocations.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
16 [[int x = sizeof (ssize_t *) + sizeof (ssize_t); |
d53740f6f336
Modernize AC_TRY_COMPILE invocations.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
17 return !x;]])], |
6822
57111fdd7d81
* m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
Eric Blake <ebb9@byu.net>
parents:
5585
diff
changeset
|
18 [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])]) |
4403
8c6310a47379
Test for ssize_t. Needed for portability to mingw32.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
19 if test $gt_cv_ssize_t = no; then |
6822
57111fdd7d81
* m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
Eric Blake <ebb9@byu.net>
parents:
5585
diff
changeset
|
20 AC_DEFINE([ssize_t], [int], |
4403
8c6310a47379
Test for ssize_t. Needed for portability to mingw32.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
21 [Define as a signed type of the same size as size_t.]) |
8c6310a47379
Test for ssize_t. Needed for portability to mingw32.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
22 fi |
8c6310a47379
Test for ssize_t. Needed for portability to mingw32.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
23 ]) |