summaryrefslogtreecommitdiffstats
path: root/jnlib/w32-afunix.h
blob: 3678322993e0913ad45094f0b372cca8cdc45fa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* w32-afunix.h
 *	Copyright (C) 2004 g10 Code GmbH
 *
 * This file is part of GnuPG.
 *
 * GnuPG is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * GnuPG is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 
 */
#ifdef _WIN32
#ifndef W32AFUNIX_DEFS_H
#define W32AFUNIX_DEFS_H

#include <sys/types.h>
#include <windows.h>
#include <ws2tcpip.h>
#include <unistd.h>

#define DIRSEP_C '\\'

#define AF_LOCAL AF_UNIX
/* We need to prefix the structure with a sockaddr_in header so we can
   use it later for sendto and recvfrom. */
struct sockaddr_un
{
  short          sun_family;
  unsigned short sun_port;
  struct         in_addr sun_addr;
  char           sun_path[108-2-4]; /* Path name.  */
};

int _w32_close (int fd);
int _w32_sock_new (int domain, int type, int proto);
int _w32_sock_bind (int sockfd, struct sockaddr *addr, int addrlen);
int _w32_sock_connect (int sockfd, struct sockaddr *addr, int addrlen);

#endif /*W32AFUNIX_DEFS_H*/
#endif /*_WIN32*/