fix some issues with newer gcc (mostly aliasing)

This commit is contained in:
keil 2006-01-15 15:08:54 +00:00
parent 35931d9469
commit 9d0dfbfd87
9 changed files with 30 additions and 20 deletions

View File

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.3 2002/01/31 18:55:23 paul Exp $
# $Id: Makefile,v 1.4 2006/01/15 15:08:54 keil Exp $
TDU_M_OBJ = master.o
TDU_S_OBJ = slave.o echo_pos.o
@ -11,7 +11,7 @@ EFT_OBJ = eft.o eft_dir.o eft_names.o eft_tmpfile.o
OBJECTS = $(TDU_M_OBJ) $(TDU_S_OBJ) $(TDU_OBJ) $(EFT_M_OBJ) $(EFT_S_OBJ) $(EFT_OBJ)
CFLAGS += -Iinclude
CPPFLAGS += -Iinclude
all: libeft.a

View File

@ -1,7 +1,7 @@
#
# Makefile for Linux 1.2.13 with gcc 2.6.3
#
# $Id: Makefile,v 1.1 1999/06/30 17:19:26 he Exp $
# $Id: Makefile,v 1.2 2006/01/15 15:08:55 keil Exp $
#
CC = gcc
AR = ar cq
@ -9,7 +9,7 @@ RANLIB = ranlib
LIBC = /lib/libc.a
IFLAGS =
LFLAGS =
CFLAGS = -O6 -fomit-frame-pointer -fno-strength-reduce -pipe ${IFLAGS} ${LFLAGS}
MYCFLAGS = -O6 -fomit-frame-pointer -fno-strength-reduce -pipe ${IFLAGS} ${LFLAGS}
CFLAGS = -g
SRCS = strcasestr.c access.c divfunc.c private.c acl.c main.c sigfix.c \
@ -30,14 +30,14 @@ ftp.h:
install -c -m 444 ftp.h /usr/include/arpa
.c.o:
${CC} ${CFLAGS} -c $<
${CC} ${CFLAGS} ${MYCFLAGS} -c $<
strcasestr.o: strcasestr.c
${CC} ${CFLAGS} -c strcasestr.c
${CC} ${CFLAGS} ${MYCFLAGS} -c strcasestr.c
authuser.o: authuser.c
${CC} ${CFLAGS} -c authuser.c
${CC} ${CFLAGS} ${MYCFLAGS} -c authuser.c
snprintf.o: snprintf.c
${CC} ${CFLAGS} -c snprintf.c
${CC} ${CFLAGS} ${MYCFLAGS} -c snprintf.c

View File

