Index: cygwin/autoload.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/autoload.cc,v retrieving revision 1.97 diff -u -p -p -U1 -r1.97 autoload.cc --- cygwin/autoload.cc 10 Mar 2005 16:59:55 -0000 1.97 +++ cygwin/autoload.cc 27 Mar 2005 01:31:00 -0000 @@ -179,3 +179,3 @@ struct dll_info void (*init) (); - char name[]; + __extension__ char name[]; }; @@ -186,3 +186,3 @@ struct func_info LONG decoration; - char name[]; + __extension__ char name[]; }; @@ -192,3 +192,3 @@ union retchain { - struct {long high; long low;}; + __extension__ struct {long high; long low;}; long long ll; Index: cygwin/cygheap.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/cygheap.cc,v retrieving revision 1.107 diff -u -p -p -U1 -r1.107 cygheap.cc --- cygwin/cygheap.cc 22 Mar 2005 19:00:27 -0000 1.107 +++ cygwin/cygheap.cc 27 Mar 2005 01:31:00 -0000 @@ -35,3 +35,3 @@ struct cygheap_entry struct cygheap_entry *next; - char data[0]; + __extension__ char data[0]; }; Index: cygwin/cygheap.h =================================================================== RCS file: /cvs/src/src/winsup/cygwin/cygheap.h,v retrieving revision 1.99 diff -u -p -p -U1 -r1.99 cygheap.h --- cygwin/cygheap.h 22 Mar 2005 19:00:27 -0000 1.99 +++ cygwin/cygheap.h 27 Mar 2005 01:31:01 -0000 @@ -42,3 +42,3 @@ struct _cmalloc_entry struct _cmalloc_entry *prev; - char data[0]; + __extension__ char data[0]; }; Index: cygwin/cygtls.h =================================================================== RCS file: /cvs/src/src/winsup/cygwin/cygtls.h,v retrieving revision 1.26 diff -u -p -p -U1 -r1.26 cygtls.h --- cygwin/cygtls.h 16 Mar 2005 17:07:32 -0000 1.26 +++ cygwin/cygtls.h 27 Mar 2005 01:31:02 -0000 @@ -2,3 +2,3 @@ - Copyright 2003, 2004 Red Hat, Inc. + Copyright 2003, 2004, 2005 Red Hat, Inc. @@ -144,3 +144,3 @@ struct _cygtls __stack_t stack[TLS_STACK_SIZE]; - unsigned padding[0]; + /*gentls_offsets*/__extension__/*gentls_offsets*/ unsigned padding[0]; Index: cygwin/dcrt0.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/dcrt0.cc,v retrieving revision 1.232 diff -u -p -p -U1 -r1.232 dcrt0.cc --- cygwin/dcrt0.cc 22 Mar 2005 19:00:28 -0000 1.232 +++ cygwin/dcrt0.cc 27 Mar 2005 01:31:02 -0000 @@ -280,3 +280,3 @@ globify (char *word, char **&argv, int & n = strlen (word); - char pattern[strlen (word) + ((dos_spec + 1) * n) + 1]; + __extension__ char pattern[strlen (word) + ((dos_spec + 1) * n) + 1]; @@ -506,3 +506,3 @@ alloc_stack (child_info_fork *ci) fork on Win95, but I don't know exactly why yet. DJ */ - volatile char b[ci->stacksize + 16384]; + __extension__ volatile char b[ci->stacksize + 16384]; Index: cygwin/devices.h =================================================================== RCS file: /cvs/src/src/winsup/cygwin/devices.h,v retrieving revision 1.16 diff -u -p -p -U1 -r1.16 devices.h --- cygwin/devices.h 23 Feb 2005 12:30:31 -0000 1.16 +++ cygwin/devices.h 27 Mar 2005 01:31:03 -0000 @@ -125,3 +125,3 @@ struct device _dev_t devn; - struct + __extension__ struct { Index: cygwin/dir.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/dir.cc,v retrieving revision 1.84 diff -u -p -p -U1 -r1.84 dir.cc --- cygwin/dir.cc 16 Mar 2005 21:20:56 -0000 1.84 +++ cygwin/dir.cc 27 Mar 2005 01:31:03 -0000 @@ -2,3 +2,3 @@ - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2005 Red Hat, Inc. @@ -115,3 +115,4 @@ readdir (DIR *dir) dir->__flags |= dirent_saw_dot_dot; - char *p, up[strlen (dir->__d_dirname) + 1]; + char *p; + __extension__ char up[strlen (dir->__d_dirname) + 1]; strcpy (up, dir->__d_dirname); Index: cygwin/environ.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/environ.cc,v retrieving revision 1.109 diff -u -p -p -U1 -r1.109 environ.cc --- cygwin/environ.cc 31 Jan 2005 20:02:36 -0000 1.109 +++ cygwin/environ.cc 27 Mar 2005 01:31:04 -0000 @@ -513,3 +513,3 @@ set_smbntsec (const char *buf) the registry. */ -static struct parse_thing +__extension__ static struct parse_thing { @@ -652,3 +652,3 @@ regopt (const char *name) char buf[CYG_MAX_PATH]; - char lname[strlen (name) + 1]; + __extension__ char lname[strlen (name) + 1]; strlwr (strcpy (lname, name)); @@ -794,3 +794,3 @@ getwinenveq (const char *name, size_t na char dum[1]; - char name0[namelen - 1]; + __extension__ char name0[namelen - 1]; memcpy (name0, name, namelen - 1); Index: cygwin/exceptions.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/exceptions.cc,v retrieving revision 1.225 diff -u -p -p -U1 -r1.225 exceptions.cc --- cygwin/exceptions.cc 20 Feb 2005 04:25:31 -0000 1.225 +++ cygwin/exceptions.cc 27 Mar 2005 01:31:05 -0000 @@ -153,3 +153,3 @@ open_stackdumpfile () p = myself->progname; - char corefile[strlen (p) + sizeof (".stackdump")]; + __extension__ char corefile[strlen (p) + sizeof (".stackdump")]; __small_sprintf (corefile, "%s.stackdump", p); Index: cygwin/fhandler.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/fhandler.cc,v retrieving revision 1.226 diff -u -p -p -U1 -r1.226 fhandler.cc --- cygwin/fhandler.cc 4 Mar 2005 13:54:59 -0000 1.226 +++ cygwin/fhandler.cc 27 Mar 2005 01:31:05 -0000 @@ -1448,3 +1448,3 @@ fhandler_dev_null::open (int flags, mode { - char posix[strlen (get_name ()) + 1]; + __extension__ char posix[strlen (get_name ()) + 1]; strcpy (posix, get_name ()); Index: cygwin/fhandler_disk_file.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/fhandler_disk_file.cc,v retrieving revision 1.110 diff -u -p -p -U1 -r1.110 fhandler_disk_file.cc --- cygwin/fhandler_disk_file.cc 22 Mar 2005 19:00:29 -0000 1.110 +++ cygwin/fhandler_disk_file.cc 27 Mar 2005 01:31:06 -0000 @@ -43,3 +43,3 @@ path_conv::ndisk_links (DWORD nNumberOfL int len = strlen (*this); - char fn[len + 3]; + __extension__ char fn[len + 3]; strcpy (fn, *this); Index: cygwin/fhandler_proc.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/fhandler_proc.cc,v retrieving revision 1.52 diff -u -p -p -U1 -r1.52 fhandler_proc.cc --- cygwin/fhandler_proc.cc 1 Feb 2005 17:16:14 -0000 1.52 +++ cygwin/fhandler_proc.cc 27 Mar 2005 01:31:07 -0000 @@ -522,3 +528,3 @@ format_proc_stat (char *destbuf, size_t - SYSTEM_PROCESSOR_TIMES spt[sbi.NumberProcessors]; + __extension__ SYSTEM_PROCESSOR_TIMES spt[sbi.NumberProcessors]; ret = NtQuerySystemInformation (SystemProcessorTimes, (PVOID) spt, @@ -994,3 +1004,3 @@ format_proc_partitions (char *destbuf, s { - char buf[buf_size]; + __extension__ char buf[buf_size]; memset (buf, 0, buf_size); Index: cygwin/fhandler_registry.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/fhandler_registry.cc,v retrieving revision 1.28 diff -u -p -p -U1 -r1.28 fhandler_registry.cc --- cygwin/fhandler_registry.cc 16 Mar 2005 21:20:56 -0000 1.28 +++ cygwin/fhandler_registry.cc 27 Mar 2005 01:31:07 -0000 @@ -101,3 +101,3 @@ fhandler_registry::exists () LONG error; - char buf[buf_size]; + __extension__ char buf[buf_size]; const char *file; @@ -279,3 +279,3 @@ fhandler_registry::readdir (DIR * dir) DWORD buf_size = CYG_MAX_PATH; - char buf[buf_size]; + __extension__ char buf[buf_size]; HANDLE handle; @@ -597,3 +597,3 @@ value_not_found: DWORD buf_size = CYG_MAX_PATH; - char buf[buf_size]; + __extension__ char buf[buf_size]; int index = 0; Index: cygwin/fhandler_socket.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/fhandler_socket.cc,v retrieving revision 1.158 diff -u -p -p -U1 -r1.158 fhandler_socket.cc --- cygwin/fhandler_socket.cc 24 Mar 2005 14:04:05 -0000 1.158 +++ cygwin/fhandler_socket.cc 27 Mar 2005 01:31:08 -0000 @@ -979,3 +982,3 @@ fhandler_socket::readv (const struct iov { - struct msghdr msg = + __extension__ struct msghdr msg = { @@ -1112,3 +1115,3 @@ fhandler_socket::recvmsg (struct msghdr { - WSABUF wsabuf[iovcnt]; + __extension__ WSABUF wsabuf[iovcnt]; unsigned long len = 0L; @@ -1172,3 +1175,3 @@ fhandler_socket::writev (const struct io { - struct msghdr msg = + __extension__ struct msghdr msg = { @@ -1319,3 +1322,3 @@ fhandler_socket::sendmsg (const struct m { - WSABUF wsabuf[iovcnt]; + __extension__ WSABUF wsabuf[iovcnt]; Index: cygwin/grp.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/grp.cc,v retrieving revision 1.91 diff -u -p -p -U1 -r1.91 grp.cc --- cygwin/grp.cc 20 Feb 2005 04:25:32 -0000 1.91 +++ cygwin/grp.cc 27 Mar 2005 01:31:09 -0000 @@ -357,3 +357,3 @@ internal_getgroups (int gidsetsize, __gi { - char buf[size]; + __extension__ char buf[size]; TOKEN_GROUPS *groups = (TOKEN_GROUPS *) buf; Index: cygwin/pinfo.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/pinfo.cc,v retrieving revision 1.167 diff -u -p -p -U1 -r1.167 pinfo.cc --- cygwin/pinfo.cc 8 Mar 2005 14:31:21 -0000 1.167 +++ cygwin/pinfo.cc 27 Mar 2005 01:31:10 -0000 @@ -447,3 +447,3 @@ _pinfo::commune_recv () extern int __argc_safe; - const char *argv[__argc_safe + 1]; + __extension__ const char *argv[__argc_safe + 1]; Index: cygwin/sec_acl.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/sec_acl.cc,v retrieving revision 1.43 diff -u -p -p -U1 -r1.43 sec_acl.cc --- cygwin/sec_acl.cc 16 Apr 2004 21:22:13 -0000 1.43 +++ cygwin/sec_acl.cc 27 Mar 2005 01:31:11 -0000 @@ -2,3 +2,3 @@ - Copyright 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. + Copyright 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc. @@ -796,3 +796,3 @@ aclfromtext32 (char *acltextp, int *) } - char buf[strlen (acltextp) + 1]; + __extension__ char buf[strlen (acltextp) + 1]; __aclent32_t lacl[MAX_ACL_ENTRIES]; Index: cygwin/security.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/security.cc,v retrieving revision 1.179 diff -u -p -p -U1 -r1.179 security.cc --- cygwin/security.cc 16 Mar 2005 21:52:05 -0000 1.179 +++ cygwin/security.cc 27 Mar 2005 01:31:11 -0000 @@ -2,3 +2,3 @@ - Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. + Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc. @@ -825,3 +827,3 @@ create_token (cygsid &usersid, user_grou LUID auth_luid = SYSTEM_LUID; - LARGE_INTEGER exp = { QuadPart:INT64_MAX }; + __extension__ LARGE_INTEGER exp = { QuadPart:INT64_MAX }; @@ -905,3 +907,3 @@ create_token (cygsid &usersid, user_grou /* Create a TOKEN_GROUPS list from the above retrieved list of sids. */ - char grps_buf[sizeof (ULONG) + tmp_gsids.count * sizeof (SID_AND_ATTRIBUTES)]; + __extension__ char grps_buf[sizeof (ULONG) + tmp_gsids.count * sizeof (SID_AND_ATTRIBUTES)]; new_tok_gsids = (PTOKEN_GROUPS) grps_buf; Index: cygwin/strace.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/strace.cc,v retrieving revision 1.48 diff -u -p -p -U1 -r1.48 strace.cc --- cygwin/strace.cc 12 Jan 2005 22:40:46 -0000 1.48 +++ cygwin/strace.cc 27 Mar 2005 01:31:12 -0000 @@ -2,3 +2,3 @@ - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2005 Red Hat, Inc. @@ -185,3 +186,3 @@ strace::write (unsigned category, const # define PREFIX (3 + 8 + 1 + 8 + 1) - char outbuf[PREFIX + 1 + count + 1]; + __extension__ char outbuf[PREFIX + 1 + count + 1]; # define outstuff (outbuf + 12) Index: cygwin/sync.h =================================================================== RCS file: /cvs/src/src/winsup/cygwin/sync.h,v retrieving revision 1.31 diff -u -p -p -U1 -r1.31 sync.h --- cygwin/sync.h 19 Mar 2005 21:45:15 -0000 1.31 +++ cygwin/sync.h 27 Mar 2005 01:31:12 -0000 @@ -2,3 +2,3 @@ - Copyright 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. + Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc. @@ -52,21 +52,26 @@ public: /* Use a statically allocated buffer as the storage for a muto */ -#define new_muto(__name) \ -({ \ - static muto __name##_storage __attribute__((nocommon)) __attribute__((section(".data_cygwin_nocopy1"))); \ - __name = __name##_storage.init (#__name); \ -}) +#define new_muto(__name) \ + __extension__ ({ \ + static muto __name##_storage __attribute__((nocommon)) \ + __attribute__((section(".data_cygwin_nocopy1"))); \ + __name = __name##_storage.init(#__name); \ + }) /* Use a statically allocated buffer as the storage for a muto */ -#define new_muto1(__name, __storage) \ -({ \ - static muto __storage __attribute__((nocommon)) __attribute__((section(".data_cygwin_nocopy1"))); \ - __name = __storage.init (#__name); \ -}) +#define new_muto1(__name, __storage) \ + __extension__ ({ \ + static muto __storage __attribute__((nocommon)) \ + __attribute__((section(".data_cygwin_nocopy1"))); \ + __name = __storage.init(#__name); \ + }) /* Use a statically allocated buffer as the storage for a muto */ -#define new_muto_name(__var, __name) \ -({ \ - static muto __var##_storage __attribute__((nocommon)) __attribute__((section(".data_cygwin_nocopy1"))); \ - __var = __var##_storage.init (__name); \ -}) -#endif /*_SYNC_H*/ +#define new_muto_name(__var, __name) \ + __extension__ ({ \ + static muto __var##_storage __attribute__((nocommon)) \ + __attribute__((section(".data_cygwin_nocopy1"))); \ + __var = __var##_storage.init(__name); \ + }) + + +#endif /* !_SYNC_H */ Index: cygwin/syscalls.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/syscalls.cc,v retrieving revision 1.368 diff -u -p -p -U1 -r1.368 syscalls.cc --- cygwin/syscalls.cc 10 Mar 2005 17:02:52 -0000 1.368 +++ cygwin/syscalls.cc 27 Mar 2005 01:31:13 -0000 @@ -380,3 +380,3 @@ read (int fd, void *ptr, size_t len) { - const iovec iov = + __extension__ const iovec iov = { @@ -394,3 +394,3 @@ write (int fd, const void *ptr, size_t l { - const struct iovec iov = + __extension__ const struct iovec iov = { @@ -2608,7 +2608,9 @@ static unsigned utix = 0; #define nutdbuf (sizeof (utmp_data_buf) / sizeof (utmp_data_buf[0])) -#define utmp_data ({ \ - if (utix > nutdbuf) \ - utix = 0; \ - utmp_data_buf + utix++; \ -}) +#define utmp_data \ + __extension__ ({ \ + if (utix > nutdbuf) { \ + utix = 0; \ + } \ + utmp_data_buf + utix++; \ + }) Index: cygwin/wincap.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/wincap.cc,v retrieving revision 1.36 diff -u -p -p -U1 -r1.36 wincap.cc --- cygwin/wincap.cc 28 Feb 2005 13:11:50 -0000 1.36 +++ cygwin/wincap.cc 27 Mar 2005 01:31:14 -0000 @@ -13,3 +13,3 @@ details. */ -static NO_COPY wincaps wincap_unknown = { +__extension__ static NO_COPY wincaps wincap_unknown = { lock_file_highword:0x0, @@ -62,3 +62,3 @@ static NO_COPY wincaps wincap_unknown = -static NO_COPY wincaps wincap_95 = { +__extension__ static NO_COPY wincaps wincap_95 = { lock_file_highword:0x0, @@ -111,3 +111,3 @@ static NO_COPY wincaps wincap_95 = { -static NO_COPY wincaps wincap_95osr2 = { +__extension__ static NO_COPY wincaps wincap_95osr2 = { lock_file_highword:0x0, @@ -160,3 +160,3 @@ static NO_COPY wincaps wincap_95osr2 = { -static NO_COPY wincaps wincap_98 = { +__extension__ static NO_COPY wincaps wincap_98 = { lock_file_highword:0x0, @@ -209,3 +209,3 @@ static NO_COPY wincaps wincap_98 = { -static NO_COPY wincaps wincap_98se = { +__extension__ static NO_COPY wincaps wincap_98se = { lock_file_highword:0x0, @@ -258,3 +258,3 @@ static NO_COPY wincaps wincap_98se = { -static NO_COPY wincaps wincap_me = { +__extension__ static NO_COPY wincaps wincap_me = { lock_file_highword:0x0, @@ -307,3 +307,3 @@ static NO_COPY wincaps wincap_me = { -static NO_COPY wincaps wincap_nt3 = { +__extension__ static NO_COPY wincaps wincap_nt3 = { lock_file_highword:UINT32_MAX, @@ -356,3 +356,3 @@ static NO_COPY wincaps wincap_nt3 = { -static NO_COPY wincaps wincap_nt4 = { +__extension__ static NO_COPY wincaps wincap_nt4 = { lock_file_highword:UINT32_MAX, @@ -405,3 +405,3 @@ static NO_COPY wincaps wincap_nt4 = { -static NO_COPY wincaps wincap_nt4sp4 = { +__extension__ static NO_COPY wincaps wincap_nt4sp4 = { lock_file_highword:UINT32_MAX, @@ -454,3 +454,3 @@ static NO_COPY wincaps wincap_nt4sp4 = { -static NO_COPY wincaps wincap_2000 = { +__extension__ static NO_COPY wincaps wincap_2000 = { lock_file_highword:UINT32_MAX, @@ -503,3 +503,3 @@ static NO_COPY wincaps wincap_2000 = { -static NO_COPY wincaps wincap_xp = { +__extension__ static NO_COPY wincaps wincap_xp = { lock_file_highword:UINT32_MAX, @@ -552,3 +552,3 @@ static NO_COPY wincaps wincap_xp = { -static NO_COPY wincaps wincap_2003 = { +__extension__ static NO_COPY wincaps wincap_2003 = { lock_file_highword:UINT32_MAX, Index: cygwin/winsup.h =================================================================== RCS file: /cvs/src/src/winsup/cygwin/winsup.h,v retrieving revision 1.154 diff -u -p -p -U1 -r1.154 winsup.h --- cygwin/winsup.h 16 Mar 2005 21:52:05 -0000 1.154 +++ cygwin/winsup.h 27 Mar 2005 01:31:14 -0000 @@ -149,7 +149,7 @@ extern HANDLE tty_mutex; /* Used when treating / and \ as equivalent. */ -#define isdirsep(ch) \ - ({ \ - char __c = (ch); \ - ((__c) == '/' || (__c) == '\\'); \ - }) +#define isdirsep(ch) \ + __extension__ ({ \ + char __c = (ch); \ + ((__c) == '/' || (__c) == '\\'); \ + }) Index: cygwin/include/sys/termios.h =================================================================== RCS file: /cvs/src/src/winsup/cygwin/include/sys/termios.h,v retrieving revision 1.9 diff -u -p -p -U1 -r1.9 termios.h --- cygwin/include/sys/termios.h 9 Mar 2004 02:51:26 -0000 1.9 +++ cygwin/include/sys/termios.h 27 Mar 2005 01:31:15 -0000 @@ -2,3 +2,3 @@ - Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005 Red Hat, Inc. @@ -256,48 +256,53 @@ struct termios { -#ifdef CYGWIN_VERSION_DLL_IS_OLD_TERMIOS -#ifdef __GNUC__ -# define __tonew_termios(ti) \ - ({ \ - struct termios *__newti; \ - \ - if (!CYGWIN_VERSION_DLL_IS_OLD_TERMIOS) \ - __newti = (struct termios *) ti; \ - else \ - { \ - __newti = (struct termios *) alloca(sizeof(struct termios)); \ - __newti->c_iflag = ((struct __oldtermios *)ti)->c_iflag; \ - __newti->c_oflag = ((struct __oldtermios *)ti)->c_oflag; \ - __newti->c_cflag = ((struct __oldtermios *)ti)->c_cflag; \ - __newti->c_lflag = ((struct __oldtermios *)ti)->c_lflag; \ - __newti->c_line = ((struct __oldtermios *)ti)->c_line; \ - __newti->c_ispeed = ((struct __oldtermios *)ti)->c_ispeed; \ - __newti->c_ospeed = ((struct __oldtermios *)ti)->c_ospeed; \ - memcpy (__newti->c_cc, ((struct __oldtermios *)ti)->c_cc, sizeof(__newti->c_cc)); \ - } \ - __newti; \ - }) - -# define __makenew_termios(ti) \ - (CYGWIN_VERSION_DLL_IS_OLD_TERMIOS ? \ - (struct termios *) alloca (sizeof (struct termios)) : (ti)) - -# define __toapp_termios(toti, fromti) \ - ({ \ - if (!CYGWIN_VERSION_DLL_IS_OLD_TERMIOS) \ - toti = fromti; \ - else \ - { \ - ((struct __oldtermios *)toti)->c_iflag = fromti->c_iflag; \ - ((struct __oldtermios *)toti)->c_oflag = fromti->c_oflag; \ - ((struct __oldtermios *)toti)->c_cflag = fromti->c_cflag; \ - ((struct __oldtermios *)toti)->c_lflag = fromti->c_lflag; \ - ((struct __oldtermios *)toti)->c_line = fromti->c_line; \ - ((struct __oldtermios *)toti)->c_ispeed = fromti->c_ispeed; \ - ((struct __oldtermios *)toti)->c_ospeed = fromti->c_ospeed; \ - memcpy (((struct __oldtermios*)toti)->c_cc, fromti->c_cc, sizeof(fromti->c_cc)); \ - } \ - toti; \ - }) -#endif /*__GNUC__*/ -#endif +#if defined(CYGWIN_VERSION_DLL_IS_OLD_TERMIOS) +# if defined(__GNUC__) +# define __makenew_termios(ti) \ + (CYGWIN_VERSION_DLL_IS_OLD_TERMIOS ? \ + (struct termios *) alloca (sizeof (struct termios)) : (ti)) + +# define __tonew_termios(ti) __extension__ ({ \ + struct termios *__newti; \ + \ + if (!CYGWIN_VERSION_DLL_IS_OLD_TERMIOS) \ + { \ + __newti = (struct termios *) ti; \ + } \ + else \ + { \ + __newti = (struct termios *) alloca(sizeof(struct termios)); \ + __newti->c_iflag = ((struct __oldtermios *)ti)->c_iflag; \ + __newti->c_oflag = ((struct __oldtermios *)ti)->c_oflag; \ + __newti->c_cflag = ((struct __oldtermios *)ti)->c_cflag; \ + __newti->c_lflag = ((struct __oldtermios *)ti)->c_lflag; \ + __newti->c_line = ((struct __oldtermios *)ti)->c_line; \ + __newti->c_ispeed = ((struct __oldtermios *)ti)->c_ispeed; \ + __newti->c_ospeed = ((struct __oldtermios *)ti)->c_ospeed; \ + memcpy (__newti->c_cc, \ + ((struct __oldtermios *)ti)->c_cc, \ + sizeof(__newti->c_cc)); \ + } \ + __newti; \ + }) + +# define __toapp_termios(toti, fromti) __extension__ ({ \ + if (!CYGWIN_VERSION_DLL_IS_OLD_TERMIOS) \ + { \ + toti = fromti; \ + } \ + else \ + { \ + ((struct __oldtermios *)toti)->c_iflag = fromti->c_iflag; \ + ((struct __oldtermios *)toti)->c_oflag = fromti->c_oflag; \ + ((struct __oldtermios *)toti)->c_cflag = fromti->c_cflag; \ + ((struct __oldtermios *)toti)->c_lflag = fromti->c_lflag; \ + ((struct __oldtermios *)toti)->c_line = fromti->c_line; \ + ((struct __oldtermios *)toti)->c_ispeed = fromti->c_ispeed; \ + ((struct __oldtermios *)toti)->c_ospeed = fromti->c_ospeed; \ + memcpy (((struct __oldtermios*)toti)->c_cc, \ + fromti->c_cc, sizeof(fromti->c_cc)); \ + } \ + toti; \ + }) +# endif /* __GNUC__ */ +#endif /* CYGWIN_VERSION_DLL_IS_OLD_TERMIOS */