mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Merge in our rev 1.2 changes (but do it in a way the Binutils maintainers
accepted): Restore traditional behavior by acknowledging tabs in strings.
This commit is contained in:
parent
76efa1c2d8
commit
84c87cba1a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61846
@ -61,10 +61,27 @@
|
||||
#include "bucomm.h"
|
||||
#include "libiberty.h"
|
||||
|
||||
#ifdef isascii
|
||||
#define isgraphic(c) (isascii (c) && (isprint (c) || isblank (c)))
|
||||
/* Some platforms need to put stdin into binary mode, to read
|
||||
binary files. */
|
||||
#ifdef HAVE_SETMODE
|
||||
#ifndef O_BINARY
|
||||
#ifdef _O_BINARY
|
||||
#define O_BINARY _O_BINARY
|
||||
#define setmode _setmode
|
||||
#else
|
||||
#define isgraphic(c) (isprint (c) || isblank (c))
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
#endif
|
||||
#if O_BINARY
|
||||
#include <io.h>
|
||||
#define SET_BINARY(f) do { if (!isatty(f)) setmode(f,O_BINARY); } while (0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef isascii
|
||||
#define isgraphic(c) (isascii (c) && (isprint (c) || (c) == '\t'))
|
||||
#else
|
||||
#define isgraphic(c) (isprint (c) || (c) == '\t')
|
||||
#endif
|
||||
|
||||
#ifndef errno
|
||||
@ -220,6 +237,9 @@ main (argc, argv)
|
||||
if (optind >= argc)
|
||||
{
|
||||
datasection_only = false;
|
||||
#ifdef SET_BINARY
|
||||
SET_BINARY (fileno (stdin));
|
||||
#endif
|
||||
print_strings ("{standard input}", stdin, 0, 0, 0, (char *) NULL);
|
||||
files_given = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user