[cfe-commits] r142007 - /cfe/trunk/include/clang/Basic/Builtins.def

Dimitry Andric dimitry at andric.com
Tue Oct 18 10:32:22 PDT 2011


On 2011-10-14 23:47, Joerg Sonnenberger wrote:
> Author: joerg
> Date: Fri Oct 14 16:47:27 2011
> New Revision: 142007
>
> URL: http://llvm.org/viewvc/llvm-project?rev=142007&view=rev
> Log:
> vfork comes from unistd.h
>
> Modified:
>      cfe/trunk/include/clang/Basic/Builtins.def
>
> Modified: cfe/trunk/include/clang/Basic/Builtins.def
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Builtins.def?rev=142007&r1=142006&r2=142007&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/Builtins.def (original)
> +++ cfe/trunk/include/clang/Basic/Builtins.def Fri Oct 14 16:47:27 2011
> @@ -672,6 +672,7 @@
>   LIBBUILTIN(bzero, "vv*z",         "f",     "strings.h", ALL_LANGUAGES)
>   // POSIX unistd.h
>   LIBBUILTIN(_exit, "vi",           "fr",    "unistd.h", ALL_LANGUAGES)
> +LIBBUILTIN(vfork, "iJ",           "fj",    "unistd.h", ALL_LANGUAGES)
>   // POSIX setjmp.h

While moving this under unistd.h is better, the prototype of vfork on
both BSD and Linux is:

   pid_t vfork(void);

E.g. the second parameter to LIBBUILTIN(), "iJ", is not correct; it
should be just "i".

Similarly, sigsetjmp has prototype:

   int sigsetjmp(sigjmp_buf, int);

So the second parameter there should be changed from iJ to iJi.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix-vfork-sigsetjmp-builtins-1.diff
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111018/91f52266/attachment.ksh>


More information about the cfe-commits mailing list