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
diff options
context:
space:
mode:
authorEgor Duda <deo@logos-m.ru>2001-09-20 19:44:41 +0400
committerEgor Duda <deo@logos-m.ru>2001-09-20 19:44:41 +0400
commitb1711a1f96d2059216cedb9dadcb3d9479b4cb9d (patch)
tree61fff1c6885d08419b4fec1272deea659710e268 /winsup
parenta2db3c9288de0329591f7cdd3f87af2c020b4be4 (diff)
* 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.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/testsuite/ChangeLog7
-rw-r--r--winsup/testsuite/libltp/lib/get_high_address.c9
-rw-r--r--winsup/testsuite/libltp/lib/search_path.c2
-rw-r--r--winsup/testsuite/winsup.api/ltp/stat06.c8
4 files changed, 17 insertions, 9 deletions
diff --git a/winsup/testsuite/ChangeLog b/winsup/testsuite/ChangeLog
index c95966b8e..a08e413bb 100644
--- a/winsup/testsuite/ChangeLog
+++ b/winsup/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2001-09-20 Egor Duda <deo@logos-m.ru>
+
+ * 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.
+
2001-09-15 Egor Duda <deo@logos-m.ru>
* winsup.api/ltp/sbrk01.c (main): Force output at startup to
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 <unistd.h>
+#ifdef __CYGWIN__
+#include <windows.h>
+#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.
diff --git a/winsup/testsuite/winsup.api/ltp/stat06.c b/winsup/testsuite/winsup.api/ltp/stat06.c
index 6da1507da..90ee05a4c 100644
--- a/winsup/testsuite/winsup.api/ltp/stat06.c
+++ b/winsup/testsuite/winsup.api/ltp/stat06.c
@@ -129,6 +129,8 @@ char *TCID="stat06"; /* Test program identifier. */
int TST_TOTAL=8; /* Total number of test cases. */
extern int Tst_count; /* Test Case counter for tst_* routines */
+extern char *get_high_address();
+
int exp_enos[]={0, 0};
int high_address_setup();
@@ -327,11 +329,7 @@ high_address_setup()
for (ind=0; Test_cases[ind].desc != NULL; ind++ ) {
if ( Test_cases[ind].pathname == High_address ) {
/*if ( strcmp(Test_cases[ind].pathname, HIGH_ADDRESS) == 0 ) { ***/
-#ifndef __CYGWIN__
- Test_cases[ind].pathname = (char *)(sbrk(0)+5);
-#else
- Test_cases[ind].pathname = (char *)0xffff0000;
-#endif
+ Test_cases[ind].pathname = get_high_address();
break;
}
}