freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Close on exec for font files


From: David Turner
Subject: Re: [Devel] Close on exec for font files
Date: Thu, 03 Jan 2002 17:12:14 +0100

Hi,

Thanks Keith, I've commited your patch. I won't be able to
test it before tomorrow. Feel free to test it if you have
the time..

Cheers,

- David



Keith Packard a écrit :
> 
> Around 18 o'clock on Jan 3, David Turner wrote:
> 
> > I'm ready to add such code to the FreeType sources, however I'd like
> > to know wether these calls are Linux specific, available on all Unices,
> > and if they require specific Autoconf voodoo to properly nest them
> > in #if .. #endif controls ??
> 
> On almost all systems that XFree86 builds on, the following suffices:
> 
>         #include <fcntl.h>
>         #include <unistd.h>
> 
>         #ifdef F_SETFD
>         #ifdef FD_CLOEXEC
>                 ret = fcntl (fd, F_SETFD, FD_CLOEXEC);
>         #else
>                 ret = fcntl (fd, F_SETFD, 1);
>         #endif /* FD_CLOEXEC */
>         #endif /* F_SETFD */
> 
> You must have fcntl.h to use this; you should probably include unistd.h if
> it exists.
> 
> I'd add:
> 
>         AC_CHECK_HEADERS(fcntl.h)
>         AC_CHECK_HEADERS(unistd.h)
> 
> to configure.in and then
> 
>         #if HAVE_FCNTL_H
>         #include <fcntl.h>
>         #endif
>         #if HAVE_UNISTD_H
>         #include <unistd.h>
>         #endif
> 
> to the file and then use the litle code snippet above.
> 
> Keith Packard        XFree86 Core Team        Compaq Cambridge Research Lab
> 
> _______________________________________________
> Devel mailing list
> address@hidden
> http://www.freetype.org/mailman/listinfo/devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]