Exemple #1
0
void
rewind(FILE *fp)
{
	int serrno = errno;

	/* make sure stdio is set up */
	if (!__sdidinit)
		__sinit();

	FLOCKFILE(fp);
	if (_fseeko(fp, (off_t)0, SEEK_SET, 1) == 0)
		errno = serrno;
	clearerr_unlocked(fp);	/* POSIX: clear stdio error regardless */
	FUNLOCKFILE(fp);
}
Exemple #2
0
int fseeko(FILE *fp, off_t offset, int whence)
{
	int ret;
	int serrno = errno;

	/* make sure stdio is set up */
	if (!__sdidinit)
		__sinit();

	FLOCKFILE(fp);
	ret = _fseeko(fp, offset, whence, 0);
	FUNLOCKFILE(fp);
	if (ret == 0)
		errno = serrno;
	return (ret);
}
Exemple #3
0
void
rewind(FILE *fp)
{
	int serrno = errno;

	/* make sure stdio is set up */
	if (!__sdidinit)
		__sinit();

	FLOCKFILE(fp);
	if (_fseeko(fp, (off_t)0, SEEK_SET, 1) == 0) {
		clearerr_unlocked(fp);
		errno = serrno;
	}
	FUNLOCKFILE(fp);
}
Exemple #4
0
int
fseek(FILE *fp, long offset, int whence)
{
	int ret;
	int serrno = errno;

	/* make sure stdio is set up */
	if (!__sdidinit)
		__sinit();

	FLOCKFILE_CANCELSAFE(fp);
	ret = _fseeko(fp, (off_t)offset, whence, 1);
	FUNLOCKFILE_CANCELSAFE();
	if (ret == 0)
		errno = serrno;
	return (ret);
}
Exemple #5
0
EXPORT_C void
rewind(FILE *fp)
{
	int serrno = errno;

	/* make sure stdio is set up */
	if (!__sdidinit)
		__sinit();

	FLOCKFILE(fp);
	if (_fseeko(fp, (off_t)0, SEEK_SET, 1) == 0) {
#ifndef __SYMBIAN32__
		clearerr_unlocked(fp);
		errno = serrno;
#endif		
	}
#ifdef __SYMBIAN32__
	clearerr_unlocked(fp);
	errno = serrno;
#endif
	FUNLOCKFILE(fp);
}