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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gdb/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [cris/] [c/] [sock1.c] - Rev 26

Compare with Previous | Blame | View Log

/*
#notarget: cris*-*-elf
*/
 
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
 
/* Check that socketcall is suitably stubbed.  */
 
int main (void)
{
  int ret = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP);
 
  if (ret != -1)
    {
      fprintf (stderr, "sock: %d\n", ret);
      abort ();
    }
 
  if (errno != ENOSYS)
    {
      perror ("unexpected");
      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.