On Thu, Jan 08, 2004 at 08:26:08AM -0700, Marc Aurele La France wrote:
>On Wed, 7 Jan 2004, David Dawes wrote:
>
>> >> The inclusion of Xos.h in xf86cfg/config.h causes a conflict with the
>> >> inclusion of strings.h on Solaris 2.5.1 x86:
>
>> >> making all in programs/Xserver/hw/xfree86/xf86cfg...
>> >> rm -f accessx.o
>> >> gcc -c -O2 -fno-strength-reduce -DNO_ASM -Wall -Wpointer-arith  -ansi
>> >> -pedantic   -I../common -I../scanpci -I../loader
>> >> -I../../../../../programs/Xserver/hw/xfree86/os-support
>> >> -I../../../../../programs/Xserver/include
>> >> -I../../../../../exports/include/X11
>> >> -I../../../../../lib/font/include  -I../../../../..
>> >> -I../../../../../exports/include   -Dsun -Di386 -DSVR4 -D__EXTENSIONS__
>> >> -D__i386     -DXF86CONFIG=\"XF86Config\" -DUSE_MODULES
>> >> -DPROJECT_ROOT=\"/usr/X11R6\"            -DXF86CONFIGDIR
>> >> =\"/usr/X11R6/lib/X11\"    accessx.c
>> >> In file included from config.h:42,
>> >>                  from accessx.c:32:
>> >> /usr/include/strings.h:27: parse error before `('
>> >> /usr/include/strings.h:28: parse error before `('
>> >> *** Error code 1
>> >> make: Fatal error: Command failed for target `accessx.o'
>> >> Current working directory
>> >> /proj3/ere/work/lindsayh/XFree86/RC2/xc/programs/Xserver/hw/xfree86/xf86cfg
>
>> >> Is the following patch the correct solution, or should the conditional
>> >> inclusion of strings.h be moved into Xos.h as well (I notice there was one
>> >> added for SCO325)?
>
>> >> *** programs/Xserver/hw/xfree86/xf86cfg/config.h.orig   Fri Dec 19 14:48:40
>> >> 2003
>> >> --- programs/Xserver/hw/xfree86/xf86cfg/config.h        Wed Jan  7 09:48:01
>> >> 2004
>> >> ***************
>> >> *** 38,46 ****
>> >>   #include <dirent.h>
>> >>   #include <string.h>
>> >>   #include <unistd.h>
>> >> - #if defined(sun) && defined(SVR4)
>> >> - #include <strings.h>
>> >> - #endif
>> >>
>> >>   #include <stdarg.h>
>> >>
>> >> --- 38,43 ----
>
>> >I agree changing Xos.h is probably the better fix, but it might break
>> >something elsewhere.  For 4.4, I think it's sufficient to simply #undef
>> >index & rindex before the #include <strings.h> here.
>
>> Is <strings.h> needed here for Solaris?  I didn't find it necessary for
>> the Solaris builds I've tried.
>
>It provides a prototype for keyboard-cfg.c's and monitor-cfg.c's use of
>bzero().  An alternative would be to change them to memset()'s.

Code that uses bzero() should include <X11/Xfuncs.h>, which in most
cases defines it in terms of memset().

Are there any platforms we build on that don't provide memset()?  Grepping
through the source tree, it is used in lots of places, so I'd assume that
it is safe to replace bzero() with memset().

Ideally the compatibility stuff in Xos.h and Xfuncs.h for things
like index(), rindex(), bcopy(), bzero(), etc would only be used for
older 3rd party apps, not for code in our source tree.

David
-- 
David Dawes
developer/release engineer                      The XFree86 Project
www.XFree86.org/~dawes
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to