Mercurial > octave-libgccjit
comparison src/file-io.cc @ 10259:65b41bc71f09
use gnulib fcntl module
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 03 Feb 2010 17:05:02 -0500 |
parents | 2d47356a7a1a |
children | 57a59eae83cc |
comparison
equal
deleted
inserted
replaced
10258:e317791645c4 | 10259:65b41bc71f09 |
---|---|
1951 // Prototype for mkstemps in libiberty | 1951 // Prototype for mkstemps in libiberty |
1952 extern "C" int mkstemps (char *pattern, int suffix_len); | 1952 extern "C" int mkstemps (char *pattern, int suffix_len); |
1953 #endif | 1953 #endif |
1954 | 1954 |
1955 #if ! defined (HAVE_MKSTEMP) && ! defined (HAVE_MKSTEMPS) && defined (_MSC_VER) | 1955 #if ! defined (HAVE_MKSTEMP) && ! defined (HAVE_MKSTEMPS) && defined (_MSC_VER) |
1956 # if defined (HAVE_FCNTL_H) | 1956 #include <fcntl.h> |
1957 # include <fcntl.h> | 1957 #include <sys/stat.h> |
1958 # endif | |
1959 # if defined (HAVE_SYS_STAT_H) | |
1960 # include <sys/stat.h> | |
1961 # endif | |
1962 int mkstemp (char *tmpl) | 1958 int mkstemp (char *tmpl) |
1963 { | 1959 { |
1964 int ret=-1; | 1960 int ret=-1; |
1965 mktemp (tmpl); | 1961 mktemp (tmpl); |
1966 ret = open (tmpl, O_RDWR | O_BINARY | O_CREAT | O_EXCL | _O_SHORT_LIVED, | 1962 ret = open (tmpl, O_RDWR | O_BINARY | O_CREAT | O_EXCL | _O_SHORT_LIVED, |