SYNOPSIS
#include <nutc.h>
int _NutConf(int command, ...);
DESCRIPTION
The
PARAMETERS
- command
-
Specifies the NuTCRACKER Platform parameter and whether to get or set that parameter. To get the current value, use the _NC_GET_XXX form. To set the value, use the _NC_SET_XXX form. command can one of the following:
- _NC_GET_BINARY_OFLAG
- _NC_SET_BINARY_OFLAG
-
Gets or sets the default file open mode. The parameter for the GET command is the address of an int variable to receive the current mode. The parameter for the SET function is the new default mode. A value of 1 sets the default file open mode to binary; a value of 0 sets the default file open mode to text.
- _NC_GET_FULL_LFS_SEMANTICS
- _NC_SET_FULL_LFS_SEMANTICS
-
Enables or disables additional error checking that is done with some function calls related to the large file extensions. A value of 0 disables the error checks, a value of 1 enables the error checks. The error checks in question have to do with opening, reading and writing disk files that are larger than 2 gigabytes when the O_LARGEFILE flag is not set.
- _NC_GET_MAX_COM_PORTS
- _NC_SET_MAX_COM_PORTS
-
Gets or sets the maximum number of COM ports available to the process. The parameter for the GET command is the address of an unsigned int variable to receive the current value. The parameter for the SET function is the new value.
- _NC_GET_NT_LIMITED_LOCKING
- _NC_SET_NT_LIMITED_LOCKING
-
Gets or sets the file locking mode used by the NuTCRACKER Platform. The parameter for the GET command is the address of an int variable to receive the current mode. The parameter for the SET function is the new mode. A value of 1 sets the locking mechanism to use the native Win32 API locking functions; a value of 0 sets the locking mechanism to use the NuTCRACKER Platform implementation of full UNIX file locking semantics.
- _NC_GET_SEC_ATTR
- _NC_SET_SEC_ATTR
-
Gets or sets the NuTCRACKER Platform security attribute mode. The parameter for the GET command is the address of an int variable to receive the current mode. The parameter for the SET function is the new mode. A value of 1 causes NuTCRACKER Platform to pass a NULL security descriptor to Win32 object creation functions, causing default security behavior to be used; a value of 0 causes NuTCRACKER Platform to use a security descriptor derived from
umask() and file-creation mode bits, providing a UNIX security mapping. - _NC_GET_SUFFIXED_SEARCHING
- _NC_SET_SUFFIXED_SEARCHING
-
Gets or sets the suffixed searching mode. The parameter for the GET command is the address of an int variable to receive the current mode. The parameter for the SET function is the new mode. A value of 1 causes NuTCRACKER Platform to search for a file with the extension .exe if the specified file passed to
access() (with X_OK) or one of theexec() functions does not exist; a value of 0 causes NuTCRACKER Platform to only test for the specified file.
RETURN VALUES
If successful,
- EFAULT
-
A command parameter points to an invalid address.
- EINVAL
-
Either command is not one of the listed values, or the parameter for the command is invalid.
CONFORMANCE
MKS Toolkit UNIX APIs extension.
MULTITHREAD SAFETY LEVEL
Unsafe.
PORTING ISSUES
It is always preferable to modify application code rather than depending on a global setting. For example, if your application were to use _NC_SET_BINARY_OFLAG to set all files to text mode, this could cause problems if you were to pass a file descriptor to a third-party library that assumes the file is in binary mode. Rather than changing the default text mode, you should modify your code to handle the carriage-return/line-feed line separators.
Several of these parameters correspond to environment variables used by the NuTCRACKER Platform. Refer to Environment Variables in the MKS Toolkit UNIX to Windows Porting Guide for more information.
There are additional commands to
AVAILABILITY
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
_NutForkExecl() ,_NutForkExecle() ,_NutForkExeclp() ,_NutForkExeclpe() ,_NutForkExecv() ,_NutForkExecve() ,_NutForkExecvp() ,_NutForkExecvpe() ,access() ,execl() ,execle() ,execlp() ,execlpe() ,execv() ,execve() ,execvp() ,execvpe() ,open() ,umask()
- Miscellaneous:
- lf64
MKS Toolkit 9.2 Documentation Build 16.