Changeset 3826


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

More watcom build hacking.

Location:
trunk/libc
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/libc/Config.kmk

    r3823 r3826  
    8989if defined(CFG_LIBC_USE_WATCOM)
    9090 TEMPLATE_libc_TOOL = OPENWATCOM
    91  TEMPLATE_libc_CFLAGS = $(TEMPLATE_lib_CFLAGS) -za99
     91 TEMPLATE_libc_CFLAGS = $(TEMPLATE_lib_CFLAGS) -za99 -aa
    9292 TEMPLATE_libc_CFLAGS.os2 = $(TEMPLATE_lib_CFLAGS.os2)
    9393 TEMPLATE_libc_CFLAGS.release = $(TEMPLATE_lib_CFLAGS.release)
     
    173173 TEMPLATE_bldprog_INCS = $(TOOL_OPENWATCOM_CXXINCS) $(PATH_LIBC_ROOT)
    174174 TEMPLATE_bldprog_BLD_TRG_ARCH = x86
    175  TEMPLATE_bldprog_CFLAGS = -za99
     175 TEMPLATE_bldprog_CFLAGS = -za99 -aa
    176176else
    177177 TEMPLATE_bldprog_TOOL = GCC3
  • trunk/libc/include/alloca.h

    r1693 r3826  
    1212__BEGIN_DECLS
    1313#if __GNUC__ >= 2 || defined(__INTEL_COMPILER)
    14 #undef  alloca  /* some GNU bits try to get cute and define this on their own */
    15 #define alloca(sz) __builtin_alloca(sz)
     14# undef  alloca /* some GNU bits try to get cute and define this on their own */
     15# define alloca(sz) __builtin_alloca(sz)
     16
     17#elif defined(__WATCOMC__)
     18# undef  alloca /* ditto above */
     19# ifdef _M_IX86
     20#  define alloca(a_cb) __builtin_alloca( ((a_cb) + sizeof(void *) - 1) & ~(sizeof(void *) - 1) )
     21extern void *__builtin_alloca(size_t cb);
     22#  pragma aux __builtin_alloca = "sub esp, edx" parm [eax] value [esp] modify exact nomemory [esp]
     23# else
     24#  error "Unsupported arch."
     25# endif
     26
    1627#elif defined(lint)
    1728void    *alloca(size_t);
  • trunk/libc/src/glibc/argp/argp-help.c

    r2144 r3826  
    2828
    2929/* AIX requires this to be the first thing in the file.  */
     30#ifdef __IN_KLIBC__
     31# include <alloca.h>
     32#else /* !__IN_KLIBC__ */
    3033#ifndef __GNUC__
    3134# if HAVE_ALLOCA_H || defined _LIBC
     
    4144# endif
    4245#endif
     46#endif /* !__IN_KLIBC__ */
    4347
    4448#include <stddef.h>
  • trunk/libc/src/glibc/argp/argp-parse.c

    r2144 r3826  
    6565#endif
    6666#ifndef N_
     67# if 0 /* bird: OpenWatcom doesn't like this */
    6768# define N_(msgid) (msgid)
     69# else
     70#  define N_(msgid) msgid
     71# endif
    6872#endif
    6973
  • trunk/libc/src/glibc/intl/loadmsgcat.c

    r2259 r3826  
    10021002      do
    10031003        {
     1004#ifndef __IN_KLIBC__
    10041005          long int nb = (long int) TEMP_FAILURE_RETRY (read (fd, read_ptr,
    10051006                                                             to_read));
     1007#else
     1008          long int nb;
     1009          do nb = read (fd, read_ptr, to_read); while (nb == -1 && errno == EINTR);
     1010#endif
    10061011          if (nb <= 0)
    10071012            goto out;
Note: See TracChangeset for help on using the changeset viewer.