Patchwork zstd: vendor python-zstandard 0.8.1

login
register
mail settings
Submitter Gregory Szorc
Date April 8, 2017, 9:35 p.m.
Message ID <cf3e6b83ac758bf30cfb.1491687312@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/20029/
State Accepted
Headers show

Comments

Gregory Szorc - April 8, 2017, 9:35 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1491687200 25200
#      Sat Apr 08 14:33:20 2017 -0700
# Node ID cf3e6b83ac758bf30cfb270c8b35df729375b0ed
# Parent  1064a296a2a74a0621b253392639ef6ca0be3e87
zstd: vendor python-zstandard 0.8.1

This contains a fix for compilation on BSDs.

#no-check-commit
Augie Fackler - April 8, 2017, 10:13 p.m.
queued, thanks

> On Apr 8, 2017, at 5:35 PM, Gregory Szorc <gregory.szorc@gmail.com> wrote:
> 
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc@gmail.com>
> # Date 1491687200 25200
> #      Sat Apr 08 14:33:20 2017 -0700
> # Node ID cf3e6b83ac758bf30cfb270c8b35df729375b0ed
> # Parent  1064a296a2a74a0621b253392639ef6ca0be3e87
> zstd: vendor python-zstandard 0.8.1
> 
> This contains a fix for compilation on BSDs.
> 
> #no-check-commit
> 
> diff --git a/contrib/python-zstandard/NEWS.rst b/contrib/python-zstandard/NEWS.rst
> --- a/contrib/python-zstandard/NEWS.rst
> +++ b/contrib/python-zstandard/NEWS.rst
> @@ -1,6 +1,11 @@
> Version History
> ===============
> 
> +0.8.1 (released 2017-04-08)
> +---------------------------
> +
> +* Add #includes so compilation on OS X and BSDs works (#20).
> +
> 0.8.0 (released 2017-03-08)
> ---------------------------
> 
> diff --git a/contrib/python-zstandard/c-ext/python-zstandard.h b/contrib/python-zstandard/c-ext/python-zstandard.h
> --- a/contrib/python-zstandard/c-ext/python-zstandard.h
> +++ b/contrib/python-zstandard/c-ext/python-zstandard.h
> @@ -17,7 +17,7 @@
> #include "zdict.h"
> #include "zstdmt_compress.h"
> 
> -#define PYTHON_ZSTANDARD_VERSION "0.8.0"
> +#define PYTHON_ZSTANDARD_VERSION "0.8.1"
> 
> typedef enum {
> 	compressorobj_flush_finish,
> diff --git a/contrib/python-zstandard/zstd.c b/contrib/python-zstandard/zstd.c
> --- a/contrib/python-zstandard/zstd.c
> +++ b/contrib/python-zstandard/zstd.c
> @@ -11,6 +11,9 @@
> #if defined(_WIN32)
> #define WIN32_LEAN_AND_MEAN
> #include <Windows.h>
> +#elif defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
> +#include <sys/types.h>
> +#include <sys/sysctl.h>
> #endif
> 
> #include "python-zstandard.h"
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/contrib/python-zstandard/NEWS.rst b/contrib/python-zstandard/NEWS.rst
--- a/contrib/python-zstandard/NEWS.rst
+++ b/contrib/python-zstandard/NEWS.rst
@@ -1,6 +1,11 @@ 
 Version History
 ===============
 
+0.8.1 (released 2017-04-08)
+---------------------------
+
+* Add #includes so compilation on OS X and BSDs works (#20).
+
 0.8.0 (released 2017-03-08)
 ---------------------------
 
diff --git a/contrib/python-zstandard/c-ext/python-zstandard.h b/contrib/python-zstandard/c-ext/python-zstandard.h
--- a/contrib/python-zstandard/c-ext/python-zstandard.h
+++ b/contrib/python-zstandard/c-ext/python-zstandard.h
@@ -17,7 +17,7 @@ 
 #include "zdict.h"
 #include "zstdmt_compress.h"
 
-#define PYTHON_ZSTANDARD_VERSION "0.8.0"
+#define PYTHON_ZSTANDARD_VERSION "0.8.1"
 
 typedef enum {
 	compressorobj_flush_finish,
diff --git a/contrib/python-zstandard/zstd.c b/contrib/python-zstandard/zstd.c
--- a/contrib/python-zstandard/zstd.c
+++ b/contrib/python-zstandard/zstd.c
@@ -11,6 +11,9 @@ 
 #if defined(_WIN32)
 #define WIN32_LEAN_AND_MEAN
 #include <Windows.h>
+#elif defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+#include <sys/types.h>
+#include <sys/sysctl.h>
 #endif
 
 #include "python-zstandard.h"