Add comments about internal headers (GH-15689)

A common convention is to name internal C header files as `*_int.h`.
Since a couple of these are actually installed, we add comments that
this is not supposed to happen, (a) to avoid installing further
internal headers, and (b) to pave the way to fix this in the next major
PHP version.

Somewhat special is php_gmp_int.h, where "int" is meant as abbreviation
for "interface".

Another common convention is appending `_priv` or `_private`, but since
there have not been any issues regarding these headers so far, we
refrain from adding respective comments to these headers.

Anyhow, it might be a good idea to introduce some common naming
convention for such internal/private headers.
This commit is contained in:
Christoph M. Becker 2024-09-08 16:11:25 +02:00 committed by GitHub
parent 7771ec07e5
commit 50b3a0d011
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 18 additions and 0 deletions

View File

@ -16,6 +16,8 @@
+----------------------------------------------------------------------+
*/
/* internal header; not supposed to be installed; FIXME but unfortunately is */
#ifndef ZEND_STRTOD_INT_H
#define ZEND_STRTOD_INT_H

View File

@ -1,3 +1,5 @@
/* interface header; needs to be installed; FIXME rename? */
#ifndef incl_PHP_GMP_INT_H
#define incl_PHP_GMP_INT_H

View File

@ -15,6 +15,8 @@
+----------------------------------------------------------------------+
*/
/* internal header; not supposed to be installed */
#ifndef PHP_PDO_DBLIB_INT_H
#define PHP_PDO_DBLIB_INT_H

View File

@ -14,6 +14,8 @@
+----------------------------------------------------------------------+
*/
/* internal header; not supposed to be installed */
#ifndef PHP_PDO_FIREBIRD_INT_H
#define PHP_PDO_FIREBIRD_INT_H

View File

@ -16,6 +16,8 @@
+----------------------------------------------------------------------+
*/
/* internal header; not supposed to be installed */
#ifndef PHP_PDO_MYSQL_INT_H
#define PHP_PDO_MYSQL_INT_H

View File

@ -14,6 +14,8 @@
+----------------------------------------------------------------------+
*/
/* internal header; not supposed to be installed */
#ifdef PHP_WIN32
# define PDO_ODBC_TYPE "Win32"
#endif

View File

@ -16,6 +16,8 @@
+----------------------------------------------------------------------+
*/
/* internal header; not supposed to be installed */
#ifndef PHP_PDO_PGSQL_INT_H
#define PHP_PDO_PGSQL_INT_H

View File

@ -12,6 +12,8 @@
+----------------------------------------------------------------------+
*/
/* internal header; not supposed to be installed; FIXME but unfortunately is */
#ifndef PHP_DIR_INT_H
#define PHP_DIR_INT_H

View File

@ -14,6 +14,8 @@
+----------------------------------------------------------------------+
*/
/* internal header; not supposed to be installed; FIXME but unfortunately is */
#if ZEND_DEBUG
#define emalloc_rel_orig(size) \