This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, libiberty] mkstemps and binary mode


-----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-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]