From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 15A9DBC37 for ; Wed, 28 Oct 2009 23:07:50 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: An8BAGJd6ErRVdvNkGdsb2JhbACRZIkhPwEBAQEJCQwHEwOuH4E7hkSIaAEDAwWEOgQ X-IronPort-AV: E=Sophos;i="4.44,641,1249250400"; d="scan'208";a="39127221" Received: from mail-ew0-f205.google.com ([209.85.219.205]) by mail1-smtp-roc.national.inria.fr with ESMTP; 28 Oct 2009 23:07:49 +0100 Received: by ewy1 with SMTP id 1so1227097ewy.27 for ; Wed, 28 Oct 2009 15:07:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=PDKBgoZLV6FzGSShsGokrsc26fO9pA6iYDarisvxSI4=; b=RkDI4MEZ9XWuVODC/7iguKm4PyuUs6KYCA33exV5CYp8ZSD7nFqNrB4WOWkI/0yJGD p/SMa97zvPTi+N5UWC7miwVc029zfigCXzgqJop/JGUtUQGSytAklWHnNbYyiJawosyz jGyF7a1VbBLC5PlQC9GzDhXCbvidDcvVl8qsQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=AAKI4ym9tW9fMNYRLeCzvZtyY8kxh57nFPchBvLKOp7dVvtiJqln/D26P7yYnm2jUz GdhCi2juWPsk+mujJrAoeUJSaDIavABVMeEhKvb1Xb26Ewv6yn9DgZvYEEFXFsy5EeVT VmSPyD84xsO+swmwSTOxporJC51Ze2641jzDQ= MIME-Version: 1.0 Received: by 10.211.128.6 with SMTP id f6mr6073527ebn.15.1256767669537; Wed, 28 Oct 2009 15:07:49 -0700 (PDT) Date: Wed, 28 Oct 2009 23:07:49 +0100 Message-ID: <666572260910281507q74cb1c1at157c9e3c86070c69@mail.gmail.com> Subject: [Caml-list] Binding C libraries which use variable arguments (stdarg.h) From: Adrien To: Caml Mailing List Content-Type: text/plain; charset=ISO-8859-1 X-Spam: no; 0.00; foo:01 stub:01 camlidl:01 varargs:01 caml-list:01 int:01 portability:02 variables:02 binding:02 hint:04 nader:05 variable:06 arguments:07 arguments:07 function:08 Hi, I am currently trying to bind a C function that takes variables arguments, like foo(int a, ...). I can't find how to make a C stub for that function. I found camlidl didn't support idl's "vararg" keyword and pidl (p stands for perl) didn't either. I was told to try libffi but it doesn't support varargs unfortunately. I also thought about doing it by hand but that's not the best idea for portability. Any other idea? Hint^WPointer? (sorry for the bad joke ;-) ) Thanks. PS: I was also told I was toast --- Adrien Nader