+2020-05-21 Bruno Haible <bruno@clisp.org>
+
+ fchownat: Support clang -fsanitize=implicit-integer-sign-change better.
+ Reported by Tim Rühsen in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
+ * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG,
+ gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Cast -1 to uid_t or git_t,
+ respectively.
+
2020-05-18 Tim Rühsen <tim.ruehsenqgmx.de>
getdelim: Avoid wrong configure results with gcc -fsanitize=address.
-# fchownat.m4 serial 5
+# fchownat.m4 serial 6
dnl Copyright (C) 2004-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
int
main ()
{
- return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
+ return (fchownat (AT_FDCWD, "$gl_dangle", (uid_t)(-1), getgid (),
AT_SYMLINK_NOFOLLOW) != 0
&& errno == ENOENT);
}
fd = open ("conftestdir", O_RDONLY);
if (fd < 0)
return 3;
- ret = fchownat (fd, "", -1, -1, 0);
+ ret = fchownat (fd, "", (uid_t)(-1), (gid_t)(-1), 0);
close (fd);
rmdir ("conftestdir");
return ret == 0;