main()
{
	int fd;
	long pos;

	if ((fd = open("foo", 0)) < 0) {
		printf("Cannot open foo.\en");
		exit(1);
	}

	/*
	 * seek to the beginning of the file and
	 * print our byte position.
	 */
	pos = lseek(fd, 0L, 0);
	printf("Position = %d\en", pos);

	/*
	 * Seek 10 bytes from the beginning
	 * and print our position.
	 */
	pos = lseek(fd, 10L, 0);
	printf("Position = %d\en", pos);

	/*
	 * Seek to the end of file and
	 * print our position.
	 */
	pos = lseek(fd, 0L, 2);
	printf("Position = %d\en", pos);
}
