posix_spawn: Expose file_actions_add[f]chdir.
The non-"_np" versions were exported, but not declared in the header. Do that, and also make the "_np" versions the alias, as these are specified in POSIX-2024.
This commit is contained in:
@@ -55,6 +55,10 @@ extern int posix_spawn_file_actions_addclose(
|
|||||||
posix_spawn_file_actions_t *file_actions, int fildes);
|
posix_spawn_file_actions_t *file_actions, int fildes);
|
||||||
extern int posix_spawn_file_actions_adddup2(
|
extern int posix_spawn_file_actions_adddup2(
|
||||||
posix_spawn_file_actions_t *file_actions, int fildes, int newfildes);
|
posix_spawn_file_actions_t *file_actions, int fildes, int newfildes);
|
||||||
|
extern int posix_spawn_file_actions_addchdir(
|
||||||
|
posix_spawn_file_actions_t *file_actions, const char *path);
|
||||||
|
extern int posix_spawn_file_actions_addfchdir(
|
||||||
|
posix_spawn_file_actions_t *file_actions, int fildes);
|
||||||
|
|
||||||
/* spawn attribute functions */
|
/* spawn attribute functions */
|
||||||
extern int posix_spawnattr_destroy(posix_spawnattr_t *attr);
|
extern int posix_spawnattr_destroy(posix_spawnattr_t *attr);
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *_actions,
|
|||||||
|
|
||||||
|
|
||||||
extern "C" int
|
extern "C" int
|
||||||
posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t *_actions,
|
posix_spawn_file_actions_addchdir(posix_spawn_file_actions_t *_actions,
|
||||||
const char *path)
|
const char *path)
|
||||||
{
|
{
|
||||||
struct _posix_spawn_file_actions* actions = _actions != NULL ? *_actions : NULL;
|
struct _posix_spawn_file_actions* actions = _actions != NULL ? *_actions : NULL;
|
||||||
@@ -222,7 +222,7 @@ posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t *_actions,
|
|||||||
|
|
||||||
|
|
||||||
extern "C" int
|
extern "C" int
|
||||||
posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *_actions,
|
posix_spawn_file_actions_addfchdir(posix_spawn_file_actions_t *_actions,
|
||||||
int fildes)
|
int fildes)
|
||||||
{
|
{
|
||||||
struct _posix_spawn_file_actions* actions = _actions != NULL ? *_actions : NULL;
|
struct _posix_spawn_file_actions* actions = _actions != NULL ? *_actions : NULL;
|
||||||
@@ -623,5 +623,5 @@ posix_spawnp(pid_t *pid, const char *file,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
B_DEFINE_WEAK_ALIAS(posix_spawn_file_actions_addchdir_np, posix_spawn_file_actions_addchdir);
|
B_DEFINE_WEAK_ALIAS(posix_spawn_file_actions_addchdir, posix_spawn_file_actions_addchdir_np);
|
||||||
B_DEFINE_WEAK_ALIAS(posix_spawn_file_actions_addfchdir_np, posix_spawn_file_actions_addfchdir);
|
B_DEFINE_WEAK_ALIAS(posix_spawn_file_actions_addfchdir, posix_spawn_file_actions_addfchdir_np);
|
||||||
|
|||||||
Reference in New Issue
Block a user