VirtualBox

Changeset 1230 in kBuild for trunk/src/kash


Ignore:
Timestamp:
Oct 8, 2007 10:49:34 PM (17 years ago)
Author:
bird
Message:

pid.

File:
1 edited

Legend:

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

    r1229 r1230  
    2626
    2727#include <string.h>
     28#include <stdlib.h>
     29#ifndef _MSC_VER
     30# include <unistd.h>
     31# include <pwd.h>
     32extern char **environ;
     33#endif
    2834#include "shinstance.h"
    2935
     
    4551    if (psh)
    4652    {
     53        /* the special stuff. */
     54#ifdef _MSC_VER
     55        psh->pid = _getpid();
     56#else
     57        psh->pid = getpid();
     58#endif
     59
    4760        /* memalloc.c */
    4861        psh->stacknleft = MINSIZE;
     
    110123# else
    111124    struct passwd *pwd = getpwnam(user);
    112     return pwd ? pwd->pw_dir;
     125    return pwd ? pwd->pw_dir : NULL;
    113126# endif
    114127#else
     
    226239    return CLK_TCK;
    227240# else
    228     return sysconf(_SC_CLK_TCK)
     241    return sysconf(_SC_CLK_TCK);
    229242# endif
    230243#endif
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