From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id FAA06422; Tue, 18 Nov 2003 05:23:50 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id FAA07098 for ; Tue, 18 Nov 2003 05:23:49 +0100 (MET) Received: from mailserver.di.unipi.it (apis.di.unipi.it [131.114.3.6]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hAI4Nm114668 for ; Tue, 18 Nov 2003 05:23:48 +0100 (MET) Received: from dhcp-131-114-3-91.di.unipi.it (dhcp-131-114-3-91 [131.114.3.91]) by mailserver.di.unipi.it (8.11.6/8.11.6) with ESMTP id hAI4Nms16454 for ; Tue, 18 Nov 2003 05:23:48 +0100 From: nick.name@inwind.it To: caml-list@inria.fr Subject: [Caml-list] How to avoid duplicate type declarations in C files with camlidl? Date: Tue, 18 Nov 2003 05:13:12 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200311180513.12009.nick.name@inwind.it> X-Loop: caml-list@inria.fr X-Spam: no; 0.00; struct:01 unistd:01 struct:01 char:01 opendir:01 char:01 readdir:01 typedef:01 camlidl:01 camlidl:01 int:01 exists:01 compile:02 string:03 string:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi all, I am stuck with camlidl: I want to declare a struct wich does not go in the produced .h file, because I (obviously) want to use the system header files. I don't seem to understand how to do so: here's my attempt quote(h,"#include "); quote(h,"#include "); quote(h,"#include "); typedef [abstract] void DIR; struct dirent { long int d_ino; [string] char d_name[256]; }; [unique] DIR * opendir([in,string] char *name); [unique] struct dirent * readdir([in,ref] DIR *dir); Written this way, the generated C and the header are wrong, because they contain a declaration for "DIR" , wich already exists, however I realize that dir is done with a macro. But the generated C source also contains a declaration for dirent, and according to the same example in the manual, it should not! Can someone show me how to compile and run this simple example? I have also tried the tests distributed with camlidl but I get so much compilation errors and in such different ways :) that I gave up. Thanks in advance Vincenzo ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners