This message generated a parse failure. Raw output follows here. Please use 'back' to navigate. From devnull@lkml.org Sun May 19 01:32:13 2024 Received: from vger.kernel.org (vger.kernel.org [209.116.70.75]) by kylie.puddingonline.com (8.11.6/8.11.6) with ESMTP id g91JNhU29621 for ; Tue, 1 Oct 2002 21:23:43 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 1 Oct 2002 15:11:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 1 Oct 2002 15:11:41 -0400 Received: from chaos.analogic.com ([204.178.40.224]:15748 "EHLO chaos.analogic.com") by vger.kernel.org with ESMTP id ; Tue, 1 Oct 2002 15:11:37 -0400 Received: (from root@localhost) by chaos.analogic.com (8.11.0.Beta3(chaos.analogic.com)/8.12.0.A) id g91JK4q00858; Tue, 1 Oct 2002 15:20:04 -0400 Date: Tue, 1 Oct 2002 15:20:04 -0400 (EDT) From: "Richard B. Johnson" Reply-To: root@chaos.analogic.com To: immortal1015 Cc: "linux-kernel@vger.kernel.org" Subject: Re: compiling errors In-Reply-To: <20021001185127.AA2C21B85AA@smtp-2.hotpop.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2 Oct 2002, immortal1015 wrote: > I tried to compile the very simple kernel module code as following. > I compile this code using gcc -c hello.c, but gcc tell me: > /usr/include/linux /module.h:60 parse error before 'atomic_t' > > What is the error? My gcc version is 2.96 and Redhat Linux 7.3 Script started on Tue Oct 1 15:15:14 2002 # cat >zzz.c #ifndef __KERNEL__ # define __KERNEL__ #endif #ifndef MODULE # define MODULE #endif #include #include #include #include /* printk */ int init_module(void) { printk("<1>Hello the world\n"); return 0; } void cleanup_module(void) { printk("<1>Goodbye the world\n"); } # gcc -Wall -O2 -c -o zzz.o zzz.c # insmod zzz.o # rmmod zzz # tail /var/s log/messages Oct 1 01:02:36 chaos sendmail[26509]: g9152V126509: ... User unknown Oct 1 07:23:15 chaos login: ROOT LOGIN ON tty1 Oct 1 07:28:23 chaos sendmail[27618]: g91BSK127618: <100000@chaos.analogic.com>... User unknown Oct 1 07:31:32 chaos sendmail[27648]: alias database /etc/mail/aliases rebuilt by root Oct 1 08:16:18 chaos login: ROOT LOGIN ON tty2 Oct 1 11:13:46 chaos sendmail[30538]: g91FDf130538: ... User unknown Oct 1 15:15:53 chaos kernel: Hello the world Oct 1 15:16:01 chaos kernel: Goodbye the world # exit exit Script done on Tue Oct 1 15:16:30 2002 Works here. You may have to always used -O2 to get in-lines to work correctly. Cheers, Dick Johnson Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips). The US military has given us many words, FUBAR, SNAFU, now ENRON. Yes, top management were graduates of West Point and Annapolis. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/