/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1999-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#include "sftest.h"
/* errnos tested for xopen-compliance */
tmain()
{
int lseek_errno;
int rv;
terror("Should have seen eof");
errno = 0;
/* on some system (eg, apple), lseek does not set errno for this case */
errno = 0;
lseek_errno = errno;
errno = 0;
terror("sfseek should have failed");
if(errno != lseek_errno)
errno = 0;
terror("sfseek should not have succeeded");
terror("Can't create pipes");
terror("Can't create stream for pipe");
errno = 0;
terror("sfseek should have failed on a pipe");
errno = 0;
terror("sfseek should have failed on a closed file descriptor");
texit(0);
}