From 3ae5543ee9c538e34bb8ae03293c07f76ab91f3f Mon Sep 17 00:00:00 2001 From: Walter de Jong Date: Thu, 28 Mar 2013 21:09:11 +0100 Subject: remove unnecessary ifdef __platform__ constructions --- pam_tacplus.c | 21 ++++++--------------- support.c | 4 +--- support.h | 4 +--- 3 files changed, 8 insertions(+), 21 deletions(-) diff --git a/pam_tacplus.c b/pam_tacplus.c index 9644bc4..c573c83 100644 --- a/pam_tacplus.c +++ b/pam_tacplus.c @@ -32,10 +32,7 @@ #include #include #include - -#ifndef __linux__ - #include -#endif +#include #include "libtac.h" #include "pam_tacplus.h" @@ -46,9 +43,7 @@ #define PAM_SM_SESSION /* #define PAM_SM_PASSWORD */ -#ifndef __linux__ - #include -#endif +#include #include #ifdef HAVE_CONFIG_H @@ -85,17 +80,13 @@ static short int task_id = 0; int _pam_send_account(int tac_fd, int type, const char *user, char *tty, char *r_addr, char *cmd) { - char buf[40]; + char buf[64]; struct tac_attrib *attr; int retval; - + attr=(struct tac_attrib *)_xcalloc(sizeof(struct tac_attrib)); - -#ifdef _AIX - sprintf(buf, "%d", time(0)); -#else - sprintf(buf, "%lu", (long unsigned int)time(0)); -#endif + + sprintf(buf, "%lu", (unsigned long)time(NULL)); if (type == TAC_PLUS_ACCT_FLAG_START) { tac_add_attrib(&attr, "start_time", buf); diff --git a/support.c b/support.c index 23b01e5..0dacf7b 100644 --- a/support.c +++ b/support.c @@ -24,9 +24,7 @@ #define PAM_SM_SESSION /* #define PAM_SM_PASSWORD */ -#ifndef __linux__ - #include -#endif +#include #include #include "pam_tacplus.h" diff --git a/support.h b/support.h index 300c7ce..6e5da87 100644 --- a/support.h +++ b/support.h @@ -19,9 +19,7 @@ * See `CHANGES' file for revision history. */ -#ifndef __linux__ - #include -#endif +#include #include /* support.c */ -- cgit v1.2.3