[INTERPRETER]
* BUG: Don't use FIONREAD if it does not exist. A workaround will have to be found! git-svn-id: svn://localhost/gambas/trunk@1213 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
7759900148
commit
ac3111a9eb
2 changed files with 9 additions and 5 deletions
|
@ -79,6 +79,8 @@ static int STREAM_get_readable(STREAM *stream, int *len)
|
|||
|
||||
//_IOCTL:
|
||||
|
||||
#ifdef FIONREAD
|
||||
|
||||
if (!stream->common.no_fionread)
|
||||
{
|
||||
ret = ioctl(fd, FIONREAD, len);
|
||||
|
@ -88,6 +90,8 @@ static int STREAM_get_readable(STREAM *stream, int *len)
|
|||
stream->common.no_fionread = TRUE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//_LSEEK:
|
||||
|
||||
if (!stream->common.no_lseek)
|
||||
|
|
|
@ -131,15 +131,15 @@ PUBLIC char *FILE_make_temp(int *len, char *pattern)
|
|||
if (len)
|
||||
{
|
||||
if (pattern)
|
||||
*len = snprintf(file_buffer, sizeof(file_buffer), FILE_TEMP_PATTERN, getuid(), getpid(), pattern);
|
||||
*len = snprintf(file_buffer, sizeof(file_buffer), FILE_TEMP_PATTERN, (int)getuid(), (int)getpid(), pattern);
|
||||
else
|
||||
{
|
||||
count++;
|
||||
*len = snprintf(file_buffer, sizeof(file_buffer), FILE_TEMP_FILE, getuid(), getpid(), count);
|
||||
*len = snprintf(file_buffer, sizeof(file_buffer), FILE_TEMP_FILE, (int)getuid(), (int)getpid(), count);
|
||||
}
|
||||
}
|
||||
else
|
||||
snprintf(file_buffer, sizeof(file_buffer), FILE_TEMP_DIR, getuid(), getpid());
|
||||
snprintf(file_buffer, sizeof(file_buffer), FILE_TEMP_DIR, (int)getuid(), (int)getpid());
|
||||
|
||||
return file_buffer;
|
||||
}
|
||||
|
@ -168,9 +168,9 @@ PUBLIC void FILE_init(void)
|
|||
{
|
||||
FILE_remove_temp_file();
|
||||
|
||||
snprintf(file_buffer, sizeof(file_buffer), FILE_TEMP_PREFIX, getuid());
|
||||
snprintf(file_buffer, sizeof(file_buffer), FILE_TEMP_PREFIX, (int)getuid());
|
||||
mkdir(file_buffer, S_IRWXU);
|
||||
snprintf(file_buffer, sizeof(file_buffer), FILE_TEMP_DIR, getuid(), getpid());
|
||||
snprintf(file_buffer, sizeof(file_buffer), FILE_TEMP_DIR, (int)getuid(), (int)getpid());
|
||||
mkdir(file_buffer, S_IRWXU);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue