X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-fprintf-posix3.c;h=375d0c6d14331cbffd53a5f692280df904e70979;hb=bbfcd2f1a92c9bdbb8d7d7d0a8a8c6665c316747;hp=1f13fd484868bc7edb4bee6f2afff9ca0bdc2abb;hpb=45d39ca1cae74fcf58ec9911e771bc8baca63f66;p=gnulib.git diff --git a/tests/test-fprintf-posix3.c b/tests/test-fprintf-posix3.c index 1f13fd484..375d0c6d1 100644 --- a/tests/test-fprintf-posix3.c +++ b/tests/test-fprintf-posix3.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible fprintf() function. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -54,7 +54,7 @@ main (int argc, char *argv[]) /* Limit the amount of malloc()ed memory to MAX_ALLOC_TOTAL or less. */ - /* On BSD systems, malloc() is limited by RLIMIT_DATA. */ + /* On AIX systems, malloc() is limited by RLIMIT_DATA. */ #if HAVE_GETRLIMIT && HAVE_SETRLIMIT && defined RLIMIT_DATA { struct rlimit limit; @@ -68,12 +68,14 @@ main (int argc, char *argv[]) } } #endif - /* On Linux systems, malloc() is limited by RLIMIT_AS. + /* On all systems except AIX and OpenBSD, malloc() is limited by RLIMIT_AS. On some systems, setrlimit of RLIMIT_AS doesn't work but get_rusage_as () does. Allow the address space size to grow by at most MAX_ALLOC_TOTAL. */ initial_rusage_as = get_rusage_as (); +#if !defined _AIX if (initial_rusage_as == 0) return 77; +#endif arg = atoi (argv[1]); if (arg == 0)