mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-10 21:38:50 +01:00
common:w32: Don't expose unused functions.
* common/exechelp.h [HAVE_W32_SYSTEM] (get_max_fds): Don't expose. (close_all_fds, get_all_open_fds): Likewise. * common/exechelp-w32.c: Don't expose unused functions. -- GnuPG-bug-id: 7293 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
54e06273c0
commit
730593affa
@ -99,7 +99,15 @@ my_error (int errcode)
|
|||||||
return gpg_err_make (default_errsource, errcode);
|
return gpg_err_make (default_errsource, errcode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* get_max_fds, close_all_fds and get_all_open_fds are functions for
|
||||||
|
* POSIX, not Windows. After fork and before exec on POSIX, those are
|
||||||
|
* used when spawning a child process so that the child process
|
||||||
|
* doesn't keep having file descriptors not needed for it. On
|
||||||
|
* Windows, spawn API has a different semantics (than fork + exec).
|
||||||
|
*/
|
||||||
|
#undef EXPORT_UNUSED_FUNCTIONS
|
||||||
|
#ifdef EXPORT_UNUSED_FUNCTIONS
|
||||||
/* Return the maximum number of currently allowed open file
|
/* Return the maximum number of currently allowed open file
|
||||||
descriptors. Only useful on POSIX systems but returns a value on
|
descriptors. Only useful on POSIX systems but returns a value on
|
||||||
other systems too. */
|
other systems too. */
|
||||||
@ -180,7 +188,7 @@ get_all_open_fds (void)
|
|||||||
#endif /*HAVE_STAT*/
|
#endif /*HAVE_STAT*/
|
||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Helper function to build_w32_commandline. */
|
/* Helper function to build_w32_commandline. */
|
||||||
static char *
|
static char *
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#define GNUPG_COMMON_EXECHELP_H
|
#define GNUPG_COMMON_EXECHELP_H
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef HAVE_W32_SYSTEM
|
||||||
/* Return the maximum number of currently allowed file descriptors.
|
/* Return the maximum number of currently allowed file descriptors.
|
||||||
Only useful on POSIX systems. */
|
Only useful on POSIX systems. */
|
||||||
int get_max_fds (void);
|
int get_max_fds (void);
|
||||||
@ -51,6 +52,7 @@ void close_all_fds (int first, int *except);
|
|||||||
use of this function right at startup even before libgcrypt has
|
use of this function right at startup even before libgcrypt has
|
||||||
been initialized. Returns NULL on error and sets ERRNO accordingly. */
|
been initialized. Returns NULL on error and sets ERRNO accordingly. */
|
||||||
int *get_all_open_fds (void);
|
int *get_all_open_fds (void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Portable function to create a pipe. Under Windows the write end is
|
/* Portable function to create a pipe. Under Windows the write end is
|
||||||
|
Loading…
Reference in New Issue
Block a user