gettext: Sync with gettext 0.23.
[gnulib.git] / lib / windows-path.h
blob161ad078a094b4609f119536e46d8c2eec3c8073
1 /* Auxiliary functions for the creation of subprocesses on Windows.
2 Copyright (C) 2024 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2024.
5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
10 This file is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
18 #ifndef _WINDOWS_PATH_H
19 #define _WINDOWS_PATH_H
21 /* This file uses _GL_ATTRIBUTE_MALLOC. */
22 #if !_GL_CONFIG_H_INCLUDED
23 #error "Please include config.h first."
24 #endif
26 #include <stdlib.h>
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
34 /* Returns an augmented "PATH=..." string for the environment of a child process.
35 dll_dirs is a NULL-terminated list of directories that contain DLLs needed to
36 execute the program, or NULL if none is needed.
37 Returns a freshly allocated string. In case of memory allocation failure,
38 NULL is returned, with errno set. */
39 extern char * extended_PATH (const char * const *dll_dirs)
40 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE;
42 /* Returns an augmented environment for a child process.
43 dll_dirs is a NULL-terminated list of directories that contain DLLs needed to
44 execute the program, or NULL if none is needed.
45 Returns a freshly allocated string array, with a freshly allocated first
46 string. In case of memory allocation failure, NULL is returned, with errno
47 set. */
48 extern char ** extended_environ (const char * const *dll_dirs)
49 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE;
52 #ifdef __cplusplus
54 #endif
56 #endif /* _WINDOWS_PATH_H */