delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/03/30/18:52:33

Message-Id: <199903302352.XAA55012@out2.ibm.net>
From: "Mark E." <snowball3 AT usa DOT net>
To: djgpp-workers AT delorie DOT com, dj AT delorie DOT com
Date: Tue, 30 Mar 1999 18:51:58 -0500
MIME-Version: 1.0
Subject: patches for locale.h and tcsetatr.c
X-mailer: Pegasus Mail for Win32 (v3.01d)
Reply-To: djgpp-workers AT delorie DOT com

The locale.h patch takes care of the redefinition warning that shows up 
when compiling C++ problems using libstdc++.

The second patch I'm not sure about. It patches tcsetatr.c to disable a 
section of code the enables/disables ctrl-c. The section of code in 
question is disabled in the tcsetatr.c in Bash 1.147. It's also disabled 
in Bash 2.03's tcsetatr.c, but I didn't include the file in the build because 
I thought  when I started the porting effort that the change was made in 
libc already. But comparing it to the CVS version proved that 
assumption wrong. Since the change has been in use for several 
years, and since Bash is the primary user of this code anyway, I think 
the change should be integrated into CVS. I discovered the difference 
while investigating the ctrl-c problem.

Mark

*** include/locale.h.orig	Sun Aug 31 16:43:14 1997
--- include/locale.h	Tue Mar 30 18:30:34 1999
***************
*** 15,20 ****
--- 15,23 ----
  #define LC_MONETARY	0x04
  #define LC_NUMERIC	0x08
  #define LC_TIME		0x10
+ 
+ /* Some programs think they know better... */
+ #undef NULL
  #define NULL		0
  
  struct lconv {
*** src/libc/posix/termios/tcsetatr.c.orig	Sun Sep 15 13:02:22 1996
--- src/libc/posix/termios/tcsetatr.c	Tue Mar 30 18:32:40 1999
***************
*** 49,60 ****
--- 49,62 ----
      case TCSANOW:
      case TCSAFLUSH:
      case TCSADRAIN:
+ #if 0
        /* enable or disable ^C */
        if ((__libc_tty_p->t_lflag & ISIG) && ! (termiosp->c_iflag & IGNBRK)
  	  && (termiosp->c_iflag & BRKINT) && (termiosp->c_cc[VINTR] == 
0x03))
  	__djgpp_set_ctrl_c (1);
        else
  	__djgpp_set_ctrl_c (0);
+ #endif
  
        /* copy the structure */
        __libc_tty_p->t_termios = *termiosp;

--- 
Mark Elbrecht, snowball3 AT usa DOT net
http://snowball.digitalspace.net/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019