Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
AgeCommit message (Collapse)Author
2016-03-29Add missing nanlCorinna Vinschen
* Makefile.in (MATH_OFILES): Add nanl.o. * common.din (nanl): Export. * math/nanl.c: New file. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-29Add release message for 792e51bCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-29Add missing long double functions to CygwinCorinna Vinschen
This patch adds the long double functions missing in newlib to Cygwin. Apart from some self-written additions (exp10l, finite{f,l}, isinf{f,l}, isnan{f,l}, pow10l) the files are taken from the Mingw-w64 math lib. Minor changes were required, e.g. substitue _WIN64 with __x86_64__ and fixing __FLT_RPT_DOMAIN/__FLT_RPT_ERANGE for Cygwin. Cygwin: * math: New subdir with math functions. * Makefile.in (VPATH): Add math subdir. (MATH_OFILES): List of object files collected from building files in math subdir. (DLL_OFILES): Add $(MATH_OFILES). ${CURDIR}/libm.a: Add $(MATH_OFILES) to build. * common.din: Add new functions from math subdir. * i686.din: Align to new math subdir. Remove functions now commonly available. * x86_64.din: Ditto. * math.h: math.h wrapper to define mingw structs used in some files in math subdir. * include/cygwin/version.h: Bump API minor version. newlib: * libc/include/complex.h: Add prototypes for complex long double functions. Only define for Cygwin. * libc/include/math.h: Additionally enable prototypes of long double functions for Cygwin. Add Cygwin-only prototypes for dreml, sincosl, exp10l and pow10l. Explain why we don't add them to newlib. * libc/include/tgmath.h: Enable long double handling on Cygwin. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-29Fix Cygwin setstate definitionCorinna Vinschen
setstate is supposed to take a char *, not a const char *. * random.cc (setstate): Unconstify parameter to align to stdlib.h. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-29cygwin: export __getpagesizeYaakov Selkowitz
The inclusion of <sys/cygwin.h> by <sys/shm.h>, besides causing namespace pollution, also makes it very difficult to get the WINVER-dependent parts of the former. This affects code (such as x11vnc -unixpw_nis) which use both SysV shared memory (e.g. the X11 MIT-SHM extension) and user password authentication. getpagesize is the simplest function to retreive this information, but it is a legacy function and would also pollute the global namespace. The LSB lists another form which is in the implementation-reserved namespace: http://refspecs.linuxfoundation.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/baselib---getpagesize.html Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2016-03-29Add simple versions of random() and srandom()Joel Sherrill
Prototypes also added for initstate() and setstate() but they were not implemented in the shared newlib code. * newlib/libc/include/cygwin/stdlib.h: Prototypes added. * winsup/cygwin/include/cygwin/stdlib.h: Prototypes removed. * newlib/libc/stdlib/random.c: New file. * newlib/libc/machine/epiphany/machine/stdlib.h: Removed * newlib/libc/stdlib/Makefile.am: Added random.c. * newlib/libc/stdlib/stdlib.tex: Added random.def. * newlib/libc/stdlib/Makefile.in: Regenerated.
2016-03-26Add release text for 373f81d and 3e446e9Corinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-24Throughout Cygwin, use u_intN_t or uintN_tCorinna Vinschen
Don't use u_char, u_short, u_int or u_long in Cygwin, unless it refers to the Winsock types. Use u_intN_t in BSD-based sources, unsigned char where strings are concerned, uintN_t otherwise. Also: * net.cc: Fix comment, we're not using u_long anymore. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-24Change definition of b64_pton from K&R to ANSICorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-24Fix return type of get_routedstCorinna Vinschen
* net.cc (get_routedst): Correctly return in_addr_t. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-24Remove unused function convert_ifr_flagsCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-24Fix FIONBIO commentsCorinna Vinschen
FIONBIO is defined in sys/termios.h and asm/socket.h. Align the comments. Remove unused REAL_FIONBIO. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-24Drop usage of old-age BSD types in generically used Cygwin headersCorinna Vinschen
u_char, u_short, u_int, u_long are BSD-only types. Remove them from Cygwin headers which are supposed to be used in a non-BSD scenario. Drop special Cygwin handling of those types in sys/types.h. newlib: * libc/include/sys/types.h (u_char,u_short,u_int,u_long): Drop Cygwin exception. cygwin: * fhandler_socket.cc (fhandler_socket::ioctl): Accommodate change in include/asm/socket.h. Continue using u_long since that's the MS type here. * include/asm/socket.h: Since the type given in _IOR/_IOW macros is only used for its sizeof, replace u_long with equivalent long. * netdb.h (getnetbyaddr): Fix prototype. * netinet/ip.h: Replace old BSD-only types with generically defined old BSD types (u_char -> u_int8_t, etc). * netinet/tcp.h: Ditto. * netinet/udp.h: Ditto. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-24Define BSD u_intN_t types indiscriminatelyCorinna Vinschen
The u_intN_t types are BSD types but sanctioned by POSIX. They are always defined when using Glibc headers so we follow suit. newlib: * libc/include/sys/types.h: Drop outdated __INTTYPES_DEFINED__ macro. Always define u_intN_t types. cygwin: * include/cygwin/types.h: Remove definition of u_intN_t types. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-23Add release message for commit 59b3bd2Corinna Vinschen
2016-03-23Only allow enabled groups as primary groupCorinna Vinschen
So far any group in the user's token could be used as primary group. Windows doesn't check if the primary group is enabled or not, it just has no meaning. From a POSIXy point of view it can lead to weird results though. * uinfo.cc (check_token_membership): New static function. (internal_getlogin): Only allow enabled groups as primary group. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-23Use 64K buffers for TOKEN_GROUPSCorinna Vinschen
A user token can be up to 64K in size. Using 32K buffers for TOKEN_GROUPS may be insufficient. * uinfo.cc (get_logon_sid): Use 64K buffers for the TOKEN_GROUPS array. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-23Allocate temporary TOKEN_GROUP arrays using TLSCorinna Vinschen
A user token can be up to 64K in size. The group list might take a lot of that so use tmp_pathbuf allocated space rather than stack space allocted via alloca. In create_token the TOKEN_GROUP was allocated via malloc, but the code is needlessly complicated. Simplify by using tmp_pathbuf as well. * sec_auth.cc (verify_token): Allocate TOKEN_GROUP via tmp_pathbuf. (create_token): Ditto. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-23cxx.cc: Disable C++14 warning for new sized delete operatorCorinna Vinschen
As long as we're not building in C++14 mode, the definition of the sized delete operator results in a compatibility warning. * cxx.cc (operator delete): Disable C++14 warning for sized variant. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-23Add c++14 sized deallocation operatorPeter Foley
When compiling with -std=c++14 (the default for gcc 6.0+), the sized deallocation operator must be defined to prevent undefined symbols when linking. winsup/cygwin/ChangeLog: cxx.cc (operator delete(void *p, size_t)): Define. Signed-off-by: Peter Foley <pefoley2@pefoley.com>
2016-03-23Drop Cygwin-only posix_memalign prototypeCorinna Vinschen
newlib: * libc/include/stdlib.h (posix_memalign): Drop __rtmes__ guards. cygwin: * include/cygwin/stdlib.h (posix_memalign): Drop prototype. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-23Use DnsFree instead of deprecated DnsRecordListFreePeter Foley
The latest version of the mingw headers have been updated to make DnsRecordListFree an alias of DnsFree when targeting Windows XP or later. Use DnsFree directly, avoiding the wrapper function. /home/peter/cross/src/cygwin/winsup/cygwin/libc/minires-os-if.c:289: undefined reference to `DnsFree' winsup/cygwin/ChangeLog autoload.cc: Load DnsFree rather then DnsRecordListFree libc/minires-os-if.cc (cygwin_query): Use DnsFree rather then DnsRecordListFree Signed-off-by: Peter Foley <pefoley2@pefoley.com>
2016-03-21Remove Mingw.org from FAQ, or replace with Mingw-w64.Corinna Vinschen
* faq-api.xml: Change MingW to Mingw-w64. * faq-programming.xml: Ditto. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-21Add nonnull annotation to posix_memalign.Peter Foley
GCC 6.0+ asserts that the memptr argument to the builtin function posix_memalign is nonnull. Add the necessary annotation to the prototype and remove the now unnecessary check to fix a warning. newlib/Changelog newlib/libc/include/stdlib.h: Annotate arg to posix_memalign as non-null. winsup/cygwin/ChangeLog malloc_wrapper.cc (posix_memalign): Remove always true nonnull check. Signed-off-by: Peter Foley <pefoley2@pefoley.com>
2016-03-21Remove misleading indentationPeter Foley
GCC 6.0+ warns on misleading indentation, so fix it. winsup/cygserver/ChangeLog * sysv_msg.cc (msgsnd): Fix misleading indentation. * sysv_msg.cc (msgrcv): Ditto. * sysv_sem.cc (semop): Ditto. Signed-off-by: Peter Foley <pefoley2@pefoley.com>
2016-03-21Move arc4random Cygwin only code to CygwinSebastian Huber
Keep the Newlib arc4random.c identical to the OpenBSD upstream version. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>.
2016-03-21srandom: Replace accessing /dev/random by equivalent getentropy callCorinna Vinschen
/dev/random calls getentropy. So there's no good reason to go out of our way to open /dev/random just to call getentropy anyway. * random.cc (srandomdev): Drop opening /dev/random in favor of calling getentropy. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-20Revert "Use high-resolution timebases for select()."Corinna Vinschen
This reverts commit 6e70fd315a29578f090a98f84e9d8e95ddb156e3. Revert accidental push
2016-03-20Revert "Debug printfs."Corinna Vinschen
This reverts commit 9f82de59a07da145c177648fe474f19cd9def7a1. Revert accidental push
2016-03-20Revert "Improve and simplify select()."Corinna Vinschen
This reverts commit 472d0a228c56bd4783ebb0561667cda2de3cd168. Revert accidental push
2016-03-20Drop redundant arc4random prototypes from cygwin/stdlib.hCorinna Vinschen
Newlib's default stdlib.h now defines these functions so we can drop them from the Cygwin-specific header. Remove the arc4random_stir and arc4random_uniform prototypes entirely. They shouldn't be used by applications anymore. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-20Allow machine-dependent arc4 lockingCorinna Vinschen
newlib: * libc/stdlib/arc4random.h: Remove Cygwin-specific locking code. Conditionalize arc4 locking. Check for _ARC4_LOCK_INIT being undefined to fall back to default implementation. cygwin: * include/machine/_arc4random.h: New file. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-20Improve and simplify select().John Hood
* cygwait.h (cygwait_us) Remove; this reverts previous changes. * select.h: Eliminate redundant select_stuff::select_loop state. * select.cc (select): Eliminate redundant select_stuff::select_loop state. Eliminate redundant code for zero timeout. Do not return early on early timer return. (select_stuff::wait): Eliminate redundant select_stuff::select_loop state.
2016-03-20Debug printfs.John Hood
* fhandler.cc (fhandler_base::get_readahead): Add debug code. * fhandler_console.cc (fhandler_console::read): Add debug code. * select.cc (pselect): Add debug code. (peek_console): Add debug code.
2016-03-20Use high-resolution timebases for select().John Hood
* cygwait.h: Add cygwait_us() methods. * select.h: Change prototype for select_stuff::wait() for larger microsecond timeouts. * select.cc (pselect): Convert from old cygwin_select(). Implement microsecond timeouts. (cygwin_select): Rewrite as a wrapper on pselect(). (select): Implement microsecond timeouts. (select_stuff::wait): Implement microsecond timeouts with a timer object.
2016-03-20* winsup/testsuite/configure: chmod a+xJohn Hood
2016-03-20Move get_nonascii_key into fhandler_console.John Hood
* fhandler.h (fhandler_console): Move get_nonascii_key() from select.c into this class. * select.cc (peek_console): Move get_nonascii_key() into fhandler_console class.
2016-03-20respect datarootdirPeter Foley
Recent versions of autoconf define datadir/infodir in terms of datarootdir. Add it. winsup/ChangeLog * Makefile.in: define datarootdir Signed-off-by: Peter Foley <pefoley2@pefoley.com>
2016-03-20Fix strict aliasingPeter Foley
Fix a strict aliasing error detected by gcc 6.0+ winsup/cygwin/ChangeLog * pinfo.cc (winpids::enum_process): Fix strict aliasing. Signed-off-by: Peter Foley <pefoley2@pefoley.com>
2016-03-20Fix typoed comparisonPeter Foley
winsup/cygwin/ChangeLog * thread.cc (semaphore::open): Fix mistaken conditional. Signed-off-by: Peter Foley <pefoley2@pefoley.com>
2016-03-20The address of an class always evaluates to truePeter Foley
winsup/cygwin/pinfo.cc:465:14: error: the compiler can assume that the address of 'tc' will always evaluate to 'true' [-Werror=address] winsup/cygwin/ChangeLog * pinfo.cc (_pinfo::set_ctty): remove always true check. Signed-off-by: Peter Foley <pefoley2@pefoley.com>
2016-03-20Remove misleading indentationPeter Foley
* syscalls.cc (getpriority): Fix misleading indentation. Signed-off-by: Peter Foley <pefoley2@pefoley.com>
2016-03-20Add necessary braces to if statementsPeter Foley
The missing braces cause only the first expression to be guarded by the else clause. winsup/cygwin/ChangeLog * fhandler_disk_file.cc (facl): Add missing braces to if statement. * mount.cc (dos_drive_mappings): Add missing braces to if statement. Signed-off-by: Peter Foley <pefoley2@pefoley.com>
2016-03-20Remove dead code from fhandler_console.Peter Foley
This if is unconditionally false, so remove it. winsup/cygwin/fhandler_console.cc: In member function 'bool dev_console::fillin(HANDLE)': winsup/cygwin/fhandler_console.cc:740:22: error: self-comparison always evaluates to false [-Werror=tautological-compare] if (b.dwSize.Y != b.dwSize.Y || b.dwSize.X != b.dwSize.X) ~~~~~~~~~~~^~~~~~~~~~~~~ winsup/cygwin/fhandler_console.cc:740:50: error: self-comparison always evaluates to false [-Werror=tautological-compare] if (b.dwSize.Y != b.dwSize.Y || b.dwSize.X != b.dwSize.X) ~~~~~~~~~~~^~~~~~~~~~~~~ winsup/cygwin/ChangeLog * fhandle_console.cc (fillin): remove dead code Signed-off-by: Peter Foley <pefoley2@pefoley.com>
2016-03-20Remove unused and unsafe call to __builtin_frame_addressPeter Foley
initial_sp has been unused since commit fbf23e3 back in 2000. Keep the value, so as to avoid changing the offset of magic_biscuit. winsup/cygwin/lib/_cygwin_crt0_common.cc:140:52: error: calling 'void* __builtin_frame_address(unsigned int)' with a nonzero argument is unsafe [-Werror=frame-address] u->initial_sp = (char *) __builtin_frame_address (1); winsup/cygwin/ChangeLog lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Initialize initial_sp with nullptr. Signed-off-by: Peter Foley <pefoley2@pefoley.com>
2016-03-19winsup: Move all old CVS Changelogs into CVSChangeLogs.old dirCorinna Vinschen
2016-03-19Remove ill-advised cygwin_propsCorinna Vinschen
Cygwin_props have been invented to allow switching off the unique installation keys in the first place, supposedly for debugging. This never really was a good idea, after all we *want* the installations to be independent and there's no good reason to break that, not even for debugging purposes. Other than that, cygwin_props were meant to be used for some other global settings which never took place. There's just no good reason to tweak the DLL binary invisibly where a setting could be done in a file or the environment. This patch removes the cygwin_props entirely, including the related settings in cygcheck. cygwin: * cygprops.h: Remove file. * globals.cc (cygwin_props): Remove. * cygheap.cc (init_cygheap::init_installation_root): Drop removing installation key. utils: * cygcheck.cc: Drop including cygprops.h. Remove now unused option values. (unique_object_name_opt): Remove. (handle_unique_object_name): Remove function. (usage): Remove text for unique-object-names options. (longopts): Remove unique-object-names options. (main): Drop handling unique-object-names options. doc: * utils.xml (cygcheck): Remove text for unique-object-names options. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-19Remove references to older Cygwin releases from documentationCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-18Implement getentropy for CygwinCorinna Vinschen
* miscfuncs.cc (getentropy): Move fhandler_dev_random::crypt_gen_random here and rename to getentropy. Fix type and return values to match getentropy requirements. * miscfuncs.h (getentropy): Add prototype. * fhandler.h (fhandler_dev_random::crypt_gen_random): Remove prototype. * fhandler_random.cc (fhandler_dev_random::crypt_gen_random): Drop. (fhandler_dev_random::write): Use getentropy instead. (fhandler_dev_random::read): Ditto. * fhandler_socket.cc (fhandler_socket::af_local_set_secret): Ditto. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-18Delete Cygwin's arc4random in favor of new Newlib implementationCorinna Vinschen
* Makefile.in (DLL_OFILES): Remove arc4random.o. * libc/arc4random.c: Remove file. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>