1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-30 05:40:06 +00:00

- Update to 2.0.3

- Remove gettimeofday patch (upstream moved away from ftime)
This commit is contained in:
Danilo Egea Gondolfo 2020-08-09 16:33:24 +00:00
parent 232fa2c455
commit 76db153428
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=544567
3 changed files with 4 additions and 76 deletions

View File

@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= cups-bjnp
PORTVERSION= 2.0.2
PORTVERSION= 2.0.3
CATEGORIES= print
MASTER_SITES= SF

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1568063658
SHA256 (cups-bjnp-2.0.2.tar.gz) = 586a8e0b2e92d41e85e981a16e3015a240f11a02b1bbbd0b92cd45620f411b0e
SIZE (cups-bjnp-2.0.2.tar.gz) = 143533
TIMESTAMP = 1596965448
SHA256 (cups-bjnp-2.0.3.tar.gz) = c914b2fd9d8e26ce22f2df6244d9defeec31ee9a5360f723eecb3b00f2168500
SIZE (cups-bjnp-2.0.3.tar.gz) = 140764

View File

@ -1,72 +0,0 @@
--- bjnp-debug.c.orig 2018-02-21 11:40:53 UTC
+++ bjnp-debug.c
@@ -20,7 +20,7 @@
#include <stdio.h>
#include <stdarg.h>
-#include <sys/timeb.h>
+#include <sys/time.h>
#include <errno.h>
#include "bjnp.h"
@@ -58,7 +58,7 @@ static logtable_entry_t logtable[] = {
static bjnp_loglevel_t debug_level = LOG_ERROR;
static FILE *debug_file = NULL;
static time_t start_sec = 0;
-static int start_msec;
+static suseconds_t start_usec;
/*
* local functions
@@ -192,9 +192,9 @@ bjnp_debug(bjnp_loglevel_t level, const char *fmt, ...
{
va_list ap;
char printbuf[1024];
- struct timeb timebuf;
+ struct timeval timebuf;
int sec;
- int msec;
+ suseconds_t usec;
if (level <= debug_level) {
/* print received data into a string */
@@ -211,16 +211,16 @@ bjnp_debug(bjnp_loglevel_t level, const char *fmt, ...
/* all log messages may go to the own logfile */
if (debug_file != NULL) {
- ftime(&timebuf);
+ gettimeofday (&timebuf, NULL);
- if ((msec = timebuf.millitm - start_msec) < 0) {
- msec += 1000;
- timebuf.time -= 1;
+ if ((usec = timebuf.tv_usec - start_usec) < 0) {
+ usec += 1000000;
+ timebuf.tv_sec -= 1;
}
- sec = timebuf.time - start_sec;
+ sec = timebuf.tv_sec - start_sec;
- fprintf(debug_file, "%8s: %03d.%03d %s", level2str(level), sec, msec,
+ fprintf(debug_file, "%8s: %03d.%06ld %s", level2str(level), sec, usec,
printbuf);
fflush(debug_file);
}
@@ -234,12 +234,12 @@ bjnp_set_debug_level(const char *level, const char *fi
* set debug level to level (string)
*/
- struct timeb timebuf;
+ struct timeval timebuf;
char loglevel[16];
- ftime(&timebuf);
- start_sec = timebuf.time;
- start_msec = timebuf.millitm;
+ gettimeofday (&timebuf, NULL);
+ start_sec = timebuf.tv_sec;
+ start_usec = timebuf.tv_usec;
/*
* Set log level