This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
[libffi] variable arguments support
- From: Adrien <camaradetux at gmail dot com>
- To: libffi-discuss at sourceware dot org
- Date: Fri, 30 Oct 2009 21:05:51 +0100
- Subject: [libffi] variable arguments support
Hi,
I am trying to call a function with variable arguments. The libffi
README in gcc-4.3 sources mentionned this wasn't possible yet. The
more recent libffi sources (latest tarball available) mention:
> There is no support for calling varargs functions. This may work on
> some platforms, depending on how the ABI is defined, but it is not
> reliable.
Should I read that as "if this work for you, try lotto" or has there
been some actual effort towards that?
I tried a small test program on linux32, linux64 and sparc32 and it
worked each time. The code is available on vpaste.net[1] (simple
pastebin). I tried to make it long enough to trigger potential
problems but I don't know that much low-level stuff and I'm not sure
I'm testing for the right thing.
I'd like comments about this. I don't need extensive support but I
need at least linux32/64, win32/64 and (various) bsd (I'm writing a
desktop app).
Thanks.
[1] http://vpaste.net/nV629?
---
Adrien Nader