[cairo-commit] 2 commits - build/configure.ac.system src/cairo-cff-subset.c src/cairo-ft-font.c src/cairo-output-stream.c src/cairo-path-stroke-boxes.c src/cairo-path-stroke.c src/cairo-path-stroke-polygon.c src/cairo-path-stroke-tristrip.c src/cairo-pdf-surface.c src/cairo-ps-surface.c src/cairo-scaled-font-subsets.c src/cairo-svg-surface.c src/cairo-toy-font-face.c src/cairo-truetype-subset.c src/cairo-type1-fallback.c src/cairo-type1-subset.c

Adrian Johnson ajohnson at kemper.freedesktop.org
Sat Sep 16 00:36:49 UTC 2017


 build/configure.ac.system        |    8 +++++---
 src/cairo-cff-subset.c           |    2 +-
 src/cairo-ft-font.c              |    2 +-
 src/cairo-output-stream.c        |    2 +-
 src/cairo-path-stroke-boxes.c    |    2 +-
 src/cairo-path-stroke-polygon.c  |    2 +-
 src/cairo-path-stroke-tristrip.c |    2 +-
 src/cairo-path-stroke.c          |    2 +-
 src/cairo-pdf-surface.c          |    2 +-
 src/cairo-ps-surface.c           |    2 +-
 src/cairo-scaled-font-subsets.c  |    2 +-
 src/cairo-svg-surface.c          |    2 +-
 src/cairo-toy-font-face.c        |    2 +-
 src/cairo-truetype-subset.c      |    2 +-
 src/cairo-type1-fallback.c       |    2 +-
 src/cairo-type1-subset.c         |    2 +-
 16 files changed, 20 insertions(+), 18 deletions(-)

New commits:
commit 1220e3c6b8f94a00ac7afee15f21e6782655d97c
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sat Sep 2 19:17:37 2017 +0930

    replace _BSD_SOURCE with _DEFAULT_SOURCE
    
    fixes the warning:
    
    warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"

diff --git a/src/cairo-cff-subset.c b/src/cairo-cff-subset.c
index bd3bfde7..49d98119 100644
--- a/src/cairo-cff-subset.c
+++ b/src/cairo-cff-subset.c
@@ -41,7 +41,7 @@
  * http://www.adobe.com/content/dam/Adobe/en/devnet/font/pdfs/5177.Type2.pdf
  */
 
-#define _BSD_SOURCE /* for snprintf(), strdup() */
+#define _DEFAULT_SOURCE /* for snprintf(), strdup() */
 #include "cairoint.h"
 
 #include "cairo-array-private.h"
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 3b308757..3a4663d9 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -38,7 +38,7 @@
  *      Carl Worth <cworth at cworth.org>
  */
 
-#define _BSD_SOURCE /* for strdup() */
+#define _DEFAULT_SOURCE /* for strdup() */
 #include "cairoint.h"
 
 #include "cairo-error-private.h"
diff --git a/src/cairo-output-stream.c b/src/cairo-output-stream.c
index 369a59bf..07991703 100644
--- a/src/cairo-output-stream.c
+++ b/src/cairo-output-stream.c
@@ -33,7 +33,7 @@
  *	Kristian Høgsberg <krh at redhat.com>
  */
 
-#define _BSD_SOURCE /* for snprintf() */
+#define _DEFAULT_SOURCE /* for snprintf() */
 #include "cairoint.h"
 
 #include "cairo-output-stream-private.h"
diff --git a/src/cairo-path-stroke-boxes.c b/src/cairo-path-stroke-boxes.c
index 7f25bf76..fba170c6 100644
--- a/src/cairo-path-stroke-boxes.c
+++ b/src/cairo-path-stroke-boxes.c
@@ -36,7 +36,7 @@
  *	Chris Wilson <chris at chris-wilson.co.uk>
  */
 
-#define _BSD_SOURCE /* for hypot() */
+#define _DEFAULT_SOURCE /* for hypot() */
 #include "cairoint.h"
 
 #include "cairo-box-inline.h"
diff --git a/src/cairo-path-stroke-polygon.c b/src/cairo-path-stroke-polygon.c
index e5082bbe..29050fa7 100644
--- a/src/cairo-path-stroke-polygon.c
+++ b/src/cairo-path-stroke-polygon.c
@@ -37,7 +37,7 @@
  *	Chris Wilson <chris at chris-wilson.co.uk>
  */
 
-#define _BSD_SOURCE /* for hypot() */
+#define _DEFAULT_SOURCE /* for hypot() */
 #include "cairoint.h"
 
 #include "cairo-box-inline.h"
diff --git a/src/cairo-path-stroke-tristrip.c b/src/cairo-path-stroke-tristrip.c
index 6ce4131c..31787656 100644
--- a/src/cairo-path-stroke-tristrip.c
+++ b/src/cairo-path-stroke-tristrip.c
@@ -37,7 +37,7 @@
  *	Chris Wilson <chris at chris-wilson.co.uk>
  */
 
-#define _BSD_SOURCE /* for hypot() */
+#define _DEFAULT_SOURCE /* for hypot() */
 #include "cairoint.h"
 
 #include "cairo-box-inline.h"
diff --git a/src/cairo-path-stroke.c b/src/cairo-path-stroke.c
index 4d4ede81..64cec8f2 100644
--- a/src/cairo-path-stroke.c
+++ b/src/cairo-path-stroke.c
@@ -36,7 +36,7 @@
  *	Chris Wilson <chris at chris-wilson.co.uk>
  */
 
-#define _BSD_SOURCE /* for hypot() */
+#define _DEFAULT_SOURCE /* for hypot() */
 #include "cairoint.h"
 
 #include "cairo-box-inline.h"
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index c258b738..9e1547ea 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -39,7 +39,7 @@
  *	Adrian Johnson <ajohnson at redneon.com>
  */
 
-#define _BSD_SOURCE /* for snprintf() */
+#define _DEFAULT_SOURCE /* for snprintf() */
 #include "cairoint.h"
 
 #include "cairo-pdf.h"
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 1e020c05..e34f656c 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -53,7 +53,7 @@
  *   2. Using gs to do PS -> PDF and PDF -> PS will always work well.
  */
 
-#define _BSD_SOURCE /* for ctime_r(), snprintf(), strdup() */
+#define _DEFAULT_SOURCE /* for ctime_r(), snprintf(), strdup() */
 #include "cairoint.h"
 
 #include "cairo-ps.h"
diff --git a/src/cairo-scaled-font-subsets.c b/src/cairo-scaled-font-subsets.c
index bf05fbd5..a239ec9b 100644
--- a/src/cairo-scaled-font-subsets.c
+++ b/src/cairo-scaled-font-subsets.c
@@ -40,7 +40,7 @@
  *	Adrian Johnson <ajohnson at redneon.com>
  */
 
-#define _BSD_SOURCE /* for snprintf(), strdup() */
+#define _DEFAULT_SOURCE /* for snprintf(), strdup() */
 #include "cairoint.h"
 #include "cairo-error-private.h"
 
diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index 2a020c01..e04eccc0 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -39,7 +39,7 @@
  *	Carl Worth <cworth at cworth.org>
  */
 
-#define _BSD_SOURCE /* for snprintf() */
+#define _DEFAULT_SOURCE /* for snprintf() */
 #include "cairoint.h"
 
 #include "cairo-svg.h"
diff --git a/src/cairo-toy-font-face.c b/src/cairo-toy-font-face.c
index 4fe94ab0..516f3919 100644
--- a/src/cairo-toy-font-face.c
+++ b/src/cairo-toy-font-face.c
@@ -39,7 +39,7 @@
  *      Behdad Esfahbod <behdad at behdad.org>
  */
 
-#define _BSD_SOURCE /* for strdup() */
+#define _DEFAULT_SOURCE /* for strdup() */
 #include "cairoint.h"
 #include "cairo-error-private.h"
 
diff --git a/src/cairo-truetype-subset.c b/src/cairo-truetype-subset.c
index 62902cf7..86593bc7 100644
--- a/src/cairo-truetype-subset.c
+++ b/src/cairo-truetype-subset.c
@@ -40,7 +40,7 @@
  * http://www.microsoft.com/typography/specs/default.htm
  */
 
-#define _BSD_SOURCE /* for snprintf(), strdup() */
+#define _DEFAULT_SOURCE /* for snprintf(), strdup() */
 #include "cairoint.h"
 
 #include "cairo-array-private.h"
diff --git a/src/cairo-type1-fallback.c b/src/cairo-type1-fallback.c
index 4a657413..c8e7e908 100644
--- a/src/cairo-type1-fallback.c
+++ b/src/cairo-type1-fallback.c
@@ -33,7 +33,7 @@
  *	Adrian Johnson <ajohnson at redneon.com>
  */
 
-#define _BSD_SOURCE /* for snprintf(), strdup() */
+#define _DEFAULT_SOURCE /* for snprintf(), strdup() */
 #include "cairoint.h"
 
 #include "cairo-array-private.h"
diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
index 16f821d9..810dc9f7 100644
--- a/src/cairo-type1-subset.c
+++ b/src/cairo-type1-subset.c
@@ -40,7 +40,7 @@
  */
 
 
-#define _BSD_SOURCE /* for snprintf(), strdup() */
+#define _DEFAULT_SOURCE /* for snprintf(), strdup() */
 #include "cairoint.h"
 
 #include "cairo-array-private.h"
commit 117a3c27d48107cb9c570fee725105419b1251e3
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sat Sep 2 19:09:49 2017 +0930

    build: use _WIN32 instead of windows.h to check for windows build
    
    ifdef _WIN32 is the recommended way to check for a windows build [1]
    and avoids identifying cygwin as windows.
    
    based on the patch at [2]
    
    [1] https://lists.gnu.org/archive/html/autoconf/2012-02/msg00008.html
    [2] https://lists.gnu.org/archive/html/autoconf/2012-02/msg00009.html

diff --git a/build/configure.ac.system b/build/configure.ac.system
index b9d71c8d..915b42b4 100644
--- a/build/configure.ac.system
+++ b/build/configure.ac.system
@@ -110,9 +110,11 @@ dnl check for misc headers and functions
 AC_CHECK_HEADERS([libgen.h byteswap.h signal.h setjmp.h fenv.h sys/wait.h])
 AC_CHECK_FUNCS([ctime_r drand48 flockfile funlockfile getline link strndup])
 
-dnl check for win32 headers (this detects mingw as well)
-AC_CHECK_HEADERS([windows.h], have_windows=yes, have_windows=no)
-
+dnl Check if the runtime platform is a native Win32 host.
+AC_COMPILE_IFELSE([[
+#ifdef _WIN32
+ choke me
+#endif]], [have_windows=no], [have_windows=yes])
 
 dnl Possible headers for mkdir
 AC_CHECK_HEADERS([sys/stat.h io.h])


More information about the cairo-commit mailing list