/* {{{ php_check_safe_mode_include_dir
*/
-PHPAPI int php_check_safe_mode_include_dir(char *path TSRMLS_DC)
+PHPAPI int php_check_safe_mode_include_dir(const char *path TSRMLS_DC)
{
if (PG(safe_mode)) {
if (PG(safe_mode_include_dir) && *PG(safe_mode_include_dir)) {
/* {{{ 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;
* Tries to open a file with a PATH-style list of directories.
* 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 *exec_fname;
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_safe_mode_include_dir(char *path TSRMLS_DC);
+PHPAPI int php_check_safe_mode_include_dir(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 char *php_strip_url_passwd(char *path);
# define PHP_GAI_STRERROR(x) (php_gai_strerror(x))
/* {{{ php_gai_strerror
*/
-static char *php_gai_strerror(int code)
+static const char *php_gai_strerror(int code)
{
static struct {
int code;
* 5 - only check file
*/
-PHPAPI int php_checkuid_ex(const char *filename, char *fopen_mode, int mode, int flags)
+PHPAPI int php_checkuid_ex(const char *filename, const char *fopen_mode, int mode, int flags)
{
struct stat sb;
int ret, nofile=0;
return 0;
}
-PHPAPI int php_checkuid(const char *filename, char *fopen_mode, int mode) {
+PHPAPI int php_checkuid(const char *filename, const char *fopen_mode, int mode) {
#ifdef NETWARE
/* NetWare don't have uid*/
return 1;
#define CHECKUID_NO_ERRORS 0x01
BEGIN_EXTERN_C()
-PHPAPI int php_checkuid(const char *filename, char *fopen_mode, int mode);
-PHPAPI int php_checkuid_ex(const char *filename, char *fopen_mode, int mode, int flags);
+PHPAPI int php_checkuid(const char *filename, const char *fopen_mode, int mode);
+PHPAPI int php_checkuid_ex(const char *filename, const char *fopen_mode, int mode, int flags);
PHPAPI char *php_get_current_user(void);
END_EXTERN_C()