]> sourceware.org Git - newlib-cygwin.git/log
newlib-cygwin.git
22 years agoMore GNUify non-GNU formatted functions calls throughout.
Christopher Faylor [Mon, 23 Sep 2002 00:31:31 +0000 (00:31 +0000)]
More GNUify non-GNU formatted functions calls throughout.

22 years agoReset ChangeLog dates from cygwin_daemon merge.
Christopher Faylor [Sun, 22 Sep 2002 21:44:17 +0000 (21:44 +0000)]
Reset ChangeLog dates from cygwin_daemon merge.

22 years agowhite space.
Christopher Faylor [Sun, 22 Sep 2002 21:39:03 +0000 (21:39 +0000)]
white space.

22 years ago* Makefile.in (DLL_O_FILES): Restore formatting.
Christopher Faylor [Sun, 22 Sep 2002 16:33:36 +0000 (16:33 +0000)]
* Makefile.in (DLL_O_FILES): Restore formatting.

22 years ago2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
Conrad Scott [Sun, 22 Sep 2002 12:04:15 +0000 (12:04 +0000)]
2002-09-22  Conrad Scott  <conrad.scott@dsl.pipex.com>

GNUify non-GNU formatted functions calls throughout.

2002-09-22  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_shm.cc (with_strerr): Remove macro.
(server_shmmgr::segment_t::~segment_t): Remove calls to with_strerr.
(server_shmmgr::segment_t::attach): Ditto.
(server_shmmgr::new_segment): Ditto.
* shm.cc (with_strerr): Remove macro.
(client_shmmgr::shmdt): Remove calls to with_strerr.
(client_shmmgr::attach): Ditto.

2002-09-21  Conrad Scott  <conrad.scott@dsl.pipex.com>

* include/sys/ipc.h: Move to "include/cygwin/ipc.h".
* include/sys/msg.h: Move to "include/cygwin/msg.h".
* include/sys/sem.h: Move to "include/cygwin/sem.h".
* include/sys/shm.h: Move to "include/cygwin/shm.h".
* include/cygwin/ipc.h: New file.
* include/cygwin/msg.h: Ditto.
* include/cygwin/sem.h: Ditto.
* include/cygwin/shm.h: Ditto.
* cygserver_shm.h: Update includes.
* msg.cc: Ditto.
* sem.cc: Ditto.

2002-09-21  Conrad Scott  <conrad.scott@dsl.pipex.com>

* safe_memory.h (safe_delete): Make a templated function.
* cygserver.cc (~server_request): Update use of safe_delete.
(main): Ditto.
* cygserver_client.cc (client_request::handle_request): Ditto.
(client_request::make_request): Ditto.
* cygserver_process.cc (~process_cleanup): Ditto.
(process::remove): Ditto.
(process::cleanup): Ditto.
(process_cache::process): Ditto.
* cygserver_shm.cc (server_shmmgr::segment_t::detach): Ditto.
(server_shmmgr::delete_segment): Ditto.
* shm.cc (client_shmmgr::shmdt): Ditto.
* threaded_queue.cc (~threaded_queue): Ditto.
(threaded_queue::worker_loop): Ditto.

2002-08-29  Conrad Scott  <conrad.scott@dsl.pipex.com>

* safe_memory.h: Replace #include <new> with an explicit
definition of the placement new operator.
(safe_delete): Remove unnecessary ## operator.

2002-07-28  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_shm.cc (class server_shmmgr): Remove `cleanup_t'
friend declaration.
(cleanup_t::cleanup_t): Use the segment's shmid as the key rather
than the segment pointer itself.
(cleanup_t::segptr): Remove method.
(cleanup_t::shmid): New method.
(cleanup_t::cleanup): Update for new key value.
(server_shmmgr::find (segment_t *)): Remove method.
* include/cygwin/cygserver_process.h (cleanup_routine::key): Make
method const.

2002-07-27  Conrad Scott  <conrad.scott@dsl.pipex.com>

* include/cygwin/cygserver_process.h
(cleanup_routine::_key): New field.
(cleanup_routine::cleanup_routine): Initialise new field with new
argument.
(cleanup_routine::operator==): New method.
(cleanup_routine::key): New method.
(cleanup_routine::cleanup): Make argument non-const.
(process::is_active): New method.
(process::remove): Ditto.
(process::check_exit_code): Rename method.
* cygserver_process.cc (process::add): Reorganize code.
(process::remove): New method.
(process::check_exit_code): Rename method.
(process::cleanup): Use new `process::is_active' method.
(process_cache::process): Ditto.
(process_cache::sync_wait_array): Ditto.
(process_cache::check_and_remove_process): Ditto.
* cygserver_shm.cc (server_shmmgr): Make `cleanup_t' a friend.
(segment_t::detach): Make argument non-const.  Remove cleanup
object from client if appropriate.
(cleanup_t::_segptr): Remove field.
(cleanup_t::cleanup_t): Initialise parent explicitly.  Remove
field.
(cleanup_t::segptr): New method.
(cleanup_t::cleanup): Add error checking and reporting.
(server_shmmgr::shmdt): Make argument non-const.
(server_shmmgr::find (segment_t *)): New method.

2002-07-27  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver.cc (client_request_shutdown::client_request_shutdown):
Comment out verbose tracing statement.
* cygserver_client.cc
(client_request_get_version::client_request_get_version): Ditto.
(client_request_attach_tty::client_request_attach_tty): Ditto.
* cygserver_shm.cc (client_request_shm::client_request_shm):
Ditto.

2002-07-27  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_transport_pipes.cc (transport_layer_pipes::listen):
Set `_is_listening_endpoint' appropriately.

2002-07-27  Conrad Scott  <conrad.scott@dsl.pipex.com>

* include/cygwin/cygserver_transport.h
(transport_layer_base::listen): Change return type.
(transport_layer_base::connect): Ditto.
* include/cygwin/cygserver_transport_pipes.h
(transport_layer_pipes::listen): Change return type.
(transport_layer_pipes::connect): Ditto.
(transport_layer_pipes::_sec_none_nih): Remove unused field.
(transport_layer_pipes::_is_listening_endpoint): New field.
* cygserver_transport_pipes.cc: Synchronize with sockets code.
(transport_layer_pipes::transport_layer_pipes): Initialise new
field.  Separate out asserts.
(transport_layer_pipes::listen): Change return type.  Add asserts.
(transport_layer_pipes::accept): Add asserts.
(transport_layer_pipes::read): Change conditional to an assert.
Add assert.
(transport_layer_pipes::write): Ditto.
(transport_layer_pipes::connect): Change return type.  Change
conditional to an assert.  Add asserts.  Rationalize error code
slightly.
(transport_layer_pipes::impersonate_client): Add asserts.
* include/cygwin/cygserver_transport_sockets.h
(transport_layer_sockets::listen): Change return type.
(transport_layer_sockets::connect): Ditto.
(transport_layer_sockets::_addr): Change type of field.
(transport_layer_sockets::_addr_len): Ditto.
(transport_layer_sockets::_is_accepted_endpoint): New field.
(transport_layer_sockets::_is_listening_endpoint): Ditto.
* cygserver_transport_sockets.cc
(MAX_CONNECT_RETRY): New constant.
(transport_layer_sockets::transport_layer_sockets): Initialise new
fields.  Only initialise the socket address where necessary.
(transport_layer_sockets::listen): Change return type.  Rewrite.
(transport_layer_sockets::accept): Add asserts.  Add tracing
statements.  Use a local variable to hold the accepted address.
(transport_layer_sockets::close): Add tracing statements.  Unlink
the UNIX domain socket file as appropriate.  Close the socket
cleanly.
(transport_layer_sockets::read): Rewrite method.
(transport_layer_sockets::write): Ditto.
(transport_layer_sockets::connect): Change return type.  Rewrite.
* cygserver.cc (server_submission_loop::request_loop): Run the
listening thread at high priority with special handling for
shutdown.
(main): Print the request error code rather than errno in shutdown
request code.  Install signal handlers with sigaction(2) to avoid
setting SA_RESTART.  Check value of the listen method call, now it
has one.
* cygserver_client.cc (client_request::make_request): Check new
return value on connect method call.

2002-07-27  Conrad Scott  <conrad.scott@dsl.pipex.com>

* include/cygwin/cygserver_transport_pipes.h
(cygserver_transport_pipes::_sd): Rename field.
(cygserver_transport_pipes::_sec_none_nih): Ditto.
(cygserver_transport_pipes::_sec_all_nih): Ditto.
(cygserver_transport_pipes::_pipe_name): Ditto.
(cygserver_transport_pipes::_hPipe): Ditto.
(cygserver_transport_pipes::_is_accepted_endpoint): Ditto.
* cygserver_transport_pipes.cc
(transport_layer_pipes::transport_layer_pipes): Rename fields.
(transport_layer_pipes::init_security): Ditto.
(transport_layer_pipes::listen): Ditto.
(transport_layer_pipes::accept): Ditto.
(transport_layer_pipes::close): Ditto.
(transport_layer_pipes::read): Ditto.
(transport_layer_pipes::write): Ditto.
(transport_layer_pipes::connect): Ditto.
(transport_layer_pipes::impersonate_client): Ditto.
(transport_layer_pipes::revert_to_self): Ditto.
* include/cygwin/cygserver_transport_sockets.h
(cygserver_transport_sockets::_fd): Rename field.
(cygserver_transport_sockets::_addr): Ditto.
(cygserver_transport_sockets::_addr_len): Ditto.
* cygserver_transport_sockets.cc
(transport_layer_sockets::transport_layer_sockets): Rename fields.
(transport_layer_sockets::listen): Ditto.
(transport_layer_sockets::accept): Ditto.
(transport_layer_sockets::close): Ditto.
(transport_layer_sockets::read): Ditto.
(transport_layer_sockets::write): Ditto.
(transport_layer_sockets::connect): Ditto.

2002-07-27  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_shm.cc (with_strerr): Fix use of %p format.
* shm.cc (client_shmmgr::shmat): Ditto.
(client_shmmgr::shmctl): Ditto.
(client_shmmgr::shmdt): Ditto.
(client_shmmgr::attach): Ditto.

2002-07-14  Christopher Faylor  <cgf@redhat.com>

* woutsup.h (system_printf): Remove extraneous semicolon from macro
definition.

2002-07-14  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_transport_pipes.cc
(transport_layer_pipes::connect): Use ProtectHandle in DLL code.
(transport_layer_pipes::close): Use ForceCloseHandle in DLL code.

2002-07-13  Nicholas Wourms  <nwourms@netscape.com>

* threaded_queue.h (class queue_submission_loop): Correct friend
declaration for GCC 3.1.1.
* include/cygwin/cygserver_process.h (class process): Ditto.
(class process_cache): Ditto.

2002-07-12  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_shm.cc (server_shmmgr::shmdt): Only call
delete_segment if the segment exists [sic].

2002-07-12  Conrad Scott  <conrad.scott@dsl.pipex.com>

* safe_memory.h: Include <new> rather than <new.h> for gcc 3.

2002-07-11  Conrad Scott  <conrad.scott@dsl.pipex.com>

* safe_memory.h: New file extracted from "woutsup.h".
* woutsup.h: Move the "safe" new/delete macros into the new
"safe_memory.h" header file and include that here.
* cygserver_client.cc: Explicitly include "safe_memory.h" for
client-side code.
(client_request::make_request): Use the "safe" new/delete macros
unconditionally, i.e. use them on the client side as well as on
the server side.
* cygserver_transport.cc: Explicitly include "safe_memory.h" for
client-side code.
(create_server_transport): Use the "safe" new/delete macros
unconditionally, i.e. use them on the client side as well as on
the server side.
* shm.cc: Include "safe_memory.h".
(client_shmmgr::instance): Use the "safe" new/delete macros.
(client_shmmgr::shmdt): Ditto.
(client_shmmgr::new_segment): Ditto.

2002-07-11  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_process (process::process): Add the client's cygpid
and winpid to all tracing statements as appropriate.
(process::exit_code): Ditto.
(process_cache::check_and_remove_process): Ditto.
* cygserver_shm.cc (server_shmmgr::shmat): Ditto.
(server_shmmgr::shmdt): Ditto.
(server_shmmgr::shmctl): Add a process object argument and remove
the explicit cygpid argument.  Add the client's cygpid and winpid
to all tracing statements as appropriate.
(server_shmmgr::shmget): Ditto.
(client_request_shm::serve): Update for the new signature of the
shmctl and shmget methods.

2002-07-11  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver.cc (client_request_shutdown::serve): Don't set the
shutdown flag directly, but send a SIGINT, as the signal handler
sets the flag and the signal breaks the pause(2) in the main loop.
(print_usage): Add new options.
(main): Add new --cleanup-threads and --request-threads options to
set the number of threads used by the daemon.  Use pause(2) rather
the win32 Sleep in the main loop.
* shm.cc (shmat): Add sigframe.
(shmctl): Ditto.
(shmdt): Ditto.
(shmget): Ditto.

2002-07-11  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_shm.cc: Automatically detach processes from any
segments they are attached to at exit.
(class server_shmmgr::attach_t): New class.
(server_shmmgr::segment_t::IS_DELETED): Rename and make private.
(server_shmmgr::segment_t::_sequence): Make private.
(server_shmmgr::segment_t::_flg): Ditto.
(server_shmmgr::segment_t::_hFileMap): Ditto.
(server_shmmgr::segment_t::_attach_head): New private field.
(server_shmmgr::segment_t::segment_t): Initialise new fields.
Make non-inline.
(server_shmmgr::segment_t::~segment_t): New method.
(server_shmmgr::segment_t::is_deleted): Ditto.
(server_shmmgr::segment_t::is_pending_delete): Ditto.
(server_shmmgr::segment_t::mark_deleted): Ditto.
(server_shmmgr::segment_t::attach): Ditto.
(server_shmmgr::segment_t::detach): Ditto.
(server_shmmgr::segment_t::find): Ditto.
(class server_shmmgr::cleanup_t): New class.
(server_shmmgr::_shm_atts): New private field.
(server_shmmgr::shmat): Add a process object argument to replace
the removed process_cache, cygpid and winpid arguments.  Remove
the process_cache manipulations.  Move body of code to the
segment_t::attach method.  Increment _shm_atts when required.
Update tracing statements.
(server_shmmgr::shmdt): Add a process object argument to replace
the removed cygpid argument.  Move body of code to the
segment_t::detach method.  Decrement _shm_atts when required.
Update tracing statements.
(server_shmmgr::shmget): Use the new segment_t::is_deleted method.
(server_shmmgr::server_shmmgr): Initialise the new _shm_atts
field.
(server_shmmgr::delete_segment): Remove the CloseHandle code, as
this is now done in the segment_t destructor.
(client_request_shm::serve): Look up the client's process object
and pass to the server_shmmgr::shmat and server_shmmgr::shmdt
methods rather than passing the cache, winpid and cygpid.
* cygserver_process.h: Add a cygpid to the process object to make
it more useful and then pass process objects rather than winpids
where possible.
(cleanup_routine::cleanup): Change argument to be a pointer to a
process object.
(class process): Re-order fields for no discernible reason.
(process::_cygpid): New field.
(process::process): Add a cygpid argument.
(process::winpid): New method.
(process::cygpid): Ditto.
(process::add): Make public, as it always should have been.
(process_cache::process): Add a cygpid argument.
* cygserver_process.cc (process::process): Add a cygpid argument
and use it to initialise the `_cygpid' field.  Re-order
initialisers to match new field order.
(process::cleanup): Pass `this' rather than just the winpid to
cleanup_routine::cleanup.
(process_cache::process): Add a cygpid argument and pass it to the
process object constructor.
* include/sys/shm.h (shmatt_t): Make unsigned as per SUSv3.
(shm_info::shm_atts): New field.

2002-07-11  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_shm.cc (class server_shmmgr::segment_t): Add `_'
prefix to the names of all fields.

2002-07-10  Conrad Scott  <conrad.scott@dsl.pipex.com>

* msg.cc: New file of stub functions, no functionality.
* sem.cc: Ditto.
* shm.cc (client_shmmgr::shmctl): Add support for an out shm_info
buffer for the SHM_INFO command.
(client_shmmgr::shmget): Use %X to print keys.
* include/sys/ipc.h: Comment all fields and values.
(IPC_PRIVATE): Change to be non-negative.
* include/sys/msg.h: New file with SUSv3 and ipcs(8) interfaces.
* include/sys/sem.h: Ditto.
* include/sys/shm.h: Comment all fields and values.
(struct shm_info): New struct.
* cygserver_shm.h (client_request_shm::shminfo): Rename.
(client_request_shm::shm_info): New method.
(client_request_shm::_parameters.out.hFileMap): Move into union.
(client_request_shm::_parameters.out.shminfo): Rename.
(client_request_shm::_parameters.out.shm_info): New field.
* cygserver_shm.cc (server_shmmgr::_shm_ids): Rename.
(server_shmmgr::_shm_tot): New field.
(server_shmmgr::shmctl): Rename `out_shminfo' argument.  Add
`out_shm_info' argument.  Fill in the `out_shm_info' argument in
the SHM_INFO command.
(server_shmmgr::shmget): Check `shmflg' against the mode of
existing segments as per Stevens 1990, p. 123.
(server_shmmgr::server_shmmgr): Initialise the new `_shm_tot'
field.
(server_shmmgr::new_segment): Set ENOMEM if CreateFileMapping
fails.  Pass `size' to new_segment.
(server_shmmgr::new_segment): Add size argument and use it to
check against and update the new `_shm_tot' field.
(server_shmmgr::delete_segment): Update the new `_shm_tot' field.
* Makefile.in (DLL_OFILES): Add new DLL object files.

2002-07-09  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_transport_pipes.cc: The main change is to make the
client try harder to connect to the server if it's previously
connected, and so has good grounds for believing that the server
is running.
(MAX_WAIT_NAMED_PIPE_RETRY): Change to be an enumerator.
(WAIT_NAMED_PIPE_TIMEOUT): Ditto.
(transport_layer_pipes::accept): Use interlocked operators on
`pipe_instance'.
(transport_layer_pipes::close): Rearrange so that FlushFileBuffers
and DisconnectNamedPipe are only called for accepted endpoints.
Use interlocked operators on `pipe_instance'.
(transport_layer_pipes::read): Use set_errno where required.
(transport_layer_pipes::write): Ditto.
(transport_layer_pipes::connect): Add local static variable
`assume_cygserver'.  Set it if a connection is made to cygserver,
clear it if a connection is not made even after retrying.  If set,
ignore all errors from CreateFile and retry the connection.  Catch
the situation where WaitNamedPipe fails to wait [sic] and add a
`Sleep (0)' so that the server gets a chance to run.

2002-07-03  Conrad Scott  <conrad.scott@dsl.pipex.com>

* dcrt0.cc: Only check for cygserver if and when required.
(dll_crt0_1): Remove call to `cygserver_init ()'.
* fhandler_tty.cc (fhandler_tty_slave::open): Change the cygserver
logic to allow for the fact that `cygserver_init ()' may not yet
have been called.
(fhandler_tty_slave::cygserver_attach_tty): Tweak the cygserver
request logic to conform to the practice elsewhere in the code.
* tty.cc (tty::common_init): Add an explicit call to
`cygserver_init ()' if it hasn't already been called.
* include/cygwin/cygserver.h (CYGSERVER_UNAVAIL): Rename from
`CYGSERVER_DEAD'.
(client_request_get_version::check_version): Make available in
cygserver as well the DLL.
(check_cygserver_available): Ditto.  Remove `check_version_too'
argument.
(cygserver_init): Ditto.  And likewise.
* cygserver_client.cc (client_request_get_version::check_version):
Make available in cygserver as well the DLL.
(client_request::make_request): This may now be called without
`cygserver_init ()' having been called first.  Detect this and
call it as required.  Add tracing.
(check_cygserver_available): Make available in cygserver as well
the DLL.  Remove `check_version_too' argument and always check the
version information.  And since this is called from within
`cygserver_init ()', force `cygserver_running' before calling
`client_request::make_request ()'.
(cygserver_init): Make available in cygserver as well the DLL.
Remove `check_version_too' argument.

2002-07-03  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_shm.cc: Implement the ipcs(8) interfaces, IPC_INFO,
SHM_STAT and SHM_INFO.
(server_shmmgr::segment_t::sequence): New static field.
(server_shmmgr::segment_t::key): Remove field, use the new
ds.shm_perm.key field instead.
(server_shmmgr::segment_t::shmid): Remove field.
(server_shmmgr::segment_t::intid): New field.
(server_shmmgr::segment_t::segment_t): Use the `key' argument to
initialise `ds.shm_perm.key'.  Change from using `shmid' to
`intid'.
(server_shmmgr::_shmseg_cnt): Renamed from `_shmid_cnt'.
(server_shmmgr::_intid_max): Renamed from `_shmid_max.
(server_shmmgr::shmat): Move the out arguments to the start of the
argument list.  Rename the `pid' argument as `cygpid'.  Add
tracing.  Pass an intid to `find ()', not a shmid.
(server_shmmgr::shmctl): Add separate out arguments.  Rename the
`pid' argument as `cygpid'.  Add support for the ipcs(8)
interfaces.  Add tracing.  Pass an intid to `find ()', not a
shmid.
(server_shmmgr::shmdt): Rename the `pid' argument as `cygpid'.
Add tracing.  Pass an intid to `find ()', not a shmid.
(server_shmmgr::shmget): Add a separate out arguments.  Rename the
`pid' argument as `cygpid'.  Add tracing.
(server_shmmgr::server_shmmgr): Update for new field names.
(server_shmmgr::find_by_key): Update for the new `ds.shm_perm.key'
field.
(server_shmmgr::find): Update to use the new `segment_t::intid'
field.
(server_shmmgr::new_segment): Rename the `pid' argument as
`cygpid'.  Check that the requested size is within bounds.  Handle
new error result from `new_segment (key, HANDLE)'.
(server_shmmgr::new_segment): Work with intids, not shmids.  Check
that the new intid is within bounds.  Update for new field names.
(server_shmmgr::delete_segment): Pass an intid to `find ()', not a
shmid.  Update for new field names.
(client_request_shm::serve): Check that the incoming message
length is the size of the `_parameters.in' struct, not of the
whole in/out parameter union.  Likewise, set the outgoing message
length to the size of the `_parameters.out' struct.  Update for
the new server_shmmgr interfaces.
* include/sys/ipc.h (ipc_perm::key): New field.
* include/sys/shm.h (SHM_INFO): New constant.
* cygserver_ipc.h (IPCMNI): New constant.
(ipc_int2ext): Add `sequence' argument and munge this into the
external ipc id.
(ipc_ext2int_subsys): Unmunge the sequence number from the
external ipc id.
(ipc_ext2int): Ditto.
(ipc_inc_id): Remove.
(ipc_dec_id): Remove.
* cygserver_shm.h (SHMMAX): New constant.
(SHMMIN): Ditto.
(SHMMNI): Ditto.
(SHMSEG): Ditto.
(SHMALL): Ditto.
(client_request_shm::_parameters): Re-arrange as a union of two
separate structs, one for in arguments, the other for out.
(client_request_shm::shmid): Update for the new parameter layout.
(client_request_shm::ds): Ditto.
(client_request_shm::info): New method.
* shm.cc (client_shmmgr::_shmat_cnt): New static field.
(client_shmmgr::shmat): Add locking.  Add tracing.
(client_shmmgr::shmctl): Update for ipcs(8) commands.  Add
tracing.  Add more argument checking.
(client_shmmgr::shmdt): Add locking.  Add tracing.  Update the new
`_shmat_cnt' field.
(client_shmmgr::shmget): Add tracing.
(client_shmmgr::fixup_shms_after_fork): Add tracing.  Add
consistency checking.
(client_shmmgr::attach): Add more tracing.
(client_shmmgr::new_segment): Update the new `_shmat_cnt' field.
(client_request_shm::client_request_shm): Update for the new
parameter layout.  Set the outgoing message length to the size of
the `_parameters.in' struct, not of the whole in/out parameter
union.

2002-07-02  Conrad Scott  <conrad.scott@dsl.pipex.com>

* shm.cc: Remove the use of a static client_shmmgr object.
(client_shmmgr::_instance): New static variable.
(client_shmmgr::instance): Allocate a new shmmgr on the heap,
rather than using a local static object.

2002-07-01  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_transport.cc (create_server_transport): Fix
cut-and-paste error.

2002-06-30  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_client.cc (client_request::handle_request): Don't
bother with the client request activity marker when compiled with
debugging output.

2002-06-30  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_transport_pipes.cc
(MAX_WAIT_NAMED_PIPE_RETRY): New constant.
(WAIT_NAMED_PIPE_TIMEOUT): Ditto.
(transport_layer_pipes::close): The `pipe' field is now either
NULL or a valid handle, and it should never have the value
`INVALID_HANDLE_VALUE'.
(transport_layer_pipes::read): Ditto.
(transport_layer_pipes::write): Ditto.
(transport_layer_pipes::connect): Ditto.
(transport_layer_pipes::impersonate_client): Ditto.
(transport_layer_pipes::connect): Ditto.  New, but still bogus,
retry logic.

2002-06-30  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_shm.cc (server_shmmgr::server_shmmgr): All fields have
to be initialized now that the singleton is no longer static.

2002-06-30  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_shm.cc (server_shmmgr::_instance): New static field.
(server_shmmgr::_instance_once): Ditto.
(server_shmmgr::initialise_instance): New static method.
(server_shmmgr::instance): Use a pthread_once_t rather than
relying on a local static variable.

2002-06-30  Conrad Scott  <conrad.scott@dsl.pipex.com>

* woutsup.h: Remove all uses of the C++ new and delete operators
throughout cygserver until they are fully thread-safe.
(safe_new0): New macro to replace the C++ new operator.
(safe_new): Ditto.
(safe_delete): New macro to replace the C++ delete operator.
* cygserver_client.cc (client_request::handle_request): Replace
all uses of the C++ new and delete operators with the new macros
from "woutsup.h".
(client_request::make_request): Ditto.
* cygserver_process.cc (~process_cleanup): Ditto.
(process::cleanup): Ditto.
(process_cache::process): Ditto.
(process_cache::check_and_remove_process): Ditto.
* cygserver_shm.cc (server_shmmgr::new_segment): Ditto.
(server_shmmgr::delete_segment): Ditto.
* cygserver_transport.cc (create_server_transport): Ditto.
* cygserver_transport_pipes.cc
(transport_layer_pipes::accept): Ditto.
* cygserver_transport_sockets.cc
(transport_layer_sockets::accept): Ditto.
* threaded_queue.cc (~threaded_queue): Ditto.
(threaded_queue::worker_loop): Ditto.
(threaded_queue::stop): Replace sleep(3) with win32 Sleep.
* cygserver.cc (~server_request): Replace all uses of the C++ new
and delete operators with the new macros from "woutsup.h".
(server_submission_loop::request_loop): Ditto.
(main): Ditto.  Replace sleep(3) with win32 Sleep.  Replace
iostreams with FILEs.
(print_usage): Replace iostreams with FILEs.
(print_version): Ditto.

2002-06-30  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_transport_sockets.cc
(transport_layer_sockets::accept): Rename local variable
`accept_fd' to avoid shadowing the `fd' field.

2002-06-29  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygwin_ipc.h: Moved (back) to "include/sys/ipc.h".
* cygwin_shm.h: Moved (back) to "include/sys/shm.h".
* include/sys/ipc.h: New file.
* include/sys/shm.h: New file.
* cygserver_shm.h: Update for new header file locations.
* ipc.cc: Ditto.

2002-06-28  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_client.cc (client_request::make_request): Comment out
a verbose tracing statement.
* cygserver_process.cc (process_cache::sync_wait_array): Fix
broken assert.
* include/cygwin/cygserver.h (class client_request): Remove excess
use of `class' qualifier in declarations.
(class client_request_get_version): Ditto.
(class client_request_shutdown): Ditto.
(class client_request_attach_tty): Ditto.

2002-06-28  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_ipc.h: New file.
* cygserver_shm.h: Re-written from scratch.
* cygserver_shm.cc: Ditto.
* shm.cc: Ditto.

2002-06-28  Conrad Scott  <conrad.scott@dsl.pipex.com>

* threaded_queue.h (class queue_request): Re-write.
(threaded_queue_thread_function): Remove.
(class queue_process_param): Remove.
(class threaded_queue): Re-write.
(class queue_submission_loop): New version of the old
`queue_process_param' class.
(TInterlockedExchangePointer): New templated function.
(TInterlockedCompareExchangePointer): Ditto.
* threaded_queue.cc (worker_function): Remove.
(class threaded_queue): Re-write.
(class queue_process_param): Remove.
(class queue_submission_loop): New version of the old
`queue_process_param' class.
* include/cygwin/cygserver_process.h (process_cleanup): Re-write.
(class process_process_param): Remove.
(class cleanup_routine): Re-write.
(class process): Re-write.
(class process_cache): Re-write.
* cygserver_process.cc (process_cleanup): Re-write.
(class process_process_param): Remove.
(class cleanup_routine): Re-write.
(class process): Re-write.
(class process_cache): Re-write.
* cygserver.cc (request_count): Remove unused variable.
(class server_request): Move methods inline.
(class server_process_param): Remove.
(class server_request_queue): Remove.
(request_queue): Move into `main ()' and change type to
`threaded_queue'.
(request_loop): Remove.
(class server_submission_loop): New version of the old
`server_process_param' class.
(shutdown_server): New variable.
(client_request_shutdown::serve): Set `shutdown_server' to trigger
shutdown.
(handle_signal): Ditto.
(main): Install signal handler for SIGINT rather than SIGQUIT.
Use new interfaces for the `request_queue' and the `cache'.
Create a `server_submission_loop' and add to the `request_queue'.
Add check for the `shutdown_server' variable to the main loop.
* cygserver_shm.cc (client_request_shm::serve): Release the
process object after use.

2002-06-27  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_client.cc (client_request::handle_request): Correct
tracing statement.
* cygserver_transport_pipes.cc: Remove local definition of
FILE_FLAG_FIRST_PIPE_INSTANCE constant.
* cygwin_ipc.h: Update copyright notice.
* cygwin_shm.h: Ditto.
* woutsup.h: Add definition of _WIN32_WINNT.

2002-06-24  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_client (client_request::make_request): Replace my
inappropriate use of set_errno () with error_code () throughout.

2002-06-24  Conrad Scott  <conrad.scott@dsl.pipex.com>

* include/cygwin/cygserver.h: Add forward declarations of class
transport_layer_base and class process_cache to reduce
dependencies between header files.
* include/cygwin/cygserver_process.h: Add include of
"threaded_queue.h".
* cygserver.cc: Remove unnecessary cygserver header files.
* cygserver_client.cc: Ditto.
* cygserver_process.cc: Ditto.
* cygserver_shm.cc: Ditto.
* cygserver_shm.h: Ditto.
* cygserver_transport_pipes.cc: Ditto.
* dcrt0.cc: Ditto.
* fhandler_tty.cc: Ditto.
* tty.cc: Ditto.

2002-06-24  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_shm.h: Replace <sys/shm.h> with "cygwin_shm.h" after
merge from HEAD.
* cygwin_ipc.h: Update with changes to include/sys/ipc.h lost in
merge from HEAD.
* cygwin_shm.h: Ditto.

2002-06-21  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver.cc: The tests for a duplicate server instance are now
the responsibility of the transport layer.
(request_loop): Use new `recoverable' flag in call to
`cygserver_transport::accept ()' and shutdown on an unrecoverable
error.
(main): Never call `cygserver_init ()'.  Fake `cygserver_running'
just for sending a shutdown request.
* cygserver_client.cc (client_request::send): Comment out
message-size tracing statements as verbose.
(client_request::handle): Ditto.
(client_request_get_version::check_version): #ifdef as DLL-only.
(check_cygserver_available): Ditto.
(cygserver_init): Ditto.
* include/cygwin/cygserver.h
(client_request_get_version::check_version): #ifdef as DLL-only.
(check_cygserver_available): Ditto.
(cygserver_init): Ditto.
* include/cygwin/cygserver_transport.h
(transport_layer_base::impersonate_client): #ifdef as
cygserver-only.
(transport_layer_base::revert_to_self): Ditto.
(transport_layer_base::listen): Ditto.
(transport_layer_base::accept): Ditto.  Add a `recoverable' out
flag for error handling.
* include/cygwin/cygserver_transport_sockets.h: Ditto.
* include/cygwin/cygserver_transport_pipes.h: Ditto.
(transport_layer_pipes): Change type of the `pipe_name' field.
Remove the `inited' field, as unnecessary.  Add new
`is_accepted_endpoint' field.
* include/cygwin/cygserver_transport.cc
(transport_layer_base::impersonate_client): #ifdef as
cygserver-only.
(transport_layer_base::revert_to_self): Ditto.
* include/cygwin/cygserver_transport_sockets.cc
(transport_layer_sockets::listen): #ifdef as cygserver-only.
(transport_layer_sockets::accept): #ifdef as cygserver-only.
Analyse any errno from `accept ()' and set `recoverable' as
appropriate.
* cygserver_transport_pipes.cc: Add local #define of
`FILE_FLAG_FIRST_PIPE_INSTANCE'.
(pipe_instance_lock_once): New variable.
(pipe_instance_lock): Ditto.
(pipe_instance): Ditto.
(initialise_pipe_instance_lock): New function.
(transport_layer_pipes::transport_layer_pipes): Change
initialization of `pipe_name'.  Initialize `is_accepted_endpoint'
as appropriate.  Remove use of `inited'.
(transport_layer_pipes::impersonate_client): #ifdef as
cygserver-only.
(transport_layer_pipes::revert_to_self): Ditto.
(transport_layer_pipes::listen): Ditto.
(transport_layer_pipes::accept): Ditto.  Keep track of how often
many named pipes have been created, in the `pipe_instance'
variable, and pass the `FILE_FLAG_FIRST_PIPE_INSTANCE' flag on the
open of the first instance.  Analyse the error code from
`CreateNamedPipe ()' and set the `recoverable' flag as
appropriate.
(transport_layer_pipes::close): Update the `pipe_instance' count.

2002-06-18  Conrad Scott  <conrad.scott@dsl.pipex.com>

* woutsup.h (cygserver_running): Add declaration.
(api_fatal): Eliminate.
* include/cygwin/cygserver.h
(client_request_get_version::check_version): Change return type to
bool.
(check_cygserver_available): New function.
(cygserver_init): Add check_version_too argument.
* cygserver_client.cc (allow_daemon): Make a bool.
(client_request_get_version::make_request): See errno on error.
Remove special case for CYGSERVER_REQUEST_GET_VERSION; this is now
handled in cygserver_init().
(client_request_get_version::check_version): Use syscall_printf()
instead of api_fatal(). Return true if cygserver version is
compatible.
(check_cygserver_available): New function; code moved here from
cygserver_init().
(cygserver_init): Move some code into check_cygserver_available().
* cygserver.cc (__set_errno): Copy from debug.cc so that
set_errno() can be used when __OUTSIDE_CYGWIN__.
(main): Call cygserver_init() to set up cygserver_running and add
checks against this to (try and) prevent multiple copies of
cygserver running simultaneously.  Remember to delete all
transport connections so that (one day) the transport classes can
tidy up on cygserver shutdown.

2002-06-17  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver.cc (main): Adjust tracing output for a cleaner display
when compiled without --enable-debugging.
* threaded_queue.cc (threaded_queue::cleanup): Ditto.
(queue_process_param::stop): Ditto.
* include/cygwin/cygserver.h
(client_request::make_request): Make non-virtual.
(client_request::send): Make virtual and protected, not private.
(client_request_attach_tty::send): New virtual method.
* cygserver_client.cc: Use the `msglen()' accessor rather than
`_header.msglen' throughout.
(client_request_attach_tty::send): New method.
(client_request::make_request): Remove the explicit close of
`transport' as it is closed on deletion.

2002-06-17  Conrad Scott  <conrad.scott@dsl.pipex.com>

* include/cygwin/cygserver.h: Change the client_request classes to
give greater encapsulation and to allow variable length requests
and replies.
(enum cygserver_request_code): Now client_request::request_code_t.
(class request_header): Now client_request::header_t.  Make a
union of the request_code and the error_code.  The `cb' field,
which was the buffer length, is now the `size_t msglen' field.
(struct request_get_version): Now
client_request_get_version::request_get_version.
(struct request_shutdown): Remove unused type.
(struct request_attach_tty): Now
client_request_attach_tty::request_attach_tty.
(client_request::_buf): Make field const.
(client_request::_buflen): New const private field.
(client_request::request_code): New accessor.
(client_request::error_code): Ditto.
(client_request::msglen): Ditto.
(client_request::handle_request): New static method.
(client_request::make_request): New virtual method.
(client_request::handle): New method.
(client_request::send): Make private.
(client_request_get_version::check_version): New method.
(client_request_get_version::serve): Make private.
(client_request_get_version::version): Ditto.
(client_request_shutdown::serve): Ditto.
(client_request_attach_tty::req): Ditto.
(client_request_attach_tty::serve): Ditto.
(client_request_attach_tty::from_master): Make method const.
(client_request_attach_tty::from_master): Ditto.
* cygserver_client.cc
(client_request_get_version::client_request_get_version): Track
changes to the client_request classes.
(client_request_attach_tty::client_request_attach_tty): Ditto.
(client_request_get_version::check_version): New method to
encapsulate code from cygserver_init().
(client_request_shutdown::client_request_shutdown): Move into
"cygserver.cc".
(client_request::send): Track changes to the client_request
classes.  Add more error checking.
(client_request::handle_request): New static method containing the
first half of the old server_request::process() code.
(client_request::make_request): New method to replace the old
cygserver_request() function.
(client_request::handle): New method containing the second half of
the old server_request::process() code.
(cygserver_init): Track changes to the client_request classes.  In
particular, some code moved into the
client_request_get_version::check_version() method.
* cygserver.cc (client_request_attach_tty::serve): Track changes
to the client_request classes.  In particular, only return a reply
body if some handles are successfully duplicated for the client.
And remove goto's.
(client_request_get_version::serve): Track changes to the
client_request classes.
(client_request_shutdown::serve): Ditto.
(class client_request_invalid): Dead, and so young too.
(server_request::request_buffer): Remove unnecessary field.
(client_request_shutdown::client_request_shutdown): Moved here
from "cygserver_client.cc".
(server_request::process): Implementation moved into the new
client_request::handle_request() and client_request::handle()
methods.
* cygserver_shm.h (class client_request_shm): Put client- and
server-specific interfaces inside #ifdef/#ifndef __INSIDE_CYGWIN__
guards.
(client_request_shm::serve): Make private.
* cygserver_shm.cc
(client_request_shm::client_request_shm): Track changes to the
client_request classes.
(client_request_shm::serve): Ditto
* shm.cc (client_request_shm::client_request_shm): Ditto.  Use
alloc_sd() rather than set_security_attribute() to get access to
the SECURITY_DESCRIPTOR length, so that we can use it to set the
request body length.
(shmat): Track changes to the client_request classes. In
particular, allocate client_request objects on the stack rather
than on the heap, and use the client_request::make_request()
method rather than the old cygserver_request() function.
(shmdt): Ditto.
(shmctl): Ditto.
(shmget): Ditto.
* fhandler_tty.cc (fhandler_tty_slave::cygserver_attach_tty): Ditto.

2002-06-17  Conrad Scott  <conrad.scott@dsl.pipex.com>

* include/cygwin/cygserver_transport.h
(cygserver_transport::read): Change buffer type to void *.
(cygserver_transport::write): Ditto.
* include/cygwin/cygserver_transport_sockets.h
(cygserver_transport_sockets::read): Ditto.
(cygserver_transport_sockets::write): Ditto.
* include/cygwin/cygserver_transport_pipes.h
(cygserver_transport_pipes::read): Ditto.
(cygserver_transport_pipes::write): Ditto.
* cygserver_transport_sockets.cc
(cygserver_transport_sockets::read): Ditto.
(cygserver_transport_sockets::write): Ditto.
* cygserver_transport_pipes.cc
(cygserver_transport_pipes::read): Ditto. Set errno on error, to
match behaviour of cygserver_transport_sockets class.
(cygserver_transport_pipes::write): Ditto.

2002-06-16  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver.cc (version): New static variable.
(server_request_queue::add_connection): Remove my gratuitous use
of studly caps.
(setup_privileges): Declare static.
(handle_signal): Ditto.
(longopts): Make a local variable of main().
(opts): Ditto.
(print_usage): New function.
(print_version): Ditto (tip of the hat to Joshua Daniel Franklin
for inspiration here).
(main): More argument checking.  Add --help and --version options.

2002-06-16  Conrad Scott  <conrad.scott@dsl.pipex.com>

* include/cygwin/cygserver.h (client_request::serve): Make pure
virtual.
* cygserver.cc (client_request::serve): Remove definition of pure
virtual method.
(class client_request_invalid): New class.
(server_request::process): Use new client_request_invalid
class. And remove goto's.

2002-06-16  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver.cc (class server_request): Add virtual destructor.
(server_request_queue::addConnection): New method to replace bad
virtual add() method.
(request_loop): Replace call to queue->add() with call to
queue->addConnection().
(server_request::server_request): Use field initialization.
(server_request::~server_request): New virtual destructor.
(server_request::process): Remove close and delete of
transport_layer_base object. It is deleted by the server_request's
own destructor and closed by its own destructor.
* include/cygwin/cygserver.h
(client_request::operator request_header): Remove unused method.
* cygserver_client.cc: Ditto.
* include/cygwin/cygserver_process.h
(class cleanup_routine): Add virtual destructor.
(cleanup_routine::cleanup): Make pure virtual.
(class process_cache): Make destructor non-virtual.
(process_cache::add): Ditto.
* cygserver_process.cc
(cleanup_routine::~cleanup_routine): New virtual destructor.
* include/cygwin/cygserver_transport.h
(class transport_layer_base): Add virtual destructor.
* cygserver_transport.cc
(transport_layer_base::~transport_layer_base): New virtual
destructor.
* include/cygwin/cygserver_transport_pipes.h
(class transport_layer_pipes): Add virtual destructor.
* cygserver_transport_pipes.cc
(transport_layer_pipes::~transport_layer_pipes): New virtual
destructor.
(transport_layer_pipes::close): Null out handle after closing.
* include/cygwin/cygserver_transport_sockets.h
(class transport_layer_sockets): Add virtual destructor.
* cygserver_transport_sockets.cc
(transport_layer_sockets::~transport_layer_sockets): New virtual
destructor.
(transport_layer_sockets::close): Null out fd after closing.
* threaded_queue.h (class queue_request): Add virtual destructor.
(queue_request::process): Make pure virtual.
* threaded_queue.cc (~queue_request): New virtual destructor.
(queue_request::process): Remove definition of pure virtual
method.

2002-06-16  Conrad Scott  <conrad.scott@dsl.pipex.com>

* include/cygwin/cygserver.h (client_request::send): Make
non-virtual.
(class client_request_attach_tty): Put client- and server-specific
interfaces inside #ifdef/#ifndef __INSIDE_CYGWIN__ guards.
* cygserver_client.cc: Ditto.
(cygserver_init): Fix error handling.

2002-06-16  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver.cc: Throughout the code, check and correct level of
the XXX_printf() functions used. Comment out several of the
debug_printf() calls with "// verbose:".  Reformat and correct
typos of some of the XXX_printf() formats.
* cygserver_process.cc: Ditto.
* cygserver_shm.cc: Ditto.
* cygserver_transport_pipes.cc: Ditto.
* cygserver_transport_sockets.cc: Ditto.
* shm.cc (hi_ulong): New function to allow printing of a 64-bit
key with current small_printf implementation.
(lo_ulong): Ditto.
(client_request_shm::client_request_shm): Use hi_ulong() and
lo_ulong() in call to debug_printf().

2002-06-16  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver_shm.cc: Remove #define __INSIDE_CYGWIN__ from around
<sys/shm.h> as it no longer contains any internal code.

2002-06-16  Conrad Scott  <conrad.scott@dsl.pipex.com>

* include/sys/ipc.h (IPC_PRIVATE): Add cast to key_t.
(IPC_INFO): New flag for ipcs(8).
(IPC_RMID IPC_SET IPC_STAT): Renumber.
* include/sys/shm.h (SHM_RDONLY SHM_RND): Renumber with distinct
values [sic].
(class _shmattach): Internal type moved to "cygserver_shm.h".
(class shmnode): Ditto.
(class shmid_ds): Ditto.
(struct shmid_ds): Add spare fields.
(struct shminfo): New type for IPC_INFO interface.
* cygserver_shm.h: Remove obsolete #if 0 ... #endif block.
(class shm_cleanup): Remove unused class.
(struct _shmattach): Internal type moved from <sys/shm.h>.
(struct shmnode): Ditto.
(struct int_shmid_ds): Ditto. Renamed to avoid name clash with
public interface struct shmid_ds. Use the shmid_bs structure as a
field.
* cygserver_shm.cc: Remove obsolete #if 0 ... #endif block.
(client_request_shm::serve): Update for redefinition of
int_shmid_ds structure.
* shm.cc (build_inprocess_shmds): Ditto.
(fixup_shms_after_fork): Ditto.
(shmctl): Ditto.
(shmget): Ditto. Remove obsolete #if 0 ... #endif code.

2002-06-16  Conrad Scott  <conrad.scott@dsl.pipex.com>

* include/cygwin/cygserver_transport.h
(transport_layer_base::transport_layer_base): Remove since it is
now redundant.
(transport_layer_base::listen): Make a pure virtual method.
(transport_layer_base::accept): Ditto.
(transport_layer_base::close): Ditto.
(transport_layer_base::read): Ditto.
(transport_layer_base::write): Ditto.
(transport_layer_base::connect): Ditto.
* cygserver_transport.cc
(transport_layer_base::transport_layer_base): Remove since it is
now redundant.
(transport_layer_base::listen): Remove since it is now a pure
virtual method.
(transport_layer_base::accept): Ditto.
(transport_layer_base::close): Ditto.
(transport_layer_base::read): Ditto.
(transport_layer_base::write): Ditto.
(transport_layer_base::connect): Ditto.

2002-06-16  Conrad Scott  <conrad.scott@dsl.pipex.com>

* cygserver.cc (check_and_dup_handle): Only use security code if
running on NT, i.e. if wincap.has_security().
(client_request_attach_tty::serve): Add check for has_security().
* cygserver_process.cc (process_cache::process): Use DWORD winpid
throughout to avoid win32 vs. cygwin pid confusion.
(process::process): Ditto.
* cygserver_shm.cc (client_request_shm::serve): Only use security
code if running on NT, i.e. if wincap.has_security().
* cygserver_shm.h (client_request_shm::parameters.in): Replace the
ambiguous pid field with cygpid and winpid fields.
(client_request_shm::client_request_shm): Reduce to only two
client-side constructors: one for SHM_CREATE, another for all the
other requests.
* shm.cc (client_request_shm::client_request_shm):
Ditto. Initialize cygpid and winpid fields here. On NT initialize
sd_buf here using set_security_attribute() to make use of the euid
and egid.
(shmat): Use new client_request_shm constructor.
(shmdt): Ditto.
(shmctl): Ditto.
(shmget): Ditto. Remove security code, now performed in the
relevant client_request_shm constructor.
* include/cygwin/cygserver_process.h: (class cleanup_routine):
Change winpid type to DWORD.
(class process): Ditto.

2002-06-15  Conrad Scott  <conrad.scott@dsl.pipex.com>

* woutsup.h: New file.
* cygserver.cc: Use "woutsup.h" and new XXX_printf macros.
(getfunc): New function, copied verbatim from "strace.cc".
(__cygserver__printf): New function.
* cygserver_client.cc: Use "woutsup.h" and new XXX_printf macros.
* cygserver_process.cc: Ditto.
* cygserver_shm.cc: Ditto.
* cygserver_transport.cc: Ditto.
* cygserver_transport_pipes.cc: Ditto.
* cygserver_transport_sockets.cc: Ditto.
* threaded_queue.cc: Ditto.
* shm.cc: Remove trailing \n from XXX_printf format strings.
* Makefile.in: Remove special __OUTSIDE_CYGWIN__ case for
cygserver_shm.cc.

22 years ago* init.cc (dll_entry): Temporarily disable thread detach code.
Christopher Faylor [Sun, 22 Sep 2002 03:39:48 +0000 (03:39 +0000)]
* init.cc (dll_entry): Temporarily disable thread detach code.

22 years ago* fhandler.cc (fhandler_base::dup): Don't set handle on failure. Caller has
Christopher Faylor [Sun, 22 Sep 2002 03:38:57 +0000 (03:38 +0000)]
* fhandler.cc (fhandler_base::dup): Don't set handle on failure.  Caller has
already taken care of that.
* fhandler_console.cc (fhandler_console::open): Initialize handles to NULL.
(fhandler_console::close): Ditto.  GNUify non-GNU formatted functions calls
throughout.

22 years agowhitespace
Christopher Faylor [Sun, 22 Sep 2002 00:46:24 +0000 (00:46 +0000)]
whitespace

22 years ago2002-09-20 Nathanael Nerode <neroden@gcc.gnu.org>
Nathanael Nerode [Sat, 21 Sep 2002 16:35:47 +0000 (16:35 +0000)]
2002-09-20  Nathanael Nerode  <neroden@gcc.gnu.org>

* configure.in (*-*-netbsd*): Use noconfigdirs, not skipdirs.
* configure.in (sh*-*-pe*): Ditto.
* configure.in (mips*-*-pe*): Ditto.
* configure.in (*arm-wince-pe): Ditto.

22 years ago * cygwin_ipc.h: Move to "include/cygwin/ipc.h".
Conrad Scott [Sat, 21 Sep 2002 13:03:24 +0000 (13:03 +0000)]
* cygwin_ipc.h: Move to "include/cygwin/ipc.h".
* cygwin_shm.h: Move to "include/cygwin/shm.h".
* include/cygwin/ipc.h: New file.
* include/cygwin/shm.h: New file.
* ipc.c:c Update <cygwin/ipc.h> include.
* cygserver_shm.cc: Update <cygwin/shm.h> include.
* shm.cc: Ditto.

22 years ago2002-09-21 Robert Collins <rbtcollins@hotmail.com>
Robert Collins [Sat, 21 Sep 2002 03:59:58 +0000 (03:59 +0000)]
2002-09-21  Robert Collins <rbtcollins@hotmail.com>

        * pthread.cc: Use class::call for converted pthread and semaphore
        calls.
        * thread.cc: Convert various __pthread_call and __sem_call to
        pthread::call and sem::call throughout.
        * pthread.h (__pthread_cancel): Convert to pthread::cancel.
        (__pthread_join): Convert to pthread::join.
        (__pthread_detach): Convert to pthread::detach.
        (__pthread_create): Convert to pthread::create.
        (__pthread_once): Convert to pthread::once.
        (__pthread_atfork): Convert to pthread::atfork.
        (__pthread_suspend): Convert to pthread::suspend.
        (__pthread_continue): Convert to pthread::resume.
        (__sem_init): Convert to semaphore::init.
        (__sem_destroy): Convert to semaphore::destroy.
        (__sem_wait): Convert to semaphore::wait.
        (__sem_trywait): Convert to semaphore::trywait.
        (__sem_post): Convert to semaphore::post.

22 years ago2002-09-21 Robert Collins <rbtcollins@hotmail.com>
Robert Collins [Sat, 21 Sep 2002 03:20:27 +0000 (03:20 +0000)]
2002-09-21  Robert Collins <rbtcollins@hotmail.com>

        * thread.cc: Finish the removal of the separate pthread_key
        destructor list.
        Remove all pthread_key_destructor and pthread_key_destructor_list
        references throughout.
        (pthread::exit): Call the new pthread_key interface to activate
        destructors.
        (pthread_key::keys): Change into a list.
        (pthread_key::saveAKey): New method, used via forEach.
        (pthread_key::restoreAKey): Ditto.
        (pthread_key::destroyAKey): Ditto.
        (pthread_key::fixup_before_fork): Use the List::forEach functionality.
        (pthread_key::fixup_after_fork): Ditto.
        (pthread_key::runAllDestructors): New method implementation.
        (pthread_key::pthread_key): Use List::Insert rather than custom list
        code.
        (pthread_key::~pthread_key): Use List::Remove for the same reason.
        * thread.h: Remove all pthread_key_destructor and
        pthread_key_destructor_list references throughout.
        (List): Move the interface above pthread_key in the header.
        Use atomic operations during insert and delete.
        (List::forEach): A generic interface for doing something on each node.
        (pthread_key::runAllDestructors): New method, run all destructors.
        (pthread_key::fork_buf): Make private.
        (pthread_key::run_destructor): Ditto.
        (pthread_key::saveAKey): New method for clearer source.
        (pthread_key::restoreAKey): Ditto.
        (pthread_key::destroyAKey): Ditto.
        (MTinterface::destructors): Remove.

