From mboxrd@z Thu Jan 1 00:00:00 1970 From: fruktopus@gmail.com (=?UTF-8?B?U3RlcGhhbiBNw7xsbGVy?=) Date: Mon, 20 Jul 2015 18:03:39 +0200 Subject: what is the use of #ifndefs In-Reply-To: References: Message-ID: <55AD1BDB.6030805@gmail.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org The keyword is 'include guard' ~frukto Am 20.07.2015 um 17:55 schrieb leo kirotawa: > it means you don't want to redefine a .h file > > On Mon, Jul 20, 2015 at 7:03 AM, Ahmed Soliman > wrote: >> currently I started reading through the linux kernel and I started >> reading liunx/include/linux/list.h> I understood some of the functions >> but still I dont know what does these lines of code do >> #ifndef _LINUX_LIST_H >> #define _LINUX_LIST_H >> which exist at the very beginning of the file >> I also noticed that there is many similar ifndefs in almost any .h >> file in the kernel >> note that I understand wnat does ifndef do bu I dont understand what >> goal is it supposed to achieve at the beginning of the headerfile >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies at kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > >