~ chicken-core (chicken-5) 16a6fb59b83aa1b00d68ef6af6565e74033bb0d4


commit 16a6fb59b83aa1b00d68ef6af6565e74033bb0d4
Author:     Peder Refsnes <peder.refsnes@gmail.com>
AuthorDate: Sat Oct 25 17:39:03 2014 +0200
Commit:     Peter Bex <peter.bex@xs4all.nl>
CommitDate: Fri Oct 31 15:41:14 2014 +0100

    Fix deprecation warning for _BSD_SOURCE
    
    When compiling any egg with CHICKEN you get a deprecation warning:
    
    /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
     # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
    
    On linux, `man feature_test_macros` states that the _BSD_SOURCE macro is
    deprecated in glibc 2.20.
    
    As suggested in the warning defining _DEFAULT_SOURCE makes the warning
    go away.
    
    Signed-off-by: Evan Hanson <evhan@foldling.org>
    Signed-off-by: Peter Bex <peter.bex@xs4all.nl>

diff --git a/chicken.h b/chicken.h
index 4caf9049..69e0b952 100644
--- a/chicken.h
+++ b/chicken.h
@@ -56,6 +56,13 @@
 # define _SVID_SOURCE
 #endif
 
+/*
+ * glibc >= 2.20 synonym for _BSD_SOURCE & _SVID_SOURCE.
+ */
+#ifndef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE
+#endif
+
 /*
  * N.B. This file MUST not rely upon "chicken-config.h"
  */
Trap