[php-src] master: Remove redundant <libintl.h> include (#22477)
Peter Kokot via GitHub <[email protected]>
| Newsgroups | gmane.comp.php.cvs.general |
|---|---|
| Message-ID | <[email protected]> |
Author: Peter Kokot (petk)
Committer: GitHub (web-flow)
Pusher: petk
Date: 2026-06-27T18:36:21+02:00
Commit: https://github.com/php/php-src/commit/5ff2a95341a692a86646292317d61c63c96d5ca4
Raw diff: https://github.com/php/php-src/commit/5ff2a95341a692a86646292317d61c63c96d5ca4.diff
Remove redundant <libintl.h> include (#22477)
The HAVE_LIBINTL macro is defined only when the ext/gettext is enabled
during the build. Also, LC_MESSAGES have been moved to other places
since this header was initially included.
Changed paths:
M ext/standard/string.c
Diff:
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 006adc4467d3..006ec3509a67 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -23,10 +23,6 @@
# include <langinfo.h>
#endif
-#ifdef HAVE_LIBINTL
-# include <libintl.h> /* For LC_MESSAGES */
-#endif
-
#include "scanf.h"
#include "zend_API.h"
#include "zend_execute.h"
@@ -5763,7 +5759,7 @@ PHP_FUNCTION(substr_count)
static void php_str_pad_fill(zend_string *result, size_t pad_chars, const char *pad_str, size_t pad_str_len) {
char *p = ZSTR_VAL(result) + ZSTR_LEN(result);
-
+
if (pad_str_len == 1) {
memset(p, pad_str[0], pad_chars);
ZSTR_LEN(result) += pad_chars;
@@ -5778,7 +5774,7 @@ static void php_str_pad_fill(zend_string *result, size_t pad_chars, const char *
if (p < end) {
memcpy(p, pad_str, end - p);
}
-
+
ZSTR_LEN(result) += pad_chars;
}