@ -56,6 +56,7 @@
#elif defined(HAVE_SYS_MOUNT)
#include <sys/mount.h>
#endif
#include <unistd.h>
#include <arpa/ftp.h>
@ -197,7 +198,7 @@ char *outbuf;
*outptr = '\0';
}
int reply (int msg, char *str) {
void reply (int msg, char *str) {
fprintf (stderr, "%d - %s\n", msg, str);
}

View File

@ -385,7 +385,7 @@ int wuftp_check_user (char *user, char *passw, char *isdnno) {
syslog (LOG_NOTICE,
"EFT LOGIN REFUSED (not anonymous) FROM %s, %s",
remotehost, user);
return;
return 0;
}
/* fall here if username okay in any case */
#endif /* ANON_ONLY */
@ -416,7 +416,7 @@ int wuftp_check_user (char *user, char *passw, char *isdnno) {
sprintf (autherrmsg, "User %s access denied.", user);
syslog(LOG_NOTICE, "EFT LOGIN REFUSED (access denied) FROM %s, %s",
remotehost, user);
return;
return 0;
} else
if (use_accessfile) /* see above. _H*/
acl_setfunctions();

View File

@ -2,7 +2,7 @@
#
# (c) 1995-97 Volker Götz
#
# $Id: Makefile,v 1.7 2002/07/19 21:23:53 keil Exp $
# $Id: Makefile,v 1.8 2006/01/15 15:08:55 keil Exp $
ifeq (../.config,$(wildcard ../.config))
#
@ -32,7 +32,7 @@ PROGS=imontty
all: $(PROGS)
imontty: imontty.c imontty.h
cc $(CCFLAGS) -o imontty imontty.c
cc $(CFLAGS) $(CCFLAGS) -o imontty imontty.c
rootperm:
@echo 'main(int argc,char**argv){unlink(argv[0]);return(getuid()==0);}'>g

View File

@ -1,4 +1,4 @@
## $Id: Makefile.in,v 1.219 2005/02/27 22:37:41 tobiasb Exp $
## $Id: Makefile.in,v 1.220 2006/01/15 15:08:55 keil Exp $
##
## ISDN accounting for isdn4linux.
##
@ -19,6 +19,9 @@
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
## $Log: Makefile.in,v $
## Revision 1.220 2006/01/15 15:08:55 keil
## fix some issues with newer gcc (mostly aliasing)
##
## Revision 1.219 2005/02/27 22:37:41 tobiasb
## Set version to 4.70.
## A brief and incomplete list of changes between versions 4.68 and 4.70:
@ -1791,7 +1794,7 @@ PCFLAGS = mode=oracle ireclen=160 lines=yes
%.o: %.c
@echo Compiling $<
@$(CC) $(CFLAGS) $(DEFS) $(INCLUDE) -c -o $@ $<
@$(CC) $(CFLAGS) $(DEFS) $(INCLUDE) -fno-strict-aliasing -c -o $@ $<
%.1: %.man
MANDATE=`grep CHECKIN $< | $(AWK) '{print $$4}'`; \

View File

@ -1,4 +1,4 @@
/* $Id: asn1_address.c,v 1.4 2000/01/20 07:30:09 kai Exp $
/* $Id: asn1_address.c,v 1.5 2006/01/15 15:08:55 keil Exp $
*
* ISDN accounting for isdn4linux. (ASN.1 parser)
*
@ -21,6 +21,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: asn1_address.c,v $
* Revision 1.5 2006/01/15 15:08:55 keil
* fix some issues with newer gcc (mostly aliasing)
*
* Revision 1.4 2000/01/20 07:30:09 kai
* rewrote the ASN.1 parsing stuff. No known problems so far, apart from the
* following:
@ -201,7 +204,7 @@ int ParsePublicPartyNumber(struct Aoc *chanp, u_char *p, u_char *end, char *str)
int ParsePrivatePartyNumber(struct Aoc *chanp, u_char *p, u_char *end, char *str)
{
int privateTypeOfNumber;
int privateTypeOfNumber = -1;
char numberDigits[20];
INIT;

View File

@ -46,7 +46,7 @@ SUBDIRS =
DEFS += -I$(PREFIXDIR)
%.o: %.c
$(CC) $(CFLAGS) $(DEFS) -c -o $@ $<
$(CC) $(CFLAGS) $(DEFS) -fno-strict-aliasing -c -o $@ $<
all: .depend libisdn.a

View File

@ -13,7 +13,7 @@ vpath %.c $(TOPDIR)
CC = gcc
INC = -I$(TOPDIR) -I$(CAPIINC) -Ipppd
DEFS = -DPPPVER=$(shell $(TOPDIR)/pversion $(PPPVERSION))
CFLAGS = -O2 -Wall -fPIC $(DEFS) $(INC) -L$(CAPILIB)
MYCFLAGS= -O2 -Wall -fPIC $(DEFS) $(INC) -L$(CAPILIB)
LDFLAGS = -shared -L$(CAPILIB)
ALL = capiplugin.so userpass.so
@ -24,7 +24,10 @@ capiplugin.so: capiplugin.o capiconn.o
$(CC) -o $@ $(LDFLAGS) capiplugin.o capiconn.o -lcapi20dyn
userpass.so: userpass.o
$(CC) -o $@ $(LDFLAGS) $(CFLAGS) -nostdlib userpass.o
$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $(MYCFLAGS) -nostdlib userpass.o
%.o: %.c
$(CC) $(CFLAGS) $(MYCFLAGS) -c -o $@ $<
distclean: clean