Bladeren bron

Use _POSIX_C_SOURCE not _BSD_SOURCE.

_BSD_SOURCE has been deprecated (see bug). The manpage for printf
suggests that any _POSIX_C_SOURCE >= 200112L is also sufficient to bring
in the needed declarations and the bug reporter confirms that it's
sufficient for him.

https://code.google.com/p/chromium/issues/detail?id=419859

Change-Id: Ifc053f11c5aa1df35aae8e952d2c73a7f4599ec2
Reviewed-on: https://boringssl-review.googlesource.com/1890
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
Adam Langley 10 jaren geleden
bovenliggende
commit
ad912f348b
5 gewijzigde bestanden met toevoegingen van 8 en 10 verwijderingen
  1. +1
    -1
      crypto/bio/bio_test.c
  2. +2
    -2
      crypto/bio/printf.c
  3. +1
    -1
      crypto/lhash/lhash_test.c
  4. +3
    -3
      crypto/mem.c
  5. +1
    -3
      crypto/time_support.c

+ 1
- 1
crypto/bio/bio_test.c Bestand weergeven

@@ -12,7 +12,7 @@
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */

#define _BSD_SOURCE
#define _POSIX_C_SOURCE 201410L

#include <openssl/base.h>



+ 2
- 2
crypto/bio/printf.c Bestand weergeven

@@ -54,8 +54,8 @@
* copied and put under another distribution licence
* [including the GNU Public Licence.] */

#if !defined(_BSD_SOURCE)
#define _BSD_SOURCE /* for snprintf, vprintf etc */
#if !defined(_POSIX_C_SOURCE)
#define _POSIX_C_SOURCE 201410L /* for snprintf, vprintf etc */
#endif

#include <openssl/bio.h>


+ 1
- 1
crypto/lhash/lhash_test.c Bestand weergeven

@@ -12,7 +12,7 @@
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */

#define _BSD_SOURCE
#define _POSIX_C_SOURCE 201410L

#include <openssl/crypto.h>
#include <openssl/lhash.h>


+ 3
- 3
crypto/mem.c Bestand weergeven

@@ -53,9 +53,7 @@
* copied and put under another distribution licence
* [including the GNU Public Licence.] */

#if !defined(_BSD_SOURCE)
#define _BSD_SOURCE /* needed for strdup, snprintf, vprintf etc */
#endif
#define _POSIX_C_SOURCE 201410L /* needed for strdup, snprintf, vprintf etc */

#include <openssl/mem.h>

@@ -66,6 +64,8 @@

#if defined(OPENSSL_WINDOWS)
#include <Windows.h>
#else
#include <strings.h>
#endif




+ 1
- 3
crypto/time_support.c Bestand weergeven

@@ -55,9 +55,7 @@
* (eay@cryptsoft.com). This product includes software written by Tim
* Hudson (tjh@cryptsoft.com). */

#if !defined(_BSD_SOURCE)
#define _BSD_SOURCE /* for gmtime_r */
#endif
#define _POSIX_C_SOURCE 201410L /* for gmtime_r */

#include <openssl/time_support.h>



Laden…
Annuleren
Opslaan