VirtualBox

Changeset 3480 in kBuild


Ignore:
Timestamp:
Sep 21, 2020 11:20:56 AM (4 years ago)
Author:
bird
Message:

kash: build fixes (darwin).

Location:
trunk/src/kash
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/exec.c

    r3477 r3480  
    168168 * Check if 'path' is an absolute (starts with root) path or not.
    169169 */
    170 K_INLINE isabspath(const char *path)
     170K_INLINE int isabspath(const char *path)
    171171{
    172172#if K_OS == K_OS_WINDOWS || K_OS == K_OS_OS2
     
    187187 * Checks if the filename include a path or not.
    188188 */
    189 K_INLINE haspath(const char *name)
     189K_INLINE int haspath(const char *name)
    190190{
    191191#if K_OS == K_OS_WINDOWS || K_OS == K_OS_OS2
     
    659659        int idx;
    660660        int prev;
    661         int norehashoncd = 1;
    662661        char *fullname;
    663662        int e;
     
    847846                cmdp->cmdtype = CMDNORMAL;
    848847                cmdp->param.n.index = idx;
     848#ifdef PC_EXE_EXTS
    849849                cmdp->param.n.suffix = suffix;
     850#else
     851                cmdp->param.n.suffix = 0;
     852#endif
    850853                INTON;
    851854                goto success;
  • trunk/src/kash/jobs.c

    r3438 r3480  
    756756                        }
    757757                        jp = psh->jobtab + psh->njobs;
    758                         for (i = 4 ; --i >= 0 ; psh->jobtab[psh->njobs++].used = 0);
     758                        for (i = 4 ; --i >= 0 ; psh->jobtab[psh->njobs++].used = 0) { /*empty*/ }
    759759                        INTON;
    760760                        break;
     
    887887#endif
    888888
    889 static shpid
     889STATIC shpid
    890890forkparent(shinstance *psh, struct job *jp, union node *n, int mode, shpid pid)
    891891{
     
    914914}
    915915
    916 static void
     916STATIC void
    917917forkchild(shinstance *psh, shpid pgrp, union node *n, int mode)
    918918{
  • trunk/src/kash/memalloc.c

    r3477 r3480  
    334334        /*kHlpAssert(end[-1] == '\0'); - not if it's followed by ungrabstrackstr(), sigh. */
    335335        kHlpAssert(SHELL_ALIGN((uintptr_t)pstart) == (uintptr_t)pstart);
    336         kHlpAssert(stackblocksize(psh) - psh->sstrnleft >= nbytes);
     336        kHlpAssert(stackblocksize(psh) - psh->sstrnleft >= (ssize_t)nbytes);
    337337
    338338        nbytes = SHELL_ALIGN(nbytes);
     
    589589}
    590590
    591 #endif KASH_SEPARATE_PARSER_ALLOCATOR
     591#endif /* KASH_SEPARATE_PARSER_ALLOCATOR */
    592592
    593593
  • trunk/src/kash/mkinit.sh

    r1233 r3480  
    154154done
    155155echo "#include \"shinstance.h\""
     156echo "#include \"nodes.h\""
    156157
    157158echo
  • trunk/src/kash/redir.c

    r3477 r3480  
    6868#define PIPESIZE SHFILE_PIPE_SIZE
    6969
    70 
    71 MKINIT
    7270
    7371//MKINIT struct redirtab *redirlist;
  • trunk/src/kash/shinstance.c

    r3477 r3480  
    626626#else
    627627            psh->pid = getpid();
    628             psh->pgid = getpgid();
     628            psh->pgid = getpgid(0);
    629629#endif
    630630
     
    22412241    if (pid == 0 || psh->pid == pid)
    22422242    {
    2243         shpid pgid = psh->pgid;
     2243        pgid = psh->pgid;
    22442244#ifndef _MSC_VER
    22452245        kHlpAssert(pgid == getpgrp());
  • trunk/src/kash/shinstance.h

    r3468 r3480  
    7979    struct shsubshellstatus *next;      /**< Next free one on the free chain. */
    8080} shsubshellstatus;
     81#else
     82struct shsubshellstatus;
    8183#endif
    8284
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