Fix almost all the warnings (which were non-critical anyway); port

left marked broken for someone else to verify.
This commit is contained in:
angelos 1999-10-30 21:54:52 +00:00
parent 2c39631937
commit 25fa1f12ec
9 changed files with 139 additions and 8 deletions

View File

@ -1,6 +1,6 @@
# $OpenBSD: Makefile,v 1.7 1999/10/30 11:34:25 turan Exp $
# $OpenBSD: Makefile,v 1.8 1999/10/30 21:54:52 angelos Exp $
BROKEN= lots and lots of compiler warnigs, considered too unsafe.
BROKEN= waiting for turans@ to verify
DISTNAME= vic-2.8ucl4
CATEGORIES= mbone
@ -19,6 +19,5 @@ WRKSRC= ${WRKDIR}/vic
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/vic ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/histtolut ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/vic.1 ${PREFIX}/man/man1
.include <bsd.port.mk>

View File

@ -27,7 +27,7 @@
#ifndef vic_config_h
#define vic_config_h
! #if defined(sgi) || defined(__bsdi__) || defined(__FreeBSD__) || defined(__FreeBSD__)
! #if defined(sgi) || defined(__bsdi__) || defined(__FreeBSD__) || defined(__OpenBSD__)
# include <sys/types.h>
#elif defined(sun)
#include <sys/types.h>

View File

@ -1,5 +1,5 @@
--- grabber-x11.cc.orig Fri Jun 11 12:34:19 1999
+++ grabber-x11.cc Thu Jul 29 08:52:40 1999
--- grabber-x11.cc.orig Fri Jun 11 06:34:19 1999
+++ grabber-x11.cc Sat Oct 30 17:41:17 1999
@@ -46,6 +46,11 @@
#include <X11/Xutil.h>
#include <X11/Xatom.h>
@ -12,7 +12,21 @@
#include <tk.h>
/*** #include "sized_types.h" ***/
@@ -454,7 +459,9 @@
@@ -194,12 +199,9 @@
X11Device::X11Device(const char* nickname):
InputDevice(nickname), name_(nickname)
{
- if (free)
- attributes_ = "\
+ attributes_ = "\
size {large normal small cif} \
format {411}" ;
- else
- attributes_ = "disabled";
}
extern "C" {
@@ -454,7 +456,9 @@
uint8 *vp= up + (framesize_ >> 2) ;
uint16 *data=(uint16 *)ximage_->image->data, p0, p1, p2, p3;
@ -22,3 +36,21 @@
for (y=0; y<height_; y+=2) {
for (x=0; x<width_; x += 2) {
@@ -693,7 +697,7 @@
VidUtil_DestroyXImage(dpy_, ximage_);
ximage_ = VidUtil_AllocXImage(dpy_, root_vis, root_depth_, w, h, False);
}
- return (c_grab == NULL) ? 0 : config|VID_SMALL|VID_MEDIUM|VID_LARGE;
+ return (c_grab == 0) ? 0 : config|VID_SMALL|VID_MEDIUM|VID_LARGE;
}
extern "C" {
@@ -1049,7 +1053,7 @@
X11Grabber::X11Grabber(const char* name, const char* format)
{
- c_grab = (int)NULL ; /* XXX */
+ c_grab = 0;
theroot_ = None ; /* XXX */
ximage_ = NULL ;
color = NULL ;

View File

@ -0,0 +1,13 @@
--- h263/defs.h.orig Sat Oct 30 17:23:58 1999
+++ h263/defs.h Sat Oct 30 17:24:10 1999
@@ -8,8 +8,10 @@
#define NUM_LAYERS 4
+#ifndef __OpenBSD__
#ifndef RAND_MAX
# define RAND_MAX 32767 /* sos4 has it not */
+#endif
#endif
#ifdef FALSE

View File

@ -0,0 +1,13 @@
--- h263/Util.h.orig Sat Oct 30 17:24:44 1999
+++ h263/Util.h Sat Oct 30 17:44:05 1999
@@ -6,7 +6,10 @@
#ifndef _UTIL_
#define _UTIL_
+#ifndef __OpenBSD__
#include <malloc.h>
+#endif
+
#include "error.h"
#include <stdlib.h>
#include <stdio.h>

View File

@ -0,0 +1,11 @@
--- ntp-time.h.orig Sat Oct 30 17:27:06 1999
+++ ntp-time.h Sat Oct 30 17:30:38 1999
@@ -55,7 +55,7 @@
/*
* Number of seconds between 1-Jan-1900 and 1-Jan-1970
*/
-#define GETTIMEOFDAY_TO_NTP_OFFSET 2208988800
+#define GETTIMEOFDAY_TO_NTP_OFFSET (22089888 * 100)
/*
* Return a 64-bit ntp timestamp (UTC time relative to Jan 1, 1970).

View File

@ -0,0 +1,50 @@
--- qfDES.c.orig Sat Oct 30 17:36:06 1999
+++ qfDES.c Sat Oct 30 17:36:37 1999
@@ -128,7 +128,7 @@
}
-#define LITTLE_ENDIAN(t, s) \
+#define LITTLE_ENDIAN_ENC(t, s) \
{ \
register unsigned int z, l = s/4; \
register Word *tp = (Word *) t; \
@@ -204,8 +204,8 @@
#if defined(__i386__)
unsigned int origSize = size;
- LITTLE_ENDIAN(key, 8);
- LITTLE_ENDIAN(data, origSize);
+ LITTLE_ENDIAN_ENC(key, 8);
+ LITTLE_ENDIAN_ENC(data, origSize);
#endif
/*
@@ -258,7 +258,7 @@
cb[0] = cb[1] = 0;
#if defined(__i386__)
- LITTLE_ENDIAN(cb, 8);
+ LITTLE_ENDIAN_ENC(cb, 8);
#endif
}
@@ -401,15 +401,15 @@
((Word *) initVec)[1] = cb[1];
#if defined(__i386__)
- LITTLE_ENDIAN(initVec, 8);
+ LITTLE_ENDIAN_ENC(initVec, 8);
#endif
}
_exit_qfDES_:
#if defined(__i386__)
- LITTLE_ENDIAN(key, 8);
- LITTLE_ENDIAN(data, origSize);
+ LITTLE_ENDIAN_ENC(key, 8);
+ LITTLE_ENDIAN_ENC(data, origSize);
#endif
return 0;

View File

@ -0,0 +1,14 @@
--- qfDES_memory.c.orig Sat Oct 30 17:37:17 1999
+++ qfDES_memory.c Sat Oct 30 17:37:31 1999
@@ -8,7 +8,11 @@
#include <stdio.h>
#include <memory.h>
+
+#ifndef __OpenBSD__
#include <malloc.h>
+#endif
+
#include <ctype.h>
#include "config.h"
#include "qfDES.h"

View File

@ -1,3 +1,2 @@
bin/vic
bin/histtolut
man/man1/vic.1