* 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.
This commit is contained in:
parent
a2db3c9288
commit
b1711a1f96
@ -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>
|
2001-09-15 Egor Duda <deo@logos-m.ru>
|
||||||
|
|
||||||
* winsup.api/ltp/sbrk01.c (main): Force output at startup to
|
* winsup.api/ltp/sbrk01.c (main): Force output at startup to
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
/* $Header$ */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (C) COPYRIGHT CRAY RESEARCH, INC.
|
* (C) COPYRIGHT CRAY RESEARCH, INC.
|
||||||
* UNPUBLISHED PROPRIETARY INFORMATION.
|
* UNPUBLISHED PROPRIETARY INFORMATION.
|
||||||
@ -7,9 +5,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#ifdef __CYGWIN__
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
char *
|
char *
|
||||||
get_high_address()
|
get_high_address()
|
||||||
{
|
{
|
||||||
|
#ifdef __CYGWIN__
|
||||||
|
return VirtualAlloc (NULL, 4096, MEM_COMMIT, PAGE_NOACCESS) + 2048;
|
||||||
|
#else
|
||||||
return (char *)sbrk(0) + 16384;
|
return (char *)sbrk(0) + 16384;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
/* $Header$ */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (C) COPYRIGHT CRAY RESEARCH, INC.
|
* (C) COPYRIGHT CRAY RESEARCH, INC.
|
||||||
* UNPUBLISHED PROPRIETARY INFORMATION.
|
* UNPUBLISHED PROPRIETARY INFORMATION.
|
||||||
|
@ -129,6 +129,8 @@ char *TCID="stat06"; /* Test program identifier. */
|
|||||||
int TST_TOTAL=8; /* Total number of test cases. */
|
int TST_TOTAL=8; /* Total number of test cases. */
|
||||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||||
|
|
||||||
|
extern char *get_high_address();
|
||||||
|
|
||||||
int exp_enos[]={0, 0};
|
int exp_enos[]={0, 0};
|
||||||
|
|
||||||
int high_address_setup();
|
int high_address_setup();
|
||||||
@ -327,11 +329,7 @@ high_address_setup()
|
|||||||
for (ind=0; Test_cases[ind].desc != NULL; ind++ ) {
|
for (ind=0; Test_cases[ind].desc != NULL; ind++ ) {
|
||||||
if ( Test_cases[ind].pathname == High_address ) {
|
if ( Test_cases[ind].pathname == High_address ) {
|
||||||
/*if ( strcmp(Test_cases[ind].pathname, HIGH_ADDRESS) == 0 ) { ***/
|
/*if ( strcmp(Test_cases[ind].pathname, HIGH_ADDRESS) == 0 ) { ***/
|
||||||
#ifndef __CYGWIN__
|
Test_cases[ind].pathname = get_high_address();
|
||||||
Test_cases[ind].pathname = (char *)(sbrk(0)+5);
|
|
||||||
#else
|
|
||||||
Test_cases[ind].pathname = (char *)0xffff0000;
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user