This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: [RFA] Protect dirent.h against multiple inclusion.
- From: Christopher Faylor <cgf at redhat dot com>
- To: "J. Johnston" <jjohnstn at cygnus dot com>
- Cc: newlib at sources dot redhat dot com
- Date: Fri, 30 Nov 2001 12:23:54 -0500
- Subject: Re: [RFA] Protect dirent.h against multiple inclusion.
- References: <20011130024458.GA18346@redhat.com> <3C07BFC5.D35DE2E0@cygnus.com>
On Fri, Nov 30, 2001 at 12:20:05PM -0500, J. Johnston wrote:
>Christopher Faylor wrote:
>>
>> Someone on the gcc mailing list stumbled over this recently.
>>
>> Ok to check in?
>>
>
>Yes, please do.
Ok. I actually meant to nuke the libc/include/sys/dirent.h part. I think
that this kind of protection doesn't work well with include_next and include_next
is used in that file.
I also had a typo in my patch, which I corrected.
cgf
>-- Jeff J.
>
>>
>> 2001-11-29 Christopher Faylor <cgf@redhat.com>
>>
>> * libc/include/dirent.h: Protect against multiple inclusion.
>> * libc/include/sys/dirent.h: Ditto.
>>
>> Index: libc/include/dirent.h
>> ===================================================================
>> RCS file: /cvs/uberbaum/newlib/libc/include/dirent.h,v
>> retrieving revision 1.2
>> diff -u -p -r1.2 dirent.h
>> --- dirent.h 2000/11/21 23:57:24 1.2
>> +++ dirent.h 2001/11/30 02:42:39
>> @@ -1,3 +1,5 @@
>> +#ifndef _DIRENT_H_
>> +#define _DIRENT_H_
>> #ifdef __cplusplus
>> extern "C" {
>> #endif
>> @@ -10,3 +12,4 @@ extern "C" {
>> #ifdef __cplusplus
>> }
>> #endif
>> +#endif /*_DIRENT_H_/
--
cgf@redhat.com Red Hat, Inc.
http://sources.redhat.com/ http://www.redhat.com/