Add fcntl(F_DUPFD)

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1995 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2009-07-19 00:14:46 +00:00
parent e68c54fea0
commit 297cb5e256
14 changed files with 77 additions and 59 deletions
+2 -8
View File
@@ -344,15 +344,9 @@ EXTERN int files_dup(FAR struct file *filep1, FAR struct file *filep2);
/* fs_filedup.c **************************************************************/
/* This alternative naming is used when dup could operate on both file and
* socket descritors to avoid drawing unused socket support into the link.
*/
/* Dupicate a file descriptor using any value greater than or equal to minfd */
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
EXTERN int file_dup(int fd);
#else
# define file_dup(fd) dup(fd)
#endif
EXTERN int file_dup(int fd, int minfd);
/* fs_filedup2.c *************************************************************/
+2 -6
View File
@@ -166,14 +166,10 @@ EXTERN int net_poll(int sockfd, struct pollfd *fds, boolean setup);
/* net_dup.c *****************************************************************/
/* The standard dup() operation redirects operations on socket descriptors to
* this function (when both file and socket descriptors are supported)
* this function
*/
#if CONFIG_NFILE_DESCRIPTOR > 0
EXTERN int net_dup(int sockfd);
#else
# define net_dup(sockfd) dup(sockfd)
#endif
EXTERN int net_dup(int sockfd, int minsd);
/* net_dup2.c ****************************************************************/
/* The standard dup2() operation redirects operations on socket descriptors to