[haiku-gsoc] Re: Xsi semaphorses: patch #1

  • From: "Salvatore Benedetto" <emitrax@xxxxxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Tue, 15 Jul 2008 20:17:47 +0000

2008/7/13 Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>:
>> +#include <posix/xsi_semaphore.h>
>> +#include <posix/realtime_sem_defs.h>
>> +
>> +#include <new>
>> +
>> +#include <OS.h>
>> +
>> +#include <kernel.h>
>> +#include <syscall_restart.h>
>> +
>> +#include <sys/ipc.h>
>> +#include <sys/types.h>
>> +
>> +#include <util/DoublyLinkedList.h>
>> [...]
>
> Include order is:
> * single private header matching the file (ie. "MyClass.h" for
> "MyClass.cpp")
> * then from most public (POSIX/STL, ...) to most private (ie: Haiku
> headers, private kernel headers, private headers)
>

By the way, that's actually seem not to be mentioned in the Haiuk
Coding Guidelines.

The only thing I found about "include" is the following:

- Alphabetize #include statements, group "includes" and <includes> separately.
- Don't use <pathname/include.h> (<sys/stat.h> is an exception).

It'd be nice if someone could update it.

Regards,
-- 
Salvatore Benedetto (a.k.a. emitrax)
Student of Computer Engineer
University of Pisa
www.haiku-os.it

Other related posts: