Commit Graph

1695 Commits

Author SHA1 Message Date
Christopher Faylor 9f42525632 * mount.cc (longopts): Add help to options list.
(opts): Add 'h' to options string.
* umount.cc (longopts): Add help to options list.
(opts): Add 'h' to options string and change 'R' to 'A'.
2001-04-16 02:51:03 +00:00
Christopher Faylor 4535e6a9aa * uname.c (uname): Default n in in86 to 6 if Windows returns > 6. 2001-04-15 20:39:46 +00:00
Corinna Vinschen 9f2cad57a6 Patch by Kazuhiro Fujieda <fujieda@jaist.ac.jp>:
* mkgroup.c (enum_groups): Use RID + offset specified an additional
        argument as ID.
        (usage): Add description of -o option.
        (longopts, opts): Add specifications of -o/--id-offset option.
        (main): Add -o option. Invoke enum_groups with specified offset.
        * mkpasswd.c (enum_users): Just like mkgroup.c.
        (usage, longopts, opts): Ditto.
        (main): Add -o option. Invoke enum_users with specified offset
        only against domain accounts.
2001-04-15 14:09:33 +00:00
Corinna Vinschen 1ff87985a1 * path.cc (add_ext_from_sym): Redefine to call `add_ext_from_sym_'.
(add_ext_from_sym_): New inline function.
2001-04-15 14:00:45 +00:00
Christopher Faylor 34bbe838e6 * config.h.in: Turn on VFORK by default. 2001-04-14 23:24:07 +00:00
Christopher Faylor 266be1d8c9 * net.cc (cygwin_socket): Set SO_LINGER to small value so closed UNIX domain
sockets will not stay around.
* select.cc (socket_cleanup): Set SO_LINGER to small value so closed dummy
sockets do not stay around.  Use correct value for second argument to shutdown.
2001-04-14 22:11:03 +00:00
Robert Collins e6b98fc8d6 Sat Apr 14 17:04:00 2001 Robert Collins <rbtcollins@hotmail.com>
* thread.h (MTinterface): Add threadcount.
	* thread.cc (MTinterface::Init): Set threadcount to 1.
	(__pthread_create): Increment threadcount.
	(__pthread_exit): Decrement threadcount and call exit() from the last thread.
2001-04-14 07:06:02 +00:00
Christopher Faylor a25b8414ac * libc/include/sys/unistd.h: Add pthread_atfork (Cygwin only). 2001-04-13 15:37:47 +00:00
Christopher Faylor 1114d47268 Fix ChangeLog format. 2001-04-13 15:34:33 +00:00
Christopher Faylor 39b6859a28 * fork.cc (fork_child): Call the __pthread_atforkchild function.
(fork_parent): Call the __pthread_atforkparent function.
* cygwin.din: Export pthread_atfork.
* thread.h (callback): New class.
(MTinterface): Use it.
* thread.cc (__pthread_atforkprepare): New function.
(__pthread_atforkparent): New function.
(__pthread_atforkchild): New function.
(__pthread_atfork): New function.
* pthread.cc (pthread_atfork): New function.
2001-04-13 15:28:20 +00:00
Corinna Vinschen e61cead397 * path.cc (add_ext_from_sym): New define evaluating `known'suffix'.
(path_conv::check): Use add_ext_from_sym throughout.
2001-04-13 07:54:20 +00:00
Jakub Jelinek cf620a6912 bfd/
* libbfd-in.h (_bfd_merge_section): New.
	(_bfd_write_merged_section): New.
	(_bfd_merged_section_offset): New.
	* libbfd.h: Rebuilt.
	* linker.c (_bfd_generic_link_output_symbols): Handle
	discard_sec_merge.
	* aoutx.h (aout_link_write_symbols): Likewise.
	* pdp11.c (aout_link_write_symbols): Likewise.
	* elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
	(elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
	sections.
	(elf_link_sec_merge_syms): New.
	(elf_link_input_bfd): Call _bfd_merged_section_offset
	and _bfd_write_merged_section.
	Handle discard_sec_merge.
	* elf-bfd.h (struct elf_link_hash_table): Add merge_info
	field.
	(struct bfd_elf_section_data): Likewise.
	* elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
	SEC_STRINGS section flags and entsize from their ELF counterparts.
	(_bfd_elf_link_hash_table_init): Initialize merge_info.
	(elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
	from their BFD counterparts.
	* merge.c: New file.
	* Makefile.am: Add strtab.lo.
	* Makefile.in: Rebuilt.
include/
	* bfdlink.h (bfd_link_discard): Add discard_sec_merge.
gas/
	* config/obj-elf.c (obj_elf_change_section): Add entsize argument,
	handle SHF_MERGE and SHF_STRINGS.
	(obj_elf_parse_section_letters): Set SHF_MERGE and SHF_STRINGS.
	(obj_elf_section): Allow additional argument specifying entity size.
	* write.c (adjust_reloc_syms): Keep relocations against local symbols
	in SEC_MERGE sections.
ld/
	* ldmain.c (main): Default to discard_sec_merge.
	* lexsup.c (OPTION_DISCARD_NONE): Define.
	(ld_options): Add --discard-none.
	(parse_args): Handle OPTION_DISCARD_NONE.
	* ldlang.c (wild_doit): SEC_MERGE should be set in the output
	section only if SEC_MERGE and SEC_STRINGS flags and entsize of
	all its input sections match.
2001-04-13 00:34:36 +00:00
Corinna Vinschen 67e810e18c * cygwinenv.sgml: Add text for `check_case' option. 2001-04-12 21:52:38 +00:00
Corinna Vinschen 70c370d674 * dir.cc (mkdir): Check for case clash.
* environ.cc: Add extern declaration for `pcheck_case'.
        (check_case_init): New function.
        (struct parse_thing): Add "check_case" option.
        * errno.cc (_sys_nerrlist): Add text for ECASECLASH.
        (strerror): Add case branch for ECASECLASH.
        * fhandler.cc (fhandler_disk_file::open): Check for case clash.
        * path.cc: Add global variable `pcheck_case'.
        (struct symlink_info): Add member `case_clash' and method `case_check'.
        (path_prefix_p_): Call `pathnmatch' instead of `strncasematch'.
        (pathnmatch): New funtion.
        (pathmatch): Ditto.
        (path_conv::check): Add handling for case checking.
        (symlink): Check for case clash.
        (symlink_info::check): Add parameter for case checking.
        Handle case checking.
        (symlink_info::case_check): New method.
        (chdir): Don't use unconverted path if pcheck_case==PCHECK_STRICT.
        * path.h: Add extern declarations for `pathmatch' and
        `pathnmatch'.
        (enum case_checking): New enumeration type describing
        the case checking behaviour of path conversion routines.
        (class path_conv): Add member `case_clash'.
        * syscalls.cc (_link): Check for case clash.
2001-04-12 21:21:37 +00:00
Corinna Vinschen b8a8c59d33 * libc/include/sys/errno.h: Add ECASECLASH to indicate case clash
on case insensitve file systems.
2001-04-12 21:17:27 +00:00
Christopher Faylor 82d4a5d4bb * syscalls.cc (mkfifo): New function stub. 2001-04-12 16:50:13 +00:00
Christopher Faylor aa67fd12e9 * configure.in: Remove PTH_ALLOW.
* cygwin.din: Remove @PTH_ALLOW@ prefixes to pthread functions.  Add new
pthread exports.
* pthread.cc: New wrapper functions for the above new exports.
* sched.cc (valid_sched_parameters): New function.
(sched_setparam): Use it.
(sched_set_thread_priority): New function.  Used by pthread_sched*.
* thread.cc (pthread_key_destructor::InsertAfter): New function.
(pthread_key_destructor::UnlinkNext): New function.
(pthread_key_destructor::Next): New function.
(pthread_key_destructor_list::Insert): New function.
(pthread_key_destructor_list::Remove): New function.
(pthread_key_destructor_list::Pop): New function.
(pthread_key_destructor::pthread_key_destructor): New function.
(pthread_key_destructor_list::IterateNull): New function.
(MTinterface::Init): Initialise new member.
(pthread::pthread): Initialise new members.
(pthread::create): Copy new attributes.  Set the new thread priority.
(pthread_attr::pthread_attr): Initialise new members.
(pthread_key::pthread_key): Setup destructor function.
(pthread_key::~pthread_key): Remove destructor function.
(pthread_mutexattr::pthread_mutexattr): New function.
(pthread_mutexattr::~pthread_mutexattr): New function.
(__pthread_once): New function.
(__pthread_cleanup): New function.
(__pthread_cancel): New function.
(__pthread_setcancelstate): New function.
(__pthread_setcanceltype): New function.
(__pthread_testcancel): New function.
(__pthread_attr_getinheritsched): New function.
(__pthread_attr_getschedparam): New function.
(__pthread_attr_getschedpolicy): New function.
(__pthread_attr_getscope): New function.
(__pthread_attr_setinheritsched): New function.
(__pthread_attr_setschedparam): New function.
(__pthread_attr_setschedpolicy): New function.
(__pthread_attr_setscope): New function.
(__pthread_exit): Call any key destructors on thread exit.
(__pthread_join): Use the embedded attr values.
(__pthread_detach): Use the embedded attr values.
(__pthread_getconcurrency): New function.
(__pthread_getschedparam): New function.
(__pthread_key_create): Pass the destructor on object creation.
(__pthread_key_delete): Correct incorrect prototype.
(__pthread_setconcurrency): New function.
(__pthread_setschedparam): New function.
(__pthread_cond_timedwait): Support static mutex initialisers.
(__pthread_cond_wait): Ditto.
(__pthread_mutex_getprioceiling): New function.
(__pthread_mutex_lock): Support static mutex initialisers.
(__pthread_mutex_trylock): Ditto.
(__pthread_mutex_unlock): Ditto.
(__pthread_mutex_destroy): Ditto.
(__pthread_mutex_setprioceiling): New function.
(__pthread_mutexattr_getprotocol): New function.
(__pthread_mutexattr_getpshared): New function.
(__pthread_mutexattr_gettype): New function.
(__pthread_mutexattr_init): New function.
(__pthread_mutexattr_destroy): New function.
(__pthread_mutexattr_setprotocol): New function.
(__pthread_mutexattr_setprioceiling): New function.
(__pthread_mutexattr_getprioceiling): New function.
(__pthread_mutexattr_setpshared): New function.
(__pthread_mutexattr_settype): New function.  Remove stubs for non MT_SAFE
compilation.
* thread.h: Remove duplicate #defines.  Add prototypes for new functions in
thread.cc.
(pthread_key_destructor): New class.
(pthread_key_destructor_list): New class.
(pthread_attr): Add new members.
(pthread): Remove members that are duplicated in the pthread_attr class.
(pthread_mutex_attr): Add new members.
(pthread_once): New class.
* include/pthread.h: Add prototypes for new functions exported from
cygwin1.dll.  Remove typedefs.
* include/sched.h: Add prototypes for new functions in sched.cc.
* include/cygwin/types.h: Add typedefs from pthread.h
2001-04-12 15:40:18 +00:00
Alexandre Oliva 57278c0e52 * ltconfig, ltmain.sh, libtool.m4, ltcf-c.sh, ltcf-cxx.sh,
ltcf-gcj.sh: Upgraded to libtool 1.4a 1.641.2.226.
2001-04-12 12:32:00 +00:00
Robert Collins 5c83f260b8 * configure.in: Remove PTH_ALLOW.
* cygwin.din: Remove @PTH_ALLOW@ prefixes to pthread functions.
	Add new pthread exports.
	* pthread.cc: New wrapper functions for the above new exports.
	* sched.cc (valid_sched_parameters): New function.
	(sched_setparam): Use it.
	(sched_set_thread_priority): New function. Used by pthread_sched*.
	* thread.cc (pthread_key_destructor::InsertAfter): New function.
	(pthread_key_destructor::UnlinkNext): New function.
	(pthread_key_destructor::Next): New function.
	(pthread_key_destructor_list::Insert): New function.
	(pthread_key_destructor_list::Remove): New function.
	(pthread_key_destructor_list::Pop): New function.
	(pthread_key_destructor::pthread_key_destructor): New function.
	(pthread_key_destructor_list::IterateNull): New function.
	(MTinterface::Init): Initialise new member.
	(pthread::pthread): Initialise new members.
	(pthread::create): Copy new attributes. Set the new thread priority.
	(pthread_attr::pthread_attr): Initialise new members.
	(pthread_key::pthread_key): Setup destructor function.
	(pthread_key::~pthread_key): Remove destructor function.
	(pthread_mutexattr::pthread_mutexattr): New function.
	(pthread_mutexattr::~pthread_mutexattr): New function.
	(__pthread_once): New function.
	(__pthread_cleanup): New function.
	(__pthread_cancel): New function.
	(__pthread_setcancelstate): New function.
	(__pthread_setcanceltype): New function.
	(__pthread_testcancel): New function.
	(__pthread_attr_getinheritsched): New function.
	(__pthread_attr_getschedparam): New function.
	(__pthread_attr_getschedpolicy): New function.
	(__pthread_attr_getscope): New function.
	(__pthread_attr_setinheritsched): New function.
	(__pthread_attr_setschedparam): New function.
	(__pthread_attr_setschedpolicy): New function.
	(__pthread_attr_setscope): New function.
	(__pthread_exit): Call any key destructors on thread exit.
	(__pthread_join): Use the embedded attr values.
	(__pthread_detach): Use the embedded attr values.
	(__pthread_getconcurrency): New function.
	(__pthread_getschedparam): New function.
	(__pthread_key_create): Pass the destructor on object creation.
	(__pthread_key_delete): Correct incorrect prototype.
	(__pthread_setconcurrency): New function.
	(__pthread_setschedparam): New function.
	(__pthread_cond_timedwait): Support static mutex initialisers.
	(__pthread_cond_wait): Ditto.
	(__pthread_mutex_getprioceiling): New function.
	(__pthread_mutex_lock): Support static mutex initialisers.
	(__pthread_mutex_trylock): Ditto.
	(__pthread_mutex_unlock): Ditto.
	(__pthread_mutex_destroy): Ditto.
	(__pthread_mutex_setprioceiling): New function.
	(__pthread_mutexattr_getprotocol): New function.
	(__pthread_mutexattr_getpshared): New function.
	(__pthread_mutexattr_gettype): New function.
	(__pthread_mutexattr_init): New function.
	(__pthread_mutexattr_destroy): New function.
	(__pthread_mutexattr_setprotocol): New function.
	(__pthread_mutexattr_setprioceiling): New function.
	(__pthread_mutexattr_getprioceiling): New function.
	(__pthread_mutexattr_setpshared): New function.
	(__pthread_mutexattr_settype): New function.
	Remove stubs for non MT_SAFE compilation.
	* thread.h: Remove duplicate #defines.
	Add prototypes for new functions in thread.cc.
	(pthread_key_destructor): New class.
	(pthread_key_destructor_list): New class.
	(pthread_attr): Add new members.
	(pthread): Remove members that are duplicated in the pthread_attr class.
	(pthread_mutex_attr): Add new members.
	(pthread_once): New class.
	* include/pthread.h: Add prototypes for new functions exported from cygwin1.dll.
	Remove typedefs.
	* include/sched.h: Add prototypes for new functions in sched.cc.
	* include/cygwin/types.h: Add typedefs from pthread.h
2001-04-12 04:04:53 +00:00
Earnie Boyd eae0943a1f * include/windows.h (#include <winsock.h>): Include <winsock2.h>
instead if (_WIN32_WINNT >= 0x0400)&&(__W32API_MAJOR_VERSION > 0).
2001-04-12 01:11:41 +00:00
Earnie Boyd e1cc9ad77c 2001-04-11 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
* include/winuser.h (WM_IME_*): Remove defines (now in imm.h).
2001-04-12 01:03:29 +00:00
Earnie Boyd bae5f26cfb * include/windef.h (*PBOOL): Unprotect from XFree86Server.
(*LPBOOL): Ditto.
2001-04-12 00:55:48 +00:00
Christopher Faylor 74f8cc634a * libc/include/sys/features.h: Add appropriate defines for Cygwin pthread
support.
* libc/include/sys/signal.h: Remove unneeded __CYGWIN__ protection.
* libc/include/sys/types.h: Protect __CYGWIN__ from the rtems pthreads types.
Include <cygwin/types.h> for the cygwin specific typedefs.
2001-04-12 00:05:57 +00:00
Christopher Faylor fc672fb26c * path.cc (struct symlink_info): Add extn and ext_tacked_on fields.
(path_conv::check): Only tack on extension if a known one didn't already exist.
(suffix_scan::has): Return pointer to known extension.
(symlink_info::check): Record location of extension, if any.
2001-04-11 19:09:53 +00:00
Egor Duda dd9752e88e * mkgroup.c (uni2ansi): Use native method to convert from Unicode
to multi-byte strings.
* mkpasswd.c (uni2ansi): Ditto.
(enum_users): Pass buffer size when converting string.
(enum_local_groups): Ditto.
* mkgroup.c (enum_groups): Ditto.
(enum_local_groups): Ditto.
2001-04-11 09:38:55 +00:00
Egor Duda 619f7fa032 * fhandler.h (class fhandler_socket): Add members and methods to
support secure connections on AF_UNIX sockets.
* fhandler_socket.cc (fhandler_socket::set_connect_secret): New method.
(fhandler_socket::get_connect_secret): Ditto.
(fhandler_socket::create_secret_event): Ditto.
(fhandler_socket::close_secret_event): Ditto.
(fhandler_socket::check_peer_secret_event): Ditto.
(fhandler_socket::fixup_after_fork): Duplicate secret event to child.
(fhandler_socket::dup): Copy address family.
(fhandler_socket::close): Close secret event.
* net.cc (get_inet_addr): Read secret cookie.
(cygwin_connect): Check if peer knows secret cookie value.
(cygwin_accept): Ditto. Copy address family to newly created socket.
(cygwin_bind): Generate and write secret cookie.
(wsock_init): Initialize random number generator.
2001-04-09 07:21:32 +00:00
Christopher Faylor c08e6c4430 Work around new g++ problem. 2001-04-09 01:23:27 +00:00
Christopher Faylor 4c1ce6d3a2 * include/winnt.h (GetCurrentFiber): Make "external __inline" or asm code will
be included in every module which includes this header.
(GetFiberData): Ditto.
2001-04-09 00:52:35 +00:00
Christopher Faylor e3eef4d042 remove extra whitespace. 2001-04-09 00:52:33 +00:00
Christopher Faylor aa970c616c * Makefile.in: Put -lgcc last in list of libraries, since stdc++ library needs
it.
* cygwin.din: Remove obsolete "__empty" export.
* exceptions.cc (call_signal_handler_now): Force inclusion of function even
when -finline-functions is specified.
* sigproc.h: Remove obsolete call_signal_handler declaration.
* fhandler_console.cc (cp_get_internal): New function.
(cp_convert): New function.
(con_to_str): New function.
(str_to_con): New function.
(fhandler_console::read): Replace OemToCharBuff with con_to_str.
(fhandler_console::write_normal): Replace CharToOemBuff with str_to_con.
2001-04-09 00:44:25 +00:00
Earnie Boyd 97101b51aa * include/winnt.h (GetCurrentFiber): Fix typo. 2001-04-08 17:00:27 +00:00
Earnie Boyd a1a1b83adf * include/shellapi.h: (CommandLineToArgvW): Add WINAPI declaration.
* include/winbase.h: (GetFileAttributesExW): Fix typo.
	* include/wingdi.h: (StartDocA): Change LPDOCINFOA to DOCINFOA*.
	(StartDocB): Chage LNPDOCINFOB to DOCINFOB*.
	Thanks To: Kent Tamura  <tkent@users.sourceforge.net>
	* include/winnt.h: (GetFiberData): Add __inline assembler coding.
	(GetCurrentFiber): Ditto.
	Thanks to: Andy Younger  <AndyY@redlemon.com>
	* include/windef.h: (HMONITOR_DECLARED): New definition to stop
	DirectX 8 from complaining.
	Thanks to: Sigbj�rn Lund Olsen  <mosikos@online.no>
        * include/commctrl.h Updated TreeView and ListView defines and macros.
        * include/winuser.h (MB_SERVICE_NOTIFICATION): Correct value for NT4
	and above.
2001-04-08 16:53:56 +00:00
Corinna Vinschen 9ddfe5a04a * syscalls.cc (stat_worker): Fix conditional which still allowed
successful stat'ing of non-existant files.
2001-04-05 20:43:23 +00:00
Hans-Peter Nilsson b25c2ad730 * cris.h (enum cris_insn_version_usage): Correct comment for
cris_ver_v3p.
2001-04-05 19:35:17 +00:00
Christopher Faylor 0403bb7415 * child_info.h: Bump magic number for fork/exec/spawn. 2001-04-04 14:37:45 +00:00
Richard Sandiford 16740220a2 * libc/include/machine/ieeefp.h: Comment about new configuration
macros _FLT_LARGEST_EXPONENT_IS_NORMAL and _FLT_NO_DENORMALS.
	* libm/common/fdlib.h: Define new macros for testing floats.
	* libm/common/sf_*: Use them.
	* libm/math/ef_*: Likewise.
	* libm/math/sf_*: Likewise.
2001-04-04 13:33:01 +00:00
DJ Delorie 51fc3813e9 merge from gcc 2001-04-04 01:15:59 +00:00
Corinna Vinschen c196a1a26a * errno.cc (errmap): Map ERROR_FILE_INVALID to ENXIO. 2001-04-03 18:20:38 +00:00
Corinna Vinschen 45d061cccf * winsup.api/mmaptest01.c: New test. 2001-04-03 08:39:21 +00:00
Christopher Faylor c90e420d91 * cygrun.c (main): Fix compiler warning.
* gmon.c (_mcleanup): Ditto.
* profil.c (profile_off): Ditto.
* net.cc (find_winsock_errno): New function.
(__set_winsock_errno): Use find_winsock_errno.
(cygwin_setsockopt): Detect SO_ERROR for debugging.
(cygwin_getsockopt): Ditto.  Translate error when getsockopt returns SO_ERROR.
* winsup.h: regparmize __set_winsock_errno.
* include/sys/strace.h: Document that strace functions can't use regparm.
2001-04-03 02:53:25 +00:00
Christopher Faylor be61cf4d0c * mount.cc (main): Use getopt_long for parsing arguments.
(usage): Reformat, show long and short options.
* umount.cc (main): Ditto, all of the above.
2001-04-03 02:41:54 +00:00
Christopher Faylor c6cd25a033 * mount.cc (show_mounts): Change format string to more closely resemble UNIX
when displaying mount table.
2001-04-02 14:58:47 +00:00
Corinna Vinschen 0f0a7dc99d * fhandler.cc (fhandler_disk_file::open): Avoid checking a magic
number of a directory.
2001-04-02 14:35:17 +00:00
Christopher Faylor f97adf983d * shared_info.h (mount_info): Remove mnt_ elements.
* thread.h (struct _winsup_t): Add mnt_ elements.
* path.cc (fillout_mntent): Use mnt_ elements from reent_winsup ().
2001-04-02 04:27:12 +00:00
Alexandre Oliva 68b3c65aa1 * Makefile.in (CXX_FOR_TARGET_FOR_RECURSIVE_MAKE, RECURSE_FLAGS):
New macros.
(bootstrap, cross): Use RECURSE_FLAGS.
* configure.in: Subst CXX_FOR_TARGET_FOR_RECURSIVE_MAKE.
2001-04-02 01:32:45 +00:00
Christopher Faylor 1ba3935dfb * exceptions.cc (sigframe::call_signal_handler): Return value of
call_signal_handler_now.
* sigproc.h (sigframe): Use constructor.
* syscalls.cc (_read): Correct errno test prior to calling signal handler.
2001-04-02 00:18:29 +00:00
Christopher Faylor 0ef785e4ee Fix typo. 2001-04-01 23:05:30 +00:00
Christopher Faylor 2a1743c76d * exceptions.cc (sigframe::call_signal_handler): Move out side of "C" block or
some compilers will complain.
2001-04-01 05:38:08 +00:00
Christopher Faylor 11f3a79b64 * exceptions.cc (call_signal_handler_now): Rename from call_signal_handler to
avoid C++ confusion.
2001-04-01 05:24:20 +00:00
Christopher Faylor 5817ee2d09 * path.cc (fillout_mntent): Always remove drive root directories from future
consideration by "/cygdrive" reporting.
(cygdrive_getmnt): Avoid reporting removable drives or drives with no media
mounted.
2001-04-01 05:09:57 +00:00