comparison lib/portability.h @ 1259:565980862743 draft

Probes for O_NOFOLLOW that compile and run something aren't compatible with cross compiling, so just #define it to 0 if it's not in fcntl.h where posix-2008 says.
author Rob Landley <rob@landley.net>
date Tue, 15 Apr 2014 21:59:42 -0500
parents 63db77909fc8
children 6f18a0845db3
comparison
equal deleted inserted replaced
1258:fd0a595f5486 1259:565980862743
156 // Linux headers not listed by POSIX or LSB 156 // Linux headers not listed by POSIX or LSB
157 #include <shadow.h> 157 #include <shadow.h>
158 #include <sys/mount.h> 158 #include <sys/mount.h>
159 #include <sys/swap.h> 159 #include <sys/swap.h>
160 160
161 // compile time probes for stuff libc didn't provide 161 // Some systems don't define O_NOFOLLOW, and it varies by architecture, so...
162 #include "generated/portability.h" 162 #include <fcntl.h>
163 #ifndef O_NOFOLLOW
164 #define O_NOFOLLOW 0
165 #endif