From a5431adc977782329a63afcc9fad5baa5b13c423 Mon Sep 17 00:00:00 2001 From: John Gilmore Date: Fri, 13 Dec 1991 05:03:17 +0000 Subject: [PATCH] * hosts/h-*.h: Configure fopen using ../include/fopen-*.h rather than N copies of the same lines. --- bfd/hosts/amix.h | 18 ++---------------- bfd/hosts/delta88.h | 16 +--------------- bfd/hosts/dgux.h | 16 +--------------- bfd/hosts/dose.h | 17 ++--------------- bfd/hosts/go32.h | 16 +--------------- bfd/hosts/harris.h | 16 +--------------- bfd/hosts/hp9000.h | 16 +--------------- bfd/hosts/i386mach.h | 16 +--------------- bfd/hosts/i386v.h | 16 +--------------- bfd/hosts/i386v4.h | 16 +--------------- bfd/hosts/irix3.h | 16 +--------------- bfd/hosts/rs6000.h | 16 +--------------- bfd/hosts/rtbsd.h | 16 +--------------- bfd/hosts/sparc-ll.h | 16 +--------------- bfd/hosts/sparc.h | 16 +--------------- bfd/hosts/sun3.h | 16 +--------------- bfd/hosts/ultra3.h | 16 +--------------- 17 files changed, 19 insertions(+), 256 deletions(-) diff --git a/bfd/hosts/amix.h b/bfd/hosts/amix.h index f17e3910a95..ce5ce6b2a03 100644 --- a/bfd/hosts/amix.h +++ b/bfd/hosts/amix.h @@ -1,4 +1,5 @@ /* Amiga Unix host system */ + #include #include #include @@ -9,22 +10,7 @@ #include #include -/* Macros for the 'type' part of an fopen, freopen or fdopen. - [Update] - */ -#define FOPEN_RB "r" -#define FOPEN_WB "w" -#define FOPEN_AB "a" -#define FOPEN_RUB "r+" -#define FOPEN_WUB "w+" -#define FOPEN_AUB "a+" -#define FOPEN_RT "r" -#define FOPEN_WT "w" -#define FOPEN_AT "a" -#define FOPEN_RUT "r+" -#define FOPEN_WUT "w+" -#define FOPEN_AUT "a+" - +#include "fopen-same.h" #ifndef O_ACCMODE #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR) diff --git a/bfd/hosts/delta88.h b/bfd/hosts/delta88.h index 6e9254915d1..beb33ec0adf 100644 --- a/bfd/hosts/delta88.h +++ b/bfd/hosts/delta88.h @@ -79,18 +79,4 @@ typedef unsigned short uint16_type; typedef int int32_type; typedef unsigned int uint32_type; -/* Macros for the 'type' part of an fopen, freopen or fdopen. - [Update] - */ -#define FOPEN_RB "r" -#define FOPEN_WB "w" -#define FOPEN_AB "a" -#define FOPEN_RUB "r+" -#define FOPEN_WUB "w+" -#define FOPEN_AUB "a+" -#define FOPEN_RT "r" -#define FOPEN_WT "w" -#define FOPEN_AT "a" -#define FOPEN_RUT "r+" -#define FOPEN_WUT "w+" -#define FOPEN_AUT "a+" +#include "fopen-same.h" diff --git a/bfd/hosts/dgux.h b/bfd/hosts/dgux.h index 5c29c8e4422..09aea10f075 100644 --- a/bfd/hosts/dgux.h +++ b/bfd/hosts/dgux.h @@ -25,18 +25,4 @@ extern PROTO(void, bzero,(char *, int)); -/* Macros for the 'type' part of an fopen, freopen or fdopen. - [Update] - */ -#define FOPEN_RB "r" -#define FOPEN_WB "w" -#define FOPEN_AB "a" -#define FOPEN_RUB "r+" -#define FOPEN_WUB "w+" -#define FOPEN_AUB "a+" -#define FOPEN_RT "r" -#define FOPEN_WT "w" -#define FOPEN_AT "a" -#define FOPEN_RUT "r+" -#define FOPEN_WUT "w+" -#define FOPEN_AUT "a+" +#include "fopen-same.h" diff --git a/bfd/hosts/dose.h b/bfd/hosts/dose.h index ccab2ac2b6d..359d15b34c4 100644 --- a/bfd/hosts/dose.h +++ b/bfd/hosts/dose.h @@ -27,18 +27,5 @@ typedef short int16_type; typedef unsigned short uint16_type; typedef int int32_type; typedef unsigned int uint32_type; -/* Macros for the 'type' part of an fopen, freopen or fdopen. - [Update] - */ -#define FOPEN_RB "rb" -#define FOPEN_WB "wb" -#define FOPEN_AB "ab" -#define FOPEN_RUB "r+b" -#define FOPEN_WUB "w+b" -#define FOPEN_AUB "a+b" -#define FOPEN_RT "r" -#define FOPEN_WT "w" -#define FOPEN_AT "a" -#define FOPEN_RUT "r+" -#define FOPEN_WUT "w+" -#define FOPEN_AUT "a+" + +#include "fopen-bin.h" diff --git a/bfd/hosts/go32.h b/bfd/hosts/go32.h index f0b86ffbb4d..a5de5f98cb8 100644 --- a/bfd/hosts/go32.h +++ b/bfd/hosts/go32.h @@ -31,18 +31,4 @@ typedef int int32_type; typedef unsigned int uint32_type; -/* Macros for the 'type' part of an fopen, freopen or fdopen. - [Update] - */ -#define FOPEN_RB "rb" -#define FOPEN_WB "wb" -#define FOPEN_AB "ab" -#define FOPEN_RUB "r+b" -#define FOPEN_WUB "w+b" -#define FOPEN_AUB "a+b" -#define FOPEN_RT "r" -#define FOPEN_WT "w" -#define FOPEN_AT "a" -#define FOPEN_RUT "r+" -#define FOPEN_WUT "w+" -#define FOPEN_AUT "a+" +#include "fopen-bin.h" diff --git a/bfd/hosts/harris.h b/bfd/hosts/harris.h index 431c7ae0612..e09ed42cc6d 100644 --- a/bfd/hosts/harris.h +++ b/bfd/hosts/harris.h @@ -36,18 +36,4 @@ typedef short int16_type; typedef unsigned short uint16_type; typedef int int32_type; typedef unsigned int uint32_type; -/* Macros for the 'type' part of an fopen, freopen or fdopen. - [Update] - */ -#define FOPEN_RB "r" -#define FOPEN_WB "w" -#define FOPEN_AB "a" -#define FOPEN_RUB "r+" -#define FOPEN_WUB "w+" -#define FOPEN_AUB "a+" -#define FOPEN_RT "r" -#define FOPEN_WT "w" -#define FOPEN_AT "a" -#define FOPEN_RUT "r+" -#define FOPEN_WUT "w+" -#define FOPEN_AUT "a+" +#include "fopen-same.h" diff --git a/bfd/hosts/hp9000.h b/bfd/hosts/hp9000.h index a6b48dc6a27..e1c8bb775ba 100644 --- a/bfd/hosts/hp9000.h +++ b/bfd/hosts/hp9000.h @@ -63,18 +63,4 @@ typedef unsigned short uint16_type; typedef int int32_type; typedef unsigned int uint32_type; -/* Macros for the 'type' part of an fopen, freopen or fdopen. - [Update] - */ -#define FOPEN_RB "r" -#define FOPEN_WB "w" -#define FOPEN_AB "a" -#define FOPEN_RUB "r+" -#define FOPEN_WUB "w+" -#define FOPEN_AUB "a+" -#define FOPEN_RT "r" -#define FOPEN_WT "w" -#define FOPEN_AT "a" -#define FOPEN_RUT "r+" -#define FOPEN_WUT "w+" -#define FOPEN_AUT "a+" +#include "fopen-same.h" diff --git a/bfd/hosts/i386mach.h b/bfd/hosts/i386mach.h index ce11dd66053..03b06da5df0 100644 --- a/bfd/hosts/i386mach.h +++ b/bfd/hosts/i386mach.h @@ -43,18 +43,4 @@ typedef short int16_type; typedef unsigned short uint16_type; typedef int int32_type; typedef unsigned int uint32_type; -/* Macros for the 'type' part of an fopen, freopen or fdopen. - [Update] - */ -#define FOPEN_RB "r" -#define FOPEN_WB "w" -#define FOPEN_AB "a" -#define FOPEN_RUB "r+" -#define FOPEN_WUB "w+" -#define FOPEN_AUB "a+" -#define FOPEN_RT "r" -#define FOPEN_WT "w" -#define FOPEN_AT "a" -#define FOPEN_RUT "r+" -#define FOPEN_WUT "w+" -#define FOPEN_AUT "a+" +#include "fopen-same.h" diff --git a/bfd/hosts/i386v.h b/bfd/hosts/i386v.h index d2b5daade25..f2cf6ef1499 100644 --- a/bfd/hosts/i386v.h +++ b/bfd/hosts/i386v.h @@ -65,18 +65,4 @@ typedef unsigned short uint16_type; typedef int int32_type; typedef unsigned int uint32_type; -/* Macros for the 'type' part of an fopen, freopen or fdopen. - [Update] - */ -#define FOPEN_RB "r" -#define FOPEN_WB "w" -#define FOPEN_AB "a" -#define FOPEN_RUB "r+" -#define FOPEN_WUB "w+" -#define FOPEN_AUB "a+" -#define FOPEN_RT "r" -#define FOPEN_WT "w" -#define FOPEN_AT "a" -#define FOPEN_RUT "r+" -#define FOPEN_WUT "w+" -#define FOPEN_AUT "a+" +#include "fopen-same.h" diff --git a/bfd/hosts/i386v4.h b/bfd/hosts/i386v4.h index 51126328d5b..d622fd849a0 100644 --- a/bfd/hosts/i386v4.h +++ b/bfd/hosts/i386v4.h @@ -60,18 +60,4 @@ typedef short int16_type; typedef unsigned short uint16_type; typedef int int32_type; typedef unsigned int uint32_type; -/* Macros for the 'type' part of an fopen, freopen or fdopen. - [Update] - */ -#define FOPEN_RB "r" -#define FOPEN_WB "w" -#define FOPEN_AB "a" -#define FOPEN_RUB "r+" -#define FOPEN_WUB "w+" -#define FOPEN_AUB "a+" -#define FOPEN_RT "r" -#define FOPEN_WT "w" -#define FOPEN_AT "a" -#define FOPEN_RUT "r+" -#define FOPEN_WUT "w+" -#define FOPEN_AUT "a+" +#include "fopen-same.h" diff --git a/bfd/hosts/irix3.h b/bfd/hosts/irix3.h index 64f59332cc4..1ae0a584a1b 100644 --- a/bfd/hosts/irix3.h +++ b/bfd/hosts/irix3.h @@ -38,18 +38,4 @@ typedef unsigned short uint16_type; typedef int int32_type; typedef unsigned int uint32_type; -/* Macros for the 'type' part of an fopen, freopen or fdopen. - [Update] - */ -#define FOPEN_RB "r" -#define FOPEN_WB "w" -#define FOPEN_AB "a" -#define FOPEN_RUB "r+" -#define FOPEN_WUB "w+" -#define FOPEN_AUB "a+" -#define FOPEN_RT "r" -#define FOPEN_WT "w" -#define FOPEN_AT "a" -#define FOPEN_RUT "r+" -#define FOPEN_WUT "w+" -#define FOPEN_AUT "a+" +#include "fopen-same.h" diff --git a/bfd/hosts/rs6000.h b/bfd/hosts/rs6000.h index 0fd01cd2aeb..b41ed5ff168 100644 --- a/bfd/hosts/rs6000.h +++ b/bfd/hosts/rs6000.h @@ -33,18 +33,4 @@ typedef unsigned short uint16_type; typedef int int32_type; typedef unsigned int uint32_type; -/* Macros for the 'type' part of an fopen, freopen or fdopen. - [Update] - */ -#define FOPEN_RB "r" -#define FOPEN_WB "w" -#define FOPEN_AB "a" -#define FOPEN_RUB "r+" -#define FOPEN_WUB "w+" -#define FOPEN_AUB "a+" -#define FOPEN_RT "r" -#define FOPEN_WT "w" -#define FOPEN_AT "a" -#define FOPEN_RUT "r+" -#define FOPEN_WUT "w+" -#define FOPEN_AUT "a+" +#include "fopen-same.h" diff --git a/bfd/hosts/rtbsd.h b/bfd/hosts/rtbsd.h index 94e900bdde1..071ee04f989 100644 --- a/bfd/hosts/rtbsd.h +++ b/bfd/hosts/rtbsd.h @@ -33,18 +33,4 @@ typedef short int16_type; typedef unsigned short uint16_type; typedef int int32_type; typedef unsigned int uint32_type; -/* Macros for the 'type' part of an fopen, freopen or fdopen. - [Update] - */ -#define FOPEN_RB "r" -#define FOPEN_WB "w" -#define FOPEN_AB "a" -#define FOPEN_RUB "r+" -#define FOPEN_WUB "w+" -#define FOPEN_AUB "a+" -#define FOPEN_RT "r" -#define FOPEN_WT "w" -#define FOPEN_AT "a" -#define FOPEN_RUT "r+" -#define FOPEN_WUT "w+" -#define FOPEN_AUT "a+" +#include "fopen-same.h" diff --git a/bfd/hosts/sparc-ll.h b/bfd/hosts/sparc-ll.h index 493b5599062..14ca8ad0938 100644 --- a/bfd/hosts/sparc-ll.h +++ b/bfd/hosts/sparc-ll.h @@ -121,18 +121,4 @@ typedef struct { #define uint64_typeLOW(x) (uint32_type)(((x) & 0xffffffff)) #define uint64_typeHIGH(x) (uint32_type)(((x) >> 32) & 0xffffffff) #endif -/* Macros for the 'type' part of an fopen, freopen or fdopen. - [Update] - */ -#define FOPEN_RB "r" -#define FOPEN_WB "w" -#define FOPEN_AB "a" -#define FOPEN_RUB "r+" -#define FOPEN_WUB "w+" -#define FOPEN_AUB "a+" -#define FOPEN_RT "r" -#define FOPEN_WT "w" -#define FOPEN_AT "a" -#define FOPEN_RUT "r+" -#define FOPEN_WUT "w+" -#define FOPEN_AUT "a+" +#include "fopen-same.h" diff --git a/bfd/hosts/sparc.h b/bfd/hosts/sparc.h index b541922ff7a..fa1f5c4a498 100644 --- a/bfd/hosts/sparc.h +++ b/bfd/hosts/sparc.h @@ -131,18 +131,4 @@ typedef struct { #endif -/* Macros for the 'type' part of an fopen, freopen or fdopen. - [Update] - */ -#define FOPEN_RB "r" -#define FOPEN_WB "w" -#define FOPEN_AB "a" -#define FOPEN_RUB "r+" -#define FOPEN_WUB "w+" -#define FOPEN_AUB "a+" -#define FOPEN_RT "r" -#define FOPEN_WT "w" -#define FOPEN_AT "a" -#define FOPEN_RUT "r+" -#define FOPEN_WUT "w+" -#define FOPEN_AUT "a+" +#include "fopen-same.h" diff --git a/bfd/hosts/sun3.h b/bfd/hosts/sun3.h index 49aba2f7265..3036ff1085a 100644 --- a/bfd/hosts/sun3.h +++ b/bfd/hosts/sun3.h @@ -68,18 +68,4 @@ typedef unsigned short uint16_type; typedef int int32_type; typedef unsigned int uint32_type; -/* Macros for the 'type' part of an fopen, freopen or fdopen. - [Update] - */ -#define FOPEN_RB "r" -#define FOPEN_WB "w" -#define FOPEN_AB "a" -#define FOPEN_RUB "r+" -#define FOPEN_WUB "w+" -#define FOPEN_AUB "a+" -#define FOPEN_RT "r" -#define FOPEN_WT "w" -#define FOPEN_AT "a" -#define FOPEN_RUT "r+" -#define FOPEN_WUT "w+" -#define FOPEN_AUT "a+" +#include "fopen-same.h" diff --git a/bfd/hosts/ultra3.h b/bfd/hosts/ultra3.h index b84e79fe7ff..17aad5aba58 100644 --- a/bfd/hosts/ultra3.h +++ b/bfd/hosts/ultra3.h @@ -32,18 +32,4 @@ typedef short int16_type; typedef unsigned short uint16_type; typedef int int32_type; typedef unsigned int uint32_type; -/* Macros for the 'type' part of an fopen, freopen or fdopen. - [Update] - */ -#define FOPEN_RB "r" -#define FOPEN_WB "w" -#define FOPEN_AB "a" -#define FOPEN_RUB "r+" -#define FOPEN_WUB "w+" -#define FOPEN_AUB "a+" -#define FOPEN_RT "r" -#define FOPEN_WT "w" -#define FOPEN_AT "a" -#define FOPEN_RUT "r+" -#define FOPEN_WUT "w+" -#define FOPEN_AUT "a+" +#include "fopen-same.h" -- 2.30.2