Unfortunately, VC does not have snprintf, and sprintf_s supported only in vc2005

Fortunately, we don't need it here too badly.
This commit is contained in:
Stanislav Malyshev 2007-02-24 02:50:58 +00:00
parent 33956fc358
commit b415e3da5a

View file

@ -273,8 +273,8 @@ TSRM_API int shmget(int key, int size, int flags)
return -1; return -1;
} }
snprintf(shm_segment, sizeof(shm_segment), "TSRM_SHM_SEGMENT:%d", key); sprintf(shm_segment, "TSRM_SHM_SEGMENT:%d", key);
snprintf(shm_info, sizeof(shm_info), "TSRM_SHM_DESCRIPTOR:%d", key); sprintf(shm_info, "TSRM_SHM_DESCRIPTOR:%d", key);
shm_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_segment); shm_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_segment);
info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info); info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info);