[PATCH] [compiler-rt] Fix the prototype of ioctl interceptor
David Majnemer
david.majnemer at gmail.com
Sat Jan 17 21:23:37 PST 2015
The short version: we should just assume that the prototype is `int ioctl(int fildes, unsigned long request, ...)`.
The longer version:
Seventh Edition Unix (circa 1979) used `int`, many UNIX derived operating systems behave like this.
2.9 BSD (circa 1984) used `int`, unchanged from V7.
2.10 BSD (circa 1986) changed this to `unsigned long`, many BSD derived operating systems behave like this.
SUSv3 specifies that the `request` parameter have type `int` but not all UNIX-like operating systems conform.
HP-UX, Solaris, IRIX, ULTRIX and AIX all use `int`.
Linux, FreeBSD, NetBSD, OpenBSD and Darwin all use `unsigned long`.
http://reviews.llvm.org/D7038
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list