* child_info.h (fork_info): Use different method to alias variable.

(spawn_info): Ditto.
* cxx.cc (__cxa_guard_acquire): New function (needed for gcc 4.x).
(__cxa_guard_release): Ditto.
* devices.in: Make sure stuff is correctly bracketed (for gcc 4.x).
* devices.cc: Regenerate.
* fhandler.h (fhandler_disk_file::fchmod): Avoid left coercion (for gcc 4.x).
* smallprint.c (__rn): Declare as __fastcall since gcc 4.x complains about use
of regparm, for some reason.
* sync.h (sync::init_lock): Remove.
* sync.cc (sync::init_lock): Ditto.
This commit is contained in:
Christopher Faylor 2005-03-19 21:45:15 +00:00
parent cfaf367058
commit f580813771
9 changed files with 921 additions and 896 deletions

View File

@ -1,3 +1,18 @@
2005-03-19 Christopher Faylor <cgf@timesys.com>
* child_info.h (fork_info): Use different method to alias variable.
(spawn_info): Ditto.
* cxx.cc (__cxa_guard_acquire): New function (needed for gcc 4.x).
(__cxa_guard_release): Ditto.
* devices.in: Make sure stuff is correctly bracketed (for gcc 4.x).
* devices.cc: Regenerate.
* fhandler.h (fhandler_disk_file::fchmod): Avoid left coercion (for gcc
4.x).
* smallprint.c (__rn): Declare as __fastcall since gcc 4.x complains
about use of regparm, for some reason.
* sync.h (sync::init_lock): Remove.
* sync.cc (sync::init_lock): Ditto.
2005-03-18 Christopher Faylor <cgf@timesys.com>
* net.cc (cygwin_getprotobyname): Don't try to be fancy with return

View File

@ -109,6 +109,8 @@ public:
void __stdcall init_child_info (DWORD, child_info *, HANDLE);
extern "C" {
extern child_info *child_proc_info;
extern child_info_spawn *spawn_info __attribute__ ((alias ("child_proc_info")));
extern child_info_fork *fork_info __attribute__ ((alias ("child_proc_info")));
extern child_info_spawn *spawn_info asm ("_child_proc_info");
extern child_info_fork *fork_info asm ("_child_proc_info");
}

View File

@ -43,4 +43,14 @@ __cxa_pure_virtual (void)
{
api_fatal ("pure virtual method called");
}
extern "C" void
__cxa_guard_acquire ()
{
}
extern "C" void
__cxa_guard_release ()
{
}
#endif

File diff suppressed because it is too large Load Diff

View File

@ -13,72 +13,74 @@ typedef const device *KR_device_t;
%type KR_device_t
%local {
const device dev_cygdrive_storage =
{"/cygdrive", FH_CYGDRIVE, "/cygdrive"};
{"/cygdrive", {FH_CYGDRIVE}, "/cygdrive"};
const device dev_fs_storage =
{"", FH_FS, ""};
{"", {FH_FS}, ""};
const device dev_proc_storage =
{"", FH_PROC, ""};
{"", {FH_PROC}, ""};
const device dev_registry_storage =
{"", FH_REGISTRY, ""};
{"", {FH_REGISTRY}, ""};
const device dev_piper_storage =
{"", FH_PIPER, ""};
{"", {FH_PIPER}, ""};
const device dev_pipew_storage =
{"", FH_PIPEW, ""};
{"", {FH_PIPEW}, ""};
const device dev_tcp_storage =
{"", FH_TCP, ""};
{"", {FH_TCP}, ""};
const device dev_udp_storage =
{"", FH_UDP, ""};
{"", {FH_UDP}, ""};
const device dev_stream_storage =
{"", FH_STREAM, ""};
{"", {FH_STREAM}, ""};
const device dev_dgram_storage =
{"", FH_DGRAM, ""};
{"", {FH_DGRAM}, ""};
const device dev_bad_storage =
{"", FH_BAD, ""};
{"", {FH_BAD}, ""};
#define BRACK(x) {x}
%storage_here
}
%%
"/dev/tty", FH_TTY, "\\dev\\tty"
"/dev/tty%(0-63)d", FHDEV(DEV_TTYS_MAJOR, {$1}), "\\dev\\tty{$1}", ttys_dev
"/dev/console", FH_CONSOLE, "\\dev\\console", console_dev
"/dev/ttym", FH_TTYM, "\\dev\\ttym", ttym_dev
"/dev/ptmx", FH_PTYM, "\\dev\\ptmx"
"/dev/windows", FH_WINDOWS, "\\dev\\windows"
"/dev/dsp", FH_OSS_DSP, "\\dev\\dsp"
"/dev/conin", FH_CONIN, "conin"
"/dev/conout", FH_CONOUT, "conout"
"/dev/null", FH_NULL, "nul"
"/dev/zero", FH_ZERO, "\\dev\\zero"
"/dev/full", FH_FULL, "\\dev\\full"
"/dev/random", FH_RANDOM, "\\dev\\random"
"/dev/urandom", FH_URANDOM, "\\dev\\urandom", urandom_dev
"/dev/mem", FH_MEM, "\\dev\\mem"
"/dev/kmem", FH_KMEM, "\\dev\\mem"
"/dev/clipboard", FH_CLIPBOARD, "\\dev\\clipboard"
"/dev/port", FH_PORT, "\\dev\\port"
"/dev/com%(1-16)d", FHDEV(DEV_SERIAL_MAJOR, {$1}), "\\\\.\\com{$1}"
"/dev/ttyS%(0-15)d", FHDEV(DEV_SERIAL_MAJOR, {$1 + 1}), "\\\\.\\com{$1 + 1}"
"/dev/pipe", FH_PIPE, "\\dev\\pipe"
"/dev/fifo", FH_FIFO, "\\dev\\fifo"
"/dev/st%(0-127)d", FHDEV(DEV_TAPE_MAJOR, {$1}), "\\Device\\Tape{$1}"
"/dev/nst%(0-127)d", FHDEV(DEV_TAPE_MAJOR, {$1 + 128}), "\\Device\\Tape{$1}"
"/dev/fd%(0-15)d", FHDEV(DEV_FLOPPY_MAJOR, {$1}), "\\Device\\Floppy{$1}"
"/dev/scd%(0-15)d", FHDEV(DEV_CDROM_MAJOR, {$1}), "\\Device\\CdRom{$1}"
"/dev/sr%(0-15)d", FHDEV(DEV_CDROM_MAJOR, {$1}), "\\Device\\CdRom{$1}"
"/dev/sd%{a-z}s", FH_SD{uc $1}, "\\Device\\Harddisk{ord($1) - ord('a')}\\Partition0"
"/dev/sd%{a-z}s%(1-15)d", FH_SD{uc $1} | {$2}, "\\Device\\Harddisk{ord($1) - ord('a')}\\Partition{$2 % 16}"
"/dev/tty", BRACK(FH_TTY), "\\dev\\tty"
"/dev/tty%(0-63)d", BRACK(FHDEV(DEV_TTYS_MAJOR, {$1})), "\\dev\\tty{$1}", ttys_dev
"/dev/console", BRACK(FH_CONSOLE), "\\dev\\console", console_dev
"/dev/ttym", BRACK(FH_TTYM), "\\dev\\ttym", ttym_dev
"/dev/ptmx", BRACK(FH_PTYM), "\\dev\\ptmx"
"/dev/windows", BRACK(FH_WINDOWS), "\\dev\\windows"
"/dev/dsp", BRACK(FH_OSS_DSP), "\\dev\\dsp"
"/dev/conin", BRACK(FH_CONIN), "conin"
"/dev/conout", BRACK(FH_CONOUT), "conout"
"/dev/null", BRACK(FH_NULL), "nul"
"/dev/zero", BRACK(FH_ZERO), "\\dev\\zero"
"/dev/full", BRACK(FH_FULL), "\\dev\\full"
"/dev/random", BRACK(FH_RANDOM), "\\dev\\random"
"/dev/urandom", BRACK(FH_URANDOM), "\\dev\\urandom", urandom_dev
"/dev/mem", BRACK(FH_MEM), "\\dev\\mem"
"/dev/kmem", BRACK(FH_KMEM), "\\dev\\mem"
"/dev/clipboard", BRACK(FH_CLIPBOARD), "\\dev\\clipboard"
"/dev/port", BRACK(FH_PORT), "\\dev\\port"
"/dev/com%(1-16)d", BRACK(FHDEV(DEV_SERIAL_MAJOR, {$1})), "\\\\.\\com{$1}"
"/dev/ttyS%(0-15)d", BRACK(FHDEV(DEV_SERIAL_MAJOR, {$1 + 1})), "\\\\.\\com{$1 + 1}"
"/dev/pipe", BRACK(FH_PIPE), "\\dev\\pipe"
"/dev/fifo", BRACK(FH_FIFO), "\\dev\\fifo"
"/dev/st%(0-127)d", BRACK(FHDEV(DEV_TAPE_MAJOR, {$1})), "\\Device\\Tape{$1}"
"/dev/nst%(0-127)d", BRACK(FHDEV(DEV_TAPE_MAJOR, {$1 + 128})), "\\Device\\Tape{$1}"
"/dev/fd%(0-15)d", BRACK(FHDEV(DEV_FLOPPY_MAJOR, {$1})), "\\Device\\Floppy{$1}"
"/dev/scd%(0-15)d", BRACK(FHDEV(DEV_CDROM_MAJOR, {$1})), "\\Device\\CdRom{$1}"
"/dev/sr%(0-15)d", BRACK(FHDEV(DEV_CDROM_MAJOR, {$1})), "\\Device\\CdRom{$1}"
"/dev/sd%{a-z}s", BRACK(FH_SD{uc $1}), "\\Device\\Harddisk{ord($1) - ord('a')}\\Partition0"
"/dev/sd%{a-z}s%(1-15)d", BRACK(FH_SD{uc $1} | {$2}), "\\Device\\Harddisk{ord($1) - ord('a')}\\Partition{$2 % 16}"
%other {return NULL;}
%%
#undef BRACK
void
device::parse (const char *s)
{

View File

@ -141,7 +141,7 @@ class fhandler_base
bool exists () const {return pc.exists ();}
int pc_binmode () const {return pc.binmode ();}
device& dev () {return pc.dev;}
operator DWORD& () {return (DWORD) pc;}
operator DWORD& () {return (DWORD&) pc;}
virtual size_t size () const {return sizeof (*this);}
virtual fhandler_base& operator =(fhandler_base &x);

View File

@ -24,11 +24,7 @@ int __small_vsprintf (char *dst, const char *fmt, va_list ap);
#define rnarg(dst, base, dosign, len, pad) __rn ((dst), (base), (dosign), va_arg (ap, long), len, pad, LMASK)
#define rnargLL(dst, base, dosign, len, pad) __rn ((dst), (base), (dosign), va_arg (ap, unsigned long long), len, pad, LLMASK)
static char * __rn (char *, int, int, long long, int, int,
unsigned long long) __attribute__ ((regparm (3)));
static char *
static char __fastcall *
__rn (char *dst, int base, int dosign, long long val, int len, int pad, unsigned long long mask)
{
/* longest number is ULLONG_MAX, 18446744073709551615, 20 digits */

View File

@ -28,7 +28,6 @@ details. */
#undef WaitForSingleObject
DWORD NO_COPY muto::exiting_thread;
CRITICAL_SECTION NO_COPY muto::init_lock;
void
muto::grab ()

View File

@ -17,7 +17,6 @@ details. */
class muto
{
static DWORD exiting_thread;
static CRITICAL_SECTION init_lock;
LONG sync; /* Used to serialize access to this class. */
LONG waiters; /* Number of threads waiting for lock. */
HANDLE bruteforce; /* event handle used to control waiting for lock. */