This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, libiberty] mkstemps and binary mode
- From: Ranjit Mathew <rmathew at gmail dot com>
- To: Mark Shinwell <shinwell at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 10 May 2006 16:15:22 +0530
- Subject: Re: [PATCH, libiberty] mkstemps and binary mode
- Openpgp: url=http://rmathew.com/aa_6C114B8F.txt
- References: <4461A75B.8010300@codesourcery.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Mark Shinwell wrote:
> +#ifdef _WIN32
> + fd = open (pattern, O_BINARY|O_RDWR|O_CREAT|O_EXCL, 0600);
> +#else
> fd = open (pattern, O_RDWR|O_CREAT|O_EXCL, 0600);
> +#endif
Or you can define:
#ifndef O_BINARY
# define O_BINARY 0
#endif
somewhere convenient and just add O_BINARY to that call
and whereever else it's necessary.
See c-pch.c or protoize.c in the "gcc" sub-folder for
prior usage.
My 2p,
Ranjit.
- --
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://rmathew.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEYcRCYb1hx2wRS48RAi+lAKCWkYmtawXapRKrgL8UC8LpBmydSwCeL49S
f2RlX2dSa+OD+3G0+StOjNA=
=HBdE
-----END PGP SIGNATURE-----