OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.1/] [sim/] [testsuite/] [sim/] [cris/] [c/] [writev1.c] - Rev 227

Compare with Previous | Blame | View Log

/* Trivial test of writev.
#notarget: cris*-*-elf
#output: abcdefghijklmn\npass\n
*/
#include <sys/uio.h>
#include <stdlib.h>
#include <stdio.h>
 
#define X(x) {x, sizeof (x) -1}
struct iovec v[] = {
  X("a"),
  X("bcd"),
  X("efghi"),
  X("j"),
  X("klmn\n"),
};
 
int main (void)
{
  if (writev (1, v, sizeof v / sizeof (v[0])) != 15)
    abort ();
 
  printf ("pass\n");
  return 0; 
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.