summaryrefslogtreecommitdiff
path: root/nuttx/libc/Kconfig
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-11-29 10:53:22 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-11-29 10:53:22 -0600
commit6fa66b5a77300b73f40dbaae2bb831d92eaa8fe6 (patch)
tree64046c058f5f6e86d9f59dee44f9b6faba15d4cf /nuttx/libc/Kconfig
parent7773304d911066ca3345eb295a944d949fd220c4 (diff)
downloadnuttx-6fa66b5a77300b73f40dbaae2bb831d92eaa8fe6.tar.gz
nuttx-6fa66b5a77300b73f40dbaae2bb831d92eaa8fe6.tar.bz2
nuttx-6fa66b5a77300b73f40dbaae2bb831d92eaa8fe6.zip
Add support for a variadic ioctl() function. The ioctl() interface is a non-standard, Unix interface. NuttX has always used the older, three-parameter version. Most contemporary systems now, however, use a variadic form of the ioctl() function. Added an option to insert a shim layer to adapt the three-parameter ioctl() to use the variadic interface form. Internally, the ioctl handling is the same three-parameter logic. The only real complexity to the shim is in how the system calls must be handled.
Diffstat (limited to 'nuttx/libc/Kconfig')
-rw-r--r--nuttx/libc/Kconfig26
1 files changed, 26 insertions, 0 deletions
diff --git a/nuttx/libc/Kconfig b/nuttx/libc/Kconfig
index 138793aad..2c31a1983 100644
--- a/nuttx/libc/Kconfig
+++ b/nuttx/libc/Kconfig
@@ -48,6 +48,32 @@ config LIBC_FLOATINGPOINT
By default, floating point
support in printf, sscanf, etc. is disabled.
+config LIBC_IOCTL_VARIADIC
+ bool "Enable variadic ioctl()"
+ default n
+ ---help---
+ By default, NuttX implements the "old style," three-parameter,
+ ioctl() interface with this function prototype:
+
+ int ioctl(int fd, int req, unsigned long arg);
+
+ That function is implemented as part of the VFS. If
+ LIBC_IOCTL_VARIADIC is selected, then an additional compatibility
+ layer will be provided in the C library. The enabled, then function
+ prototype will become:
+
+ int ioctl(int fd, int req, ...);
+
+ The ioctl() is not controlled by any standard so it is really
+ arbitrary which format you used. You may select the variadic
+ function prototype with this option. That will slightly increase
+ code size and ioctl() processing time. It will not support a
+ variable number of arguments and it still always expects to see a
+ third argument of type 'unsigned long'. The only benefit of this
+ alternative function signature is that it may provide greater
+ compatibility if you are porting code from other platforms that use
+ the variadic ioctl() function.
+
config LIB_RAND_ORDER
int "Order of the random number generate"
default 1