com php-src: fix windows build: ext/session/mod_files.c

From: Date: Mon, 14 Apr 2014 21:29:38 +0000
Subject: com php-src: fix windows build: ext/session/mod_files.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-76895@lists.php.net to get a copy of this message
Commit: 24b72e7a277ad3b9127833c7c61bd5a8f5fee02e Author: Anatol Belski <ab@php.net> Mon, 14 Apr 2014 23:29:38 +0200 Parents: a186312832207437e4783024dcdece5232ac6c39 Branches: PHP-5.4 PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=24b72e7a277ad3b9127833c7c61bd5a8f5fee02e Log: fix windows build Changed paths: M ext/session/mod_files.c Diff: diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index a9501b2..36612ea 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -50,6 +50,12 @@ #define FILE_PREFIX "sess_" +#ifdef PHP_WIN32 +# ifndef O_NOFOLLOW +# define O_NOFOLLOW 0 +# endif +#endif + typedef struct { int fd; char *lastkey; @@ -166,7 +172,7 @@ static void ps_files_open(ps_files *data, const char *key TSRMLS_DC) } data->lastkey = estrdup(key); - + /* O_NOFOLLOW to prevent us from following evil symlinks */ #ifdef O_NOFOLLOW data->fd = VCWD_OPEN_MODE(buf, O_CREAT | O_RDWR | O_BINARY | O_NOFOLLOW, data->filemode);

« previous php.cvs (#76895) next »