* child_info.h: Modify magic number.

* dcrt0.cc (_cygwin_testing): Define.
(_dll_crt0): Set _cygwin_testing if CYGWIN_TESTING environment variable exists.
Don't issue "conflicting versions" error if _cygwin_testing is true.
* shared.cc (shared_name): Use _cygwin_testing global rather than testing the
environment.
* syscalls.cc (_write): Remove debugging info.
This commit is contained in:
Christopher Faylor 2001-09-03 02:13:05 +00:00
parent db8b09c306
commit 9867ecfdb3
6 changed files with 80 additions and 61 deletions

View File

@ -1,3 +1,14 @@
Sun Sep 2 22:09:31 2001 Christopher Faylor <cgf@cygnus.com>
* child_info.h: Modify magic number.
* dcrt0.cc (_cygwin_testing): Define.
(_dll_crt0): Set _cygwin_testing if CYGWIN_TESTING environment variable
exists. Don't issue "conflicting versions" error if _cygwin_testing is
true.
* shared.cc (shared_name): Use _cygwin_testing global rather than
testing the environment.
* syscalls.cc (_write): Remove debugging info.
Sat Sep 1 01:37:13 2001 Christopher Faylor <cgf@cygnus.com>
* tty.cc (tty::create_inuse): Eliminate unneeded argument.
@ -342,8 +353,8 @@ Fri Aug 3 14:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
Fri Aug 3 13:04:00 2001 Corinna Vinschen <corinna@vinschen.de>
* path.cc (fchdir): Set the fhandler's path to absolute value to
ensure changing to the correct directory even if the fhandler originally
* path.cc (fchdir): Set the fhandler's path to absolute value to ensure
changing to the correct directory even if the fhandler originally
points to a relative path.
Thu Aug 2 17:59:00 2001 Corinna Vinschen <corinna@vinschen.de>
@ -447,7 +458,7 @@ Wed 18 Jul 2001 12:54:17 Corinna Vinschen <corinna@vinschen.de>
Wed 18 Jul 2001 11:56:00 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (_unlink): Explicitely check for non-existant file.
* syscalls.cc (_unlink): Explicitly check for non-existant file.
Tue 17 Jul 2001 10:19:00 Corinna Vinschen <corinna@vinschen.de>
@ -793,7 +804,7 @@ Sat Jun 2 23:11:52 2001 Christopher Faylor <cgf@cygnus.com>
Sat Jun 2 14:07:28 2001 Christopher Faylor <cgf@cygnus.com>
* cygheap.cc (cygheap_root::cygheap_rot): Remove constructor.
* cygheap.cc (cygheap_root::cygheap_root): Remove constructor.
(cygheap_root::~cygheap_root): Remove destructor.
(cygheap_root::operator =): Remove.
(cygheap_root::set): New method.
@ -851,7 +862,8 @@ Wed May 30 23:51:32 2001 Christopher Faylor <cgf@cygnus.com>
* fhandler.h (fhandler_base::isremote): New method.
(fhandler_base::set_isremote): Ditto.
(fhandler_base::set_execable_p): Also record "don't care if executable state".
(fhandler_base::set_execable_p): Also record "don't care if executable
state".
(fhandler_base::dont_care_if_execable): New method.
* path.cc (path_conv::check): Clear new flags. Appropriately set
vol_flags, drive_type, and is_remote_drive.

View File

@ -12,7 +12,7 @@ details. */
enum
{
PROC_MAGIC = 0xaf10f000,
PROC_MAGIC = 0xaf11f000,
PROC_FORK = PROC_MAGIC + 1,
PROC_EXEC = PROC_MAGIC + 2,
PROC_SPAWN = PROC_MAGIC + 3,

View File

@ -72,6 +72,8 @@ unsigned int signal_shift_subtract = 1;
ResourceLocks _reslock NO_COPY;
MTinterface _mtinterf NO_COPY;
bool NO_COPY _cygwin_testing;
extern "C"
{
void *export_malloc (unsigned int);
@ -872,15 +874,18 @@ dll_crt0_1 ()
extern "C" void __stdcall
_dll_crt0 ()
{
char envbuf[8];
#ifdef DEBUGGING
char buf[80];
if (GetEnvironmentVariable ("CYGWIN_SLEEP", buf, sizeof (buf)))
if (GetEnvironmentVariable ("CYGWIN_SLEEP", envbuf, sizeof (envbuf) - 1))
{
console_printf ("Sleeping %d, pid %u\n", atoi (buf), GetCurrentProcessId ());
Sleep (atoi (buf));
console_printf ("Sleeping %d, pid %u\n", atoi (envbuf), GetCurrentProcessId ());
Sleep (atoi (envbuf));
}
#endif
if (GetEnvironmentVariable ("CYGWIN_TESTING", envbuf, sizeof (envbuf) - 1))
_cygwin_testing = 1;
char zeros[sizeof (fork_info->zero)] = {0};
#ifdef DEBUGGING
strace.microseconds ();
@ -921,7 +926,9 @@ _dll_crt0 ()
break;
}
default:
if ((fork_info->type & PROC_MAGIC_MASK) == PROC_MAGIC_GENERIC)
if (_cygwin_testing)
fork_info = NULL;
else if ((fork_info->type & PROC_MAGIC_MASK) == PROC_MAGIC_GENERIC)
api_fatal ("conflicting versions of cygwin1.dll detected. Use only the most recent version.\n");
break;
}

View File

@ -43,10 +43,10 @@ char * __stdcall
shared_name (const char *str, int num)
{
static NO_COPY char buf[MAX_PATH] = {0};
char envbuf[6];
extern bool _cygwin_testing;
__small_sprintf (buf, "%s.%s.%d", cygwin_version.shared_id, str, num);
if (GetEnvironmentVariable ("CYGWIN_TESTING", envbuf, 5))
if (!_cygwin_testing)
strcat (buf, cygwin_version.dll_build_date);
return buf;
}

View File

@ -348,7 +348,7 @@ _write (int fd, const void *ptr, size_t len)
fh = cygheap->fdtab[fd];
res = fh->bg_check (SIGTTOU);
syscall_printf ("write fh %p, name '%s' bg_check %d, bg_eof %d", fh, fh->get_name(), res, bg_eof);
if (res > bg_eof)
{
myself->process_state |= PID_TTYOU;