OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gdb-6.8/] [pre-binutils-2.20.1-sync/] [sim/] [testsuite/] [sim/] [cris/] [c/] [sock1.c] - Blame information for rev 264

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 24 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.