You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dean Gaudet <dg...@arctic.org> on 1998/11/11 20:19:19 UTC
[PATCH] Re: os_inline.c finctions are not inlined in Apache 1.3.3
Did this ever get committed? It should... +1
Dean
On Sun, 8 Nov 1998, Khimenko Victor wrote:
> I'm not sure if this is right list to send such stuff but subj. What exactly
> happens:
> "ap_config.h" includes "os.h" BEFORE test for GNU C and USE_GNU_INLINE
> definition. As result this
> -- cut --
> #include "os.h"
> #include "ap_config.h"
> -- cut --
> will use __inline__ but that
> -- cut --
> #include "ap_config.h"
> #include "os.h"
> -- cut --
> will not use __inline__ ... But AFAIK second variant is used in Apache sources
> and thus finctions designed to be inlined (AFAIK just now only one function
> anyway) are not inlined :-(( Proposed fix will be:
>
> --- src/include/ap_config.h Sun Nov 8 02:48:33 1998
> +++ src/include/ap_config.h Sun Nov 8 02:48:07 1998
> @@ -84,6 +84,27 @@
> #include <sys/types.h>
> #include <sys/stat.h>
>
> +/* So that we can use inline on some critical functions, and use
> + * GNUC attributes (such as to get -Wall warnings for printf-like
> + * functions). Only do this in gcc 2.7 or later ... it may work
> + * on earlier stuff, but why chance it.
> + *
> + * We've since discovered that the gcc shipped with NeXT systems
> + * as "cc" is completely broken. It claims to be __GNUC__ and so
> + * on, but it doesn't implement half of the things that __GNUC__
> + * means. In particular it's missing inline and the __attribute__
> + * stuff. So we hack around it. PR#1613. -djg
> + */
> +#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 7 || defined(NEXT)
> +#define ap_inline
> +#define __attribute__(__x)
> +#define ENUM_BITFIELD(e,n,w) signed int n : w
> +#else
> +#define ap_inline __inline__
> +#define USE_GNU_INLINE
> +#define ENUM_BITFIELD(e,n,w) e n : w
> +#endif
> +
> #ifdef WIN32
> /* include process.h first so we can override spawn[lv]e* properly */
> #include <process.h>
> @@ -856,27 +877,6 @@
> #define ap_private_extern __private_extern__
> #else
> #define ap_private_extern
> -#endif
> -
> -/* So that we can use inline on some critical functions, and use
> - * GNUC attributes (such as to get -Wall warnings for printf-like
> - * functions). Only do this in gcc 2.7 or later ... it may work
> - * on earlier stuff, but why chance it.
> - *
> - * We've since discovered that the gcc shipped with NeXT systems
> - * as "cc" is completely broken. It claims to be __GNUC__ and so
> - * on, but it doesn't implement half of the things that __GNUC__
> - * means. In particular it's missing inline and the __attribute__
> - * stuff. So we hack around it. PR#1613. -djg
> - */
> -#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 7 || defined(NEXT)
> -#define ap_inline
> -#define __attribute__(__x)
> -#define ENUM_BITFIELD(e,n,w) signed int n : w
> -#else
> -#define ap_inline __inline__
> -#define USE_GNU_INLINE
> -#define ENUM_BITFIELD(e,n,w) e n : w
> #endif
>
> /*
>
>
>
>