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

Reply via email to