com php-src: Wrap php_random.h in C++ portability m acros: ext/standard/hrtime.h ext/standard/php_random .h
| From: | Levi Morrison | Date: | Fri, 08 Nov 2019 14:58:26 +0000 |
| Subject: | com php-src: Wrap php_random.h in C++ portability m acros: ext/standard/hrtime.h ext/standard/php_random .h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-109220@lists.php.net to get a copy of this message | ||
Commit: 4a55794b980c3d4b85788f5adb7d1fe5ec1a58e3
Author: Levi Morrison <levim@php.net> Thu, 7 Nov 2019 14:51:21 -0700
Committer: Levi Morrison <levi.morrison@datadoghq.com> Fri, 8 Nov 2019 07:58:26 -0700
Parents: b9dfa12853c0f43ce76221d54cfd0568f674bac1
Branches: PHP-7.3 PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4a55794b980c3d4b85788f5adb7d1fe5ec1a58e3
Log:
Wrap php_random.h in C++ portability macros
Also remove portability headers. This goes against the existing
conventions of these files.
Changed paths:
M ext/standard/hrtime.h
M ext/standard/php_random.h
Diff:
diff --git a/ext/standard/hrtime.h b/ext/standard/hrtime.h
index 1c08b075026..b1d43ce55c8 100644
--- a/ext/standard/hrtime.h
+++ b/ext/standard/hrtime.h
@@ -20,8 +20,6 @@
#ifndef HRTIME_H
#define HRTIME_H
-#include <Zend/zend_portability.h>
-
#define PHP_HRTIME_PLATFORM_POSIX 0
#define PHP_HRTIME_PLATFORM_WINDOWS 0
#define PHP_HRTIME_PLATFORM_APPLE 0
diff --git a/ext/standard/php_random.h b/ext/standard/php_random.h
index 9bc53db09e9..dc92c86c67d 100644
--- a/ext/standard/php_random.h
+++ b/ext/standard/php_random.h
@@ -19,6 +19,8 @@
#ifndef PHP_RANDOM_H
#define PHP_RANDOM_H
+BEGIN_EXTERN_C()
+
PHP_FUNCTION(random_bytes);
PHP_FUNCTION(random_int);
@@ -48,6 +50,8 @@ extern PHPAPI int random_globals_id;
extern PHPAPI php_random_globals random_globals;
#endif
+END_EXTERN_C()
+
#endif
/*