view lib/net.c @ 1243:eae29e8e2bc8 draft

_mkflags_ had an issue for generating FLAG_xxxx macros for long options. Only the first __long__ option, without any __short__ option had a proper flag value, rest all were defined to ZERO. Becaus the _flist_ was not moved to the next in this case.
author Ashwini Sharma <ak.ashwini1981@gmail.com>
date Wed, 09 Apr 2014 07:40:02 -0500
parents e11684e3bbc5
children
line wrap: on
line source

#include "toys.h"

int xsocket(int domain, int type, int protocol)
{
  int fd = socket(domain, type, protocol);

  if (fd < 0) perror_exit("socket %x %x", type, protocol);
  return fd;
}