branch-1_4 use of inline

Eric Blake <[email protected]>
Newsgroups gmane.comp.gnu.m4.patches
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Based on recent gnulib traffic, inline isn't always what it is cracked up
to be.  Without this patch, compiling with 'gcc -fno-inline' resulted in
multiple copies of to_uchar.

2006-11-11  Eric Blake  <[email protected]>

	* src/m4.h (to_uchar): Depend on HAVE_INLINE.

Index: src/m4.h
===================================================================
RCS file: /sources/m4/m4/src/m4.h,v
retrieving revision 1.1.1.1.2.34
diff -u -p -r1.1.1.1.2.34 m4.h
- --- src/m4.h    8 Nov 2006 05:08:26 -0000       1.1.1.1.2.34
+++ src/m4.h    11 Nov 2006 13:35:18 -0000
@@ -451,4 +451,8 @@ void reload_frozen_state (const char *);
 /* Convert a possibly-signed character to an unsigned character.  This is
    a bit safer than casting to unsigned char, since it catches some type
    errors that the cast doesn't.  */
+#if HAVE_INLINE
 static inline unsigned char to_uchar (char ch) { return ch; }
+#else
+# define to_uchar(C) ((unsigned char) (C))
+#endif

- --
Life is short - so eat dessert first!

Eric Blake             [email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFVdHn84KuGfSFAYARArVyAJoDLHqipBzuZIzkeoizL+7IRu/nGQCgq7Gl
fsc9qKgJKfLpoB/pFXZJsG8=
=vAcY
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.