work/bootstrap/gec17.c
int eif_file_stat(EIF_FILENAME path, rt_stat_buf *buf, int follow) {
	int status;			/* System call status */

	for (;;) {
		errno = 0;						/* Reset error condition */
#ifdef HAS_LSTAT
		status = rt_lstat(path, buf);
		if ((status == 0) && (follow) && (S_ISLNK(buf->st_mode))) {
				/* We found a file which is a symbolic link and we are asked to
				 * follow the link to fetch properties on the link location.
				 * We call `rt_stat' to make sure the link is valid. It is going to
				 * slow down current call by stating twice the info, but this
				 * case is quite rare and there is a benefit in using `lstat'
				 * over `rt_stat' the first time as more than 90% of the files
				 * we stat are not symlink. */
			status = rt_stat (path, buf);
		}
#else
		status = rt_stat (path, buf);		/* Get file statistics */
#endif
		if ((status == -1) && (errno == EINTR)) {
				/* Call was interrupted by a signal we re-issue it. */
			continue;
		}
		break;
	}
	return status;
}
/*
 * This is an encapsulation of the stat() system call. The routine either
 * succeeds and returns or fails and raises the appropriate exception.
 */
This is an encapsulation of the stat() system call. The routine either
succeeds and returns or fails and raises the appropriate exception.
This is an encapsulation of the stat () system call . The routine either succeeds and returns or fails and raises the appropriate exception .
int eif_file_stat(EIF_FILENAME path, rt_stat_buf *buf, int follow) {
	int status;			
	for (;;) {
		errno = 0;						
#ifdef HAS_LSTAT
		status = rt_lstat(path, buf);
		if ((status == 0) && (follow) && (S_ISLNK(buf->st_mode))) {
			status = rt_stat (path, buf);
		}
#else
		status = rt_stat (path, buf);		
#endif
		if ((status == -1) && (errno == EINTR)) {
			continue;
		}
		break;
	}
	return status;
}
int eif_file_stat ( EIF_FILENAME path , rt_stat_buf * buf , int follow ) { int status ; for ( ; ; ) { errno = 0 ; #ifdef HAS_LSTAT status = rt_lstat ( path , buf ) ; if ( ( status == 0 ) && ( follow ) && ( S_ISLNK ( buf -> st_mode ) ) ) { status = rt_stat ( path , buf ) ; } #else status = rt_stat ( path , buf ) ; #endif if ( ( status == -1 ) && ( errno == EINTR ) ) { continue ; } break ; } return status ; }
This is an encapsulation of the stat() system call.
This is an encapsulation of the stat () system call .
/* System call status */ /* Reset error condition */ /* We found a file which is a symbolic link and we are asked to
				 * follow the link to fetch properties on the link location.
				 * We call `rt_stat' to make sure the link is valid. It is going to
				 * slow down current call by stating twice the info, but this
				 * case is quite rare and there is a benefit in using `lstat'
				 * over `rt_stat' the first time as more than 90% of the files
				 * we stat are not symlink. */ /* Get file statistics */ /* Call was interrupted by a signal we re-issue it. */