[Pkg-shadow-commits] r2834 - in upstream/trunk: . libmisc src

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Tue Apr 28 20:03:24 UTC 2009


Author: nekral-guest
Date: 2009-04-28 20:03:23 +0000 (Tue, 28 Apr 2009)
New Revision: 2834

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/libmisc/utmp.c
   upstream/trunk/src/logoutd.c
   upstream/trunk/src/userdel.c
Log:
	* libmisc/utmp.c, src/userdel.c, src/logoutd.c: Replace #if by #ifdef


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2009-04-28 19:26:27 UTC (rev 2833)
+++ upstream/trunk/ChangeLog	2009-04-28 20:03:23 UTC (rev 2834)
@@ -1,5 +1,9 @@
 2009-04-28  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* libmisc/utmp.c, src/userdel.c, src/logoutd.c: Replace #if by #ifdef
+
+2009-04-28  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* src/vipw.c: Harmonize messages.
 
 2009-04-28  Nicolas François  <nicolas.francois at centraliens.net>

Modified: upstream/trunk/libmisc/utmp.c
===================================================================
--- upstream/trunk/libmisc/utmp.c	2009-04-28 19:26:27 UTC (rev 2833)
+++ upstream/trunk/libmisc/utmp.c	2009-04-28 20:03:23 UTC (rev 2834)
@@ -37,7 +37,7 @@
 
 #include <utmp.h>
 
-#if USE_UTMPX
+#ifdef USE_UTMPX
 #include <utmpx.h>
 #endif
 

Modified: upstream/trunk/src/logoutd.c
===================================================================
--- upstream/trunk/src/logoutd.c	2009-04-28 19:26:27 UTC (rev 2833)
+++ upstream/trunk/src/logoutd.c	2009-04-28 20:03:23 UTC (rev 2834)
@@ -54,21 +54,21 @@
 #endif
 
 /* local function prototypes */
-#if HAVE_UTMPX_H
+#ifdef USE_UTMPX
 static int check_login (const struct utmpx *ut);
-#else
+#else				/* !USE_UTMPX */
 static int check_login (const struct utmp *ut);
-#endif
+#endif				/* !USE_UTMPX */
 static void send_mesg_to_tty (int tty_fd);
 
 /*
  * check_login - check if user (struct utmpx/utmp) allowed to stay logged in
  */
-#if HAVE_UTMPX_H
+#ifdef USE_UTMPX
 static int check_login (const struct utmpx *ut)
-#else
+#else				/* !USE_UTMPX */
 static int check_login (const struct utmp *ut)
-#endif
+#endif				/* !USE_UTMPX */
 {
 	char user[sizeof (ut->ut_user) + 1];
 	time_t now;
@@ -147,11 +147,11 @@
 	int status;
 	pid_t pid;
 
-#if HAVE_UTMPX_H
+#ifdef USE_UTMPX
 	struct utmpx *ut;
-#else
+#else				/* !USE_UTMPX */
 	struct utmp *ut;
-#endif
+#endif				/* !USE_UTMPX */
 	char user[sizeof (ut->ut_user) + 1];	/* terminating NUL */
 	char tty_name[sizeof (ut->ut_line) + 6];	/* /dev/ + NUL */
 	int tty_fd;
@@ -200,22 +200,22 @@
 		 * Attempt to re-open the utmpx/utmp file. The file is only
 		 * open while it is being used.
 		 */
-#if HAVE_UTMPX_H
+#ifdef USE_UTMPX
 		setutxent ();
-#else
+#else				/* !USE_UTMPX */
 		setutent ();
-#endif
+#endif				/* !USE_UTMPX */
 
 		/*
 		 * Read all of the entries in the utmpx/utmp file. The entries
 		 * for login sessions will be checked to see if the user
 		 * is permitted to be signed on at this time.
 		 */
-#if HAVE_UTMPX_H
+#ifdef USE_UTMPX
 		while ((ut = getutxent ()) != NULL)
-#else
+#else				/* !USE_UTMPX */
 		while ((ut = getutent ()) != NULL)
-#endif
+#endif				/* !USE_UTMPX */
 		{
 			if (ut->ut_type != USER_PROCESS) {
 				continue;
@@ -279,11 +279,11 @@
 			exit (0);
 		}
 
-#if HAVE_UTMPX_H
+#ifdef USE_UTMPX
 		endutxent ();
-#else
+#else				/* !USE_UTMPX */
 		endutent ();
-#endif
+#endif				/* !USE_UTMPX */
 
 #ifndef DEBUG
 		sleep (60);

Modified: upstream/trunk/src/userdel.c
===================================================================
--- upstream/trunk/src/userdel.c	2009-04-28 19:26:27 UTC (rev 2833)
+++ upstream/trunk/src/userdel.c	2009-04-28 20:03:23 UTC (rev 2834)
@@ -590,17 +590,17 @@
  * We see if the user is logged in by looking for the user name
  * in the utmp file.
  */
-#if HAVE_UTMPX_H
+#ifdef USE_UTMPX
 	struct utmpx *utent;
 
 	setutxent ();
 	while ((utent = getutxent ()) != NULL)
-#else
+#else				/* !USE_UTMPX */
 	struct utmp *utent;
 
 	setutent ();
 	while ((utent = getutent ()) != NULL)
-#endif
+#endif				/* !USE_UTMPX */
 	{
 		if (utent->ut_type != USER_PROCESS)
 			continue;




More information about the Pkg-shadow-commits mailing list