Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-07-29 20:01:23 +0400
committerChristopher Faylor <me@cgf.cx>2000-07-29 20:01:23 +0400
commit53211514a0466b7e29f6f53c11b769befddfdfa6 (patch)
tree5a68ba861a827568644a5788f45b9dc23194a771
parent9eef1530d55f69e6109e5d4348b735d008c2a666 (diff)
* environ.cc (parse_thing): Make binmode a DWORD.
* hinfo.cc (hinfo::init_std_file_from_handle): Use 'binmode' to determine default open mode. * winsup.h: Declare binmode.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/dtable.cc2
-rw-r--r--winsup/cygwin/environ.cc5
-rw-r--r--winsup/cygwin/winsup.h1
4 files changed, 10 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 4785301cd..310f90500 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+Sat Jul 29 11:59:29 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * environ.cc (parse_thing): Make binmode a DWORD.
+ * hinfo.cc (hinfo::init_std_file_from_handle): Use 'binmode' to
+ determine default open mode.
+ * winsup.h: Declare binmode.
+
Thu Jul 27 22:54:28 2000 Jason Tishler <jt@dothill.com>
* dcrt0.cc (dummy_autoload): Add load statement for RegDeleteValueA.
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index 8f8b14aa1..32c4a4347 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -151,7 +151,7 @@ void
hinfo::init_std_file_from_handle (int fd, HANDLE handle,
DWORD myaccess, const char *name)
{
- int bin = __fmode;
+ int bin = binmode ? O_BINARY : 0;
/* Check to see if we're being redirected - if not then
we open then as consoles */
if (fd == 0 || fd == 1 || fd == 2)
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index 03ea6347c..f9785bcd4 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -18,8 +18,6 @@ extern BOOL allow_glob;
extern BOOL allow_ntea;
extern BOOL strip_title_path;
extern DWORD chunksize;
-extern BOOL binmode;
-BOOL threadsafe;
BOOL reset_com = TRUE;
static BOOL envcache = TRUE;
@@ -369,7 +367,7 @@ struct parse_thing
} values[2];
} known[] =
{
- {"binmode", {&binmode}, justset, NULL, {{FALSE}, {TRUE}}},
+ {"binmode", {x: &binmode}, justset, NULL, {{0}, {O_BINARY}}},
{"envcache", {&envcache}, justset, NULL, {{TRUE}, {FALSE}}},
{"error_start", {func: &error_start_init}, isfunc, NULL, {{0}, {0}}},
{"export", {&export_settings}, justset, NULL, {{FALSE}, {TRUE}}},
@@ -381,7 +379,6 @@ struct parse_thing
{"strip_title", {&strip_title_path}, justset, NULL, {{FALSE}, {TRUE}}},
{"title", {&display_title}, justset, NULL, {{FALSE}, {TRUE}}},
{"tty", {NULL}, set_process_state, NULL, {{0}, {PID_USETTY}}},
- {"threadsafe", {&threadsafe}, justset, NULL, {{TRUE}, {FALSE}}},
{NULL, {0}, justset, 0, {{0}, {0}}}
};
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h
index 35545ef4b..114678548 100644
--- a/winsup/cygwin/winsup.h
+++ b/winsup/cygwin/winsup.h
@@ -435,6 +435,7 @@ int _raise (int sig);
int getdtablesize ();
void setdtablesize (int);
+extern DWORD binmode;
extern char _data_start__, _data_end__, _bss_start__, _bss_end__;
extern void (*__CTOR_LIST__) (void);
extern void (*__DTOR_LIST__) (void);