Adding more errnos to the libc wrapper (Bugzilla #2672).
This commit is contained in:
		
							parent
							
								
									db7c9d349b
								
							
						
					
					
						commit
						522628f25b
					
				| 
						 | 
				
			
			@ -429,6 +429,7 @@ xf86open(const char *path, int flags, ...)
 | 
			
		|||
    }
 | 
			
		||||
    va_end(ap);
 | 
			
		||||
    xf86errno = xf86GetErrno();
 | 
			
		||||
 | 
			
		||||
    return fd;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -917,9 +918,48 @@ xf86strerror(int n)
 | 
			
		|||
		mapnum (ETXTBSY);	/* not POSIX 1 */
 | 
			
		||||
#endif
 | 
			
		||||
		mapnum (ENOTTY);
 | 
			
		||||
#ifdef ENOSYS
 | 
			
		||||
		mapnum (ENOSYS);
 | 
			
		||||
#endif
 | 
			
		||||
		mapnum (EBUSY);
 | 
			
		||||
		mapnum (ENODEV);
 | 
			
		||||
		mapnum (EIO);
 | 
			
		||||
#ifdef ESRCH
 | 
			
		||||
		mapnum (ESRCH);
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef ENXIO
 | 
			
		||||
		mapnum (ENXIO);  
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef E2BIG
 | 
			
		||||
		mapnum (E2BIG);    
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef ENOEXEC
 | 
			
		||||
		mapnum (ENOEXEC);
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef ECHILD
 | 
			
		||||
		mapnum (ECHILD);
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef ENOTBLK
 | 
			
		||||
		mapnum (ENOTBLK);
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef EXDEV
 | 
			
		||||
		mapnum (EXDEV); 
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef EFBIG
 | 
			
		||||
		mapnum (EFBIG);
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef ESPIPE
 | 
			
		||||
		mapnum (ESPIPE);
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef EMLINK
 | 
			
		||||
		mapnum (EMLINK);
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef EDOM
 | 
			
		||||
		mapnum (EDOM);
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef ERANGE
 | 
			
		||||
		mapnum (ERANGE);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
		default:
 | 
			
		||||
			err = 999;
 | 
			
		||||
| 
						 | 
				
			
			@ -1865,11 +1905,49 @@ xf86GetErrno ()
 | 
			
		|||
		mapnum (ETXTBSY);	/* not POSIX 1 */
 | 
			
		||||
#endif
 | 
			
		||||
		mapnum (ENOTTY);
 | 
			
		||||
#ifdef ENOSYS
 | 
			
		||||
		mapnum (ENOSYS);
 | 
			
		||||
#endif
 | 
			
		||||
		mapnum (EBUSY);
 | 
			
		||||
		mapnum (ENODEV);
 | 
			
		||||
		mapnum (EIO);
 | 
			
		||||
 | 
			
		||||
		default:
 | 
			
		||||
#ifdef ESRCH
 | 
			
		||||
		mapnum (ESRCH);
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef ENXIO
 | 
			
		||||
		mapnum (ENXIO);  
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef E2BIG
 | 
			
		||||
		mapnum (E2BIG);    
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef ENOEXEC
 | 
			
		||||
		mapnum (ENOEXEC);
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef ECHILD
 | 
			
		||||
		mapnum (ECHILD);
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef ENOTBLK
 | 
			
		||||
		mapnum (ENOTBLK);
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef EXDEV
 | 
			
		||||
		mapnum (EXDEV); 
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef EFBIG
 | 
			
		||||
		mapnum (EFBIG);
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef ESPIPE
 | 
			
		||||
		mapnum (ESPIPE);
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef EMLINK
 | 
			
		||||
		mapnum (EMLINK);
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef EDOM
 | 
			
		||||
		mapnum (EDOM);
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef ERANGE
 | 
			
		||||
		mapnum (ERANGE);
 | 
			
		||||
#endif
 | 
			
		||||
     		default:
 | 
			
		||||
			return (xf86_UNKNOWN);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h,v 1.2 2004/04/23 19:54:07 eich Exp $ */
 | 
			
		||||
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h,v 1.3 2005/03/02 11:20:29 gisburn Exp $ */
 | 
			
		||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h,v 3.63 2003/12/08 21:46:55 alanh Exp $ */
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
 | 
			
		||||
| 
						 | 
				
			
			@ -186,6 +186,20 @@ typedef int xf86jmp_buf[1024];
 | 
			
		|||
#define xf86_ENODEV		1023
 | 
			
		||||
#define xf86_EIO		1024
 | 
			
		||||
 | 
			
		||||
#define xf86_ESRCH		1025
 | 
			
		||||
#define xf86_ENXIO		1026
 | 
			
		||||
#define xf86_E2BIG		1027
 | 
			
		||||
#define xf86_ENOEXEC		1028
 | 
			
		||||
#define xf86_ECHILD		1029
 | 
			
		||||
#define xf86_ENOTBLK		1030
 | 
			
		||||
#define xf86_EXDEV		1031
 | 
			
		||||
#define xf86_EFBIG		1032
 | 
			
		||||
#define xf86_ESPIPE		1033
 | 
			
		||||
#define xf86_EMLINK		1034
 | 
			
		||||
#define xf86_EDOM		1035
 | 
			
		||||
#define xf86_ERANGE		1036
 | 
			
		||||
 
 | 
			
		||||
 | 
			
		||||
/* sysv IPV */
 | 
			
		||||
/* xf86shmget() */
 | 
			
		||||
#define XF86IPC_CREAT  01000
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue