Re: 4.1.30 and 4.1.31 build failure on S10x86 5/08

[email protected] (Charles Seeger)
Newsgroups gmane.comp.security.firewalls.ipfilter
Message-ID <3379_1224452839_48FBAAE6_3379_19337_1_200810192144.RAA19646@eclipse.cise.ufl.edu>
Date: Sun, 19 Oct 2008 06:49:12 -0500
+------ "J.D. Bronson" wrote (Sun, 20-Dec-71, 20:02 -0500):
| 
| At 09:23 PM 10/18/2008 -0700, Darren Reed wrote:
| >I'll have to install solaris 8 to check this out...
| >
| >S10 doesn't require the other includes, only the workaround for __inline.
| >
| >Cheers,
| >Darren
| 
| Could someone possibly provide a S10 'only' patch from this so I can test?

That would be just this part of the original diff:

	@@ -43,7 +49,11 @@
	 static u_int8_t arc4_randbyte(void);
	 static int ipf_read_random(void *dest, int length);
 
	+#ifdef __SUNPRO_C
	+static inline void
	+#else
	 static __inline void
	+#endif
	 arc4_swap(u_int8_t *a, u_int8_t *b)
	 {
	 	u_int8_t c;

Though those line numbers would change to "@@ -43,7 +43,11 @@"
without the previous six extra lines for the includes.

If one wants to guard the gcc "__inline" (or any other gcc-isms),
the "__GNUC__" cpp macro might be best choice, short of using any
autoconf-like generated macros.  Something like:

	#if   defined __GNUC__
	static __inline void
	#elif defined __SUNPRO_C
	static inline void
	#else
	static void
	#endif

Alas, I haven't used any other compilers recently enough to recall
what might be appropriate for them.  A quick look at GNU autoconf
suggests that some compilers use "__inline__".  Since autoconf
actually tests for all three, it doesn't enumerate which compiler
uses which inline flavor.

Best,
Chuck
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.