]> git.saurik.com Git - apple/libc.git/blobdiff - include/util.h
Libc-1353.41.1.tar.gz
[apple/libc.git] / include / util.h
index 1da5789a263f327b9c65c327bd36c35568c28869..bbfad2b590d51ea2fad680833848eb6d3d93a40c 100644 (file)
@@ -1,10 +1,8 @@
 /*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000, 2007, 2008 Apple Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
@@ -66,7 +64,7 @@
 #include <stdio.h>
 #include <pwd.h>
 #include <termios.h>
-#include <utmp.h>
+#include <Availability.h>
 
 #define        PIDLOCK_NONBLOCK        1
 #define PIDLOCK_USEHOSTNAME    2
 #define OPENDEV_BLCK   0x04            /* Open block, not character device. */
 
 __BEGIN_DECLS
-void   login(struct utmp *);
+#ifdef UNIFDEF_LEGACY_UTMP_APIS
+struct utmp; /* forward reference to /usr/include/utmp.h */
+void   login(struct utmp *)            __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_5,__IPHONE_NA,__IPHONE_NA);
+#endif /* UNIFDEF_LEGACY_UTMP_APIS */
 int    login_tty(int);
-int    logout(const char *);
-void   logwtmp(const char *, const char *, const char *);
+#ifdef UNIFDEF_LEGACY_UTMP_APIS
+int    logout(const char *)            __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_5,__IPHONE_NA,__IPHONE_NA);
+#endif /* UNIFDEF_LEGACY_UTMP_APIS */
+void   logwtmp(const char *, const char *, const char *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_5,__IPHONE_2_0,__IPHONE_2_0);
 int    opendev(char *, int, int, char **);
 int    openpty(int *, int *, char *, struct termios *,
                     struct winsize *);
@@ -103,5 +106,10 @@ int        ttyaction(char *tty, char *act, char *user);
 struct iovec;
 char   *ttymsg(struct iovec *, int, const char *, int);
 __END_DECLS
+#ifdef UNIFDEF_LEGACY_UTMP_APIS
+
+/* Include utmp.h last to avoid deprecation warning above */
+#include <utmp.h>
+#endif /* UNIFDEF_LEGACY_UTMP_APIS */
 
 #endif /* !_UTIL_H_ */