22 years ago2002-09-21 Robert Collins <rbtcollins@hotmail.com>
Robert Collins [Sat, 21 Sep 2002 01:59:46 +0000 (01:59 +0000)]
2002-09-21  Robert Collins <rbtcollins@hotmail.com>

        * thread.cc: Partial refactoring of pthread_key destructor
        handling. Loosely based on Thomas Pfaff's work.
        (pthread_key_destructor_list::Insert): Remove.
        (pthread_key_destructor_list::Pop): Remove.
        (pthread_key_destructor_list::IterateNull): Call the key's
        run_destructor method.
        (pthread_key::pthread_key): Initialize new member.
        (pthread_key::get): Mark as const for correctness.
        (pthread_key::run_destructor): Implement.
        * thread.h (pthread_key::get): Mark as const for correctness.
        (pthread_key::run_destructor): Declare.
        (List): New template class that implements a generic list.
        (pthread_key_destructor_list): Inherit from List, and remove
        now duplicate functions.

22 years ago2002-09-21 Robert Collins <rbtcollins@hotmail.com>
Robert Collins [Fri, 20 Sep 2002 23:46:12 +0000 (23:46 +0000)]
2002-09-21  Robert Collins <rbtcollins@hotmail.com>

        * thread.cc: Change verifyable_object_isvalid calls with
        PTHREAD_CONDATTR_MAGIC, PTHREAD_MUTEXATTR_MAGIC, PTHREAD_COND_MAGIC,
        SEM_MAGIC to objecttype::isGoodObject() calls throughout.
        (pthread_condattr::isGoodObject): Implement.
        (pthread_mutex::isGoodInitializer): Implement.
        (pthread_mutex::isGoodInitializerOrObject): Minor bugfix in the
        check for verifyable_object_isvalid result.
        (pthread_mutexattr::isGoodObject): Implement.
        (pthread_cond::isGoodObject): Ditto.
        (pthread_cond::isGoodInitializer): Ditto.
        (pthread_cond::isGoodInitializerOrObject): Ditto.
        (semaphore::isGoodObject): Ditto.
        * thread.h (pthread_mutex::isGoodInitializer): Declare.
        (pthread_condattr::isGoodObject): Ditto.
        (pthread_cond::isGoodObject): Const correctness.
        (pthread_cond::isGoodInitializer): Declare.
        (pthread_cond::isGoodInitializerOrObject): Ditto.
        (semaphore::isGoodObject): Const correctness.

22 years ago2002-09-21 Robert Collins <rbtcollins@hotmail.com>
Robert Collins [Fri, 20 Sep 2002 22:34:05 +0000 (22:34 +0000)]
2002-09-21  Robert Collins <rbtcollins@hotmail.com>

        * thread.cc: Change verifyable_object_isvalid calls with
        PTHREAD_MUTEX_MAGIC and PTHREAD_KEY_MAGIC and PTHREAD_ATTR_MAGIC to
        ::isGoodObject() calls throughout.
        (MTinterface::Init): Remove dead code.
        (pthread_attr::isGoodObject): Implement.
        (pthread_key::isGoodObject): Implement.
        (pthread_mutex::isGoodObject): Implement.
        (pthread_mutex::isGoodInitializerOrObject): Implement.
        (pthread::isGoodObject): Update signature.
        * thread.h (pthread_key::isGoodObject): Declare.
        (pthread_attr::isGoodObject): Ditto.
        (pthread_mutex::isGoodObject): Ditto.
        (pthread_mutex::isGoodInitializerOrObject): Ditto.
        (pthread::isGoodObject): Change to a const parameter for const
        correctness.
        (pthread_mutexattr::isGoodObject): Declare.
        (pthread_condattr::isGoodObject): Ditto.
        (pthread_cond::isGoodObject): Ditto.
        (semaphore::isGoodObject): Ditto.

22 years ago2002-09-20 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Fri, 20 Sep 2002 21:56:13 +0000 (21:56 +0000)]
2002-09-20  Jeff Johnston  <jjohnstn@redhat.com>

        * libc/include/wctype.h: New file.

22 years ago2002-09-20 Nathanael Nerode <neroden@doctor.moo.mud.org>
Nathanael Nerode [Fri, 20 Sep 2002 21:03:04 +0000 (21:03 +0000)]
2002-09-20  Nathanael Nerode  <neroden@doctor.moo.mud.org>

* configure.in: Rearrange.

22 years ago2002-09-20 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Fri, 20 Sep 2002 20:13:11 +0000 (20:13 +0000)]
2002-09-20  Jeff Johnston  <jjohnstn@redhat.com>

        * libc/ctype/Makefile.am: Add new files.
        * libc/ctype/Makefile.in: Regenerated.
        * libc/ctype/ctype.tex: Add new iswxxxx, towxxxx, wctype,
        and wctrans functions to documentation index.
        * libc/ctype/iswalnum.c: New file.
        * libc/ctype/iswalpha.c: Ditto.
        * libc/ctype/iswblank.c: Ditto.
        * libc/ctype/iswcntrl.c: Ditto.
        * libc/ctype/iswctype.c: Ditto.
        * libc/ctype/iswdigit.c: Ditto.
        * libc/ctype/iswgraph.c: Ditto.
        * libc/ctype/iswlower.c: Ditto.
        * libc/ctype/iswprint.c: Ditto.
        * libc/ctype/iswpunct.c: Ditto.
        * libc/ctype/iswspace.c: Ditto.
        * libc/ctype/iswupper.c: Ditto.
        * libc/ctype/iswxdigit.c: Ditto.
        * libc/ctype/jp2uc.c: Ditto.
        * libc/ctype/jp2uc.h: Ditto.
        * libc/ctype/local.h: Ditto.
        * libc/ctype/towctrans.c: Ditto.
        * libc/ctype/towlower.c: Ditto.
        * libc/ctype/towupper.c: Ditto.
        * libc/ctype/utf8alpha.h: Ditto.
        * libc/ctype/utf8print.h: Ditto.
        * libc/ctype/utf8punct.h: Ditto.
        * libc/ctype/wctrans.c: Ditto.
        * libc/ctype/wctype.c: Ditto.
        * libc/locale/locale.c (__lc_ctype): New external array to
        replace static lc_ctype array.
        * libc/stdlib/mbtowc_r.c: Use __lc_ctype to check current lc_ctype
        rather than reentrancy structure's _current_locale field.
        * libc/stdlib/wctomb_r.c: Ditto.

22 years ago2002-09-20 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Fri, 20 Sep 2002 17:11:29 +0000 (17:11 +0000)]
2002-09-20  Jeff Johnston  <jjohnstn@redhat.com>

        * configure.host: Minor comment and formatting changes.
        * libc/Makefile.am: Add libc_la_DEPENDENCIES.
        * libc/Makefile.in: Regenerated.
        * libc/include/sys/config.h: Minor format change.

22 years ago* libiberty.h (asprintf, vasprintf): Don't declare them if the
Alexandre Oliva [Fri, 20 Sep 2002 00:21:58 +0000 (00:21 +0000)]
* libiberty.h (asprintf, vasprintf): Don't declare them if the
corresponding HAVE_DECL_ macro is 1.

22 years ago * mingwex/math/files.txt: Remove inadvertantly added file.
Danny Smith [Thu, 19 Sep 2002 23:05:27 +0000 (23:05 +0000)]
* mingwex/math/files.txt: Remove inadvertantly added file.

22 years ago2002-09-19 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Thu, 19 Sep 2002 21:37:20 +0000 (21:37 +0000)]
2002-09-19  Jeff Johnston  <jjohnstn@redhat.com>

        * libc/syscalls/sysfcntl.c (fcntl): Fix typo in preprocessor
        statement comment.

22 years ago2002-09-19 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Thu, 19 Sep 2002 21:28:52 +0000 (21:28 +0000)]
2002-09-19  Jeff Johnston  <jjohnstn@redhat.com>

        * libc/posix/opendir.c (opendir): Change code to check
        for HAVE_FCNTL before calling fcntl.
        * libc/search/hash.c (hash_open): Ditto.
        * libc/search/hash_page.c (open_tmp): Ditto.
        * libc/reent/Makefile.am: Add fcntlr.c.
        * libc/reent/Makefile.in: Regenerated.
        * libc/reent/fcntlr.c: New file.
        * libc/stdio/fdopen.c (_fdopen_r): Change to call _fcntl_r
        instead of _fcntl when HAVE_FCNTL flag is set.
        * libc/syscalls/sysfcntl.c (fcntl): Check for HAVE_FCNTL flag
        to see if _fcntl or _fcntl_r should be called.  If flag is not
        set, default to ENOSYS stub.

22 years agobfd/
Jakub Jelinek [Thu, 19 Sep 2002 19:01:18 +0000 (19:01 +0000)]
bfd/
* reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
BFD_RELOC_386_TLS_GOTIE): Add.
* bfd-in2.h, libbfd.h: Rebuilt.
* elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
and R_386_TLS_GOTIE.
(elf_i386_reloc_type_lookup): Handle it.
(struct elf_i386_link_hash_entry): Change tls_type type to unsigned
char instead of enum, change GOT_* into defines.
(GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
(elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
(elf_i386_check_relocs): Likewise.  Avoid crash if local symbol is
accessed both as normal and TLS symbol.  Move R_386_TLS_LDM and
R_386_PLT32 cases so that R_386_TLS_IE can fall through.
Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
(elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
(allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
tls_type is GOT_TLS_IE_BOTH.
(elf_i386_size_dynamic_sections): Likewise.
(elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
(elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
all 4 GOT_TLS_* TLS types.
gas/
* config/tc-i386.c (tc_i386_fix_adjustable): Handle
BFD_RELOC_386_TLS_IE and BFD_RELOC_386_TLS_GOTIE.
(BFD_RELOC_386_TLS_IE, BFD_RELOC_386_TLS_GOTIE): Define to 0
if not defined.
(lex_got): Handle @GOTNTPOFF and @INDNTPOFF.
(md_apply_fix3, tc_gen_reloc): Handle BFD_RELOC_386_TLS_IE and
BFD_RELOC_386_TLS_GOTIE.
gas/testsuite/
* gas/i386/tlspic.s: Add tests.
* gas/i386/tlspic.d: Regenerated.
* gas/i386/tlsnopic.s: Add tests.
* gas/i386/tlsnopic.d: Regenerated.
include/
* elf/i386.h (R_386_TLS_TPOFF, R_386_TLS_IE, R_386_TLS_GOTIE):
Define.
ld/testsuite/
* ld-i386/i386.exp: New.
* ld-i386/tlsbin.dd: New test.
* ld-i386/tlsbinpic.s: New test.
* ld-i386/tlsbin.rd: New test.
* ld-i386/tlsbin.s: New test.
* ld-i386/tlsbin.sd: New test.
* ld-i386/tlsbin.td: New test.
* ld-i386/tlslib.s: New test.
* ld-i386/tlsnopic1.s: New test.
* ld-i386/tlsnopic2.s: New test.
* ld-i386/tlsnopic.dd: New test.
* ld-i386/tlsnopic.rd: New test.
* ld-i386/tlsnopic.sd: New test.
* ld-i386/tlspic1.s: New test.
* ld-i386/tlspic2.s: New test.
* ld-i386/tlspic.dd: New test.
* ld-i386/tlspic.rd: New test.
* ld-i386/tlspic.sd: New test.
* ld-i386/tlspic.td: New test.

22 years agoRemove (errant) trailing semicolon (;) from the extern "C" { } declaration.
Nick Clifton [Thu, 19 Sep 2002 15:48:16 +0000 (15:48 +0000)]
Remove (errant) trailing semicolon (;) from the extern "C" { } declaration.

22 years agoCleanup calls to CreateFile throughout.
Christopher Faylor [Thu, 19 Sep 2002 15:12:48 +0000 (15:12 +0000)]
Cleanup calls to CreateFile throughout.
* dcrt0.cc (__api_fatal): Correctly check for failing return from CreateFile.
* assert.cc (__assert): Don't check return value from CreateFile for NULL.
* fhandler_console.cc (set_console_state_for_spawn): Ditto.
* fork.cc (fork_parent): Ditto.

22 years ago * include/string.h (_strerror): Move into #ifndef
Danny Smith [Thu, 19 Sep 2002 05:35:30 +0000 (05:35 +0000)]
* include/string.h (_strerror): Move into #ifndef
__STRICT_ANSI__ block.

22 years ago* cygcheck.cc: Include sys/time.h rather than time.h to avoid a compiler error.
Christopher Faylor [Thu, 19 Sep 2002 03:48:19 +0000 (03:48 +0000)]
* cygcheck.cc: Include sys/time.h rather than time.h to avoid a compiler error.

22 years ago* cygthread.cc (cygthread::initialized): Avoid copying on fork or some threads
Christopher Faylor [Thu, 19 Sep 2002 03:30:20 +0000 (03:30 +0000)]
* cygthread.cc (cygthread::initialized): Avoid copying on fork or some threads
may not end up in the pool.
(cygthread::new): Avoid race when checking for initialized.  Add debugging
code.
* fhandler.cc (fhandler_base::raw_read): Add case for ERROR_INVALID_HANDLE due
to Win95 directories.
(fhandler_base::open): Handle errors due to Win95 directories.
(fhandler_base::close): Add get_nohandle () test.
(fhandler_base::set_close_on_exec): Ditto.
(fhandler_base::fork_fixup): Ditto.
(fhandler_base::lock): Change error code to Posix EINVAL.
(fhandler_base::dup): If get_nohandle (), set new value to INVALID_HANDLE_VALUE
instead of NULL.
* fhandler_disk_file.cc (fhandler_disk_file::fstat): Call fstat_by_name if
get_nohandle ().  Remove extraneous element from strpbrk.
(fhandler_disk_file::open): Remove test for Win95 directory.
* fhandler_random.cc (fhandler_dev_random::open): Add set_nohandle ().
* fhandler_clipboard.cc (fhandler_dev_clipboard::open): Ditto.
* fhandler_zero.cc (fhandler_dev_zero::open): Ditto.
(fhandler_dev_zero::close): Delete.
* fhandler.h (class fhandler_dev_zero): Ditto.

22 years ago2002-09-18 Eric R. Krause <ekrause_98@users.sourceforge.net>
Danny Smith [Thu, 19 Sep 2002 00:01:18 +0000 (00:01 +0000)]
2002-09-18  Eric R. Krause  <ekrause_98@users.sourceforge.net>

* include/winuser.h (DS_SHELLFONT): Define.

22 years ago * include/time.h (__need_NULL): Define before including
Danny Smith [Tue, 17 Sep 2002 21:36:02 +0000 (21:36 +0000)]
* include/time.h (__need_NULL): Define before including
stddef.h.  Thanks to: R�diger Dehmel  <de@lmnet.de>.

22 years ago2002-09-17 Daniel Schlyder <daniel@dascdev.net>
Danny Smith [Tue, 17 Sep 2002 21:21:48 +0000 (21:21 +0000)]
2002-09-17  Daniel Schlyder  <daniel@dascdev.net>

* include/winnt.h (VER_SUITE_BLADE): Define.

22 years ago* cygcheck.cc: Reorder includes to avoid compiler error.
Christopher Faylor [Tue, 17 Sep 2002 17:13:21 +0000 (17:13 +0000)]
* cygcheck.cc: Reorder includes to avoid compiler error.

22 years ago2002-09-17 Robert Collins <rbtcollins@hotmail.com>
Robert Collins [Tue, 17 Sep 2002 10:01:49 +0000 (10:01 +0000)]
2002-09-17  Robert Collins <rbtcollins@hotmail.com>

        * thread.cc (pthread_key::set): Preserve GetLastError(). Reported
        by Thomas Pffaf.

22 years ago2002-09-17 Robert Collins <rbtcollins@hotmail.com>
Robert Collins [Tue, 17 Sep 2002 09:12:36 +0000 (09:12 +0000)]
2002-09-17  Robert Collins  <rbtcollins@hotmail.com>

        This work inspires by Thomas Pfaff's pthread_fork patch (1).
        * fork.cc (fork_child): Remove MTinterface fixup call, it's
        adsorbed by pthread::atforkchild.
        Rename __pthread_atforkchild to pthread::atforkchild to give
        access to private members.
        (fork_parent): Rename __pthread_atforkparent to
        pthread::atforkparent to give it access to private members.
        Ditto for __pthread_atforkprepare.
        * thread.cc: Fix some formatting problems throughout.
        (MTinterface::fixup_before_fork): Implement.
        (MTinterface::fixup_after_fork): Fix pthread_keys.
        (pthread_key::keys): Implement.
        (pthread_key::fixup_before_fork): Ditto.
        (pthread_key::fixup_after_fork): Ditto.
        (pthread_key::pthread_key): Add to pthread_key::keys.
        (pthread_key::~pthread_key): Remove from pthread_key::keys.
        (pthread_key::saveKeyToBuffer): Implement.
        (pthread_key::recreateKeyFromBuffer): Ditto.
        (pthread::atforkprepare): Prepare all MT classes for fork.
        (pthread::atforkchild): And fix them up afterwards.
        * thread.h (pthread_key): Buffer the key value during
        fork in fork_buf.
        List the keys needing to be fixed up in a linked list with
        head pthread_key::keys.
        (pthread): Move atfork cygwin internal calls into the class.
        (MTInterface): Provide a fixup_before_fork for objecst that
        need to save state.
        (__pthread_atforkprepare): Remove.
        (__pthread_atforkparent): Remove.
        (__pthread_atforkchild): Remove.

22 years ago * include/shlobj.h (SHGetSpecialFolderPath[AW]): Add _WIN32_IE guard.
Danny Smith [Tue, 17 Sep 2002 03:08:11 +0000 (03:08 +0000)]
* include/shlobj.h (SHGetSpecialFolderPath[AW]): Add _WIN32_IE guard.
  Correct prototype for wide version.
(SHGetFolderPath): Add comment on shfolder.dll library.
(SHGetFolderLocation): Add prototyope for WinME and W2K.
(SHGetFolderPathAndSubDir[AW]): Add prototypes for XP.

22 years ago2002-09-16 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Mon, 16 Sep 2002 18:55:25 +0000 (18:55 +0000)]
2002-09-16  Jeff Johnston  <jjohnstn@redhat.com>

        * libc/include/wchar.h (mbstate_t): Change protective flag to
        be _MBSTATE_T.
        * libc/include/sys/_types.h (_mbstate_t): Remove protective flag.
        [__CYGWIN__]: Remove special code that defines mbstate_t and WEOF
        for Cygwin.
        * libc/sys/linux/sys/_types.h (_mbstate_t): Remove protective flag.

22 years ago* init.cc: Cleanup slightly and remove obsolete code.
Christopher Faylor [Mon, 16 Sep 2002 16:09:54 +0000 (16:09 +0000)]
* init.cc: Cleanup slightly and remove obsolete code.

22 years ago2002-09-11 Robert Collins <rbtcollins@hotmail.com>
Robert Collins [Mon, 16 Sep 2002 10:53:29 +0000 (10:53 +0000)]
2002-09-11  Robert Collins  <rbtcollins@hotmail.com>

        * init.cc (dll_entry): On thread detach, if the thread hasn't
        exit()ed, do so.
        * pthread.cc (pthread_getsequence_np): Remove the
        __pthread_getsequence_np wrapper. This requires errno.h.
        * thread.cc (pthread::self): Instantiate a new pthread object
        when called and none exists. return a NULL object if instantiation
        fails.
        (pthread::precreate): Factor out common code.
        (pthread::postcreate): Ditto.
        (pthread::create): Ditto.
        (pthread::exit): Remove the TLS value when we exit to prevent
        double exits.
        (MTinterface::Init): Bugfix - don't mark the TLS index as created
        if one was not allocated.
        Apply Extract Method to move pthread specific initialisation into
        pthread.
        (pthread::initMainThread): Extracted method from MTinterface::Init.
        (pthread::setTlsSelfPointer): Extracted method from various pthread
        calls, to make reading those functions easier.
        (pthread::setThreadIdtoCurrent): Ditto.
        (pthread::cancel_self): Bring into the .cc file, it's only used
        within the class.
        (pthread::getThreadId): Ditto.
        (pthread::thread_init_wrapper): Apply Extract Method to the TLS
        setting logic.
        (pthread::isGoodObject): Extracted method from various pthread
        wrapper calls, for clarity of reading.
        (pthread::getsequence_np): Converted from __pthread_getsquence_np.
        (__pthread_create): Apply Extract Method to the object validation.
        (__pthread_cancel): Ditto.
        (__pthread_join): Ditto.
        (__pthread_detach): Ditto.
        (__pthread_suspend): Ditto.
        (__pthread_continue): Ditto.
        (__pthread_getschedparam): Ditto.
        (__pthread_getsequence_np): Remove.
        (__pthread_setschedparam): Apply Extract Method to the object
        validation.
        (pthreadNull::getNullpthread): New method, return the pthreadNull
        object.
        (pthreadNull::pthreadNull): Private constructor to prevent accidental
        use.
        (pthreadNull::~pthreadNull): Prevent compile warnings.
        (pthreadNull::create): Override pthread behaviour.
        (pthreadNull::exit): Ditto.
        (pthreadNull::cancel): Ditto.
        (pthreadNull::testcancel): Ditto.
        (pthreadNull::setcancelstate): Ditto.
        (pthreadNull::setcanceltype): Ditto.
        (pthreadNull::push_cleanup_handler): Ditto.
        (pthreadNull::pop_cleanup_handler): Ditto.
        (pthreadNull::getsequence_np): Ditto.
        (pthreadNull::_instance): Ditto.
        * thread.h (pthread): Declare pre- and post-create.
        Move GetThreadId to private scope and rename to getThreadId.
        Move setThreadIdtoCurrent to private scope.
        Make create virtual.
        Make ~pthread virtual.
        Declare initMainThread.
        Declare isGoodObject.
        Make exit virtual.
        Make cancel virtual.
        Make testcancel virtual.
        Make setcancelstate virtual.
        Make setcanceltype virtual.
        Make push_cleanup_handler virtual.
        Make pop_cleanup_handler virtual.
        Declare getsequence_np.
        Declare setTlsSelfPointer.
        (pthreadNull): New null object class for pthread.
        (__pthread_getsequence_np): Remove.

22 years ago * lib/shell32.def (SHGetFolderPath[AW]): Add comment.
Danny Smith [Mon, 16 Sep 2002 10:28:16 +0000 (10:28 +0000)]
* lib/shell32.def (SHGetFolderPath[AW]): Add comment.
* lib/shfolder.def: New file.

22 years ago2002-09-16 Ranjit Matthew <rmathew@hotmail.com>
Danny Smith [Mon, 16 Sep 2002 09:44:06 +0000 (09:44 +0000)]
2002-09-16  Ranjit Matthew  <rmathew@hotmail.com>

* include/stdio.h: Correct comment about directory separator.

22 years agoAdd final newlines to utils
Joshua Daniel Franklin [Sun, 15 Sep 2002 19:24:37 +0000 (19:24 +0000)]
Add final newlines to utils

22 years ago2002-09-12 Igor Pechtchanski <pechtcha@cs.nyu.edu>
Joshua Daniel Franklin [Sun, 15 Sep 2002 15:19:49 +0000 (15:19 +0000)]
2002-09-12  Igor Pechtchanski <pechtcha@cs.nyu.edu>
* cygpath.cc (options) New global variable.
(main) Make short options global for easier change.
(print_version) Add a missing newline.

22 years agofix typo
Christopher Faylor [Fri, 13 Sep 2002 13:05:52 +0000 (13:05 +0000)]
fix typo

22 years agofix typo
Christopher Faylor [Fri, 13 Sep 2002 13:01:28 +0000 (13:01 +0000)]
fix typo

22 years ago * syscalls.cc (seteuid32): Treat ILLEGAL_UID invalid.
Corinna Vinschen [Fri, 13 Sep 2002 09:00:28 +0000 (09:00 +0000)]
* syscalls.cc (seteuid32): Treat ILLEGAL_UID invalid.
(setegid32): Treat ILLEGAL_GID invalid.

22 years agoImport chnages from master config repository.
Nick Clifton [Thu, 12 Sep 2002 15:59:37 +0000 (15:59 +0000)]
Import chnages from master config repository.

22 years agoHandle DW_OP_GNU_push_tls_address.
Nick Clifton [Thu, 12 Sep 2002 10:35:53 +0000 (10:35 +0000)]
Handle DW_OP_GNU_push_tls_address.
Synch up with the gcc's dwarf2.h

22 years ago * include/sys/time.h (timeval): Add struct definition and
Danny Smith [Thu, 12 Sep 2002 10:34:54 +0000 (10:34 +0000)]
* include/sys/time.h (timeval): Add struct definition and
associated macros (copied from w32api/include/winsock.h).

22 years ago * include/winsock.h (timeval): Guard struct and associated
Danny Smith [Thu, 12 Sep 2002 10:11:05 +0000 (10:11 +0000)]
* include/winsock.h (timeval): Guard struct and associated
macros with _TIMEVAL_DEFINED.
* include/winsock2.h (timeval): Likewise.

22 years ago2002-09-11 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Wed, 11 Sep 2002 18:36:55 +0000 (18:36 +0000)]
2002-09-11  Jeff Johnston  <jjohnstn@redhat.com>

        * acinclude.m4 (enable-newlib-mb): Change check to
        default newlib_mb variable to empty string rather than "no".
        * configure.host: Remove hard-coding of -DMB_CAPABLE for
        x86-linux and Cygwin.  Add code to check for newlib_mb
        being unset in which case set to "yes" for x86-linux and
        Cygwin.  Change check for newlib_mb being "yes" to allow
        for an empty string.
        * configure.in (_MB_LEN_MAX): New AC_DEFINE.
        * newlib.hin (_MB_LEN_MAX): New define to configure.
        * aclocal.m4: Regenerated.
        * configure: Ditto.
        * libc/include/limits.h: New file.
        * libc/sys/linux/include/limits.h: Ditto.
        * doc/aclocal.m4 doc/configure libc/aclocal.m4
          libc/configure libc/machine/aclocal.m4
          libc/machine/configure libc/machine/a29k/aclocal.m4
          libc/machine/a29k/configure libc/machine/arm/aclocal.m4
          libc/machine/arm/configure libc/machine/d10v/aclocal.m4
          libc/machine/d10v/configure libc/machine/d30v/aclocal.m4
          libc/machine/d30v/configure libc/machine/fr30/aclocal.m4
          libc/machine/fr30/configure libc/machine/frv/aclocal.m4
          libc/machine/frv/configure libc/machine/h8300/aclocal.m4
          libc/machine/h8300/configure libc/machine/h8500/aclocal.m4
          libc/machine/h8500/configure libc/machine/hppa/aclocal.m4
          libc/machine/hppa/configure libc/machine/i386/aclocal.m4
          libc/machine/i386/configure libc/machine/i960/aclocal.m4
          libc/machine/i960/configure libc/machine/m32r/aclocal.m4
          libc/machine/m32r/configure libc/machine/m68hc11/aclocal.m4
          libc/machine/m68hc11/configure libc/machine/m68k/aclocal.m4
          libc/machine/m68k/configure libc/machine/m88k/aclocal.m4
          libc/machine/m88k/configure libc/machine/mips/aclocal.m4
          libc/machine/mips/configure libc/machine/mn10200/aclocal.m4
          libc/machine/mn10200/configure libc/machine/mn10300/aclocal.m4
          libc/machine/mn10300/configure libc/machine/necv70/aclocal.m4
          libc/machine/necv70/configure libc/machine/powerpc/aclocal.m4
          libc/machine/powerpc/configure libc/machine/sh/aclocal.m4
          libc/machine/sh/configure libc/machine/sparc/aclocal.m4
          libc/machine/sparc/configure libc/machine/tic80/aclocal.m4
          libc/machine/tic80/configure libc/machine/v850/aclocal.m4
          libc/machine/v850/configure libc/machine/w65/aclocal.m4
          libc/machine/w65/configure libc/machine/xscale/aclocal.m4
          libc/machine/xscale/configure
          libc/machine/xstormy16/aclocal.m4
          libc/machine/xstormy16/configure libc/machine/z8k/aclocal.m4
          libc/machine/z8k/configure libc/sys/aclocal.m4
          libc/sys/configure libc/sys/a29khif/aclocal.m4
          libc/sys/a29khif/configure libc/sys/arc/aclocal.m4
          libc/sys/arc/configure libc/sys/arm/aclocal.m4
          libc/sys/arm/configure libc/sys/cygwin/aclocal.m4
          libc/sys/cygwin/configure libc/sys/d10v/aclocal.m4
          libc/sys/d10v/configure libc/sys/decstation/aclocal.m4
          libc/sys/decstation/configure libc/sys/go32/aclocal.m4
          libc/sys/go32/configure libc/sys/h8300hms/aclocal.m4
          libc/sys/h8300hms/configure libc/sys/h8500hms/aclocal.m4
          libc/sys/h8500hms/configure libc/sys/idt/aclocal.m4
          libc/sys/idt/configure libc/sys/linux/aclocal.m4
          libc/sys/linux/configure libc/sys/linux/machine/aclocal.m4
          libc/sys/linux/machine/configure
          libc/sys/linux/machine/i386/aclocal.m4
          libc/sys/linux/machine/i386/configure
          libc/sys/m88kbug/aclocal.m4 libc/sys/m88kbug/configure
          libc/sys/mmixware/aclocal.m4 libc/sys/mmixware/configure
          libc/sys/netware/aclocal.m4 libc/sys/netware/configure
          libc/sys/rtems/aclocal.m4 libc/sys/rtems/configure
          libc/sys/sh/aclocal.m4 libc/sys/sh/configure
          libc/sys/sparc64/aclocal.m4 libc/sys/sparc64/configure
          libc/sys/sun4/aclocal.m4 libc/sys/sun4/configure
          libc/sys/sysmec/aclocal.m4 libc/sys/sysmec/configure
          libc/sys/sysnec810/aclocal.m4 libc/sys/sysnec810/configure
          libc/sys/sysnecv850/aclocal.m4 libc/sys/sysnecv850/configure
          libc/sys/sysvi386/aclocal.m4 libc/sys/sysvi386/configure
          libc/sys/sysvnecv70/aclocal.m4 libc/sys/sysvnecv70/configure
          libc/sys/tic80/aclocal.m4 libc/sys/tic80/configure
          libc/sys/w65/aclocal.m4 libc/sys/w65/configure
          libc/sys/z8ksim/aclocal.m4 libc/sys/z8ksim/configure
          libm/aclocal.m4 libm/configure: Regenerated.

22 years ago * grp.cc (initgroups): Call groups::clear_supp to free the
Corinna Vinschen [Wed, 11 Sep 2002 10:37:11 +0000 (10:37 +0000)]
* grp.cc (initgroups): Call groups::clear_supp to free the
supplementary group sids that may have been set by setgroups.
* security.cc (cygsidlist::free_sids): Also zero the class members.
* security.h (groups::clear_supp): New.
Rename cygsidlist_unknown to cygsidlist_empty.

22 years ago * ntsec.html: Add chapter for switching user context w/o password.
Corinna Vinschen [Wed, 11 Sep 2002 08:39:04 +0000 (08:39 +0000)]
* ntsec.html: Add chapter for switching user context w/o password.

22 years ago * lib/shell32.def: Add missing stubs.
Danny Smith [Wed, 11 Sep 2002 00:10:13 +0000 (00:10 +0000)]
* lib/shell32.def: Add missing stubs.

22 years ago* test commit
Frank Ch. Eigler [Tue, 10 Sep 2002 19:04:38 +0000 (19:04 +0000)]
* test commit

22 years ago2002-09-10 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Tue, 10 Sep 2002 19:02:38 +0000 (19:02 +0000)]
2002-09-10  Jeff Johnston  <jjohnstn@redhat.com>

        * COPYING.NEWLIB: More updates.

22 years ago2002-09-09 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Tue, 10 Sep 2002 00:46:45 +0000 (00:46 +0000)]
2002-09-09  Jeff Johnston  <jjohnstn@redhat.com>

        * libc/sys/linux/machine/i386/crt0.c (_start): Remove
        code that clears the .bss section.

22 years ago2002-09-09 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Mon, 9 Sep 2002 21:42:14 +0000 (21:42 +0000)]
2002-09-09  Jeff Johnston  <jjohnstn@redhat.com>

        * libc/include/sys/_types.h (_mbstate_t): Changed to use
        unsigned char internally.
        * libc/sys/linux/sys/_types.h: Ditto.
        * libc/include/sys/reent.h
        * libc/stdlib/mblen.c (mblen): Use function-specific state
        value from default reentrancy structure.
        * libc/stdlib/mblen_r.c (_mblen_r):  If return code from
        _mbtowc_r is less than 0, reset state __count value and
        return -1.
        * libc/stdlib/mbrlen.c (mbrlen): If the input state pointer
        is NULL, use the function-specific pointer provided in the
        default reentrancy structure.
        * libc/stdlib/mbrtowc.c: Add reentrant form of function.
        If input state pointer is NULL, use function-specific area
        provided in reentrancy structure.
        * libc/stdlib/mbsrtowcs.c: Ditto.
        * libc/stdlib/wcrtomb.c: Ditto.
        * libc/stdlib/wcsrtombs.c: Ditto.
        * libc/stdlib/mbstowcs.c: Reformat.
        * libc/stdlib/wcstombs.c: Ditto.
        * libc/stdlib/mbstowcs_r.c (_mbstowcs_r): If an error occurs,
        reset the state's __count value and return -1.
        * libc/stdlib/mbtowc.c: Ditto.
        * libc/stdlib/mbtowc_r.c (_mbtowc_r): Add restartable functionality.
        If number of bytes is used up before completing a valid multibyte
        character, return -2 and save the state.
        * libc/stdlib/wctomb_r.c (_wctomb_r): Define __state as __count
        and change some __count references to __state for clarity.

22 years ago2002-09-09 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Mon, 9 Sep 2002 20:57:01 +0000 (20:57 +0000)]
2002-09-09  Jeff Johnston  <jjohnstn@redhat.com>

        * COPYING.NEWLIB: Update.

