mirror of
				git://git.code.sf.net/p/cdesktopenv/code
				synced 2025-03-09 15:50:02 +00:00 
			
		
		
		
	sfio/sfpkrd.c: re-allow compiling on ancient systems (re: 9ba2c2e0)
				
					
				
			This commit is contained in:
		
							parent
							
								
									76d71889e2
								
							
						
					
					
						commit
						be22f3759e
					
				
					 1 changed files with 7 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -21,20 +21,18 @@
 | 
			
		|||
***********************************************************************/
 | 
			
		||||
#include	"sfhdr.h"
 | 
			
		||||
 | 
			
		||||
/* The following are only needed on Solaris/Illumos, as it doesn't support POSIX recv(2) with MSG_PEEK.
 | 
			
		||||
 * On at least macOS and Linux, sfpkrd() runs significantly faster if we disable these. */
 | 
			
		||||
#if !__sun
 | 
			
		||||
/*
 | 
			
		||||
 * The preferred method is POSIX recv(2) with MSG_PEEK, which is detected as 'socket_peek'.
 | 
			
		||||
 * On Solaris/Illumos (__sun), _stream_peek and _lib_select are needed, as _socket_peek doesn't work correctly.
 | 
			
		||||
 * On at least macOS and Linux, sfpkrd() runs significantly faster if we disable these.
 | 
			
		||||
 */
 | 
			
		||||
#if _socket_peek && !__sun
 | 
			
		||||
#undef _stream_peek
 | 
			
		||||
#undef _lib_select
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* Non-SunOS systems require POSIX recv(2) with MSG_PEEK, which is detected as 'socket_peek'. */
 | 
			
		||||
#if !_socket_peek && !__sun
 | 
			
		||||
#if __APPLE__
 | 
			
		||||
#if __APPLE__ && !_socket_peek
 | 
			
		||||
#error The socket_peek feature is required. (Hey Apple, revert your src__lib__libast__features__lib.diff patch; it caused multiple regressions, and the hanging bug it fixed is now fixed correctly. See <https://github.com/ksh93/ksh/issues/118>.)
 | 
			
		||||
#else
 | 
			
		||||
#error The socket_peek feature is required.
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/*	Read/Peek a record from an unseekable device
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue