Browse Source

MFB5.2: const keywording

migration/RELEASE_1_0_0
Nuno Lopes 20 years ago
parent
commit
c2b1be3549
  1. 4
      main/fopen_wrappers.c
  2. 2
      main/fopen_wrappers.h
  3. 2
      main/network.c

4
main/fopen_wrappers.c

@ -189,7 +189,7 @@ PHPAPI int php_check_open_basedir_ex(const char *path, int warn TSRMLS_DC)
/* {{{ php_fopen_and_set_opened_path /* {{{ php_fopen_and_set_opened_path
*/ */
static FILE *php_fopen_and_set_opened_path(const char *path, char *mode, char **opened_path TSRMLS_DC)
static FILE *php_fopen_and_set_opened_path(const char *path, const char *mode, char **opened_path TSRMLS_DC)
{ {
FILE *fp; FILE *fp;
@ -306,7 +306,7 @@ PHPAPI int php_fopen_primary_script(zend_file_handle *file_handle TSRMLS_DC)
* Tries to open a file with a PATH-style list of directories. * Tries to open a file with a PATH-style list of directories.
* If the filename starts with "." or "/", the path is ignored. * If the filename starts with "." or "/", the path is ignored.
*/ */
PHPAPI FILE *php_fopen_with_path(char *filename, char *mode, char *path, char **opened_path TSRMLS_DC)
PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const char *path, char **opened_path TSRMLS_DC)
{ {
char *pathbuf, *ptr, *end; char *pathbuf, *ptr, *end;
char *exec_fname; char *exec_fname;

2
main/fopen_wrappers.h

@ -31,7 +31,7 @@ PHPAPI int php_check_open_basedir(const char *path TSRMLS_DC);
PHPAPI int php_check_open_basedir_ex(const char *path, int warn TSRMLS_DC); PHPAPI int php_check_open_basedir_ex(const char *path, int warn TSRMLS_DC);
PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path TSRMLS_DC); PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path TSRMLS_DC);
PHPAPI FILE *php_fopen_with_path(char *filename, char *mode, char *path, char **opened_path TSRMLS_DC);
PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const char *path, char **opened_path TSRMLS_DC);
PHPAPI int php_is_url(char *path); PHPAPI int php_is_url(char *path);
PHPAPI char *php_strip_url_passwd(char *path); PHPAPI char *php_strip_url_passwd(char *path);

2
main/network.c

@ -103,7 +103,7 @@ int inet_aton(const char *, struct in_addr *);
# define PHP_GAI_STRERROR(x) (php_gai_strerror(x)) # define PHP_GAI_STRERROR(x) (php_gai_strerror(x))
/* {{{ php_gai_strerror /* {{{ php_gai_strerror
*/ */
static char *php_gai_strerror(int code)
static const char *php_gai_strerror(int code)
{ {
static struct { static struct {
int code; int code;

Loading…
Cancel
Save