VirtualBox

Changeset 2292 in kBuild


Ignore:
Timestamp:
Feb 28, 2009 4:46:25 AM (16 years ago)
Author:
bird
Message:

kash: forking on widnows.

Location:
trunk/src/kash
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/Makefile.kmk

    r2291 r2292  
    3232PROGRAMS += kash
    3333kash_TEMPLATE = BIN
     34kash_ASTOOL = YASM
    3435kash_DEFS = lint SHELL SMALL
    3536kash_DEFS += SH_STUB_MODE # for the time being.
     
    5051        HAVE_SYS_SIGNAME HAVE_SYSCTL_H HAVE_SETPROGNAME
    5152kash_INCS = $(PATH_kash) . # (the last is because of error.h)
     53kash_ASFLAGS.win = -g cv8
     54kash_ASFLAGS.win.x86   = -f win32
     55kash_ASFLAGS.win.amd64 = -f win64
    5256if "$(USER)" == "bird" && "$(KBUILD_TARGET)" != "win"
    5357kash_CFLAGS += -std=gnu99
     
    96100kash_SOURCES.win = \
    97101        sys_signame.c \
    98         strlcpy.c
     102        strlcpy.c \
     103        shfork-win.c \
     104        shforkA-win.asm
    99105kash_SOURCES.solaris = \
    100106        sys_signame.c \
  • trunk/src/kash/main.c

    r2286 r2292  
    101101
    102102int
     103#if K_OS == K_OS_WINDOWS
     104real_main(int argc, char **argv, char **envp)
     105#else
    103106main(int argc, char **argv, char **envp)
     107#endif
    104108{
    105109        shinstance *psh;
  • trunk/src/kash/shheap.c

    r2291 r2292  
    2929*   Header Files                                                               *
    3030*******************************************************************************/
     31#include "shheap.h"
    3132#include <string.h>
    3233#include <stdlib.h>
  • trunk/src/kash/shheap.h

    r2291 r2292  
    11/* $Id$ */
    22/** @file
    3  * The shell heap methods.
     3 * The shell memory heap methods.
    44 */
    55
     
    3232
    3333/* heap */
     34int shheap_init(void);
    3435void *sh_malloc(shinstance *, size_t);
    3536void *sh_calloc(shinstance *, size_t, size_t);
  • trunk/src/kash/shinstance.c

    r2291 r2292  
    3939#endif
    4040#include "shinstance.h"
     41
     42#if K_OS == K_OS_WINDOWS
     43extern pid_t shfork_do_it(void); /* shforkA-win.asm */
     44#endif
    4145
    4246
     
    872876    pid = -1;
    873877
    874 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
    875 # ifdef _MSC_VER
    876 #  ifdef SH_FORKED_MODE
    877     /** @todo */
    878     *(char *)1 = 0x1;
    879 #  else
     878#elif K_OS == K_OS_WINDOWS //&& defined(SH_FORKED_MODE)
     879    pid = shfork_do_it();
     880
     881#elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
     882# ifdef _MSC_VER
    880883    pid = -1;
    881884    errno = ENOSYS;
    882 #  endif
    883885# else
    884886    pid = fork();
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette