[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mempcpy: needs restrict
From: |
Bruno Haible |
Subject: |
mempcpy: needs restrict |
Date: |
Mon, 12 Mar 2007 00:11:04 +0100 |
User-agent: |
KMail/1.5.4 |
The declaration of mempcpy() needs 'restrict'. If it's not supported or
defined away, one gets this error on AIX 5.1:
xlc -D_ALL_SOURCE -O -g -o test-alloca-opt test-alloca-opt.o
../gllib/libgnu.a
source='test-argp.c' object='test-argp.o' libtool=no DEPDIR=.deps
depmode=aix /bin/sh ./../build-aux/depcomp xlc -D_ALL_SOURCE -O
-DHAVE_CONFIG_H -I. -I. -I. -I.. -I./.. -I../gllib -I./../gllib -g -c
test-argp.c
"../gllib/string.h", line 85.38: 1506-275 (S) Unexpected text __dest
encountered.
"../gllib/string.h", line 85.67: 1506-275 (S) Unexpected text __src encountered.
or on OSF/1 4.0d:
cc: Error: ../gllib/string.h, line 85: Error parsing parameter list. Found
"__dest" when expecting one of: ",", ")".
extern void *mempcpy (void *restrict __dest, void const *restrict __src,
-------------------------------------^
I'm applying this fix. Hope it's ok with you, Simon.
2007-03-11 Bruno Haible <address@hidden>
* m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
*** m4/mempcpy.m4 27 Jan 2007 14:43:17 -0000 1.5
--- m4/mempcpy.m4 11 Mar 2007 23:09:09 -0000 1.6
***************
*** 1,4 ****
! # mempcpy.m4 serial 6
dnl Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 ----
! # mempcpy.m4 serial 7
dnl Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
***************
*** 9,14 ****
--- 9,17 ----
dnl Persuade glibc <string.h> to declare mempcpy().
AC_REQUIRE([AC_GNU_SOURCE])
+ dnl The mempcpy() declaration in lib/string_.h uses 'restrict'.
+ AC_REQUIRE([AC_C_RESTRICT])
+
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_REPLACE_FUNCS(mempcpy)
if test $ac_cv_func_mempcpy = no; then
- mempcpy: needs restrict,
Bruno Haible <=