summaryrefslogtreecommitdiff
path: root/usr.bin/sudo/compat.h
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-04-03 19:15:35 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-04-03 19:15:35 +0000
commit7d1bac92416230d9ee85e1a890ead0683d0948f6 (patch)
treeefd7bd51fa1e440c0cf7c099ebc14195ff0b333a /usr.bin/sudo/compat.h
parenta8c1bd16fee3bf5fff45987e8ba0ef7a281ede93 (diff)
Sync with my sudo cvs repo:
o update to sudo 1.6.7p2 o use warn/err throughout
Diffstat (limited to 'usr.bin/sudo/compat.h')
-rw-r--r--usr.bin/sudo/compat.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/usr.bin/sudo/compat.h b/usr.bin/sudo/compat.h
index a5cf55fc593..03ee85bc95c 100644
--- a/usr.bin/sudo/compat.h
+++ b/usr.bin/sudo/compat.h
@@ -31,7 +31,7 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Sudo: compat.h,v 1.65 2003/03/15 20:31:02 millert Exp $
+ * $Sudo: compat.h,v 1.66 2003/04/02 18:25:19 millert Exp $
*/
#ifndef _SUDO_COMPAT_H
@@ -227,4 +227,17 @@ typedef struct sigaction sigaction_t;
# define RLIM_INFINITY (-1)
#endif
+/*
+ * If we lack getprogname(), emulate with __progname if possible.
+ * Otherwise, add a prototype for use with our own getprogname.c.
+ */
+#ifndef HAVE_GETPROGNAME
+# ifdef HAVE___PROGNAME
+extern const char *__progname;
+# define getprogname() (__progname)
+# else
+const char *getprogname __P((void));
+#endif /* HAVE___PROGNAME */
+#endif /* !HAVE_GETPROGNAME */
+
#endif /* _SUDO_COMPAT_H */