Changeset 2916


Ignore:
Timestamp:
Dec 28, 2006, 5:14:47 AM (19 years ago)
Author:
bird
Message:

cleanup in progress (bed time)

Location:
trunk/libc
Files:
1 deleted
51 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/libc/include/InnoTekLIBC/pathrewrite.h

    r2021 r2916  
    1 /* $Id$ */
    2 /** @file
    3  *
    4  * InnoTek LIBC - Path Rewrite.
    5  *
    6  * Copyright (c) 2004-2005 knut st. osmundsen <bird-srcspam@anduin.net>
    7  *
    8  *
    9  * This file is part of InnoTek LIBC.
    10  *
    11  * InnoTek LIBC is free software; you can redistribute it and/or modify
    12  * it under the terms of the GNU Lesser General Public License as published
    13  * by the Free Software Foundation; either version 2 of the License, or
    14  * (at your option) any later version.
    15  *
    16  * InnoTek LIBC is distributed in the hope that it will be useful,
    17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    19  * GNU Lesser General Public License for more details.
    20  *
    21  * You should have received a copy of the GNU Lesser General Public License
    22  * along with InnoTek LIBC; if not, write to the Free Software
    23  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    24  *
    25  */
    26 
    27 
    28 #ifndef __libc_InnoTekLIBC_pathrewrite_h__
    29 #define __libc_InnoTekLIBC_pathrewrite_h__
    30 /** @group __libc_PathReWrite
    31  * @{ */
    32 
    33 /*******************************************************************************
    34 *   Header Files                                                               *
    35 *******************************************************************************/
    36 #include <sys/cdefs.h>
    37 
    38 
    39 /*******************************************************************************
    40 *   Structures and Typedefs                                                    *
    41 *******************************************************************************/
    42 /**
    43  * Path rewrite.
    44  */
    45 typedef struct __libc_PathRewrite
    46 {
    47     /** Flags.
    48      * If __LIBC_PRWF_CASE_SENSITIVE is not set pszFrom *must* be in all
    49      * lower case. */
    50     unsigned        fFlags;
    51     /** From path. Unix slashes! */
    52     const char     *pszFrom;
    53     /** Length of from path. */
    54     unsigned        cchFrom;
    55     /** To path. */
    56     const char     *pszTo;
    57     /** Length of to path. */
    58     unsigned        cchTo;
    59     /** Reserved 0 - intended for function pointer to special open. */
    60     unsigned        uReserved0;
    61     /** Reserved 1 - intended for function pointer to special parser. */
    62     unsigned        uReserved1;
    63     /** Reserved 2 - 8 byte alignment*/
    64     unsigned        uReserved2;
    65 } __LIBC_PATHREWRITE, *__LIBC_PPATHREWRITE;
    66 
    67 
    68 /** @group __libc_PathReWrite_flags
    69  * @{ */
    70 /** The rule rewrites a file. */
    71 #define __LIBC_PRWF_TYPE_FILE           0x00000001
    72 /** The rule rewrites a directory. */
    73 #define __LIBC_PRWF_TYPE_DIR            0x00000002
    74 
    75 /** From path is case sensitive. */
    76 #define __LIBC_PRWF_CASE_SENSITIVE      0x00000010
    77 /** From path is case insensitive. */
    78 #define __LIBC_PRWF_CASE_INSENSITIVE    0x00000000
    79 /** @} */
    80 
    81 __BEGIN_DECLS
    82 
    83 /**
    84  * Adds a set of new rules to the rewrite rule set.
    85  *
    86  * The rules will be validated before any of them are processed
    87  * and added to the current rewrite rule set. Make sure the rules
    88  * conform to the specifications.
    89  *
    90  * The rewrites are 1:1, no nested processing.
    91  *
    92  * @returns 0 on success.
    93  * @returns -1 and errno set on failure.
    94  * @param   paRules     Pointer to an array of rules to add.
    95  *                      The rules will _not_ be duplicated but used until
    96  *                      a remove call is issued.
    97  * @param   cRules      Number of rules in the array.
    98  */
    99 int __libc_PathRewriteAdd(const __LIBC_PPATHREWRITE paRules, unsigned cRules);
    100 
    101 
    102 /**
    103  * Removes a set of rules from the current rewrite rule set.
    104  *
    105  * The specified rule array must be the eact same as for the add call.
    106  *
    107  * @returns 0 on success.
    108  * @returns -1 and errno set on failure.
    109  * @param   paRules     Pointer to an array of rules to remove.
    110  * @param   cRules      Number of rules in the array.
    111  */
    112 int __libc_PathRewriteRemove(const __LIBC_PPATHREWRITE paRules, unsigned cRules);
    113 
    114 
    115 /**
    116  * Rewrites a path using a caller supplied buffer.
    117  *
    118  * @returns 0 if no rewrite was necessary.
    119  * @returns length of the rewritten name including the terminating zero.
    120  * @returns -1 on failure, errno not set.
    121  * @param   pszPath     Path to rewrite.
    122  * @param   pszBuf      Where to store the rewritten path.
    123  *                      This can be NULL.
    124  * @param   cchBuf      Size of the buffer.
    125  */
    126 int  __libc_PathRewrite(const char *pszPath, char *pszBuf, unsigned cchBuf);
    127 
    128 
    129 __END_DECLS
    130 
    131 /** @} */
    132 #endif
    133 
     1#include <klibc/pathrewrite.h>
  • trunk/libc/include/InnoTekLIBC/tcpip.h

    r2739 r2916  
    2525 */
    2626
    27 #ifndef __InnoTekLIBC_tcpip_h__
    28 #define __InnoTekLIBC_tcpip_h__
     27#ifndef __klibc_tcpip_h__
     28#define __klibc_tcpip_h__
    2929
    3030#include <errno.h>
    3131#include <sys/socket.h>
    32 #include <emx/io.h>
     32#include <klibc/io.h>
    3333
    3434
  • trunk/libc/include/klibc/backend.h

    r2914 r2916  
    2828#define __klibc_backend_h__
    2929
     30#ifndef __STDC_LIMIT_MACROS
     31# define __STDC_LIMIT_MACROS
     32#endif
     33#ifndef __STDC_CONSTANT_MACROS
     34# define __STDC_CONSTANT_MACROS
     35#endif
     36#include <stdint.h>
    3037#include <stdarg.h>
    3138#include <sys/cdefs.h>
     
    140147 * @returns -EINTR if the interrupted by signal.
    141148
    142  * @param   ullNanoReq      Time to sleep, in nano seconds.
    143  * @param   pullNanoRem     Where to store remaining time (also nano seconds).
     149 * @param   u64NanoReq      Time to sleep, in nano seconds.
     150 * @param   pu64NanoRem     Where to store remaining time (also nano seconds).
    144151
    145152 * @remark  For relativly small sleeps this api temporarily changes the thread
     
    149156 *          It also means that if such code changes the priority it will be undone.
    150157 */
    151 int __libc_Back_threadSleep(unsigned long long ullNanoReq, unsigned long long *pullNanoRem);
     158int __libc_Back_threadSleep(uint64_t u64NanoReq, uint64_t *pu64NanoRem);
    152159
    153160/** @} */
     
    571578 *
    572579 * @param   pFH         Pointer to the handle structure to operate on.
    573  * @param   fh          It's associated filehandle.
    574580 * @param   iRequest    Which file file descriptior request to perform.
    575581 * @param   iArg        Argument which content is specific to each
     
    578584 *                      returned to the caller.
    579585 */
    580 int __libc_Back_ioFileControlStandard(__LIBC_PFH pFH, int fh, int iRequest, intptr_t iArg, int *prc);
     586int __libc_Back_ioFileControlStandard(__LIBC_PFH pFH, int iRequest, intptr_t iArg, int *prc);
    581587
    582588/**
  • trunk/libc/include/klibc/os2/os2.h

    r2915 r2916  
    3131#define INCL_BASE
    3232#define INCL_DOSINFOSEG
     33#define INCL_DOSSIGNALS
    3334#define INCL_DOSUNDOCUEMENTED
    3435#define INCL_ERRORS
     
    3940#include <os2emx.h>
    4041#include <os2thunk.h>
     42#include <klibc/os2/os2error.h>
    4143
    4244#ifndef HFILE_STDERR
  • trunk/libc/include/klibc/pathrewrite.h

    r2899 r2916  
    22/** @file
    33 *
    4  * InnoTek LIBC - Path Rewrite.
     4 * kLIBC - Path Rewrite.
    55 *
    6  * Copyright (c) 2004-2005 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
    9  * This file is part of InnoTek LIBC.
     9 * This file is part of kLIBC.
    1010 *
    11  * InnoTek LIBC is free software; you can redistribute it and/or modify
     11 * kLIBC is free software; you can redistribute it and/or modify
    1212 * it under the terms of the GNU Lesser General Public License as published
    1313 * by the Free Software Foundation; either version 2 of the License, or
    1414 * (at your option) any later version.
    1515 *
    16  * InnoTek LIBC is distributed in the hope that it will be useful,
     16 * kLIBC is distributed in the hope that it will be useful,
    1717 * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1818 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     
    2020 *
    2121 * You should have received a copy of the GNU Lesser General Public License
    22  * along with InnoTek LIBC; if not, write to the Free Software
     22 * along with kLIBC; if not, write to the Free Software
    2323 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    2424 *
     
    2626
    2727
    28 #ifndef __libc_InnoTekLIBC_pathrewrite_h__
    29 #define __libc_InnoTekLIBC_pathrewrite_h__
    30 /** @group __libc_PathReWrite
    31  * @{ */
     28#ifndef __klibc_pathrewrite_h__
     29#define __klibc_pathrewrite_h__
     30
     31/** @group __libc_PathReWrite Path Rewrite
     32 * @{
     33 */
     34
    3235
    3336/*******************************************************************************
  • trunk/libc/include/libc-alias.h

    r2446 r2916  
    3535#include "libc-std.h"
    3636
     37void __libc_Timebomb(void);
    3738#ifdef TIMEBOMB
    38 void __libc_Timebomb(void);
    3939asm(".stabs  \"___libc_Timebomb\",1,0,0,0");
    4040#endif
  • trunk/libc/src/kNIX/b_signalSendPid.c

    r2905 r2916  
    3232#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_SIGNAL
    3333#include <klibc/logstrict.h>
    34 #ifdef __OS2__ /* later on NT. */
    35 # include "os2/b_signal.h"
    36 #endif
    3734
    3835
  • trunk/libc/src/kNIX/kNIX.h

    r2915 r2916  
    2929
    3030#define _GNU_SOURCE
     31#define INCL_TCPIP_ALLIOCTLS
     32#define _BSD_NAMESPACE_POLLUTION
    3133
    3234#include "libc-alias.h"
     
    5254#include <sys/fmutex.h>
    5355#include <sys/fcntl.h>
     56#include <sys/filio.h>
    5457#include <sys/mman.h>
    5558#include <sys/mount.h>
     59#include <sys/queue.h>
    5660#include <sys/resource.h>
    5761#include <sys/smutex.h>
     
    5963#include <sys/types.h>
    6064#include <sys/syslimits.h>
     65#define _KERNEL
     66#include <sys/shm.h>
     67#include <sys/sem.h>
     68#undef _KERNEL
    6169#include <klibc/io.h>
    62 #include <klibc/umalloc.h>
     70#include <klibc/initterm.h>
     71#include <klibc/pathrewrite.h>
    6372#include <klibc/thread.h>
    6473#include <klibc/time.h>
     74#include <klibc/umalloc.h>
    6575#include <klibc/backend.h>
    6676
  • trunk/libc/src/kNIX/os2/DosAllocMemEx.c

    r2913 r2916  
    22/** @file
    33 *
    4  * DosAllocMemEx.
    5  *
    6  * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     4 * kNIX - DosAllocMemEx.
     5 *
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 * Copyright (c) 2004 nickk
    88 *
     
    2929*   Header Files                                                               *
    3030*******************************************************************************/
    31 #include "libc-alias.h"
    32 #define INCL_ERRORS
    33 #define INCL_DOSMEMMGR
    34 #define INCL_FSMACROS
    35 #define INCL_EXAPIS
    36 #include <os2emx.h>
    37 #include <386/builtin.h>
    38 #define __LIBC_LOG_GROUP    __LIBC_LOG_GRP_DOSEX
    39 #include <InnoTekLIBC/logstrict.h>
     31#include "kNIX.h"
    4032#include "DosEx.h"
     33#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_DOSEX
     34#include <klibc/logstrict.h>
    4135
    4236
  • trunk/libc/src/kNIX/os2/DosAllocSharedMemEx.c

    r2913 r2916  
    22/** @file
    33 *
    4  * DosAllocSharedMemEx.
     4 * kNIX - DosAllocSharedMemEx.
    55 *
    6  * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    2525 */
    2626
    27 /*******************************************************************************
    28 *   Header Files                                                               *
    29 *******************************************************************************/
    30 #include "libc-alias.h"
    31 #define INCL_ERRORS
    32 #define INCL_DOSMEMMGR
    33 #define INCL_FSMACROS
    34 #define INCL_EXAPIS
    35 #include <os2emx.h>
    36 #define __LIBC_LOG_GROUP    __LIBC_LOG_GRP_DOSEX
    37 #include <InnoTekLIBC/logstrict.h>
     27#include "kNIX.h"
    3828#include "DosEx.h"
    39 
     29#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_DOSEX
     30#include <klibc/logstrict.h>
    4031
    4132/**
  • trunk/libc/src/kNIX/os2/DosCloseEventSemEx.c

    r2913 r2916  
    22/** @file
    33 *
    4  * DosCloseEventSemEx.
     4 * kNIX - DosCloseEventSemEx.
    55 *
    6  * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    2525 */
    2626
    27 /*******************************************************************************
    28 *   Header Files                                                               *
    29 *******************************************************************************/
    30 #include "libc-alias.h"
    31 #define INCL_ERRORS
    32 #define INCL_DOSSEMAPHORES
    33 #define INCL_FSMACROS
    34 #define INCL_EXAPIS
    35 #include <os2emx.h>
    36 #define __LIBC_LOG_GROUP    __LIBC_LOG_GRP_DOSEX
    37 #include <InnoTekLIBC/logstrict.h>
     27#include "kNIX.h"
    3828#include "DosEx.h"
    39 
     29#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_DOSEX
     30#include <klibc/logstrict.h>
    4031
    4132/**
  • trunk/libc/src/kNIX/os2/DosCloseMutexSemEx.c

    r2913 r2916  
    22/** @file
    33 *
    4  * DosCloseMutexSemEx.
     4 * kNIX - DosCloseMutexSemEx.
    55 *
    6  * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    2525 */
    2626
    27 /*******************************************************************************
    28 *   Header Files                                                               *
    29 *******************************************************************************/
    30 #include "libc-alias.h"
    31 #define INCL_ERRORS
    32 #define INCL_DOSSEMAPHORES
    33 #define INCL_FSMACROS
    34 #define INCL_EXAPIS
    35 #include <os2emx.h>
    36 #define __LIBC_LOG_GROUP    __LIBC_LOG_GRP_DOSEX
    37 #include <InnoTekLIBC/logstrict.h>
     27#include "kNIX.h"
    3828#include "DosEx.h"
    39 
     29#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_DOSEX
     30#include <klibc/logstrict.h>
    4031
    4132/**
  • trunk/libc/src/kNIX/os2/DosCreateEventSemEx.c

    r2913 r2916  
    22/** @file
    33 *
    4  * DosCreateEventSemEx.
     4 * kNIX - DosCreateEventSemEx.
    55 *
    6  * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    2525 */
    2626
    27 /*******************************************************************************
    28 *   Header Files                                                               *
    29 *******************************************************************************/
    30 #include "libc-alias.h"
    31 #define INCL_ERRORS
    32 #define INCL_DOSSEMAPHORES
    33 #define INCL_FSMACROS
    34 #define INCL_EXAPIS
    35 #include <os2emx.h>
    36 #define __LIBC_LOG_GROUP    __LIBC_LOG_GRP_DOSEX
    37 #include <InnoTekLIBC/logstrict.h>
     27#include "kNIX.h"
    3828#include "DosEx.h"
    39 
     29#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_DOSEX
     30#include <klibc/logstrict.h>
    4031
    4132/**
  • trunk/libc/src/kNIX/os2/DosCreateMutexSemEx.c

    r2913 r2916  
    22/** @file
    33 *
    4  * DosCreateMutexSemEx.
     4 * kNIX - DosCreateMutexSemEx.
    55 *
    6  * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    2525 */
    2626
    27 /*******************************************************************************
    28 *   Header Files                                                               *
    29 *******************************************************************************/
    30 #include "libc-alias.h"
    31 #define INCL_ERRORS
    32 #define INCL_DOSSEMAPHORES
    33 #define INCL_FSMACROS
    34 #define INCL_EXAPIS
    35 #include <os2emx.h>
    36 #define __LIBC_LOG_GROUP    __LIBC_LOG_GRP_DOSEX
    37 #include <InnoTekLIBC/logstrict.h>
     27#include "kNIX.h"
    3828#include "DosEx.h"
    39 
     29#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_DOSEX
     30#include <klibc/logstrict.h>
    4031
    4132/**
  • trunk/libc/src/kNIX/os2/DosEx.c

    r2914 r2916  
    22/** @file
    33 *
    4  * Dos API Extension Fundament.
    5  *
    6  * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     4 * kNIX - Dos API Extension Fundament.
     5 *
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    3535*   Header Files                                                               *
    3636*******************************************************************************/
    37 #include "libc-alias.h"
    38 #define INCL_ERRORS
    39 #define INCL_DOS
    40 #define INCL_FSMACROS
    41 #define INCL_EXAPIS
    42 #include <os2emx.h>
    43 #include <errno.h>
    44 #include <stdlib.h>
    45 #include <string.h>
    46 #include <emx/startup.h>
    47 #include <386/builtin.h>
    48 #define __LIBC_LOG_GROUP    __LIBC_LOG_GRP_HEAP /* fixme */
    49 #include <InnoTekLIBC/logstrict.h>
    50 #include <InnotekLIBC/fork.h>
     37#include "kNIX.h"
    5138#include "DosEx.h"
    52 #include "syscalls.h"
     39#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_DOSEX
     40#include <klibc/logstrict.h>
    5341
    5442
  • trunk/libc/src/kNIX/os2/DosFreeMemEx.c

    r2913 r2916  
    22/** @file
    33 *
    4  * DosFreeMemEx.
     4 * kNIX - DosFreeMemEx.
    55 *
    6  * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    2525 */
    2626
    27 /*******************************************************************************
    28 *   Header Files                                                               *
    29 *******************************************************************************/
    30 #include "libc-alias.h"
    31 #define INCL_ERRORS
    32 #define INCL_DOSMEMMGR
    33 #define INCL_FSMACROS
    34 #define INCL_EXAPIS
    35 #include <os2emx.h>
    36 #define __LIBC_LOG_GROUP    __LIBC_LOG_GRP_DOSEX
    37 #include <InnoTekLIBC/logstrict.h>
     27#include "kNIX.h"
    3828#include "DosEx.h"
    39 
     29#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_DOSEX
     30#include <klibc/logstrict.h>
    4031
    4132/**
  • trunk/libc/src/kNIX/os2/DosFreeModuleEx.c

    r2913 r2916  
    22/** @file
    33 *
    4  * DosFreeModuleEx.
     4 * kNIX - DosFreeModuleEx.
    55 *
    6  * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    2525 */
    2626
    27 /*******************************************************************************
    28 *   Header Files                                                               *
    29 *******************************************************************************/
    30 #include "libc-alias.h"
    31 #define INCL_ERRORS
    32 #define INCL_DOSMODULEMGR
    33 #define INCL_FSMACROS
    34 #define INCL_EXAPIS
    35 #include <os2emx.h>
    36 #define __LIBC_LOG_GROUP    __LIBC_LOG_GRP_DOSEX
    37 #include <InnoTekLIBC/logstrict.h>
     27#include "kNIX.h"
    3828#include "DosEx.h"
    39 
     29#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_DOSEX
     30#include <klibc/logstrict.h>
    4031
    4132/**
  • trunk/libc/src/kNIX/os2/DosGetNamedSharedMemEx.c

    r2913 r2916  
    22/** @file
    33 *
    4  * DosGetNamedSharedMemEx.
     4 * kNIX - DosGetNamedSharedMemEx.
    55 *
    6  * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    2525 */
    2626
    27 /*******************************************************************************
    28 *   Header Files                                                               *
    29 *******************************************************************************/
    30 #include "libc-alias.h"
    31 #define INCL_ERRORS
    32 #define INCL_DOSMEMMGR
    33 #define INCL_FSMACROS
    34 #define INCL_EXAPIS
    35 #include <os2emx.h>
    36 #define __LIBC_LOG_GROUP    __LIBC_LOG_GRP_DOSEX
    37 #include <InnoTekLIBC/logstrict.h>
     27#include "kNIX.h"
    3828#include "DosEx.h"
    39 
     29#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_DOSEX
     30#include <klibc/logstrict.h>
    4031
    4132/**
  • trunk/libc/src/kNIX/os2/DosGetSharedMemEx.c

    r2913 r2916  
    22/** @file
    33 *
    4  * DosGetSharedMemEx.
     4 * kNIX - DosGetSharedMemEx.
    55 *
    6  * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    2525 */
    2626
    27 /*******************************************************************************
    28 *   Header Files                                                               *
    29 *******************************************************************************/
    30 #include "libc-alias.h"
    31 #define INCL_ERRORS
    32 #define INCL_DOSMEMMGR
    33 #define INCL_FSMACROS
    34 #define INCL_EXAPIS
    35 #include <os2emx.h>
    36 #define __LIBC_LOG_GROUP    __LIBC_LOG_GRP_DOSEX
    37 #include <InnoTekLIBC/logstrict.h>
     27#include "kNIX.h"
    3828#include "DosEx.h"
    39 
     29#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_DOSEX
     30#include <klibc/logstrict.h>
    4031
    4132/**
  • trunk/libc/src/kNIX/os2/DosLoadModuleEx.c

    r2913 r2916  
    22/** @file
    33 *
    4  * DosCreateEventSemEx.
     4 * kNIX - DosCreateEventSemEx.
    55 *
    6  * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    2525 */
    2626
    27 /*******************************************************************************
    28 *   Header Files                                                               *
    29 *******************************************************************************/
    30 #include "libc-alias.h"
    31 #define INCL_ERRORS
    32 #define INCL_DOSMODULEMGR
    33 #define INCL_FSMACROS
    34 #define INCL_EXAPIS
    35 #include <os2emx.h>
    36 #define __LIBC_LOG_GROUP    __LIBC_LOG_GRP_DOSEX
    37 #include <InnoTekLIBC/logstrict.h>
     27#include "kNIX.h"
    3828#include "DosEx.h"
     29#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_DOSEX
     30#include <klibc/logstrict.h>
    3931
    4032
  • trunk/libc/src/kNIX/os2/DosOpenEventSemEx.c

    r2913 r2916  
    22/** @file
    33 *
    4  * DosOpenEventSemEx.
     4 * kNIX - DosOpenEventSemEx.
    55 *
    6  * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    2525 */
    2626
    27 /*******************************************************************************
    28 *   Header Files                                                               *
    29 *******************************************************************************/
    30 #include "libc-alias.h"
    31 #define INCL_ERRORS
    32 #define INCL_DOSSEMAPHORES
    33 #define INCL_FSMACROS
    34 #define INCL_EXAPIS
    35 #include <os2emx.h>
    36 #define __LIBC_LOG_GROUP    __LIBC_LOG_GRP_DOSEX
    37 #include <InnoTekLIBC/logstrict.h>
     27#include "kNIX.h"
    3828#include "DosEx.h"
    39 
     29#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_DOSEX
     30#include <klibc/logstrict.h>
    4031
    4132/**
  • trunk/libc/src/kNIX/os2/DosOpenMutexSemEx.c

    r2913 r2916  
    22/** @file
    33 *
    4  * DosOpenMutexSemEx.
     4 * kNIX - DosOpenMutexSemEx.
    55 *
    6  * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    2828*   Header Files                                                               *
    2929*******************************************************************************/
    30 #include "libc-alias.h"
    31 #define INCL_ERRORS
    32 #define INCL_DOSSEMAPHORES
    33 #define INCL_EXAPIS
    34 #define INCL_FSMACROS
    35 #include <os2emx.h>
    36 #define __LIBC_LOG_GROUP    __LIBC_LOG_GRP_DOSEX
    37 #include <InnoTekLIBC/logstrict.h>
     30#include "kNIX.h"
    3831#include "DosEx.h"
     32#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_DOSEX
     33#include <klibc/logstrict.h>
    3934
    4035
  • trunk/libc/src/kNIX/os2/FastInfoBlocks.c

    r2913 r2916  
    2929*   Header Files                                                               *
    3030*******************************************************************************/
    31 #include "libc-alias.h"
    32 #define INCL_DOSINFOSEG
    33 #define INCL_DOSPROCESS
    34 #define INCL_FSMACROS
    35 #include <os2emx.h>
    36 #include <klibc/fib.h>
     31#include "kNIX.h"
    3732#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_MISC
    38 #include <InnoTekLIBC/logstrict.h>
     33#include <klibc/logstrict.h>
    3934
    4035
  • trunk/libc/src/kNIX/os2/__select.c

    r2914 r2916  
    2525 */
    2626
    27 #include "libc-alias.h"
    28 #define INCL_FSMACROS
    29 #define INCL_DOSSEMAPHORES
    30 #define INCL_ERRORS
    31 #include <os2emx.h>
    32 #include <stdlib.h>
    33 #include <string.h>
    34 #include <errno.h>
    35 #include <sys/time.h>
     27#include "kNIX.h"
    3628#include <sys/select.h>
    37 #include <emx/io.h>
    3829#include <emx/syscalls.h>
    39 #include "syscalls.h"
    40 #include "backend.h"
    4130
    4231
     
    9685            ||  (exceptfds && FD_ISSET(i, exceptfds)))
    9786        {
    98             PLIBCFH pFH = __libc_FH(i);
    99             if (!pFH)
     87            __LIBC_PFH pFH;
     88            int rc = __libc_FHGet(i, &pFH);
     89            if (rc)
    10090            {
    101                 errno = EBADF;
     91                errno = -rc;
    10292                return -1;
    10393            }
     
    10999                ||  (pfnSelect && pFH->pOps->pfnSelect != pfnSelect))
    110100            {
     101
     102                __libc_FHPut(pFH);
    111103                errno = EINVAL;
    112104                return -1;
     
    127119                    if (!pLookAhead)
    128120                    {
     121                        __libc_FHPut(pFH);
    129122                        errno = ENOMEM;
    130123                        return -1;
     
    135128                cLookAhead++;
    136129            }
     130            __libc_FHPut(pFH);
    137131        }
    138132    }
     
    188182    {
    189183        if (rc > 0)
    190             _sys_set_errno(rc);
     184            errno = __libc_back_native2errno(rc);
    191185        else
    192186            errno = -rc;
  • trunk/libc/src/kNIX/os2/b_ioFileControl.c

    r2915 r2916  
    44 * kNIX - File Control.
    55 *
    6  * Copyright (c) 2003-2005 knut st. osmundsen <bird-src-spam@innotek.de>
     6 * Copyright (c) 2003-2006 knut st. osmundsen <bird-src-spam@innotek.de>
    77 *
    88 *
     
    7272             * Standard OS/2 handle.
    7373             */
    74             rc = __libc_Back_ioFileControlStandard(pFH, fh, iRequest, iArg, prc);
     74            rc = __libc_Back_ioFileControlStandard(pFH, iRequest, iArg, prc);
    7575        }
    7676        else
     
    101101 *
    102102 * @param   pFH         Pointer to the handle structure to operate on.
    103  * @param   fh          It's associated filehandle.
    104103 * @param   iRequest    Which file file descriptior request to perform.
    105104 * @param   iArg        Argument which content is specific to each
     
    108107 *                      returned to the caller.
    109108 */
    110 int __libc_Back_ioFileControlStandard(__LIBC_PFH pFH, int fh, int iRequest, intptr_t iArg, int *prc)
    111 {
    112     LIBCLOG_ENTER("pFH=%p fh=%d iRequest=%#x iArg=%#x prc=%p\n", (void *)pFH, fh, iRequest, iArg, (void *)prc);
     109int __libc_Back_ioFileControlStandard(__LIBC_PFH pFH, int iRequest, intptr_t iArg, int *prc)
     110{
     111    LIBCLOG_ENTER("pFH=%p iRequest=%#x iArg=%#x prc=%p\n", (void *)pFH, iRequest, iArg, (void *)prc);
    113112
    114113    switch (iRequest)
     
    141140        case F_GETFD:
    142141        {
    143             int rc = __fcntl_getfd(pFH, fh, prc);
     142            int rc = __fcntl_getfd(pFH, pFH->fh, prc);
    144143            LIBCLOG_MIX0_RETURN_INT(rc);
    145144        }
     
    151150        {
    152151            *prc = 0;
    153             int rc = __fcntl_setfd(pFH, fh, (int)iArg);
     152            int rc = __fcntl_setfd(pFH, pFH->fh, (int)iArg);
    154153            LIBCLOG_MIX0_RETURN_INT(rc);
    155154        }
     
    163162        {
    164163            *prc = 0;
    165             int rc = __fcntl_locking(fh, iRequest, (struct flock*)iArg);
     164            int rc = __fcntl_locking(pFH->fh, iRequest, (struct flock*)iArg);
    166165            LIBCLOG_MIX0_RETURN_INT(rc);
    167166        }
  • trunk/libc/src/kNIX/os2/b_panic.c

    r2914 r2916  
    3333#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_NOGROUP
    3434#include <klibc/logstrict.h>
    35 
    36 
    37 /*******************************************************************************
    38 *   Defined Constants And Macros                                               *
    39 *******************************************************************************/
    40 /** OS/2 default standard error handle. */
    41 #define HFILE_STDERR    ((HFILE)2)
    4235
    4336
  • trunk/libc/src/kNIX/os2/b_signalTimer.c

    r2914 r2916  
    44 * kNIX - setitimer() & getitimer().
    55 *
    6  * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    2929*   Header Files                                                               *
    3030*******************************************************************************/
    31 #include "libc-alias.h"
    32 #define INCL_BASE
    33 #define INCL_FSMACROS
    34 #define INCL_DOSINFOSEG
    35 #define INCL_ERRORS
    36 #include <os2emx.h>
    37 #include <signal.h>
    38 #include <errno.h>
    39 #include <386/builtin.h>
    40 #include <InnoTekLIBC/backend.h>
    41 #include <InnoTekLIBC/thread.h>
     31#include "kNIX.h"
    4232#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_SIGNAL
    43 #include <InnoTekLIBC/logstrict.h>
    44 #include "b_signal.h"
    45 #include "backend.h"
     33#include <klibc/logstrict.h>
    4634
    4735
  • trunk/libc/src/kNIX/os2/b_signalWait.c

    r2913 r2916  
    44 * kNIX - signal wait.
    55 *
    6  * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    3030*   Header Files                                                               *
    3131*******************************************************************************/
    32 #define INCL_BASE
    33 #define INCL_FSMACROS
    34 #include <os2emx.h>
    35 
    36 #include <signal.h>
    37 #include <errno.h>
    38 #include <386/builtin.h>
    39 #include "b_signal.h"
    40 #include <InnoTekLIBC/thread.h>
    41 #include <InnoTekLIBC/backend.h>
     32#include "kNIX.h"
    4233#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_SIGNAL
    43 #include <InnoTekLIBC/logstrict.h>
     34#include <klibc/logstrict.h>
    4435
    4536
  • trunk/libc/src/kNIX/os2/b_threadCleanup.c

    r2913 r2916  
    44 * kNIX - Thread structure cleanup.
    55 *
    6  * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    2525 */
    2626
    27 /*******************************************************************************
    28 *   Header Files                                                               *
    29 *******************************************************************************/
    30 #include "libc-alias.h"
    31 #define INCL_DOS
    32 #define INCL_FSMACROS
    33 #include <os2emx.h>
    34 #include "syscalls.h"
    35 #include <InnoTekLIBC/thread.h>
    36 #include <InnoTekLIBC/backend.h>
     27#include "kNIX.h"
    3728
    3829void __libc_Back_threadCleanup(__LIBC_PTHREAD pThrd)
     
    5041    }
    5142}
     43
  • trunk/libc/src/kNIX/os2/b_threadEnd.c

    r2913 r2916  
    2525 */
    2626
    27 
    28 /*******************************************************************************
    29 *   Header Files                                                               *
    30 *******************************************************************************/
    31 #include "libc-alias.h"
    32 #include <errno.h>
    33 #define INCL_DOS
    34 #define INCL_FSMACROS
    35 #include <os2emx.h>
    36 #include <InnoTekLIBC/backend.h>
     27#include "kNIX.h"
    3728
    3829void __libc_Back_threadEnd(void *pExpRegRec)
     
    4334    FS_RESTORE();
    4435}
     36
  • trunk/libc/src/kNIX/os2/b_threadInit.c

    r2913 r2916  
    2525 */
    2626
    27 /*******************************************************************************
    28 *   Header Files                                                               *
    29 *******************************************************************************/
    30 #include "libc-alias.h"
    31 #define INCL_DOSEXCEPTIONS
    32 #define INCL_FSMACROS
    33 #include <os2emx.h>
    34 #include <sys/signal.h>
    35 #include <emx/syscalls.h>
    36 #include "syscalls.h"
    37 #include "b_signal.h"
    38 #include <InnoTekLIBC/thread.h>
    39 #include <InnoTekLIBC/backend.h>
    40 
     27#include "kNIX.h"
    4128
    4229void __libc_Back_threadInit(__LIBC_PTHREAD pThrd, const __LIBC_PTHREAD pParentThrd)
  • trunk/libc/src/kNIX/os2/b_threadSleep.c

    r2913 r2916  
    44 * kNIX - nanosleep().
    55 *
    6  * Copyright (c) 2005 knut st. osmundsen <bird@anduin.net>
     6 * Copyright (c) 2005-2006 knut st. osmundsen <bird@anduin.net>
    77 *
    88 *
     
    2525 */
    2626
    27 
    28 /*******************************************************************************
    29 *   Header Files                                                               *
    30 *******************************************************************************/
    31 #include "libc-alias.h"
    32 #define INCL_BASE
    33 #define INCL_FSMACROS
    34 #include <os2emx.h>
    35 
    36 #include <unistd.h>
    37 #include <errno.h>
    38 #include <InnoTekLIBC/thread.h>
    39 #include <InnoTekLIBC/backend.h>
     27#include "kNIX.h"
    4028#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_THREAD
    41 #include <InnoTekLIBC/logstrict.h>
    42 #include <klibc/fib.h>
    43 #include "b_signal.h"
    44 
     29#include <klibc/logstrict.h>
    4530
    4631/**
     
    5237 * @returns -EINTR if the interrupted by signal.
    5338
    54  * @param   ullNanoReq      Time to sleep, in nano seconds.
    55  * @param   pullNanoRem     Where to store remaining time (also nano seconds).
     39 * @param   u64NanoReq      Time to sleep, in nano seconds.
     40 * @param   pu64NanoRem     Where to store remaining time (also nano seconds).
    5641
    5742 * @remark  For relativly small sleeps this api temporarily changes the thread
     
    6146 *          It also means that if such code changes the priority it will be undone.
    6247 */
    63 int __libc_Back_threadSleep(unsigned long long ullNanoReq, unsigned long long *pullNanoRem)
     48int __libc_Back_threadSleep(uint64_t u64NanoReq, uint64_t *pu64NanoRem)
    6449{
    65     LIBCLOG_ENTER("ullNanoReq=%lld pullNanoRem=%p", ullNanoReq, (void *)pullNanoRem);
     50    LIBCLOG_ENTER("u64NanoReq=%lld pu64NanoRem=%p", (long long)u64NanoReq, (void *)pu64NanoRem);
    6651    ULONG           msTSStart = fibGetMsCount();
    6752    ULONG           msSleep;
     
    7358     * If zero, yield.
    7459     */
    75     if (ullNanoReq == 0)
     60    if (u64NanoReq == 0)
    7661    {
    7762        LIBCLOG_MSG("DosSleep(0)\n");
     
    8368     * Infinite wait
    8469     */
    85     else if (ullNanoReq == ~0ULL)
     70    else if (u64NanoReq == ~0ULL)
    8671    {
    8772        LIBCLOG_MSG("DosSleep(~0)\n");
     
    9378     * Less than 49 days wait but not infinite..
    9479     */
    95     else if (ullNanoReq < 0xfffffff0ULL * 1000000ULL)
     80    else if (u64NanoReq < 0xfffffff0ULL * 1000000ULL)
    9681    {
    9782        /*
    9883         * Calc millisecond wait.
    9984         */
    100         msSleep = (ULONG)( (ullNanoReq + 999999) / 1000000 );
     85        msSleep = (ULONG)( (u64NanoReq + 999999) / 1000000 );
    10186
    10287        /*
     
    166151         */
    167152        /** @todo the interrupt case is wrong if we're interrupted after more than 49 days... */
    168         unsigned long long ullMilliesSleep = (ullNanoReq + 999999) / 1000000;
     153        unsigned long long ullMilliesSleep = (u64NanoReq + 999999) / 1000000;
    169154        do
    170155        {
     
    186171     */
    187172    if (    fInterrupted
    188         &&  pullNanoRem)
     173        &&  pu64NanoRem)
    189174    {
    190175        ULONG msSlept = fibGetMsCount() - msTSStart;
    191176        if (msSleep <= msSlept)
    192             *pullNanoRem = 0;
     177            *pu64NanoRem = 0;
    193178        else
    194179        {
    195180            unsigned long long ullNanoRem = (msSleep - msSlept) * 10000000ULL;
    196             *pullNanoRem = ullNanoRem >= ullNanoReq ? ullNanoReq - 1 : ullNanoRem;
     181            *pu64NanoRem = ullNanoRem >= u64NanoReq ? u64NanoReq - 1 : ullNanoRem;
    197182        }
    198183    }
  • trunk/libc/src/kNIX/os2/b_threadStartup.c

    r2913 r2916  
    2525 */
    2626
    27 
    28 /*******************************************************************************
    29 *   Header Files                                                               *
    30 *******************************************************************************/
    31 #include "libc-alias.h"
    32 #define INCL_DOS
    33 #define INCL_FSMACROS
    34 #include <os2emx.h>
    35 #include <InnoTekLIBC/backend.h>
    36 
     27#include "kNIX.h"
    3728
    3829void __libc_Back_threadStartup(void *pExpRegRec)
  • trunk/libc/src/kNIX/os2/exceptions.c

    r2913 r2916  
    3030*   Header Files                                                               *
    3131*******************************************************************************/
    32 #define INCL_BASE
    33 #define INCL_FSMACROS
    34 #include <os2emx.h>
    35 
    36 #include <signal.h>
    37 #include <errno.h>
    38 #include <386/builtin.h>
    39 #include <InnoTekLIBC/thread.h>
    40 #include <InnoTekLIBC/backend.h>
     32#include "kNIX.h"
    4133#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_SIGNAL
    42 #include <InnoTekLIBC/logstrict.h>
    43 #include "b_signal.h"
     34#include <klibc/logstrict.h>
    4435
    4536
  • trunk/libc/src/kNIX/os2/filefind.c

    r2732 r2916  
    66*   Header Files                                                               *
    77*******************************************************************************/
    8 #include "libc-alias.h"
    9 #define INCL_BASE
    10 #define INCL_FSMACROS
    11 #include <os2emx.h>
    12 #include "b_fs.h"
    13 #include <stdlib.h>
    14 #include <string.h>
    15 #include <errno.h>
    16 #include <limits.h>
     8#include "kNIX.h"
    179#include <emx/syscalls.h>
    18 #include "syscalls.h"
    19 #include <InnoTekLIBC/thread.h>
    20 #include <InnoTekLIBC/pathrewrite.h>
    2110#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_IO
    22 #include <InnoTekLIBC/logstrict.h>
     11#include <klibc/logstrict.h>
     12
     13
     14/*******************************************************************************
     15*   Defined Constants And Macros                                               *
     16*******************************************************************************/
     17/** This macro is used for accessing FDATE or FTIME values as USHORT. */
     18#define XUSHORT(x) (*(USHORT *)&(x))
     19
    2320
    2421/**
     
    184181        pFD->cFiles = 0;
    185182        pFD->pchNext = NULL;
    186         _sys_set_errno(rc);
     183        errno = __libc_back_native2errno(rc);
    187184        LIBCLOG_ERROR_RETURN_INT(-1);
    188185    }
     
    234231        {
    235232            find_close(pFD);
    236             _sys_set_errno(rc);
     233            errno = __libc_back_native2errno(rc);
    237234            return -1;
    238235        }
  • trunk/libc/src/kNIX/os2/fs-os2.c

    r2903 r2916  
    2929*   Header Files                                                               *
    3030*******************************************************************************/
     31#include "kNIX.h"
    3132#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_FS
    32 #define _GNU_SOURCE
    33 #include "kNIX.h"
    34 #include <InnoTekLIBC/sharedpm.h>
    35 #include <InnoTekLIBC/pathrewrite.h>
    36 #include <klibc/backend.h>
    3733#include <klibc/logstrict.h>
    3834
  • trunk/libc/src/kNIX/os2/heaphigh.c

    r2739 r2916  
    2323 *
    2424 */
     25
     26
     27/*******************************************************************************
     28*   Header Files                                                               *
     29*******************************************************************************/
     30#include "kNIX.h"
     31#define  __LIBC_LOG_GROUP __LIBC_LOG_GRP_HEAP
     32#include <klibc/logstrict.h>
    2533
    2634
     
    3947/** Round chunk size. */
    4048#define HIMEM_ROUND_SIZE(cb, align) ( ((cb) + (align) - 1) & ~((align) - 1) )
    41 
    42 
    43 
    44 /*******************************************************************************
    45 *   Header Files                                                               *
    46 *******************************************************************************/
    47 #include "libc-alias.h"
    48 #define INCL_DOSMEMMGR
    49 #define INCL_EXAPIS
    50 #define INCL_ERRORS
    51 #include <os2emx.h>
    52 #include <string.h>
    53 #include <emx/umalloc.h>
    54 #include "syscalls.h"
    55 #define  __LIBC_LOG_GROUP __LIBC_LOG_GRP_HEAP
    56 #include <InnoTekLIBC/logstrict.h>
    5749
    5850
     
    542534int     __libc_HasHighMem(void)
    543535{
    544     return _sys_gcbVirtualAddressLimit > 512*1024*1024;
    545 }
    546 
     536    return __libc_back_gcbVirtualAddressLimit > 512*1024*1024;
     537}
     538
  • trunk/libc/src/kNIX/os2/hooks.c

    r2913 r2916  
    5959 */
    6060
    61 
    62 /*******************************************************************************
    63 *   Header Files                                                               *
    64 *******************************************************************************/
    65 #define _GNU_SOURCE
    66 #include "libc-alias.h"
    67 #define INCL_BASE
    68 #define INCL_EXAPIS
    69 #include <os2emx.h>
    70 #include "backend.h"
    71 #include <stddef.h>
    72 #include <string.h>
    73 #include <errno.h>
    74 #include "syscalls.h"
    75 #include <InnoTekLIBC/backend.h>
    76 #include <InnoTekLIBC/pathrewrite.h>
     61#include "kNIX.h"
    7762#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_INITTERM
    78 #include <InnoTekLIBC/logstrict.h>
    79 
    80 
     63#include <klibc/logstrict.h>
    8164
    8265/**
     
    8467 * specification string.
    8568 */
    86 void __libc_back_hooksInit(const char *pszSpec, unsigned long hmod)
     69void __libc_back_hooksInit (const char *pszSpec, uintptr_t hmod)
    8770{
    8871    LIBCLOG_ENTER("pszSpec=%s\n", pszSpec);
  • trunk/libc/src/kNIX/os2/kNIX-os2.h

    r2915 r2916  
    283283/** @} */
    284284
     285
     286/** Virtual address limit and high memory indicator.
     287 *
     288 * Zero means limit is 512MB.
     289 * Non zero means more that 512MB. The value is then the size of then the user
     290 * address space size in bytes.
     291 *
     292 * Initiated by __init_dll().
     293 */
     294extern size_t __libc_back_gcbVirtualAddressLimit;
     295
    285296__END_DECLS
    286297
  • trunk/libc/src/kNIX/os2/libcfork.c

    r2915 r2916  
    22/** @file
    33 *
    4  * kNIX fork().
    5  *
    6  * Copyright (c) 2004-2005 knut st. osmundsen <bird-srcspam@anduin.net>
     4 * kNIX - fork(), OS/2.
     5 *
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
  • trunk/libc/src/kNIX/os2/os2error.c

    r2913 r2916  
    44 * kNIX - DosError() Wrapping.
    55 *
    6  * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    2828*   Header Files                                                               *
    2929*******************************************************************************/
    30 #include "libc-alias.h"
    31 #define INCL_BASE
    32 #define INCL_FSMACROS
    33 #include <os2emx.h>
    34 #include <InnoTekLIBC/os2error.h>
    35 
     30#include "kNIX.h"
    3631
    3732
  • trunk/libc/src/kNIX/os2/pathrewrite.c

    r2913 r2916  
    4545*   Header Files                                                               *
    4646*******************************************************************************/
    47 #include <InnoTekLIBC/pathrewrite.h>
    48 #include <InnoTekLIBC/libc.h>
     47#include "kNIX.h"
    4948#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_IO
    50 #include <InnoTekLIBC/logstrict.h>
    51 
    52 #include <string.h>
    53 #include <errno.h>
    54 #include <stdlib.h>
    55 #include <emx/startup.h>
    56 #include <emx/umalloc.h>
    57 
    58 #define INCL_BASE
    59 #include <os2.h>
     49#include <klibc/logstrict.h>
    6050
    6151
     
    763753    LIBCLOG_RETURN_INT(0);
    764754}
     755
  • trunk/libc/src/kNIX/os2/signals.c

    r2914 r2916  
    44 * kNIX - Signals.
    55 *
    6  * Copyright (c) 2004-2005 knut st. osmundsen <bird-srcspam@anduin.net>
     6 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    77 *
    88 *
     
    6666*   Header Files                                                               *
    6767*******************************************************************************/
    68 #include "libc-alias.h"
    69 #define INCL_BASE
    70 #define INCL_DOSSIGNALS
    71 #define INCL_FSMACROS
    72 #define INCL_EXAPIS
    73 #include <os2emx.h>
    74 
    75 #include <signal.h>
    76 #include <errno.h>
    77 #include <string.h>
    78 #include <malloc.h>
    79 #include <386/builtin.h>
    80 #include <emx/umalloc.h>
    81 #include <InnoTekLIBC/thread.h>
    82 #include <InnoTekLIBC/fork.h>
    83 #include <InnoTekLIBC/backend.h>
    84 #include <klibc/fib.h>
     68#include "kNIX.h"
    8569#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_SIGNAL
    86 #include <InnoTekLIBC/logstrict.h>
    87 #include "syscalls.h"
    88 #include "backend.h"
    89 #include "b_signal.h"
    90 #include "b_process.h"
     70#include <klibc/logstrict.h>
    9171
    9272
     
    9474*   Defined Constants And Macros                                               *
    9575*******************************************************************************/
    96 /** OS/2 default standard error handle. */
    97 #define HFILE_STDERR    ((HFILE)2)
    98 
    9976/** @defgroup libc_back_signals_properties  Signal Properties
    10077 * The return actions are ordered by precendece.
     
    917894            SigInfo.si_flags |= __LIBC_SI_QUEUED;
    918895        if (!SigInfo.si_pid)
    919             SigInfo.si_pid = _sys_pid;
     896            SigInfo.si_pid = fibGetPid();
    920897        if (!SigInfo.si_tid && pThrd)
    921898            SigInfo.si_tid = pThrd->tid;
     
    10241001        SigInfo.si_flags |= __LIBC_SI_QUEUED;
    10251002    if (!SigInfo.si_pid)
    1026         SigInfo.si_pid = _sys_pid;
     1003        SigInfo.si_pid = fibGetPid();
    10271004    if (!SigInfo.si_tid)
    10281005        SigInfo.si_tid = pThrd->tid;
     
    13551332                        /* Shit! We failed to queue it on a thread. Try put it back in the 1st level queue. */
    13561333                        LIBCLOG_MSG("failed to schedule signal %d for any thread!\n", iSignalNo);
    1357                         __libc_spmSigQueue(SigInfo.si_signo, &SigInfo, _sys_pid, !!(SigInfo.si_flags & __LIBC_SI_QUEUED));
     1334                        __libc_spmSigQueue(SigInfo.si_signo, &SigInfo, fibGetPid(), !!(SigInfo.si_flags & __LIBC_SI_QUEUED));
    13581335                        break;
    13591336                    }
     
    20462023    siginfo_t   SigInfo = {0};
    20472024    SigInfo.si_signo    = SIGCHLD;
    2048     SigInfo.si_pid      = _sys_pid;
     2025    SigInfo.si_pid      = fibGetPid();
    20492026    SigInfo.si_code     = CLD_STOPPED;
    20502027    SigInfo.si_status   = iSignalNo;
    20512028    SigInfo.si_flags    = __LIBC_SI_INTERNAL;
    2052     __libc_back_signalSendPidOther(_sys_ppid, SIGCHLD, &SigInfo);
     2029    __libc_back_signalSendPidOther(fibGetPPid(), SIGCHLD, &SigInfo);
    20532030
    20542031    /*
     
    20752052    siginfo_t   SigInfo = {0};
    20762053    SigInfo.si_signo    = SIGCHLD;
    2077     SigInfo.si_pid      = _sys_pid;
     2054    SigInfo.si_pid      = fibGetPid();
    20782055    SigInfo.si_code     = CLD_CONTINUED;
    20792056    SigInfo.si_status   = SIGCONT;
    20802057    SigInfo.si_flags    = __LIBC_SI_INTERNAL;
    2081     __libc_back_signalSendPidOther(_sys_ppid, SIGCHLD, &SigInfo);
     2058    __libc_back_signalSendPidOther(fibGetPPid(), SIGCHLD, &SigInfo);
    20822059    return 0;
    20832060}
     
    21142091        SigInfo.si_code     = SI_USER;
    21152092    if (SigInfo.si_pid)
    2116         SigInfo.si_pid      = _sys_pid;
     2093        SigInfo.si_pid      = fibGetPid();
    21172094    __LIBC_PTHREAD pThrd    = __libc_threadCurrentNoAuto();
    21182095    if (pThrd)
     
    22942271    SigInfo.si_code         = SI_USER;
    22952272    if (SigInfo.si_pid)
    2296         SigInfo.si_pid      = _sys_pid;
     2273        SigInfo.si_pid      = fibGetPid();
    22972274    __LIBC_PTHREAD pThrd    = __libc_threadCurrent();
    22982275    if (pThrd)
  • trunk/libc/src/kNIX/os2/syscalls.h

    r2914 r2916  
    3131#endif
    3232
    33 /* This macro is used for accessing FDATE or FTIME values as
    34    USHORT. */
    35 
    36 #define XUSHORT(x) (*(USHORT *)&(x))
    37 
    3833EXTERN unsigned _sys_uflags INIT (0);
    3934EXTERN unsigned long _sys_clock0_ms INIT (0);
     
    4237EXTERN int _sys_ppid;*/
    4338
    44 /** Virtual address limit and high memory indicator.
    45  *
    46  * Zero means limit is 512MB.
    47  * Non zero means more that 512MB. The value is then the size of then the user
    48  * address space size in bytes.
    49  *
    50  * Initiated by __init_dll().
    51  */
    52 EXTERN unsigned long    _sys_gcbVirtualAddressLimit;
     39/*EXTERN unsigned long    _sys_gcbVirtualAddressLimit;*/
    5340
    5441
  • trunk/libc/src/kNIX/os2/sysv_sem.c

    r2914 r2916  
    77 */
    88
    9 #include "libc-alias.h"
    10 #include <sys/cdefs.h>
     9//#include <sys/cdefs.h>
    1110//__FBSDID("$FreeBSD: src/sys/kern/sysv_sem.c,v 1.70.2.3 2005/03/22 17:20:07 sam Exp $");
    1211
    13 #include <sys/types.h>
    14 #define _KERNEL
    15 #include <sys/sem.h>
    16 #undef _KERNEL
    17 #define INCL_DOSSEMAPHORES
    18 #define INCL_DOSEXCEPTIONS
    19 #define INCL_DOSERRORS
    20 #define INCL_FSMACROS
    21 #define INCL_EXAPIS
    22 #include <os2emx.h>
    23 #include "syscalls.h"
    24 #include <string.h>
    25 #include <errno.h>
    26 #include <emx/umalloc.h>
    27 #include <sys/param.h>
    28 #include <sys/queue.h>
    29 #include <386/builtin.h>
    30 #include <InnoTekLIBC/sharedpm.h>
    31 #include <InnoTekLIBC/thread.h>
    32 #include <klibc/fib.h>
    33 #include <InnoTekLIBC/libc.h>
    34 #include <InnoTekLIBC/backend.h>
     12#include "kNIX.h"
    3513#define __LIBC_LOG_GROUP    __LIBC_LOG_GRP_BACK_IPC
    36 #include <InnoTekLIBC/logstrict.h>
     14#include <klibc/logstrict.h>
    3715
    3816/* debug printf */
  • trunk/libc/src/kNIX/os2/sysv_shm.c

    r2914 r2916  
    3030 */
    3131
    32 #define _BSD_NAMESPACE_POLLUTION
    33 #include "libc-alias.h"
    34 #include <sys/cdefs.h>
     32//#include <sys/cdefs.h>
    3533//__FBSDID("$FreeBSD: src/sys/kern/sysv_shm.c,v 1.96.2.3 2005/02/19 19:54:31 csjp Exp $");
    3634
    37 #include <sys/types.h>
    38 #define _KERNEL
    39 #include <sys/shm.h>
    40 #undef _KERNEL
    41 #include <sys/mman.h>
    42 #include <sys/stat.h>
    43 #define INCL_DOSSEMAPHORES
    44 #define INCL_DOSEXCEPTIONS
    45 #define INCL_DOSMEMMGR
    46 #define INCL_DOSERRORS
    47 #define INCL_FSMACROS
    48 #define INCL_EXAPIS
    49 #include <os2emx.h>
    50 #include "syscalls.h"
    51 #include <string.h>
    52 #include <errno.h>
    53 #include <emx/umalloc.h>
     35#include "kNIX.h"
    5436#include <sys/param.h>
    55 #include <sys/queue.h>
    56 #include <386/builtin.h>
    57 #include <InnoTekLIBC/sharedpm.h>
    58 #include <InnoTekLIBC/thread.h>
    59 #include <klibc/fib.h>
    60 #include <InnoTekLIBC/libc.h>
    61 #include <InnoTekLIBC/fork.h>
    62 #include <InnoTekLIBC/backend.h>
    63 #define __LIBC_LOG_GROUP    __LIBC_LOG_GRP_BACK_FS
    64 #include <InnoTekLIBC/logstrict.h>
     37#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_FS
     38#include <klibc/logstrict.h>
    6539
    6640/* debug printf */
  • trunk/libc/src/kNIX/os2/tcpip.c

    r2914 r2916  
    3737*   Header Files                                                               *
    3838*******************************************************************************/
    39 #define INCL_DOSMODULEMGR
    40 #include <os2emx.h>
    41 
    42 
    43 #include <InnoTekLIBC/sharedpm.h>
     39#include "kNIX.h"
    4440#include <InnoTekLIBC/tcpip.h>
    45 #include <InnoTekLIBC/errno.h>
    4641#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_SOCKET
    47 #include <InnoTekLIBC/logstrict.h>
     42#include <klibc/logstrict.h>
    4843
    4944
  • trunk/libc/src/kNIX/os2/tcpipver.c

    r2913 r2916  
    22/** @file
    33 *
    4  * kNIX - TCP/IP Version Specific Code.
     4 * kNIX - TCP/IP Version Specific Code, OS/2.
    55 *
    66 * This file is included from tcpipver43.c with TCPV40HDRS defined,
     
    88 *
    99 *
    10  * Copyright (c) 2004-2005 knut st. osmundsen <bird-srcspam@anduin.net>
     10 * Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
    1111 *
    1212 *
     
    3333*   Header Files                                                               *
    3434*******************************************************************************/
    35 #define INCL_TCPIP_ALLIOCTLS
    36 #include "libc-alias.h"
    37 #include <errno.h>
    38 #include <string.h>
     35#include "kNIX.h"
     36#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_SOCKET
     37#include <klibc/logstrict.h>
     38
    3939#include <sys/socket.h>
    4040#include <sys/sockio.h>
     
    5353#include <net/route.h>
    5454
    55 #include <sys/fcntl.h>
    56 #include <sys/filio.h>
    57 #include <sys/time.h>
    58 #include <386/builtin.h>
    59 #include <sys/smutex.h>
    60 #include <emx/io.h>
    61 #include <emx/startup.h>
    62 #define INCL_BASE
    63 #define INCL_FSMACROS
    64 #include <os2emx.h>
    65 #include <InnoTekLIBC/sharedpm.h>
    6655#include <InnoTekLIBC/tcpip.h>
    67 #include <InnoTekLIBC/fork.h>
    68 #include <InnoTekLIBC/thread.h>
    69 #include <InnoTekLIBC/backend.h>
    70 #define __LIBC_LOG_GROUP __LIBC_LOG_GRP_SOCKET
    71 #include <InnoTekLIBC/logstrict.h>
    72 
    73 #include "b_fs.h"
     56
    7457
    7558/*******************************************************************************
     
    146129*   Internal Functions                                                         *
    147130*******************************************************************************/
    148 static int TCPNAME(ops_Close)(PLIBCFH pFH, int fh);
    149 static int TCPNAME(ops_Read)(PLIBCFH pFH, int fh, void *pvBuf, size_t cbRead, size_t *pcbRead);
    150 static int TCPNAME(ops_Write)(PLIBCFH pFH, int fh, const void *pvBuf, size_t cbWrite, size_t *pcbWritten);
    151 static int TCPNAME(ops_Duplicate)(PLIBCFH pFH, int fh, int *pfhNew);
    152 static int TCPNAME(ops_FileControl)(PLIBCFH pFH, int fh, int iIOControl, int iArg, int *prc);
    153 static int TCPNAME(ops_IOControl)(PLIBCFH pFH, int fh, int iIOControl, int iArg, int *prc);
     131static int TCPNAME(ops_Close)(__LIBC_PFH pFH);
     132static int TCPNAME(ops_Read)(__LIBC_PFH pFH, void *pvBuf, size_t cbRead, size_t *pcbRead);
     133static int TCPNAME(ops_Write)(__LIBC_PFH pFH, const void *pvBuf, size_t cbWrite, size_t *pcbWritten);
     134static int TCPNAME(ops_Duplicate)(__LIBC_PFH pFH, int *pfhNew);
     135static int TCPNAME(ops_FileControl)(__LIBC_PFH pFH, int iIOControl, int iArg, int *prc);
     136static int TCPNAME(ops_IOControl)(__LIBC_PFH pFH, int iIOControl, int iArg, int *prc);
    154137static int TCPNAME(ops_Select)(int cFHs, struct fd_set *pRead, struct fd_set *pWrite, struct fd_set *pExcept, struct timeval *tv, int *prc);
    155 static int TCPNAME(ops_ForkChild)(struct __libc_FileHandle *pFH, int fh, __LIBC_PFORKHANDLE pForkHandle, __LIBC_FORKOP enmOperation);
     138static int TCPNAME(ops_ForkChild)(struct __libc_FileHandle *pFH, __LIBC_PFORKHANDLE pForkHandle, __LIBC_FORKOP enmOperation);
    156139
    157140static int TCPNAME(imp_soclose)(int s);
     
    193176    TCPNAME(ops_Read),
    194177    TCPNAME(ops_Write),
     178    NULL /* fixme! */,
     179    NULL /* fixme! */,
    195180    TCPNAME(ops_Duplicate),
    196181    TCPNAME(ops_FileControl),
     
    198183    TCPNAME(ops_Select),
    199184    NULL /* fork parent */,
    200     TCPNAME(ops_ForkChild)
     185    TCPNAME(ops_ForkChild),
     186    42
    201187};
    202188
     
    208194 * @param   fh          It's associated filehandle.
    209195 */
    210 static int TCPNAME(ops_Close)(PLIBCFH pFH, int fh)
    211 {
    212     LIBCLOG_ENTER("pFH=%p:{iSocket=%d} fh=%d\n", (void *)pFH, ((PLIBCSOCKETFH)pFH)->iSocket, fh);
     196static int TCPNAME(ops_Close)(__LIBC_PFH pFH)
     197{
     198    LIBCLOG_ENTER("pFH=%p:{.iSocket=%d, .fh} fh=%d\n", (void *)pFH, ((PLIBCSOCKETFH)pFH)->iSocket, pFH->fh);
    213199    PLIBCSOCKETFH   pSocketFH = (PLIBCSOCKETFH)pFH;
    214200    int             rc;
     
    287273 * @param   pcbRead     Where to store the count of bytes actually read.
    288274 */
    289 static int TCPNAME(ops_Read)(PLIBCFH pFH, int fh, void *pvBuf, size_t cbRead, size_t *pcbRead)
    290 {
    291     LIBCLOG_ENTER("pFH=%p:{iSocket=%d} fh=%d pvBuf=%p cbRead=%d pcbRead=%p\n",
    292                   (void *)pFH, ((PLIBCSOCKETFH)pFH)->iSocket, fh, pvBuf, cbRead, (void *)pcbRead);
     275static int TCPNAME(ops_Read)(__LIBC_PFH pFH, void *pvBuf, size_t cbRead, size_t *pcbRead)
     276{
     277    LIBCLOG_ENTER("pFH=%p:{.iSocket=%d .fh=%d} pvBuf=%p cbRead=%d pcbRead=%p\n",
     278                  (void *)pFH, ((PLIBCSOCKETFH)pFH)->iSocket, pFH->fh, pvBuf, cbRead, (void *)pcbRead);
    293279    PLIBCSOCKETFH   pSocketFH = (PLIBCSOCKETFH)pFH;
    294280    int             rc;
     
    319305 * @param   pcbWritten  Where to store the count of bytes actually written.
    320306 */
    321 static int TCPNAME(ops_Write)(PLIBCFH pFH, int fh, const void *pvBuf, size_t cbWrite, size_t *pcbWritten)
    322 {
    323     LIBCLOG_ENTER("pFH=%p:{iSocket=%d} fh=%d pvBuf=%p cbWrite=%d pcbWritten=%p\n",
    324                   (void *)pFH, ((PLIBCSOCKETFH)pFH)->iSocket, fh, pvBuf, cbWrite, (void *)pcbWritten);
     307static int TCPNAME(ops_Write)(__LIBC_PFH pFH, const void *pvBuf, size_t cbWrite, size_t *pcbWritten)
     308{
     309    LIBCLOG_ENTER("pFH=%p:{.iSocket=%d .fh=%d} pvBuf=%p cbWrite=%d pcbWritten=%p\n",
     310                  (void *)pFH, ((PLIBCSOCKETFH)pFH)->iSocket, pFH->fh, pvBuf, cbWrite, (void *)pcbWritten);
    325311    PLIBCSOCKETFH   pSocketFH = (PLIBCSOCKETFH)pFH;
    326312    int             rc;
     
    354340 *                      value will be closed.
    355341 */
    356 static int TCPNAME(ops_Duplicate)(PLIBCFH pFH, int fh, int *pfhNew)
     342static int TCPNAME(ops_Duplicate)(__LIBC_PFH pFH, int *pfhNew)
    357343{
    358344    PLIBCSOCKETFH  pFHSocket = (PLIBCSOCKETFH)pFH;
    359     LIBCLOG_ENTER("pFH=%p:{iSocket=%d} fh=%d pfhNew=%p\n", (void *)pFH, pFHSocket->iSocket, fh, (void *)pfhNew);
     345    LIBCLOG_ENTER("pFH=%p:{.iSocket=%d .fh=%d} pfhNew=%p\n", (void *)pFH, pFHSocket->iSocket, pFH->fh, (void *)pfhNew);
    360346
    361347    /*
     
    389375 *                      returned to the caller.
    390376 */
    391 static int TCPNAME(ops_FileControl)(PLIBCFH pFH, int fh, int iRequest, int iArg, int *prc)
    392 {
    393     LIBCLOG_ENTER("pFH=%p:{iSocket=%d} fh=%d iRequest=%#x iArg=%#x prc=%p\n",
    394                   (void *)pFH, ((PLIBCSOCKETFH)pFH)->iSocket, fh, iRequest, iArg, (void *)prc);
     377static int TCPNAME(ops_FileControl)(__LIBC_PFH pFH, int iRequest, int iArg, int *prc)
     378{
     379    LIBCLOG_ENTER("pFH=%p:{.iSocket=%d .fh=%d} iRequest=%#x iArg=%#x prc=%p\n",
     380                  (void *)pFH, ((PLIBCSOCKETFH)pFH)->iSocket, pFH->fh, iRequest, iArg, (void *)prc);
    395381    int rc;
    396382
     
    407393        case F_GETFD:
    408394        case F_SETFD:
    409             rc = __libc_Back_ioFileControlStandard(pFH, fh, iRequest, iArg, prc);
     395            rc = __libc_Back_ioFileControlStandard(pFH, iRequest, iArg, prc);
    410396            break;
    411397
     
    422408                if (!rc)
    423409                {
    424                     rc = __libc_Back_ioFileControlStandard(pFH, fh, iRequest, iArg, prc);
     410                    rc = __libc_Back_ioFileControlStandard(pFH, iRequest, iArg, prc);
    425411                    if (rc)
    426412                    {
     
    432418            }
    433419            else
    434                 rc = __libc_Back_ioFileControlStandard(pFH, fh, iRequest, iArg, prc);
     420                rc = __libc_Back_ioFileControlStandard(pFH, iRequest, iArg, prc);
    435421            break;
    436422        }
     
    459445 *                      returned to the caller.
    460446 */
    461 static int TCPNAME(ops_IOControl)(PLIBCFH pFH, int fh, int iIOControl, int iArg, int *prc)
    462 {
    463     LIBCLOG_ENTER("pFH=%p:{iSocket=%d} fh=%d iIOControl=%#x iArg=%#x prc=%p\n",
    464                   (void *)pFH, ((PLIBCSOCKETFH)pFH)->iSocket, fh, iIOControl, iArg, (void *)prc);
     447static int TCPNAME(ops_IOControl)(__LIBC_PFH pFH, int iIOControl, int iArg, int *prc)
     448{
     449    LIBCLOG_ENTER("pFH=%p:{.iSocket=%d .fh=%d} iIOControl=%#x iArg=%#x prc=%p\n",
     450                  (void *)pFH, ((PLIBCSOCKETFH)pFH)->iSocket, pFH->fh, iIOControl, iArg, (void *)prc);
    465451    PLIBCSOCKETFH   pSocketFH = (PLIBCSOCKETFH)pFH;
    466452    char           *pchArg = (char *)iArg;
     
    794780 * @param   enmOperation    The fork operation.
    795781 */
    796 static int TCPNAME(ops_ForkChild)(struct __libc_FileHandle *pFH, int fh, __LIBC_PFORKHANDLE pForkHandle, __LIBC_FORKOP enmOperation)
    797 {
    798     LIBCLOG_ENTER("pFH=%p:{iSocket=%d} fh=%d\n", (void *)pFH, ((PLIBCSOCKETFH)pFH)->iSocket, fh);
     782static int TCPNAME(ops_ForkChild)(struct __libc_FileHandle *pFH, __LIBC_PFORKHANDLE pForkHandle, __LIBC_FORKOP enmOperation)
     783{
     784    LIBCLOG_ENTER("pFH=%p:{.iSocket=%d .fh=%d}\n", (void *)pFH, ((PLIBCSOCKETFH)pFH)->iSocket, pFH->fh);
    799785    PLIBCSOCKETFH   pSocketFH = (PLIBCSOCKETFH)pFH;
    800786    int rc = __libc_spmSocketRef(pSocketFH->iSocket);
     
    853839{
    854840    LIBCLOG_ENTER("iSocket=%d\n", iSocket);
    855     PLIBCFH         pFHLibc;
     841    __LIBC_PFH         pFHLibc;
    856842    int rc = __libc_FHAllocate(sizeof(LIBCSOCKETFH), &gSocketOps, iSocket, fh, fFlags, &pFHLibc);
    857843    if (!rc)
  • trunk/libc/src/kNIX/os2/timebomb.c

    r2913 r2916  
    2626
    2727
    28 #include "libc-alias.h"
    29 #include <emx/startup.h>
    30 #define INCL_BASE
    31 #define INCL_FSMACROS
    32 #include <os2emx.h>
     28#include "kNIX.h"
    3329
    3430#ifdef TIMEBOMB
  • trunk/libc/src/kNIX/os2/uflags.c

    r2732 r2916  
    11/* sys/uflags.c (emx+gcc) -- Copyright (c) 1996 by Eberhard Mattes */
    22
    3 #include "libc-alias.h"
     3#include "kNIX.h"
    44#include <sys/uflags.h>
    55#include "syscalls.h"
  • trunk/libc/src/kNIX/os2/umask.c

    r2913 r2916  
    2828*   Header Files                                                               *
    2929*******************************************************************************/
    30 #include "libc-alias.h"
    31 #include "b_fs.h"
    32 #include <386/builtin.h>
    33 #include <sys/stat.h>
     30#include "kNIX.h"
    3431#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_IO
    35 #include <InnoTekLIBC/logstrict.h>
     32#include <klibc/logstrict.h>
    3633
    3734
  • trunk/libc/src/libc/process/nanosleep.c

    r2254 r2916  
    3333#include <errno.h>
    3434#include <sys/limits.h>
    35 #include <InnoTekLIBC/backend.h>
     35#include <klibc/backend.h>
    3636#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_THREAD
    37 #include <InnoTekLIBC/logstrict.h>
     37#include <klibc/logstrict.h>
    3838
    3939
     
    6565     * Convert it all to nanosecond and call the backend.
    6666     */
    67     unsigned long long ullNanoReq;
    68     if (    sizeof(pReqTS->tv_sec) < sizeof(ullNanoReq)
    69         ||  pReqTS->tv_sec < (ULLONG_MAX / 1000000000))
    70         ullNanoReq = pReqTS->tv_sec * 1000000000ULL
     67    uint64_t u64NanoReq;
     68    if (    sizeof(pReqTS->tv_sec) < sizeof(u64NanoReq)
     69        ||  pReqTS->tv_sec < (UINT64_MAX / 1000000000))
     70        u64NanoReq = pReqTS->tv_sec * UINT64_C(1000000000)
    7171                   + pReqTS->tv_nsec;
    7272    else
    73         ullNanoReq = ~0ULL;
     73        u64NanoReq = ~0ULL;
    7474
    75     unsigned long long ullNanoRem;
    76     int rc = __libc_Back_threadSleep(ullNanoReq, pRemTS ? &ullNanoRem : NULL);
     75    uint64_t u64NanoRem;
     76    int rc = __libc_Back_threadSleep(u64NanoReq, pRemTS ? &u64NanoRem : NULL);
    7777    if (!rc)
    7878        LIBCLOG_RETURN_INT(0);
     
    8181        &&  pRemTS)
    8282    {
    83         pRemTS->tv_sec  = ullNanoRem / 1000000000;
    84         pRemTS->tv_nsec = ullNanoRem % 1000000000;
     83        pRemTS->tv_sec  = u64NanoRem / 1000000000;
     84        pRemTS->tv_nsec = u64NanoRem % 1000000000;
    8585    }
    8686    errno = -rc;
Note: See TracChangeset for help on using the changeset viewer.