From b1711a1f96d2059216cedb9dadcb3d9479b4cb9d Mon Sep 17 00:00:00 2001 From: Egor Duda Date: Thu, 20 Sep 2001 15:44:41 +0000 Subject: * libltp/lib/get_high_address.c (get_high_address): Get inaccessible address more robustly. * winsup.api/ltp/stat06.c (high_address_setup): Use generic function from ltp library to obtain inaccessible address. --- winsup/testsuite/libltp/lib/get_high_address.c | 9 +++++++-- winsup/testsuite/libltp/lib/search_path.c | 2 -- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'winsup/testsuite/libltp/lib') diff --git a/winsup/testsuite/libltp/lib/get_high_address.c b/winsup/testsuite/libltp/lib/get_high_address.c index 3b4105743..5fe1e81b2 100644 --- a/winsup/testsuite/libltp/lib/get_high_address.c +++ b/winsup/testsuite/libltp/lib/get_high_address.c @@ -1,5 +1,3 @@ -/* $Header$ */ - /* * (C) COPYRIGHT CRAY RESEARCH, INC. * UNPUBLISHED PROPRIETARY INFORMATION. @@ -7,9 +5,16 @@ */ #include +#ifdef __CYGWIN__ +#include +#endif char * get_high_address() { +#ifdef __CYGWIN__ + return VirtualAlloc (NULL, 4096, MEM_COMMIT, PAGE_NOACCESS) + 2048; +#else return (char *)sbrk(0) + 16384; +#endif } diff --git a/winsup/testsuite/libltp/lib/search_path.c b/winsup/testsuite/libltp/lib/search_path.c index d6570cb59..6663da507 100644 --- a/winsup/testsuite/libltp/lib/search_path.c +++ b/winsup/testsuite/libltp/lib/search_path.c @@ -1,5 +1,3 @@ -/* $Header$ */ - /* * (C) COPYRIGHT CRAY RESEARCH, INC. * UNPUBLISHED PROPRIETARY INFORMATION. -- cgit v1.2.3