mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Backport fix for GH-17687
Introducing a new attribute macro in lower branches is an ABI break and not allowed. However, we still need to fix the warnings such that -Werror builds don't break. So we copy the macro from the master branch to the C files in the appropriate places.
This commit is contained in:
parent
b39e17b06c
commit
fab0a6d75c
5 changed files with 28 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
/* This is a generated file, do not modify */
|
/* This is a generated file, do not modify */
|
||||||
/* Usage: php create_data_file.php /path/to/magic.mgc > data_file.c */
|
/* Usage: php create_data_file.php /path/to/magic.mgc > data_file.c */
|
||||||
const unsigned char php_magic_database[7955032] = {
|
const unsigned char php_magic_database[7955032] ZEND_NONSTRING = {
|
||||||
0x1C, 0x04, 0x1E, 0xF1, 0x12, 0x00, 0x00, 0x00, 0xD2, 0x3B, 0x00, 0x00, 0xD2, 0x16, 0x00, 0x00,
|
0x1C, 0x04, 0x1E, 0xF1, 0x12, 0x00, 0x00, 0x00, 0xD2, 0x3B, 0x00, 0x00, 0xD2, 0x16, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
|
|
@ -185,6 +185,12 @@ private struct {
|
||||||
{ NULL, 0, NULL }
|
{ NULL, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if __has_attribute(nonstring)
|
||||||
|
# define ZEND_NONSTRING __attribute__((nonstring))
|
||||||
|
#else
|
||||||
|
# define ZEND_NONSTRING
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "../data_file.c"
|
#include "../data_file.c"
|
||||||
|
|
||||||
#ifdef COMPILE_ONLY
|
#ifdef COMPILE_ONLY
|
||||||
|
|
|
@ -24,8 +24,14 @@
|
||||||
#include "php_pdo.h"
|
#include "php_pdo.h"
|
||||||
#include "php_pdo_driver.h"
|
#include "php_pdo_driver.h"
|
||||||
|
|
||||||
|
#if __has_attribute(nonstring)
|
||||||
|
# define ZEND_NONSTRING __attribute__((nonstring))
|
||||||
|
#else
|
||||||
|
# define ZEND_NONSTRING
|
||||||
|
#endif
|
||||||
|
|
||||||
struct pdo_sqlstate_info {
|
struct pdo_sqlstate_info {
|
||||||
const char state[5];
|
const char state[5] ZEND_NONSTRING;
|
||||||
const char *desc;
|
const char *desc;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -317,8 +317,14 @@ static const char sha256_rounds_prefix[] = "rounds=";
|
||||||
/* Maximum number of rounds. */
|
/* Maximum number of rounds. */
|
||||||
#define ROUNDS_MAX 999999999
|
#define ROUNDS_MAX 999999999
|
||||||
|
|
||||||
|
#if __has_attribute(nonstring)
|
||||||
|
# define ZEND_NONSTRING __attribute__((nonstring))
|
||||||
|
#else
|
||||||
|
# define ZEND_NONSTRING
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Table with characters for base64 transformation. */
|
/* Table with characters for base64 transformation. */
|
||||||
static const char b64t[64] =
|
static const char b64t[64] ZEND_NONSTRING =
|
||||||
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||||
|
|
||||||
char * php_sha256_crypt_r(const char *key, const char *salt, char *buffer, int buflen)
|
char * php_sha256_crypt_r(const char *key, const char *salt, char *buffer, int buflen)
|
||||||
|
|
|
@ -350,8 +350,14 @@ static const char sha512_rounds_prefix[] = "rounds=";
|
||||||
/* Maximum number of rounds. */
|
/* Maximum number of rounds. */
|
||||||
#define ROUNDS_MAX 999999999
|
#define ROUNDS_MAX 999999999
|
||||||
|
|
||||||
|
#if __has_attribute(nonstring)
|
||||||
|
# define ZEND_NONSTRING __attribute__((nonstring))
|
||||||
|
#else
|
||||||
|
# define ZEND_NONSTRING
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Table with characters for base64 transformation. */
|
/* Table with characters for base64 transformation. */
|
||||||
static const char b64t[64] =
|
static const char b64t[64] ZEND_NONSTRING =
|
||||||
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue