Changeset 2439 for trunk/src/emx/include


Ignore:
Timestamp:
Nov 13, 2005, 12:59:18 PM (20 years ago)
Author:
bird
Message:

Created proper backend for fcntl removing F_GETOSFD in the process. Using fcntl to set O_NONBLOCK on sockets works now.

Location:
trunk/src/emx/include
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/InnoTekLIBC/backend.h

    r2438 r2439  
    465465ssize_t __libc_Back_ioDirGetEntries(int fh, void *pvBuf, size_t cbBuf, __off_t *poff);
    466466
     467/**
     468 * File Control.
     469 *
     470 * Deals with file descriptor flags, file descriptor duplication and locking.
     471 *
     472 * @returns 0 on success and *piRet set.
     473 * @returns Negated errno on failure and *piRet set to -1.
     474 * @param   fh          File handle (descriptor).
     475 * @param   iRequest    Which file file descriptior request to perform.
     476 * @param   iArg        Argument which content is specific to each
     477 *                      iRequest operation.
     478 * @param   prc         Where to store the value which upon success is
     479 *                      returned to the caller.
     480 */
     481int __libc_Back_ioFileControl(int fh, int iRequest, intptr_t iArg, int *prc);
     482
     483/**
     484 * File Control operation - OS/2 standard handle.
     485 *
     486 * @returns 0 on success.
     487 * @returns OS/2 error code or negated errno on failure.
     488 *
     489 * @param   pFH         Pointer to the handle structure to operate on.
     490 * @param   fh          It's associated filehandle.
     491 * @param   iRequest    Which file file descriptior request to perform.
     492 * @param   iArg        Argument which content is specific to each
     493 *                      iRequest operation.
     494 * @param   prc         Where to store the value which upon success is
     495 *                      returned to the caller.
     496 */
     497int __libc_Back_ioFileControlStandard(__LIBC_PFH pFH, int fh, int iRequest, intptr_t iArg, int *prc);
     498   
    467499/**
    468500 * Try resolve a filehandle to a path.
  • trunk/src/emx/include/emx/io.h

    r2438 r2439  
    7777#define __LIBC_FH_FDFLAGS_MASK      0xf0000000
    7878
     79/** The mask of flags settable using fcntl(,F_SETFL,). */
     80#define __LIBC_FH_SETFL_MASK        (O_NONBLOCK | O_APPEND /*| O_ASYNC*/ | O_SYNC | O_DIRECT | O_BINARY | O_TEXT)
     81/** The mask of flags gettable using fcntl(,F_GETFL,). */
     82#define __LIBC_FH_GETFL_MASK        (__LIBC_FH_SETFL_MASK | O_ACCMODE | O_NOINHERIT)
     83
    7984/** @} */
    8085
  • trunk/src/emx/include/emx/syscalls.h

    r2438 r2439  
    132132int __execname (char *buf, size_t bufsize);
    133133void __exit (int ret) __attribute__ ((__noreturn__));
    134 int __fcntl (int handle, int request, int arg);
     134/*int __fcntl (int handle, int request, int arg);*/
    135135int __filesys (__const__ char *drive, char *name, size_t size);
    136136int __findfirst (__const__ char *name, int attr, struct _find *fp);
  • trunk/src/emx/include/sys/fcntl.h

    r2438 r2439  
    287287#endif
    288288
    289 /* fcntl command */
    290 /* bird: EMX specifics - start */
    291 #define F_GETOSFD       20 /* RSXNT */  /* F_GETOSFD used to be 6 */
    292 /* bird: EMX specifics - end */
    293 
    294 
    295289#if !defined (F_OK) /* bird: Really defined in unistd.h, but Linux and EMX does it here too. */
    296290/* access function */
Note: See TracChangeset for help on using the changeset viewer.