>Number:         958
>Category:       os-ultrix
>Synopsis:       alloc.c and mod_dir.c have problems with incompatible pointer 
>type assignment
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    apache (Apache HTTP Project)
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Thu Jul 31 21:40:01 1997
>Originator:     [EMAIL PROTECTED]
>Organization:
apache
>Release:        1.2.1
>Environment:
DECstation 3100, fresh install of ULTRIX V4.5 and C and C++ compilers.
>Description:
# Configure
Using config file: Configuration
Using Makefile template file: Makefile.tmpl
 + configured for ULTRIX platform
 + setting C compiler to cc
 + setting C compiler optimization-level to -O2
# make
(cd regex; make lib CC=cc AUX_CFLAGS='-O2 -DULTRIX -std ' RANLIB='ranlib')
rm -f *.o
sh ./mkh  -i _REGEX_H_ regex2.h regcomp.c regerror.c regexec.c regfree.c >regexp
cmp -s regex.tmp regex.h 2>/dev/null || cp regex.tmp regex.h
rm -f regex.tmp
sh ./mkh  -p regcomp.c >regcomp.ih
cc -I. -DPOSIX_MISTAKE -O2 -DULTRIX -std  -c regcomp.c
sh ./mkh  -p engine.c >engine.ih
cc -I. -DPOSIX_MISTAKE -O2 -DULTRIX -std  -c regexec.c
sh ./mkh  -p regerror.c >regerror.ih
cc -I. -DPOSIX_MISTAKE -O2 -DULTRIX -std  -c regerror.c
cc -I. -DPOSIX_MISTAKE -O2 -DULTRIX -std  -c regfree.c
rm -f libregex.a
ar crv libregex.a regcomp.o regexec.o regerror.o regfree.o
a - regcomp.o
a - regexec.o
a - regerror.o
a - regfree.o
ranlib libregex.a
cc -c -Iregex  -O2 -DULTRIX -std   alloc.c
cfe: Warning: alloc.c, line 852: Incompatible pointer type assignment
       fd = fdopen(desc, mode);
 ------------------------^
cfe: Warning: alloc.c, line 868: Incompatible pointer type assignment
   f=fdopen(fd,mode);
 --------------^
cc -c -Iregex  -O2 -DULTRIX -std   http_main.c
cc -c -Iregex  -O2 -DULTRIX -std   http_core.c
cc -c -Iregex  -O2 -DULTRIX -std   http_config.c
cc -c -Iregex  -O2 -DULTRIX -std   http_request.c
cc -c -Iregex  -O2 -DULTRIX -std   http_log.c
cc -c -Iregex  -O2 -DULTRIX -std   http_protocol.c
cc -c -Iregex  -O2 -DULTRIX -std   rfc1413.c
cc -c -Iregex  -O2 -DULTRIX -std   util.c
cc -c -Iregex  -O2 -DULTRIX -std   util_script.c
cc -c -Iregex  -O2 -DULTRIX -std   modules.c
cc -c -Iregex  -O2 -DULTRIX -std   buff.c
cc -c -Iregex  -O2 -DULTRIX -std   md5c.c
cc -c -Iregex  -O2 -DULTRIX -std   util_md5.c
cc -c -Iregex  -O2 -DULTRIX -std   explain.c
cc -c -Iregex  -O2 -DULTRIX -std   http_bprintf.c
cfe: Warning: http_bprintf.c, line 91: Long double not supported; double assume.
     long double  lDoubleArg = 0.0;
 ----^
cc -c -Iregex  -O2 -DULTRIX -std   util_date.c
cc -c -Iregex  -O2 -DULTRIX -std   util_snprintf.c
cc -c -Iregex  -O2 -DULTRIX -std   mod_env.c
cc -c -Iregex  -O2 -DULTRIX -std   mod_log_config.c
cc -c -Iregex  -O2 -DULTRIX -std   mod_mime.c
cc -c -Iregex  -O2 -DULTRIX -std   mod_negotiation.c
cc -c -Iregex  -O2 -DULTRIX -std   mod_include.c
cc -c -Iregex  -O2 -DULTRIX -std   mod_dir.c
cfe: Warning: mod_dir.c, line 772: Incompatible pointer type assignment
              (int (*))dsortf);
        ------^
cc -c -Iregex  -O2 -DULTRIX -std   mod_cgi.c
cc -c -Iregex  -O2 -DULTRIX -std   mod_asis.c
cc -c -Iregex  -O2 -DULTRIX -std   mod_imap.c
cc -c -Iregex  -O2 -DULTRIX -std   mod_actions.c
cc -c -Iregex  -O2 -DULTRIX -std   mod_userdir.c
cc -c -Iregex  -O2 -DULTRIX -std   mod_alias.c
cc -c -Iregex  -O2 -DULTRIX -std   mod_access.c
cc -c -Iregex  -O2 -DULTRIX -std   mod_auth.c
cc -c -Iregex  -O2 -DULTRIX -std   mod_browser.c
cc    -o httpd alloc.o http_main.o http_core.o http_config.o http_request.o  ht
#
>How-To-Repeat:
make the same setup.
>Fix:
I modified alloc.c by changing the initialization of FILE fd* = NULL; to just
FILE *fd;
I typecast the mode parameter to const char * on the two fdopen lines.
In mod_dir.c I commented out the ULTRIX_BRAIN_DEATH compile time #if to use
the second version which matched my C documentation.
I left the http_bprinf.c problem as it seemed harmless at the time
>Audit-Trail:
>Unformatted:


Reply via email to