[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Safe file update library ready (sort of)



On 06/02/11 18:40, Goswin von Brederlow wrote:

I absolutely hate that. A header file should be compilable on its
own. The times when #include<foo.h>  would slow down the compiler are
long gone and all include files are protected with #ifndef NAME so
duplicate includes are harmless.

On the other hand finding out what include files to include and in what
order is a real pain if you have multiple files. Even if you have read
the manual you will have to reread it every time you start a new project
again and again to get that right.
The includes necessary for safe_open are those necessary for open, plus safe_write.h itself. I don't see that as particularly burdensome. I'm not sure how platform independent any includes I put inside my header are going to be, and would rather not open this particular can of worms.

Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com


Reply to: