Pull in HEAD changes

This commit is contained in:
Corinna Vinschen 2011-03-28 20:16:57 +00:00
parent 1dd989c91c
commit d8a7d742cb
8 changed files with 80 additions and 5 deletions

View File

@ -1,3 +1,28 @@
2011-03-27 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* cygwin.din (strchrnul): Export.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* posix.sgml (std-gnu): Add strchrnul.
2011-03-27 Christopher Faylor <me.cygwin2011@cgf.cx>
* dll_init.cc (dll::init): Accommodate ill-behaved dlls who don't fill
out p.envptr.
2011-03-25 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (mmap64): Add a cheat to let a certain autoconf test succeed
on 64 bit systems. Explain why.
2011-03-23 Christopher Faylor <me.cygwin2011@cgf.cx>
* wincap.cc (wincap_2003): Set use_dont_resolve_hack to true.
2011-03-23 Christopher Faylor <me.cygwin2011@cgf.cx>
* autoload.cc (dll_load): Change error message to make it clear if a
newer DLL is being run.
2011-03-20 Corinna Vinschen <corinna@vinschen.de>
* fenv.cc (_feinitialise): Don't use SSE instructions on systems not

View File

@ -278,7 +278,7 @@ std_dll_init ()
else if ((func->decoration & 1))
dll->handle = INVALID_HANDLE_VALUE;
else
api_fatal ("could not load %W, %E", dll_path);
api_fatal ("unable to load %W, %E", dll_path);
}
fesetenv (&fpuenv);
}

View File

@ -1588,6 +1588,7 @@ strcat NOSIGFE
_strcat = strcat NOSIGFE
strchr NOSIGFE
_strchr = strchr NOSIGFE
strchrnul NOSIGFE
strcmp NOSIGFE
_strcmp = strcmp NOSIGFE
strcoll NOSIGFE

View File

@ -76,7 +76,10 @@ dll::init ()
int ret = 1;
/* This should be a no-op. Why didn't we just import this variable? */
*(p.envptr) = __cygwin_environ;
if (!p.envptr)
p.envptr = &__cygwin_environ;
else
*(p.envptr) = __cygwin_environ;
/* Don't run constructors or the "main" if we've forked. */
if (!in_forkee)

View File

@ -400,14 +400,15 @@ details. */
234: Export program_invocation_name, program_invocation_short_name.
235: Export madvise.
236: Export pthread_yield, __xpg_strerror_r.
237: Export pthread_spin_destroy, pthread_spin_init, pthread_spin_lock,
237: Export strchrnul.
238: Export pthread_spin_destroy, pthread_spin_init, pthread_spin_lock,
pthread_spin_trylock, pthread_spin_unlock.
*/
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
#define CYGWIN_VERSION_API_MAJOR 0
#define CYGWIN_VERSION_API_MINOR 237
#define CYGWIN_VERSION_API_MINOR 238
/* There is also a compatibity version number associated with the
shared memory regions. It is incremented when incompatible

View File

@ -801,6 +801,50 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, _off64_t off)
/* mmap /dev/zero is like MAP_ANONYMOUS. */
if (fh->get_device () == FH_ZERO)
flags |= MAP_ANONYMOUS;
/* The autoconf mmap test maps a file of size 1 byte. It then tests
every byte of the entire mapped page of 64K for 0-bytes since that's
what POSIX requires. The problem is, we can't create that mapping on
64 bit systems. The file mapping will be only a single page, 4K, and
since 64 bit systems don't support the AT_ROUND_TO_PAGE flag, the
remainder of the 64K slot will result in a SEGV when accessed.
So, what we do here is cheating for the sake of the autoconf test
on 64 bit systems. The justification is that there's very likely
no application actually utilizing the map beyond EOF, and we know that
all bytes beyond EOF are set to 0 anyway. If this test doesn't work
on 64 bit systems, it will result in not using mmap at all in a
package. But we want that mmap is treated as usable by autoconf,
regardless whether the autoconf test runs on a 32 bit or a 64 bit
system.
Ok, so we know exactly what autoconf is doing. The file is called
"conftest.txt", it has a size of 1 byte, the mapping size is the
pagesize, the requested protection is PROT_READ | PROT_WRITE, the
mapping is MAP_SHARED, the offset is 0.
If all these requirements are given, we just return an anonymous map.
This will help to get over the autoconf test even on 64 bit systems.
The tests are ordered for speed. */
if (wincap.is_wow64 ())
{
UNICODE_STRING fname;
IO_STATUS_BLOCK io;
FILE_STANDARD_INFORMATION fsi;
if (len == pagesize
&& prot == (PROT_READ | PROT_WRITE)
&& flags == MAP_SHARED
&& off == 0
&& (RtlSplitUnicodePath (fh->pc.get_nt_native_path (), NULL,
&fname),
wcscmp (fname.Buffer, L"conftest.txt") == 0)
&& NT_SUCCESS (NtQueryInformationFile (fh->get_handle (), &io,
&fsi, sizeof fsi,
FileStandardInformation))
&& fsi.EndOfFile.QuadPart == 1LL)
flags |= MAP_ANONYMOUS;
}
}
if (anonymous (flags) || fd == -1)

View File

@ -1117,6 +1117,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
pow10f
removexattr
setxattr
strchrnul
tdestroy
timegm
timelocal

View File

@ -319,7 +319,7 @@ wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_buggy_thread_startup:false,
has_fast_cwd:false,
has_restricted_raw_disk_access:false,
use_dont_resolve_hack:false,
use_dont_resolve_hack:true,
use_get_sec_info_on_dirs:true,
supports_sse:true,
};