summaryrefslogtreecommitdiffstats
path: root/openbsd-compat/getopt.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:20:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:20:05 +0000
commitb34f5f1f4d30a04d685ea430bd75d86567a3fb37 (patch)
treee050d4f8fb0ed92cfd35ce8c87c53c17acd9d018 /openbsd-compat/getopt.h
parentAdding debian version 1:9.6p1-5. (diff)
downloadopenssh-b34f5f1f4d30a04d685ea430bd75d86567a3fb37.tar.xz
openssh-b34f5f1f4d30a04d685ea430bd75d86567a3fb37.zip
Merging upstream version 1:9.7p1.debian/1%9.7p1-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'openbsd-compat/getopt.h')
-rw-r--r--openbsd-compat/getopt.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/openbsd-compat/getopt.h b/openbsd-compat/getopt.h
index 65c8bc7..b050fa8 100644
--- a/openbsd-compat/getopt.h
+++ b/openbsd-compat/getopt.h
@@ -33,6 +33,14 @@
#ifndef _GETOPT_H_
#define _GETOPT_H_
+#ifndef __THROW
+# if defined __cplusplus
+# define __THROW throw()
+# else
+# define __THROW
+# endif
+#endif
+
/*
* GNU-like getopt_long() and 4.4BSD getsubopt()/optreset extensions
*/
@@ -63,8 +71,8 @@ int getopt_long_only(int, char * const *, const char *,
#ifndef _GETOPT_DEFINED_
#define _GETOPT_DEFINED_
-int getopt(int, char * const *, const char *);
-int getsubopt(char **, char * const *, char **);
+int getopt(int, char * const *, const char *) __THROW;
+int getsubopt(char **, char * const *, char **) __THROW;
extern char *optarg; /* getopt(3) external variables */
extern int opterr;