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-08-24 21:54:43 +0400
committerChristopher Faylor <me@cgf.cx>2000-08-24 21:54:43 +0400
commit5a41f96dbb4255a55f2aad487a70856275eaf354 (patch)
tree565753985d3d8c776393a5a3b18152c9800c96f9
parent123469a0e9a5e669d868b00e938858bb97e8bff8 (diff)
* environ.cc (parse_thing): nobinmode should force O_TEXT.
(regopt): Use correct path to find LOCAL_MACHINE registry options. * fhandler.cc (fhandler_base::open): Set binary mode only when binmode == O_BINARY. * pipe.cc (pipe): Pipe handling should rely on binmode not _fmode now that the two are different.
-rw-r--r--winsup/cygwin/ChangeLog9
-rw-r--r--winsup/cygwin/environ.cc7
-rw-r--r--winsup/cygwin/fhandler.cc4
-rw-r--r--winsup/cygwin/pipe.cc3
4 files changed, 18 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 80578d303..c0937b216 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,12 @@
+Thu Aug 24 13:50:15 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * environ.cc (parse_thing): nobinmode should force O_TEXT.
+ (regopt): Use correct path to find LOCAL_MACHINE registry options.
+ * fhandler.cc (fhandler_base::open): Set binary mode only when binmode
+ == O_BINARY.
+ * pipe.cc (pipe): Pipe handling should rely on binmode not _fmode now
+ that the two are different.
+
Thu Aug 24 13:21:09 2000 Christopher Faylor <cgf@cygnus.com>
* include/sys/cygwin.h (strace_printf_wrap): Force printing when
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index fc497a390..1af364697 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -373,7 +373,7 @@ struct parse_thing
} values[2];
} known[] =
{
- {"binmode", {x: &binmode}, justset, NULL, {{0}, {O_BINARY}}},
+ {"binmode", {x: &binmode}, justset, NULL, {{O_TEXT}, {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}}},
@@ -489,7 +489,10 @@ regopt (const char *name)
parse_options (buf);
else
{
- reg_key r1 (HKEY_LOCAL_MACHINE, KEY_READ, CYGWIN_INFO_PROGRAM_OPTIONS_NAME, NULL);
+ reg_key r1 (HKEY_LOCAL_MACHINE, KEY_READ, "SOFTWARE",
+ CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
+ CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
+ CYGWIN_INFO_PROGRAM_OPTIONS_NAME, NULL);
if (r1.get_string (lname, buf, sizeof (buf) - 1, "") == ERROR_SUCCESS)
parse_options (buf);
}
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index fb6065f0c..6ce973667 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -24,7 +24,7 @@ static char fhandler_disk_dummy_name[] = "some disk file";
struct __cygwin_perfile *perfile_table = NULL;
-DWORD binmode;
+DWORD binmode = 0;
int
fhandler_base::puts_readahead (const char *s, size_t len = (size_t) -1)
@@ -387,7 +387,7 @@ fhandler_base::open (int flags, mode_t mode)
else if (get_device () == FH_DISK)
bin = get_w_binary () || get_r_binary ();
else
- bin = binmode || get_w_binary () || get_r_binary ();
+ bin = (binmode == O_BINARY) || get_w_binary () || get_r_binary ();
if (bin & O_TEXT)
bin = 0;
diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc
index fb354a471..0031aff67 100644
--- a/winsup/cygwin/pipe.cc
+++ b/winsup/cygwin/pipe.cc
@@ -64,7 +64,8 @@ make_pipe (int fildes[2], unsigned int psize, int mode)
extern "C" int
pipe (int filedes[2])
{
- return make_pipe (filedes, 16384, (!__fmode || __fmode == O_BINARY) ? O_BINARY : O_TEXT);
+ extern DWORD binmode;
+ return make_pipe (filedes, 16384, (!binmode || binmode == O_BINARY) ? O_BINARY : O_TEXT);
}
extern "C" int