* bug#13040: merge gnulib 'inline' changes
@ 2012-11-30 15:49 Paul Eggert
2012-11-30 16:52 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggert @ 2012-11-30 15:49 UTC (permalink / raw)
To: 13040
[-- Attachment #1: Type: text/plain, Size: 276 bytes --]
Tags: patch
Severity: minor
The attached patch brings Emacs up to date with respect to gnulib's
recent 'inline' changes (which were mostly inspired by Emacs).
It touches some Windows-related files so I'm CC:ing this to
Eli to give him a heads-up. I plan to install it soon.
[-- Attachment #2: inline.txt --]
[-- Type: text/plain, Size: 14578 bytes --]
=== modified file 'ChangeLog'
--- ChangeLog 2012-11-27 03:10:32 +0000
+++ ChangeLog 2012-11-30 15:45:09 +0000
@@ -1,3 +1,25 @@
+2012-11-30 Paul Eggert <eggert@cs.ucla.edu>
+
+ Merge from gnulib for 'inline', incorporating:
+ 2012-11-29 snippet/warn-on-use: no 'static inline'
+ 2012-11-29 ftruncate, fts, lstat, openat, raise: no 'static inline'
+ 2012-11-29 arctwo, md4, md5, sha1, sha256, sha512: no 'static inline'
+ 2012-11-29 fflush, stat: no 'static inline'
+ 2012-11-29 stdio: better 'inline'
+ 2012-11-29 sys_stat: no 'static inline'
+ 2012-11-29 unistd: better 'inline'
+ 2012-11-29 c-strtod, memcoll, readutmp: no 'static inline'
+ 2012-11-29 extern-inline: no 'static inline'
+ 2012-11-29 sys_socket: better 'inline'
+ * lib/stdio.c, lib/unistd.c: New files, from gnulib.
+ * build-aux/snippet/warn-on-use.h, lib/gnulib.mk, lib/lstat.c:
+ * lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c, lib/stat.c:
+ * lib/stdio.in.h, lib/sys_stat.in.h, lib/unistd.in.h, m4/c-strtod.m4:
+ * m4/extern-inline.m4, m4/gnulib-comp.m4, m4/lstat.m4, m4/md5.m4:
+ * m4/sha1.m4, m4/sha256.m4, m4/sha512.m4, m4/stat.m4, m4/stdio_h.m4:
+ * m4/sys_socket_h.m4, m4/sys_stat_h.m4, m4/unistd_h.m4:
+ Update from gnulib.
+
2012-11-27 Eli Zaretskii <eliz@gnu.org>
* make-dist (nt): Adjust to changes in names of the *.manifest files.
=== modified file 'build-aux/snippet/warn-on-use.h'
--- build-aux/snippet/warn-on-use.h 2012-05-26 23:14:36 +0000
+++ build-aux/snippet/warn-on-use.h 2012-11-30 15:45:09 +0000
@@ -55,7 +55,7 @@
rather than issue the nice warning, but the end result of informing
the developer about their portability problem is still achieved):
#if HAVE_RAW_DECL_ENVIRON
- static inline char ***rpl_environ (void) { return &environ; }
+ static char ***rpl_environ (void) { return &environ; }
_GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
# undef environ
# define environ (*rpl_environ ())
=== modified file 'lib/gnulib.mk'
--- lib/gnulib.mk 2012-11-17 22:12:47 +0000
+++ lib/gnulib.mk 2012-11-30 15:45:09 +0000
@@ -756,6 +756,7 @@
## begin gnulib module stdio
BUILT_SOURCES += stdio.h
+libgnu_a_SOURCES += stdio.c
# We need the following in order to create <stdio.h> when the system
# doesn't have one that works with the given compiler.
@@ -1251,6 +1252,7 @@
## begin gnulib module unistd
BUILT_SOURCES += unistd.h
+libgnu_a_SOURCES += unistd.c
# We need the following in order to create an empty placeholder for
# <unistd.h> when the system doesn't have one.
=== modified file 'lib/lstat.c'
--- lib/lstat.c 2012-05-26 23:14:36 +0000
+++ lib/lstat.c 2012-11-30 15:45:09 +0000
@@ -35,7 +35,7 @@
# include <sys/stat.h>
# undef __need_system_sys_stat_h
-static inline int
+static int
orig_lstat (const char *filename, struct stat *buf)
{
return lstat (filename, buf);
=== modified file 'lib/md5.c'
--- lib/md5.c 2012-05-26 23:14:36 +0000
+++ lib/md5.c 2012-11-30 15:45:09 +0000
@@ -83,7 +83,7 @@
/* Copy the 4 byte value from v into the memory location pointed to by *cp,
If your architecture allows unaligned access this is equivalent to
* (uint32_t *) cp = v */
-static inline void
+static void
set_uint32 (char *cp, uint32_t v)
{
memcpy (cp, &v, sizeof v);
=== modified file 'lib/sha1.c'
--- lib/sha1.c 2012-05-26 23:14:36 +0000
+++ lib/sha1.c 2012-11-30 15:45:09 +0000
@@ -70,7 +70,7 @@
/* Copy the 4 byte value from v into the memory location pointed to by *cp,
If your architecture allows unaligned access this is equivalent to
* (uint32_t *) cp = v */
-static inline void
+static void
set_uint32 (char *cp, uint32_t v)
{
memcpy (cp, &v, sizeof v);
=== modified file 'lib/sha256.c'
--- lib/sha256.c 2012-05-26 23:14:36 +0000
+++ lib/sha256.c 2012-11-30 15:45:09 +0000
@@ -90,7 +90,7 @@
/* Copy the value from v into the memory location pointed to by *cp,
If your architecture allows unaligned access this is equivalent to
* (uint32_t *) cp = v */
-static inline void
+static void
set_uint32 (char *cp, uint32_t v)
{
memcpy (cp, &v, sizeof v);
=== modified file 'lib/sha512.c'
--- lib/sha512.c 2012-05-26 23:14:36 +0000
+++ lib/sha512.c 2012-11-30 15:45:09 +0000
@@ -97,7 +97,7 @@
/* Copy the value from V into the memory location pointed to by *CP,
If your architecture allows unaligned access, this is equivalent to
* (__typeof__ (v) *) cp = v */
-static inline void
+static void
set_uint64 (char *cp, u64 v)
{
memcpy (cp, &v, sizeof v);
=== modified file 'lib/stat.c'
--- lib/stat.c 2012-06-22 17:20:00 +0000
+++ lib/stat.c 2012-11-30 15:45:09 +0000
@@ -42,7 +42,7 @@
# endif
#endif
-static inline int
+static int
orig_stat (const char *filename, struct stat *buf)
{
return stat (filename, buf);
=== added file 'lib/stdio.c'
--- lib/stdio.c 1970-01-01 00:00:00 +0000
+++ lib/stdio.c 2012-11-30 15:45:09 +0000
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_STDIO_INLINE _GL_EXTERN_INLINE
+#include "stdio.h"
=== modified file 'lib/stdio.in.h'
--- lib/stdio.in.h 2012-08-28 16:01:59 +0000
+++ lib/stdio.in.h 2012-11-30 15:45:09 +0000
@@ -46,6 +46,11 @@
#ifndef _@GUARD_PREFIX@_STDIO_H
#define _@GUARD_PREFIX@_STDIO_H
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_STDIO_INLINE
+# define _GL_STDIO_INLINE _GL_INLINE
+#endif
+
/* Get va_list. Needed on many systems, including glibc 2.8. */
#include <stdarg.h>
@@ -581,7 +586,7 @@
This affects only function declaration attributes, so it's not
needed for C++. */
# if !defined __cplusplus && 0 < __USE_FORTIFY_LEVEL
-static inline size_t _GL_ARG_NONNULL ((1, 4))
+_GL_STDIO_INLINE size_t _GL_ARG_NONNULL ((1, 4))
rpl_fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
{
size_t r = fwrite (ptr, s, n, stream);
@@ -1333,6 +1338,7 @@
"POSIX compliance");
#endif
+_GL_INLINE_HEADER_END
#endif /* _@GUARD_PREFIX@_STDIO_H */
#endif /* _@GUARD_PREFIX@_STDIO_H */
=== modified file 'lib/sys_stat.in.h'
--- lib/sys_stat.in.h 2012-05-26 23:14:36 +0000
+++ lib/sys_stat.in.h 2012-11-30 15:45:09 +0000
@@ -497,7 +497,7 @@
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# if !GNULIB_defined_rpl_mkdir
-static inline int
+static int
rpl_mkdir (char const *name, mode_t mode)
{
return _mkdir (name);
=== added file 'lib/unistd.c'
--- lib/unistd.c 1970-01-01 00:00:00 +0000
+++ lib/unistd.c 2012-11-30 15:45:09 +0000
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
+#include "unistd.h"
=== modified file 'lib/unistd.in.h'
--- lib/unistd.in.h 2012-06-22 17:20:00 +0000
+++ lib/unistd.in.h 2012-11-30 15:45:09 +0000
@@ -127,6 +127,11 @@
# include <getopt.h>
#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_UNISTD_INLINE
+# define _GL_UNISTD_INLINE _GL_INLINE
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
@@ -404,7 +409,7 @@
# endif
#elif defined GNULIB_POSIXCHECK
# if HAVE_RAW_DECL_ENVIRON
-static inline char ***
+_GL_UNISTD_INLINE char ***
rpl_environ (void)
{
return &environ;
@@ -862,7 +867,7 @@
# define getpagesize() _gl_getpagesize ()
# else
# if !GNULIB_defined_getpagesize_function
-static inline int
+_GL_UNISTD_INLINE int
getpagesize ()
{
return _gl_getpagesize ();
@@ -1530,6 +1535,7 @@
_GL_CXXALIASWARN (write);
#endif
+_GL_INLINE_HEADER_END
#endif /* _@GUARD_PREFIX@_UNISTD_H */
#endif /* _@GUARD_PREFIX@_UNISTD_H */
=== modified file 'm4/c-strtod.m4'
--- m4/c-strtod.m4 2012-05-26 23:14:36 +0000
+++ m4/c-strtod.m4 2012-11-30 15:45:09 +0000
@@ -1,4 +1,4 @@
-# c-strtod.m4 serial 14
+# c-strtod.m4 serial 15
# Copyright (C) 2004-2006, 2009-2012 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -38,9 +38,6 @@
[
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_CHECK_FUNCS([strtod_l])
-
- AC_REQUIRE([AC_C_INLINE])
- :
])
dnl Prerequisites of lib/c-strtold.c.
@@ -49,7 +46,4 @@
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_C99_STRTOLD])
AC_CHECK_FUNCS([strtold_l])
-
- AC_REQUIRE([AC_C_INLINE])
- :
])
=== modified file 'm4/extern-inline.m4'
--- m4/extern-inline.m4 2012-09-30 04:19:32 +0000
+++ m4/extern-inline.m4 2012-11-30 15:45:09 +0000
@@ -7,7 +7,6 @@
AC_DEFUN([gl_EXTERN_INLINE],
[
- AC_REQUIRE([AC_C_INLINE])
AH_VERBATIM([extern_inline],
[/* _GL_INLINE is a portable alternative to ISO C99 plain 'inline'.
_GL_EXTERN_INLINE is a portable alternative to 'extern inline'.
@@ -32,8 +31,8 @@
# endif
# define _GL_EXTERN_INLINE extern
#else
-# define _GL_INLINE static inline
-# define _GL_EXTERN_INLINE static inline
+# define _GL_INLINE static
+# define _GL_EXTERN_INLINE static
#endif
#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
=== modified file 'm4/gnulib-comp.m4'
--- m4/gnulib-comp.m4 2012-11-14 04:55:41 +0000
+++ m4/gnulib-comp.m4 2012-11-30 15:45:09 +0000
@@ -690,6 +690,7 @@
lib/stdbool.in.h
lib/stddef.in.h
lib/stdint.in.h
+ lib/stdio.c
lib/stdio.in.h
lib/stdlib.in.h
lib/strftime.c
@@ -712,6 +713,7 @@
lib/timespec.h
lib/u64.c
lib/u64.h
+ lib/unistd.c
lib/unistd.in.h
lib/utimens.c
lib/utimens.h
=== modified file 'm4/lstat.m4'
--- m4/lstat.m4 2012-05-26 23:14:36 +0000
+++ m4/lstat.m4 2012-11-30 15:45:09 +0000
@@ -1,4 +1,4 @@
-# serial 25
+# serial 26
# Copyright (C) 1997-2001, 2003-2012 Free Software Foundation, Inc.
#
@@ -27,11 +27,7 @@
])
# Prerequisites of lib/lstat.c.
-AC_DEFUN([gl_PREREQ_LSTAT],
-[
- AC_REQUIRE([AC_C_INLINE])
- :
-])
+AC_DEFUN([gl_PREREQ_LSTAT], [:])
AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
[
=== modified file 'm4/md5.m4'
--- m4/md5.m4 2012-05-26 23:14:36 +0000
+++ m4/md5.m4 2012-11-30 15:45:09 +0000
@@ -1,4 +1,4 @@
-# md5.m4 serial 12
+# md5.m4 serial 13
dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,5 @@
[
dnl Prerequisites of lib/md5.c.
AC_REQUIRE([gl_BIGENDIAN])
- AC_REQUIRE([AC_C_INLINE])
:
])
=== modified file 'm4/sha1.m4'
--- m4/sha1.m4 2012-05-26 23:14:36 +0000
+++ m4/sha1.m4 2012-11-30 15:45:09 +0000
@@ -1,4 +1,4 @@
-# sha1.m4 serial 10
+# sha1.m4 serial 11
dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,5 @@
[
dnl Prerequisites of lib/sha1.c.
AC_REQUIRE([gl_BIGENDIAN])
- AC_REQUIRE([AC_C_INLINE])
:
])
=== modified file 'm4/sha256.m4'
--- m4/sha256.m4 2012-05-26 23:14:36 +0000
+++ m4/sha256.m4 2012-11-30 15:45:09 +0000
@@ -1,4 +1,4 @@
-# sha256.m4 serial 5
+# sha256.m4 serial 6
dnl Copyright (C) 2005, 2008-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -8,5 +8,4 @@
[
dnl Prerequisites of lib/sha256.c.
AC_REQUIRE([gl_BIGENDIAN])
- AC_REQUIRE([AC_C_INLINE])
])
=== modified file 'm4/sha512.m4'
--- m4/sha512.m4 2012-05-26 23:14:36 +0000
+++ m4/sha512.m4 2012-11-30 15:45:09 +0000
@@ -1,4 +1,4 @@
-# sha512.m4 serial 6
+# sha512.m4 serial 7
dnl Copyright (C) 2005-2006, 2008-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -8,5 +8,4 @@
[
dnl Prerequisites of lib/sha512.c.
AC_REQUIRE([gl_BIGENDIAN])
- AC_REQUIRE([AC_C_INLINE])
])
=== modified file 'm4/stat.m4'
--- m4/stat.m4 2012-05-26 23:14:36 +0000
+++ m4/stat.m4 2012-11-30 15:45:09 +0000
@@ -1,4 +1,4 @@
-# serial 10
+# serial 11
# Copyright (C) 2009-2012 Free Software Foundation, Inc.
#
@@ -68,8 +68,4 @@
])
# Prerequisites of lib/stat.c.
-AC_DEFUN([gl_PREREQ_STAT],
-[
- AC_REQUIRE([AC_C_INLINE])
- :
-])
+AC_DEFUN([gl_PREREQ_STAT], [:])
=== modified file 'm4/stdio_h.m4'
--- m4/stdio_h.m4 2012-08-28 16:01:59 +0000
+++ m4/stdio_h.m4 2012-11-30 15:45:09 +0000
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 42
+# stdio_h.m4 serial 43
dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -7,7 +7,6 @@
AC_DEFUN([gl_STDIO_H],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
- AC_REQUIRE([AC_C_INLINE])
gl_NEXT_HEADERS([stdio.h])
dnl No need to create extra modules for these functions. Everyone who uses
=== modified file 'm4/sys_socket_h.m4'
--- m4/sys_socket_h.m4 2012-06-22 21:26:37 +0000
+++ m4/sys_socket_h.m4 2012-11-30 15:45:09 +0000
@@ -1,4 +1,4 @@
-# sys_socket_h.m4 serial 22
+# sys_socket_h.m4 serial 23
dnl Copyright (C) 2005-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -10,7 +10,6 @@
[
AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_C_INLINE])
dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have
dnl old-style declarations (with return type 'int' instead of 'ssize_t')
=== modified file 'm4/sys_stat_h.m4'
--- m4/sys_stat_h.m4 2012-10-04 07:15:42 +0000
+++ m4/sys_stat_h.m4 2012-11-30 15:45:09 +0000
@@ -1,4 +1,4 @@
-# sys_stat_h.m4 serial 27 -*- Autoconf -*-
+# sys_stat_h.m4 serial 28 -*- Autoconf -*-
dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -11,9 +11,6 @@
[
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
- dnl For the mkdir substitute.
- AC_REQUIRE([AC_C_INLINE])
-
dnl Check for broken stat macros.
AC_REQUIRE([AC_HEADER_STAT])
=== modified file 'm4/unistd_h.m4'
--- m4/unistd_h.m4 2012-05-26 23:14:36 +0000
+++ m4/unistd_h.m4 2012-11-30 15:45:09 +0000
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 65
+# unistd_h.m4 serial 66
dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -11,7 +11,6 @@
dnl Use AC_REQUIRE here, so that the default behavior below is expanded
dnl once only, before all statements that occur in other macros.
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- AC_REQUIRE([AC_C_INLINE])
gl_CHECK_NEXT_HEADERS([unistd.h])
if test $ac_cv_header_unistd_h = yes; then
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#13040: merge gnulib 'inline' changes
2012-11-30 15:49 bug#13040: merge gnulib 'inline' changes Paul Eggert
@ 2012-11-30 16:52 ` Eli Zaretskii
2012-11-30 18:26 ` Paul Eggert
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2012-11-30 16:52 UTC (permalink / raw)
To: Paul Eggert; +Cc: 13040
> Date: Fri, 30 Nov 2012 07:49:22 -0800
> From: Paul Eggert <eggert@cs.ucla.edu>
> CC: Eli Zaretskii <eliz@gnu.org>
>
> The attached patch brings Emacs up to date with respect to gnulib's
> recent 'inline' changes (which were mostly inspired by Emacs).
> It touches some Windows-related files so I'm CC:ing this to
> Eli to give him a heads-up. I plan to install it soon.
Thanks, this looks OK as far as Windows build is concerned.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#13040: merge gnulib 'inline' changes
2012-11-30 16:52 ` Eli Zaretskii
@ 2012-11-30 18:26 ` Paul Eggert
0 siblings, 0 replies; 3+ messages in thread
From: Paul Eggert @ 2012-11-30 18:26 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 13040-done
On 11/30/12 08:52, Eli Zaretskii wrote:
> Thanks, this looks OK as far as Windows build is concerned.
Thanks, installed as trunk bzr 111043.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-30 18:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-30 15:49 bug#13040: merge gnulib 'inline' changes Paul Eggert
2012-11-30 16:52 ` Eli Zaretskii
2012-11-30 18:26 ` Paul Eggert
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.