zoslib
z/OS C/C++ Library
Loading...
Searching...
No Matches
unistd.h
Go to the documentation of this file.
1
2// Licensed Materials - Property of IBM
3// ZOSLIB
4// (C) Copyright IBM Corp. 2021. All Rights Reserved.
5// US Government Users Restricted Rights - Use, duplication
6// or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
8
9#ifndef ZOS_UNISTD_H_
10#define ZOS_UNISTD_H_
11
12#define __XPLAT 1
13#include "zos-macros.h"
14
15#if defined(__cplusplus)
16extern "C" {
17#endif
18__Z_EXPORT int __pipe_ascii(int [2]);
19__Z_EXPORT int __close(int);
20#if defined(__cplusplus)
21}
22#endif
23
24#if defined(ZOSLIB_OVERRIDE_CLIB) || defined(ZOSLIB_OVERRIDE_CLIB_UNISTD)
25
26#undef pipe
27#define pipe __pipe_replaced
28#undef close
29#define close __close_replaced
30#include_next <unistd.h>
31#undef pipe
32#undef close
33
34#if defined(__cplusplus)
35extern "C" {
36#endif
37
41__Z_EXPORT int pipe(int [2]) __asm("__pipe_ascii");
42__Z_EXPORT int close(int) __asm("__close");
43
44#if defined(__cplusplus)
45}
46#endif
47#else
48#include_next <unistd.h>
49#endif
50
51#if defined(__cplusplus)
52extern "C" {
53#endif
54
55#if (__EDC_TARGET < 0x42050000) && defined(ZOSLIB_ENABLE_V2R5_FEATURES)
56__Z_EXPORT extern int (*pipe2)(int pipefd[2], int flags);
57__Z_EXPORT extern int (*getentropy)(void *, size_t);
58#else
59#if (__EDC_TARGET < 0x42050000)
60__Z_EXPORT int getentropy(void* buffer, size_t length) __asm("__getentropy");
61#endif
62
72__Z_EXPORT int execvpe(const char *name, char *const argv[],
73 char *const envp[]);
74#endif
75
76#if defined(__cplusplus)
77}
78#endif
79
80#endif
__Z_EXPORT int execvpe(const char *name, char *const argv[], char *const envp[])
Definition zos.cc:1460
__Z_EXPORT int getentropy(void *buffer, size_t length) __asm("__getentropy")
__Z_EXPORT int __pipe_ascii(int[2])
Definition zos-io.cc:883
__Z_EXPORT int __close(int)
Definition zos-io.cc:916
#define __Z_EXPORT
Definition zos-macros.h:13