svn: /pecl/wincache/trunk/ precomp.h wincache_filemap.c wincache_utils.c wincache_utils.h
| From: | Kanwaljeet Singla | Date: | Wed, 04 Nov 2009 19:09:13 +0000 |
| Subject: | svn: /pecl/wincache/trunk/ precomp.h wincache_filemap.c wincache_utils.c wincache_utils.h | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-13230@lists.php.net to get a copy of this message | ||
ksingla Wed, 04 Nov 2009 19:09:13 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=290211
Log:
Moved function declaration to wincache_utils.h
Changed paths:
U pecl/wincache/trunk/precomp.h
U pecl/wincache/trunk/wincache_filemap.c
U pecl/wincache/trunk/wincache_utils.c
U pecl/wincache/trunk/wincache_utils.h
Modified: pecl/wincache/trunk/precomp.h
===================================================================
--- pecl/wincache/trunk/precomp.h 2009-11-04 16:56:32 UTC (rev 290210)
+++ pecl/wincache/trunk/precomp.h 2009-11-04 19:09:13 UTC (rev 290211)
@@ -89,7 +89,6 @@
#endif
#if (defined(_MSC_VER) && (_MSC_VER < 1500))
-int wincache_php_snprintf_s(char *buf, size_t len, size_t len2, const char *format,...);
#define memcpy_s(dst, size, src, cnt) memcpy(dst, src, cnt)
#define sprintf_s(buffer, size, format) sprintf(buffer, format)
#define _snprintf_s wincache_php_snprintf_s
Modified: pecl/wincache/trunk/wincache_filemap.c
===================================================================
--- pecl/wincache/trunk/wincache_filemap.c 2009-11-04 16:56:32 UTC (rev 290210)
+++ pecl/wincache/trunk/wincache_filemap.c 2009-11-04 19:09:13 UTC (rev 290211)
@@ -31,7 +31,6 @@
+----------------------------------------------------------------------------------------------+
*/
-
#include "precomp.h"
#define FILEMAP_INFO_HEADER_SIZE ALIGNQWORD(sizeof(filemap_information_header))
@@ -334,7 +333,6 @@
namelen += strlen(WCG(namesalt)) + 1;
}
-
/* Allocate memory to keep name of the information filemap */
pinfo->infoname = (char *)alloc_pemalloc(namelen);
if(pinfo->infoname == NULL)
@@ -344,7 +342,6 @@
}
ZeroMemory(pinfo->infoname, namelen);
-
/* Create name as FILE_INFORMATION_PREFIX_<ppid> */
if(WCG(namesalt) == NULL)
@@ -765,7 +762,6 @@
goto Finished;
}
-
/* Get the pointer to first free entry in the table */
pentry = (filemap_information_entry *)((char *)pinfoh + FILEMAP_INFO_HEADER_SIZE);
pentry = (filemap_information_entry *)((char *)pentry + (ffree *
FILEMAP_INFO_ENTRY_SIZE));
Modified: pecl/wincache/trunk/wincache_utils.c
===================================================================
--- pecl/wincache/trunk/wincache_utils.c 2009-11-04 16:56:32 UTC (rev 290210)
+++ pecl/wincache/trunk/wincache_utils.c 2009-11-04 19:09:13 UTC (rev 290211)
@@ -32,7 +32,6 @@
*/
#include "precomp.h"
-#include "php.h"
static unsigned int crc32_generate(int n);
@@ -284,12 +283,14 @@
#if (defined(_MSC_VER) && (_MSC_VER < 1500))
int wincache_php_snprintf_s(char *buf, size_t len, size_t len2, const char *format,...) /* {{{ */
{
- va_list ap;
- int cc;
- va_start(ap, format);
- cc = ap_php_snprintf(buf, len, format, ap);
- va_end(ap);
- return cc;
+ va_list arglist;
+ int retval = 0;
+
+ va_start(arglist, format);
+ retval = ap_php_snprintf(buf, len, format, arglist);
+ va_end(arglist);
+
+ return retval;
}
/* }}} */
#endif
Modified: pecl/wincache/trunk/wincache_utils.h
===================================================================
--- pecl/wincache/trunk/wincache_utils.h 2009-11-04 16:56:32 UTC (rev 290210)
+++ pecl/wincache/trunk/wincache_utils.h 2009-11-04 19:09:13 UTC (rev 290211)
@@ -41,4 +41,8 @@
extern char * utils_fullpath(const char * filename);
extern int utils_cwdcexec(char * buffer, unsigned int length TSRMLS_DC);
+#if (defined(_MSC_VER) && (_MSC_VER < 1500))
+extern int wincache_php_snprintf_s(char *buf, size_t len, size_t len2, const char *format,...);
+#endif
+
#endif /* _WINCACHE_UTILS_H_ */