aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-08-02 14:26:07 +0000
committerNick Clifton <nickc@redhat.com>2006-08-02 14:26:07 +0000
commitc973bc5cd4b6024ab430a41cae5b75c2c54fd55e (patch)
tree48241288762d48451ef8c5eb6c4121309d665469 /gas
parent87177905630953bf5b7ba6ed7938c2a483873e07 (diff)
downloadfsf-binutils-gdb-c973bc5cd4b6024ab430a41cae5b75c2c54fd55e.zip
fsf-binutils-gdb-c973bc5cd4b6024ab430a41cae5b75c2c54fd55e.tar.gz
fsf-binutils-gdb-c973bc5cd4b6024ab430a41cae5b75c2c54fd55e.tar.bz2
PR gas/2991
* acinclude.m4 (BFD_BINARY_FOPEN): Import this function from bfd/aclocal.m4. * configure.in: Run BFD_BINARY_FOPEN. * configure: Regenerate. * as.h: Look at USE_BINARY_FOPEN to decide which fopen-*.h header file to include.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog10
-rw-r--r--gas/acinclude.m410
-rw-r--r--gas/as.h2
-rwxr-xr-xgas/configure15
-rw-r--r--gas/configure.in2
5 files changed, 36 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 368c926..937a60f 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,13 @@
+2006-08-02 Nick Clifton <nickc@redhat.com>
+
+ PR gas/2991
+ * acinclude.m4 (BFD_BINARY_FOPEN): Import this function from
+ bfd/aclocal.m4.
+ * configure.in: Run BFD_BINARY_FOPEN.
+ * configure: Regenerate.
+ * as.h: Look at USE_BINARY_FOPEN to decide which fopen-*.h header
+ file to include.
+
2006-08-01 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (md_assemble): Don't update
diff --git a/gas/acinclude.m4 b/gas/acinclude.m4
index 7ba95d0..096b0af 100644
--- a/gas/acinclude.m4
+++ b/gas/acinclude.m4
@@ -4,6 +4,16 @@ sinclude(../config/nls.m4)
sinclude(../config/po.m4)
sinclude(../config/progtest.m4)
+dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
+AC_DEFUN([BFD_BINARY_FOPEN],
+[AC_REQUIRE([AC_CANONICAL_TARGET])
+case "${host}" in
+changequote(,)dnl
+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
+changequote([,])dnl
+ AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;;
+esac])dnl
+
dnl GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers)
AC_DEFUN([GAS_CHECK_DECL_NEEDED],[
AC_MSG_CHECKING(whether declaration is required for $1)
diff --git a/gas/as.h b/gas/as.h
index 2f92c2e..424bd97 100644
--- a/gas/as.h
+++ b/gas/as.h
@@ -210,7 +210,7 @@ extern int vsnprintf(char *, size_t, const char *, va_list);
#endif /* __FILE__ */
#ifndef FOPEN_WB
-#if defined GO32 || defined __MINGW32__
+#ifdef USE_BINARY_FOPEN
#include "fopen-bin.h"
#else
#include "fopen-same.h"
diff --git a/gas/configure b/gas/configure
index 05851f4..166ae27 100755
--- a/gas/configure
+++ b/gas/configure
@@ -6214,8 +6214,9 @@ INCINTL=
XGETTEXT=
GMSGFMT=
POSUB=
-if test -f ../intl/config.intl; then
- . ../intl/config.intl
+
+if test -f ../intl/config.intl; then
+ . ../intl/config.intl
fi
echo "$as_me:$LINENO: checking whether NLS is requested" >&5
echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
@@ -8833,6 +8834,16 @@ fi
+case "${host}" in
+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_BINARY_FOPEN 1
+_ACEOF
+ ;;
+esac
+
+
diff --git a/gas/configure.in b/gas/configure.in
index fa21e17..c306516 100644
--- a/gas/configure.in
+++ b/gas/configure.in
@@ -660,6 +660,8 @@ GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers)
AC_CHECK_DECLS([vsnprintf])
+BFD_BINARY_FOPEN
+
dnl Required for html and install-html targets.
AC_SUBST(datarootdir)
AC_SUBST(docdir)