Commit 4c77d7f4 by Uros Bizjak

struct-ret-3.c: Include unistd.h.

	* gcc.dg/struct-ret-3.c: Include unistd.h.
	(main): Exit early if system memory page size is
	larger than 4096 bytes.

From-SVN: r143056
parent dcc31d11
2009-01-04 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/struct-ret-3.c: Include unistd.h.
(main): Exit early if system memory page size is
larger than 4096 bytes.
2009-01-04 Daniel Franke <franke.daniel@gmail.com>
PR fortran/38718
......
......@@ -7,6 +7,7 @@
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
unsigned long ossAlignX(unsigned long i, unsigned long X)
{
......@@ -69,6 +70,11 @@ int main(void)
char buf[sizeof(struct stuff)+4096];
struct stuff *u = (struct stuff *)ossAlignX((unsigned long)&buf[0], 4096);
/* This test assumes system memory page size of 4096 bytes or less. */
if (sysconf(_SC_PAGESIZE) > 4096)
return 0;
memset(u, 1, sizeof(struct stuff));
u->c1[0] = '\xAA';
u->c2[0] = '\xBB';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment