mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 22:22:45 +00:00 
			
		
		
		
	 3f29a12d90
			
		
	
	
		3f29a12d90
		
	
	
	
	
		
			
			This makes it more straightforward to build a cross-compiler toolchain. Also move math stuff from LibC to LibM.
		
			
				
	
	
		
			13 lines
		
	
	
	
		
			389 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
	
		
			389 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #define FD_SETSIZE 64
 | |
| #define FD_ZERO(set) memset((set), 0, sizeof(fd_set));
 | |
| #define FD_CLR(fd, set) ((set)->bits[(fd / 8)] &= ~(1 << (fd) % 8))
 | |
| #define FD_SET(fd, set) ((set)->bits[(fd / 8)] |= (1 << (fd) % 8))
 | |
| #define FD_ISSET(fd, set) ((set)->bits[(fd / 8)] & (1 << (fd) % 8))
 | |
| 
 | |
| struct __fd_set {
 | |
|     unsigned char bits[FD_SETSIZE / 8];
 | |
| };
 | |
| 
 | |
| typedef struct __fd_set fd_set;
 |