#define BASH_SOURCE ENABLE_HUSH_BASH_COMPAT
#define BASH_HOSTNAME_VAR ENABLE_HUSH_BASH_COMPAT
#define BASH_TEST2 (ENABLE_HUSH_BASH_COMPAT && ENABLE_HUSH_TEST)
+#define BASH_READ_D ENABLE_HUSH_BASH_COMPAT
/* Build knobs */
char *opt_p = NULL;
char *opt_t = NULL;
char *opt_u = NULL;
+ char *opt_d = NULL; /* optimized out if !BASH */
const char *ifs;
int read_flags;
/* "!": do not abort on errors.
* Option string must start with "sr" to match BUILTIN_READ_xxx
*/
- read_flags = getopt32(argv, "!srn:p:t:u:", &opt_n, &opt_p, &opt_t, &opt_u);
+ read_flags = getopt32(argv,
+#if BASH_READ_D
+ "!srn:p:t:u:d:", &opt_n, &opt_p, &opt_t, &opt_u, &opt_d
+#else
+ "!srn:p:t:u:", &opt_n, &opt_p, &opt_t, &opt_u
+#endif
+ );
if (read_flags == (uint32_t)-1)
return EXIT_FAILURE;
argv += optind;
opt_n,
opt_p,
opt_t,
- opt_u
+ opt_u,
+ opt_d
);
if ((uintptr_t)r == 1 && errno == EINTR) {