From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 21 02:33:43 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 68BFC16A4CE for ; Thu, 21 Apr 2005 02:33:43 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8B3543D31 for ; Thu, 21 Apr 2005 02:33:42 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.3/8.13.1) with ESMTP id j3L2WfsX002898; Wed, 20 Apr 2005 20:32:41 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 20 Apr 2005 20:32:57 -0600 (MDT) Message-Id: <20050420.203257.69059150.imp@bsdimp.com> To: opensource.enthousiat@gmail.com From: "M. Warner Losh" In-Reply-To: <37e1316605042019072b5d7a0e@mail.gmail.com> References: <37e1316605042019072b5d7a0e@mail.gmail.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: KLD module with C++ iostreams ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2005 02:33:43 -0000 In message: <37e1316605042019072b5d7a0e@mail.gmail.com> Aziz KEZZOU writes: : Hi hackers, : I am wondering if I can use c++ iostreams inside the kernel ? : After all the code : cout << "Hello world!" << endl; : ends accessing the stdout just like : printf("Hello world!\n"); right ? Just like, yes. Exactly the same thing as, no. The details matter here. There's a lot of code to make this happen. : So if I could compile my KLD module with static linkage to libstdc++, : that should be ok, right ? No. : Any one did or knows how to do this ? I've done C++ in the kernel before. IT is realtively easy to get very basic functioanlity. You won't have streams, exceptions, etc. However, to have all the features of C++ would take a lot of work. Warner