agent/
[gnupg.git] / jnlib / w32-afunix.h
blob6b8f3f95409d57e56ec3fa76964f5831d6cb11d7
1 /* w32-afunix.h - AF_UNIX emulation for Windows
2 * Copyright (C) 2004, 2006 g10 Code GmbH
4 * This file is part of JNLIB.
6 * JNLIB is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation; either version 3 of
9 * the License, or (at your option) any later version.
11 * JNLIB is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #ifdef _WIN32
21 #ifndef W32AFUNIX_DEFS_H
22 #define W32AFUNIX_DEFS_H
24 #include <sys/types.h>
25 #include <windows.h>
26 #include <ws2tcpip.h>
27 #include <unistd.h>
29 #define DIRSEP_C '\\'
31 #define AF_LOCAL AF_UNIX
32 /* We need to prefix the structure with a sockaddr_in header so we can
33 use it later for sendto and recvfrom. */
34 struct sockaddr_un
36 short sun_family;
37 unsigned short sun_port;
38 struct in_addr sun_addr;
39 char sun_path[108-2-4]; /* Path name. */
43 int _w32_close (int fd);
44 int _w32_sock_new (int domain, int type, int proto);
45 int _w32_sock_connect (int sockfd, struct sockaddr *addr, int addrlen);
48 #endif /*W32AFUNIX_DEFS_H*/
49 #endif /*_WIN32*/