22 years ago* fhandler_tty.cc (fhandler_tty_slave::open): Don't protect input/output
Christopher Faylor [Sun, 8 Sep 2002 19:35:41 +0000 (19:35 +0000)]
* fhandler_tty.cc (fhandler_tty_slave::open): Don't protect input/output
handles since they are not properly manipulated later.
* tty.cc (tty::make_pipes): Ditto.

22 years ago * include/windef.h (WINVER): Add documentation.
Earnie Boyd [Sat, 7 Sep 2002 16:47:35 +0000 (16:47 +0000)]
* include/windef.h (WINVER): Add documentation.
(_WIN32_WINNT): Ditto.
Special thanks to Paul Schmidt <paul@tricattechnologies.com>

22 years ago2002-09-06 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Fri, 6 Sep 2002 15:45:58 +0000 (15:45 +0000)]
2002-09-06  Jeff Johnston  <jjohnstn@redhat.com>

        * libc/include/sys/config.h (MB_LEN_MAX): Removed as this
        is defined by <limits.h>.

22 years agowhitespace
Christopher Faylor [Fri, 6 Sep 2002 04:39:49 +0000 (04:39 +0000)]
whitespace

22 years ago* winsup.h (_WIN32_WINNT): Protect.
Christopher Faylor [Fri, 6 Sep 2002 04:30:46 +0000 (04:30 +0000)]
* winsup.h (_WIN32_WINNT): Protect.

22 years ago* winsup.h (_WIN32_WINNT): Define.
Christopher Faylor [Fri, 6 Sep 2002 04:21:30 +0000 (04:21 +0000)]
* winsup.h (_WIN32_WINNT): Define.

22 years ago * lib/Makefile.in (TEST_OPTIONS): Define WINVER to 0x0666.
Danny Smith [Fri, 6 Sep 2002 03:24:06 +0000 (03:24 +0000)]
* lib/Makefile.in (TEST_OPTIONS): Define WINVER to 0x0666.

22 years ago2002-09-05 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
Jeff Johnston [Thu, 5 Sep 2002 15:26:42 +0000 (15:26 +0000)]
2002-09-05  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>

        * libc/include/wchar.h (WCHAR_MAX): Only define if not already
        defined.

22 years ago * include/_mingw.h: Increment version to 2.3.
Earnie Boyd [Thu, 5 Sep 2002 14:27:29 +0000 (14:27 +0000)]
* include/_mingw.h: Increment version to 2.3.
Makefile.in: Ditto.

22 years ago * mingwex/fegetenv.c: Change to \n line endings.
Earnie Boyd [Thu, 5 Sep 2002 11:51:26 +0000 (11:51 +0000)]
* mingwex/fegetenv.c: Change to \n line endings.
* mingwex/vsnprintf.c: Ditto.
* mingwex/vsnwprintf.c: Ditto.

22 years ago2002-09-04 Kevin Chase <kevincha99@hotmail.com>
Danny Smith [Wed, 4 Sep 2002 22:20:52 +0000 (22:20 +0000)]
2002-09-04  Kevin Chase  <kevincha99@hotmail.com>

* include/winbase.h (AllocateUserPhysicalPages,
MapUserPhysicalPages, MapUserPhysicalPagesScatter,
FreeUserPhysicalPages): Add prototypes.
* lib/kernel32.def: Add function stubs for above.

22 years ago2002-09-04 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
Jeff Johnston [Wed, 4 Sep 2002 18:17:55 +0000 (18:17 +0000)]
2002-09-04  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>

        * libc/include/sys/config.h: Define accordingly __WCHAR_MAX__.
        * libc/include/wchar.h: Define WCHAR_MIN as 0 and WCHAR_MAX as
        __WCHAR_MAX__ or 0x7fffffffu.
        * libc/string/wcscmp.c: Delete wrong and unnecessary type cast.
        * libc/string/wcsncmp.c: Ditto.

22 years ago2002-09-04 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
Jeff Johnston [Wed, 4 Sep 2002 18:16:55 +0000 (18:16 +0000)]
2002-09-04  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>

        * libc/include/sys/config.h: Define accordingly __WCHAR_MAX__.
        * libc/include/wchar.h: Define WCHAR_MIN as 0 and WCHAR_MAX as
        __WCHAR_MAX__ or 0x7fffffffu.
        * libc/string/wcscmp.c: Delete wrong and unnecessary type cast.
        * libc/string/wcsncmp.c: Ditto.

22 years agosome edits
Christopher Faylor [Wed, 4 Sep 2002 15:17:24 +0000 (15:17 +0000)]
some edits

22 years agofirst draft
Christopher Faylor [Wed, 4 Sep 2002 15:14:14 +0000 (15:14 +0000)]
first draft

