Commit Graph

3533 Commits

Author SHA1 Message Date
Christopher Faylor 51d340e1c8 * dir.cc (readdir): Reinstate setting of old ino field for legacy applications.
* dirent.h (dirent): Rename unused field to __ino32.
* passwd.cc (getpwnam_r): Initialize pw_comment field.
2003-09-09 00:21:16 +00:00
Christopher Faylor 7d0e78a71b * passwe.cc (getpwnam_r): Initialize pw_comment field. 2003-09-08 22:03:20 +00:00
Christopher Faylor 7a198a0675 * passwd.cc (getpwuid_r32): Initialize pw_comment field. 2003-09-08 21:44:53 +00:00
Christopher Faylor 9547a8b3c3 * sigproc.cc (wait_sig_inited): Remove assertion since it is racy. 2003-09-08 21:10:23 +00:00
Corinna Vinschen 24efca1401 * cygwin.din: Export endusershell, getusershell and setusershell.
* syscalls.cc (getusershell): New function.
	(setusershell): Ditto.
	(endusershell): Ditto.
	* include/cygwin/version.h: Bump API minor number.
2003-09-08 20:08:53 +00:00
Danny Smith 6c73e54252 2003-09-08 Justin Forest <vhex@users.sourceforge.net>
* include/winuser.h (PM_QS_INPUT, PM_QS_POSTMESSAGE,
	PM_QS_PAINT, PM_QS_SENDMESSAGE): Add defines.

2003-09-08  Filip Navara  <xnavara@volny.cz>

	* include/wingdi.h (GRADIENT_FILL_RECT_H, GRADIENT_FILL_RECT_V,
	GRADIENT_FILL_TRIANGLE, GRADIENT_FILL_OP_FLAG): Add defines.
2003-09-08 10:35:56 +00:00
Corinna Vinschen dcb6ce0cb2 * cygwin.din: Export argz_add argz_add_sep argz_append argz_count
argz_create argz_create_sep argz_delete argz_extract argz_insert
	argz_next argz_replace argz_stringify envz_add envz_entry envz_get
	envz_merge envz_remove envz_strip
	* include/cygwin/version.h: Bump api minor number.
2003-09-08 08:53:01 +00:00
Christopher Faylor 87f9911114 fix typo 2003-09-08 05:09:13 +00:00
Christopher Faylor 7b06693464 * Makefile.in (zlib_h): Rename libz.h -> zlib.h. 2003-09-08 04:29:34 +00:00
Christopher Faylor 0c7b55727a Throughout, remove __d_u.__d_data fields from DIR structure.
* include/sys/dirent.h (dirent): Remvoe old_d_ino.
(DIR): Make __d_dirhash a 64 bit value.  Remove __d_data and __d_u.  Add
__flags.
* dir.cc (opendir_states): New enum.
(opendir): Clear new DIR __flags field.
(readdir): Fill in '.' and '..' entries if we hit EOF and we haven't seen them
already.  Nuke setting of old_d_ino.
(rewinddir): Reset DIR __flags field.
(seekdir64): Ditto.
* fhandler_disk_file.cc (fhandler_cygdrive::fhandler_cygdrive): Remove special
handling of "." and ".." since they are now handled automatically.
2003-09-08 04:04:19 +00:00
Christopher Faylor d31c5928dd * Makefile.in: Detect existence of mingw zlib headers and libraries. Build
cygcheck wihtout package checking if they are unavailable.
* dump_setup.cc: Generate dummy zlib macros when zlib is not available.
(open_package_list): Use zlib functions to uncompress package lists.  Return
gzFile rather than FILE *.
(check_package_files): Change fp to gzFile to accommodate zlib functions.  Use
gzgets to read from package file.  Use gzclose to close the handle.
(package_list): Ditto.
(package_find): Ditto.
2003-09-08 02:50:02 +00:00
Christopher Faylor 2e5228f964 * include/cygwin/in.h: Don't define ipv6 stuff unless we call for it
specifically since it isn't really implemented yet.
2003-09-08 00:26:26 +00:00
Christopher Faylor bd8938985e * cygheap.cc (_csbrk): More left coercion cleanup.
* fhandler_tty.cc (fhandler_tty_slave::read): Ditto.
(fhandler_tty_slave::write): Ditto.
* fhandler_windows.cc (fhandler_windows::read): Ditto.
* heap.cc (sbrk): Ditto.
2003-09-07 18:27:54 +00:00
Christopher Faylor ed2287adcd * signal.cc (nanosleep): Improve test for valid values. Round delay up to
resolution.  Fix test for negative remainder.  Use timeGetTime through gtod.
(sleep): Round up return value.  Christopher Faylor <cgf@redhat.com>
* hires.h (HIRES_DELAY_MAX): Define.
(hires_ms::minperiod): Declare static.
(hires_ms::resolution): New.
(hires_ms::dmsecs): New.
(hires_ms::prime): Return UINT.
(gtod): Declare.
* times.cc (hires_ms::prime): Always calculate minperiod and set it to 1 in
case of failure.  Return minperiod.
(hires_ms::resolution): Define.
(hires_ms::~hires_ms): Delete.
(hires_ms::usecs): Check minperiod to prime.
(gtod) Define as global.
2003-09-07 05:18:01 +00:00
Christopher Faylor 6cce721b15 Remove left coercion throughout. 2003-09-07 02:22:58 +00:00
Christopher Faylor 46645f9c6e * hires.h (hires_ms::~hires_ms): Delete declaration.
* times.cc (hires_ms::~hires_ms): Delete definition..
2003-09-06 02:14:06 +00:00
Christopher Faylor 1f602fd729 * dump_setup.cc (check_package_files): Don't fail on empty package. 2003-09-06 02:02:30 +00:00
Earnie Boyd 661cc22065 * include/w32api.h (_NT5, etc): Reverse the changes of 2003-07-01.
* include/winbase.h (_NT5, etc): Ditto.
2003-09-05 19:41:22 +00:00
Christopher Faylor c6f53ff6be * dcrt0.cc (__argc_safe): New variable.
(dll_crt0_1): Store argc in __argc_safe, which will theoretically remain
untouched by the user.
* fhandler_console.cc (fhandler_console::read): Silence some compiler warnings.
* fhandler_raw.cc (fhandler_dev_raw::raw_read): Ditto.
* pinfo.cc (_pinfo::commune_recv): Carefully bound argv scan and check for
potentially bad pointers since user could have set argv cell to anythinw.
* cygheap.h (CYGHEAPSIZE): Bump up size.
2003-09-05 01:55:01 +00:00
Corinna Vinschen 39473bba44 * sysconf.cc (sysconf): Return more accurate value for _SC_AVPHYS_PAGES. 2003-09-04 10:57:58 +00:00
Corinna Vinschen 4544f7f6a2 * mmap.cc: Restructure. Add, remove and rewrite comments throughout
for better readability.  Change function names for better
	understanding.
	(MAP_SET): Accomodate name change from map_map_ to page_map_.
	(MAP_CLR): Ditto.
	(MAP_ISSET): Ditto.
	(mmap_record::page_map_): Rename from page_map_.
	(mmap_record::get_map): Remove.
	(mmap_record::alloc_page_map): Rename from alloc_map. Return bool
	indicating success of cygheap memory allocation.
	(mmap_record::free_page_map): Rename from free_map.
	(mmap_record::fixup_page_map): Rename from fixup_map.
	(mmap_record::find_unused_pages): Rename from find_empty.
	(mmap_record::map_pages): Rename from map_map.
	(mmap_record::unmap_pages): Rename from unmap_map.
	(class list): Make all class members private.
	(list::list): Remove.
	(list::~list): Remove.
	(list::get_fd): New attribute reader.
	(list::get_hash): Ditto.
	(list::get_record): Ditto.
	(list::add_record): Manage all allocation for mmap_records.  Check
	for failed memory allocation and return NULL if so.
	(list::set): New function.
	(list::del_record): Rename from erase. Return true if last mmap_record
	has been deleted, false otherwise. Check for legal incoming index
	value.
	(list::erase): Remove erase/0.
	(list::search_record): Rename from match.
	(map::map): Remove.
	(map::~map): Remove.
	(map::add_list): Manage all allocation for lists.  Check for failed
	memory allocation and return NULL if so.
	(map::get_list): New method.
	(map::del_list): Rename from erase. Check for legal incoming index
	value.
	(mmap64): Check for failed mmap_record memory allocation.  Return
	with MAP_FAILED and errno set to ENOMEM if so.
	(munmap): Rearrange loop using new list and mmap_record accessor
	functions.  Rename loop index variables for better understanding.
	Check if list can be deleted after last mmap_record in it has been
	deleted.
	(msync): Rearrange loop using new list and mmap_record accessor
	functions.  Rename loop index variables for better understanding.
	(fixup_mmaps_after_fork): Ditto.
2003-09-04 10:27:51 +00:00
Christopher Faylor 026dcb34c6 * cxx.cc (new): Fix formatting. Just return result of ccalloc rather than
calling memset explicitly.
2003-09-04 03:01:35 +00:00
Christopher Faylor e48feef96a * mount.cc (mount_commands): Ensure user mode is actually user mode and not the
default system mode.
2003-09-04 01:04:57 +00:00
Christopher Faylor 75119e9980 * exceptions.cc (set_process_mask): Set pending signals only when signals
become unmasked.
* sigproc.cc (pending_signals): Flip back to a global.
(wait_sig): Don't set pending signals when there is an armed semaphore or
signal is blocked.
* shared.cc (shared_info::initialize): Add a username parameter for user-mode
mounts.  Reorganize to try to avoid startup race.
(memory_init): Move some stuff into shared_info::initialize.
* shared_info.h (shared_info::initialize): Change declaration.
(CURR_SHARED_MAGIC): Update.
2003-09-03 14:15:55 +00:00
Danny Smith 73b2114815 2003-09-02 Bart Oldeman <bartoldeman@users.sourceforge.net>
* lib/snmpapi.def (LIBRARY) Add library name.
	Remove '\r', throughout.
	* lib/wsnmp32.def: Remove '\r', throughout.
	* lib/igmpagnt.def: Likewise.
2003-09-03 00:59:02 +00:00
Christopher Faylor b960d7bf2d * include/cygwin/version.h: Bump DLL minor number to 4. 2003-09-01 17:12:29 +00:00
Christopher Faylor da43df2df0 * net.cc (dup_ent): Restore check for NULL input. 2003-09-01 16:47:03 +00:00
Corinna Vinschen bf6269abd3 * pathnames.sgml: Remove description how to mount raw devices and
dicourage it.  Desparately try to make usage of raw devices a bit
	clearer.
2003-09-01 12:56:01 +00:00
Christopher Faylor ef58cd2f44 * kill.cc (forcekill): Silence some compiler warnings. 2003-09-01 02:40:16 +00:00
Christopher Faylor f6f88b66d2 * Makefile.in: Oops. Put the '...' in the right place. 2003-09-01 02:33:50 +00:00
Christopher Faylor 840fcfef8d * include/sys/cygwin.h: Don't define cygwin-specific things if !__CYGWIN__. 2003-09-01 02:26:27 +00:00
Christopher Faylor c0a9bffd03 * cygheap.cc (cygheap_init): Allocate space for sigaction array in cygheap.
* cygheap.h (cygheap_types): Add HEAP_SIGS.
* exceptions.cc (signal_fixup_after_exec): Remove from this file.
* pinfo.h (pinfo::getsig): Just return global_sigs array.
(pinfo::sigs): Delete.
* sigproc.cc (signal_fixup_after_exec): Move it here.
(global_sigs): New global array, moved from pinfo structure.
(sigalloc): New function.  Allocate global sigaction array here.
(proc_subproc): Remove copysigs call.  It's automatic now.
* include/sys/cygwin.h (PID_NOCLDSTOP): New value.
* signal.cc (sigaction): Set myself->PID_NODCLDSTOP when appropriate.
* sigproc.h (sigalloc): Declare.
* fnmatch.c (fnmatch): Use C90 parameters.
(rangematch): Ditto.
* fhandler.cc (fhandler_base::raw_read): Use right coercion to avoid a compiler
warning.
2003-09-01 02:05:32 +00:00
Christopher Faylor 40d885eb7b * Makefile.in: Display "..." when not-verbose.
* kill.cc (forcekill): Default to entered pid when pinfo fails.  Issue some
warnings when things don't work.
2003-09-01 01:57:44 +00:00
Christopher Faylor 12ffca1d84 * net.cc (dup_ent): Make debugging output consistent. 2003-08-31 23:23:40 +00:00
Christopher Faylor a3de4e19b4 Use dup_ent rather than specific dup_*_ptr functions throughout.
* (gen_ent): Delete.
(dup_ent): Subsume gen_ent functionality.
(dup_host_ptr): Delete.
(dup_proto_ptr): Ditto.
(dup_servent_ptr): Ditto.
* net.cc (gen_ent): Invert sense of null check so that debug output makes
sense.
2003-08-31 23:16:34 +00:00
Christopher Faylor edf16a29fc * net.cc (free_char_list): Delete.
(dup_addr_list): Delete.
(dup_char_list): Delete.
(free_hostent_ptr): Delete.
(free_protoent_ptr): Delete.
(free_servent_ptr): Delete.
(DWORD_round): New function.
(strlen_round): New function.  Returns strlen rounded up to word size.
(dup_ent): New, generic function to duplicate a {host,proto,serv}ent structure.
(gen_ent): New macro.  Generates a generic dup_{host,proto,serv}ent_ptr
function.
(cygwin_getservbyname): Remove call to free_servent_ptr, pass servent_buf to
dup_servent_ptr.
(cygwin_getservbyport): Ditto.
(cygwin_gethostbyname): Ditto for hostent.
(cygwin_gethostbyaddr): Ditto.
(cygwin_getprotobyname): Ditto for protoent.
(cygwin_getprotobynumber): Ditto.
2003-08-31 22:02:15 +00:00
Christopher Faylor f8e2f358c4 * Makefile.in (MALLOC_OFILES): Always fill in with correct malloc object.
* configure.in: Fill in MALLOC_OFILES with either debugging or regular malloc.
* configure: Regenerate.
* dlmalloc.c: Make various fruitless changes to attempt to get to work.
* dlmalloc.h: Ditto.
* malloc.cc (free): Check malloc pool when debugging.
* path.cc (win32_device_name): Eliminate compiler warning.
* sigproc.cc (sig_dispatch_pending): Remove use of was_pending.  Let
thisframe.call_signal_handler decide if handler should be called rather than
using bogus was_pending check.
* exceptions.cc (interrupt_setup): Remove accidentally checked in debugging
code.
* heap.cc (sbrk): Save rounded addess in user_heap_max.
2003-08-31 18:26:58 +00:00
Christopher Faylor 110a4b87df change copyright 2003-08-31 00:40:16 +00:00
Christopher Faylor b939e87080 * sigproc.cc (sig_dispatch_pending): Remove explicit call to
thisframe.call_signal_handler.
2003-08-30 20:43:06 +00:00
Christopher Faylor 40f3536c52 missed one 2003-08-30 16:35:46 +00:00
Christopher Faylor a245bd6e99 * msg.cc: New file.
* sem.cc: Ditto.
2003-08-30 16:34:56 +00:00
Christopher Faylor 9540fc5962 * threaded_queue.h: New file. 2003-08-30 16:32:15 +00:00
Christopher Faylor 6c125ba745 Remove some cygserver files. 2003-08-30 16:31:10 +00:00
Danny Smith b258e2c63b 2003-08-29 Steve Cleary <scleary@jerviswebb.com>
* include/winuser.h (QS_ALLPOSTMESSAGE, QS_RAWINPUT): Add defines.
	(QS_INPUT, QS_ALLINPUT, QS_ALLEVENTS): Adjust by OR'ing	with
	QS_RAWINPUT for XP.
	(MWMO_*): Add flags.

	* include/wincrypt.h (MS_ENHANCED_PROV[AW], MS_STRONG_PROV[AW],
	MS_DEF_RSA_SIG_PROV[AW], MS_DEF_RSA_SCHANNEL_PROV[AW],
	MS_DEF_DSS_PROV[AW], MS_DEF_DSS_DH_PROV[AW], MS_ENH_DSS_DH_PROV[AW],
	MS_DEF_DH_SCHANNEL_PROV[AW], MS_SCARD_PROV[AW]): Add definitions.
2003-08-29 08:01:09 +00:00
Christopher Faylor 5a96b1cbff * sigproc.h: Make some functions regparm.
* sigproc.cc (checkstate): Make regparm.
(getevent): Change parameters in declaration, rename from getsem, make regparm.
(sig_send): Recognize that nosync is now an event.  Remove some old cruft from
previous interrupt anywhere signal handler.
(getevent): Change parameters in definition, rename from getsem.  Allocate
event rather than semaphore.
(wait_sig): Treat sigcatch_nosync as an event.
2003-08-29 03:29:16 +00:00
Christopher Faylor 99a8fab5a6 * sigproc.h: Make some functions regparm.
* sigproc.cc (checkstate): Make regparm.
(getevent): Change parameters in declaration, rename from getsem, make regparm.
(sig_send): Recognize that nosync is now an event.  Remove some old cruft from
previous interrupt anywhere signal handler.
(getevent): Change parameters in definition, rename from getsem.  Allocate
event rather than semaphore.
(wait_sig): Treat sigcatch_nosync as an event.
2003-08-29 02:59:06 +00:00
Christopher Faylor 5e8355c765 * exceptions.cc (sigreturn): Fix problem where old return address was not
properly restored for a nested signal.
2003-08-29 02:05:00 +00:00
Christopher Faylor d533b9214f * autoload.cc (SwitchToThread): Declare as autoload function.
* cygthread.h (cygthread::main_thread_id): Make public.
* exceptions.cc (setup_handler): Remove unneeded priority stuff.  Rename label
to reflect what it does.  Add debugging for idiotic Windows NT problem.  Change
debugging output to include signal number.
* miscfuncs.cc (low_priority_sleep): If available, use SwitchToThread function
to give time slice to other threads.
* wincap.cc: Properly define have_switch_to_thread throughout.
* wincap.h (wincap::switch_to_thread): New element.
2003-08-28 02:09:42 +00:00
Christopher Faylor e2bc5017fa * syscalls.cc (mount): Don't check win32_path when doing cygdrive mount. 2003-08-28 02:04:16 +00:00
Christopher Faylor 7028311c04 * specdir: Correctly remove temporary directory prior to use. 2003-08-27 21:01:14 +00:00