Possible bug in slackware 3.0's new libraries

Possible bug in slackware 3.0's new libraries

Post by Sam Trenhol » Fri, 01 Dec 1995 04:00:00



I have found a possible bug in the new libraries in Slackware 3.0.

Namely, the following program, without WORK_AROUND defined, works
improperly. It should exibit the same behavior irregardless of the
definition of WORK_AROUND, and infact did act this way until I upgraded
to Slackware 3.0:

#include <dirent.h>
#include <sys/wait.h>
#include <stdio.h>
#include <signal.h>
#include <termios.h>

main()
        {
        FILE *tty;
        char ljb;

        if((tty = fopen(ctermid(0),"rb+")) == NULL)
                return -1;

        fprintf(tty,"Hit control-L to exit.\n");

        while(ljb != EOF && ljb != '\f')
                {
                ljb = getc(tty);
#ifndef WORK_AROUND
                fprintf(tty,"%d\n",ljb);
#else
                printf("%d\n",ljb);
#endif
                }

        close(tty);

        }
--
- Any opinions expressed in this message are strictly my own opinions -

I use Linux at home. For more information, look at http://www.linux.org

 
 
 

Possible bug in slackware 3.0's new libraries

Post by na8570600-Schoonov » Tue, 05 Dec 1995 04:00:00



>I have found a possible bug in the new libraries in Slackware 3.0.

>Namely, the following program, without WORK_AROUND defined, works
>improperly. It should exibit the same behavior irregardless of the
>definition of WORK_AROUND, and infact did act this way until I upgraded
>to Slackware 3.0:

>#include <dirent.h>
>#include <sys/wait.h>
>#include <stdio.h>
>#include <signal.h>
>#include <termios.h>

>main()
>        {
>        FILE *tty;
>        char ljb;

>        if((tty = fopen(ctermid(0),"rb+")) == NULL)
>                return -1;

>        fprintf(tty,"Hit control-L to exit.\n");

>        while(ljb != EOF && ljb != '\f')
>                {
>                ljb = getc(tty);
>#ifndef WORK_AROUND
>                fprintf(tty,"%d\n",ljb);
>#else
>                printf("%d\n",ljb);
>#endif
>                }

>        close(tty);

>        }
>--
>- Any opinions expressed in this message are strictly my own opinions -

>I use Linux at home. For more information, look at http://www.linux.org

Try changing ljb from a char to an int variable.  Two reasons why.  1) getc
returns an int, so that EOF can be distinguished from a binary character 0xff,
and 2) you're printing using an integer format (%d).  It does surprise me that
you get different results between the two though.

---
                                J. P. Schoonover

 
 
 

1. can't load library 'libgdbm.so.2' with Slackware 3.0 installation


Hmmm that's weard. Why didn't they put such  importend stuff in the A
series...Thanks. I'll give it a try..
Mybe it's the same for terminfo? I get a message "terminfo not defined:
can't open /usr/lib/terminfo/c/con80x25"
It doesn't exists so thats right, but when copying them from the CD it's
not working either :-(

Greetings,
               Sjoerd Krol


2. Apache 403/forbidden error

3. scsi controller in powermac 7300

4. Installing 'X' from SlackWare 2.2.0 in a SlackWare 3.0 system?

5. Best Security Stories of 95 Contest

6. Slackware 3.0 Sendmail (I'm missing a library)

7. X is dead

8. What's new in slackware 3.0 ?

9. New X library causes `Can't load library libX....' problems!?

10. "Can't find shared library 'libc.so.3.0'"

11. Possible Bug: Kernel Parameter 'scsihosts' Doesn't Work In 2.4.3?

12. Possible BIG-bug in Woody 3.0 r1: fsck