*
* Version $Id$
*/
-
/*
- Copyright (C) 2000-2005 Kern Sibbald
+ Copyright (C) 2000-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
- modify it under the terms of 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.
+ modify it under the terms of the GNU General Public License
+ version 2 as amended with additional clauses defined in the
+ file LICENSE in the main source directory.
This program 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
- General Public License for more details.
-
- You should have received a copy of the GNU 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.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ the file LICENSE for additional details.
*/
#define _LANGUAGE_C_PLUS_PLUS 1
#endif
-#ifdef HAVE_WIN32
+#ifdef WIN32
+#ifdef HAVE_MINGW
+#include "mingwconfig.h"
+#include "winhost.h"
+#define _STAT_H /* don't pull in MinGW stat.h */
+#define _STAT_DEFINED /* don't pull in MinGW stat.h */
+#else
#include "winconfig.h"
#include "winhost.h"
+#endif
#else
#include "config.h"
#include "host.h"
#if HAVE_ALLOCA_H
#include <alloca.h>
#endif
+
#include <errno.h>
#include <fcntl.h>
+/* O_NOATIME is defined at fcntl.h when supported */
+#ifndef O_NOATIME
+#define O_NOATIME 0
+#endif
+
#ifdef xxxxx
#ifdef HAVE_GETOPT_LONG
#include <getopt.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
-#ifdef HAVE_WIN32
+#if defined(HAVE_WIN32) & !defined(HAVE_MINGW)
#include <winsock2.h>
#else
-#include <sys/stat.h>
+//#include <sys/stat.h>
#endif
#include <sys/time.h>
#if HAVE_SYS_WAIT_H
#include <arpa/inet.h>
#include <pthread.h>
+#ifdef HAVE_OPENSSL
+/* fight OpenSSL namespace pollution */
+#define STORE OSSL_STORE
+#include <openssl/ssl.h>
+#include <openssl/x509v3.h>
+#include <openssl/rand.h>
+#include <openssl/err.h>
+#include <openssl/asn1.h>
+#include <openssl/asn1t.h>
+#undef STORE
+#endif
+
/* Local Bacula includes. Be sure to put all the system
* includes before these.
*/