bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alloca on VMS


From: Bruno Haible
Subject: Re: alloca on VMS
Date: Mon, 3 Mar 2008 12:58:05 +0100
User-agent: KMail/1.5.4

John E. Malmberg wrote:
> In lib/alloca.in.h :
> 
> VMS needs a definition for the built-in __ALLOCA when using the DECC 
> compiler.

> --- /src_root/tar-1.19/lib/alloca.in.h  Wed Oct  3 12:11:13 2007
> +++ lib/alloca.in.h     Sun Mar  2 23:07:07 2008
> @@ -47,7 +47,11 @@
>  #  ifdef  __cplusplus
>  extern "C"
>  #  endif
> +#  if defined(__DECC) && defined(__VMS) /* DEC VMS compiler */
> +#   define alloca __ALLOCA
> +#  else
>  void *alloca (size_t);
> +#  endif
>  # endif
>  #endif

I committed your change with modifications:
- This definition was at the wrong place. You put it in the middle of a
  declaration.
- The style in this file is to avoid parentheses after '#if defined'.
- Can you be more precise about what "DEC VMS compiler" means:
  - Which version of the C compiler?
  - Which version of VMS or OpenVMS?
  We need this info in order to decide what to do if some time after you
  someone else comes and says "but it doesn't work on VMS, the code should be
  different".

Bruno


*** lib/alloca.in.h.orig        2008-03-03 12:52:37.000000000 +0100
--- lib/alloca.in.h     2008-03-03 12:52:17.000000000 +0100
***************
*** 42,49 ****
  # elif defined _MSC_VER
  #  include <malloc.h>
  #  define alloca _alloca
  # else
  #  include <stddef.h>
  #  ifdef  __cplusplus
  extern "C"
  #  endif
--- 42,51 ----
  # elif defined _MSC_VER
  #  include <malloc.h>
  #  define alloca _alloca
+ # elif defined __DECC && defined __VMS
+ #  define alloca __ALLOCA
  # else
  #  include <stddef.h>
  #  ifdef  __cplusplus
  extern "C"
  #  endif





reply via email to

[Prev in Thread] Current Thread [Next in Thread]