Changeset 3823 for trunk


Ignore:
Timestamp:
Feb 27, 2014, 1:35:25 AM (11 years ago)
Author:
bird
Message:

More openwatcom porting.

Location:
trunk/libc
Files:
31 edited

Legend:

Unmodified
Added
Removed
  • trunk/libc/Config.kmk

    r3820 r3823  
    5555DEFS.nt    = __NT__
    5656
     57if defined(CFG_LIBC_USE_WATCOM) || defined(CFG_KNIX_USE_WATCOM)
     58 CFG_LIBC_USE_WATCOM = 1
     59 KLIBC_FORCE_INC_OPT = -fi=$(call TOOL_OPENWATCOM_FIX_SLASHES,$1)
     60else
     61 KLIBC_FORCE_INC_OPT = -include $1
     62endif
    5763
    5864#
     
    8086TEMPLATE_libc_INCS = $(PATH_LIBC_INC) $(dir $(LIBC-STD.H))
    8187TEMPLATE_libc_INCS.nt = $(PATH_LIBC_SRC)/w32api/include
    82 if defined(CFG_LIBC_USE_WATCOM) || defined(CFG_KNIX_USE_WATCOM)
     88TEMPLATE_libc_LIBSUFF = .a
     89if defined(CFG_LIBC_USE_WATCOM)
    8390 TEMPLATE_libc_TOOL = OPENWATCOM
    84  TEMPLATE_libc_CFLAGS = $(TEMPLATE_lib_CFLAGS)
     91 TEMPLATE_libc_CFLAGS = $(TEMPLATE_lib_CFLAGS) -za99
    8592 TEMPLATE_libc_CFLAGS.os2 = $(TEMPLATE_lib_CFLAGS.os2)
    8693 TEMPLATE_libc_CFLAGS.release = $(TEMPLATE_lib_CFLAGS.release)
     
    118125
    119126TEMPLATE_libcasm = .
    120 if defined(CFG_LIBC_USE_WATCOM) || defined(CFG_KNIX_USE_WATCOM)
     127TEMPLATE_libcasm_LIBSUFF = .a
     128if defined(CFG_LIBC_USE_WATCOM)
    121129 TEMPLATE_libcasm_TOOL = OPENWATCOM
    122130else
     
    160168TEMPLATE_bldprog = Build programs
    161169TEMPLATE_bldprog_DEFS = __LIBC_BUILD_PROGRAM__
    162 if defined(CFG_LIBC_USE_WATCOM) || defined(CFG_KNIX_USE_WATCOM)
     170TEMPLATE_bldprog_LIBSUFF = .a
     171if defined(CFG_LIBC_USE_WATCOM)
    163172 TEMPLATE_bldprog_TOOL = OPENWATCOM
    164173 TEMPLATE_bldprog_INCS = $(TOOL_OPENWATCOM_CXXINCS) $(PATH_LIBC_ROOT)
  • trunk/libc/include/os2emx.h

    r2672 r3823  
    1334813348
    1334913349#ifndef FS_DISABLED
    13350 #define FS_VAR()        volatile unsigned __fs__;
    13351 #define FS_SAVE()       __asm__ __volatile__ ("movl %%fs, %%eax; movl %%eax,%0;" : : "m" (__fs__) : "%eax" )
    13352 #define FS_SAVE_LOAD()  __asm__ __volatile__ ("movl %%fs, %%eax; movl %%eax,%0; movl $DosTIB, %%eax; movl %%eax, %%fs" : : "m" (__fs__) : "%eax" )
    13353 #define FS_VAR_SAVE_LOAD() FS_VAR(); FS_SAVE_LOAD()
    13354 #define FS_RESTORE()    __asm__ __volatile__ ("movl %0, %%eax; movl %%eax,%%fs;" : : "m" (__fs__) : "%eax" )
     13350# ifdef __GNUC__
     13351#  define FS_VAR()           volatile unsigned __fs__;
     13352#  define FS_VAR_SAVE_LOAD() FS_VAR(); FS_SAVE_LOAD()
     13353#  define FS_SAVE()       __asm__ __volatile__ ("movl %%fs, %%eax; movl %%eax,%0;" : : "m" (__fs__) : "%eax" )
     13354#  define FS_SAVE_LOAD()  __asm__ __volatile__ ("movl %%fs, %%eax; movl %%eax,%0; movl $DosTIB, %%eax; movl %%eax, %%fs" : : "m" (__fs__) : "%eax" )
     13355#  define FS_RESTORE()    __asm__ __volatile__ ("movl %0, %%eax; movl %%eax,%%fs;" : : "m" (__fs__) : "%eax" )
     13356
     13357# elif defined(__WATCOMC__)
     13358unsigned short FS_INTERNAL_SAVE(void);
     13359#  pragma aux  FS_INTERNAL_SAVE = "mov ax, fs" value [ax]
     13360unsigned short FS_INTERNAL_RESTORE(unsigned);
     13361#  pragma aux  FS_INTERNAL_RESTORE = "mov fs, ax" parm [ax]
     13362#  define FS_VAR()           volatile short __fs__;
     13363#  define FS_VAR_SAVE_LOAD() volatile short __fs__ = FS_INTERNAL_SAVE();
     13364#  define FS_SAVE()          do { __fs__ = FS_INTERNAL_SAVE(); } while (0)
     13365extern void DosTIB(void);
     13366#  define FS_SAVE_LOAD()     do { __fs__ = FS_INTERNAL_SAVE(); FS_INTERNAL_RESTORE((uintptr_t)&DosTIB) } while (0)
     13367#  define FS_RESTORE()       FS_INTERNAL_RESTORE(__fs__)
     13368
     13369# else
     13370#  error "Unsupported compiler"
     13371# endif
    1335513372#else
    13356 #define FS_VAR()
    13357 #define FS_SAVE()       do { } while(0)
    13358 #define FS_SAVE_LOAD() do { } while(0)
    13359 #define FS_RESTORE()    do { } while(0)
     13373# define FS_VAR()
     13374# define FS_SAVE()      do { } while(0)
     13375# define FS_SAVE_LOAD() do { } while(0)
     13376# define FS_RESTORE()   do { } while(0)
    1336013377#endif
    1336113378
     
    1336513382
    1336613383#ifndef FSCW_DISABLED
    13367 #define FSCW_VAR()        volatile unsigned __fpcw__;
    13368 #define FSCW_SAVE()       __asm__ __volatile__ ("fnstcw %0;" : : "m" (__fpcw__) )
    13369 #define FSCW_RESTORE()    __asm__ __volatile__ ("fldcw  %0;" : : "m" (__fpcw__) )
     13384# ifdef __GNUC__
     13385#  define FSCW_VAR()        volatile unsigned __fpcw__;
     13386#  define FSCW_SAVE()       __asm__ __volatile__ ("fnstcw %0;" : : "m" (__fpcw__) )
     13387#  define FSCW_RESTORE()    __asm__ __volatile__ ("fldcw  %0;" : : "m" (__fpcw__) )
     13388
     13389# elif defined(__WATCOMC__)
     13390void FSCW_INTERNAL_SAVE(unsigned *);
     13391#  pragma aux  FSCW_INTERNAL_SAVE = "fnstcw [edx]" parm [edx]
     13392void FSCW_INTERNAL_RESTORE(unsigned *);
     13393#  pragma aux  FS_INTERNAL_RESTORE = "fldcw [edx]" parm [edx]
     13394#  define FSCW_VAR()        volatile unsigned __fpcw__;
     13395#  define FSCW_SAVE()       FSCW_INTERNAL_SAVE(&__fpcw__)
     13396#  define FSCW_RESTORE()    FSCW_INTERNAL_RESTORE(&__fpcw__)
     13397
    1337013398#else
    13371 #define FSCW_VAR()
    13372 #define FSCW_SAVE()       do { } while(0)
    13373 #define FSCW_RESTORE()    do { } while(0)
     13399# define FSCW_VAR()
     13400# define FSCW_SAVE()       do { } while(0)
     13401# define FSCW_RESTORE()    do { } while(0)
    1337413402#endif
    1337513403
  • trunk/libc/include/sys/cdefs.h

    r3821 r3823  
    132132#else
    133133# define __KLIBC_WATCOM_PREREQ(ma, mi)  0
     134#endif
     135
     136#ifdef __WATCOMC__
     137# define __KLIBC_WATCOM_C99_PREREQ(ma, mi) (__KLIBC_WATCOM_PREREQ(ma, mi) && __STDC_VERSION__ >= 199901L)
     138#else
     139# define __KLIBC_WATCOM_C99_PREREQ(ma, mi)  0
    134140#endif
    135141
  • trunk/libc/include/sys/gnu/cdefs.h

    r2187 r3823  
    300300
    301301/* __restrict is known in EGCS 1.2 and above. */
    302 #if !__GNUC_PREREQ (2,92)
     302#if !__GNUC_PREREQ (2,92) && !__KLIBC_WATCOM_C99_PREREQ (12,3) /* bird added the latter */
    303303# define __restrict     /* Ignore */
    304304#endif
  • trunk/libc/src/fbsdlibc/db/btree/bt_close.c

    r979 r3823  
    7171        BTREE *t;
    7272        int fd;
    73 #ifdef __EMX__
     73#ifdef __IN_KLIBC__
    7474        char *tempname;
    7575        int r;
    76 #endif /* __EMX__ */
     76#endif
    7777
    7878        t = dbp->internal;
     
    110110
    111111        fd = t->bt_fd;
    112 #ifdef __EMX__
     112#ifdef __IN_KLIBC__
    113113        tempname = t->tempname;
    114114        free(t);
     
    122122        }
    123123        return r;
    124 #else /* not __EMX__ */
     124#else  /* not __IN_KLIBC__ */
    125125        free(t);
    126126        free(dbp);
    127127        return (_close(fd) ? RET_ERROR : RET_SUCCESS);
    128 #endif
     128#endif /* not __IN_KLIBC__ */
    129129}
    130130
  • trunk/libc/src/fbsdlibc/db/btree/bt_debug.c

    r1694 r3823  
    5151#include "btree.h"
    5252
    53 #if defined(DEBUG) || defined __EMX__
     53#if defined(DEBUG) || defined(__IN_KLIBC__)
    5454/*
    5555 * BT_DUMP -- Dump the tree
     
    244244        }
    245245}
    246 #endif
     246#endif /* DEBUG || __IN_KLIBC__ */
    247247
    248248#ifdef STATISTICS
  • trunk/libc/src/fbsdlibc/db/btree/bt_open.c

    r2229 r3823  
    6161#include <string.h>
    6262#include <unistd.h>
    63 #ifdef __EMX__
     63#ifdef __IN_KLIBC__
    6464#include <io.h>
    6565#endif
     
    7676static int byteorder(void);
    7777static int nroot(BTREE *);
    78 #ifndef __EMX__
     78#ifndef __IN_KLIBC__
    7979static int tmp(void);
    8080#endif
     
    211211                }
    212212               
    213 #ifdef __EMX__
     213#ifdef __IN_KLIBC__
    214214                if ((t->bt_fd = _open(fname, flags | O_BINARY, mode)) < 0)
    215215#else
     
    221221                if ((flags & O_ACCMODE) != O_RDWR)
    222222                        goto einval;
    223 #ifdef __EMX__
     223#ifdef __IN_KLIBC__
    224224                {
    225225                char namestr[] = "btXXXXXX";
     
    231231                        t->tempname = strdup (absname);
    232232                }
    233 #else /* not __EMX__ */
     233#else /* not __IN_KLIBC__ */
    234234                if ((t->bt_fd = tmp()) == -1)
    235235                        goto err;
    236 #endif /* not __EMX__ */
     236#endif /* not __IN_KLIBC__ */
    237237                F_SET(t, B_INMEM);
    238238        }
     
    361361                if (t->bt_fd != -1)
    362362                        (void)_close(t->bt_fd);
    363 #ifdef __EMX__
     363#ifdef __IN_KLIBC__
    364364                if (t->tempname != NULL) {
    365365                        (void)unlink(t->tempname);
    366366                        free(t->tempname);
    367367                }
    368 #endif /* __EMX__ */
     368#endif
    369369                free(t);
    370370        }
     
    415415}
    416416
    417 #ifndef __EMX__ /* bird */
     417#ifndef __IN_KLIBC__ /* bird */
    418418static int
    419419tmp()
     
    436436        return(fd);
    437437}
    438 #endif /*!EMX*/
     438#endif /* !__IN_KLIBC__ */
    439439
    440440static int
  • trunk/libc/src/fbsdlibc/db/btree/btree.h

    r979 r3823  
    380380#define B_DB_TXN        0x10000         /* DB_TXN specified. */
    381381        u_int32_t flags;
    382 #ifdef __EMX__
     382#ifdef __IN_KLIBC__
    383383        char *tempname;                 /* Name of temporary file */
    384 #endif /* __EMX__ */
     384#endif
    385385} BTREE;
    386386
  • trunk/libc/src/fbsdlibc/db/btree/extern.h

    r2259 r3823  
    6262int      __ovfl_put(BTREE *, const DBT *, pgno_t *);
    6363
    64 #if defined(DEBUG) || defined(__EMX__)
     64#if defined(DEBUG) || defined(__IN_KLIBC__)
    6565void     __bt_dmpage(PAGE *);
    6666void     __bt_dnpage(DB *, pgno_t);
  • trunk/libc/src/fbsdlibc/db/hash/hash.c

    r3381 r3823  
    133133        }
    134134        if (file) {
    135 #ifdef __EMX__
     135#ifdef __IN_KLIBC__
    136136                if ((hashp->fp = _open(file, flags | O_BINARY, mode)) == -1)
    137137#else
     
    448448        if (hashp->fp != -1)
    449449                (void)_close(hashp->fp);
    450 #ifdef __EMX__
     450#ifdef __IN_KLIBC__
    451451        if (hashp->tempname != NULL) {
    452452                (void)unlink (hashp->tempname);
    453453                free (hashp->tempname);
    454                 }
    455 #endif /* __EMX__ */
     454        }
     455#endif
    456456
    457457        free(hashp);
  • trunk/libc/src/fbsdlibc/db/hash/hash.h

    r979 r3823  
    119119        BUFHEAD         bufhead;        /* Header of buffer lru list */
    120120        SEGMENT         *dir;           /* Hash Bucket directory */
    121 #ifdef __EMX__
     121#ifdef __IN_KLIBC__
    122122        char            *tempname;      /* Name of temporary file */
    123 #endif /* __EMX__ */
     123#endif
    124124} HTAB;
    125125
  • trunk/libc/src/fbsdlibc/db/hash/hash_page.c

    r2229 r3823  
    7070#include <assert.h>
    7171#endif
    72 #ifdef __EMX__
     72#ifdef __IN_KLIBC__
    7373#include <io.h>
    7474#endif
     
    871871{
    872872        sigset_t set, oset;
    873 #ifdef __EMX__
     873#ifdef __IN_KLIBC__
    874874        char namestr[] = "hsXXXXXX";
    875 #else /* not __EMX__ */
     875#else
    876876        static char namestr[] = "_hashXXXXXX";
    877 #endif /* not __EMX__ */
     877#endif
    878878
    879879        /* Block signals; make sure file goes away at process exit. */
     
    881881        (void)_sigprocmask(SIG_BLOCK, &set, &oset);
    882882        if ((hashp->fp = mkstemp(namestr)) != -1) {
    883 #ifdef __EMX__
     883#ifdef __IN_KLIBC__
    884884                char absname[_MAX_PATH];
    885885                setmode (hashp->fp, O_BINARY);
    886886                if (_abspath (absname, namestr, sizeof (absname)) == 0)
    887887                        hashp->tempname = strdup (absname);
    888 #else /* not __EMX__ */
     888#else
    889889                (void)unlink(namestr);
    890 #endif /* not __EMX__ */
     890#endif
    891891                (void)_fcntl(hashp->fp, F_SETFD, 1);
    892892        }
  • trunk/libc/src/fbsdlibc/db/recno/rec_open.c

    r1959 r3823  
    7171
    7272        /* Open the user's file -- if this fails, we're done. */
    73 #ifdef __EMX__
     73#ifdef __IN_KLIBC__
    7474        if (fname != NULL && (rfd = _open(fname, flags | O_BINARY, mode)) < 0)
    7575#else
  • trunk/libc/src/fbsdlibc/gen/ftw.c

    r2172 r3823  
    4242    int nfds)
    4343{
    44         char * const paths[2] = { (char *)path, NULL };
    4544        FTSENT *cur;
    4645        FTS *ftsp;
    4746        int error = 0, fnflag, sverrno;
     47        char *paths[2]; /* bird: watcom says "E1054: Expression must be constant" to the original initializer. */
     48        paths[0] = (char *)path;
     49        paths[1] = NULL;
    4850
    4951        /* XXX - nfds is currently unused */
  • trunk/libc/src/fbsdlibc/gen/getgrent.c

    r2741 r3823  
    417417        if (rv != 0)
    418418                return (NS_UNAVAIL);
    419         switch ((enum constants)mdata) {
     419        switch ((enum constants)(uintptr_t)mdata) {
    420420        case SETGRENT:
    421421                stayopen = va_arg(ap, int);
     
    452452        name = NULL;
    453453        gid = (gid_t)-1;
    454         how = (enum nss_lookup_type)mdata;
     454        how = (enum nss_lookup_type)(uintptr_t)mdata;
    455455        switch (how) {
    456456        case nss_lt_name:
  • trunk/libc/src/fbsdlibc/gen/getnetgrent.c

    r2741 r3823  
    4747#include <string.h>
    4848#include <unistd.h>
    49 #ifdef __EMX__
     49#ifdef __IN_KLIBC__
    5050#include <netdb.h>
    5151#endif
  • trunk/libc/src/fbsdlibc/gen/getprogname.c

    r2741 r3823  
    88#include "libc_private.h"
    99
    10 #ifdef __EMX__
     10#ifdef __OS2__
    1111# define INCL_BASE
    1212# define INCL_FSMACROS
     
    3434    if (!__progname)
    3535    {
    36 #ifdef __EMX__
     36#ifdef __OS2__
    3737        char *psz, *psz2;
    3838        PTIB ptib;
  • trunk/libc/src/fbsdlibc/gen/glob.c

    r2741 r3823  
    113113#define COMMA           ','
    114114
    115 #ifndef BSD_DEBUG /* bird prefixed with BSD */
     115#if !defined(BSD_DEBUG) && !defined(__WATCOMC__) /* bird prefixed with BSD; watcom cannot switch 64-bit. */
    116116
    117117#define M_QUOTE         0x8000000000ULL
  • trunk/libc/src/fbsdlibc/gen/nftw.c

    r2172 r3823  
    4242     struct FTW *), int nfds, int ftwflags)
    4343{
    44         char * const paths[2] = { (char *)path, NULL };
    4544        struct FTW ftw;
    4645        FTSENT *cur;
    4746        FTS *ftsp;
    4847        int error = 0, ftsflags, fnflag, postorder, sverrno;
     48#if 0 /* bird watcom says: Error! E1054: Expression must be constant */
     49        char * const paths[2] = { (char *)path, NULL };
     50#else
     51        char *paths[2];
     52        paths[0] = (char *)path;
     53        paths[1] = NULL;
     54#endif
    4955
    5056        /* XXX - nfds is currently unused */
  • trunk/libc/src/fbsdlibc/gen/setprogname.c

    r2741 r3823  
    1212{
    1313    const char *p;
    14 #if defined(__EMX__) || defined(__NT__)
     14#if defined(__OS2__) || defined(__NT__) || defined(_WIN32)
    1515    p = strlen(progname) + progname;
    1616    while (p >= progname)
  • trunk/libc/src/fbsdlibc/i386/Makefile.kmk

    r2704 r3823  
    3636        $(PATH_LIBC_SRC)/fbsdlibc/include
    3737libc_fbsdlibc_i386_SOURCES = \
    38         $(PATH_LIBC_SRC)/fbsdlibc/i386/gen/fabs.S \
    3938        $(PATH_LIBC_SRC)/fbsdlibc/i386/gen/flt_rounds.c \
    40         $(PATH_LIBC_SRC)/fbsdlibc/i386/gen/infinity.c \
    41         $(PATH_LIBC_SRC)/fbsdlibc/i386/gen/ldexp.c \
    42         $(PATH_LIBC_SRC)/fbsdlibc/i386/gen/modf.S \
     39        $(PATH_LIBC_SRC)/fbsdlibc/i386/gen/infinity.c
     40
     41ifndef CFG_LIBC_USE_WATCOM ## @todo port me.
     42 libc_fbsdlibc_i386_SOURCES += \
     43        $(PATH_LIBC_SRC)/fbsdlibc/i386/gen/fabs.S \
     44        $(PATH_LIBC_SRC)/fbsdlibc/i386/gen/modf.S \
     45        $(PATH_LIBC_SRC)/fbsdlibc/i386/gen/ldexp.c
     46endif
    4347
    4448
  • trunk/libc/src/fbsdlibc/i386/gen/flt_rounds.c

    r2013 r3823  
    2020__flt_rounds(void)
    2121{
     22#ifdef __GNUC__
    2223        int x;
    23 
    2424        __asm("fnstcw %0" : "=m" (x));
     25#elif defined(__WATCOMC__)
     26        extern __flt_rounds_get_fpu_status_word(short *);
     27# pragma aux __flt_rounds_get_fpu_status_word = "fnstcw [eax]" parm [eax]
     28        short x;
     29        __flt_rounds_get_fpu_status_word(&x);
     30#else
     31# error "Port me"
     32#endif
    2533        return (map[(x >> 10) & 0x03]);
    2634}
  • trunk/libc/src/fbsdlibc/net/Makefile.kmk

    r2704 r3823  
    4040        $(PATH_LIBC_SRC)/fbsdlibc/net/nsparser.c \
    4141
    42 $(PATH_LIBC_SRC)/fbsdlibc/net/nslexer.c_CFLAGS = -include $(PATH_LIBC_SRC)/fbsdlibc/include/namespace.h
     42$(PATH_LIBC_SRC)/fbsdlibc/net/nslexer.c_CFLAGS = $(call KLIBC_FORCE_INC_OPT,$(PATH_LIBC_SRC)/fbsdlibc/include/namespace.h)
    4343
    4444# configure the variants. */
  • trunk/libc/src/fbsdlibc/net/nsdispatch.c

    r1697 r3823  
    8080#define _NS_PRIVATE
    8181#include <nsswitch.h>
    82 #ifndef __EMX__
     82#ifndef __IN_KLIBC__
    8383#include <pthread.h>
    8484#else  /* bird: temporary hack. */
     
    138138static  void                    *nss_builtin_handle = &__nss_builtin_handle;
    139139
    140 #ifdef __EMX__
     140#ifdef __IN_KLIBC__
    141141# define syslog(level, format, ...) do { } while (0)
    142142#endif
     
    475475                goto fin;
    476476        else {
    477 #ifndef __EMX__
     477#if !defined(__OS2__) && !defined(__NT__) && !defined(_WIN32)
    478478                if (snprintf(buf, sizeof(buf), "nss_%s.so.%d", mod.name,
    479479                    NSS_MODULE_INTERFACE_VERSION) >= (int)sizeof(buf))
  • trunk/libc/src/fbsdlibc/net/nslexer.c

    r1505 r3823  
    797797
    798798                        if ((p = strdup(yytext)) == NULL) {
    799 #ifndef __EMX__
     799#ifndef __IN_KLIBC__
    800800                                syslog(LOG_ERR,
    801801                               "NSSWITCH(nslexer): memory allocation failure");
     
    17181718        const char *msg;
    17191719{
    1720 #ifndef __EMX__
     1720#ifndef __IN_KLIBC__
    17211721         syslog(LOG_ERR, "NSSWITCH(nslexer): %s line %d: %s at '%s'",
    17221722             _PATH_NS_CONF, yylineno, msg, yytext);
  • trunk/libc/src/fbsdlibc/net/nslexer.l

    r1505 r3823  
    8787
    8888                        if ((p = strdup(yytext)) == NULL) {
    89 #ifndef __EMX__
     89#ifndef __IN_KLIBC__
    9090                                syslog(LOG_ERR,
    9191                               "NSSWITCH(nslexer): memory allocation failure");
     
    116116        const char *msg;
    117117{
    118 #ifndef __EMX__
     118#ifndef __IN_KLIBC__
    119119         syslog(LOG_ERR, "NSSWITCH(nslexer): %s line %d: %s at '%s'",
    120120             _PATH_NS_CONF, yylineno, msg, yytext);
  • trunk/libc/src/fbsdlibc/net/nsparser.c

    r1505 r3823  
    12671267                if ((strcasecmp(elem, NSSRC_COMPAT) == 0) ||
    12681268                    (strcasecmp(curdbt.srclist[0].name, NSSRC_COMPAT) == 0)) {
    1269 #ifndef __EMX__
     1269#ifndef __IN_KLIBC__
    12701270                        syslog(LOG_ERR,
    12711271            "NSSWITCH(nsparser): %s line %d: 'compat' used with other sources",
     
    12771277        for (i = 0; i < curdbt.srclistsize; i++) {
    12781278                if (strcasecmp(curdbt.srclist[i].name, elem) == 0) {
    1279 #ifndef __EMX__
     1279#ifndef __IN_KLIBC__
    12801280                        syslog(LOG_ERR,
    12811281                       "NSSWITCH(nsparser): %s line %d: duplicate source '%s'",
  • trunk/libc/src/fbsdlibc/net/nsparser.y

    r1505 r3823  
    160160                if ((strcasecmp(elem, NSSRC_COMPAT) == 0) ||
    161161                    (strcasecmp(curdbt.srclist[0].name, NSSRC_COMPAT) == 0)) {
    162 #ifndef __EMX__
     162#ifndef __IN_KLIBC__
    163163                        syslog(LOG_ERR,
    164164            "NSSWITCH(nsparser): %s line %d: 'compat' used with other sources",
     
    170170        for (i = 0; i < curdbt.srclistsize; i++) {
    171171                if (strcasecmp(curdbt.srclist[i].name, elem) == 0) {
    172 #ifndef __EMX__
     172#ifndef __IN_KLIBC__
    173173                        syslog(LOG_ERR,
    174174                       "NSSWITCH(nsparser): %s line %d: duplicate source '%s'",
  • trunk/libc/src/fbsdlibc/nls/msgcat.c

    r1307 r3823  
    5555
    5656#include "msgcat.h"
    57 #ifndef __EMX__
     57#ifndef __IN_KLIBC__
    5858#include "../locale/setlocale.h"        /* for ENCODING_LEN */
    5959#else
     
    6161#endif
    6262
    63 #ifndef __EMX__
     63#ifndef __IN_KLIBC__
    6464#define _DEFAULT_NLS_PATH "/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L:/usr/local/share/nls/%L/%N.cat:/usr/local/share/nls/%N/%L"
    6565#else /* bird: we use a different separator character. */
     
    7373#define NLRETERR(errc)  { errno = errc; return (NLERR); }
    7474
    75 #ifndef __EMX__
     75#ifndef __IN_KLIBC__
    7676static nl_catd  loadCat();
    7777static int      loadSet();
     
    126126        }
    127127
    128 #ifndef __EMX__
     128#ifndef __IN_KLIBC__
    129129        if ((nlspath = getenv("NLSPATH")) == NULL || issetugid())
    130130#else
     
    140140        }
    141141
    142 #ifndef __EMX__
     142#ifndef __IN_KLIBC__
    143143        while ((nlspath = strsep(&cptr, ":")) != NULL) {
    144144#else
     
    388388        cat->loadType = MCLoadBySet;
    389389
    390 #ifndef __EMX__
     390#ifndef __IN_KLIBC__
    391391        if ((cat->fp = fopen(catpath, "r")) == NULL) {
    392392#else
  • trunk/libc/src/fbsdlibc/stdio/mktemp.c

    r2029 r3823  
    9191}
    9292
    93 #ifndef __EMX__
     93#ifndef __IN_KLIBC__
    9494__warn_references(mktemp,
    9595    "warning: mktemp() possibly used unsafely; consider using mkstemp()");
  • trunk/libc/src/fbsdlibc/string/strtok.c

    r1694 r3823  
    4949#endif
    5050#include <string.h>
    51 #ifdef __EMX__
     51#ifdef __IN_KLIBC__
    5252#include <InnoTekLIBC/thread.h>
    5353#endif
     
    5959
    6060char *
    61 #ifdef __EMX__
     61#ifdef __IN_KLIBC__
    6262_STD(strtok_r)
    6363#else
     
    110110
    111111char *
    112 #ifdef __EMX__
     112#ifdef __IN_KLIBC__
    113113_STD(strtok)
    114114#else
     
    117117(char *s, const char *delim)
    118118{
    119 #ifdef __EMX__
     119#ifdef __IN_KLIBC__
    120120        __LIBC_PTHREAD  pThrd = __libc_threadCurrent();
    121121        #define last pThrd->pszStrTokPos
Note: See TracChangeset for help on using the changeset viewer.