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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-7.1/] [sim/] [testsuite/] [sim/] [cris/] [c/] [sock1.c] - Blame information for rev 842

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
/*
2
#notarget: cris*-*-elf
3
*/
4
 
5
#include <sys/types.h>
6
#include <sys/socket.h>
7
#include <netinet/in.h>
8
#include <stdio.h>
9
#include <errno.h>
10
#include <stdlib.h>
11
 
12
/* Check that socketcall is suitably stubbed.  */
13
 
14
int main (void)
15
{
16
  int ret = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP);
17
 
18
  if (ret != -1)
19
    {
20
      fprintf (stderr, "sock: %d\n", ret);
21
      abort ();
22
    }
23
 
24
  if (errno != ENOSYS)
25
    {
26
      perror ("unexpected");
27
      abort ();
28
    }
29
 
30
  printf ("pass\n");
31
  return 0;
32
}

powered by: WebSVN 2.1.0

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