From owner-freebsd-hackers Wed Oct 24 15:28:24 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from blackcomb.panasas.com (gw2.panasas.com [65.194.124.178]) by hub.freebsd.org (Postfix) with ESMTP id 3B52F37B401 for ; Wed, 24 Oct 2001 15:28:21 -0700 (PDT) Received: from dynamic-w-213.panasas.com (dynamic-w-213.panasas.com [172.17.132.213]) by blackcomb.panasas.com (8.9.3/8.9.3) with ESMTP id SAA32646 for ; Wed, 24 Oct 2001 18:28:20 -0400 Date: Wed, 24 Oct 2001 15:28:25 -0700 Mime-Version: 1.0 (Apple Message framework v472) Content-Type: text/plain; charset=US-ASCII; format=flowed Subject: C++ code in the FreeBSD kernel From: Denis Serenyi To: freebsd-hackers@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <70E7B42B-C8CE-11D5-ACE1-003065675568@panasas.com> X-Mailer: Apple Mail (2.472) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Has anyone out there tried to get C++ code running in the freebsd kernel (like as a .ko)? I have a piece of code that I got working in userland, and would like to port it in the kernel (I had anecdotal evidence that it worked). The major problem is that the library, when in kernel, uses a whole bunch of kernel specific routines (not surprisingly), some of which are inline C functions. I believe it will be necessary to define _KERNEL in order to get all this to work correctly, but having that flag enabled causes code to be compiled which is not C++ friendly (functions with variable names "new", implicit type casts from void*... things that are ok in C but not in C++). I am also investigating the possibility of tweaking compiler options in such a way to allow these sorts of errors / warnings to be ignored. If anyone has any experience and advice for this situation, I would love to hear it! Thanks! Denis Serenyi Please cc me as I am not on this mailing list. I didn't find anything in the archives on this topic, but I apologize if it has been beaten to death. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message