Index: /trunk/libc/src/kNIX/os2/b_dir.c
===================================================================
--- /trunk/libc/src/kNIX/os2/b_dir.c	(revision 2922)
+++ /trunk/libc/src/kNIX/os2/b_dir.c	(revision 2923)
@@ -40,7 +40,8 @@
 static int dirWrite(__LIBC_PFH pFH, const void *pvBuf, size_t cbWrite, size_t *pcbWritten);
 static int dirSetSize(__LIBC_PFH pFH, off_t cbFile, int fZero);
+static int dirSync(__LIBC_PFH pFH);
 static int dirDuplicate(__LIBC_PFH pFH, int *pfhNew);
 static int dirFileControl(__LIBC_PFH pFH, int iRequest, int iArg, int *prc);
-static int dirIOControl(__LIBC_PFH pFH, int iIOControl, int iArg, int *prc);
+static int dirIOControl(__LIBC_PFH pFH, unsigned long ulIOControl, va_list va, int *prc);
 static int dirSeek(__LIBC_PFH pFH, off_t off, int iMethod, off_t *poffNew);
 static int dirSelect(int cFHs, struct fd_set *pRead, struct fd_set *pWrite, struct fd_set *pExcept, struct timeval *tv, int *prc);
@@ -63,4 +64,5 @@
     dirSeek,
     dirSetSize,
+    dirSync,
     dirDuplicate,
     dirFileControl,
