Commit 82598228 by Loren J. Rittle Committed by Loren J. Rittle

configure.in: Remove fcntl.h check; never define _POSIX_SOURCE, NO_FCNTL or OPEN_DECL.

	* libI77/configure.in: Remove fcntl.h check; never define
	_POSIX_SOURCE, NO_FCNTL or OPEN_DECL.  Add check for tmpnam().
	* libI77/configure: Rebuilt.
	* libI77/config.h.in: Rebuilt.
	* libI77/Makefile.in: Remove all traces of rawio.h from
	dependencies lists.
	* libI77/fio.h (FSEEK): Unroll -j1.7 -j1.6 made 2002-01-04.
	* libI77/open.c (f_open): Use HAVE_TMPNAM.
	* libI77/rawio.h: Remove file.

From-SVN: r48875
parent 751a1458
2002-01-15 Loren J. Rittle <ljrittle@acm.org>
* libI77/configure.in: Remove fcntl.h check; never define
_POSIX_SOURCE, NO_FCNTL or OPEN_DECL. Add check for tmpnam().
* libI77/configure: Rebuilt.
* libI77/config.h.in: Rebuilt.
* libI77/Makefile.in: Remove all traces of rawio.h from
dependencies lists.
* libI77/fio.h (FSEEK): Unroll -j1.7 -j1.6 made 2002-01-04.
* libI77/open.c (f_open): Use HAVE_TMPNAM.
* libI77/rawio.h: Remove file.
2002-01-14 John David Anglin <dave@hiauly1.hia.nrc.ca> 2002-01-14 John David Anglin <dave@hiauly1.hia.nrc.ca>
* libI77/configure.in (_LARGEFILE_SOURCE): AC_DEFINE. * libI77/configure.in (_LARGEFILE_SOURCE): AC_DEFINE.
......
...@@ -98,8 +98,8 @@ dfe.lo: fio.h config.h ...@@ -98,8 +98,8 @@ dfe.lo: fio.h config.h
dfe.lo: dfe.c fmt.h dfe.lo: dfe.c fmt.h
dolio.lo: dolio.c config.h dolio.lo: dolio.c config.h
due.lo: due.c fio.h config.h due.lo: due.c fio.h config.h
endfile.lo: endfile.c fio.h rawio.h config.h endfile.lo: endfile.c fio.h config.h
err.lo: err.c fio.h rawio.h config.h err.lo: err.c fio.h config.h
fmt.lo: fio.h config.h fmt.lo: fio.h config.h
fmt.lo: fmt.c fmt.h fmt.lo: fmt.c fmt.h
fmtlib.lo: fmtlib.c config.h fmtlib.lo: fmtlib.c config.h
...@@ -116,7 +116,7 @@ lread.lo: lread.c fp.h ...@@ -116,7 +116,7 @@ lread.lo: lread.c fp.h
lwrite.lo: fio.h lwrite.lo: fio.h
lwrite.lo: fmt.h lwrite.lo: fmt.h
lwrite.lo: lwrite.c lio.h lwrite.lo: lwrite.c lio.h
open.lo: open.c fio.h rawio.h config.h open.lo: open.c fio.h config.h
rdfmt.lo: fio.h config.h rdfmt.lo: fio.h config.h
rdfmt.lo: fmt.h rdfmt.lo: fmt.h
rdfmt.lo: rdfmt.c fp.h rdfmt.lo: rdfmt.c fp.h
......
...@@ -6,9 +6,6 @@ ...@@ -6,9 +6,6 @@
/* Define to `long' if <sys/types.h> doesn't define. */ /* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t #undef off_t
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
/* Define to `unsigned' if <sys/types.h> doesn't define. */ /* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t #undef size_t
...@@ -30,6 +27,9 @@ ...@@ -30,6 +27,9 @@
/* Define if you have the tempnam function. */ /* Define if you have the tempnam function. */
#undef HAVE_TEMPNAM #undef HAVE_TEMPNAM
/* Define if you have the tmpnam function. */
#undef HAVE_TMPNAM
/* Get Single Unix Specification semantics */ /* Get Single Unix Specification semantics */
#undef _XOPEN_SOURCE #undef _XOPEN_SOURCE
...@@ -45,12 +45,6 @@ ...@@ -45,12 +45,6 @@
/* Define for HP-UX ftello and fseeko extension. */ /* Define for HP-UX ftello and fseeko extension. */
#undef _LARGEFILE_SOURCE #undef _LARGEFILE_SOURCE
/* Define if fcntl.h is missing. */
#undef NO_FCNTL
/* Define if fcntl.h is missing. */
#undef OPEN_DECL
/* Define if we do not have Unix Stdio. */ /* Define if we do not have Unix Stdio. */
#undef NON_UNIX_STDIO #undef NON_UNIX_STDIO
......
...@@ -124,11 +124,6 @@ AC_CACHE_VAL(g77_cv_sys_mingw32, ...@@ -124,11 +124,6 @@ AC_CACHE_VAL(g77_cv_sys_mingw32,
AC_MSG_RESULT($g77_cv_sys_mingw32) AC_MSG_RESULT($g77_cv_sys_mingw32)
AC_CHECK_HEADER(fcntl.h,
test $g77_cv_header_posix = yes && AC_DEFINE(_POSIX_SOURCE),
AC_DEFINE(NO_FCNTL, 1, [Define if fcntl.h is missing.])
AC_DEFINE(OPEN_DECL, 1, [Define if fcntl.h is missing.]))
dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST AC_C_CONST
AC_TYPE_SIZE_T AC_TYPE_SIZE_T
...@@ -154,6 +149,7 @@ AC_CHECK_FUNCS(ftello) ...@@ -154,6 +149,7 @@ AC_CHECK_FUNCS(ftello)
AC_CHECK_FUNCS(ftruncate) AC_CHECK_FUNCS(ftruncate)
AC_CHECK_FUNCS(mkstemp) AC_CHECK_FUNCS(mkstemp)
AC_CHECK_FUNCS(tempnam) AC_CHECK_FUNCS(tempnam)
AC_CHECK_FUNCS(tmpnam)
# posix will guarantee the right behaviour for sprintf, else we can't be # posix will guarantee the right behaviour for sprintf, else we can't be
# sure; HEADER_STDC wouldn't be the right check in sunos4, for instance. # sure; HEADER_STDC wouldn't be the right check in sunos4, for instance.
......
...@@ -18,11 +18,7 @@ ...@@ -18,11 +18,7 @@
/* Only use fseeko/ftello if they are both there. */ /* Only use fseeko/ftello if they are both there. */
#if defined (HAVE_FSEEKO) && defined (HAVE_FTELLO) #if defined (HAVE_FSEEKO) && defined (HAVE_FTELLO)
/* The cast helps in any case where the fseeko() prototype is somehow missing #define FSEEK fseeko
(perhaps because _POSIX_SOURCE is defined and the system headers try
to keep a clean namespace in that case) even though the autoconf test
found the non-standard function via its trivial link test. */
#define FSEEK(a,b,c) fseeko(a, (off_t) b, c)
#define FTELL ftello #define FTELL ftello
#else #else
#define FSEEK fseek #define FSEEK fseek
......
...@@ -231,7 +231,7 @@ integer f_open(olist *a) ...@@ -231,7 +231,7 @@ integer f_open(olist *a)
(void) strcpy (buf, s); (void) strcpy (buf, s);
free (s); free (s);
#else /* ! defined (HAVE_TEMPNAM) */ #else /* ! defined (HAVE_TEMPNAM) */
#ifdef _POSIX_SOURCE #ifdef HAVE_TMPNAM
tmpnam(buf); tmpnam(buf);
#else #else
(void) strcpy(buf,"tmp.FXXXXXX"); (void) strcpy(buf,"tmp.FXXXXXX");
......
#ifndef KR_headers
#if defined (MSDOS) && !defined (GO32)
#include "io.h"
#ifndef WATCOM
#define close _close
#define creat _creat
#define open _open
#define read _read
#define write _write
#endif /*WATCOM*/
#endif /*MSDOS*/
#ifdef __cplusplus
extern "C" {
#endif
#if !(defined (MSDOS) && !defined (GO32))
#ifdef OPEN_DECL
extern int creat(const char*,int), open(const char*,int);
#endif
extern int close(int);
#if !(defined(_WIN32) && !defined(__CYGWIN32__))
extern int read(int,void*,size_t), write(int,void*,size_t);
#endif
extern int unlink(const char*);
#ifndef _POSIX_SOURCE
#ifndef NON_UNIX_STDIO
extern FILE *fdopen(int, const char*);
#endif
#endif
#endif /*KR_HEADERS*/
extern char *mktemp(char*);
#ifdef __cplusplus
}
#endif
#endif
#ifndef NO_FCNTL
#include <fcntl.h>
#endif
#ifndef O_WRONLY
#define O_RDONLY 0
#define O_WRONLY 1
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment