diff options
author | Bryan Ischo <bryan@ischo.com> | 2008-08-07 14:20:31 +0000 |
---|---|---|
committer | Bryan Ischo <bryan@ischo.com> | 2008-08-07 14:20:31 +0000 |
commit | 035dd9752eeefdcbb885bc234cda04563f68d319 (patch) | |
tree | 1854a13b20f9532cf9b767df55789362bfde76e6 /inc | |
parent | 744c19acf5d8dd7c02193bf3fafd2e6a548f43e4 (diff) | |
download | ceph-libs3-035dd9752eeefdcbb885bc234cda04563f68d319.tar.gz |
* Support build on Microsoft Windows via MingW
* Don't verify Amazon S3's SSL certificate, doing so causes problems
* Added error code to properly report the case where the SSL certificate
verification fails
Diffstat (limited to 'inc')
-rw-r--r-- | inc/libs3.h | 1 | ||||
-rw-r--r-- | inc/mingw/sys/select.h | 30 | ||||
-rw-r--r-- | inc/mingw/sys/utsname.h | 41 |
3 files changed, 72 insertions, 0 deletions
diff --git a/inc/libs3.h b/inc/libs3.h index e343214..c7910a7 100644 --- a/inc/libs3.h +++ b/inc/libs3.h @@ -241,6 +241,7 @@ typedef enum S3StatusAclXmlDocumentTooLarge , S3StatusNameLookupError , S3StatusFailedToConnect , + S3StatusServerFailedVerification , S3StatusConnectionFailed , S3StatusAbortedByCallback , diff --git a/inc/mingw/sys/select.h b/inc/mingw/sys/select.h new file mode 100644 index 0000000..0981da2 --- /dev/null +++ b/inc/mingw/sys/select.h @@ -0,0 +1,30 @@ +/** ************************************************************************** + * select.h + * + * Copyright 2008 Bryan Ischo <bryan@ischo.com> + * + * This file is part of libs3. + * + * libs3 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, version 3 of the License. + * + * In addition, as a special exception, the copyright holders give + * permission to link the code of this library and its programs with the + * OpenSSL library, and distribute linked combinations including the two. + * + * libs3 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 version 3 + * along with libs3, in a file named COPYING. If not, see + * <http://www.gnu.org/licenses/>. + * + ************************************************************************** **/ + +// This file is used only on a MingW build, and converts an include of +// sys/select.h to its Windows equivalent + +#include <winsock2.h> diff --git a/inc/mingw/sys/utsname.h b/inc/mingw/sys/utsname.h new file mode 100644 index 0000000..1e6b470 --- /dev/null +++ b/inc/mingw/sys/utsname.h @@ -0,0 +1,41 @@ +/** ************************************************************************** + * utsname.h + * + * Copyright 2008 Bryan Ischo <bryan@ischo.com> + * + * This file is part of libs3. + * + * libs3 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, version 3 of the License. + * + * In addition, as a special exception, the copyright holders give + * permission to link the code of this library and its programs with the + * OpenSSL library, and distribute linked combinations including the two. + * + * libs3 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 version 3 + * along with libs3, in a file named COPYING. If not, see + * <http://www.gnu.org/licenses/>. + * + ************************************************************************** **/ + +// This file is used only on a MingW build, and provides an implementation +// of POSIX sys/utsname.h + +#ifndef UTSNAME_H +#define UTSNAME_H + +struct utsname +{ + const char *sysname; + const char *machine; +}; + +int uname(struct utsname *); + +#endif /* UTSNAME_H */ |