CVS update: php31/os/nt
| From: | shane | Date: | Sat, 17 Oct 1998 20:45:48 +0000 |
| Subject: | CVS update: php31/os/nt | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-1883@lists.php.net to get a copy of this message | ||
Date: Saturday October 17, 1998 @ 16:45
Author: shane
Update of /repository/php31/os/nt
In directory asf:/u2/tmp/cvs-serv29817/os/nt
Modified Files:
registry.c registry.h
Log Message:
fixes to get 3.1 compiling again under windows.
mysql ported from 3.0 then backported to 3.0
Some project file updates
porting other extensions from 3.0 in process.
fixes to registry functions to support binary
Index: php31/os/nt/registry.c
diff -c php31/os/nt/registry.c:1.8 php31/os/nt/registry.c:1.9
*** php31/os/nt/registry.c:1.8 Tue Sep 15 17:58:16 1998
--- php31/os/nt/registry.c Sat Oct 17 16:45:47 1998
***************
*** 48,59 ****
}
! PHPAPI BYTE *_php3_win32_reg_read(char *value_name,DWORD *dwType){
int i,found;
char *root, *path, *key_name, *p;
HKEY hkey;
LONG status;
- DWORD dwBufSize;
BYTE *pbuffer;
/*
--- 48,58 ----
}
! PHPAPI BYTE *_php3_win32_reg_read(char *value_name,DWORD *dwType, DWORD *dwBufSize){
int i,found;
char *root, *path, *key_name, *p;
HKEY hkey;
LONG status;
BYTE *pbuffer;
/*
***************
*** 103,109 ****
}
/* Determine necessary size of buffer */
! status = RegQueryValueEx(hkey, key_name, 0, dwType, NULL, &dwBufSize);
if (status != ERROR_SUCCESS) {
//php3_error(E_WARNING, "Failed to read registry value, Windows error %d", status);
efree(root);
--- 102,108 ----
}
/* Determine necessary size of buffer */
! status = RegQueryValueEx(hkey, key_name, 0, dwType, NULL, dwBufSize);
if (status != ERROR_SUCCESS) {
//php3_error(E_WARNING, "Failed to read registry value, Windows error %d", status);
efree(root);
***************
*** 111,121 ****
efree(key_name);
return 0;
}
! if (dwBufSize < 1)
! dwBufSize = 1;
! pbuffer = emalloc(dwBufSize);
! status = RegQueryValueEx(hkey, key_name, 0, dwType, pbuffer, &dwBufSize);
RegCloseKey(hkey);
/* dont want this error message here
--- 110,120 ----
efree(key_name);
return 0;
}
! if (*dwBufSize < 1)
! *dwBufSize = 1;
! pbuffer = emalloc(*dwBufSize);
! status = RegQueryValueEx(hkey, key_name, 0, dwType, pbuffer, dwBufSize);
RegCloseKey(hkey);
/* dont want this error message here
***************
*** 277,283 ****
/* first, check to see if HKEY_LOCAL_MACHINE\Software\PHP\use_reg = 1 */
snprintf(regkey,1024,"%s%s",PHP_REG_KEY,"use_reg");
! pbuffer = _php3_win32_reg_read(regkey,&dwType);
if (dwType != REG_DWORD) {
efree(pbuffer);
--- 276,282 ----
/* first, check to see if HKEY_LOCAL_MACHINE\Software\PHP\use_reg = 1 */
snprintf(regkey,1024,"%s%s",PHP_REG_KEY,"use_reg");
! pbuffer = _php3_win32_reg_read(regkey,&dwType,&dwbSize);
if (dwType != REG_DWORD) {
efree(pbuffer);
Index: php31/os/nt/registry.h
diff -c php31/os/nt/registry.h:1.5 php31/os/nt/registry.h:1.6
*** php31/os/nt/registry.h:1.5 Tue Sep 15 17:58:17 1998
--- php31/os/nt/registry.h Sat Oct 17 16:45:48 1998
***************
*** 36,42 ****
extern int _php3_win32_reg_init(INLINE_TLS_VOID);
! extern PHPAPI BYTE *_php3_win32_reg_read(char *value_name, DWORD *dwType);
extern PHPAPI RegKey *_php3_win32_reg_open(char *value_name INLINE_TLS);
extern PHPAPI BYTE *_php3_win32_reg_read_key(RegKey *pRegKey INLINE_TLS);
extern PHPAPI int _php3_win32_reg_read_value(RegKey *pRegKey, BYTE *name, DWORD *namesize, DWORD
*dwType, BYTE *pvData, DWORD *dwDataSize INLINE_TLS);
--- 36,42 ----
extern int _php3_win32_reg_init(INLINE_TLS_VOID);
! extern PHPAPI BYTE *_php3_win32_reg_read(char *value_name, DWORD *dwType, DWORD *dwBufSize);
extern PHPAPI RegKey *_php3_win32_reg_open(char *value_name INLINE_TLS);
extern PHPAPI BYTE *_php3_win32_reg_read_key(RegKey *pRegKey INLINE_TLS);
extern PHPAPI int _php3_win32_reg_read_value(RegKey *pRegKey, BYTE *name, DWORD *namesize, DWORD
*dwType, BYTE *pvData, DWORD *dwDataSize INLINE_TLS);
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net