@@ -73,11 +75,5 @@
 
 
-/**
- * Close operation.
- *
- * @returns 0 on success.
- * @returns OS/2 error code or negated errno on failure.
- * @param   pFH         Pointer to the handle structure to operate on.
- */
+/** @copydoc __LIBC_FHOPS::pfnClose */
 static int dirClose(__LIBC_PFH pFH)
 {
@@ -108,14 +104,5 @@
 
 
-/**
- * Read operation.
- *
- * @returns 0 on success.
- * @returns OS/2 error code or negated errno on failure.
- * @param   pFH         Pointer to the handle structure to operate on.
- * @param   pvBuf       Pointer to the buffer to read into.
- * @param   cbRead      Number of bytes to read.
- * @param   pcbRead     Where to store the count of bytes actually read.
- */
+/** @copydoc __LIBC_FHOPS::pfnRead */
 static int dirRead(__LIBC_PFH pFH, void *pvBuf, size_t cbRead, size_t *pcbRead)
 {
@@ -135,12 +122,5 @@
 
 
-/** Write operation.
- * @returns 0 on success.
- * @returns OS/2 error code or negated errno on failure.
- * @param   pFH         Pointer to the handle structure to operate on.
- * @param   pvBuf       Pointer to the buffer which contains the data to write.
- * @param   cbWrite     Number of bytes to write.
- * @param   pcbWritten  Where to store the count of bytes actually written.
- */
+/** @copydoc __LIBC_FHOPS::pfnWrite */
 static int dirWrite(__LIBC_PFH pFH, const void *pvBuf, size_t cbWrite, size_t *pcbWritten)
 {
@@ -150,13 +130,5 @@
 
 
-/**
- * Sets the size of an open file.
- *
- * @returns 0 on success.
- * @returns Negative error code (errno.h) on failure.
- * @param   pFH     The file handle structure.
- * @param   cbFile  The new filesize.
- * @param   fZero   If set any new allocated file space should be initialized to zero.
- */
+/** @copydoc __LIBC_FHOPS::pfnSetSize */
 static int dirSetSize(__LIBC_PFH pFH, off_t cbFile, int fZero)
 {
@@ -165,14 +137,13 @@
 
 
-/** Duplicate handle operation.
- * @returns 0 on success, OS/2 error code on failure.
- * @param   pFH         Pointer to the handle structure to operate on.
- * @param   pfhNew      Where to store the duplicate filehandle.
- *                      The input value describe how the handle is to be
- *                      duplicated. If it's -1 a new handle is allocated.
- *                      Any other value will result in that value to be
- *                      used as handle. Any existing handle with that
- *                      value will be closed.
- */
+/** @copydoc __LIBC_FHOPS::pfnSync */
+static int dirSync(__LIBC_PFH pFH)
+{
+    LIBCLOG_ENTER("pFH=%p:{.fd=%d}\n", (void *)pFH, pFH->fh);
+    LIBCLOG_RETURN_INT(0); /* fake bliss */
+}
+
+
+/** @copydoc __LIBC_FHOPS::pfnDuplicate */
 static int dirDuplicate(__LIBC_PFH pFH, int *pfhNew)
 {
@@ -182,14 +153,5 @@
 
 
-/** File Control operation.
- * @returns 0 on success.
- * @returns OS/2 error code or negated errno on failure.
- * @param   pFH         Pointer to the handle structure to operate on.
- * @param   iRequest    Which file file descriptior request to perform.
- * @param   iArg        Argument which content is specific to each
- *                      iRequest operation.
- * @param   prc         Where to store the value which upon success is
- *                      returned to the caller.
- */
+/** @copydoc __LIBC_FHOPS::pfnFileControl */
 static int dirFileControl(__LIBC_PFH pFH, int iRequest, int iArg, int *prc)
 {
@@ -199,30 +161,13 @@
 
 
-/** I/O Control operation.
- * @returns 0 on success.
- * @returns OS/2 error code or negated errno on failure.
- * @param   pFH         Pointer to the handle structure to operate on.
- * @param   iIOControl  Which I/O control operation to perform.
- * @param   iArg        Argument which content is specific to each
- *                      iIOControl operation.
- * @param   prc         Where to store the value which upon success is
- *                      returned to the caller.
- */
-static int dirIOControl(__LIBC_PFH pFH, int iIOControl, int iArg, int *prc)
-{
-    LIBCLOG_ENTER("pFH=%p:{.fd=%d} iIOControl=%d iArg=%d prc=%p\n", (void *)pFH, pFH->fh, iIOControl, iArg, (void *)prc);
+/** @copydoc __LIBC_FHOPS::pfnIOControl */
+static int dirIOControl(__LIBC_PFH pFH, unsigned long ulIOControl, va_list va, int *prc)
+{
+    LIBCLOG_ENTER("pFH=%p:{.fd=%d} ulIOControl=%#lx prc=%p\n", (void *)pFH, pFH->fh, ulIOControl, (void *)prc);
     LIBCLOG_ERROR_RETURN_INT(-EOPNOTSUPP);
 }
 
 
-/** Seek to a new position in the 'file'.
- *
- * @returns 0 on success.
- * @returns OS/2 error code or negated errno on failure.
- * @param   pFH         Pointer to the handle structure to operate on.
- * @param   off         The offset to seek. The meaning depends on SEEK_.
- * @param   iMethod     The seek method, any of the SEEK_* macros.
- * @param   poffNew     Where to store the new file offset.
- */
+/** @copydoc __LIBC_FHOPS::pfnSeek */
 static int dirSeek(__LIBC_PFH pFH, off_t off, int iMethod, off_t *poffNew)
 {
@@ -232,18 +177,5 @@
 
 
-/** Select operation.
- * The select operation is only performed if all handles have the same
- * select routine (the main worker checks this).
- *
- * @returns 0 on success.
- * @returns OS/2 error code or negated errno on failure.
- * @param   cFHs        Range of handles to be tested.
- * @param   pRead       Bitmap for file handles to wait upon to become ready for reading.
- * @param   pWrite      Bitmap for file handles to wait upon to become ready for writing.
- * @param   pExcept     Bitmap of file handles to wait on (error) exceptions from.
- * @param   tv          Timeout value.
- * @param   prc         Where to store the value which upon success is
- *                      returned to the caller.
- */
+/** @copydoc __LIBC_FHOPS::pfnSelect */
 static int dirSelect(int cFHs, struct fd_set *pRead, struct fd_set *pWrite, struct fd_set *pExcept, struct timeval *tv, int *prc)
 {
@@ -254,14 +186,5 @@
 
 
-/** Fork notification - child context.
- * Only the __LIBC_FORK_OP_FORK_CHILD operation is forwarded atm.
- * If NULL it's assumed that no notifiction is needed.
- *
- * @returns 0 on success.
- * @returns OS/2 error code or negated errno on failure.
- * @param   pFH             Pointer to the handle structure to operate on.
- * @param   pForkHandle     The fork handle.
- * @param   enmOperation    The fork operation.
- */
+/** @copydoc __LIBC_FHOPS::pfnForkChild */
 static int dirForkChild(__LIBC_PFH pFH, __LIBC_PFORKHANDLE pForkHandle, __LIBC_FORKOP enmOperation)
 {
Index: /trunk/libc/src/kNIX/os2/tcpipver.c
===================================================================
--- /trunk/libc/src/kNIX/os2/tcpipver.c	(revision 2922)
+++ /trunk/libc/src/kNIX/os2/tcpipver.c	(revision 2923)
@@ -134,5 +134,5 @@
 static int TCPNAME(ops_Duplicate)(__LIBC_PFH pFH, int *pfhNew);
 static int TCPNAME(ops_FileControl)(__LIBC_PFH pFH, int iIOControl, int iArg, int *prc);
-static int TCPNAME(ops_IOControl)(__LIBC_PFH pFH, int iIOControl, int iArg, int *prc);
+static int TCPNAME(ops_IOControl)(__LIBC_PFH pFH, unsigned long ulIOControl, va_list va, int *prc);
 static int TCPNAME(ops_Select)(int cFHs, struct fd_set *pRead, struct fd_set *pWrite, struct fd_set *pExcept, struct timeval *tv, int *prc);
 static int TCPNAME(ops_ForkChild)(struct __libc_FileHandle *pFH, __LIBC_PFORKHANDLE pForkHandle, __LIBC_FORKOP enmOperation);
@@ -176,4 +176,5 @@
     TCPNAME(ops_Read),
     TCPNAME(ops_Write),
+    NULL /* fixme! */,
     NULL /* fixme! */,
     NULL /* fixme! */,
@@ -434,24 +435,14 @@
 
 
-/** I/O Control operation.
- * @returns 0 on success.
- * @returns OS/2 error code or negated errno on failure.
- * @param   pFH         Pointer to the handle structure to operate on.
- * @param   fh          It's associated filehandle.
- * @param   iIOControl  Which I/O control operation to perform.
- * @param   iArg        Argument which content is specific to each
- *                      iIOControl operation.
- * @param   prc         Where to store the value which upon success is
- *                      returned to the caller.
- */
-static int TCPNAME(ops_IOControl)(__LIBC_PFH pFH, int iIOControl, int iArg, int *prc)
-{
-    LIBCLOG_ENTER("pFH=%p:{.iSocket=%d .fh=%d} iIOControl=%#x iArg=%#x prc=%p\n",
-                  (void *)pFH, ((PLIBCSOCKETFH)pFH)->iSocket, pFH->fh, iIOControl, iArg, (void *)prc);
+/** @copydoc __LIBC_FHOPS::pfnIOControl */
+static int TCPNAME(ops_IOControl)(__LIBC_PFH pFH, unsigned long ulIOControl, va_list va, int *prc)
+{
+    LIBCLOG_ENTER("pFH=%p:{.iSocket=%d .fh=%d} ulIOControl=%#lx prc=%p\n",
+                  (void *)pFH, ((PLIBCSOCKETFH)pFH)->iSocket, pFH->fh, ulIOControl, (void *)prc);
     PLIBCSOCKETFH   pSocketFH = (PLIBCSOCKETFH)pFH;
-    char           *pchArg = (char *)iArg;
+    char           *pchArg = va_arg(va, char *);
     int             rc;
 #ifndef TCPV40HDRS
-    switch (__IOCLW(iIOControl))
+    switch (__IOCLW(ulIOControl))
     {
         case __IOCLW(SIOSTATARP):
@@ -492,5 +483,5 @@
 
         default:
-            rc = TCPNAME(imp_ioctl)(pSocketFH->iSocket, iIOControl, pchArg);
+            rc = TCPNAME(imp_ioctl)(pSocketFH->iSocket, ulIOControl, pchArg);
             break;
     }
@@ -503,5 +494,5 @@
      * must determin. :-/
      */
-    switch (__IOCLW(iIOControl))
+    switch (__IOCLW(ulIOControl))
     {
         case __IOCLW(FIONREAD):
@@ -703,8 +694,8 @@
     if (cb >= 0)
     {
-        switch (__IOCLW(iIOControl))
+        switch (__IOCLW(ulIOControl))
         {
             case FIONBIO:
-                rc = TCPNAME(imp_os2_ioctl)(pSocketFH->iSocket, iIOControl, pchArg, cb);
+                rc = TCPNAME(imp_os2_ioctl)(pSocketFH->iSocket, ulIOControl, pchArg, cb);
                 if (rc)
                 {
@@ -717,5 +708,5 @@
 
             default:
-                rc = TCPNAME(imp_os2_ioctl)(pSocketFH->iSocket, iIOControl, pchArg, cb);
+                rc = TCPNAME(imp_os2_ioctl)(pSocketFH->iSocket, ulIOControl, pchArg, cb);
                 break;
         }
