2006-10-02 11:54:35 +00:00
|
|
|
/* w32-afunix.h - AF_UNIX emulation for Windows
|
|
|
|
* Copyright (C) 2004, 2006 g10 Code GmbH
|
2004-11-30 09:48:37 +00:00
|
|
|
*
|
2015-04-24 16:42:28 +02:00
|
|
|
* This file is part of GnuPG.
|
2004-11-30 09:48:37 +00:00
|
|
|
*
|
2015-04-24 16:42:28 +02:00
|
|
|
* GnuPG is free software; you can redistribute it and/or modify it
|
2011-09-30 12:52:11 +02:00
|
|
|
* under the terms of either
|
|
|
|
*
|
|
|
|
* - the GNU Lesser General Public License as published by the Free
|
|
|
|
* Software Foundation; either version 3 of the License, or (at
|
|
|
|
* your option) any later version.
|
|
|
|
*
|
|
|
|
* or
|
|
|
|
*
|
|
|
|
* - the GNU General Public License as published by the Free
|
|
|
|
* Software Foundation; either version 2 of the License, or (at
|
|
|
|
* your option) any later version.
|
|
|
|
*
|
|
|
|
* or both in parallel, as here.
|
2004-11-30 09:48:37 +00:00
|
|
|
*
|
2015-04-24 16:42:28 +02:00
|
|
|
* GnuPG is distributed in the hope that it will be useful, but
|
2004-11-30 09:48:37 +00:00
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2011-09-30 12:52:11 +02:00
|
|
|
* General Public License for more details.
|
2004-11-30 09:48:37 +00:00
|
|
|
*
|
2011-09-30 12:52:11 +02:00
|
|
|
* You should have received a copies of the GNU General Public License
|
|
|
|
* and the GNU Lesser General Public License along with this program;
|
|
|
|
* if not, see <http://www.gnu.org/licenses/>.
|
2004-11-30 09:48:37 +00:00
|
|
|
*/
|
2006-10-02 11:54:35 +00:00
|
|
|
|
2004-11-30 09:48:37 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
#ifndef W32AFUNIX_DEFS_H
|
|
|
|
#define W32AFUNIX_DEFS_H
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <windows.h>
|
2004-12-13 15:49:56 +00:00
|
|
|
#include <ws2tcpip.h>
|
2004-11-30 09:48:37 +00:00
|
|
|
#include <unistd.h>
|
|
|
|
|
2010-03-01 12:49:17 +00:00
|
|
|
/* We can easiliy replace this code by the socket wrappers from libassuan. */
|
2015-11-27 17:53:52 +01:00
|
|
|
#warning Remove this code; it is only used on w32 by symcryptrun.
|
2010-03-01 12:49:17 +00:00
|
|
|
|
2004-11-30 09:48:37 +00:00
|
|
|
#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. */
|
|
|
|
};
|
|
|
|
|
2007-10-01 14:48:39 +00:00
|
|
|
|
2004-11-30 09:48:37 +00:00
|
|
|
int _w32_close (int fd);
|
|
|
|
int _w32_sock_new (int domain, int type, int proto);
|
|
|
|
int _w32_sock_connect (int sockfd, struct sockaddr *addr, int addrlen);
|
|
|
|
|
2007-10-01 14:48:39 +00:00
|
|
|
|
2004-11-30 09:48:37 +00:00
|
|
|
#endif /*W32AFUNIX_DEFS_H*/
|
|
|
|
#endif /*_WIN32*/
|