+Thu Aug 27 17:01:04 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * targets.c, config/i960-bout.mt, hosts/*: added
+ HOST_BIG_ENDIAN_DEFAULT_VECTOR and
+ HOST_LITTLE_ENDIAN_DEFAULT_VECTOR because bout archive format
+ depends on the endianness of the host. Added #define
+ HOST_BIG_ENDIAN_P and #undef HOST_BIG_ENDIAN_P to a number of
+ configuration files in hosts/ (it was already in some).
+
Thu Aug 27 13:05:28 1992 Brendan Kehoe (brendan@cygnus.com)
Add preliminary support for the we32k:
extern int fputc();
extern int unlink();
+#define HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
extern void EXFUN( free,(PTR));
#endif
+#define HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
extern void EXFUN( free,(PTR));
#endif
+#define HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
#define HOST_TEXT_START_ADDR USRTEXT
#define HOST_DATA_START_ADDR USRDATA
#define HOST_STACK_END_ADDR USRSTACK
-/* Macros for the 'type' part of an fopen, freopen or fdopen.
- <Read|Write>[Update]<Binary file><text file>
- */
-#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+"
+#undef HOST_BIG_ENDIAN_P
+
+#include "fopen-same.h"
/* EXACT TYPES */
typedef char int8e_type;
extern int fputc();
extern int unlink();
+#define HOST_BIG_ENDIAN_P
/* EXACT TYPES */
typedef char int8e_type;
#include <stdio.h>
+#define HOST_BIG_ENDIAN_P
+
#ifndef DONTDECLARE_MALLOC
extern PTR EXFUN(malloc,(unsigned));
extern PTR EXFUN(realloc, (PTR, unsigned));
#define SEEK_SET 0
#define SEEK_CUR 1
+#undef HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
#define POSIX_UTIME
#define NO_FCNTL
+#undef HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
extern void EXFUN(bzero,(char *, int));
extern int strtol();
+
+#define HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
# endif
*/
+#define HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
#define HOST_DATA_START_ADDR UDATASEG
#define HOST_STACK_END_ADDR KSTAKSEG
+#define HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
# endif
*/
+/* Not sure about this. */
+#define HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
#define HOST_TEXT_START_ADDR 0x10000 /* By inspection */
#define HOST_STACK_END_ADDR KERNBASE
+#undef HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
# endif
*/
+#undef HOST_BIG_ENDIAN_P
+
#ifndef DONTDECLARE_MALLOC
extern PTR EXFUN(malloc,(unsigned));
extern PTR EXFUN(realloc, (PTR, unsigned));
extern int fputc();
extern int unlink();
+#undef HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
#define SEEK_CUR 1
#endif
+#undef HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
#define SEEK_CUR 1
#endif
+#undef HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
extern int fputc();
extern int unlink();
+#undef HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
#define SEEK_SET 0
#define SEEK_CUR 1
-extern PROTO(int, abort,(void));
-extern PROTO(int, close,(int));
-extern PROTO(int, fcntl,(int des, int cmd, int e));
-extern PROTO(int, fprintf,(FILE *,char *,...));
-extern PROTO(int, printf,(char *,...));
-extern PROTO(int, qsort,(void *data,int els, int siz, int func()));
-extern PROTO(int, exit,(int));
-extern PROTO(int, fseek,(FILE*, int, int));
-extern PROTO(int, fclose,(FILE*));
-extern PROTO(void, bcopy,(char*,char*,int));
-extern PROTO(int, bcmp,(char *, char *, int));
-extern PROTO(void, bzero,(char *, int));
-extern char * strchr();
-extern PROTO(void, perror,(CONST char *));
+extern int EXFUN(close,(int));
+extern int EXFUN(fcntl,(int des, int cmd, int e));
+extern int EXFUN(fprintf,(FILE *,char *,...));
+extern int EXFUN(printf,(char *,...));
+extern int EXFUN(qsort,(void *data,int els, int siz, int func()));
+extern int EXFUN(fseek,(FILE*, int, int));
+extern int EXFUN(fclose,(FILE*));
+extern void EXFUN(bcopy,(char*,char*,int));
+extern int EXFUN(bcmp,(char *, char *, int));
+extern void EXFUN(bzero,(char *, int));
+extern void EXFUN(perror,(CONST char *));
extern char *getenv();
+extern char * strchr();
extern char *memchr();
extern char *strrchr();
extern int chmod();
extern int fputc();
extern int unlink();
+#define HOST_BIG_ENDIAN_P
/* EXACT TYPES */
typedef char int8e_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.
- <Read|Write>[Update]<Binary file><text file>
- */
-#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"
#define SEEK_SET 0
#define SEEK_CUR 1
+#define HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
extern char *malloc();
extern void free();
+#define HOST_BIG_ENDIAN_P
/* EXACT TYPES */
typedef char int8e_type;
#include "hosts/sysv4.h"
+#define HOST_BIG_ENDIAN_P
+
/* That's all... */
extern int unlink();
+#define HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
extern int unlink();
#endif /* __STDC__ */
+#define HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
extern int fputc();
extern int unlink();
+#undef HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
extern int fputc();
extern int unlink();
+#define HOST_BIG_ENDIAN_P
/* EXACT TYPES */
typedef char int8e_type;
extern char *malloc();
extern void free();
+#define HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
extern int strtol();
#define NO_STDARG 1
+#define HOST_BIG_ENDIAN_P
+
/* EXACT TYPES */
typedef char int8e_type;
typedef unsigned char uint8e_type;
#ifdef DEFAULT_VECTOR
extern bfd_target DEFAULT_VECTOR;
#endif
+#ifdef HOST_BIG_ENDIAN_DEFAULT_VECTOR
+extern bfd_target HOST_BIG_ENDIAN_DEFAULT_VECTOR;
+#endif
+#ifdef HOST_LITTLE_ENDIAN_DEFAULT_VECTOR
+extern bfd_target HOST_LITTLE_ENDIAN_DEFAULT_VECTOR;
+#endif
#ifdef SELECT_VECS
bfd_target *target_vector[] = {
+
+ /* 960 bout format depends on the host, so let targets choose a
+ default vector even if the provide SELECT_VECS. */
+#ifdef HOST_BIG_ENDIAN_DEFAULT_VECTOR
+#ifdef HOST_BIG_ENDIAN_P
+ &HOST_BIG_ENDIAN_DEFAULT_VECTOR,
+#else /* ! defined (HOST_BIG_ENDIAN_P) */
+ &HOST_LITTLE_ENDIAN_DEFAULT_VECTOR,
+#endif /* ! defined (HOST_BIG_ENDIAN_P) */
+#endif /* defined (HOST_BIG_ENDIAN_DEFAULT_VECTOR) */
+
SELECT_VECS,
0
};
#ifdef DEFAULT_VECTOR
&DEFAULT_VECTOR,
-#endif
+#else /* ! defined (DEFAULT_VECTOR) */
+#ifdef HOST_BIG_ENDIAN_DEFAULT_VECTOR
+#ifdef HOST_BIG_ENDIAN_P
+ &HOST_BIG_ENDIAN_DEFAULT_VECTOR,
+#else /* ! defined (HOST_BIG_ENDIAN_P) */
+ &HOST_LITTLE_ENDIAN_DEFAULT_VECTOR,
+#endif /* ! defined (HOST_BIG_ENDIAN_P) */
+#endif /* defined (HOST_BIG_ENDIAN_DEFAULT_VECTOR) */
+#endif /* ! defined (DEFAULT_VECTOR) */
&i386coff_vec,
&i386aout_vec,
bfd_target *default_vector[] = {
#ifdef DEFAULT_VECTOR
&DEFAULT_VECTOR,
-#endif
+#else /* ! defined (DEFAULT_VECTOR) */
+#ifdef HOST_BIG_ENDIAN_DEFAULT_VECTOR
+#ifdef HOST_BIG_ENDIAN_P
+ &HOST_BIG_ENDIAN_DEFAULT_VECTOR,
+#else /* ! defined (HOST_BIG_ENDIAN_P) */
+ &HOST_LITTLE_ENDIAN_DEFAULT_VECTOR,
+#endif /* ! defined (HOST_BIG_ENDIAN_P) */
+#endif /* defined (HOST_BIG_ENDIAN_DEFAULT_VECTOR) */
+#endif /* ! defined (DEFAULT_VECTOR) */
0,
};