freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] LFS support in builds/unix/ftsystem.c


From: Kenny Simpson
Subject: Re: [ft-devel] LFS support in builds/unix/ftsystem.c
Date: Sun, 22 Dec 2013 13:28:28 -0500

The problem with the CLOEXEC patch is that to have O_CLOEXEC defined, at least on a current x86-64 ubuntu 13.10 system, _XOPEN_SOURCE must be defined to 700 or greater to enable XOPEN_2K8, which gates the definition of the O_CLOEXEC in fcntl.h (bits/fcntl-linux.h).  So my patch works if either _XOPEN_SOURCE is set to 700 or greater, or if _GNU_SOURCE is set (which is how I usually build things, which is why I missed this at first)

Good catch with the ifdef/if... O_CLOEXEC being defined as '0' would not do the right thing.

I'll keep poking around...

-Kenny



On Sun, Dec 22, 2013 at 1:40 AM, Werner LEMBERG <address@hidden> wrote:

> Here is the compile-tested patch for using O_CLOEXEC: [...]
>
> +#ifdef O_CLOEXEC

According to the stuff in the gnulib git repository
(http://git.savannah.gnu.org/gitweb/?p=gnulib.git), the right way for
testing this flag is rather

  #if O_CLOEXEC
  ...

gnulib is an incredible source of portability knowledge...

> Let me know if I need to state anything about this being in the
> public domain, copyright assignment, etc...

Contributing a patch to the list is sufficient :-)

> nevermind...  looks like this needs some #defining too...  will keep
> poking at it.

What's the problem?


    Werner


reply via email to

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