aboutsummaryrefslogtreecommitdiffstats
path: root/common/util.h
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2025-09-25 06:34:34 +0000
committerNIIBE Yutaka <[email protected]>2025-09-25 06:34:34 +0000
commita4bd829aa6755c1acd32d67d8336023e4e705675 (patch)
treea5c5fdb1f4712404faf32d103777ed90e8f0144d /common/util.h
parentFix the previous commit. (diff)
downloadgnupg-a4bd829aa6755c1acd32d67d8336023e4e705675.tar.gz
gnupg-a4bd829aa6755c1acd32d67d8336023e4e705675.zip
w32: Fix gnupg_isatty.
* common/homedir.c [HAVE_W32_SYSTEM] (gnupg_isatty): New. * common/util.h (gnupg_isatty): Make it available on Windows. -- Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'common/util.h')
-rw-r--r--common/util.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/common/util.h b/common/util.h
index 3a5f086f9..3fb205685 100644
--- a/common/util.h
+++ b/common/util.h
@@ -240,6 +240,12 @@ const char *get_keyalgo_string (enum gcry_pk_algos algo,
/*-- homedir.c --*/
+#ifdef HAVE_W32_SYSTEM
+int gnupg_isatty (int fd);
+#else
+#define gnupg_isatty(a) isatty ((a))
+#endif
+
const char *standard_homedir (void);
void gnupg_set_homedir (const char *newdir);
void gnupg_maybe_make_homedir (const char *fname, int quiet);
@@ -427,8 +433,6 @@ _gnupg_ttyname (int fd)
# define gnupg_ttyname(n) ttyname ((n))
#endif /*HAVE_TTYNAME */
-#define gnupg_isatty(a) isatty ((a))
-
/*-- Macros to replace ctype ones to avoid locale problems. --*/
#define spacep(p) (*(p) == ' ' || *(p) == '\t')