From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21187 invoked by alias); 30 Oct 2009 20:06:00 -0000 Received: (qmail 21177 invoked by uid 22791); 30 Oct 2009 20:05:58 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-bw0-f219.google.com (HELO mail-bw0-f219.google.com) (209.85.218.219) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 30 Oct 2009 20:05:54 +0000 Received: by bwz19 with SMTP id 19so4276872bwz.8 for ; Fri, 30 Oct 2009 13:05:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.102.248.14 with SMTP id v14mr816807muh.74.1256933151604; Fri, 30 Oct 2009 13:05:51 -0700 (PDT) Date: Fri, 30 Oct 2009 20:06:00 -0000 Message-ID: <666572260910301305s70f75aefnd73ede1cbd65f59b@mail.gmail.com> Subject: [libffi] variable arguments support From: Adrien To: libffi-discuss@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org X-SW-Source: 2009/txt/msg00332.txt.bz2 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