Ticket #7431: 0001-execvpe-exists-on-QNX.patch

File 0001-execvpe-exists-on-QNX.patch, 1.1 KB (added by singpolyma, 17 months ago)

This patch is a bit cleaner, but we need the definition of pPrPr_disableITimers, so can't quite share the WIN32 detection

  • cbits/execvpe.c

    From 9569965cf19eb165349e803d3fd514930c837ef0 Mon Sep 17 00:00:00 2001
    From: Stephen Paul Weber <singpolyma@singpolyma.net>
    Date: Tue, 11 Dec 2012 19:26:55 -0500
    Subject: [PATCH] execvpe exists on QNX
    
    ---
     cbits/execvpe.c   |    2 ++
     include/execvpe.h |    2 ++
     2 files changed, 4 insertions(+)
    
    diff --git a/cbits/execvpe.c b/cbits/execvpe.c
    index 1d96aa5..6ce1e9d 100644
    a b  
    1010#endif 
    1111 
    1212#if !(defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)) /* to the end */ 
     13#ifndef __QNXNTO__ 
    1314 
    1415/* Evidently non-Posix. */ 
    1516/* #include "PosixSource.h" */ 
    execvpe(char *name, char *const argv[], char **envp) 
    157158        free(buf); 
    158159    return (-1); 
    159160} 
     161#endif 
    160162 
    161163 
    162164/* Copied verbatim from ghc/lib/std/cbits/system.c. */ 
  • include/execvpe.h

    diff --git a/include/execvpe.h b/include/execvpe.h
    index 676fc72..c3b2dd3 100644
    a b  
    1919#endif 
    2020 
    2121#if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_WIN32) 
     22#ifndef __QNXNTO__ 
    2223extern int execvpe(char *name, char *const argv[], char **envp); 
     24#endif 
    2325extern void pPrPr_disableITimers (void); 
    2426#endif 
    2527