File: foundation_network.c

package info (click to toggle)
haskell-foundation 0.0.30-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 932 kB
  • sloc: haskell: 9,124; ansic: 570; makefile: 7
file content (17 lines) | stat: -rw-r--r-- 272 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "foundation_system.h"

#if defined(FOUNDATION_SYSTEM_WINDOWS)
# include <winsock2.h>
#else
# include "netdb.h"
#endif


int foundation_network_get_h_errno(void)
{
#if defined(FOUNDATION_SYSTEM_WINDOWS)
  return WSAGetLastError();
#else
  return h_errno;
#endif
}