Probelms with isdigit() et al with libc-5.2.11

Probelms with isdigit() et al with libc-5.2.11

Post by Graham Biswe » Tue, 14 Nov 1995 04:00:00



Hello,

Yesterday, I spent  several frustrating hours  trying to build  sendmail
8.7.1.  It compiles cleanly, but  cannot parse my sendmail.cf file  when
run, giving "bad ruleset" type errors.  My current copy of  sendmail-8.7
runs without any problems.  On recompiling sendmail-8.7, this new binary
has the  same problems  with sendmail.cf,  the only  difference  between
these two versions of 8.7 being that the working one was compiled on  my
system  with  libc-5.0.9  installed,  the  broken  version  having  been
compiled with libc-5.2.11 installed.

After much playing about, I can  get sendmail to compile & run  cleanly,
but to do  so, I  have had  to use  the include  files from  libc-5.0.9.
(Sorry I only currently have these two  library sets to play with).   To
do this, I  have left the  5.2.11 tree  installed on my  system, &  have
added a "-I/var/tmp/usr/include"  line to the  sendmail Makefile to  use
the older include files.

Looking into  this  further,  it  would appear  that  the  problem  with
sendmail is  being caused  by  the ctype  macros.   The  following  code
demonstrates the problem :

#include <ctype.h>
main()
{
        unsigned char *p = "6";
        printf("isdigit returns %d\n", isdigit(*p));

Quote:}

Compile this code with "cc -o t1 t.c", & "cc -o t2 -I/var/tmp/usr/include t.c".
Running both gives:

tarka:/tmp$ ./t1
isdigit returns 0
tarka:/tmp$ ./t2
isdigit returns 1

My system configuration:

kernel 1.3.40
binutils-2.5.2l.20.bin.tar.gz
gcc-2.7.0.bin.tar.gz
ld.so-1.7.10.tar.gz
libc-5.2.11.bin.tar.gz

Anyone any ideas ?, my system is running fine apart from this problem.

BTW, I also had  the "readv" problem with  5.2.11, until I upgraded  the
kernel to 1.3.40, it's been fine since then.
--
Cheers.
________________________________________________________________________________
  Graham Biswell                                          Worthing, Sussex, UK

 
 
 

Probelms with isdigit() et al with libc-5.2.11

Post by Ulrich Drepp » Thu, 16 Nov 1995 04:00:00


   #include <ctype.h>
   main()
   {
           unsigned char *p = "6";
           printf("isdigit returns %d\n", isdigit(*p));
   }

   Compile this code with "cc -o t1 t.c", & "cc -o t2 -I/var/tmp/usr/include t.c".
   Running both gives:

   tarka:/tmp$ ./t1
   isdigit returns 0
   tarka:/tmp$ ./t2
   isdigit returns 1

   My system configuration:

   kernel 1.3.40
   binutils-2.5.2l.20.bin.tar.gz
   gcc-2.7.0.bin.tar.gz
   ld.so-1.7.10.tar.gz
   libc-5.2.11.bin.tar.gz

   Anyone any ideas ?, my system is running fine apart from this problem.

The locale code in libc-5.0.x and libc-5.2.x should be the same,
including the file format for the locale description files.  Were both
of your libc compiled by HJ or did you do it yourself?

In any case running strace with both programs would help me to find a bug.

--
-- Uli
________---------------------------------------------------------------
\      / Ulrich Drepper / Univ. at Karlsruhe, Germany / CS Dept. / IPD


   \/1.3.41 ------------------------------------------ Germany --------

 
 
 

Probelms with isdigit() et al with libc-5.2.11

Post by Graham Biswe » Tue, 21 Nov 1995 04:00:00


: #include <ctype.h>
: main()
: {
:       unsigned char *p = "6";
:       printf("isdigit returns %d\n", isdigit(*p));
: }
:
: Compile this code with "cc -o t1 t.c", & "cc -o t2 -I/var/tmp/usr/include t.c".
: Running both gives:
:
: tarka:/tmp$ ./t1
: isdigit returns 0
: tarka:/tmp$ ./t2
: isdigit returns 1

After some more experimenting I found what was causing isdigit() to break.
Compiling the above code with "cc -I/usr/include -o t t.c", fixed the problem,
so I added the "-v" switch to cc. This showed that cc is searching the following
directories in this order :

#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/i486-linux/include
 /usr/lib/gcc-lib/i486-linux/2.7.0/include
 /usr/include

In /usr/i486-linux/include was an old copy of ctype.h. Removing this header file
fixed the problem. Now to check all the other files in that directory .....

--
Cheers.
________________________________________________________________________________
  Graham Biswell                                          Worthing, Sussex, UK

 
 
 

1. Building shared libs with mkimage 2.11 & libc 4.5.21

  Yes, you must include libgcc when building a shared library image.
But, since libgcc.a is no longer distributed with libc (it now
comes with gcc itself), instead of adding a -lgcc to the compile
line, add a `gcc --print` (with quotes) to the compile line.

  This is definitely a FAQ.  I don't have a current version of the
GCC-linux FAQ, to check if this problem is in there.  If it isn't,
the maintainer should add it.

- Matt
--
"Still looking for a funky quote..."
Matthew Ryan

2. How do I copy All my users from Server to Server

3. Why no real-support for ext2fs by DriveImage et al. ?

4. adding smbfs

5. Microsoft's Cynical Adherence to Standards (Java et al)

6. Obtaining libUil.so.2?

7. Yet another request for SOUND help et. al.

8. Q: How do I get from the latest stable kernel version to the latest prepatch version ?

9. Log auditing software, logcheck et al..

10. Crack5: Alternate dictionaries, et al

11. dlopen et. al emulator

12. Heads, et al...Confused in NF, Canada...*smile*

13. ps/top et al vs. linux-2.1.x