22 years agofix typo
Christopher Faylor [Wed, 4 Sep 2002 14:56:56 +0000 (14:56 +0000)]
fix typo

22 years ago * Makefile.in (DLL_OFILES): Drop shortcut.o.
Corinna Vinschen [Wed, 4 Sep 2002 13:11:29 +0000 (13:11 +0000)]
* Makefile.in (DLL_OFILES): Drop shortcut.o.
* path.cc: Move all shortcut functions from shortcut.c to here.
(check_shortcut): Implement without using COM interface.
* path.h: Move definition of SHORTCUT_HDR_SIZE to here.
* shortcut.c: Remove.
* shortcut.h: Ditto.

22 years agoHave objdump's --help switch document PPC -M options.
Nick Clifton [Wed, 4 Sep 2002 10:08:07 +0000 (10:08 +0000)]
Have objdump's --help switch document PPC -M options.

22 years ago * fhandler.h (fhandler_socket::read): Remove method.
Corinna Vinschen [Wed, 4 Sep 2002 09:39:35 +0000 (09:39 +0000)]
* fhandler.h (fhandler_socket::read): Remove method.
(fhandler_socket::write): Ditto.
(fhandler_socket::readv): New method.
(fhandler_socket::writev): Ditto.
(fhandler_socket::recvmsg): Add new optional argument.
(fhandler_socket::sendmsg): Ditto.
* fhandler.cc (fhandler_socket::read): Remove method.
(fhandler_socket::write): Ditto.
(fhandler_socket::readv): New method.
(fhandler_socket::writev): Ditto.
(fhandler_socket::recvmsg): Use win32's scatter/gather IO where
possible.
(fhandler_socket::sendmsg): Ditto.
* net.cc (cygwin_recvmsg): Check the msghdr's iovec fields.
(cygwin_sendmsg): Ditto.  Add omitted sigframe.

22 years ago2002-09-03 Ren� M�ller Fonseca <fonseca@users.sourceforge.net>
Danny Smith [Tue, 3 Sep 2002 22:29:11 +0000 (22:29 +0000)]
2002-09-03  Ren� M�ller Fonseca  <fonseca@users.sourceforge.net>

* include/winuser.h (IDTRYAGAIN,IDCONTINUE): Add defines.
Add WINVER guards for dialog box command id defines.

22 years ago2002-09-03 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Tue, 3 Sep 2002 19:52:10 +0000 (19:52 +0000)]
2002-09-03  Jeff Johnston  <jjohnstn@redhat.com>

        * libc/string/wcschr.c: Add include of <stddef.h>.
        * libc/string/wcspbrk.c: Ditto.
        * libc/string/wcsrchr.c: Ditto.
        * libc/string/wcsstr.c: Ditto.

22 years ago2002-09-03 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Tue, 3 Sep 2002 19:40:36 +0000 (19:40 +0000)]
2002-09-03  Jeff Johnston  <jjohnstn@redhat.com>

        * libc/include/sys/_types.h (_flock_t): Added.
        * libc/include/sys/lock.h (__lock_try_acquire): New interface.
        (__lock_try_acquire_recursive): Ditto.
        * libc/include/sys/reent.h (__sFILE, __sFILE64): Add new
        _lock field.
        * libc/stdio/findfp.c (std)[!__SINGLE_THREAD__]: Initialize _lock
        field.
        * libc/stdio/fopen.c (_fopen_r)[!__SINGLE_THREAD__]: Ditto.
        * libc/stdio64/fopen64.c (_fopen64_r)[!__SINGLE_THREAD__]: Ditto.
        * libc/sys/linux/include/time.h (struct timespec): Moved from
        <sys/types.h> and added check for __need_timespec flag so type
        can be defined by itself.
        * libc/sys/linux/sys/_types.h (_flock_t): New type.
        * libc/sys/linux/sys/types.h (struct timespec): Moved to
        <time.h>.

22 years ago * include/wincon.h (GetConsoleWindow): Add _WIN32_WINNT >= 0x0500 guard.
Earnie Boyd [Tue, 3 Sep 2002 16:25:54 +0000 (16:25 +0000)]
* include/wincon.h (GetConsoleWindow): Add _WIN32_WINNT >= 0x0500 guard.

22 years ago * cygwin.din: Revert exporting new wchar functions.
Corinna Vinschen [Tue, 3 Sep 2002 12:26:51 +0000 (12:26 +0000)]
* cygwin.din: Revert exporting new wchar functions.
* include/cygwin/version.h: Change comment for API minor 62.

22 years ago* dcrt0.cc (dll_crt0_1): Remove getpagesize() call.
Christopher Faylor [Mon, 2 Sep 2002 06:00:59 +0000 (06:00 +0000)]
* dcrt0.cc (dll_crt0_1): Remove getpagesize() call.
* shared.cc (memory_init): Move it here.

22 years ago * mingwex/math/hypotl.c: Replace with version based on cephes
Danny Smith [Mon, 2 Sep 2002 03:00:37 +0000 (03:00 +0000)]
* mingwex/math/hypotl.c: Replace with version based on cephes
library.

22 years ago* fhandler_proc.cc: Add <sys/param.h> include.
Christopher Faylor [Sat, 31 Aug 2002 16:37:51 +0000 (16:37 +0000)]
* fhandler_proc.cc: Add <sys/param.h> include.
(format_proc_uptime): Use KernelTime and UserTime only as they include the
other counters.
(format_proc_stat): KernelTime includes IdleTime, so subtract IdleTime from
KernelTime.  Make number of 'jiffies' per second same as HZ define.
* fhandler_process.cc: Add <sys/param.h> include.
(format_process_stat): Make number of 'jiffies' per second same as HZ define.
Use KernelTime and UserTime only to calculate start_time.

22 years ago* fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Set "don't need
Christopher Faylor [Sat, 31 Aug 2002 03:41:43 +0000 (03:41 +0000)]
* fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Set "don't need
ready for read" flag.
(fhandler_tty_slave::read): Don't do anything special with vtime when vmin ==
0.

22 years ago(inspired by a patch from Egor Duda)
Christopher Faylor [Sat, 31 Aug 2002 03:35:50 +0000 (03:35 +0000)]
(inspired by a patch from Egor Duda)
* select.cc (fhandler_tty_slave::ready_for_read): Remove.
* fhandler.h (fhandler_tty_slave::ready_for_read): Remove declaration.
* fhandler_tty.cc (fhandler_tty_slave::read): Don't do anything special with
vtime when vmin == 0.
* autoload.cc (GetConsoleWindow): Correct parameter count.

22 years agoChristopher Faylor <cgf@redhat.com>
Christopher Faylor [Fri, 30 Aug 2002 16:03:52 +0000 (16:03 +0000)]
Christopher Faylor <cgf@redhat.com>
* tty.cc (tty_list::allocate_tty): Use GetConsoleWindow, if available.  Call
FindWindow in a loop.

22 years ago* include/wincon.h: Define GetConsoleWindow(void).
Christopher Faylor [Fri, 30 Aug 2002 15:58:06 +0000 (15:58 +0000)]
* include/wincon.h: Define GetConsoleWindow(void).

22 years ago* miscfuncs.cc (check_iovec_for_read): Don't check buffer when zero length
Christopher Faylor [Fri, 30 Aug 2002 15:47:10 +0000 (15:47 +0000)]
* miscfuncs.cc (check_iovec_for_read): Don't check buffer when zero length
iov_len.
(check_iovec_for_write): Ditto.
* fhandler.h (fhandler_base::readv): New method.
(fhandler_base::writev): Ditto.
* fhandler.cc (fhandler_base::readv): New method.
(fhandler_base::writev): Ditto.
* syscalls.cc (_read): Delegate to readv(2).
(_write): Ditto, mutatis mutandi.
(readv): Rewrite, based on the old _read code, to use the new
fhandler_base::readv method.  Improve access mode handling and ensure all calls
reach the final strace statement.
(writev): Ditto, mutatis mutandi.
* include/sys/uio.h (struct iovec): Change field types to match SUSv3.
* winsup.h (check_iovec_for_read): New function.
(check_iovec_for_write): Ditto.
* miscfuncs.cc (check_iovec_for_read): Ditto.
(check_iovec_for_write): Ditto.

22 years ago Sigh, mbsrtowcs was still missing...
Corinna Vinschen [Fri, 30 Aug 2002 13:30:26 +0000 (13:30 +0000)]
Sigh, mbsrtowcs was still missing...

22 years ago * cygwin.din: Add more prototypes for new wchar functions in newlib.
Corinna Vinschen [Fri, 30 Aug 2002 13:01:58 +0000 (13:01 +0000)]
* cygwin.din: Add more prototypes for new wchar functions in newlib.

22 years ago * cygwin.din: Add prototypes for new wchar functions in newlib.
Corinna Vinschen [Fri, 30 Aug 2002 12:18:56 +0000 (12:18 +0000)]
* cygwin.din: Add prototypes for new wchar functions in newlib.
* include/cygwin/version.h: Bump API minor number.

22 years ago* how-api.texinfo: Remove a line from the CRLF discussion about lseek not
Christopher Faylor [Fri, 30 Aug 2002 00:42:19 +0000 (00:42 +0000)]
* how-api.texinfo: Remove a line from the CRLF discussion about lseek not
working.  Answer thread safe question more simply.

22 years ago * libc/sys/linux/argp: New directory.
Thomas Fitzsimmons [Thu, 29 Aug 2002 23:53:06 +0000 (23:53 +0000)]
* libc/sys/linux/argp: New directory.
* libc/sys/linux/getopt.c: New file.
* libc/sys/linux/getopt1.c: New file.
* libc/sys/linux/getoptlong.c: Remove file.
* libc/sys/linux/include/argp.h: New file.
* libc/sys/linux/Makefile.am: Define argp_dir and ARGP_LIB,
based on ELIX level.
(SUBDIRS): Add argp_dir.
(SUBLIBS): Add ARGP_LIB.
(ELIX_2_OBJS): Add getopt.$(oext), getopt1.$(oext), remove
getopt_long.$(oext).
* libc/sys/linux/configure.in (AC_OUTPUT): Add argp/Makefile.

22 years ago2002-08-29 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Thu, 29 Aug 2002 19:47:43 +0000 (19:47 +0000)]
2002-08-29  Jeff Johnston  <jjohnstn@redhat.com>

        * libc/libc.texinfo: Add node reference to wide-character strings.
        * libc/string/wcstrings.tex: New file.
        * libc/string/strtok_r.c: Remove outdated advertising clause.
        * libc/string/Makefile.am (doc): Add wide-character string
        chapter to documentation.
        * libc/string/Makefile.in: Regenerated.

22 years ago2002-08-29 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
Jeff Johnston [Thu, 29 Aug 2002 19:38:25 +0000 (19:38 +0000)]
2002-08-29  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>

        * libc/include/wchar.h: Define NULL. Define WEOF more general
        way. Declare functions in newlib manner.
        * libc/stdlib/Makefile.am: Delete wmem*.c
        * libc/stdlib/Makefile.in: Regenerated.
        * libc/stdlib/wmemchr.c: Delete.
        * libc/stdlib/wmemcmp.c: Ditto.
        * libc/stdlib/wmemcpy.c: Ditto.
        * libc/stdlib/wmemmove.c: Ditto.
        * libc/stdlib/wmemset.c: Ditto.
        * libc/string/Makefile.am: Add wmem*.c and wcs*.c.
        * libc/string/Makefile.in: Regenerated.
        * libc/string/wcscat.c: New file derived from the NetBSD C Library.
        * libc/string/wcschr.c: Ditto.
        * libc/string/wcscmp.c: Ditto.
        * libc/string/wcscpy.c: Ditto.
        * libc/string/wcscspn.c: Ditto.
        * libc/string/wcslcat.c: Ditto.
        * libc/string/wcslcpy.c: Ditto.
        * libc/string/wcslen.c: Ditto.
        * libc/string/wcsncat.c: Ditto.
        * libc/string/wcsncmp.c: Ditto.
        * libc/string/wcsncpy.c: Ditto.
        * libc/string/wcspbrk.c: Ditto.
        * libc/string/wcsrchr.c: Ditto.
        * libc/string/wcsspn.c: Ditto.
        * libc/string/wcsstr.c: Ditto.
        * libc/string/wmemchr.c: Ditto.
        * libc/string/wmemcmp.c: Ditto.
        * libc/string/wmemcpy.c: Ditto.
        * libc/string/wmemmove.c: Ditto.
        * libc/string/wmemset.c: Ditto.

22 years ago2002-08-29 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Thu, 29 Aug 2002 15:32:08 +0000 (15:32 +0000)]
2002-08-29  Jeff Johnston  <jjohnstn@redhat.com>

        * libc/locale/locale.c (_setlocale_r)[MB_CAPABLE]: Fix so
        default locale "" is accepted for LC_CTYPE or LC_MESSAGES
        and is treated as if "C" was specified.

22 years ago * poll.cc (poll): Peek sockets ready for read to see if there's
Corinna Vinschen [Thu, 29 Aug 2002 09:41:00 +0000 (09:41 +0000)]
* poll.cc (poll): Peek sockets ready for read to see if there's
actually data.

This page took 0.090036 seconds and 5 git commands to generate.