Maciej Blizinski <mac...@opencsw.org> wrote:

> O_DIRECTORY is not declared on Solaris 10. Test for it and only use it when
> available.
> ---
>  configure.ac          |    1 +
>  modules/misc/gnutls.c |    6 +++++-
>  2 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index efb2e99..6ce41f5 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -492,6 +492,7 @@ dnl Check for usual libc functions
>  AC_CHECK_DECLS([nanosleep],,,[#include <time.h>])
>  AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r if_nameindex 
> if_nametoindex isatty lstat memalign mmap openat pread posix_fadvise 
> posix_madvise setlocale stricmp strnicmp strptime uselocale])
>  AC_REPLACE_FUNCS([atof atoll dirfd fdopendir flockfile fsync getdelim getpid 
> gmtime_r inet_pton lldiv localtime_r nrand48 poll rewind setenv strcasecmp 
> strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r 
> strtoll swab tdestroy strverscmp])
> +AC_CHECK_DECLS([O_DIRECTORY])
>  AC_CHECK_FUNCS(fdatasync,,
>    [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
>  ])

Why?

POSIX grants this to be a #define, so you may safely use:

#ifdef  O_DIRECTORY

Jörg

-- 
 EMail:jo...@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       j...@cs.tu-berlin.de                (uni)  
       joerg.schill...@fokus.fraunhofer.de (work) Blog: 
http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
devel mailing list
devel@lists.opencsw.org
https://lists.opencsw.org/mailman/listinfo/devel

Reply via email to