From 269da71be2da99b2edd4726771d36aa85a9bbe69 Mon Sep 17 00:00:00 2001 From: cvs Date: Wed, 30 Oct 2002 08:25:49 +0000 Subject: [PATCH] corrected an incompatiblity with ANSI C (function pointer cast) M.Z. --- hardsup/Makefile | 3 ++- hardsup/asynsrv_utility.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hardsup/Makefile b/hardsup/Makefile index e3d1f462..a773cbc2 100644 --- a/hardsup/Makefile +++ b/hardsup/Makefile @@ -15,7 +15,8 @@ OBJ= el734_utility.o asynsrv_utility.o stredit.o \ #CFLAGS= -I/usr/local/include -I. -I../ -DLINUX -g -c #------------ for DigitalUnix CC=cc -CFLAGS= -I/data/koenneck/include -I. -I../ -std1 -g -c +CFLAGS= -I. -I../ -std1 -g -c +#CFLAGS= -I/data/koenneck/include -I. -I../ -std1 -g -c #------------ for DigitalUnix with Fortify ## CC=cc ## CFLAGS= -DFORTIFY -I. -I../ -std1 -g -c diff --git a/hardsup/asynsrv_utility.c b/hardsup/asynsrv_utility.c index b88f6793..2214adfe 100644 --- a/hardsup/asynsrv_utility.c +++ b/hardsup/asynsrv_utility.c @@ -836,7 +836,8 @@ va_list ap; /* Pointer to variable args */ char *txt_ptr; int intval; - /* + typedef void (*IdleHandler)(int,int); + /* ** Pre-set the routinename (in case of error) */ if (AsynSrv_errcode == 0 && AsynSrv_call_depth < 5) { @@ -876,7 +877,7 @@ } memcpy (asyn_info->eot, my_eot, 4); }else if (strcmp (txt_ptr, "idleHdl") == 0) { /* MZ. */ - asyn_info->idleHandler = (void (*) (int, int)) va_arg (ap, void *); + asyn_info->idleHandler = va_arg (ap, IdleHandler); }else { AsynSrv_errcode = ASYNSRV__BAD_PAR; return False;