This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Preleminary patch for libI77
- To: gcc-patches at gcc dot gnu dot org
- Subject: Preleminary patch for libI77
- From: Andreas Jaeger <aj at suse dot de>
- Date: 16 May 2001 16:45:37 +0200
Sorry Toon, the problems are not fixed yet. My last patch that fixed
Loren's patch was not complete since I introduced config.h - and now
no options were passed to the files (@DEFS@ is defined differently
when config.h is used).
We now need to include "config.h".
I'm testing the appended patch now and like to get your comments.
I haven't added a makerule to rebuild config.h.in automatically, can
somebody help me here, please?
The alternative is to revert my last patch and also Loren's patch to
get everything working again on linux-i686.
Andreas
2001-05-16 Andreas Jaeger <aj@suse.de>
* libI77/backspace.c: Include "config.h".
* libI77/close.c: Likewise.
* libI77/dfe.c: Likewise.
* libI77/dolio.c: Likewise.
* libI77/due.c: Likewise.
* libI77/err.c: Likewise.
* libI77/fmt.c: Likewise.
* libI77/fmtlib.c: Likewise.
* libI77/ftell_.c: Likewise.
* libI77/ilnw.c: Likewise.
* libI77/lread.c: Likewise.
* libI77/open.c: Likewise.
* libI77/rdfmt.c: Likewise.
* libI77/rsfe.c: Likewise.
* libI77/rsne.c: Likewise.
* libI77/util.c: Likewise.
* libI77/wrtfmt.c: Likewise.
* libI77/wsne.c: Likewise.
* libI77/xwsne.c: Likewise.
* libI77/config.h.in: Generate with autoheader.
* libI77/configure.in: Add comments for all AC_DEFINES so that
autoheader can grok it.
* libI77/configure: Regenerated.
============================================================
Index: libf2c/libI77/config.h.in
--- libf2c/libI77/config.h.in 2001/05/16 10:26:52 1.1
+++ libf2c/libI77/config.h.in 2001/05/16 14:42:01
@@ -1,3 +1,47 @@
+/* config.h.in. Generated automatically from configure.in by autoheader. */
+/* Define to empty if the keyword does not work. */
+#undef const
+
/* Define to `long' if <sys/types.h> doesn't define. */
#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. */
+#undef size_t
+
+/* Define if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define if you have the ftruncate function. */
+#undef HAVE_FTRUNCATE
+
+/* Define if you have the mkstemp function. */
+#undef HAVE_MKSTEMP
+
+/* Define if you have the tempnam function. */
+#undef HAVE_TEMPNAM
+
+/* 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. */
+#undef NON_UNIX_STDIO
+
+/* Define if we use strlen. */
+#undef USE_STRLEN
+
+/* Define if we have non ANSI RW modes. */
+#undef NON_ANSI_RW_MODES
+
+/* Always defined. */
+#undef NO_EOF_CHAR_CHECK
+
+/* Define to skip f2c undefs. */
+#undef Skip_f2c_Undefs
+
============================================================
Index: libf2c/libI77/backspace.c
--- libf2c/libI77/backspace.c 1999/06/18 08:31:18 1.6
+++ libf2c/libI77/backspace.c 2001/05/16 14:42:01
@@ -1,3 +1,4 @@
+#include "config.h"
#include <sys/types.h>
#include "f2c.h"
#include "fio.h"
============================================================
Index: libf2c/libI77/close.c
--- libf2c/libI77/close.c 1998/05/19 10:51:03 1.3
+++ libf2c/libI77/close.c 2001/05/16 14:42:01
@@ -1,3 +1,4 @@
+#include "config.h"
#include "f2c.h"
#include "fio.h"
#ifdef KR_headers
============================================================
Index: libf2c/libI77/dfe.c
--- libf2c/libI77/dfe.c 1999/03/17 08:21:17 1.7
+++ libf2c/libI77/dfe.c 2001/05/16 14:42:01
@@ -1,3 +1,4 @@
+#include "config.h"
#include "f2c.h"
#include "fio.h"
#include "fmt.h"
============================================================
Index: libf2c/libI77/dolio.c
--- libf2c/libI77/dolio.c 1999/09/04 15:09:17 1.2
+++ libf2c/libI77/dolio.c 2001/05/16 14:42:01
@@ -1,3 +1,4 @@
+#include "config.h"
#include "f2c.h"
#ifdef __cplusplus
============================================================
Index: libf2c/libI77/due.c
--- libf2c/libI77/due.c 1998/06/23 14:37:09 1.3
+++ libf2c/libI77/due.c 2001/05/16 14:42:01
@@ -1,3 +1,4 @@
+#include "config.h"
#include "f2c.h"
#include "fio.h"
============================================================
Index: libf2c/libI77/err.c
--- libf2c/libI77/err.c 1999/05/03 08:35:20 1.4
+++ libf2c/libI77/err.c 2001/05/16 14:42:01
@@ -1,3 +1,4 @@
+#include "config.h"
#ifndef NON_UNIX_STDIO
#define _INCLUDE_POSIX_SOURCE /* for HP-UX */
#define _INCLUDE_XOPEN_SOURCE /* for HP-UX */
============================================================
Index: libf2c/libI77/fmt.c
--- libf2c/libI77/fmt.c 1999/09/04 15:09:17 1.2
+++ libf2c/libI77/fmt.c 2001/05/16 14:42:02
@@ -1,3 +1,4 @@
+#include "config.h"
#include "f2c.h"
#include "fio.h"
#include "fmt.h"
============================================================
Index: libf2c/libI77/fmtlib.c
--- libf2c/libI77/fmtlib.c 1999/09/04 15:09:18 1.2
+++ libf2c/libI77/fmtlib.c 2001/05/16 14:42:02
@@ -1,5 +1,6 @@
/* @(#)fmtlib.c 1.2 */
#define MAXINTLENGTH 23
+#include "config.h"
#include "f2c.h"
#ifndef Allow_TYQUAD
============================================================
Index: libf2c/libI77/ftell_.c
--- libf2c/libI77/ftell_.c 1999/09/04 15:09:18 1.2
+++ libf2c/libI77/ftell_.c 2001/05/16 14:42:02
@@ -1,3 +1,4 @@
+#include "config.h"
#include "f2c.h"
#include "fio.h"
============================================================
Index: libf2c/libI77/ilnw.c
--- libf2c/libI77/ilnw.c 1998/05/19 10:51:09 1.2
+++ libf2c/libI77/ilnw.c 2001/05/16 14:42:02
@@ -1,3 +1,4 @@
+#include "config.h"
#include "f2c.h"
#include "fio.h"
#include "lio.h"
============================================================
Index: libf2c/libI77/lread.c
--- libf2c/libI77/lread.c 2000/12/09 15:34:52 1.5
+++ libf2c/libI77/lread.c 2001/05/16 14:42:02
@@ -1,3 +1,4 @@
+#include "config.h"
#include <ctype.h>
#include "f2c.h"
#include "fio.h"
============================================================
Index: libf2c/libI77/open.c
--- libf2c/libI77/open.c 2000/11/15 18:26:42 1.8
+++ libf2c/libI77/open.c 2001/05/16 14:42:02
@@ -1,6 +1,7 @@
/* Define _XOPEN_SOURCE to get tempnam prototype with glibc et al --
more general than _INCLUDE_XOPEN_SOURCE used elsewhere `for HP-UX'. */
#define _XOPEN_SOURCE 1
+#include "config.h"
#include "f2c.h"
#include "fio.h"
#include <string.h>
============================================================
Index: libf2c/libI77/rdfmt.c
--- libf2c/libI77/rdfmt.c 2000/06/11 19:39:55 1.3
+++ libf2c/libI77/rdfmt.c 2001/05/16 14:42:02
@@ -1,3 +1,4 @@
+#include "config.h"
#include <ctype.h>
#include "f2c.h"
#include "fio.h"
============================================================
Index: libf2c/libI77/rsfe.c
--- libf2c/libI77/rsfe.c 1998/07/01 10:30:21 1.3
+++ libf2c/libI77/rsfe.c 2001/05/16 14:42:02
@@ -1,4 +1,5 @@
/* read sequential formatted external */
+#include "config.h"
#include "f2c.h"
#include "fio.h"
#include "fmt.h"
============================================================
Index: libf2c/libI77/rsne.c
--- libf2c/libI77/rsne.c 2000/12/09 15:34:52 1.3
+++ libf2c/libI77/rsne.c 2001/05/16 14:42:02
@@ -1,3 +1,4 @@
+#include "config.h"
#include "f2c.h"
#include "fio.h"
#include "lio.h"
============================================================
Index: libf2c/libI77/sue.c
--- libf2c/libI77/sue.c 1998/06/23 14:37:13 1.2
+++ libf2c/libI77/sue.c 2001/05/16 14:42:02
@@ -1,3 +1,4 @@
+#include "config.h"
#include "f2c.h"
#include "fio.h"
extern uiolen f__reclen;
============================================================
Index: libf2c/libI77/typesize.c
--- libf2c/libI77/typesize.c 1999/09/04 15:09:18 1.2
+++ libf2c/libI77/typesize.c 2001/05/16 14:42:02
@@ -1,3 +1,4 @@
+#include "config.h"
#include "f2c.h"
ftnlen f__typesize[] = { 0, 0, sizeof(shortint), sizeof(integer),
============================================================
Index: libf2c/libI77/util.c
--- libf2c/libI77/util.c 1998/05/19 10:51:15 1.2
+++ libf2c/libI77/util.c 2001/05/16 14:42:02
@@ -1,3 +1,4 @@
+#include "config.h"
#ifndef NON_UNIX_STDIO
#define _INCLUDE_POSIX_SOURCE /* for HP-UX */
#define _INCLUDE_XOPEN_SOURCE /* for HP-UX */
============================================================
Index: libf2c/libI77/wrtfmt.c
--- libf2c/libI77/wrtfmt.c 1998/05/19 10:51:16 1.2
+++ libf2c/libI77/wrtfmt.c 2001/05/16 14:42:02
@@ -1,3 +1,4 @@
+#include "config.h"
#include "f2c.h"
#include "fio.h"
#include "fmt.h"
============================================================
Index: libf2c/libI77/wsle.c
--- libf2c/libI77/wsle.c 1998/05/19 10:51:18 1.2
+++ libf2c/libI77/wsle.c 2001/05/16 14:42:02
@@ -1,3 +1,4 @@
+#include "config.h"
#include "f2c.h"
#include "fio.h"
#include "fmt.h"
============================================================
Index: libf2c/libI77/xwsne.c
--- libf2c/libI77/xwsne.c 2000/12/09 15:34:52 1.3
+++ libf2c/libI77/xwsne.c 2001/05/16 14:42:02
@@ -1,3 +1,4 @@
+#include "config.h"
#include "f2c.h"
#include "fio.h"
#include "lio.h"
============================================================
Index: libf2c/libI77/configure.in
--- libf2c/libI77/configure.in 2001/05/16 10:26:52 1.6
+++ libf2c/libI77/configure.in 2001/05/16 14:42:02
@@ -113,7 +113,8 @@
AC_CHECK_HEADER(fcntl.h,
test $g77_cv_header_posix = yes && AC_DEFINE(_POSIX_SOURCE),
- AC_DEFINE(NO_FCNTL) AC_DEFINE(OPEN_DECL))
+ 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.
AC_C_CONST
@@ -130,7 +131,7 @@
|| test $g77_cv_sys_mingw32 = yes \
|| test $ac_cv_func_fstat = no; then
AC_MSG_RESULT(yes)
- AC_DEFINE(NON_UNIX_STDIO)
+ AC_DEFINE(NON_UNIX_STDIO, 1, [Define if we do not have Unix Stdio.])
else
AC_MSG_RESULT(no)
fi
@@ -163,7 +164,7 @@
# The cygwin patch takes steps to avoid defining USE_STRLEN here -- I don't
# understand why.
if test $g77_cv_sys_sprintf_ansi != yes; then
- AC_DEFINE(USE_STRLEN)
+ AC_DEFINE(USE_STRLEN, 1, [Define if we use strlen.])
fi
# define NON_ANSI_RW_MODES on unix (can't hurt)
@@ -184,7 +185,7 @@
AC_MSG_RESULT(no)
else
if test $is_unix = yes; then
- AC_DEFINE(NON_ANSI_RW_MODES)
+ AC_DEFINE(NON_ANSI_RW_MODES, 1, [Define if we have non ANSI RW modes.])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
@@ -192,11 +193,11 @@
fi
# This EOF_CHAR is a misfeature on unix.
-AC_DEFINE(NO_EOF_CHAR_CHECK)
+AC_DEFINE(NO_EOF_CHAR_CHECK, 1, [Always defined.])
AC_TYPE_OFF_T
-AC_DEFINE(Skip_f2c_Undefs)
+AC_DEFINE(Skip_f2c_Undefs, 1, [Define to skip f2c undefs.])
AC_OUTPUT(Makefile)
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj