2000-02-17 20:38:33 +01:00
|
|
|
|
# Makefile.in for Cygwin.
|
2003-01-24 04:53:46 +01:00
|
|
|
|
# Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
|
2000-02-17 20:38:33 +01:00
|
|
|
|
#
|
|
|
|
|
# This file is part of Cygwin.
|
|
|
|
|
#
|
|
|
|
|
# This software is a copyrighted work licensed under the terms of the
|
|
|
|
|
# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
|
|
|
|
# details.
|
|
|
|
|
|
|
|
|
|
# This makefile requires GNU make.
|
|
|
|
|
|
|
|
|
|
SHELL:=@SHELL@
|
|
|
|
|
srcdir:=@srcdir@
|
|
|
|
|
objdir:=.
|
|
|
|
|
|
2000-07-01 05:51:55 +02:00
|
|
|
|
CONFIG_DIR:=$(srcdir)/config/@CONFIG_DIR@
|
2001-12-20 03:55:11 +01:00
|
|
|
|
VPATH:=$(srcdir):$(CONFIG_DIR):$(srcdir)/regex:$(srcdir)/regexp:$(srcdir)/lib
|
2000-07-01 05:51:55 +02:00
|
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
|
target_alias:=@target_alias@
|
|
|
|
|
build_alias:=@build_alias@
|
|
|
|
|
host_alias:=@host_alias@
|
|
|
|
|
prefix:=@prefix@
|
|
|
|
|
|
|
|
|
|
program_transform_name:=@program_transform_name@
|
|
|
|
|
exec_prefix:=@exec_prefix@
|
|
|
|
|
bindir:=@bindir@
|
|
|
|
|
libdir:=@libdir@
|
|
|
|
|
ifeq ($(target_alias),$(host_alias))
|
|
|
|
|
ifeq ($(build_alias),$(host_alias))
|
|
|
|
|
tooldir:=$(exec_prefix)
|
|
|
|
|
else
|
|
|
|
|
tooldir:=$(exec_prefix)/$(target_alias)
|
|
|
|
|
endif
|
|
|
|
|
else
|
|
|
|
|
tooldir:=$(exec_prefix)/$(target_alias)
|
|
|
|
|
endif
|
|
|
|
|
datadir:=@datadir@
|
|
|
|
|
infodir:=@infodir@
|
|
|
|
|
includedir:=@includedir@
|
|
|
|
|
|
2003-07-26 02:10:48 +02:00
|
|
|
|
override INSTALL:=@INSTALL@
|
|
|
|
|
override INSTALL_PROGRAM:=@INSTALL_PROGRAM@
|
|
|
|
|
override INSTALL_DATA:=@INSTALL_DATA@
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# --enable options from configure
|
|
|
|
|
#
|
2001-12-20 03:55:11 +01:00
|
|
|
|
MT_SAFE:=@MT_SAFE@
|
|
|
|
|
DEFS:=@DEFS@
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
2000-08-22 17:25:25 +02:00
|
|
|
|
CC:=@CC@
|
2000-02-17 20:38:33 +01:00
|
|
|
|
# FIXME: Which is it, CC or CC_FOR_TARGET?
|
|
|
|
|
CC_FOR_TARGET:=$(CC)
|
2003-11-28 21:55:59 +01:00
|
|
|
|
CFLAGS=@CFLAGS@ -fmerge-constants -ftracer
|
2002-12-21 06:06:37 +01:00
|
|
|
|
override CFLAGS+=-MMD ${$(*F)_CFLAGS}
|
2003-03-29 05:20:45 +01:00
|
|
|
|
CXX=@CXX@
|
2003-11-28 21:55:59 +01:00
|
|
|
|
CXXFLAGS=@CXXFLAGS@ -fmerge-constants
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
|
|
AR:=@AR@
|
|
|
|
|
AR_FLAGS:=qv
|
|
|
|
|
RANLIB:=@RANLIB@
|
|
|
|
|
LD:=@LD@
|
|
|
|
|
DLLTOOL:=@DLLTOOL@
|
|
|
|
|
WINDRES:=@WINDRES@
|
|
|
|
|
AS:=@AS@
|
2001-12-20 03:55:11 +01:00
|
|
|
|
NM:=@NM@
|
|
|
|
|
LDSCRIPT:=cygwin.sc
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Include common definitions for winsup directory
|
|
|
|
|
#
|
|
|
|
|
include $(srcdir)/../Makefile.common
|
|
|
|
|
|
|
|
|
|
@SET_MAKE@
|
|
|
|
|
|
|
|
|
|
# Setup the testing framework, if you have one
|
|
|
|
|
EXPECT = `if [ -f $${rootme}/../../expect/expect$(EXEEXT) ] ; then \
|
2002-09-22 02:46:24 +02:00
|
|
|
|
echo $${rootme}/../../expect/expect$(EXEEXT) ; \
|
|
|
|
|
else echo expect ; fi`
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
|
|
RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
|
|
|
|
|
echo $${srcdir}/../dejagnu/runtest ; \
|
|
|
|
|
else echo runtest; fi`
|
|
|
|
|
RUNTESTFLAGS =
|
|
|
|
|
|
|
|
|
|
# Parameters used in building the cygwin.dll.
|
2003-03-09 18:01:41 +01:00
|
|
|
|
# We build as cygwin0.dll and rename at install time to overcome
|
2000-02-17 20:38:33 +01:00
|
|
|
|
# native rebuilding issues (we don't want the build tools to see a partially
|
|
|
|
|
# built cygwin.dll and attempt to use it instead of the old one).
|
|
|
|
|
|
|
|
|
|
DLL_NAME:=cygwin1.dll
|
2003-03-09 18:01:41 +01:00
|
|
|
|
TEST_DLL_NAME:=cygwin0.dll
|
|
|
|
|
TEST_LIB_NAME:=libcygwin0.a
|
2000-02-17 20:38:33 +01:00
|
|
|
|
DEF_FILE:=cygwin.def
|
|
|
|
|
DLL_ENTRY:=@DLL_ENTRY@
|
|
|
|
|
|
|
|
|
|
LIBGMON_A:=libgmon.a
|
2003-05-12 13:06:27 +02:00
|
|
|
|
CYGWIN_START:=crt0.o
|
2000-02-17 20:38:33 +01:00
|
|
|
|
GMON_START:=gcrt0.o
|
|
|
|
|
|
|
|
|
|
# Some things want these from libc, but they have their own static
|
|
|
|
|
# data which apps can get to, which is a pain in the dll, so we
|
|
|
|
|
# include them directly into the library.
|
|
|
|
|
|
2000-07-01 05:51:55 +02:00
|
|
|
|
LIBCOS:=${sort ${addsuffix .o,${basename ${notdir ${wildcard $(srcdir)/lib/*.c}}}} \
|
|
|
|
|
${addsuffix .o,${basename ${notdir ${wildcard $(srcdir)/lib/*.cc}}}}}
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
|
|
# Build all source files in the config directory
|
|
|
|
|
|
|
|
|
|
EXTRA_DLL_OFILES:=${addsuffix .o,${basename ${notdir ${wildcard $(CONFIG_DIR)/*.c}}}}
|
|
|
|
|
|
2003-04-03 03:23:37 +02:00
|
|
|
|
EXTRA_OFILES=$(bupdir1)/libiberty/random.o $(bupdir1)/libiberty/strsignal.o
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
2001-04-24 17:25:31 +02:00
|
|
|
|
MALLOC_OFILES=@MALLOC_OFILES@
|
|
|
|
|
|
2002-09-25 14:24:23 +02:00
|
|
|
|
DLL_IMPORTS:=$(w32api_lib)/libkernel32.a
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
* devices.cc: New file.
* devices.gperf: New file.
* devices.shilka: New file.
* cygwin-gperf: New file.
* cygwin-shilka: New file.
* fhandler_fifo.cc: New file.
* fhandler_nodevice.cc : New file. Reorganize headers so that path.h precedes
fhandler.h throughout. Remove device argument and unit arguments from fhandler
constructors throughout. Remove pc arguments to fhandler functions and use
internal pc element instead, throughout. Use dev element in pc throughout.
Use major/minor elements rather than units and device numbers previously in
fhandler class. Use correct methods for fhandler file names rather than
directly accessing file name variables, throughout.
* Makefile.in (DLL_OFILES): Add devices.o, fhandler_fifo.o
* dcrt0.cc (dll_crt0_1): Call device::init.
* devices.h: Renumber devices based on more Linux-like major/minor numbers.
Add more devices. Declare standard device storage.
(device): Declare struct.
* dir.cc (opendir): Use new 'build_fh_name' to construct a fhandler_* type.
* dtable.cc (dtable::get_debugger_info): Ditto.
(cygwin_attach_handle_to_fd): Ditto.
(dtable::release): Remove special FH_SOCKET case in favor of generic
"need_fixup_before" test.
(dtable::init_std_file_from_handle): Use either build_fh_dev or build_fh_name
to build standard fhandler.
(dtable::build_fh_name): Renamed from dtable::build_fhandler_from_name. Move
out of dtable class. Don't accept a path_conv argument. Just build it here
and pass it to:
(build_fh_pc): Renamed from dtable::build_fhandler. Move out of dtable class.
Use intrinsic device type in path_conv to create new fhandler.
(build_fh_dev): Renamed from dtable::build_fhandler. Move out of dtable class.
Simplify arguments to just take new 'device' type and a name. Just return
pointer to fhandler rather than trying to insert into dtable.
(dtable::dup_worker): Accommodate above build_fh name changes.
(dtable::find_fifo): New (currently broken) function.
(handle_to_fn): Use strechr for efficiency.
* dtable.h: Reflect above build_fh name changes and argument differences.
(fhandler_base *&operator []): Return self rather than copy of self.
* fhandler.cc (fhandler_base::operator =): Use pc element to set normalized
path.
(fhandler_base::set_name): Ditto.
(fhandler_base::raw_read): Use method to access name.
(fhandler_base::write): Correctly use get_output_handle rather than get_handle.
(handler_base::device_access_denied): New function.
(fhandler_base::open): Eliminate pc argument and use pc element of
fhandler_base throughout.
(fhandler_base::fstat): Detect if device is based in filesystem and use
fstat_fs to calculate stat, if so.
(fhandler_base::fhandler_base): Eliminate handling of file names and, instead,
just free appropriate component from pc.
(fhandler_base::opendir): Remove path_conv parameter.
* fhandler.h: Remove all device flags.
(fhandler_base::pc): New element.
(fhandler_base::set_name): Change argument to path_conv.
(fhandler_base::error): New function.
(fhandler_base::exists): New function.
(fhandler_base::pc_binmode): New function.
(fhandler_base::dev): New function.
(fhandler_base::open_fs): New function.
(fhandler_base::fstat_fs): New function.
(fhandler_base::fstat_by_name): New function.
(fhandler_base::fstat_by_handle): New function.
(fhandler_base::isfifo): New function.
(fhandler_base::is_slow): New function.
(fhandler_base::is_auto_device): New function.
(fhandler_base::is_fs_special): New function.
(fhandler_base::device_access_denied): New function.
(fhandler_base::operator DWORD&): New operator.
(fhandler_base::get_name): Return normalized path from pc.
(fhandler_base::get_win32_name): Return windows path from pc.
(fhandler_base::isdevice): Renamed from is_device.
(fhandler_base::get_native_name): Return device format.
(fhandler_fifo): New class.
(fhandler_nodevice): New class.
(select_stuff::device_specific): Remove array.
(select_stuff::device_specific_pipe): New class element.
(select_stuff::device_specific_socket): New class element.
(select_stuff::device_specific_serial): New class element.
(select_stuff::select_stuff): Initialize new elements.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Move to base class
from fhandler_disk_file.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_disk_file::open): Move most functionality into
fhandler_base::open_fs.
(fhandler_base::open_fs): New function.
(fhandler_disk_file::close): Move most functionality into
fhandler_base::close_fs.
(fhandler_base::close_fs): New function.
* fhandler_mem.cc (fhandler_dev_mem::open): Use device name in debugging
output.
* fhandler_socket.cc (fhandler_socket::set_connect_secret): Copy standard
urandom device into appropriate place.
(fhandler_socket::accept): Reflect change in fdsock return value.
* fhandler_tty.cc: See "throughouts" above.
* net.cc: Accommodate fdsock change throughout.
(fdsock): Return success or failure, accept fd argument and device argument.
* path.cc (symlink_info::major): New element.
(symlink_info::minor): New element.
(symlink_info::parse_device): Declare new function.
(fs_info::update): Accommodate changes in path_conv class.
(path_conv::fillin): Ditto.
(path_conv::return_and_clear_normalized_path): Eliminate.
(path_conv::set_normalized_path): New function.
(path_conv::path_conv): Set info in dev element. Use path_conv methods Check
for FH_FS rather than FH_BAD to indicate when to fill in filesystem stuff.
where appropriate rather than direct access. Use set_normalized_path to set
normalized path.
(windows_device_names): Eliminate.
(get_dev): Ditto.
(get_raw_device_number): Ditto.
(get_device_number): Ditto.
(win32_device_name): Call new device name parser to do most of the heavy
lifting.
(mount_info::conv_to_win32_path): Fill in dev field as appropriate.
(symlink_worker): Handle new device files.
(symlink_info::check): Ditto.
(symlink_info::parse_device): Define new function.
* path.h (executable_states): Move here from fhandler.h.
(fs_info): Rename variables to *_storage and create methods for accessing same.
(path_conv): Add dev element, remove devn and unit and adjust inline methods to
accommodate.
(set_normalized_path): Declare new function.
* pinfo.cc (_pinfo::commune_recv): Add broken support for handling fifos.
(_pinfo::commune_send): Ditto.
* pipe.cc (fhandler_pipe::close): check for existence of handle before closing
it.
(handler_pipe::create): Rename from make_pipe. Change arguments to accept
fhandler_pipe array. Accommodate fifos.
(pipe): Rework to deal with fhandler_pipe::create changes.
(_pipe): Ditto.
* select.cc: Use individual device_specific types throughout rather than
indexing with obsolete device number.
(set_bits): Use is_socket call rather than checking device number.
* shared_info.h (CURR_MOUNT_MAGIC): Update.
(conv_to_win32_path): Reflect addition of device argument.
* syscalls.cc (mknod_worker): New function.
(open): Use build_fh_name to build fhandler.
(chown_worker): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(chmod_device): New function.
(chmod): Detect if this is an 'auto' device rather than an on-filesystem device
and handle appropriately. Use chmod_device to set mode of in-filesystem
devices.
(stat_worker): Eliminate path_conv argument. Call build_fh_name to construct
fhandler. Use fh->error() rather than pc->error to detect errors in fhandler
construction.
(access_worker): New function pulled from access. Accommodate in-filesystem
devices.
(access): Use access_worker.
(fpathconf): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(mknod_worker): New function.
(mknod32): New function.
(chroot): Free normalized path -- assuming it was actually cmalloced.
* tty.cc (create_tty_master): Tweak for new device class.
(tty::common_init): Ditto.
* winsup.h (stat_worker): Remove.
(symlink_worker): Declare.
* exceptions.cc (set_process_mask): Just call sig_dispatch_pending and don't
worry about pending_signals since sig_dispatch_pending should always do the
right thing now.
(sig_handle): Reorganize SIGCONT handling to more closely conform to SUSv3.
* pinfo.h: Move __SIG enum to sigproc.h.
(PICOM_FIFO): New enum element.
(_pinfo): Remove 'thread2signal' stuff throughout class.
(_pinfo::commune_send): Make varargs.
(_pinfo::sigtodo): Eliminate.
(_pinfo::thread2signal): Ditto.
* signal.cc (kill_worker): Eliminate call to setthread2signal.
* sigproc.cc (local_sigtodo): Eliminate.
(getlocal_sigtodo): Ditto.
(sigelem): New class.
(pending_signals): New class.
(sigqueue): New variable, start of sigqueue linked list.
(sigcatch_nonmain): Eliminate.
(sigcatch_main): Eliminate.
(sigcatch_nosync): Eliminate.
(sigcomplete_nonmain): Eliminate.
(pending_signals): Eliminate.
(sig_clear): Call signal thread to clear pending signals, unless already in
signal thread.
(sigpending): Call signal thread to get pending signals.
(sig_dispatch_pending): Eliminate use of pending_signals and just check
sigqueue.
(sigproc_terminate): Eliminate all of the obsolete semaphore stuff. Close
signal pipe handle.
(sig_send): Eliminate all of the obsolete semaphore stuff and use pipe to send
signals.
(getevent): Eliminate.
(pending_signals::add): New function.
(pending_signals::del): New function.
(pending_signals::next): New function.
(wait_sig): Eliminate all of the obsolete semaphore stuff. Use pipe to
communicate and maintain a linked list of signals.
* sigproc.h: Move __SIG defines here. Add __SIGPENDING.
(sig_dispatch_pending): Remove "C" specifier.
(sig_handle): Accept a mask argument.
* thread.cc: Remove signal handling considerations throughout.
2003-09-25 02:37:18 +02:00
|
|
|
|
MT_SAFE_OBJECTS:=
|
2002-05-27 04:06:16 +02:00
|
|
|
|
# Please maintain this list in sorted order, with maximum files per 80 col line
|
2003-11-28 21:55:59 +01:00
|
|
|
|
#
|
* Makefile.in (DLL_OFILES): Add getopt.o and iruserok.o.
* cygwin.din: Export __check_rhosts_file, __rcmd_errstr, optarg,
opterr, optind, optopt, optreset, getopt, getopt_long, iruserok
and ruserok.
* getopt.c: Moved from lib to here. Define opt* variables as
dllexport.
* iruserok.c: Moved from lib to here. Rearrange function order.
Prefer using 64/32 bit functions.
* syscalls.cc (shell_fp): Define as struct __sFILE64.
(getusershell): Use fopen64 instead of fopen.
* winsup.h: Add declarations for seteuid32, fopen64,
cygwin_gethostbyname and cygwin_inet_addr.
* include/getopt.h: Declare opt* variables dllimport.
* include/cygwin/version.h: Bump API minor number.
2003-09-10 21:13:05 +02:00
|
|
|
|
DLL_OFILES:=assert.o autoload.o bsdlib.o cxx.o cygheap.o cygthread.o dcrt0.o \
|
* devices.cc: New file.
* devices.gperf: New file.
* devices.shilka: New file.
* cygwin-gperf: New file.
* cygwin-shilka: New file.
* fhandler_fifo.cc: New file.
* fhandler_nodevice.cc : New file. Reorganize headers so that path.h precedes
fhandler.h throughout. Remove device argument and unit arguments from fhandler
constructors throughout. Remove pc arguments to fhandler functions and use
internal pc element instead, throughout. Use dev element in pc throughout.
Use major/minor elements rather than units and device numbers previously in
fhandler class. Use correct methods for fhandler file names rather than
directly accessing file name variables, throughout.
* Makefile.in (DLL_OFILES): Add devices.o, fhandler_fifo.o
* dcrt0.cc (dll_crt0_1): Call device::init.
* devices.h: Renumber devices based on more Linux-like major/minor numbers.
Add more devices. Declare standard device storage.
(device): Declare struct.
* dir.cc (opendir): Use new 'build_fh_name' to construct a fhandler_* type.
* dtable.cc (dtable::get_debugger_info): Ditto.
(cygwin_attach_handle_to_fd): Ditto.
(dtable::release): Remove special FH_SOCKET case in favor of generic
"need_fixup_before" test.
(dtable::init_std_file_from_handle): Use either build_fh_dev or build_fh_name
to build standard fhandler.
(dtable::build_fh_name): Renamed from dtable::build_fhandler_from_name. Move
out of dtable class. Don't accept a path_conv argument. Just build it here
and pass it to:
(build_fh_pc): Renamed from dtable::build_fhandler. Move out of dtable class.
Use intrinsic device type in path_conv to create new fhandler.
(build_fh_dev): Renamed from dtable::build_fhandler. Move out of dtable class.
Simplify arguments to just take new 'device' type and a name. Just return
pointer to fhandler rather than trying to insert into dtable.
(dtable::dup_worker): Accommodate above build_fh name changes.
(dtable::find_fifo): New (currently broken) function.
(handle_to_fn): Use strechr for efficiency.
* dtable.h: Reflect above build_fh name changes and argument differences.
(fhandler_base *&operator []): Return self rather than copy of self.
* fhandler.cc (fhandler_base::operator =): Use pc element to set normalized
path.
(fhandler_base::set_name): Ditto.
(fhandler_base::raw_read): Use method to access name.
(fhandler_base::write): Correctly use get_output_handle rather than get_handle.
(handler_base::device_access_denied): New function.
(fhandler_base::open): Eliminate pc argument and use pc element of
fhandler_base throughout.
(fhandler_base::fstat): Detect if device is based in filesystem and use
fstat_fs to calculate stat, if so.
(fhandler_base::fhandler_base): Eliminate handling of file names and, instead,
just free appropriate component from pc.
(fhandler_base::opendir): Remove path_conv parameter.
* fhandler.h: Remove all device flags.
(fhandler_base::pc): New element.
(fhandler_base::set_name): Change argument to path_conv.
(fhandler_base::error): New function.
(fhandler_base::exists): New function.
(fhandler_base::pc_binmode): New function.
(fhandler_base::dev): New function.
(fhandler_base::open_fs): New function.
(fhandler_base::fstat_fs): New function.
(fhandler_base::fstat_by_name): New function.
(fhandler_base::fstat_by_handle): New function.
(fhandler_base::isfifo): New function.
(fhandler_base::is_slow): New function.
(fhandler_base::is_auto_device): New function.
(fhandler_base::is_fs_special): New function.
(fhandler_base::device_access_denied): New function.
(fhandler_base::operator DWORD&): New operator.
(fhandler_base::get_name): Return normalized path from pc.
(fhandler_base::get_win32_name): Return windows path from pc.
(fhandler_base::isdevice): Renamed from is_device.
(fhandler_base::get_native_name): Return device format.
(fhandler_fifo): New class.
(fhandler_nodevice): New class.
(select_stuff::device_specific): Remove array.
(select_stuff::device_specific_pipe): New class element.
(select_stuff::device_specific_socket): New class element.
(select_stuff::device_specific_serial): New class element.
(select_stuff::select_stuff): Initialize new elements.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Move to base class
from fhandler_disk_file.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_disk_file::open): Move most functionality into
fhandler_base::open_fs.
(fhandler_base::open_fs): New function.
(fhandler_disk_file::close): Move most functionality into
fhandler_base::close_fs.
(fhandler_base::close_fs): New function.
* fhandler_mem.cc (fhandler_dev_mem::open): Use device name in debugging
output.
* fhandler_socket.cc (fhandler_socket::set_connect_secret): Copy standard
urandom device into appropriate place.
(fhandler_socket::accept): Reflect change in fdsock return value.
* fhandler_tty.cc: See "throughouts" above.
* net.cc: Accommodate fdsock change throughout.
(fdsock): Return success or failure, accept fd argument and device argument.
* path.cc (symlink_info::major): New element.
(symlink_info::minor): New element.
(symlink_info::parse_device): Declare new function.
(fs_info::update): Accommodate changes in path_conv class.
(path_conv::fillin): Ditto.
(path_conv::return_and_clear_normalized_path): Eliminate.
(path_conv::set_normalized_path): New function.
(path_conv::path_conv): Set info in dev element. Use path_conv methods Check
for FH_FS rather than FH_BAD to indicate when to fill in filesystem stuff.
where appropriate rather than direct access. Use set_normalized_path to set
normalized path.
(windows_device_names): Eliminate.
(get_dev): Ditto.
(get_raw_device_number): Ditto.
(get_device_number): Ditto.
(win32_device_name): Call new device name parser to do most of the heavy
lifting.
(mount_info::conv_to_win32_path): Fill in dev field as appropriate.
(symlink_worker): Handle new device files.
(symlink_info::check): Ditto.
(symlink_info::parse_device): Define new function.
* path.h (executable_states): Move here from fhandler.h.
(fs_info): Rename variables to *_storage and create methods for accessing same.
(path_conv): Add dev element, remove devn and unit and adjust inline methods to
accommodate.
(set_normalized_path): Declare new function.
* pinfo.cc (_pinfo::commune_recv): Add broken support for handling fifos.
(_pinfo::commune_send): Ditto.
* pipe.cc (fhandler_pipe::close): check for existence of handle before closing
it.
(handler_pipe::create): Rename from make_pipe. Change arguments to accept
fhandler_pipe array. Accommodate fifos.
(pipe): Rework to deal with fhandler_pipe::create changes.
(_pipe): Ditto.
* select.cc: Use individual device_specific types throughout rather than
indexing with obsolete device number.
(set_bits): Use is_socket call rather than checking device number.
* shared_info.h (CURR_MOUNT_MAGIC): Update.
(conv_to_win32_path): Reflect addition of device argument.
* syscalls.cc (mknod_worker): New function.
(open): Use build_fh_name to build fhandler.
(chown_worker): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(chmod_device): New function.
(chmod): Detect if this is an 'auto' device rather than an on-filesystem device
and handle appropriately. Use chmod_device to set mode of in-filesystem
devices.
(stat_worker): Eliminate path_conv argument. Call build_fh_name to construct
fhandler. Use fh->error() rather than pc->error to detect errors in fhandler
construction.
(access_worker): New function pulled from access. Accommodate in-filesystem
devices.
(access): Use access_worker.
(fpathconf): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(mknod_worker): New function.
(mknod32): New function.
(chroot): Free normalized path -- assuming it was actually cmalloced.
* tty.cc (create_tty_master): Tweak for new device class.
(tty::common_init): Ditto.
* winsup.h (stat_worker): Remove.
(symlink_worker): Declare.
* exceptions.cc (set_process_mask): Just call sig_dispatch_pending and don't
worry about pending_signals since sig_dispatch_pending should always do the
right thing now.
(sig_handle): Reorganize SIGCONT handling to more closely conform to SUSv3.
* pinfo.h: Move __SIG enum to sigproc.h.
(PICOM_FIFO): New enum element.
(_pinfo): Remove 'thread2signal' stuff throughout class.
(_pinfo::commune_send): Make varargs.
(_pinfo::sigtodo): Eliminate.
(_pinfo::thread2signal): Ditto.
* signal.cc (kill_worker): Eliminate call to setthread2signal.
* sigproc.cc (local_sigtodo): Eliminate.
(getlocal_sigtodo): Ditto.
(sigelem): New class.
(pending_signals): New class.
(sigqueue): New variable, start of sigqueue linked list.
(sigcatch_nonmain): Eliminate.
(sigcatch_main): Eliminate.
(sigcatch_nosync): Eliminate.
(sigcomplete_nonmain): Eliminate.
(pending_signals): Eliminate.
(sig_clear): Call signal thread to clear pending signals, unless already in
signal thread.
(sigpending): Call signal thread to get pending signals.
(sig_dispatch_pending): Eliminate use of pending_signals and just check
sigqueue.
(sigproc_terminate): Eliminate all of the obsolete semaphore stuff. Close
signal pipe handle.
(sig_send): Eliminate all of the obsolete semaphore stuff and use pipe to send
signals.
(getevent): Eliminate.
(pending_signals::add): New function.
(pending_signals::del): New function.
(pending_signals::next): New function.
(wait_sig): Eliminate all of the obsolete semaphore stuff. Use pipe to
communicate and maintain a linked list of signals.
* sigproc.h: Move __SIG defines here. Add __SIGPENDING.
(sig_dispatch_pending): Remove "C" specifier.
(sig_handle): Accept a mask argument.
* thread.cc: Remove signal handling considerations throughout.
2003-09-25 02:37:18 +02:00
|
|
|
|
debug.o delqueue.o devices.o dir.o dlfcn.o dll_init.o dtable.o environ.o \
|
2003-09-10 17:51:59 +02:00
|
|
|
|
errno.o exceptions.o exec.o external.o fcntl.o fhandler.o \
|
2002-09-22 18:33:36 +02:00
|
|
|
|
fhandler_clipboard.o fhandler_console.o fhandler_disk_file.o \
|
* devices.cc: New file.
* devices.gperf: New file.
* devices.shilka: New file.
* cygwin-gperf: New file.
* cygwin-shilka: New file.
* fhandler_fifo.cc: New file.
* fhandler_nodevice.cc : New file. Reorganize headers so that path.h precedes
fhandler.h throughout. Remove device argument and unit arguments from fhandler
constructors throughout. Remove pc arguments to fhandler functions and use
internal pc element instead, throughout. Use dev element in pc throughout.
Use major/minor elements rather than units and device numbers previously in
fhandler class. Use correct methods for fhandler file names rather than
directly accessing file name variables, throughout.
* Makefile.in (DLL_OFILES): Add devices.o, fhandler_fifo.o
* dcrt0.cc (dll_crt0_1): Call device::init.
* devices.h: Renumber devices based on more Linux-like major/minor numbers.
Add more devices. Declare standard device storage.
(device): Declare struct.
* dir.cc (opendir): Use new 'build_fh_name' to construct a fhandler_* type.
* dtable.cc (dtable::get_debugger_info): Ditto.
(cygwin_attach_handle_to_fd): Ditto.
(dtable::release): Remove special FH_SOCKET case in favor of generic
"need_fixup_before" test.
(dtable::init_std_file_from_handle): Use either build_fh_dev or build_fh_name
to build standard fhandler.
(dtable::build_fh_name): Renamed from dtable::build_fhandler_from_name. Move
out of dtable class. Don't accept a path_conv argument. Just build it here
and pass it to:
(build_fh_pc): Renamed from dtable::build_fhandler. Move out of dtable class.
Use intrinsic device type in path_conv to create new fhandler.
(build_fh_dev): Renamed from dtable::build_fhandler. Move out of dtable class.
Simplify arguments to just take new 'device' type and a name. Just return
pointer to fhandler rather than trying to insert into dtable.
(dtable::dup_worker): Accommodate above build_fh name changes.
(dtable::find_fifo): New (currently broken) function.
(handle_to_fn): Use strechr for efficiency.
* dtable.h: Reflect above build_fh name changes and argument differences.
(fhandler_base *&operator []): Return self rather than copy of self.
* fhandler.cc (fhandler_base::operator =): Use pc element to set normalized
path.
(fhandler_base::set_name): Ditto.
(fhandler_base::raw_read): Use method to access name.
(fhandler_base::write): Correctly use get_output_handle rather than get_handle.
(handler_base::device_access_denied): New function.
(fhandler_base::open): Eliminate pc argument and use pc element of
fhandler_base throughout.
(fhandler_base::fstat): Detect if device is based in filesystem and use
fstat_fs to calculate stat, if so.
(fhandler_base::fhandler_base): Eliminate handling of file names and, instead,
just free appropriate component from pc.
(fhandler_base::opendir): Remove path_conv parameter.
* fhandler.h: Remove all device flags.
(fhandler_base::pc): New element.
(fhandler_base::set_name): Change argument to path_conv.
(fhandler_base::error): New function.
(fhandler_base::exists): New function.
(fhandler_base::pc_binmode): New function.
(fhandler_base::dev): New function.
(fhandler_base::open_fs): New function.
(fhandler_base::fstat_fs): New function.
(fhandler_base::fstat_by_name): New function.
(fhandler_base::fstat_by_handle): New function.
(fhandler_base::isfifo): New function.
(fhandler_base::is_slow): New function.
(fhandler_base::is_auto_device): New function.
(fhandler_base::is_fs_special): New function.
(fhandler_base::device_access_denied): New function.
(fhandler_base::operator DWORD&): New operator.
(fhandler_base::get_name): Return normalized path from pc.
(fhandler_base::get_win32_name): Return windows path from pc.
(fhandler_base::isdevice): Renamed from is_device.
(fhandler_base::get_native_name): Return device format.
(fhandler_fifo): New class.
(fhandler_nodevice): New class.
(select_stuff::device_specific): Remove array.
(select_stuff::device_specific_pipe): New class element.
(select_stuff::device_specific_socket): New class element.
(select_stuff::device_specific_serial): New class element.
(select_stuff::select_stuff): Initialize new elements.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Move to base class
from fhandler_disk_file.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_disk_file::open): Move most functionality into
fhandler_base::open_fs.
(fhandler_base::open_fs): New function.
(fhandler_disk_file::close): Move most functionality into
fhandler_base::close_fs.
(fhandler_base::close_fs): New function.
* fhandler_mem.cc (fhandler_dev_mem::open): Use device name in debugging
output.
* fhandler_socket.cc (fhandler_socket::set_connect_secret): Copy standard
urandom device into appropriate place.
(fhandler_socket::accept): Reflect change in fdsock return value.
* fhandler_tty.cc: See "throughouts" above.
* net.cc: Accommodate fdsock change throughout.
(fdsock): Return success or failure, accept fd argument and device argument.
* path.cc (symlink_info::major): New element.
(symlink_info::minor): New element.
(symlink_info::parse_device): Declare new function.
(fs_info::update): Accommodate changes in path_conv class.
(path_conv::fillin): Ditto.
(path_conv::return_and_clear_normalized_path): Eliminate.
(path_conv::set_normalized_path): New function.
(path_conv::path_conv): Set info in dev element. Use path_conv methods Check
for FH_FS rather than FH_BAD to indicate when to fill in filesystem stuff.
where appropriate rather than direct access. Use set_normalized_path to set
normalized path.
(windows_device_names): Eliminate.
(get_dev): Ditto.
(get_raw_device_number): Ditto.
(get_device_number): Ditto.
(win32_device_name): Call new device name parser to do most of the heavy
lifting.
(mount_info::conv_to_win32_path): Fill in dev field as appropriate.
(symlink_worker): Handle new device files.
(symlink_info::check): Ditto.
(symlink_info::parse_device): Define new function.
* path.h (executable_states): Move here from fhandler.h.
(fs_info): Rename variables to *_storage and create methods for accessing same.
(path_conv): Add dev element, remove devn and unit and adjust inline methods to
accommodate.
(set_normalized_path): Declare new function.
* pinfo.cc (_pinfo::commune_recv): Add broken support for handling fifos.
(_pinfo::commune_send): Ditto.
* pipe.cc (fhandler_pipe::close): check for existence of handle before closing
it.
(handler_pipe::create): Rename from make_pipe. Change arguments to accept
fhandler_pipe array. Accommodate fifos.
(pipe): Rework to deal with fhandler_pipe::create changes.
(_pipe): Ditto.
* select.cc: Use individual device_specific types throughout rather than
indexing with obsolete device number.
(set_bits): Use is_socket call rather than checking device number.
* shared_info.h (CURR_MOUNT_MAGIC): Update.
(conv_to_win32_path): Reflect addition of device argument.
* syscalls.cc (mknod_worker): New function.
(open): Use build_fh_name to build fhandler.
(chown_worker): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(chmod_device): New function.
(chmod): Detect if this is an 'auto' device rather than an on-filesystem device
and handle appropriately. Use chmod_device to set mode of in-filesystem
devices.
(stat_worker): Eliminate path_conv argument. Call build_fh_name to construct
fhandler. Use fh->error() rather than pc->error to detect errors in fhandler
construction.
(access_worker): New function pulled from access. Accommodate in-filesystem
devices.
(access): Use access_worker.
(fpathconf): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(mknod_worker): New function.
(mknod32): New function.
(chroot): Free normalized path -- assuming it was actually cmalloced.
* tty.cc (create_tty_master): Tweak for new device class.
(tty::common_init): Ditto.
* winsup.h (stat_worker): Remove.
(symlink_worker): Declare.
* exceptions.cc (set_process_mask): Just call sig_dispatch_pending and don't
worry about pending_signals since sig_dispatch_pending should always do the
right thing now.
(sig_handle): Reorganize SIGCONT handling to more closely conform to SUSv3.
* pinfo.h: Move __SIG enum to sigproc.h.
(PICOM_FIFO): New enum element.
(_pinfo): Remove 'thread2signal' stuff throughout class.
(_pinfo::commune_send): Make varargs.
(_pinfo::sigtodo): Eliminate.
(_pinfo::thread2signal): Ditto.
* signal.cc (kill_worker): Eliminate call to setthread2signal.
* sigproc.cc (local_sigtodo): Eliminate.
(getlocal_sigtodo): Ditto.
(sigelem): New class.
(pending_signals): New class.
(sigqueue): New variable, start of sigqueue linked list.
(sigcatch_nonmain): Eliminate.
(sigcatch_main): Eliminate.
(sigcatch_nosync): Eliminate.
(sigcomplete_nonmain): Eliminate.
(pending_signals): Eliminate.
(sig_clear): Call signal thread to clear pending signals, unless already in
signal thread.
(sigpending): Call signal thread to get pending signals.
(sig_dispatch_pending): Eliminate use of pending_signals and just check
sigqueue.
(sigproc_terminate): Eliminate all of the obsolete semaphore stuff. Close
signal pipe handle.
(sig_send): Eliminate all of the obsolete semaphore stuff and use pipe to send
signals.
(getevent): Eliminate.
(pending_signals::add): New function.
(pending_signals::del): New function.
(pending_signals::next): New function.
(wait_sig): Eliminate all of the obsolete semaphore stuff. Use pipe to
communicate and maintain a linked list of signals.
* sigproc.h: Move __SIG defines here. Add __SIGPENDING.
(sig_dispatch_pending): Remove "C" specifier.
(sig_handle): Accept a mask argument.
* thread.cc: Remove signal handling considerations throughout.
2003-09-25 02:37:18 +02:00
|
|
|
|
fhandler_dsp.o fhandler_fifo.o fhandler_floppy.o fhandler_mem.o \
|
|
|
|
|
fhandler_nodevice.o fhandler_proc.o fhandler_process.o \
|
|
|
|
|
fhandler_random.o fhandler_raw.o fhandler_registry.o fhandler_serial.o \
|
2002-09-22 18:33:36 +02:00
|
|
|
|
fhandler_socket.o fhandler_tape.o fhandler_termios.o \
|
|
|
|
|
fhandler_tty.o fhandler_virtual.o fhandler_windows.o \
|
* Makefile.in (DLL_OFILES): Add getopt.o and iruserok.o.
* cygwin.din: Export __check_rhosts_file, __rcmd_errstr, optarg,
opterr, optind, optopt, optreset, getopt, getopt_long, iruserok
and ruserok.
* getopt.c: Moved from lib to here. Define opt* variables as
dllexport.
* iruserok.c: Moved from lib to here. Rearrange function order.
Prefer using 64/32 bit functions.
* syscalls.cc (shell_fp): Define as struct __sFILE64.
(getusershell): Use fopen64 instead of fopen.
* winsup.h: Add declarations for seteuid32, fopen64,
cygwin_gethostbyname and cygwin_inet_addr.
* include/getopt.h: Declare opt* variables dllimport.
* include/cygwin/version.h: Bump API minor number.
2003-09-10 21:13:05 +02:00
|
|
|
|
fhandler_zero.o fnmatch.o fork.o getopt.o glob.o grp.o heap.o init.o \
|
|
|
|
|
ioctl.o ipc.o iruserok.o localtime.o malloc_wrapper.o miscfuncs.o \
|
|
|
|
|
mmap.o msg.o net.o netdb.o ntea.o passwd.o path.o pinfo.o pipe.o \
|
|
|
|
|
poll.o pthread.o regcomp.o regerror.o regexec.o regfree.o registry.o \
|
|
|
|
|
resource.o scandir.o sched.o sec_acl.o sec_helper.o security.o \
|
2003-11-28 21:55:59 +01:00
|
|
|
|
select.o sem.o shared.o shm.o sigfe.o signal.o sigproc.o smallprint.o \
|
|
|
|
|
spawn.o strace.o strsep.o sync.o syscalls.o sysconf.o syslog.o \
|
|
|
|
|
termios.o thread.o times.o tty.o uinfo.o uname.o v8_regexp.o \
|
|
|
|
|
v8_regerror.o v8_regsub.o wait.o wincap.o window.o \
|
2001-12-10 04:35:54 +01:00
|
|
|
|
$(EXTRA_DLL_OFILES) $(EXTRA_OFILES) $(MALLOC_OFILES) $(MT_SAFE_OBJECTS)
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
2001-12-20 03:55:11 +01:00
|
|
|
|
GMON_OFILES:=gmon.o mcount.o profil.o
|
|
|
|
|
|
2003-03-09 22:51:00 +01:00
|
|
|
|
OBSOLETE_FUNCTIONS:=regcomp regerror regexec regfree regsub \
|
|
|
|
|
open acl aclcheck aclfrommode aclfrompbits \
|
|
|
|
|
aclfromtext aclsort acltomode acltopbits \
|
2003-07-25 19:42:08 +02:00
|
|
|
|
acltotext chown facl fchown fdopen fgetpos fopen \
|
2003-03-09 22:51:00 +01:00
|
|
|
|
freopen fseeko fsetpos fstat ftello ftruncate \
|
|
|
|
|
getegid geteuid getgid getgrent getgrgid getgrnam \
|
|
|
|
|
getgroups getpwuid getpwuid_r getuid initgroups \
|
|
|
|
|
lchown lseek lstat mknod mmap seekdir setegid seteuid \
|
|
|
|
|
setgid setgroups setregid setreuid setuid stat \
|
2003-10-27 14:06:56 +01:00
|
|
|
|
telldir tmpfile truncate
|
2003-03-09 22:51:00 +01:00
|
|
|
|
|
2001-12-20 03:55:11 +01:00
|
|
|
|
NEW_FUNCTIONS:=regcomp posix_regcomp \
|
|
|
|
|
regerror posix_regerror \
|
|
|
|
|
regexec posix_regexec \
|
2003-03-09 22:51:00 +01:00
|
|
|
|
regfree posix_regfree \
|
|
|
|
|
open _open64 \
|
2003-05-10 00:11:25 +02:00
|
|
|
|
acl _acl32 \
|
|
|
|
|
aclcheck _aclcheck32 \
|
|
|
|
|
aclfrommode _aclfrommode32 \
|
|
|
|
|
aclfrompbits _aclfrompbits32 \
|
|
|
|
|
aclfromtext _aclfromtext32 \
|
|
|
|
|
aclsort _aclsort32 \
|
|
|
|
|
acltomode _acltomode32 \
|
|
|
|
|
acltopbits _acltopbits32 \
|
|
|
|
|
acltotext _acltotext32 \
|
|
|
|
|
chown _chown32 \
|
|
|
|
|
facl _facl32 \
|
|
|
|
|
fchown _fchown32 \
|
2003-07-25 18:13:12 +02:00
|
|
|
|
fdopen _fdopen64 \
|
2003-05-10 00:11:25 +02:00
|
|
|
|
fgetpos _fgetpos64 \
|
|
|
|
|
fopen _fopen64 \
|
|
|
|
|
freopen _freopen64 \
|
|
|
|
|
fseeko _fseeko64 \
|
|
|
|
|
fsetpos _fsetpos64 \
|
|
|
|
|
fstat _fstat64 \
|
|
|
|
|
ftello _ftello64 \
|
|
|
|
|
ftruncate _ftruncate64 \
|
|
|
|
|
getegid _getegid32 \
|
|
|
|
|
geteuid _geteuid32 \
|
|
|
|
|
getgid _getgid32 \
|
|
|
|
|
getgrent _getgrent32 \
|
|
|
|
|
getgrgid _getgrgid32 \
|
|
|
|
|
getgrnam _getgrnam32 \
|
|
|
|
|
getgroups _getgroups32 \
|
|
|
|
|
getpwuid _getpwuid32 \
|
|
|
|
|
getpwuid_r _getpwuid_r32 \
|
|
|
|
|
getuid _getuid32 \
|
|
|
|
|
initgroups _initgroups32 \
|
|
|
|
|
lchown _lchown32 \
|
|
|
|
|
lseek _lseek64 \
|
|
|
|
|
lstat _lstat64 \
|
|
|
|
|
mknod _mknod32 \
|
|
|
|
|
mmap _mmap64 \
|
|
|
|
|
seekdir _seekdir64 \
|
|
|
|
|
setegid _setegid32 \
|
|
|
|
|
seteuid _seteuid32 \
|
|
|
|
|
setgid _setgid32 \
|
|
|
|
|
setgroups _setgroups32 \
|
|
|
|
|
setregid _setregid32 \
|
|
|
|
|
setreuid _setreuid32 \
|
|
|
|
|
setuid _setuid32 \
|
|
|
|
|
stat _stat64 \
|
|
|
|
|
telldir _telldir64 \
|
2003-10-27 14:06:56 +01:00
|
|
|
|
tmpfile _tmpfile64 \
|
2003-05-10 00:11:25 +02:00
|
|
|
|
truncate _truncate64
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
2002-07-25 11:09:34 +02:00
|
|
|
|
API_VER:=$(srcdir)/include/cygwin/version.h
|
|
|
|
|
|
2001-12-31 04:19:29 +01:00
|
|
|
|
PWD:=${shell pwd}
|
2003-08-06 03:40:12 +02:00
|
|
|
|
LIB_NAME:=$(PWD)/libcygwin.a
|
2003-08-25 20:21:07 +02:00
|
|
|
|
LIBSERVER:=@LIBSERVER@
|
2003-08-06 03:40:12 +02:00
|
|
|
|
SUBLIBS:=$(PWD)/libpthread.a $(PWD)/libm.a $(PWD)/libc.a
|
2001-12-31 04:19:29 +01:00
|
|
|
|
EXTRALIBS:=libautomode.a libbinmode.a libtextmode.a
|
|
|
|
|
INSTOBJS:=automode.o binmode.o textmode.o
|
2003-08-06 03:40:12 +02:00
|
|
|
|
TARGET_LIBS:=$(LIB_NAME) $(CYGWIN_START) $(GMON_START) $(LIBGMON_A) $(SUBLIBS) $(INSTOBJS) $(EXTRALIBS)
|
* devices.cc: New file.
* devices.gperf: New file.
* devices.shilka: New file.
* cygwin-gperf: New file.
* cygwin-shilka: New file.
* fhandler_fifo.cc: New file.
* fhandler_nodevice.cc : New file. Reorganize headers so that path.h precedes
fhandler.h throughout. Remove device argument and unit arguments from fhandler
constructors throughout. Remove pc arguments to fhandler functions and use
internal pc element instead, throughout. Use dev element in pc throughout.
Use major/minor elements rather than units and device numbers previously in
fhandler class. Use correct methods for fhandler file names rather than
directly accessing file name variables, throughout.
* Makefile.in (DLL_OFILES): Add devices.o, fhandler_fifo.o
* dcrt0.cc (dll_crt0_1): Call device::init.
* devices.h: Renumber devices based on more Linux-like major/minor numbers.
Add more devices. Declare standard device storage.
(device): Declare struct.
* dir.cc (opendir): Use new 'build_fh_name' to construct a fhandler_* type.
* dtable.cc (dtable::get_debugger_info): Ditto.
(cygwin_attach_handle_to_fd): Ditto.
(dtable::release): Remove special FH_SOCKET case in favor of generic
"need_fixup_before" test.
(dtable::init_std_file_from_handle): Use either build_fh_dev or build_fh_name
to build standard fhandler.
(dtable::build_fh_name): Renamed from dtable::build_fhandler_from_name. Move
out of dtable class. Don't accept a path_conv argument. Just build it here
and pass it to:
(build_fh_pc): Renamed from dtable::build_fhandler. Move out of dtable class.
Use intrinsic device type in path_conv to create new fhandler.
(build_fh_dev): Renamed from dtable::build_fhandler. Move out of dtable class.
Simplify arguments to just take new 'device' type and a name. Just return
pointer to fhandler rather than trying to insert into dtable.
(dtable::dup_worker): Accommodate above build_fh name changes.
(dtable::find_fifo): New (currently broken) function.
(handle_to_fn): Use strechr for efficiency.
* dtable.h: Reflect above build_fh name changes and argument differences.
(fhandler_base *&operator []): Return self rather than copy of self.
* fhandler.cc (fhandler_base::operator =): Use pc element to set normalized
path.
(fhandler_base::set_name): Ditto.
(fhandler_base::raw_read): Use method to access name.
(fhandler_base::write): Correctly use get_output_handle rather than get_handle.
(handler_base::device_access_denied): New function.
(fhandler_base::open): Eliminate pc argument and use pc element of
fhandler_base throughout.
(fhandler_base::fstat): Detect if device is based in filesystem and use
fstat_fs to calculate stat, if so.
(fhandler_base::fhandler_base): Eliminate handling of file names and, instead,
just free appropriate component from pc.
(fhandler_base::opendir): Remove path_conv parameter.
* fhandler.h: Remove all device flags.
(fhandler_base::pc): New element.
(fhandler_base::set_name): Change argument to path_conv.
(fhandler_base::error): New function.
(fhandler_base::exists): New function.
(fhandler_base::pc_binmode): New function.
(fhandler_base::dev): New function.
(fhandler_base::open_fs): New function.
(fhandler_base::fstat_fs): New function.
(fhandler_base::fstat_by_name): New function.
(fhandler_base::fstat_by_handle): New function.
(fhandler_base::isfifo): New function.
(fhandler_base::is_slow): New function.
(fhandler_base::is_auto_device): New function.
(fhandler_base::is_fs_special): New function.
(fhandler_base::device_access_denied): New function.
(fhandler_base::operator DWORD&): New operator.
(fhandler_base::get_name): Return normalized path from pc.
(fhandler_base::get_win32_name): Return windows path from pc.
(fhandler_base::isdevice): Renamed from is_device.
(fhandler_base::get_native_name): Return device format.
(fhandler_fifo): New class.
(fhandler_nodevice): New class.
(select_stuff::device_specific): Remove array.
(select_stuff::device_specific_pipe): New class element.
(select_stuff::device_specific_socket): New class element.
(select_stuff::device_specific_serial): New class element.
(select_stuff::select_stuff): Initialize new elements.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Move to base class
from fhandler_disk_file.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_disk_file::open): Move most functionality into
fhandler_base::open_fs.
(fhandler_base::open_fs): New function.
(fhandler_disk_file::close): Move most functionality into
fhandler_base::close_fs.
(fhandler_base::close_fs): New function.
* fhandler_mem.cc (fhandler_dev_mem::open): Use device name in debugging
output.
* fhandler_socket.cc (fhandler_socket::set_connect_secret): Copy standard
urandom device into appropriate place.
(fhandler_socket::accept): Reflect change in fdsock return value.
* fhandler_tty.cc: See "throughouts" above.
* net.cc: Accommodate fdsock change throughout.
(fdsock): Return success or failure, accept fd argument and device argument.
* path.cc (symlink_info::major): New element.
(symlink_info::minor): New element.
(symlink_info::parse_device): Declare new function.
(fs_info::update): Accommodate changes in path_conv class.
(path_conv::fillin): Ditto.
(path_conv::return_and_clear_normalized_path): Eliminate.
(path_conv::set_normalized_path): New function.
(path_conv::path_conv): Set info in dev element. Use path_conv methods Check
for FH_FS rather than FH_BAD to indicate when to fill in filesystem stuff.
where appropriate rather than direct access. Use set_normalized_path to set
normalized path.
(windows_device_names): Eliminate.
(get_dev): Ditto.
(get_raw_device_number): Ditto.
(get_device_number): Ditto.
(win32_device_name): Call new device name parser to do most of the heavy
lifting.
(mount_info::conv_to_win32_path): Fill in dev field as appropriate.
(symlink_worker): Handle new device files.
(symlink_info::check): Ditto.
(symlink_info::parse_device): Define new function.
* path.h (executable_states): Move here from fhandler.h.
(fs_info): Rename variables to *_storage and create methods for accessing same.
(path_conv): Add dev element, remove devn and unit and adjust inline methods to
accommodate.
(set_normalized_path): Declare new function.
* pinfo.cc (_pinfo::commune_recv): Add broken support for handling fifos.
(_pinfo::commune_send): Ditto.
* pipe.cc (fhandler_pipe::close): check for existence of handle before closing
it.
(handler_pipe::create): Rename from make_pipe. Change arguments to accept
fhandler_pipe array. Accommodate fifos.
(pipe): Rework to deal with fhandler_pipe::create changes.
(_pipe): Ditto.
* select.cc: Use individual device_specific types throughout rather than
indexing with obsolete device number.
(set_bits): Use is_socket call rather than checking device number.
* shared_info.h (CURR_MOUNT_MAGIC): Update.
(conv_to_win32_path): Reflect addition of device argument.
* syscalls.cc (mknod_worker): New function.
(open): Use build_fh_name to build fhandler.
(chown_worker): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(chmod_device): New function.
(chmod): Detect if this is an 'auto' device rather than an on-filesystem device
and handle appropriately. Use chmod_device to set mode of in-filesystem
devices.
(stat_worker): Eliminate path_conv argument. Call build_fh_name to construct
fhandler. Use fh->error() rather than pc->error to detect errors in fhandler
construction.
(access_worker): New function pulled from access. Accommodate in-filesystem
devices.
(access): Use access_worker.
(fpathconf): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(mknod_worker): New function.
(mknod32): New function.
(chroot): Free normalized path -- assuming it was actually cmalloced.
* tty.cc (create_tty_master): Tweak for new device class.
(tty::common_init): Ditto.
* winsup.h (stat_worker): Remove.
(symlink_worker): Declare.
* exceptions.cc (set_process_mask): Just call sig_dispatch_pending and don't
worry about pending_signals since sig_dispatch_pending should always do the
right thing now.
(sig_handle): Reorganize SIGCONT handling to more closely conform to SUSv3.
* pinfo.h: Move __SIG enum to sigproc.h.
(PICOM_FIFO): New enum element.
(_pinfo): Remove 'thread2signal' stuff throughout class.
(_pinfo::commune_send): Make varargs.
(_pinfo::sigtodo): Eliminate.
(_pinfo::thread2signal): Ditto.
* signal.cc (kill_worker): Eliminate call to setthread2signal.
* sigproc.cc (local_sigtodo): Eliminate.
(getlocal_sigtodo): Ditto.
(sigelem): New class.
(pending_signals): New class.
(sigqueue): New variable, start of sigqueue linked list.
(sigcatch_nonmain): Eliminate.
(sigcatch_main): Eliminate.
(sigcatch_nosync): Eliminate.
(sigcomplete_nonmain): Eliminate.
(pending_signals): Eliminate.
(sig_clear): Call signal thread to clear pending signals, unless already in
signal thread.
(sigpending): Call signal thread to get pending signals.
(sig_dispatch_pending): Eliminate use of pending_signals and just check
sigqueue.
(sigproc_terminate): Eliminate all of the obsolete semaphore stuff. Close
signal pipe handle.
(sig_send): Eliminate all of the obsolete semaphore stuff and use pipe to send
signals.
(getevent): Eliminate.
(pending_signals::add): New function.
(pending_signals::del): New function.
(pending_signals::next): New function.
(wait_sig): Eliminate all of the obsolete semaphore stuff. Use pipe to
communicate and maintain a linked list of signals.
* sigproc.h: Move __SIG defines here. Add __SIGPENDING.
(sig_dispatch_pending): Remove "C" specifier.
(sig_handle): Accept a mask argument.
* thread.cc: Remove signal handling considerations throughout.
2003-09-25 02:37:18 +02:00
|
|
|
|
|
|
|
|
|
ifneq "${filter -O%,$(CFLAGS)}" ""
|
|
|
|
|
cygheap_CFLAGS:=-fomit-frame-pointer
|
2003-10-01 14:36:39 +02:00
|
|
|
|
devices_CFLAGS:=-fomit-frame-pointer -Os
|
* devices.cc: New file.
* devices.gperf: New file.
* devices.shilka: New file.
* cygwin-gperf: New file.
* cygwin-shilka: New file.
* fhandler_fifo.cc: New file.
* fhandler_nodevice.cc : New file. Reorganize headers so that path.h precedes
fhandler.h throughout. Remove device argument and unit arguments from fhandler
constructors throughout. Remove pc arguments to fhandler functions and use
internal pc element instead, throughout. Use dev element in pc throughout.
Use major/minor elements rather than units and device numbers previously in
fhandler class. Use correct methods for fhandler file names rather than
directly accessing file name variables, throughout.
* Makefile.in (DLL_OFILES): Add devices.o, fhandler_fifo.o
* dcrt0.cc (dll_crt0_1): Call device::init.
* devices.h: Renumber devices based on more Linux-like major/minor numbers.
Add more devices. Declare standard device storage.
(device): Declare struct.
* dir.cc (opendir): Use new 'build_fh_name' to construct a fhandler_* type.
* dtable.cc (dtable::get_debugger_info): Ditto.
(cygwin_attach_handle_to_fd): Ditto.
(dtable::release): Remove special FH_SOCKET case in favor of generic
"need_fixup_before" test.
(dtable::init_std_file_from_handle): Use either build_fh_dev or build_fh_name
to build standard fhandler.
(dtable::build_fh_name): Renamed from dtable::build_fhandler_from_name. Move
out of dtable class. Don't accept a path_conv argument. Just build it here
and pass it to:
(build_fh_pc): Renamed from dtable::build_fhandler. Move out of dtable class.
Use intrinsic device type in path_conv to create new fhandler.
(build_fh_dev): Renamed from dtable::build_fhandler. Move out of dtable class.
Simplify arguments to just take new 'device' type and a name. Just return
pointer to fhandler rather than trying to insert into dtable.
(dtable::dup_worker): Accommodate above build_fh name changes.
(dtable::find_fifo): New (currently broken) function.
(handle_to_fn): Use strechr for efficiency.
* dtable.h: Reflect above build_fh name changes and argument differences.
(fhandler_base *&operator []): Return self rather than copy of self.
* fhandler.cc (fhandler_base::operator =): Use pc element to set normalized
path.
(fhandler_base::set_name): Ditto.
(fhandler_base::raw_read): Use method to access name.
(fhandler_base::write): Correctly use get_output_handle rather than get_handle.
(handler_base::device_access_denied): New function.
(fhandler_base::open): Eliminate pc argument and use pc element of
fhandler_base throughout.
(fhandler_base::fstat): Detect if device is based in filesystem and use
fstat_fs to calculate stat, if so.
(fhandler_base::fhandler_base): Eliminate handling of file names and, instead,
just free appropriate component from pc.
(fhandler_base::opendir): Remove path_conv parameter.
* fhandler.h: Remove all device flags.
(fhandler_base::pc): New element.
(fhandler_base::set_name): Change argument to path_conv.
(fhandler_base::error): New function.
(fhandler_base::exists): New function.
(fhandler_base::pc_binmode): New function.
(fhandler_base::dev): New function.
(fhandler_base::open_fs): New function.
(fhandler_base::fstat_fs): New function.
(fhandler_base::fstat_by_name): New function.
(fhandler_base::fstat_by_handle): New function.
(fhandler_base::isfifo): New function.
(fhandler_base::is_slow): New function.
(fhandler_base::is_auto_device): New function.
(fhandler_base::is_fs_special): New function.
(fhandler_base::device_access_denied): New function.
(fhandler_base::operator DWORD&): New operator.
(fhandler_base::get_name): Return normalized path from pc.
(fhandler_base::get_win32_name): Return windows path from pc.
(fhandler_base::isdevice): Renamed from is_device.
(fhandler_base::get_native_name): Return device format.
(fhandler_fifo): New class.
(fhandler_nodevice): New class.
(select_stuff::device_specific): Remove array.
(select_stuff::device_specific_pipe): New class element.
(select_stuff::device_specific_socket): New class element.
(select_stuff::device_specific_serial): New class element.
(select_stuff::select_stuff): Initialize new elements.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Move to base class
from fhandler_disk_file.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_disk_file::open): Move most functionality into
fhandler_base::open_fs.
(fhandler_base::open_fs): New function.
(fhandler_disk_file::close): Move most functionality into
fhandler_base::close_fs.
(fhandler_base::close_fs): New function.
* fhandler_mem.cc (fhandler_dev_mem::open): Use device name in debugging
output.
* fhandler_socket.cc (fhandler_socket::set_connect_secret): Copy standard
urandom device into appropriate place.
(fhandler_socket::accept): Reflect change in fdsock return value.
* fhandler_tty.cc: See "throughouts" above.
* net.cc: Accommodate fdsock change throughout.
(fdsock): Return success or failure, accept fd argument and device argument.
* path.cc (symlink_info::major): New element.
(symlink_info::minor): New element.
(symlink_info::parse_device): Declare new function.
(fs_info::update): Accommodate changes in path_conv class.
(path_conv::fillin): Ditto.
(path_conv::return_and_clear_normalized_path): Eliminate.
(path_conv::set_normalized_path): New function.
(path_conv::path_conv): Set info in dev element. Use path_conv methods Check
for FH_FS rather than FH_BAD to indicate when to fill in filesystem stuff.
where appropriate rather than direct access. Use set_normalized_path to set
normalized path.
(windows_device_names): Eliminate.
(get_dev): Ditto.
(get_raw_device_number): Ditto.
(get_device_number): Ditto.
(win32_device_name): Call new device name parser to do most of the heavy
lifting.
(mount_info::conv_to_win32_path): Fill in dev field as appropriate.
(symlink_worker): Handle new device files.
(symlink_info::check): Ditto.
(symlink_info::parse_device): Define new function.
* path.h (executable_states): Move here from fhandler.h.
(fs_info): Rename variables to *_storage and create methods for accessing same.
(path_conv): Add dev element, remove devn and unit and adjust inline methods to
accommodate.
(set_normalized_path): Declare new function.
* pinfo.cc (_pinfo::commune_recv): Add broken support for handling fifos.
(_pinfo::commune_send): Ditto.
* pipe.cc (fhandler_pipe::close): check for existence of handle before closing
it.
(handler_pipe::create): Rename from make_pipe. Change arguments to accept
fhandler_pipe array. Accommodate fifos.
(pipe): Rework to deal with fhandler_pipe::create changes.
(_pipe): Ditto.
* select.cc: Use individual device_specific types throughout rather than
indexing with obsolete device number.
(set_bits): Use is_socket call rather than checking device number.
* shared_info.h (CURR_MOUNT_MAGIC): Update.
(conv_to_win32_path): Reflect addition of device argument.
* syscalls.cc (mknod_worker): New function.
(open): Use build_fh_name to build fhandler.
(chown_worker): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(chmod_device): New function.
(chmod): Detect if this is an 'auto' device rather than an on-filesystem device
and handle appropriately. Use chmod_device to set mode of in-filesystem
devices.
(stat_worker): Eliminate path_conv argument. Call build_fh_name to construct
fhandler. Use fh->error() rather than pc->error to detect errors in fhandler
construction.
(access_worker): New function pulled from access. Accommodate in-filesystem
devices.
(access): Use access_worker.
(fpathconf): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(mknod_worker): New function.
(mknod32): New function.
(chroot): Free normalized path -- assuming it was actually cmalloced.
* tty.cc (create_tty_master): Tweak for new device class.
(tty::common_init): Ditto.
* winsup.h (stat_worker): Remove.
(symlink_worker): Declare.
* exceptions.cc (set_process_mask): Just call sig_dispatch_pending and don't
worry about pending_signals since sig_dispatch_pending should always do the
right thing now.
(sig_handle): Reorganize SIGCONT handling to more closely conform to SUSv3.
* pinfo.h: Move __SIG enum to sigproc.h.
(PICOM_FIFO): New enum element.
(_pinfo): Remove 'thread2signal' stuff throughout class.
(_pinfo::commune_send): Make varargs.
(_pinfo::sigtodo): Eliminate.
(_pinfo::thread2signal): Ditto.
* signal.cc (kill_worker): Eliminate call to setthread2signal.
* sigproc.cc (local_sigtodo): Eliminate.
(getlocal_sigtodo): Ditto.
(sigelem): New class.
(pending_signals): New class.
(sigqueue): New variable, start of sigqueue linked list.
(sigcatch_nonmain): Eliminate.
(sigcatch_main): Eliminate.
(sigcatch_nosync): Eliminate.
(sigcomplete_nonmain): Eliminate.
(pending_signals): Eliminate.
(sig_clear): Call signal thread to clear pending signals, unless already in
signal thread.
(sigpending): Call signal thread to get pending signals.
(sig_dispatch_pending): Eliminate use of pending_signals and just check
sigqueue.
(sigproc_terminate): Eliminate all of the obsolete semaphore stuff. Close
signal pipe handle.
(sig_send): Eliminate all of the obsolete semaphore stuff and use pipe to send
signals.
(getevent): Eliminate.
(pending_signals::add): New function.
(pending_signals::del): New function.
(pending_signals::next): New function.
(wait_sig): Eliminate all of the obsolete semaphore stuff. Use pipe to
communicate and maintain a linked list of signals.
* sigproc.h: Move __SIG defines here. Add __SIGPENDING.
(sig_dispatch_pending): Remove "C" specifier.
(sig_handle): Accept a mask argument.
* thread.cc: Remove signal handling considerations throughout.
2003-09-25 02:37:18 +02:00
|
|
|
|
malloc_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
malloc_wrapper_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
shared_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
cygthread_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
miscfuncs_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_clipboard_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_console_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_disk_file_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_dsp_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_floppy_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_mem_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_proc_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_process_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_random_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_raw_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_registry_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_serial_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_socket_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_tape_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_termios_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_tty_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_virtual_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_windows_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
fhandler_zero_CFLAGS:=-fomit-frame-pointer
|
|
|
|
|
regcomp_CFLAGS=-fomit-frame-pointer
|
|
|
|
|
regerror_CFLAGS=-fomit-frame-pointer
|
|
|
|
|
regexec_CFLAGS=-fomit-frame-pointer
|
|
|
|
|
regfree_CFLAGS=-fomit-frame-pointer
|
|
|
|
|
endif
|
|
|
|
|
|
2001-07-29 04:33:30 +02:00
|
|
|
|
.PHONY: all force dll_ofiles install all_target install_target all_host install_host \
|
2002-08-25 02:07:10 +02:00
|
|
|
|
install install-libs install-headers -lgcc
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
|
|
.SUFFIXES:
|
2003-03-29 05:20:45 +01:00
|
|
|
|
.SUFFIXES: .c .cc .def .a .o .d .s
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
2000-06-17 19:54:05 +02:00
|
|
|
|
all_host=@all_host@
|
|
|
|
|
install_host=@install_host@
|
|
|
|
|
|
2001-09-15 06:36:43 +02:00
|
|
|
|
all: all_target $(all_host)
|
2000-06-17 19:54:05 +02:00
|
|
|
|
|
2003-07-02 05:16:00 +02:00
|
|
|
|
all_target: $(TARGET_LIBS)
|
2000-06-17 19:54:05 +02:00
|
|
|
|
|
2003-03-09 18:01:41 +01:00
|
|
|
|
all_host: $(TEST_LIB_NAME)
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
|
|
force:
|
|
|
|
|
|
2002-03-03 22:46:38 +01:00
|
|
|
|
install: install-libs install-headers install-man install_target \
|
2002-02-28 15:30:38 +01:00
|
|
|
|
$(install_host) $(install_target)
|
2001-07-29 04:33:30 +02:00
|
|
|
|
|
2002-05-18 08:10:16 +02:00
|
|
|
|
uninstall: uninstall-libs uninstall-headers uninstall-man
|
2002-01-08 05:51:01 +01:00
|
|
|
|
|
2001-12-31 04:19:29 +01:00
|
|
|
|
install-libs: $(TARGET_LIBS)
|
2003-06-25 21:12:01 +02:00
|
|
|
|
$(INSTALL_PROGRAM) $(TEST_DLL_NAME) $(bindir)/$(DLL_NAME); \
|
2001-12-31 04:19:29 +01:00
|
|
|
|
for i in $^; do \
|
2001-12-31 07:24:15 +01:00
|
|
|
|
$(INSTALL_DATA) $$i $(tooldir)/lib/`basename $$i` ; \
|
2001-07-29 04:33:30 +02:00
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
install-headers:
|
2000-02-17 20:38:33 +01:00
|
|
|
|
cd $(srcdir); \
|
|
|
|
|
for sub in `find include -name '[a-z]*' -type d -print | sort`; do \
|
|
|
|
|
for i in $$sub/*.h ; do \
|
|
|
|
|
$(INSTALL_DATA) $$i $(tooldir)/$$sub/`basename $$i` ; \
|
|
|
|
|
done ; \
|
2000-04-26 20:19:22 +02:00
|
|
|
|
done ; \
|
2001-12-20 03:55:11 +01:00
|
|
|
|
$(INSTALL_DATA) regex/regex.h $(tooldir)/include/regex.h
|
|
|
|
|
|
|
|
|
|
install-man:
|
|
|
|
|
cd $(srcdir); \
|
|
|
|
|
for i in `find . -type f -name '*.2'`; do \
|
|
|
|
|
$(INSTALL_DATA) $$i $(tooldir)/man/man2/`basename $$i` ; \
|
|
|
|
|
done; \
|
|
|
|
|
for i in `find . -type f -name '*.3'`; do \
|
|
|
|
|
$(INSTALL_DATA) $$i $(tooldir)/man/man3/`basename $$i` ; \
|
|
|
|
|
done; \
|
|
|
|
|
for i in `find . -type f -name '*.5'`; do \
|
|
|
|
|
$(INSTALL_DATA) $$i $(tooldir)/man/man5/`basename $$i` ; \
|
|
|
|
|
done; \
|
|
|
|
|
for i in `find . -type f -name '*.7'`; do \
|
|
|
|
|
$(INSTALL_DATA) $$i $(tooldir)/man/man7/`basename $$i` ; \
|
|
|
|
|
done
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
2003-07-02 05:16:00 +02:00
|
|
|
|
install_target:
|
2002-09-22 02:46:24 +02:00
|
|
|
|
|
2000-06-17 19:54:05 +02:00
|
|
|
|
install_host:
|
|
|
|
|
|
2002-01-08 05:51:01 +01:00
|
|
|
|
uninstall-libs: $(TARGET_LIBS)
|
|
|
|
|
rm -f $(bindir)/$(DLL_NAME); \
|
|
|
|
|
for i in $^; do \
|
|
|
|
|
rm -f $(tooldir)/lib/$$i ; \
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
uninstall-headers:
|
|
|
|
|
cd $(srcdir); \
|
|
|
|
|
for sub in `find include -name '[a-z]*' -type d -print | sort`; do \
|
|
|
|
|
for i in $$sub/*.h ; do \
|
|
|
|
|
rm -f $(tooldir)/$$sub/`basename $$i` ; \
|
|
|
|
|
done ; \
|
|
|
|
|
done ; \
|
|
|
|
|
rm -f $(tooldir)/include/regex.h
|
|
|
|
|
|
|
|
|
|
uninstall-man:
|
|
|
|
|
cd $(srcdir); \
|
|
|
|
|
for i in `find . -type f -name '*.2'`; do \
|
|
|
|
|
rm -f $(tooldir)/man/man2/`basename $$i` ; \
|
|
|
|
|
done; \
|
|
|
|
|
for i in `find . -type f -name '*.3'`; do \
|
|
|
|
|
rm -f $(tooldir)/man/man3/`basename $$i` ; \
|
|
|
|
|
done; \
|
|
|
|
|
for i in `find . -type f -name '*.5'`; do \
|
|
|
|
|
rm -f $(tooldir)/man/man5/`basename $$i` ; \
|
|
|
|
|
done; \
|
|
|
|
|
for i in `find . -type f -name '*.7'`; do \
|
|
|
|
|
rm -f $(tooldir)/man/man7/`basename $$i` ; \
|
|
|
|
|
done
|
|
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
|
clean:
|
2001-12-26 06:02:07 +01:00
|
|
|
|
-rm -f *.o *.dll *.a *.exp junk *.base version.cc regexp/*.o winver_stamp *.exe *.d *stamp* *_magic.h
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
|
|
maintainer-clean realclean: clean
|
|
|
|
|
@echo "This command is intended for maintainers to use;"
|
|
|
|
|
@echo "it deletes files that may require special tools to rebuild."
|
|
|
|
|
-rm -fr configure
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Rule to build cygwin.dll
|
2003-11-28 21:55:59 +01:00
|
|
|
|
$(TEST_DLL_NAME): $(LDSCRIPT) $(DLL_OFILES) $(DLL_IMPORTS) $(LIBSERVER) $(LIBC) $(LIBM) $(API_VER) Makefile winver_stamp
|
2003-04-19 03:03:16 +02:00
|
|
|
|
$(CXX) $(CXXFLAGS) $(nostdlib) -Wl,-T$(firstword $^) -Wl,--out-implib,cygdll.a -shared -o $@ \
|
2001-08-31 07:06:14 +02:00
|
|
|
|
-e $(DLL_ENTRY) $(DEF_FILE) $(DLL_OFILES) version.o winver.o \
|
2003-08-25 20:21:07 +02:00
|
|
|
|
$(MALLOC_OBJ) $(LIBSERVER) $(LIBM) $(LIBC) \
|
2002-10-10 07:23:23 +02:00
|
|
|
|
-lgcc $(DLL_IMPORTS)
|
2003-03-09 18:01:41 +01:00
|
|
|
|
@ln -f $@ new-$(DLL_NAME)
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
2001-12-20 03:55:11 +01:00
|
|
|
|
# Rule to build libcygwin.a
|
2003-03-09 18:01:41 +01:00
|
|
|
|
$(LIB_NAME): rmsym newsym $(TEST_DLL_NAME) $(LIBCOS)
|
2003-07-07 07:30:33 +02:00
|
|
|
|
/bin/sh ${word 1,$^} ./cygdll.a "$(NM)" "$(AR)" $(OBSOLETE_FUNCTIONS) || exit 0
|
|
|
|
|
/bin/sh ${word 2,$^} ./cygdll.a "$(AS)" "$(AR)" $(NEW_FUNCTIONS) || exit 0
|
2001-12-20 03:55:11 +01:00
|
|
|
|
(echo create $(LIB_NAME); echo addmod $(LIBCOS); echo addlib cygdll.a; echo save) | $(AR) -M
|
2003-03-09 18:01:41 +01:00
|
|
|
|
$(RANLIB) $@
|
2001-09-25 00:49:12 +02:00
|
|
|
|
|
2001-12-20 03:55:11 +01:00
|
|
|
|
# Rule to make stub library used by testsuite
|
|
|
|
|
# dependency set to $(LIB_NAME) to accommodate make -j2.
|
|
|
|
|
# Otherwise dlltool gets confused. cgf (11-16-2000)
|
2003-03-09 18:01:41 +01:00
|
|
|
|
$(TEST_LIB_NAME): $(LIB_NAME)
|
|
|
|
|
perl -p -e 'BEGIN{binmode(STDIN); binmode(STDOUT);}; s/cygwin1/cygwin0/g' < $? > $@
|
2001-09-30 23:10:38 +02:00
|
|
|
|
|
2003-10-22 12:07:59 +02:00
|
|
|
|
$(LIBSERVER): $(bupdir)/cygserver/Makefile
|
|
|
|
|
$(MAKE) -C $(bupdir)/cygserver libcygserver.a
|
|
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
|
dll_ofiles: $(DLL_OFILES)
|
|
|
|
|
|
|
|
|
|
$(LIBGMON_A): $(GMON_OFILES) $(GMON_START)
|
|
|
|
|
$(AR) rcv $(LIBGMON_A) $(GMON_OFILES)
|
|
|
|
|
|
2002-07-25 11:09:34 +02:00
|
|
|
|
$(API_VER): $(srcdir)/cygwin.din
|
2003-11-28 23:13:57 +01:00
|
|
|
|
@echo Error: Version info is older than DLL API!;\
|
|
|
|
|
false
|
2002-07-25 11:09:34 +02:00
|
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
|
version.cc winver.o: winver_stamp
|
|
|
|
|
@ :
|
|
|
|
|
|
2001-12-26 05:53:34 +01:00
|
|
|
|
shared_info_magic.h: cygmagic shared_info.h
|
2003-09-25 06:03:53 +02:00
|
|
|
|
/bin/sh ${word 1,$^} $@ "$(CC) -x c" ${word 2,$^} USER_MAGIC 'class user_info' SHARED_MAGIC 'class shared_info'
|
2001-12-26 05:53:34 +01:00
|
|
|
|
|
|
|
|
|
child_info_magic.h: cygmagic child_info.h
|
2002-06-07 01:53:45 +02:00
|
|
|
|
/bin/sh ${word 1,$^} $@ "$(CC) -x c" ${word 2,$^} CHILD_INFO_MAGIC 'class child_info'
|
2001-12-26 05:53:34 +01:00
|
|
|
|
|
|
|
|
|
dcrt0.o sigproc.o: child_info_magic.h
|
|
|
|
|
|
|
|
|
|
shared.o: shared_info_magic.h
|
|
|
|
|
|
2003-09-27 07:35:02 +02:00
|
|
|
|
$(srcdir)/qevices.cc: cygwin-gperf devices.gperf devices.h
|
* devices.cc: New file.
* devices.gperf: New file.
* devices.shilka: New file.
* cygwin-gperf: New file.
* cygwin-shilka: New file.
* fhandler_fifo.cc: New file.
* fhandler_nodevice.cc : New file. Reorganize headers so that path.h precedes
fhandler.h throughout. Remove device argument and unit arguments from fhandler
constructors throughout. Remove pc arguments to fhandler functions and use
internal pc element instead, throughout. Use dev element in pc throughout.
Use major/minor elements rather than units and device numbers previously in
fhandler class. Use correct methods for fhandler file names rather than
directly accessing file name variables, throughout.
* Makefile.in (DLL_OFILES): Add devices.o, fhandler_fifo.o
* dcrt0.cc (dll_crt0_1): Call device::init.
* devices.h: Renumber devices based on more Linux-like major/minor numbers.
Add more devices. Declare standard device storage.
(device): Declare struct.
* dir.cc (opendir): Use new 'build_fh_name' to construct a fhandler_* type.
* dtable.cc (dtable::get_debugger_info): Ditto.
(cygwin_attach_handle_to_fd): Ditto.
(dtable::release): Remove special FH_SOCKET case in favor of generic
"need_fixup_before" test.
(dtable::init_std_file_from_handle): Use either build_fh_dev or build_fh_name
to build standard fhandler.
(dtable::build_fh_name): Renamed from dtable::build_fhandler_from_name. Move
out of dtable class. Don't accept a path_conv argument. Just build it here
and pass it to:
(build_fh_pc): Renamed from dtable::build_fhandler. Move out of dtable class.
Use intrinsic device type in path_conv to create new fhandler.
(build_fh_dev): Renamed from dtable::build_fhandler. Move out of dtable class.
Simplify arguments to just take new 'device' type and a name. Just return
pointer to fhandler rather than trying to insert into dtable.
(dtable::dup_worker): Accommodate above build_fh name changes.
(dtable::find_fifo): New (currently broken) function.
(handle_to_fn): Use strechr for efficiency.
* dtable.h: Reflect above build_fh name changes and argument differences.
(fhandler_base *&operator []): Return self rather than copy of self.
* fhandler.cc (fhandler_base::operator =): Use pc element to set normalized
path.
(fhandler_base::set_name): Ditto.
(fhandler_base::raw_read): Use method to access name.
(fhandler_base::write): Correctly use get_output_handle rather than get_handle.
(handler_base::device_access_denied): New function.
(fhandler_base::open): Eliminate pc argument and use pc element of
fhandler_base throughout.
(fhandler_base::fstat): Detect if device is based in filesystem and use
fstat_fs to calculate stat, if so.
(fhandler_base::fhandler_base): Eliminate handling of file names and, instead,
just free appropriate component from pc.
(fhandler_base::opendir): Remove path_conv parameter.
* fhandler.h: Remove all device flags.
(fhandler_base::pc): New element.
(fhandler_base::set_name): Change argument to path_conv.
(fhandler_base::error): New function.
(fhandler_base::exists): New function.
(fhandler_base::pc_binmode): New function.
(fhandler_base::dev): New function.
(fhandler_base::open_fs): New function.
(fhandler_base::fstat_fs): New function.
(fhandler_base::fstat_by_name): New function.
(fhandler_base::fstat_by_handle): New function.
(fhandler_base::isfifo): New function.
(fhandler_base::is_slow): New function.
(fhandler_base::is_auto_device): New function.
(fhandler_base::is_fs_special): New function.
(fhandler_base::device_access_denied): New function.
(fhandler_base::operator DWORD&): New operator.
(fhandler_base::get_name): Return normalized path from pc.
(fhandler_base::get_win32_name): Return windows path from pc.
(fhandler_base::isdevice): Renamed from is_device.
(fhandler_base::get_native_name): Return device format.
(fhandler_fifo): New class.
(fhandler_nodevice): New class.
(select_stuff::device_specific): Remove array.
(select_stuff::device_specific_pipe): New class element.
(select_stuff::device_specific_socket): New class element.
(select_stuff::device_specific_serial): New class element.
(select_stuff::select_stuff): Initialize new elements.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Move to base class
from fhandler_disk_file.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_disk_file::open): Move most functionality into
fhandler_base::open_fs.
(fhandler_base::open_fs): New function.
(fhandler_disk_file::close): Move most functionality into
fhandler_base::close_fs.
(fhandler_base::close_fs): New function.
* fhandler_mem.cc (fhandler_dev_mem::open): Use device name in debugging
output.
* fhandler_socket.cc (fhandler_socket::set_connect_secret): Copy standard
urandom device into appropriate place.
(fhandler_socket::accept): Reflect change in fdsock return value.
* fhandler_tty.cc: See "throughouts" above.
* net.cc: Accommodate fdsock change throughout.
(fdsock): Return success or failure, accept fd argument and device argument.
* path.cc (symlink_info::major): New element.
(symlink_info::minor): New element.
(symlink_info::parse_device): Declare new function.
(fs_info::update): Accommodate changes in path_conv class.
(path_conv::fillin): Ditto.
(path_conv::return_and_clear_normalized_path): Eliminate.
(path_conv::set_normalized_path): New function.
(path_conv::path_conv): Set info in dev element. Use path_conv methods Check
for FH_FS rather than FH_BAD to indicate when to fill in filesystem stuff.
where appropriate rather than direct access. Use set_normalized_path to set
normalized path.
(windows_device_names): Eliminate.
(get_dev): Ditto.
(get_raw_device_number): Ditto.
(get_device_number): Ditto.
(win32_device_name): Call new device name parser to do most of the heavy
lifting.
(mount_info::conv_to_win32_path): Fill in dev field as appropriate.
(symlink_worker): Handle new device files.
(symlink_info::check): Ditto.
(symlink_info::parse_device): Define new function.
* path.h (executable_states): Move here from fhandler.h.
(fs_info): Rename variables to *_storage and create methods for accessing same.
(path_conv): Add dev element, remove devn and unit and adjust inline methods to
accommodate.
(set_normalized_path): Declare new function.
* pinfo.cc (_pinfo::commune_recv): Add broken support for handling fifos.
(_pinfo::commune_send): Ditto.
* pipe.cc (fhandler_pipe::close): check for existence of handle before closing
it.
(handler_pipe::create): Rename from make_pipe. Change arguments to accept
fhandler_pipe array. Accommodate fifos.
(pipe): Rework to deal with fhandler_pipe::create changes.
(_pipe): Ditto.
* select.cc: Use individual device_specific types throughout rather than
indexing with obsolete device number.
(set_bits): Use is_socket call rather than checking device number.
* shared_info.h (CURR_MOUNT_MAGIC): Update.
(conv_to_win32_path): Reflect addition of device argument.
* syscalls.cc (mknod_worker): New function.
(open): Use build_fh_name to build fhandler.
(chown_worker): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(chmod_device): New function.
(chmod): Detect if this is an 'auto' device rather than an on-filesystem device
and handle appropriately. Use chmod_device to set mode of in-filesystem
devices.
(stat_worker): Eliminate path_conv argument. Call build_fh_name to construct
fhandler. Use fh->error() rather than pc->error to detect errors in fhandler
construction.
(access_worker): New function pulled from access. Accommodate in-filesystem
devices.
(access): Use access_worker.
(fpathconf): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(mknod_worker): New function.
(mknod32): New function.
(chroot): Free normalized path -- assuming it was actually cmalloced.
* tty.cc (create_tty_master): Tweak for new device class.
(tty::common_init): Ditto.
* winsup.h (stat_worker): Remove.
(symlink_worker): Declare.
* exceptions.cc (set_process_mask): Just call sig_dispatch_pending and don't
worry about pending_signals since sig_dispatch_pending should always do the
right thing now.
(sig_handle): Reorganize SIGCONT handling to more closely conform to SUSv3.
* pinfo.h: Move __SIG enum to sigproc.h.
(PICOM_FIFO): New enum element.
(_pinfo): Remove 'thread2signal' stuff throughout class.
(_pinfo::commune_send): Make varargs.
(_pinfo::sigtodo): Eliminate.
(_pinfo::thread2signal): Ditto.
* signal.cc (kill_worker): Eliminate call to setthread2signal.
* sigproc.cc (local_sigtodo): Eliminate.
(getlocal_sigtodo): Ditto.
(sigelem): New class.
(pending_signals): New class.
(sigqueue): New variable, start of sigqueue linked list.
(sigcatch_nonmain): Eliminate.
(sigcatch_main): Eliminate.
(sigcatch_nosync): Eliminate.
(sigcomplete_nonmain): Eliminate.
(pending_signals): Eliminate.
(sig_clear): Call signal thread to clear pending signals, unless already in
signal thread.
(sigpending): Call signal thread to get pending signals.
(sig_dispatch_pending): Eliminate use of pending_signals and just check
sigqueue.
(sigproc_terminate): Eliminate all of the obsolete semaphore stuff. Close
signal pipe handle.
(sig_send): Eliminate all of the obsolete semaphore stuff and use pipe to send
signals.
(getevent): Eliminate.
(pending_signals::add): New function.
(pending_signals::del): New function.
(pending_signals::next): New function.
(wait_sig): Eliminate all of the obsolete semaphore stuff. Use pipe to
communicate and maintain a linked list of signals.
* sigproc.h: Move __SIG defines here. Add __SIGPENDING.
(sig_dispatch_pending): Remove "C" specifier.
(sig_handle): Accept a mask argument.
* thread.cc: Remove signal handling considerations throughout.
2003-09-25 02:37:18 +02:00
|
|
|
|
$^ > $@
|
|
|
|
|
|
2003-10-01 14:36:39 +02:00
|
|
|
|
$(srcdir)/devices.cc: gendevices devices.in devices.h
|
* devices.cc: New file.
* devices.gperf: New file.
* devices.shilka: New file.
* cygwin-gperf: New file.
* cygwin-shilka: New file.
* fhandler_fifo.cc: New file.
* fhandler_nodevice.cc : New file. Reorganize headers so that path.h precedes
fhandler.h throughout. Remove device argument and unit arguments from fhandler
constructors throughout. Remove pc arguments to fhandler functions and use
internal pc element instead, throughout. Use dev element in pc throughout.
Use major/minor elements rather than units and device numbers previously in
fhandler class. Use correct methods for fhandler file names rather than
directly accessing file name variables, throughout.
* Makefile.in (DLL_OFILES): Add devices.o, fhandler_fifo.o
* dcrt0.cc (dll_crt0_1): Call device::init.
* devices.h: Renumber devices based on more Linux-like major/minor numbers.
Add more devices. Declare standard device storage.
(device): Declare struct.
* dir.cc (opendir): Use new 'build_fh_name' to construct a fhandler_* type.
* dtable.cc (dtable::get_debugger_info): Ditto.
(cygwin_attach_handle_to_fd): Ditto.
(dtable::release): Remove special FH_SOCKET case in favor of generic
"need_fixup_before" test.
(dtable::init_std_file_from_handle): Use either build_fh_dev or build_fh_name
to build standard fhandler.
(dtable::build_fh_name): Renamed from dtable::build_fhandler_from_name. Move
out of dtable class. Don't accept a path_conv argument. Just build it here
and pass it to:
(build_fh_pc): Renamed from dtable::build_fhandler. Move out of dtable class.
Use intrinsic device type in path_conv to create new fhandler.
(build_fh_dev): Renamed from dtable::build_fhandler. Move out of dtable class.
Simplify arguments to just take new 'device' type and a name. Just return
pointer to fhandler rather than trying to insert into dtable.
(dtable::dup_worker): Accommodate above build_fh name changes.
(dtable::find_fifo): New (currently broken) function.
(handle_to_fn): Use strechr for efficiency.
* dtable.h: Reflect above build_fh name changes and argument differences.
(fhandler_base *&operator []): Return self rather than copy of self.
* fhandler.cc (fhandler_base::operator =): Use pc element to set normalized
path.
(fhandler_base::set_name): Ditto.
(fhandler_base::raw_read): Use method to access name.
(fhandler_base::write): Correctly use get_output_handle rather than get_handle.
(handler_base::device_access_denied): New function.
(fhandler_base::open): Eliminate pc argument and use pc element of
fhandler_base throughout.
(fhandler_base::fstat): Detect if device is based in filesystem and use
fstat_fs to calculate stat, if so.
(fhandler_base::fhandler_base): Eliminate handling of file names and, instead,
just free appropriate component from pc.
(fhandler_base::opendir): Remove path_conv parameter.
* fhandler.h: Remove all device flags.
(fhandler_base::pc): New element.
(fhandler_base::set_name): Change argument to path_conv.
(fhandler_base::error): New function.
(fhandler_base::exists): New function.
(fhandler_base::pc_binmode): New function.
(fhandler_base::dev): New function.
(fhandler_base::open_fs): New function.
(fhandler_base::fstat_fs): New function.
(fhandler_base::fstat_by_name): New function.
(fhandler_base::fstat_by_handle): New function.
(fhandler_base::isfifo): New function.
(fhandler_base::is_slow): New function.
(fhandler_base::is_auto_device): New function.
(fhandler_base::is_fs_special): New function.
(fhandler_base::device_access_denied): New function.
(fhandler_base::operator DWORD&): New operator.
(fhandler_base::get_name): Return normalized path from pc.
(fhandler_base::get_win32_name): Return windows path from pc.
(fhandler_base::isdevice): Renamed from is_device.
(fhandler_base::get_native_name): Return device format.
(fhandler_fifo): New class.
(fhandler_nodevice): New class.
(select_stuff::device_specific): Remove array.
(select_stuff::device_specific_pipe): New class element.
(select_stuff::device_specific_socket): New class element.
(select_stuff::device_specific_serial): New class element.
(select_stuff::select_stuff): Initialize new elements.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Move to base class
from fhandler_disk_file.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_disk_file::open): Move most functionality into
fhandler_base::open_fs.
(fhandler_base::open_fs): New function.
(fhandler_disk_file::close): Move most functionality into
fhandler_base::close_fs.
(fhandler_base::close_fs): New function.
* fhandler_mem.cc (fhandler_dev_mem::open): Use device name in debugging
output.
* fhandler_socket.cc (fhandler_socket::set_connect_secret): Copy standard
urandom device into appropriate place.
(fhandler_socket::accept): Reflect change in fdsock return value.
* fhandler_tty.cc: See "throughouts" above.
* net.cc: Accommodate fdsock change throughout.
(fdsock): Return success or failure, accept fd argument and device argument.
* path.cc (symlink_info::major): New element.
(symlink_info::minor): New element.
(symlink_info::parse_device): Declare new function.
(fs_info::update): Accommodate changes in path_conv class.
(path_conv::fillin): Ditto.
(path_conv::return_and_clear_normalized_path): Eliminate.
(path_conv::set_normalized_path): New function.
(path_conv::path_conv): Set info in dev element. Use path_conv methods Check
for FH_FS rather than FH_BAD to indicate when to fill in filesystem stuff.
where appropriate rather than direct access. Use set_normalized_path to set
normalized path.
(windows_device_names): Eliminate.
(get_dev): Ditto.
(get_raw_device_number): Ditto.
(get_device_number): Ditto.
(win32_device_name): Call new device name parser to do most of the heavy
lifting.
(mount_info::conv_to_win32_path): Fill in dev field as appropriate.
(symlink_worker): Handle new device files.
(symlink_info::check): Ditto.
(symlink_info::parse_device): Define new function.
* path.h (executable_states): Move here from fhandler.h.
(fs_info): Rename variables to *_storage and create methods for accessing same.
(path_conv): Add dev element, remove devn and unit and adjust inline methods to
accommodate.
(set_normalized_path): Declare new function.
* pinfo.cc (_pinfo::commune_recv): Add broken support for handling fifos.
(_pinfo::commune_send): Ditto.
* pipe.cc (fhandler_pipe::close): check for existence of handle before closing
it.
(handler_pipe::create): Rename from make_pipe. Change arguments to accept
fhandler_pipe array. Accommodate fifos.
(pipe): Rework to deal with fhandler_pipe::create changes.
(_pipe): Ditto.
* select.cc: Use individual device_specific types throughout rather than
indexing with obsolete device number.
(set_bits): Use is_socket call rather than checking device number.
* shared_info.h (CURR_MOUNT_MAGIC): Update.
(conv_to_win32_path): Reflect addition of device argument.
* syscalls.cc (mknod_worker): New function.
(open): Use build_fh_name to build fhandler.
(chown_worker): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(chmod_device): New function.
(chmod): Detect if this is an 'auto' device rather than an on-filesystem device
and handle appropriately. Use chmod_device to set mode of in-filesystem
devices.
(stat_worker): Eliminate path_conv argument. Call build_fh_name to construct
fhandler. Use fh->error() rather than pc->error to detect errors in fhandler
construction.
(access_worker): New function pulled from access. Accommodate in-filesystem
devices.
(access): Use access_worker.
(fpathconf): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(mknod_worker): New function.
(mknod32): New function.
(chroot): Free normalized path -- assuming it was actually cmalloced.
* tty.cc (create_tty_master): Tweak for new device class.
(tty::common_init): Ditto.
* winsup.h (stat_worker): Remove.
(symlink_worker): Declare.
* exceptions.cc (set_process_mask): Just call sig_dispatch_pending and don't
worry about pending_signals since sig_dispatch_pending should always do the
right thing now.
(sig_handle): Reorganize SIGCONT handling to more closely conform to SUSv3.
* pinfo.h: Move __SIG enum to sigproc.h.
(PICOM_FIFO): New enum element.
(_pinfo): Remove 'thread2signal' stuff throughout class.
(_pinfo::commune_send): Make varargs.
(_pinfo::sigtodo): Eliminate.
(_pinfo::thread2signal): Ditto.
* signal.cc (kill_worker): Eliminate call to setthread2signal.
* sigproc.cc (local_sigtodo): Eliminate.
(getlocal_sigtodo): Ditto.
(sigelem): New class.
(pending_signals): New class.
(sigqueue): New variable, start of sigqueue linked list.
(sigcatch_nonmain): Eliminate.
(sigcatch_main): Eliminate.
(sigcatch_nosync): Eliminate.
(sigcomplete_nonmain): Eliminate.
(pending_signals): Eliminate.
(sig_clear): Call signal thread to clear pending signals, unless already in
signal thread.
(sigpending): Call signal thread to get pending signals.
(sig_dispatch_pending): Eliminate use of pending_signals and just check
sigqueue.
(sigproc_terminate): Eliminate all of the obsolete semaphore stuff. Close
signal pipe handle.
(sig_send): Eliminate all of the obsolete semaphore stuff and use pipe to send
signals.
(getevent): Eliminate.
(pending_signals::add): New function.
(pending_signals::del): New function.
(pending_signals::next): New function.
(wait_sig): Eliminate all of the obsolete semaphore stuff. Use pipe to
communicate and maintain a linked list of signals.
* sigproc.h: Move __SIG defines here. Add __SIGPENDING.
(sig_dispatch_pending): Remove "C" specifier.
(sig_handle): Accept a mask argument.
* thread.cc: Remove signal handling considerations throughout.
2003-09-25 02:37:18 +02:00
|
|
|
|
${wordlist 1,2,$^} $@
|
|
|
|
|
|
2003-08-06 03:40:12 +02:00
|
|
|
|
$(PWD)/libpthread.a: speclib $(LIB_NAME) pthread.o thread.o
|
|
|
|
|
/bin/sh ${word 1, $^} $@ "${NM}" "$(AR)" ${wordlist 2, 99, $^}
|
2001-12-31 04:19:29 +01:00
|
|
|
|
|
2003-08-06 03:40:12 +02:00
|
|
|
|
$(PWD)/libm.a: speclib $(LIB_NAME) $(LIBM)
|
|
|
|
|
/bin/sh ${word 1, $^} $@ "${NM}" "$(AR)" ${wordlist 2, 99, $^}
|
2001-12-31 04:19:29 +01:00
|
|
|
|
|
2003-08-06 03:40:12 +02:00
|
|
|
|
$(PWD)/libc.a: speclib $(LIB_NAME) $(PWD)/libm.a libpthread.a
|
|
|
|
|
/bin/sh ${word 1, $^} -v $@ "${NM}" "$(AR)" ${wordlist 2, 99, $^}
|
2001-12-31 04:19:29 +01:00
|
|
|
|
|
|
|
|
|
lib%.a: %.o
|
|
|
|
|
$(AR) cru $@ $?
|
|
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
|
winver_stamp: mkvers.sh include/cygwin/version.h winver.rc $(DLL_OFILES)
|
|
|
|
|
@echo "Making version.o and winver.o";\
|
2000-06-21 02:47:06 +02:00
|
|
|
|
$(SHELL) ${word 1,$^} ${word 2,$^} ${word 3,$^} $(WINDRES) && \
|
2001-09-27 23:35:16 +02:00
|
|
|
|
$(COMPILE_CXX) -o version.o version.cc && \
|
|
|
|
|
touch $@
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
2002-08-25 02:07:10 +02:00
|
|
|
|
-lgcc:
|
2002-08-26 06:30:11 +02:00
|
|
|
|
:
|
2002-08-25 02:07:10 +02:00
|
|
|
|
|
2002-02-28 15:30:38 +01:00
|
|
|
|
#
|
|
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
|
Makefile: cygwin.din
|
|
|
|
|
|
2003-11-28 21:55:59 +01:00
|
|
|
|
$(DEF_FILE): gendef cygwin.din $(srcdir)/tlsoffsets.h
|
|
|
|
|
$^ $@ sigfe.s
|
|
|
|
|
|
|
|
|
|
$(srcdir)/tlsoffsets.h: gentls_offsets cygtls.h
|
|
|
|
|
$^ $@ $(COMPILE_CXX)
|
|
|
|
|
|
|
|
|
|
sigfe.s: $(DEF_FILE)
|
|
|
|
|
@touch $@
|
|
|
|
|
|
|
|
|
|
sigfe.o: sigfe.s
|
|
|
|
|
$(CC) -c -o $@ $?
|
2000-06-22 23:51:48 +02:00
|
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
|
winsup.h: config.h
|
2000-08-22 07:10:20 +02:00
|
|
|
|
|
2000-12-15 23:25:51 +01:00
|
|
|
|
deps:=${wildcard *.d}
|
|
|
|
|
ifneq (,$(deps))
|
|
|
|
|
include $(deps)
|
2000-08-22 17:25:25 +02:00
|
|
|
|
endif
|