From: "Mark E." To: djgpp-workers AT delorie DOT com Date: Wed, 14 Jun 2000 00:07:34 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: patch for _get_dev_info return bits Message-ID: <3946CCC6.28254.303378@localhost> X-mailer: Pegasus Mail for Win32 (v3.12c) Reply-To: djgpp-workers AT delorie DOT com I've revised my patch to move the #defines into their own private header file. *** /dev/null Tue Jun 13 23:42:49 2000 --- include/libc/getdinfo.h Tue Jun 13 23:42:44 2000 *************** *** 0 **** --- 1,25 ---- + /* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */ + #ifndef __dj_include_libc_getdinfo_h__ + #define __dj_include_libc_getdinfo_h__ + + #ifndef __dj_ENFORCE_ANSI_FREESTANDING + + #ifndef __STRICT_ANSI__ + + #ifndef _POSIX_SOURCE + + /* For parsing the bits returned by _get_dev_info. */ + #define _DEV_STDIN 0x0001 + #define _DEV_STDOUT 0x0002 + #define _DEV_NUL 0x0004 + #define _DEV_CLOCK 0x0008 + #define _DEV_RAW 0x0020 + #define _DEV_CDEV 0x0080 + #define _DEV_NO_INHERIT 0x1000 /* Undocumented. */ + #define _DEV_IOCTRL 0x4000 + + #endif /* !_POSIX_SOURCE */ + #endif /* !__STRICT_ANSI__ */ + #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + + #endif Index: djgpp/src/libc/posix/termios/tcdrain.c =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/posix/termios/tcdrain.c,v retrieving revision 1.2 diff -c -p -r1.2 tcdrain.c *** tcdrain.c 1996/09/15 17:02:22 1.2 --- tcdrain.c 2000/06/14 03:44:05 *************** *** 1,17 **** /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ #include #include #include #include #include ! ! #define _DEV_STDIN 0x0001 ! #define _DEV_STDOUT 0x0002 ! #define _DEV_NUL 0x0004 ! #define _DEV_CLOCK 0x0008 ! #define _DEV_RAW 0x0020 ! #define _DEV_CDEV 0x0080 ! #define _DEV_IOCTRL 0x4000 int tcdrain (int handle) --- 1,11 ---- + /* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ #include #include #include #include #include ! #include int tcdrain (int handle) Index: djgpp/src/libc/posix/termios/tcflow.c =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/posix/termios/tcflow.c,v retrieving revision 1.2 diff -c -p -r1.2 tcflow.c *** tcflow.c 1996/09/15 17:02:22 1.2 --- tcflow.c 2000/06/14 03:44:36 *************** *** 1,3 **** --- 1,4 ---- + /* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ #include #include *************** *** 6,19 **** #include #include #include ! ! #define _DEV_STDIN 0x0001 ! #define _DEV_STDOUT 0x0002 ! #define _DEV_NUL 0x0004 ! #define _DEV_CLOCK 0x0008 ! #define _DEV_RAW 0x0020 ! #define _DEV_CDEV 0x0080 ! #define _DEV_IOCTRL 0x4000 int tcflow (int handle, int action) --- 7,13 ---- #include #include #include ! #include int tcflow (int handle, int action) Index: djgpp/src/libc/posix/termios/tcflush.c =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/posix/termios/tcflush.c,v retrieving revision 1.4 diff -c -p -r1.4 tcflush.c *** tcflush.c 1999/06/03 17:27:40 1.4 --- tcflush.c 2000/06/14 03:45:12 *************** *** 1,3 **** --- 1,4 ---- + /* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ #include *************** *** 6,21 **** #include #include #include #include #include - - #define _DEV_STDIN 0x0001 - #define _DEV_STDOUT 0x0002 - #define _DEV_NUL 0x0004 - #define _DEV_CLOCK 0x0008 - #define _DEV_RAW 0x0020 - #define _DEV_CDEV 0x0080 - #define _DEV_IOCTRL 0x4000 static int getkey_nowait (void) --- 7,15 ---- #include #include #include + #include #include #include static int getkey_nowait (void) Index: djgpp/src/libc/posix/termios/tcgetatr.c =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/posix/termios/tcgetatr.c,v retrieving revision 1.2 diff -c -p -r1.2 tcgetatr.c *** tcgetatr.c 1996/09/15 17:02:22 1.2 --- tcgetatr.c 2000/06/14 03:45:27 *************** *** 1,3 **** --- 1,4 ---- + /* Copyrifht (C) 2000 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ #include #include *************** *** 5,18 **** #include #include #include ! ! #define _DEV_STDIN 0x0001 ! #define _DEV_STDOUT 0x0002 ! #define _DEV_NUL 0x0004 ! #define _DEV_CLOCK 0x0008 ! #define _DEV_RAW 0x0020 ! #define _DEV_CDEV 0x0080 ! #define _DEV_IOCTRL 0x4000 int tcgetattr (int handle, struct termios *termiosp) --- 6,12 ---- #include #include #include ! #include int tcgetattr (int handle, struct termios *termiosp) Index: djgpp/src/libc/posix/termios/tcsetatr.c =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/posix/termios/tcsetatr.c,v retrieving revision 1.4 diff -c -p -r1.4 tcsetatr.c *** tcsetatr.c 1999/06/03 17:27:40 1.4 --- tcsetatr.c 2000/06/14 03:45:35 *************** *** 1,3 **** --- 1,4 ---- + /* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ #include *************** *** 7,20 **** #include #include #include ! ! #define _DEV_STDIN 0x0001 ! #define _DEV_STDOUT 0x0002 ! #define _DEV_NUL 0x0004 ! #define _DEV_CLOCK 0x0008 ! #define _DEV_RAW 0x0020 ! #define _DEV_CDEV 0x0080 ! #define _DEV_IOCTRL 0x4000 int tcsetattr (int handle, int action, const struct termios *termiosp) --- 8,14 ---- #include #include #include ! #include int tcsetattr (int handle, int action, const struct termios *termiosp) Index: djgpp/src/libc/posix/termios/tcsndbrk.c =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/posix/termios/tcsndbrk.c,v retrieving revision 1.2 diff -c -p -r1.2 tcsndbrk.c *** tcsndbrk.c 1996/09/15 17:02:22 1.2 --- tcsndbrk.c 2000/06/14 03:45:50 *************** *** 1,3 **** --- 1,4 ---- + /* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ #include #include *************** *** 5,18 **** #include #include #include ! ! #define _DEV_STDIN 0x0001 ! #define _DEV_STDOUT 0x0002 ! #define _DEV_NUL 0x0004 ! #define _DEV_CLOCK 0x0008 ! #define _DEV_RAW 0x0020 ! #define _DEV_CDEV 0x0080 ! #define _DEV_IOCTRL 0x4000 int tcsendbreak (int handle, int duration) --- 6,12 ---- #include #include #include ! #include int tcsendbreak (int handle, int duration) Index: djgpp/src/libc/posix/termios/tminit.c =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/posix/termios/tminit.c,v retrieving revision 1.7 diff -c -p -r1.7 tminit.c *** tminit.c 1999/06/03 17:27:40 1.7 --- tminit.c 2000/06/14 03:46:05 *************** *** 1,3 **** --- 1,4 ---- + /* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ /* *************** *** 23,36 **** #include #include #include ! ! #define _DEV_STDIN 0x0001 ! #define _DEV_STDOUT 0x0002 ! #define _DEV_NUL 0x0004 ! #define _DEV_CLOCK 0x0008 ! #define _DEV_RAW 0x0020 ! #define _DEV_CDEV 0x0080 ! #define _DEV_IOCTRL 0x4000 #define CPMEOF 0x1a /* Ctrl+Z */ --- 24,30 ---- #include #include #include ! #include #define CPMEOF 0x1a /* Ctrl+Z */