remove __P, use st_mtime et al from struct stat

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9526 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2001-01-27 20:04:25 +00:00
parent 129786bbb7
commit bbf9b61001

View File

@@ -52,7 +52,6 @@
#include <string.h> #include <string.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <libutil.h>
#include "pathnames.h" #include "pathnames.h"
#include "extern.h" #include "extern.h"
@@ -71,13 +70,13 @@ char *port;
#define CMDNEEDS 64 #define CMDNEEDS 64
char cmd[CMDNEEDS]; /* must hold "rcp -r -p -d\0" */ char cmd[CMDNEEDS]; /* must hold "rcp -r -p -d\0" */
int response __P((void)); int response (void);
void rsource __P((char *, struct stat *)); void rsource (char *, struct stat *);
void sink __P((int, char *[])); void sink (int, char *[]);
void source __P((int, char *[])); void source (int, char *[]);
void tolocal __P((int, char *[])); void tolocal (int, char *[]);
void toremote __P((char *, int, char *[])); void toremote (char *, int, char *[]);
void usage __P((void)); void usage (void);
int do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout); int do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout);
@@ -347,8 +346,8 @@ syserr: run_err("%s: %s", name, strerror(errno));
* versions expecting microseconds. * versions expecting microseconds.
*/ */
(void)snprintf(buf, sizeof(buf), "T%ld 0 %ld 0\n", (void)snprintf(buf, sizeof(buf), "T%ld 0 %ld 0\n",
(long)stb.st_mtimespec.tv_sec, (long)stb.st_mtime,
(long)stb.st_atimespec.tv_sec); (long)stb.st_atime);
(void)write(remout, buf, strlen(buf)); (void)write(remout, buf, strlen(buf));
if (response() < 0) if (response() < 0)
goto next; goto next;
@@ -412,8 +411,8 @@ rsource(name, statp)
last++; last++;
if (pflag) { if (pflag) {
(void)snprintf(path, sizeof(path), "T%ld 0 %ld 0\n", (void)snprintf(path, sizeof(path), "T%ld 0 %ld 0\n",
(long)statp->st_mtimespec.tv_sec, (long)statp->st_mtime,
(long)statp->st_atimespec.tv_sec); (long)statp->st_atime);
(void)write(remout, path, strlen(path)); (void)write(remout, path, strlen(path));
if (response() < 0) { if (response() < 0) {
closedir(dirp); closedir(dirp);