Ignore:
Timestamp:
Apr 22, 2007, 10:57:48 AM (18 years ago)
Author:
bird
Message:

Applied patch from Paul (aka Creeping).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/essentials/dev-lang/perl/os2/os2ish.h

    r3187 r3188  
    2323#define HAS_WAIT
    2424#define HAS_DLERROR
     25#ifndef __KLIBC__
    2526#define HAS_WAITPID_RUNTIME (_emx_env & 0x200)
     27#else
     28#define HAS_WAITPID_RUNTIME 1
     29#endif
    2630
    2731/* HAS_PASSWD
     
    314318FILE *my_tmpfile (void);
    315319char *my_tmpnam (char *);
     320#ifndef __KLIBC__
    316321int my_mkdir (__const__ char *, long);
     322#endif
    317323int my_rmdir (__const__ char *);
    318324struct passwd *my_getpwent (void);
     
    348354#endif
    349355
     356#ifndef __KLIBC__
    350357struct group *getgrent (void);
    351358void setgrent (void);
    352359void endgrent (void);
    353 
     360#endif
    354361struct passwd *my_getpwuid (uid_t);
    355362struct passwd *my_getpwnam (__const__ char *);
     
    395402
    396403#include <stdlib.h>     /* before the following definitions */
     404#ifndef __KLIBC__
    397405#include <unistd.h>     /* before the following definitions */
     406#endif
    398407#include <fcntl.h>
    399408#include <sys/stat.h>
     
    411420#endif
    412421
     422#ifndef __KLIBC__
    413423#define PERLIO_IS_BINMODE_FD(fd) _PERLIO_IS_BINMODE_FD(fd)
     424#endif
    414425
    415426#ifdef __GNUG__
     
    422433
    423434#include <emx/io.h> /* for _fd_flags() prototype */
    424 
     435#ifndef __KLIBC__
    425436static inline bool
    426437_PERLIO_IS_BINMODE_FD(int fd)
     
    430441    return pflags && (*pflags) & O_BINARY;
    431442}
    432 
     443#endif
    433444/* ctermid is missing from emx0.9d */
    434445char *ctermid(char *s);
     
    536547#define OS2_XS_init() (*OS2_Perl_data.xs_init)(aTHX)
    537548
    538 #if _EMX_CRT_REV_ >= 60
     549#ifndef __KLIBC__
     550#if (_EMX_CRT_REV_ >= 60)
    539551# define os2_setsyserrno(rc)    (Perl_rc = rc, errno = errno_isOS2_set, \
    540552                                _setsyserrno(rc))
     
    542554# define os2_setsyserrno(rc)    (Perl_rc = rc, errno = errno_isOS2)
    543555#endif
     556#else
     557# define os2_setsyserrno(rc)    (Perl_rc = rc, errno = errno_isOS2)
     558#endif /* __KLIBC__ */
    544559
    545560/* The expressions below return true on error. */
     
    781796my_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
    782797{
     798#ifndef __KLIBC__
    783799  if (nfds == 0 && timeout && (_emx_env & 0x200)) {
     800#else
     801  if (nfds == 0 && timeout) {
     802#endif
    784803    if (async_mssleep(1000 * timeout->tv_sec + (timeout->tv_usec + 500)/1000, 500))
    785804      return 0;
     
    800819int os2_stat(const char *name, struct stat *st);
    801820int fork_with_resources();
     821#ifndef __KLIBC__
    802822int setpriority(int which, int pid, int val);
    803823int getpriority(int which /* ignored */, int pid);
     824#endif
    804825
    805826void croak_with_os2error(char *s) __attribute__((noreturn));
Note: See TracChangeset for help on using the changeset viewer.