Skip to content

Commit ce6d08a

Browse files
RANDOM_BSWAP32 is no longer used so it has been deleted.
1 parent 278a1d2 commit ce6d08a

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

ext/random/php_random.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -217,30 +217,16 @@ PHPAPI ZEND_EXTERN_MODULE_GLOBALS(random)
217217
/* Bytes swap */
218218
#ifdef _MSC_VER
219219
# include <stdlib.h>
220-
# define RANDOM_BSWAP32(u) _byteswap_ulong(u)
221220
# define RANDOM_BSWAP64(u) _byteswap_uint64(u)
222221
#else
223222
# ifdef __GNUC__
224-
# define RANDOM_BSWAP32(u) __builtin_bswap32(u)
225223
# define RANDOM_BSWAP64(u) __builtin_bswap64(u)
226224
# elif defined(__has_builtin)
227-
# if __has_builtin(__builtin_bswap32)
228-
# define RANDOM_BSWAP32(u) __builtin_bswap32(u)
229-
# endif // __has_builtin(__builtin_bswap32)
230225
# if __has_builtin(__builtin_bswap64)
231226
# define RANDOM_BSWAP64(u) __builtin_bswap64(u)
232227
# endif // __has_builtin(__builtin_bswap64)
233228
# endif // __GNUC__
234229
#endif // _MSC_VER
235-
#ifndef RANDOM_BSWAP32
236-
static inline uint32_t RANDOM_BSWAP32(uint32_t u)
237-
{
238-
return (((u & 0xff000000) >> 24)
239-
| ((u & 0x00ff0000) >> 8)
240-
| ((u & 0x0000ff00) << 8)
241-
| ((u & 0x000000ff) << 24));
242-
}
243-
#endif
244230
#ifndef RANDOM_BSWAP64
245231
static inline uint64_t RANDOM_BSWAP64(uint64_t u)
246232
{

0 commit comments

Comments
 (0)