From 398476acd2dca8d68044e1b6e68eb41a16086f79 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Mon, 26 Aug 2019 13:38:31 -0400 Subject: [PATCH 001/520] Cygwin: get_posix_access: avoid negative subscript Don't refer to lacl[pos] unless we know that pos >= 0. --- winsup/cygwin/sec_acl.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc index 933bfa69d..67749d7b1 100644 --- a/winsup/cygwin/sec_acl.cc +++ b/winsup/cygwin/sec_acl.cc @@ -807,9 +807,9 @@ get_posix_access (PSECURITY_DESCRIPTOR psd, lacl[pos].a_id = ACL_UNDEFINED_ID; lacl[pos].a_perm = CYG_ACE_MASK_TO_POSIX (ace->Mask); aclsid[pos] = well_known_null_sid; + has_class_perm = true; + class_perm = lacl[pos].a_perm; } - has_class_perm = true; - class_perm = lacl[pos].a_perm; } if (ace->Header.AceFlags & SUB_CONTAINERS_AND_OBJECTS_INHERIT) { @@ -820,9 +820,9 @@ get_posix_access (PSECURITY_DESCRIPTOR psd, lacl[pos].a_id = ACL_UNDEFINED_ID; lacl[pos].a_perm = CYG_ACE_MASK_TO_POSIX (ace->Mask); aclsid[pos] = well_known_null_sid; + has_def_class_perm = true; + def_class_perm = lacl[pos].a_perm; } - has_def_class_perm = true; - def_class_perm = lacl[pos].a_perm; } } } From 169d65a5774acc76ce3f3feeedcbae7405aa9b57 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 28 Aug 2019 03:04:02 +0900 Subject: [PATCH 002/520] Cygwin: pty: add pseudo console support. - Support pseudo console in PTY. Pseudo console is a new feature in Windows 10 1809, which provides console APIs on virtual terminal. With this patch, native console applications can work in PTYs such as mintty, ssh, gnu screen or tmux. --- winsup/cygwin/dtable.cc | 51 + winsup/cygwin/fhandler.h | 45 +- winsup/cygwin/fhandler_console.cc | 32 + winsup/cygwin/fhandler_tty.cc | 1765 ++++++++++++++++++++++++- winsup/cygwin/fork.cc | 24 + winsup/cygwin/init.cc | 1 + winsup/cygwin/select.cc | 22 +- winsup/cygwin/spawn.cc | 61 + winsup/cygwin/strace.cc | 24 + winsup/cygwin/tty.cc | 8 + winsup/cygwin/tty.h | 24 +- winsup/utils/cygwin-console-helper.cc | 14 +- 12 files changed, 2016 insertions(+), 55 deletions(-) diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 636221a77..ba5d16206 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -147,6 +147,36 @@ dtable::get_debugger_info () void dtable::stdio_init () { + bool need_fixup_handle = false; + fhandler_pty_slave *ptys = NULL; + bool is_pty[3] = {false, false, false}; + for (int fd = 0; fd < 3; fd ++) + { + fhandler_base *fh = cygheap->fdtab[fd]; + if (fh && fh->get_major () == DEV_PTYS_MAJOR) + { + ptys = (fhandler_pty_slave *) fh; + if (ptys->getPseudoConsole ()) + { + is_pty[fd] = true; + bool attached = !!fhandler_console::get_console_process_id + (ptys->getHelperProcessId (), true); + if (!attached) + { + /* Not attached to pseudo console in fork() or spawn() + by some reason. This happens if the executable is + a windows GUI binary, such as mintty. */ + FreeConsole (); + AttachConsole (ptys->getHelperProcessId ()); + need_fixup_handle = true; + } + ptys->reset_switch_to_pcon (); + } + } + } + if (need_fixup_handle) + goto fixup_handle; + if (myself->cygstarted || ISSTATE (myself, PID_CYGPARENT)) { tty_min *t = cygwin_shared->tty.get_cttyp (); @@ -155,6 +185,27 @@ dtable::stdio_init () return; } +fixup_handle: + if (need_fixup_handle) + { + HANDLE h; + h = CreateFile ("CONIN$", GENERIC_READ, FILE_SHARE_READ, + NULL, OPEN_EXISTING, 0, 0); + if (is_pty[0]) + { + SetStdHandle (STD_INPUT_HANDLE, h); + ptys->set_handle (h); + } + h = CreateFile ("CONOUT$", GENERIC_WRITE, FILE_SHARE_WRITE, + NULL, OPEN_EXISTING, 0, 0); + if (is_pty[1]) + SetStdHandle (STD_OUTPUT_HANDLE, h); + if (is_pty[2]) + SetStdHandle (STD_ERROR_HANDLE, h); + if (is_pty[1] || is_pty[2]) + ptys->set_output_handle (h); + } + HANDLE in = GetStdHandle (STD_INPUT_HANDLE); HANDLE out = GetStdHandle (STD_OUTPUT_HANDLE); HANDLE err = GetStdHandle (STD_ERROR_HANDLE); diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 794948dba..c75e40c0a 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -2019,6 +2019,7 @@ private: static bool need_invisible (); static void free_console (); static const char *get_nonascii_key (INPUT_RECORD& input_rec, char *); + static DWORD get_console_process_id (DWORD pid, bool match); fhandler_console (void *) {} @@ -2051,8 +2052,8 @@ class fhandler_pty_common: public fhandler_termios public: fhandler_pty_common () : fhandler_termios (), - output_mutex (NULL), - input_mutex (NULL), input_available_event (NULL) + output_mutex (NULL), input_mutex (NULL), + input_available_event (NULL) { pc.file_attributes (FILE_ATTRIBUTE_NORMAL); } @@ -2089,14 +2090,29 @@ class fhandler_pty_common: public fhandler_termios return fh; } + bool attach_pcon_in_fork (void) + { + return get_ttyp ()->attach_pcon_in_fork; + } + DWORD getHelperProcessId (void) + { + return get_ttyp ()->HelperProcessId; + } + HPCON getPseudoConsole (void) + { + return get_ttyp ()->hPseudoConsole; + } + protected: - BOOL process_opost_output (HANDLE h, const void *ptr, ssize_t& len, bool is_echo); + BOOL process_opost_output (HANDLE h, + const void *ptr, ssize_t& len, bool is_echo); + bool check_switch_to_pcon (void); }; class fhandler_pty_slave: public fhandler_pty_common { HANDLE inuse; // used to indicate that a tty is in use - HANDLE output_handle_cyg; + HANDLE output_handle_cyg, io_handle_cyg; /* Helper functions for fchmod and fchown. */ bool fch_open_handles (bool chown); @@ -2106,9 +2122,13 @@ class fhandler_pty_slave: public fhandler_pty_common public: /* Constructor */ fhandler_pty_slave (int); + /* Destructor */ + ~fhandler_pty_slave (); void set_output_handle_cyg (HANDLE h) { output_handle_cyg = h; } HANDLE& get_output_handle_cyg () { return output_handle_cyg; } + void set_handle_cyg (HANDLE h) { io_handle_cyg = h; } + HANDLE& get_handle_cyg () { return io_handle_cyg; } int open (int flags, mode_t mode = 0); void open_setup (int flags); @@ -2149,6 +2169,15 @@ class fhandler_pty_slave: public fhandler_pty_common copyto (fh); return fh; } + void set_switch_to_pcon (void); + void reset_switch_to_pcon (void); + void push_to_pcon_screenbuffer (const char *ptr, size_t len); + bool has_master_opened (void); + void mask_switch_to_pcon (bool mask) + { + get_ttyp ()->mask_switch_to_pcon = mask; + } + void fixup_after_attach (bool native_maybe); }; #define __ptsname(buf, unit) __small_sprintf ((buf), "/dev/pty%d", (unit)) @@ -2157,17 +2186,17 @@ class fhandler_pty_master: public fhandler_pty_common int pktmode; // non-zero if pty in a packet mode. HANDLE master_ctl; // Control socket for handle duplication cygthread *master_thread; // Master control thread - HANDLE from_master, to_master; + HANDLE from_master, to_master, from_slave, to_slave; HANDLE echo_r, echo_w; DWORD dwProcessId; // Owner of master handles - HANDLE io_handle_cyg, to_master_cyg; + HANDLE to_master_cyg, from_master_cyg; cygthread *master_fwd_thread; // Master forwarding thread public: HANDLE get_echo_handle () const { return echo_r; } - HANDLE& get_handle_cyg () { return io_handle_cyg; } /* Constructor */ fhandler_pty_master (int); + ~fhandler_pty_master (); DWORD pty_master_thread (); DWORD pty_master_fwd_thread (); @@ -2212,6 +2241,8 @@ public: copyto (fh); return fh; } + + bool setup_pseudoconsole (void); }; class fhandler_dev_null: public fhandler_base diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 67638055e..997c50d23 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1056,6 +1056,19 @@ fhandler_console::close () CloseHandle (get_handle ()); CloseHandle (get_output_handle ()); + + /* If already attached to pseudo console, don't call free_console () */ + cygheap_fdenum cfd (false); + while (cfd.next () >= 0) + if (cfd->get_major () == DEV_PTYM_MAJOR || + cfd->get_major () == DEV_PTYS_MAJOR) + { + fhandler_pty_common *t = + (fhandler_pty_common *) (fhandler_base *) cfd; + if (get_console_process_id (t->getHelperProcessId (), true)) + return 0; + } + if (!have_execed) free_console (); return 0; @@ -3119,6 +3132,25 @@ fhandler_console::need_invisible () return b; } +DWORD +fhandler_console::get_console_process_id (DWORD pid, bool match) +{ + DWORD tmp; + int num = GetConsoleProcessList (&tmp, 1); + DWORD *list = (DWORD *) + HeapAlloc (GetProcessHeap (), 0, num * sizeof (DWORD)); + num = GetConsoleProcessList (list, num); + tmp = 0; + for (int i=0; i #include "cygwait.h" +#include "tls_pbuf.h" + +#define ALWAYS_USE_PCON false +#define USE_API_HOOK true +#define USE_OWN_NLS_FUNC true + +#if !USE_OWN_NLS_FUNC +#include "langinfo.h" +#endif + +/* Not yet defined in Mingw-w64 */ +#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING +#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004 +#endif /* ENABLE_VIRTUAL_TERMINAL_PROCESSING */ +#ifndef DISABLE_NEWLINE_AUTO_RETURN +#define DISABLE_NEWLINE_AUTO_RETURN 0x0008 +#endif /* DISABLE_NEWLINE_AUTO_RETURN */ +#ifndef PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE +#define PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE 0x00020016 +#endif /* PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE */ +#ifndef ENABLE_VIRTUAL_TERMINAL_INPUT +#define ENABLE_VIRTUAL_TERMINAL_INPUT 0x0200 +#endif /* ENABLE_VIRTUAL_TERMINAL_INPUT */ + +extern "C" int sscanf (const char *, const char *, ...); +extern "C" int ttyname_r(int, char*, size_t); #define close_maybe(h) \ do { \ @@ -39,11 +65,227 @@ struct pipe_request { struct pipe_reply { HANDLE from_master; + HANDLE from_master_cyg; HANDLE to_master; HANDLE to_master_cyg; DWORD error; }; +static bool pcon_attached[NTTYS]; +static bool isHybrid; + +#if USE_API_HOOK +/* Hook WIN32 API */ +static +void *hook_api (const char *mname, const char *name, const void *fn) +{ + HMODULE hm = GetModuleHandle (mname); + PIMAGE_NT_HEADERS pExeNTHdr = PIMAGE_NT_HEADERS (PBYTE (hm) + + PIMAGE_DOS_HEADER (hm)->e_lfanew); + DWORD importRVA = pExeNTHdr->OptionalHeader.DataDirectory + [IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress; + PIMAGE_IMPORT_DESCRIPTOR pdfirst = + (PIMAGE_IMPORT_DESCRIPTOR) ((char *) hm + importRVA); + for (PIMAGE_IMPORT_DESCRIPTOR pd = pdfirst; pd->FirstThunk; pd++) + { + if (pd->OriginalFirstThunk == 0) + continue; + PIMAGE_THUNK_DATA pt = + (PIMAGE_THUNK_DATA) ((char *) hm + pd->FirstThunk); + PIMAGE_THUNK_DATA pn = + (PIMAGE_THUNK_DATA) ((char *) hm + pd->OriginalFirstThunk); + for (PIMAGE_THUNK_DATA pi = pt; pn->u1.Ordinal; pi++, pn++) + { + if (IMAGE_SNAP_BY_ORDINAL (pn->u1.Ordinal)) + continue; + PIMAGE_IMPORT_BY_NAME pimp = + (PIMAGE_IMPORT_BY_NAME) ((char *) hm + pn->u1.AddressOfData); + if (strcmp (name, (char *) pimp->Name) != 0) + continue; +#ifdef __x86_64__ +#define THUNK_FUNC_TYPE ULONGLONG +#else +#define THUNK_FUNC_TYPE DWORD +#endif + DWORD ofl = PAGE_READWRITE; + if (!VirtualProtect (pi, sizeof (THUNK_FUNC_TYPE), ofl, &ofl)) + return NULL; + void *origfn = (void *) pi->u1.Function; + pi->u1.Function = (THUNK_FUNC_TYPE) fn; + VirtualProtect (pi, sizeof (THUNK_FUNC_TYPE), ofl, &ofl); + return origfn; + } + } + return NULL; +} + +static void +set_switch_to_pcon (void) +{ + cygheap_fdenum cfd (false); + while (cfd.next () >= 0) + if (cfd->get_major () == DEV_PTYS_MAJOR) + { + fhandler_base *fh = cfd; + fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; + ptys->set_switch_to_pcon (); + return; + } +} + +#define DEF_HOOK(name) static __typeof__ (name) *name##_Orig +DEF_HOOK (WriteFile); +DEF_HOOK (WriteConsoleA); +DEF_HOOK (WriteConsoleW); +DEF_HOOK (ReadFile); +DEF_HOOK (ReadConsoleA); +DEF_HOOK (ReadConsoleW); +DEF_HOOK (WriteConsoleOutputA); +DEF_HOOK (WriteConsoleOutputW); +DEF_HOOK (WriteConsoleOutputCharacterA); +DEF_HOOK (WriteConsoleOutputCharacterW); +DEF_HOOK (WriteConsoleOutputAttribute); +DEF_HOOK (WriteConsoleInputA); +DEF_HOOK (WriteConsoleInputW); +DEF_HOOK (ReadConsoleInputA); +DEF_HOOK (ReadConsoleInputW); +DEF_HOOK (PeekConsoleInputA); +DEF_HOOK (PeekConsoleInputW); + +#define CHK_CONSOLE_ACCESS(h) \ +{ \ + DWORD dummy; \ + if (!isHybrid && GetConsoleMode (h, &dummy)) \ + { \ + isHybrid = true; \ + set_switch_to_pcon (); \ + } \ +} +static BOOL WINAPI +WriteFile_Hooked + (HANDLE h, LPCVOID p, DWORD l, LPDWORD n, LPOVERLAPPED o) +{ + CHK_CONSOLE_ACCESS (h); + return WriteFile_Orig (h, p, l, n, o); +} +static BOOL WINAPI +WriteConsoleA_Hooked + (HANDLE h, LPCVOID p, DWORD l, LPDWORD n, LPVOID o) +{ + CHK_CONSOLE_ACCESS (h); + return WriteConsoleA_Orig (h, p, l, n, o); +} +static BOOL WINAPI +WriteConsoleW_Hooked + (HANDLE h, LPCVOID p, DWORD l, LPDWORD n, LPVOID o) +{ + CHK_CONSOLE_ACCESS (h); + return WriteConsoleW_Orig (h, p, l, n, o); +} +static BOOL WINAPI +ReadFile_Hooked + (HANDLE h, LPVOID p, DWORD l, LPDWORD n, LPOVERLAPPED o) +{ + CHK_CONSOLE_ACCESS (h); + return ReadFile_Orig (h, p, l, n, o); +} +static BOOL WINAPI +ReadConsoleA_Hooked + (HANDLE h, LPVOID p, DWORD l, LPDWORD n, LPVOID o) +{ + CHK_CONSOLE_ACCESS (h); + return ReadConsoleA_Orig (h, p, l, n, o); +} +static BOOL WINAPI +ReadConsoleW_Hooked + (HANDLE h, LPVOID p, DWORD l, LPDWORD n, LPVOID o) +{ + CHK_CONSOLE_ACCESS (h); + return ReadConsoleW_Orig (h, p, l, n, o); +} +static BOOL WINAPI +WriteConsoleOutputA_Hooked + (HANDLE h, CONST CHAR_INFO *p, COORD s, COORD c, PSMALL_RECT r) +{ + CHK_CONSOLE_ACCESS (h); + return WriteConsoleOutputA_Orig (h, p, s, c, r); +} +static BOOL WINAPI +WriteConsoleOutputW_Hooked + (HANDLE h, CONST CHAR_INFO *p, COORD s, COORD c, PSMALL_RECT r) +{ + CHK_CONSOLE_ACCESS (h); + return WriteConsoleOutputW_Orig (h, p, s, c, r); +} +static BOOL WINAPI +WriteConsoleOutputCharacterA_Hooked + (HANDLE h, LPCSTR p, DWORD l, COORD c, LPDWORD n) +{ + CHK_CONSOLE_ACCESS (h); + return WriteConsoleOutputCharacterA_Orig (h, p, l, c, n); +} +static BOOL WINAPI +WriteConsoleOutputCharacterW_Hooked + (HANDLE h, LPCWSTR p, DWORD l, COORD c, LPDWORD n) +{ + CHK_CONSOLE_ACCESS (h); + return WriteConsoleOutputCharacterW_Orig (h, p, l, c, n); +} +static BOOL WINAPI +WriteConsoleOutputAttribute_Hooked + (HANDLE h, CONST WORD *a, DWORD l, COORD c, LPDWORD n) +{ + CHK_CONSOLE_ACCESS (h); + return WriteConsoleOutputAttribute_Orig (h, a, l, c, n); +} +static BOOL WINAPI +WriteConsoleInputA_Hooked + (HANDLE h, CONST INPUT_RECORD *r, DWORD l, LPDWORD n) +{ + CHK_CONSOLE_ACCESS (h); + return WriteConsoleInputA_Orig (h, r, l, n); +} +static BOOL WINAPI +WriteConsoleInputW_Hooked + (HANDLE h, CONST INPUT_RECORD *r, DWORD l, LPDWORD n) +{ + CHK_CONSOLE_ACCESS (h); + return WriteConsoleInputW_Orig (h, r, l, n); +} +static BOOL WINAPI +ReadConsoleInputA_Hooked + (HANDLE h, PINPUT_RECORD r, DWORD l, LPDWORD n) +{ + CHK_CONSOLE_ACCESS (h); + return ReadConsoleInputA_Orig (h, r, l, n); +} +static BOOL WINAPI +ReadConsoleInputW_Hooked + (HANDLE h, PINPUT_RECORD r, DWORD l, LPDWORD n) +{ + CHK_CONSOLE_ACCESS (h); + return ReadConsoleInputW_Orig (h, r, l, n); +} +static BOOL WINAPI +PeekConsoleInputA_Hooked + (HANDLE h, PINPUT_RECORD r, DWORD l, LPDWORD n) +{ + CHK_CONSOLE_ACCESS (h); + return PeekConsoleInputA_Orig (h, r, l, n); +} +static BOOL WINAPI +PeekConsoleInputW_Hooked + (HANDLE h, PINPUT_RECORD r, DWORD l, LPDWORD n) +{ + CHK_CONSOLE_ACCESS (h); + return PeekConsoleInputW_Orig (h, r, l, n); +} +#else /* USE_API_HOOK */ +#define WriteFile_Orig 0 +#define ReadFile_Orig 0 +#define PeekConsoleInputA_Orig 0 +#endif /* USE_API_HOOK */ + bool bytes_available (DWORD& n, HANDLE h) { @@ -67,7 +309,7 @@ bytes_available (DWORD& n, HANDLE h) bool fhandler_pty_common::bytes_available (DWORD &n) { - return ::bytes_available (n, get_handle ()); + return ::bytes_available (n, get_handle_cyg ()); } #ifdef DEBUGGING @@ -139,14 +381,35 @@ fhandler_pty_common::__release_output_mutex (const char *fn, int ln) #endif } +static bool switch_to_pcon_prev; + +bool +fhandler_pty_common::check_switch_to_pcon (void) +{ + bool switch_to_pcon_now = get_ttyp ()->switch_to_pcon; + if (!isHybrid && !switch_to_pcon_prev && switch_to_pcon_now) + { + Sleep (40); + /* Check again */ + switch_to_pcon_now = get_ttyp ()->switch_to_pcon; + if (switch_to_pcon_now) + switch_to_pcon_prev = true; + } + else + switch_to_pcon_prev = switch_to_pcon_now; + return switch_to_pcon_prev; +} + /* Process pty input. */ void fhandler_pty_master::doecho (const void *str, DWORD len) { ssize_t towrite = len; + acquire_output_mutex (INFINITE); if (!process_opost_output (echo_w, str, towrite, true)) termios_printf ("Write to echo pipe failed, %E"); + release_output_mutex (); } int @@ -235,7 +498,7 @@ fhandler_pty_master::process_slave_output (char *buf, size_t len, int pktmode_on /* Check echo pipe first. */ if (::bytes_available (echo_cnt, echo_r) && echo_cnt > 0) break; - if (!::bytes_available (n, get_handle_cyg ())) + if (!bytes_available (n)) goto err; if (n) break; @@ -296,7 +559,7 @@ fhandler_pty_master::process_slave_output (char *buf, size_t len, int pktmode_on goto err; } } - else if (!ReadFile (get_handle_cyg (), outbuf, rlen, &n, NULL)) + else if (!ReadFile (get_handle (), outbuf, rlen, &n, NULL)) { termios_printf ("ReadFile failed, %E"); goto err; @@ -331,20 +594,57 @@ out: /* pty slave stuff */ fhandler_pty_slave::fhandler_pty_slave (int unit) - : fhandler_pty_common (), inuse (NULL), output_handle_cyg (NULL) + : fhandler_pty_common (), inuse (NULL), output_handle_cyg (NULL), + io_handle_cyg (NULL) { if (unit >= 0) dev ().parse (DEV_PTYS_MAJOR, unit); } +fhandler_pty_slave::~fhandler_pty_slave () +{ + if (!get_ttyp ()) + { + /* Why it comes here? */ + init_console_handler (false); + FreeConsole (); + pcon_attached[get_minor ()] = false; + } + else if (getPseudoConsole ()) + { + int used = 0; + cygheap_fdenum cfd (false); + while (cfd.next () >= 0) + if (cfd->get_major () == DEV_PTYS_MAJOR && + cfd->get_minor () == get_minor ()) + used ++; + + /* Call FreeConsole() if no pty slave on this pty is + opened and the process is attached to the pseudo + console corresponding to this pty. This is needed + to make GNU screen and tmux work in Windows 10 1903. */ + if (used == 0 && + fhandler_console::get_console_process_id (getHelperProcessId (), + true)) + { + init_console_handler (false); + FreeConsole (); + pcon_attached[get_minor ()] = false; + } + } +} + int fhandler_pty_slave::open (int flags, mode_t) { - HANDLE pty_owner, from_master_local, to_master_local, to_master_cyg_local; + HANDLE pty_owner; + HANDLE from_master_local, from_master_cyg_local; + HANDLE to_master_local, to_master_cyg_local; HANDLE *handles[] = { &from_master_local, &input_available_event, &input_mutex, &inuse, &output_mutex, &to_master_local, &pty_owner, &to_master_cyg_local, + &from_master_cyg_local, NULL }; @@ -396,7 +696,7 @@ fhandler_pty_slave::open (int flags, mode_t) release_output_mutex (); } - if (!get_ttyp ()->from_master () || + if (!get_ttyp ()->from_master () || !get_ttyp ()->from_master_cyg () || !get_ttyp ()->to_master () || !get_ttyp ()->to_master_cyg ()) { errmsg = "pty handles have been closed"; @@ -441,6 +741,15 @@ fhandler_pty_slave::open (int flags, mode_t) __seterrno (); goto err_no_msg; } + if (!DuplicateHandle (pty_owner, get_ttyp ()->from_master_cyg (), + GetCurrentProcess (), &from_master_cyg_local, 0, TRUE, + DUPLICATE_SAME_ACCESS)) + { + termios_printf ("can't duplicate input from %u/%p, %E", + get_ttyp ()->master_pid, get_ttyp ()->from_master_cyg ()); + __seterrno (); + goto err_no_msg; + } if (!DuplicateHandle (pty_owner, get_ttyp ()->to_master (), GetCurrentProcess (), &to_master_local, 0, TRUE, DUPLICATE_SAME_ACCESS)) @@ -474,9 +783,11 @@ fhandler_pty_slave::open (int flags, mode_t) goto err; } from_master_local = repl.from_master; + from_master_cyg_local = repl.from_master_cyg; to_master_local = repl.to_master; to_master_cyg_local = repl.to_master_cyg; - if (!from_master_local || !to_master_local || !to_master_cyg_local) + if (!from_master_local || !from_master_cyg_local || + !to_master_local || !to_master_cyg_local) { SetLastError (repl.error); errmsg = "error duplicating pipes, %E"; @@ -484,17 +795,21 @@ fhandler_pty_slave::open (int flags, mode_t) } } VerifyHandle (from_master_local); + VerifyHandle (from_master_cyg_local); VerifyHandle (to_master_local); VerifyHandle (to_master_cyg_local); termios_printf ("duplicated from_master %p->%p from pty_owner", get_ttyp ()->from_master (), from_master_local); + termios_printf ("duplicated from_master_cyg %p->%p from pty_owner", + get_ttyp ()->from_master_cyg (), from_master_cyg_local); termios_printf ("duplicated to_master %p->%p from pty_owner", get_ttyp ()->to_master (), to_master_local); termios_printf ("duplicated to_master_cyg %p->%p from pty_owner", get_ttyp ()->to_master_cyg (), to_master_cyg_local); set_handle (from_master_local); + set_handle_cyg (from_master_cyg_local); set_output_handle (to_master_local); set_output_handle_cyg (to_master_cyg_local); @@ -540,6 +855,26 @@ fhandler_pty_slave::cleanup () int fhandler_pty_slave::close () { +#if 0 + if (getPseudoConsole ()) + { + INPUT_RECORD inp[128]; + DWORD n; + PeekFunc = + PeekConsoleInputA_Orig ? PeekConsoleInputA_Orig : PeekConsoleInput; + PeekFunc (get_handle (), inp, 128, &n); + bool pipe_empty = true; + while (n-- > 0) + if (inp[n].EventType == KEY_EVENT && inp[n].Event.KeyEvent.bKeyDown) + pipe_empty = false; + if (pipe_empty) + { + /* Flush input buffer */ + size_t len = UINT_MAX; + read (NULL, len); + } + } +#endif termios_printf ("closing last open %s handle", ttyname ()); if (inuse && !CloseHandle (inuse)) termios_printf ("CloseHandle (inuse), %E"); @@ -548,11 +883,16 @@ fhandler_pty_slave::close () if (!ForceCloseHandle (get_output_handle_cyg ())) termios_printf ("CloseHandle (get_output_handle_cyg ()<%p>), %E", get_output_handle_cyg ()); + if (!ForceCloseHandle (get_handle_cyg ())) + termios_printf ("CloseHandle (get_handle_cyg ()<%p>), %E", + get_handle_cyg ()); if ((unsigned) myself->ctty == FHDEV (DEV_PTYS_MAJOR, get_minor ())) fhandler_console::free_console (); /* assumes that we are the last pty closer */ fhandler_pty_common::close (); if (!ForceCloseHandle (output_mutex)) termios_printf ("CloseHandle (output_mutex<%p>), %E", output_mutex); + if (pcon_attached[get_minor ()]) + get_ttyp ()->num_pcon_attached_slaves --; return 0; } @@ -596,6 +936,215 @@ fhandler_pty_slave::init (HANDLE h, DWORD a, mode_t) return ret; } +void +fhandler_pty_slave::set_switch_to_pcon (void) +{ + if (!pcon_attached[get_minor ()]) + { + isHybrid = false; + return; + } + if (!isHybrid) + { + reset_switch_to_pcon (); + return; + } + if (!get_ttyp ()->switch_to_pcon) + { + Sleep (20); + if (get_ttyp ()->pcon_pid == 0 || + kill (get_ttyp ()->pcon_pid, 0) != 0) + get_ttyp ()->pcon_pid = myself->pid; + get_ttyp ()->switch_to_pcon = true; + } +} + +void +fhandler_pty_slave::reset_switch_to_pcon (void) +{ + if (ALWAYS_USE_PCON) + return; + if (isHybrid) + { + set_switch_to_pcon (); + return; + } + if (get_ttyp ()->pcon_pid && + get_ttyp ()->pcon_pid != myself->pid && + kill (get_ttyp ()->pcon_pid, 0) == 0) + /* There is a process which is grabbing pseudo console. */ + return; + if (get_ttyp ()->switch_to_pcon && + get_ttyp ()->pcon_pid != myself->pid) + { + DWORD mode; + GetConsoleMode (get_handle (), &mode); + SetConsoleMode (get_handle (), mode & ~ENABLE_ECHO_INPUT); + Sleep (60); /* Wait for pty_master_fwd_thread() */ + } + get_ttyp ()->pcon_pid = 0; + get_ttyp ()->switch_to_pcon = false; +} + +void +fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) +{ + DWORD pidRestore = 0; + if (!fhandler_console::get_console_process_id (getHelperProcessId (), true)) + if (pcon_attached[get_minor ()]) + { + Sleep (20); + /* Check again */ + if (!fhandler_console::get_console_process_id + (getHelperProcessId (), true)) + { + system_printf ("pty%d: pcon_attach mismatch?????? (%p)", + get_minor (), this); + //pcon_attached[get_minor ()] = false; + return; + } + } + /* If not attached pseudo console yet, try to attach temporally. */ + if (!pcon_attached[get_minor ()]) + { + if (has_master_opened ()) + return; + + pidRestore = + fhandler_console::get_console_process_id (GetCurrentProcessId (), + false); + /* If pidRestore is not set, give up to push. */ + if (!pidRestore) + return; + + FreeConsole (); + if (!AttachConsole (getHelperProcessId ())) + { + system_printf ("pty%d: AttachConsole(%d) failed. (%p) %08lx", + get_minor (), getHelperProcessId (), + this, GetLastError ()); + goto detach; + } + } + char *buf; + size_t nlen; + DWORD origCP; + origCP = GetConsoleOutputCP (); + SetConsoleOutputCP (get_ttyp ()->TermCodePage); + /* Just copy */ + buf = (char *) HeapAlloc (GetProcessHeap (), 0, len); + memcpy (buf, (char *)ptr, len); + nlen = len; + char *p0, *p1; + p0 = p1 = buf; + /* Remove alternate screen buffer drawing */ + while (p0 && p1) + { + if (!get_ttyp ()->screen_alternated) + { + /* Check switching to alternate screen buffer */ + p0 = (char *) memmem (p1, nlen - (p1-buf), "\033[?1049h", 8); + if (p0) + { + //p0 += 8; + get_ttyp ()->screen_alternated = true; + } + } + if (get_ttyp ()->screen_alternated) + { + /* Check switching to main screen buffer */ + p1 = (char *) memmem (p0, nlen - (p0-buf), "\033[?1049l", 8); + if (p1) + { + p1 += 8; + get_ttyp ()->screen_alternated = false; + memmove (p0, p1, buf+nlen - p1); + nlen -= p1 - p0; + } + else + nlen = p0 - buf; + } + } + if (!nlen) /* Nothing to be synchronized */ + goto cleanup; + if (check_switch_to_pcon ()) + goto cleanup; + /* Remove ESC sequence which returns results to console + input buffer. Without this, cursor position report + is put into the input buffer as a garbage. */ + /* Remove ESC sequence to report cursor position. */ + while ((p0 = (char *) memmem (buf, nlen, "\033[6n", 4))) + { + memmove (p0, p0+4, nlen - (p0+4 - buf)); + nlen -= 4; + } + /* Remove ESC sequence to report terminal identity. */ + while ((p0 = (char *) memmem (buf, nlen, "\033[0c", 4))) + { + memmove (p0, p0+4, nlen - (p0+4 - buf)); + nlen -= 4; + } + DWORD dwMode, flags; + flags = ENABLE_VIRTUAL_TERMINAL_PROCESSING; + GetConsoleMode (get_output_handle (), &dwMode); + if (!(get_ttyp ()->ti.c_oflag & OPOST) || + !(get_ttyp ()->ti.c_oflag & ONLCR)) + flags |= DISABLE_NEWLINE_AUTO_RETURN; + SetConsoleMode (get_output_handle (), dwMode | flags); + char *p; + p = buf; + DWORD wLen, written; + written = 0; + int retry_count; + retry_count = 0; + BOOL (WINAPI *WriteFunc) + (HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED); + WriteFunc = WriteFile_Orig ? WriteFile_Orig : WriteFile; + while (written < nlen) + { + if (!WriteFunc (get_output_handle (), p, nlen - written, &wLen, NULL)) + { + termios_printf ("WriteFile failed, %E"); + this->open (0, 0); /* Re-open handles */ + /* Fix pseudo console window size */ + struct winsize win; + this->ioctl (TIOCGWINSZ, &win); + this->ioctl (TIOCSWINSZ, &win); + if (++retry_count > 3) + break; + } + written += wLen; + p += wLen; + } + /* Detach from pseudo console and resume. */ + SetConsoleMode (get_output_handle (), dwMode); +cleanup: + SetConsoleOutputCP (origCP); + HeapFree (GetProcessHeap (), 0, buf); +detach: + if (!pcon_attached[get_minor ()]) + { + FreeConsole (); + if (!AttachConsole (pidRestore)) + { + system_printf ("pty%d: AttachConsole(%d) failed. (%p) %08lx", + get_minor (), pidRestore, this, GetLastError ()); + pcon_attached[get_minor ()] = false; + } + } +} + +bool +fhandler_pty_slave::has_master_opened (void) +{ + cygheap_fdenum cfd (false); + while (cfd.next () >= 0) + if (cfd->get_major () == DEV_PTYM_MAJOR && + cfd->get_minor () == get_minor ()) + return true; + return false; +} + ssize_t __stdcall fhandler_pty_slave::write (const void *ptr, size_t len) { @@ -609,7 +1158,51 @@ fhandler_pty_slave::write (const void *ptr, size_t len) push_process_state process_state (PID_TTYOU); - if (!process_opost_output (get_output_handle_cyg (), ptr, towrite, false)) + reset_switch_to_pcon (); + + char *buf; + ssize_t nlen; + UINT targetCodePage = (check_switch_to_pcon ()) ? + GetConsoleOutputCP () : get_ttyp ()->TermCodePage; + if (targetCodePage != get_ttyp ()->TermCodePage) + { + size_t wlen = + MultiByteToWideChar (get_ttyp ()->TermCodePage, 0, + (char *)ptr, len, NULL, 0); + wchar_t *wbuf = (wchar_t *) + HeapAlloc (GetProcessHeap (), 0, wlen * sizeof (wchar_t)); + wlen = + MultiByteToWideChar (get_ttyp ()->TermCodePage, 0, + (char *)ptr, len, wbuf, wlen); + nlen = WideCharToMultiByte (targetCodePage, 0, + wbuf, wlen, NULL, 0, NULL, NULL); + buf = (char *) HeapAlloc (GetProcessHeap (), 0, nlen); + nlen = WideCharToMultiByte (targetCodePage, 0, + wbuf, wlen, buf, nlen, NULL, NULL); + HeapFree (GetProcessHeap (), 0, wbuf); + } + else + { + /* Just copy */ + buf = (char *) HeapAlloc (GetProcessHeap (), 0, len); + memcpy (buf, (char *)ptr, len); + nlen = len; + } + + DWORD dwMode, flags; + flags = ENABLE_VIRTUAL_TERMINAL_PROCESSING; + if (!(get_ttyp ()->ti.c_oflag & OPOST) || + !(get_ttyp ()->ti.c_oflag & ONLCR)) + flags |= DISABLE_NEWLINE_AUTO_RETURN; + if (check_switch_to_pcon ()) + { + GetConsoleMode (get_output_handle (), &dwMode); + SetConsoleMode (get_output_handle (), dwMode | flags); + } + HANDLE to = + check_switch_to_pcon () ? get_output_handle () : get_output_handle_cyg (); + acquire_output_mutex (INFINITE); + if (!process_opost_output (to, buf, nlen, false)) { DWORD err = GetLastError (); termios_printf ("WriteFile failed, %E"); @@ -623,12 +1216,27 @@ fhandler_pty_slave::write (const void *ptr, size_t len) } towrite = -1; } + release_output_mutex (); + HeapFree (GetProcessHeap (), 0, buf); + flags = ENABLE_VIRTUAL_TERMINAL_PROCESSING; + if (check_switch_to_pcon ()) + SetConsoleMode (get_output_handle (), dwMode | flags); + + /* Push slave output to pseudo console screen buffer */ + if (getPseudoConsole ()) + { + acquire_output_mutex (INFINITE); + push_to_pcon_screenbuffer ((char *)ptr, len); + release_output_mutex (); + } + return towrite; } void __reg3 fhandler_pty_slave::read (void *ptr, size_t& len) { + char *ptr0 = (char *)ptr; ssize_t totalread = 0; int vmin = 0; int vtime = 0; /* Initialized to prevent -Wuninitialized warning */ @@ -644,10 +1252,17 @@ fhandler_pty_slave::read (void *ptr, size_t& len) return; } - termios_printf ("read(%p, %lu) handle %p", ptr, len, get_handle ()); + termios_printf ("read(%p, %lu) handle %p", ptr, len, get_handle_cyg ()); push_process_state process_state (PID_TTYIN); + if (ptr) /* Indicating not tcflush(). */ + { + reset_switch_to_pcon (); + if (get_ttyp ()->pcon_pid != myself->pid) + mask_switch_to_pcon (true); + } + if (is_nonblocking () || !ptr) /* Indicating tcflush(). */ time_to_wait = 0; else if ((get_ttyp ()->ti.c_lflag & ICANON)) @@ -746,6 +1361,53 @@ fhandler_pty_slave::read (void *ptr, size_t& len) } goto out; } + if (check_switch_to_pcon () && + !get_ttyp ()->mask_switch_to_pcon) + { + DWORD dwMode; + GetConsoleMode (get_handle (), &dwMode); + DWORD flags = ENABLE_VIRTUAL_TERMINAL_INPUT; + if (get_ttyp ()->ti.c_lflag & ECHO) + flags |= ENABLE_ECHO_INPUT; + if (get_ttyp ()->ti.c_lflag & ICANON) + flags |= ENABLE_LINE_INPUT; + if (flags & ENABLE_ECHO_INPUT && !(flags & ENABLE_LINE_INPUT)) + flags &= ~ENABLE_ECHO_INPUT; + if ((get_ttyp ()->ti.c_lflag & ISIG) && + !(get_ttyp ()->ti.c_iflag & IGNBRK)) + flags |= ENABLE_PROCESSED_INPUT; + if (dwMode != flags) + SetConsoleMode (get_handle (), flags); + /* Read get_handle() instad of get_handle_cyg() */ + BOOL (WINAPI *ReadFunc) + (HANDLE, LPVOID, DWORD, LPDWORD, LPOVERLAPPED); + ReadFunc = ReadFile_Orig ? ReadFile_Orig : ReadFile; + DWORD rlen; + if (!ReadFunc (get_handle (), ptr, len, &rlen, NULL)) + { + termios_printf ("read failed, %E"); + ReleaseMutex (input_mutex); + set_errno (EIO); + totalread = -1; + goto out; + } + INPUT_RECORD inp[128]; + DWORD n; + BOOL (WINAPI *PeekFunc) + (HANDLE, PINPUT_RECORD, DWORD, LPDWORD); + PeekFunc = + PeekConsoleInputA_Orig ? PeekConsoleInputA_Orig : PeekConsoleInput; + PeekFunc (get_handle (), inp, 128, &n); + bool pipe_empty = true; + while (n-- > 0) + if (inp[n].EventType == KEY_EVENT && inp[n].Event.KeyEvent.bKeyDown) + pipe_empty = false; + if (pipe_empty) + ResetEvent (input_available_event); + ReleaseMutex (input_mutex); + len = rlen; + return; + } if (!bytes_available (bytes_in_pipe)) { ReleaseMutex (input_mutex); @@ -757,6 +1419,7 @@ fhandler_pty_slave::read (void *ptr, size_t& len) if (ptr && !bytes_in_pipe && !vmin && !time_to_wait) { ReleaseMutex (input_mutex); + mask_switch_to_pcon (false); len = (size_t) bytes_in_pipe; return; } @@ -777,7 +1440,7 @@ fhandler_pty_slave::read (void *ptr, size_t& len) if (readlen) { termios_printf ("reading %lu bytes (vtime %d)", readlen, vtime); - if (!ReadFile (get_handle (), buf, readlen, &n, NULL)) + if (!ReadFile (get_handle_cyg (), buf, readlen, &n, NULL)) { termios_printf ("read failed, %E"); ReleaseMutex (input_mutex); @@ -861,6 +1524,16 @@ fhandler_pty_slave::read (void *ptr, size_t& len) out: termios_printf ("%d = read(%p, %lu)", totalread, ptr, len); len = (size_t) totalread; +#if 1 /* Experimenta code */ + /* Push slave read as echo to pseudo console screen buffer. */ + if (getPseudoConsole () && ptr0 && (get_ttyp ()->ti.c_lflag & ECHO)) + { + acquire_output_mutex (INFINITE); + push_to_pcon_screenbuffer (ptr0, len); + release_output_mutex (); + } +#endif + mask_switch_to_pcon (false); } int @@ -890,6 +1563,7 @@ fhandler_pty_master::dup (fhandler_base *child, int) int fhandler_pty_slave::tcgetattr (struct termios *t) { + reset_switch_to_pcon (); *t = get_ttyp ()->ti; return 0; } @@ -897,6 +1571,7 @@ fhandler_pty_slave::tcgetattr (struct termios *t) int fhandler_pty_slave::tcsetattr (int, const struct termios *t) { + reset_switch_to_pcon (); acquire_output_mutex (INFINITE); get_ttyp ()->ti = *t; release_output_mutex (); @@ -908,7 +1583,9 @@ fhandler_pty_slave::tcflush (int queue) { int ret = 0; - termios_printf ("tcflush(%d) handle %p", queue, get_handle ()); + termios_printf ("tcflush(%d) handle %p", queue, get_handle_cyg ()); + + reset_switch_to_pcon (); if (queue == TCIFLUSH || queue == TCIOFLUSH) { @@ -929,6 +1606,7 @@ int fhandler_pty_slave::ioctl (unsigned int cmd, void *arg) { termios_printf ("ioctl (%x)", cmd); + reset_switch_to_pcon (); int res = fhandler_termios::ioctl (cmd, arg); if (res <= 0) return res; @@ -995,6 +1673,64 @@ fhandler_pty_slave::ioctl (unsigned int cmd, void *arg) get_ttyp ()->winsize = get_ttyp ()->arg.winsize; break; case TIOCSWINSZ: + if (getPseudoConsole ()) + { + /* If not attached pseudo console yet, try to attach + temporally. */ + DWORD pidRestore = 0; + if (!pcon_attached[get_minor ()]) + { + if (has_master_opened () && get_ttyp ()->attach_pcon_in_fork) + goto resize_cyg; + + pidRestore = fhandler_console::get_console_process_id + (GetCurrentProcessId (), false); + + /* This happens at mintty startup if fhandler_console:: + need_invisible() is called in stdio_init() in dtable.cc */ + if (!pidRestore) /* Give up to resize pseudo console */ + goto resize_cyg; + + FreeConsole (); + if (!AttachConsole (getHelperProcessId ())) + { + system_printf ("pty%d: AttachConsole(%d) failed. (%p) %08lx", + get_minor(), getHelperProcessId (), + this, GetLastError ()); + goto cleanup; + } + } + COORD size; + size.X = ((struct winsize *) arg)->ws_col; + size.Y = ((struct winsize *) arg)->ws_row; + CONSOLE_SCREEN_BUFFER_INFO csbi; + if (GetConsoleScreenBufferInfo (get_output_handle (), &csbi)) + if (size.X == csbi.srWindow.Right - csbi.srWindow.Left + 1 && + size.Y == csbi.srWindow.Bottom - csbi.srWindow.Top + 1) + goto cleanup; + if (!SetConsoleScreenBufferSize (get_output_handle (), size)) + goto cleanup; + SMALL_RECT rect; + rect.Left = 0; + rect.Top = 0; + rect.Right = size.X-1; + rect.Bottom = size.Y-1; + SetConsoleWindowInfo (get_output_handle (), TRUE, &rect); +cleanup: + /* Detach from pseudo console and resume. */ + if (pidRestore) + { + FreeConsole (); + if (!AttachConsole (pidRestore)) + { + system_printf ("pty%d: AttachConsole(%d) failed. (%p) %08lx", + get_minor (), pidRestore, + this, GetLastError ()); + pcon_attached[get_minor ()] = false; + } + } + } +resize_cyg: if (get_ttyp ()->winsize.ws_row != ((struct winsize *) arg)->ws_row || get_ttyp ()->winsize.ws_col != ((struct winsize *) arg)->ws_col) { @@ -1228,8 +1964,9 @@ errout: fhandler_pty_master::fhandler_pty_master (int unit) : fhandler_pty_common (), pktmode (0), master_ctl (NULL), master_thread (NULL), from_master (NULL), to_master (NULL), - echo_r (NULL), echo_w (NULL), dwProcessId (0), - io_handle_cyg (NULL), to_master_cyg (NULL), master_fwd_thread (NULL) + from_slave (NULL), to_slave (NULL), echo_r (NULL), echo_w (NULL), + dwProcessId (0), to_master_cyg (NULL), from_master_cyg (NULL), + master_fwd_thread (NULL) { if (unit >= 0) dev ().parse (DEV_PTYM_MAJOR, unit); @@ -1241,6 +1978,15 @@ fhandler_pty_master::fhandler_pty_master (int unit) set_name ("/dev/ptmx"); } +fhandler_pty_master::~fhandler_pty_master () +{ + /* Without this wait, helper process for pseudo console + sometimes remains running after the pty session is + closed. The reason is not clear. */ + if (to_master && from_master) + Sleep (20); +} + int fhandler_pty_master::open (int flags, mode_t) { @@ -1269,13 +2015,15 @@ fhandler_pty_common::lseek (off_t, int) int fhandler_pty_common::close () { - termios_printf ("pty%d <%p,%p> closing", get_minor (), get_handle (), get_output_handle ()); + termios_printf ("pty%d <%p,%p> closing", + get_minor (), get_handle (), get_output_handle ()); if (!ForceCloseHandle (input_mutex)) termios_printf ("CloseHandle (input_mutex<%p>), %E", input_mutex); if (!ForceCloseHandle1 (get_handle (), from_pty)) termios_printf ("CloseHandle (get_handle ()<%p>), %E", get_handle ()); if (!ForceCloseHandle1 (get_output_handle (), to_pty)) - termios_printf ("CloseHandle (get_output_handle ()<%p>), %E", get_output_handle ()); + termios_printf ("CloseHandle (get_output_handle ()<%p>), %E", + get_output_handle ()); return 0; } @@ -1285,7 +2033,8 @@ fhandler_pty_master::cleanup () { report_tty_counts (this, "closing master", ""); if (archetype) - from_master = to_master = to_master_cyg = NULL; + from_master = from_master_cyg = + to_master = to_master_cyg = from_slave = to_slave = NULL; fhandler_base::cleanup (); } @@ -1294,9 +2043,11 @@ fhandler_pty_master::close () { OBJECT_BASIC_INFORMATION obi; NTSTATUS status; + pid_t master_pid_tmp = get_ttyp ()->master_pid; - termios_printf ("closing from_master(%p)/to_master(%p)/to_master_cyg(%p) since we own them(%u)", - from_master, to_master, to_master_cyg, dwProcessId); + termios_printf ("closing from_master(%p)/from_master_cyg(%p)/to_master(%p)/to_master_cyg(%p) since we own them(%u)", + from_master, from_master_cyg, + to_master, to_master_cyg, dwProcessId); if (cygwin_finished_initializing) { if (master_ctl && get_ttyp ()->master_pid == myself->pid) @@ -1334,9 +2085,30 @@ fhandler_pty_master::close () termios_printf ("CloseHandle (output_mutex<%p>), %E", output_mutex); if (!NT_SUCCESS (status)) debug_printf ("NtQueryObject: %y", status); - else if (obi.HandleCount == 1) + else if (obi.HandleCount == (getPseudoConsole () ? 2 : 1)) + /* Helper process has inherited one. */ { termios_printf("Closing last master of pty%d", get_minor ()); + /* Close Pseudo Console */ + if (getPseudoConsole ()) + { + /* Terminate helper process */ + SetEvent (get_ttyp ()->hHelperGoodbye); + WaitForSingleObject (get_ttyp ()->hHelperProcess, INFINITE); + /* FIXME: Pseudo console can be accessed via its handle + only in the process which created it. What else can we do? */ + if (master_pid_tmp == myself->pid) + { + /* Release pseudo console */ + HMODULE hModule = GetModuleHandle ("kernel32.dll"); + FARPROC func = GetProcAddress (hModule, "ClosePseudoConsole"); + VOID (WINAPI *ClosePseudoConsole) (HPCON) = NULL; + ClosePseudoConsole = (VOID (WINAPI *) (HPCON)) func; + ClosePseudoConsole (getPseudoConsole ()); + } + get_ttyp ()->hPseudoConsole = NULL; + get_ttyp ()->switch_to_pcon = false; + } if (get_ttyp ()->getsid () > 0) kill (get_ttyp ()->getsid (), SIGHUP); SetEvent (input_available_event); @@ -1344,22 +2116,31 @@ fhandler_pty_master::close () if (!ForceCloseHandle (from_master)) termios_printf ("error closing from_master %p, %E", from_master); + if (from_master_cyg != from_master) /* Avoid double close. */ + if (!ForceCloseHandle (from_master_cyg)) + termios_printf ("error closing from_master_cyg %p, %E", from_master_cyg); if (!ForceCloseHandle (to_master)) termios_printf ("error closing to_master %p, %E", to_master); from_master = to_master = NULL; - if (!ForceCloseHandle (get_handle_cyg ())) - termios_printf ("error closing io_handle_cyg %p, %E", get_handle_cyg ()); + if (!ForceCloseHandle (from_slave)) + termios_printf ("error closing from_slave %p, %E", from_slave); + from_slave = NULL; if (!ForceCloseHandle (to_master_cyg)) termios_printf ("error closing to_master_cyg %p, %E", to_master_cyg); - get_handle_cyg () = to_master_cyg = NULL; + to_master_cyg = from_master_cyg = NULL; ForceCloseHandle (echo_r); ForceCloseHandle (echo_w); echo_r = echo_w = NULL; + if (to_slave) + ForceCloseHandle (to_slave); + to_slave = NULL; if (have_execed || get_ttyp ()->master_pid != myself->pid) - termios_printf ("not clearing: %d, master_pid %d", have_execed, get_ttyp ()->master_pid); + termios_printf ("not clearing: %d, master_pid %d", + have_execed, get_ttyp ()->master_pid); if (!ForceCloseHandle (input_available_event)) - termios_printf ("CloseHandle (input_available_event<%p>), %E", input_available_event); + termios_printf ("CloseHandle (input_available_event<%p>), %E", + input_available_event); return 0; } @@ -1376,6 +2157,46 @@ fhandler_pty_master::write (const void *ptr, size_t len) return (ssize_t) bg; push_process_state process_state (PID_TTYOU); + + /* Write terminal input to to_slave pipe instead of output_handle + if current application is native console application. */ + if (check_switch_to_pcon () && + !get_ttyp ()->mask_switch_to_pcon) + { + char *buf; + size_t nlen; + + if (get_ttyp ()->TermCodePage != CP_UTF8) + { + size_t wlen = + MultiByteToWideChar (get_ttyp ()->TermCodePage, 0, + (char *)ptr, len, NULL, 0); + wchar_t *wbuf = (wchar_t *) + HeapAlloc (GetProcessHeap (), 0, wlen * sizeof (wchar_t)); + wlen = + MultiByteToWideChar (get_ttyp ()->TermCodePage, 0, + (char *)ptr, len, wbuf, wlen); + nlen = WideCharToMultiByte (CP_UTF8, 0, + wbuf, wlen, NULL, 0, NULL, NULL); + buf = (char *) HeapAlloc (GetProcessHeap (), 0, nlen); + nlen = WideCharToMultiByte (CP_UTF8, 0, + wbuf, wlen, buf, nlen, NULL, NULL); + HeapFree (GetProcessHeap (), 0, wbuf); + } + else + { + /* Just copy */ + buf = (char *) HeapAlloc (GetProcessHeap (), 0, len); + memcpy (buf, (char *)ptr, len); + nlen = len; + } + DWORD wLen; + WriteFile (to_slave, buf, nlen, &wLen, NULL); + SetEvent (input_available_event); + HeapFree (GetProcessHeap (), 0, buf); + return len; + } + line_edit_status status = line_edit (p++, len, ti, &ret); if (status > line_edit_signalled && status != line_edit_pipe_full) ret = -1; @@ -1443,6 +2264,19 @@ fhandler_pty_master::ioctl (unsigned int cmd, void *arg) *(struct winsize *) arg = get_ttyp ()->winsize; break; case TIOCSWINSZ: + /* FIXME: Pseudo console can be accessed via its handle + only in the process which created it. What else can we do? */ + if (getPseudoConsole () && get_ttyp ()->master_pid == myself->pid) + { + HMODULE hModule = GetModuleHandle ("kernel32.dll"); + FARPROC func = GetProcAddress (hModule, "ResizePseudoConsole"); + HRESULT (WINAPI *ResizePseudoConsole) (HPCON, COORD) = NULL; + ResizePseudoConsole = (HRESULT (WINAPI *) (HPCON, COORD)) func; + COORD size; + size.X = ((struct winsize *) arg)->ws_col; + size.Y = ((struct winsize *) arg)->ws_row; + ResizePseudoConsole (getPseudoConsole (), size); + } if (get_ttyp ()->winsize.ws_row != ((struct winsize *) arg)->ws_row || get_ttyp ()->winsize.ws_col != ((struct winsize *) arg)->ws_col) { @@ -1458,7 +2292,7 @@ fhandler_pty_master::ioctl (unsigned int cmd, void *arg) case FIONREAD: { DWORD n; - if (!::bytes_available (n, get_handle_cyg ())) + if (!bytes_available (n)) { set_errno (EINVAL); return -1; @@ -1494,9 +2328,559 @@ fhandler_pty_common::set_close_on_exec (bool val) close_on_exec (val); } +/* This table is borrowed from mintty: charset.c */ +static const struct { + UINT cp; + const char *name; +} +cs_names[] = { + { CP_UTF8, "UTF-8"}, + { CP_UTF8, "UTF8"}, + { 20127, "ASCII"}, + { 20127, "US-ASCII"}, + { 20127, "ANSI_X3.4-1968"}, + { 20866, "KOI8-R"}, + { 20866, "KOI8R"}, + { 20866, "KOI8"}, + { 21866, "KOI8-U"}, + { 21866, "KOI8U"}, + { 20932, "EUCJP"}, + { 20932, "EUC-JP"}, + { 874, "TIS620"}, + { 874, "TIS-620"}, + { 932, "SJIS"}, + { 936, "GBK"}, + { 936, "GB2312"}, + { 936, "EUCCN"}, + { 936, "EUC-CN"}, + { 949, "EUCKR"}, + { 949, "EUC-KR"}, + { 950, "BIG5"}, + { 0, "NULL"} +}; + +static void +get_locale_from_env (char *locale) +{ + const char *env = NULL; + char lang[ENCODING_LEN + 1] = {0, }, country[ENCODING_LEN + 1] = {0, }; + env = getenv ("LC_ALL"); + if (env == NULL || !*env) + env = getenv("LC_CTYPE"); + if (env == NULL || !*env) + env = getenv("LANG"); + if (env == NULL || !*env) + { + if (GetLocaleInfo (LOCALE_CUSTOM_UI_DEFAULT, + LOCALE_SISO639LANGNAME, + lang, sizeof (lang))) + GetLocaleInfo (LOCALE_CUSTOM_UI_DEFAULT, + LOCALE_SISO3166CTRYNAME, + country, sizeof (country)); + else if (GetLocaleInfo (LOCALE_CUSTOM_DEFAULT, + LOCALE_SISO639LANGNAME, + lang, sizeof (lang))) + GetLocaleInfo (LOCALE_CUSTOM_DEFAULT, + LOCALE_SISO3166CTRYNAME, + country, sizeof (country)); + else if (GetLocaleInfo (LOCALE_USER_DEFAULT, + LOCALE_SISO639LANGNAME, + lang, sizeof (lang))) + GetLocaleInfo (LOCALE_USER_DEFAULT, + LOCALE_SISO3166CTRYNAME, + country, sizeof (country)); + else if (GetLocaleInfo (LOCALE_SYSTEM_DEFAULT, + LOCALE_SISO639LANGNAME, + lang, sizeof (lang))) + GetLocaleInfo (LOCALE_SYSTEM_DEFAULT, + LOCALE_SISO3166CTRYNAME, + country, sizeof (country)); + if (strlen (lang) && strlen (country)) + __small_sprintf (lang + strlen(lang), "_%s.UTF-8", country); + else + strcpy (lang , "C.UTF-8"); + env = lang; + } + strcpy (locale, env); +} + +#if USE_OWN_NLS_FUNC +static LCID +get_langinfo (char *locale_out, char *charset_out) +{ + /* Get locale from environment */ + char new_locale[ENCODING_LEN + 1]; + get_locale_from_env (new_locale); + + /* The following code is borrowed from __loadlocale() in + newlib/libc/locale/locale.c */ + + /* At this point a full-featured system would just load the locale + specific data from the locale files. + What we do here for now is to check the incoming string for correctness. + The string must be in one of the allowed locale strings, either + one in POSIX-style, or one in the old newlib style to maintain + backward compatibility. If the local string is correct, the charset + is extracted and stored in ctype_codeset or message_charset + dependent on the cateogry. */ + char *locale = NULL; + char charset[ENCODING_LEN + 1]; + long val = 0; + char *end, *c = NULL; + + /* This additional code handles the case that the incoming locale string + is not valid. If so, it calls the function __set_locale_from_locale_alias, + which is only available on Cygwin right now. The function reads the + file /usr/share/locale/locale.alias. The file contains locale aliases + and their replacement locale. For instance, the alias "french" is + translated to "fr_FR.ISO-8859-1", the alias "thai" is translated to + "th_TH.TIS-620". If successful, the function returns with LCID + correspoding to the locale. */ + char tmp_locale[ENCODING_LEN + 1]; + +restart: + if (!locale) + locale = new_locale; + else if (locale != tmp_locale) + { + locale = __set_locale_from_locale_alias (locale, tmp_locale); + if (!locale) + return 0; + } +# define FAIL goto restart + + /* "POSIX" is translated to "C", as on Linux. */ + if (!strcmp (locale, "POSIX")) + strcpy (locale, "C"); + if (!strcmp (locale, "C")) /* Default "C" locale */ + strcpy (charset, "ASCII"); + else if (locale[0] == 'C' + && (locale[1] == '-' /* Old newlib style */ + || locale[1] == '.')) /* Extension for the C locale to allow + specifying different charsets while + sticking to the C locale in terms + of sort order, etc. Proposed in + the Debian project. */ + { + char *chp; + + c = locale + 2; + strcpy (charset, c); + if ((chp = strchr (charset, '@'))) + /* Strip off modifier */ + *chp = '\0'; + c += strlen (charset); + } + else /* POSIX style */ + { + c = locale; + + /* Don't use ctype macros here, they might be localized. */ + /* Language */ + if (c[0] < 'a' || c[0] > 'z' + || c[1] < 'a' || c[1] > 'z') + FAIL; + c += 2; + /* Allow three character Language per ISO 639-3 */ + if (c[0] >= 'a' && c[0] <= 'z') + ++c; + if (c[0] == '_') + { + /* Territory */ + ++c; + if (c[0] < 'A' || c[0] > 'Z' + || c[1] < 'A' || c[1] > 'Z') + FAIL; + c += 2; + } + if (c[0] == '.') + { + /* Charset */ + char *chp; + + ++c; + strcpy (charset, c); + if ((chp = strchr (charset, '@'))) + /* Strip off modifier */ + *chp = '\0'; + c += strlen (charset); + } + else if (c[0] == '\0' || c[0] == '@') + /* End of string or just a modifier */ + + /* The Cygwin-only function __set_charset_from_locale checks + for the default charset which is connected to the given locale. + The function uses Windows functions in turn so it can't be easily + adapted to other targets. However, if any other target provides + equivalent functionality, preferrably using the same function name + it would be sufficient to change the guarding #ifdef. */ + __set_charset_from_locale (locale, charset); + else + /* Invalid string */ + FAIL; + } + /* We only support this subset of charsets. */ + switch (charset[0]) + { + case 'U': + case 'u': + if (strcasecmp (charset, "UTF-8") && strcasecmp (charset, "UTF8")) + FAIL; + strcpy (charset, "UTF-8"); + break; + case 'E': + case 'e': + if (strncasecmp (charset, "EUC", 3)) + FAIL; + c = charset + 3; + if (*c == '-') + ++c; + if (!strcasecmp (c, "JP")) + strcpy (charset, "EUCJP"); + /* Newlib does neither provide EUC-KR nor EUC-CN, and Cygwin's + implementation requires Windows support. */ + else if (!strcasecmp (c, "KR")) + strcpy (charset, "EUCKR"); + else if (!strcasecmp (c, "CN")) + strcpy (charset, "EUCCN"); + else + FAIL; + break; + case 'S': + case 's': + if (strcasecmp (charset, "SJIS")) + FAIL; + strcpy (charset, "SJIS"); + break; + case 'I': + case 'i': + /* Must be exactly one of ISO-8859-1, [...] ISO-8859-16, except for + ISO-8859-12. This code also recognizes the aliases without dashes. */ + if (strncasecmp (charset, "ISO", 3)) + FAIL; + c = charset + 3; + if (*c == '-') + ++c; + if (strncasecmp (c, "8859", 4)) + FAIL; + c += 4; + if (*c == '-') + ++c; + val = strtol (c, &end, 10); + if (val < 1 || val > 16 || val == 12 || *end) + FAIL; + strcpy (charset, "ISO-8859-"); + c = charset + 9; + if (val > 10) + *c++ = '1'; + *c++ = val % 10 + '0'; + *c = '\0'; + break; + case 'C': + case 'c': + if (charset[1] != 'P' && charset[1] != 'p') + FAIL; + strncpy (charset, "CP", 2); + val = strtol (charset + 2, &end, 10); + if (*end) + FAIL; + switch (val) + { + case 437: + case 720: + case 737: + case 775: + case 850: + case 852: + case 855: + case 857: + case 858: + case 862: + case 866: + case 874: + case 1125: + case 1250: + case 1251: + case 1252: + case 1253: + case 1254: + case 1255: + case 1256: + case 1257: + case 1258: + case 932: + break; + default: + FAIL; + } + break; + case 'K': + case 'k': + /* KOI8-R, KOI8-U and the aliases without dash */ + if (strncasecmp (charset, "KOI8", 4)) + FAIL; + c = charset + 4; + if (*c == '-') + ++c; + if (*c == 'R' || *c == 'r') + { + val = 20866; + strcpy (charset, "CP20866"); + } + else if (*c == 'U' || *c == 'u') + { + val = 21866; + strcpy (charset, "CP21866"); + } + else + FAIL; + break; + case 'A': + case 'a': + if (strcasecmp (charset, "ASCII")) + FAIL; + strcpy (charset, "ASCII"); + break; + case 'G': + case 'g': + /* Newlib does not provide GBK/GB2312 and Cygwin's implementation + requires Windows support. */ + if (!strcasecmp (charset, "GBK") + || !strcasecmp (charset, "GB2312")) + strcpy (charset, charset[2] == '2' ? "GB2312" : "GBK"); + else + /* GEORGIAN-PS and the alias without dash */ + if (!strncasecmp (charset, "GEORGIAN", 8)) + { + c = charset + 8; + if (*c == '-') + ++c; + if (strcasecmp (c, "PS")) + FAIL; + val = 101; + strcpy (charset, "CP101"); + } + else + FAIL; + break; + case 'P': + case 'p': + /* PT154 */ + if (strcasecmp (charset, "PT154")) + FAIL; + val = 102; + strcpy (charset, "CP102"); + break; + case 'T': + case 't': + if (strncasecmp (charset, "TIS", 3)) + FAIL; + c = charset + 3; + if (*c == '-') + ++c; + if (strcasecmp (c, "620")) + FAIL; + val = 874; + strcpy (charset, "CP874"); + break; + /* Newlib does not provide Big5 and Cygwin's implementation + requires Windows support. */ + case 'B': + case 'b': + if (strcasecmp (charset, "BIG5")) + FAIL; + strcpy (charset, "BIG5"); + break; + default: + FAIL; + } + + /* The following code is borrowed from nl_langinfo() + in newlib/libc/locale/nl_langinfo.c */ + /* Convert charset to Linux compatible codeset string. */ + const char *ret = charset; + if (ret[0] == 'A'/*SCII*/) + ret = "ANSI_X3.4-1968"; + else if (ret[0] == 'E') + { + if (strcmp (ret, "EUCJP") == 0) + ret = "EUC-JP"; + else if (strcmp (ret, "EUCKR") == 0) + ret = "EUC-KR"; + else if (strcmp (ret, "EUCCN") == 0) + ret = "GB2312"; + } + else if (ret[0] == 'C'/*Pxxxx*/) + { + if (strcmp (ret + 2, "874") == 0) + ret = "TIS-620"; + else if (strcmp (ret + 2, "20866") == 0) + ret = "KOI8-R"; + else if (strcmp (ret + 2, "21866") == 0) + ret = "KOI8-U"; + else if (strcmp (ret + 2, "101") == 0) + ret = "GEORGIAN-PS"; + else if (strcmp (ret + 2, "102") == 0) + ret = "PT154"; + } + else if (ret[0] == 'S'/*JIS*/) + { + /* Cygwin uses MSFT's implementation of SJIS, which differs + in some codepoints from the real thing, especially + 0x5c: yen sign instead of backslash, + 0x7e: overline instead of tilde. + We can't use the real SJIS since otherwise Win32 + pathnames would become invalid. OTOH, if we return + "SJIS" here, then libiconv will do mb<->wc conversion + differently to our internal functions. Therefore we + return what we really implement, CP932. This is handled + fine by libiconv. */ + ret = "CP932"; + } + + wchar_t lc[ENCODING_LEN + 1]; + wchar_t *p; + mbstowcs (lc, locale, ENCODING_LEN); + p = wcschr (lc, L'.'); + if (p) + *p = L'\0'; + p = wcschr (lc, L'_'); + if (p) + *p = L'-'; + LCID lcid = LocaleNameToLCID (lc, 0); +#if 0 + if (lcid == (LCID) -1) + return lcid; +#endif + if (!lcid && !strcmp (charset, "ASCII")) + return 0; + + /* Set results */ + strcpy(locale_out, new_locale); + strcpy(charset_out, ret); + return lcid; +} +#endif /* USE_OWN_NLS_FUNC */ + +void +fhandler_pty_slave::fixup_after_attach (bool native_maybe) +{ + if (getPseudoConsole ()) + { + if (fhandler_console::get_console_process_id (getHelperProcessId (), + true)) + { + if (!pcon_attached[get_minor ()]) + { + init_console_handler (true); +#if USE_OWN_NLS_FUNC + char locale[ENCODING_LEN + 1] = "C"; + char charset[ENCODING_LEN + 1] = "ASCII"; + LCID lcid = get_langinfo (locale, charset); +#else /* USE_OWN_NLS_FUNC */ + char env[ENCODING_LEN + 1]; + get_locale_from_env (env); + setlocale (LC_CTYPE, env); + const char *locale = setlocale (LC_CTYPE, NULL); +#if 0 + char tmp_locale[ENCODING_LEN + 1]; + char *ret = __set_locale_from_locale_alias (locale, tmp_locale); + if (ret) + locale = tmp_locale; +#endif + wchar_t lc[ENCODING_LEN + 1]; + wchar_t *p; + mbstowcs (lc, locale, ENCODING_LEN); + p = wcschr (lc, L'.'); + if (p) + *p = L'\0'; + p = wcschr (lc, L'@'); + if (p) + *p = L'\0'; + p = wcschr (lc, L'_'); + if (p) + *p = L'-'; + LCID lcid = LocaleNameToLCID (lc, 0); + const char *charset = nl_langinfo (CODESET); +#endif /* USE_OWN_NLS_FUNC */ + + /* Set console code page form locale */ + UINT CodePage; + if (lcid == 0 || lcid == (LCID) -1) + CodePage = 20127; /* ASCII */ + else if (!GetLocaleInfo (lcid, + LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER, + (char *) &CodePage, sizeof (CodePage))) + CodePage = 20127; /* ASCII */ + SetConsoleCP (CodePage); + SetConsoleOutputCP (CodePage); + + if (get_ttyp ()->num_pcon_attached_slaves == 0) + { + /* Set terminal code page from locale */ + /* This code is borrowed from mintty: charset.c */ + char charset_u[ENCODING_LEN + 1] = {0, }; + for (int i=0; charset[i] && iTermCodePage = 28590 + iso; + } + else if (sscanf (charset_u, "CP%u", &cp) == 1) + get_ttyp ()->TermCodePage = cp; + else + for (int i=0; cs_names[i].cp; i++) + if (strcasecmp (charset_u, cs_names[i].name) == 0) + { + get_ttyp ()->TermCodePage = cs_names[i].cp; + break; + } + } + +#if 1 /* Experimental code */ + /* Clear screen to synchronize pseudo console screen buffer + with real terminal. This is necessary because pseudo + console screen buffer is empty at start. */ + /* FIXME: Clearing sequence may not be "^[[H^[[J" + depending on the terminal type. */ + DWORD n; + if (get_ttyp ()->num_pcon_attached_slaves == 0 + && !ALWAYS_USE_PCON) + /* Assume this is the first process using this pty slave. */ + WriteFile (get_output_handle_cyg (), + "\033[H\033[J", 6, &n, NULL); +#endif + + pcon_attached[get_minor ()] = true; + get_ttyp ()->num_pcon_attached_slaves ++; + } + } + else + pcon_attached[get_minor ()] = false; + } + if (pcon_attached[get_minor ()] && native_maybe) + { + FlushConsoleInputBuffer (get_handle ()); + DWORD mode; + GetConsoleMode (get_handle (), &mode); + SetConsoleMode (get_handle (), mode | ENABLE_ECHO_INPUT); + Sleep (20); + if (get_ttyp ()->pcon_pid == 0 || + kill (get_ttyp ()->pcon_pid, 0) != 0) + get_ttyp ()->pcon_pid = myself->pid; + get_ttyp ()->switch_to_pcon = true; + } +} + void fhandler_pty_slave::fixup_after_fork (HANDLE parent) { + fixup_after_attach (false); // fork_fixup (parent, inuse, "inuse"); // fhandler_pty_common::fixup_after_fork (parent); report_tty_counts (this, "inherited", ""); @@ -1505,8 +2889,63 @@ fhandler_pty_slave::fixup_after_fork (HANDLE parent) void fhandler_pty_slave::fixup_after_exec () { + reset_switch_to_pcon (); + if (!close_on_exec ()) fixup_after_fork (NULL); + else if (getPseudoConsole ()) + { + int used = 0; + cygheap_fdenum cfd (false); + while (cfd.next () >= 0) + if (cfd->get_major () == DEV_PTYS_MAJOR && + cfd->get_minor () == get_minor ()) + used ++; + + /* Call FreeConsole() if no pty slave on this pty is + opened and the process is attached to the pseudo + console corresponding to this pty. This is needed + to make GNU screen and tmux work in Windows 10 1903. */ + if (used == 1 /* About to close this one */ && + fhandler_console::get_console_process_id (getHelperProcessId (), + true)) + { + init_console_handler (false); + FreeConsole (); + pcon_attached[get_minor ()] = false; + } + } + +#if USE_API_HOOK + /* Hook Console API */ + if (getPseudoConsole ()) + { +#define DO_HOOK(module, name) \ + if (!name##_Orig) \ + { \ + void *api = hook_api (module, #name, (void *) name##_Hooked); \ + name##_Orig = (__typeof__ (name) *) api; \ + if (!api) system_printf("Hooking " #name " failed."); \ + } + DO_HOOK ("kernel32.dll", WriteFile); + DO_HOOK ("kernel32.dll", WriteConsoleA); + DO_HOOK ("kernel32.dll", WriteConsoleW); + DO_HOOK ("kernel32.dll", ReadFile); + DO_HOOK ("kernel32.dll", ReadConsoleA); + DO_HOOK ("kernel32.dll", ReadConsoleW); + DO_HOOK ("kernel32.dll", WriteConsoleOutputA); + DO_HOOK ("kernel32.dll", WriteConsoleOutputW); + DO_HOOK ("kernel32.dll", WriteConsoleOutputCharacterA); + DO_HOOK ("kernel32.dll", WriteConsoleOutputCharacterW); + DO_HOOK ("kernel32.dll", WriteConsoleOutputAttribute); + DO_HOOK ("kernel32.dll", WriteConsoleInputA); + DO_HOOK ("kernel32.dll", WriteConsoleInputW); + DO_HOOK ("kernel32.dll", ReadConsoleInputA); + DO_HOOK ("kernel32.dll", ReadConsoleInputW); + DO_HOOK ("kernel32.dll", PeekConsoleInputA); + DO_HOOK ("kernel32.dll", PeekConsoleInputW); + } +#endif /* USE_API_HOOK */ } /* This thread function handles the master control pipe. It waits for a @@ -1544,7 +2983,7 @@ fhandler_pty_master::pty_master_thread () while (!exit && (ConnectNamedPipe (master_ctl, NULL) || GetLastError () == ERROR_PIPE_CONNECTED)) { - pipe_reply repl = { NULL, NULL, 0 }; + pipe_reply repl = { NULL, NULL, NULL, 0 }; bool deimp = false; NTSTATUS allow = STATUS_ACCESS_DENIED; ACCESS_MASK access = EVENT_MODIFY_STATE; @@ -1614,6 +3053,13 @@ fhandler_pty_master::pty_master_thread () termios_printf ("DuplicateHandle (from_master), %E"); goto reply; } + if (!DuplicateHandle (GetCurrentProcess (), from_master_cyg, + client, &repl.from_master_cyg, + 0, TRUE, DUPLICATE_SAME_ACCESS)) + { + termios_printf ("DuplicateHandle (from_master_cyg), %E"); + goto reply; + } if (!DuplicateHandle (GetCurrentProcess (), to_master, client, &repl.to_master, 0, TRUE, DUPLICATE_SAME_ACCESS)) @@ -1657,26 +3103,115 @@ DWORD fhandler_pty_master::pty_master_fwd_thread () { DWORD rlen; - char outbuf[OUT_BUFFER_SIZE]; + char outbuf[65536]; - termios_printf("Started."); + termios_printf ("Started."); for (;;) { - if (!ReadFile (get_handle (), outbuf, sizeof outbuf, &rlen, NULL)) + if (!ReadFile (from_slave, outbuf, sizeof outbuf, &rlen, NULL)) { termios_printf ("ReadFile for forwarding failed, %E"); break; } ssize_t wlen = rlen; + char *ptr = outbuf; + if (getPseudoConsole ()) + { + /* Avoid duplicating slave output which is already sent to + to_master_cyg */ + if (!check_switch_to_pcon ()) + continue; + + /* Avoid setting window title to "cygwin-console-helper.exe" */ + int state = 0; + int start_at = 0; + for (DWORD i=0; iTermCodePage != CP_UTF8) + { + size_t wlen2 = + MultiByteToWideChar (CP_UTF8, 0, + (char *)ptr, wlen, NULL, 0); + wchar_t *wbuf = (wchar_t *) + HeapAlloc (GetProcessHeap (), 0, wlen2 * sizeof (wchar_t)); + wlen2 = + MultiByteToWideChar (CP_UTF8, 0, + (char *)ptr, wlen, wbuf, wlen2); + nlen = WideCharToMultiByte (get_ttyp ()->TermCodePage, 0, + wbuf, wlen2, NULL, 0, NULL, NULL); + buf = (char *) HeapAlloc (GetProcessHeap (), 0, nlen); + nlen = WideCharToMultiByte (get_ttyp ()->TermCodePage, 0, + wbuf, wlen2, buf, nlen, NULL, NULL); + HeapFree (GetProcessHeap (), 0, wbuf); + } + else + { + /* Just copy */ + buf = (char *) HeapAlloc (GetProcessHeap (), 0, wlen); + memcpy (buf, (char *)ptr, wlen); + nlen = wlen; + } + ptr = buf; + wlen = rlen = nlen; + + /* OPOST processing was already done in pseudo console, + so just write it to to_master_cyg. */ + DWORD written; + acquire_output_mutex (INFINITE); + while (rlen>0) + { + if (!WriteFile (to_master_cyg, ptr, wlen, &written, NULL)) + { + termios_printf ("WriteFile for forwarding failed, %E"); + break; + } + ptr += written; + wlen = (rlen -= written); + } + release_output_mutex (); + HeapFree (GetProcessHeap (), 0, buf); + continue; + } + acquire_output_mutex (INFINITE); while (rlen>0) { - if (!process_opost_output (to_master_cyg, outbuf, wlen, false)) + if (!process_opost_output (to_master_cyg, ptr, wlen, false)) { termios_printf ("WriteFile for forwarding failed, %E"); break; } - rlen -= wlen; + ptr += wlen; + wlen = (rlen -= wlen); } + release_output_mutex (); } return 0; } @@ -1687,6 +3222,135 @@ pty_master_fwd_thread (VOID *arg) return ((fhandler_pty_master *) arg)->pty_master_fwd_thread (); } +/* If master process is running as service, attaching to + pseudo console should be done in fork. If attaching + is done in spawn for inetd or sshd, it fails because + the helper process is running as privileged user while + slave process is not. This function is used to determine + if the process is running as a srvice or not. */ +static bool +is_running_as_service (void) +{ + DWORD dwSize = 0; + PTOKEN_GROUPS pGroupInfo; + tmp_pathbuf tp; + pGroupInfo = (PTOKEN_GROUPS) tp.w_get (); + NtQueryInformationToken (hProcToken, TokenGroups, pGroupInfo, + 2 * NT_MAX_PATH, &dwSize); + for (DWORD i=0; iGroupCount; i++) + if (RtlEqualSid (well_known_service_sid, pGroupInfo->Groups[i].Sid)) + return true; + for (DWORD i=0; iGroupCount; i++) + if (RtlEqualSid (well_known_interactive_sid, pGroupInfo->Groups[i].Sid)) + return false; + return true; +} + +bool +fhandler_pty_master::setup_pseudoconsole () +{ + /* Pseudo console supprot is realized using a tricky technic. + PTY need the pseudo console handles, however, they cannot + be retrieved by normal procedure. Therefore, run a helper + process in a pseudo console and get them from the helper. + Slave process will attach to the pseudo console in the + helper process using AttachConsole(). */ + HMODULE hModule = GetModuleHandle ("kernel32.dll"); + FARPROC func = GetProcAddress (hModule, "CreatePseudoConsole"); + HRESULT (WINAPI *CreatePseudoConsole) + (COORD, HANDLE, HANDLE, DWORD, HPCON *) = NULL; + if (!func) + return false; + CreatePseudoConsole = + (HRESULT (WINAPI *) (COORD, HANDLE, HANDLE, DWORD, HPCON *)) func; + COORD size = {80, 25}; + CreatePipe (&from_master, &to_slave, &sec_none, 0); + HRESULT res = CreatePseudoConsole (size, from_master, to_master, + 0, &get_ttyp ()->hPseudoConsole); + if (res != S_OK) + { + system_printf ("CreatePseudoConsole() failed. %08x\n", + GetLastError()); + CloseHandle (from_master); + CloseHandle (to_slave); + from_master = from_master_cyg; + to_slave = NULL; + get_ttyp ()->hPseudoConsole = NULL; + return false; + } + + /* If master process is running as service, attaching to + pseudo console should be done in fork. If attaching + is done in spawn for inetd or sshd, it fails because + the helper process is running as privileged user while + slave process is not. */ + if (is_running_as_service ()) + get_ttyp ()->attach_pcon_in_fork = true; + + SIZE_T bytesRequired; + InitializeProcThreadAttributeList (NULL, 1, 0, &bytesRequired); + STARTUPINFOEXW si_helper; + ZeroMemory (&si_helper, sizeof (si_helper)); + si_helper.StartupInfo.cb = sizeof (STARTUPINFOEXW); + si_helper.lpAttributeList = (PPROC_THREAD_ATTRIBUTE_LIST) + HeapAlloc (GetProcessHeap (), 0, bytesRequired); + InitializeProcThreadAttributeList (si_helper.lpAttributeList, + 1, 0, &bytesRequired); + UpdateProcThreadAttribute (si_helper.lpAttributeList, + 0, + PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE, + get_ttyp ()->hPseudoConsole, + sizeof (get_ttyp ()->hPseudoConsole), + NULL, NULL); + HANDLE hello = CreateEvent (&sec_none, true, false, NULL); + HANDLE goodbye = CreateEvent (&sec_none, true, false, NULL); + /* Create a pipe for receiving pseudo console handles */ + HANDLE hr, hw; + CreatePipe (&hr, &hw, &sec_none, 0); + /* Create helper process */ + WCHAR cmd[MAX_PATH]; + path_conv helper ("/bin/cygwin-console-helper.exe"); + size_t len = helper.get_wide_win32_path_len (); + helper.get_wide_win32_path (cmd); + __small_swprintf (cmd + len, L" %p %p %p", hello, goodbye, hw); + si_helper.StartupInfo.dwFlags = STARTF_USESTDHANDLES; + si_helper.StartupInfo.hStdInput = NULL; + si_helper.StartupInfo.hStdOutput = NULL; + si_helper.StartupInfo.hStdError = NULL; + PROCESS_INFORMATION pi_helper; + CreateProcessW (NULL, cmd, &sec_none, &sec_none, + TRUE, EXTENDED_STARTUPINFO_PRESENT, + NULL, NULL, &si_helper.StartupInfo, &pi_helper); + WaitForSingleObject (hello, INFINITE); + /* Retrieve pseudo console handles */ + DWORD rLen; + char buf[64]; + ReadFile (hr, buf, sizeof (buf), &rLen, NULL); + buf[rLen] = '\0'; + HANDLE hpConIn, hpConOut; + sscanf (buf, "StdHandles=%p,%p", &hpConIn, &hpConOut); + DuplicateHandle (pi_helper.hProcess, hpConIn, + GetCurrentProcess (), &hpConIn, 0, + TRUE, DUPLICATE_SAME_ACCESS); + DuplicateHandle (pi_helper.hProcess, hpConOut, + GetCurrentProcess (), &hpConOut, 0, + TRUE, DUPLICATE_SAME_ACCESS); + CloseHandle (hr); + CloseHandle (hw); + /* Clean up */ + DeleteProcThreadAttributeList (si_helper.lpAttributeList); + HeapFree (GetProcessHeap (), 0, si_helper.lpAttributeList); + /* Setting information of stuffs regarding pseudo console */ + get_ttyp ()->hHelperGoodbye = goodbye; + get_ttyp ()->hHelperProcess = pi_helper.hProcess; + get_ttyp ()->HelperProcessId = pi_helper.dwProcessId; + CloseHandle (from_master); + CloseHandle (to_master); + from_master = hpConIn; + to_master = hpConOut; + return true; +} + bool fhandler_pty_master::setup () { @@ -1695,10 +3359,15 @@ fhandler_pty_master::setup () SECURITY_ATTRIBUTES sa = { sizeof (SECURITY_ATTRIBUTES), NULL, TRUE }; /* Find an unallocated pty to use. */ - int unit = cygwin_shared->tty.allocate (from_master, get_output_handle ()); + int unit = cygwin_shared->tty.allocate (from_master_cyg, get_output_handle ()); if (unit < 0) return false; + /* from_master should be used for pseudo console. + Just copy from_master_cyg here for the case that + pseudo console is not available. */ + from_master = from_master_cyg; + ProtectHandle1 (get_output_handle (), to_pty); tty& t = *cygwin_shared->tty[unit]; @@ -1715,7 +3384,7 @@ fhandler_pty_master::setup () char pipename[sizeof("ptyNNNN-to-master-cyg")]; __small_sprintf (pipename, "pty%d-to-master", unit); - res = fhandler_pipe::create (&sec_none, &get_handle (), &to_master, + res = fhandler_pipe::create (&sec_none, &from_slave, &to_master, fhandler_pty_common::pipesize, pipename, 0); if (res) { @@ -1724,7 +3393,7 @@ fhandler_pty_master::setup () } __small_sprintf (pipename, "pty%d-to-master-cyg", unit); - res = fhandler_pipe::create (&sec_none, &get_handle_cyg (), &to_master_cyg, + res = fhandler_pipe::create (&sec_none, &get_handle (), &to_master_cyg, fhandler_pty_common::pipesize, pipename, 0); if (res) { @@ -1732,7 +3401,7 @@ fhandler_pty_master::setup () goto err; } - ProtectHandle1 (get_handle (), from_pty); + ProtectHandle1 (from_slave, from_pty); __small_sprintf (pipename, "pty%d-echoloop", unit); res = fhandler_pipe::create (&sec_none, &echo_r, &echo_w, @@ -1797,7 +3466,10 @@ fhandler_pty_master::setup () goto err; } + setup_pseudoconsole (); + t.set_from_master (from_master); + t.set_from_master_cyg (from_master_cyg); t.set_to_master (to_master); t.set_to_master_cyg (to_master_cyg); t.winsize.ws_col = 80; @@ -1807,19 +3479,20 @@ fhandler_pty_master::setup () dev ().parse (DEV_PTYM_MAJOR, unit); termios_printf ("this %p, pty%d opened - from_pty <%p,%p>, to_pty %p", - this, unit, get_handle (), get_handle_cyg (), + this, unit, from_slave, get_handle (), get_output_handle ()); return true; err: __seterrno (); + close_maybe (from_slave); close_maybe (get_handle ()); - close_maybe (get_handle_cyg ()); close_maybe (get_output_handle ()); close_maybe (input_available_event); close_maybe (output_mutex); close_maybe (input_mutex); close_maybe (from_master); + close_maybe (from_master_cyg); close_maybe (to_master); close_maybe (to_master_cyg); close_maybe (echo_r); @@ -1840,14 +3513,20 @@ fhandler_pty_master::fixup_after_fork (HANDLE parent) if (myself->pid == t.master_pid) { t.set_from_master (arch->from_master); + t.set_from_master_cyg (arch->from_master_cyg); t.set_to_master (arch->to_master); t.set_to_master_cyg (arch->to_master_cyg); } arch->dwProcessId = wpid; } from_master = arch->from_master; + from_master_cyg = arch->from_master_cyg; to_master = arch->to_master; to_master_cyg = arch->to_master_cyg; +#if 0 /* Not sure if this is necessary. */ + from_slave = arch->from_slave; + to_slave = arch->to_slave; +#endif report_tty_counts (this, "inherited master", ""); } @@ -1857,7 +3536,8 @@ fhandler_pty_master::fixup_after_exec () if (!close_on_exec ()) fixup_after_fork (spawn_info->parent); else - from_master = to_master = to_master_cyg = NULL; + from_master = from_master_cyg = to_master = to_master_cyg = + from_slave = to_slave = NULL; } BOOL @@ -1865,6 +3545,9 @@ fhandler_pty_common::process_opost_output (HANDLE h, const void *ptr, ssize_t& l { ssize_t towrite = len; BOOL res = TRUE; + BOOL (WINAPI *WriteFunc) + (HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED); + WriteFunc = WriteFile_Orig ? WriteFile_Orig : WriteFile; while (towrite) { if (!is_echo) @@ -1887,7 +3570,7 @@ fhandler_pty_common::process_opost_output (HANDLE h, const void *ptr, ssize_t& l if (!(get_ttyp ()->ti.c_oflag & OPOST)) // raw output mode { DWORD n = MIN (OUT_BUFFER_SIZE, towrite); - res = WriteFile (h, ptr, n, &n, NULL); + res = WriteFunc (h, ptr, n, &n, NULL); if (!res) break; ptr = (char *) ptr + n; @@ -1899,7 +3582,6 @@ fhandler_pty_common::process_opost_output (HANDLE h, const void *ptr, ssize_t& l char *buf = (char *)ptr; DWORD n = 0; ssize_t rc = 0; - acquire_output_mutex (INFINITE); while (n < OUT_BUFFER_SIZE && rc < towrite) { switch (buf[rc]) @@ -1938,8 +3620,7 @@ fhandler_pty_common::process_opost_output (HANDLE h, const void *ptr, ssize_t& l break; } } - release_output_mutex (); - res = WriteFile (h, outbuf, n, &n, NULL); + res = WriteFunc (h, outbuf, n, &n, NULL); if (!res) break; ptr = (char *) ptr + rc; diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 7080144b9..0c089dbe9 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -134,6 +134,30 @@ child_info::prefork (bool detached) int __stdcall frok::child (volatile char * volatile here) { + cygheap_fdenum cfd (false); + while (cfd.next () >= 0) + if (cfd->get_major () == DEV_PTYM_MAJOR) + { + fhandler_base *fh = cfd; + fhandler_pty_master *ptym = (fhandler_pty_master *) fh; + if (ptym->getPseudoConsole () && + !fhandler_console::get_console_process_id ( + ptym->getHelperProcessId (), true)) + + { + debug_printf ("found a PTY master %d: helper_PID=%d", + ptym->get_minor (), ptym->getHelperProcessId ()); + if (ptym->attach_pcon_in_fork ()) + { + FreeConsole (); + if (!AttachConsole (ptym->getHelperProcessId ())) + /* Error */; + else + break; + } + } + } + HANDLE& hParent = ch.parent; sync_with_parent ("after longjmp", true); diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc index aeeeac772..851a7ffed 100644 --- a/winsup/cygwin/init.cc +++ b/winsup/cygwin/init.cc @@ -100,6 +100,7 @@ dll_entry (HANDLE h, DWORD reason, void *static_load) will always fall back to __global_locale, rather then crash due to _REENT->_locale having an arbitrary value. */ alloca_dummy = alloca (CYGTLS_PADSIZE); + ZeroMemory (alloca_dummy, CYGTLS_PADSIZE); memcpy (_REENT, _GLOBAL_REENT, sizeof (struct _reent)); dll_crt0_0 (); diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index ac73e0a88..d29f3d2f4 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -667,6 +667,9 @@ peek_pipe (select_record *s, bool from_select) fhm->flush_to_slave (); } break; + case DEV_PTYS_MAJOR: + ((fhandler_pty_slave *) fh)->reset_switch_to_pcon (); + break; default: if (fh->get_readahead_valid ()) { @@ -1178,17 +1181,32 @@ verify_tty_slave (select_record *me, fd_set *readfds, fd_set *writefds, return set_bits (me, readfds, writefds, exceptfds); } +static int +pty_slave_startup (select_record *s, select_stuff *) +{ + fhandler_base *fh = (fhandler_base *) s->fh; + ((fhandler_pty_slave *) fh)->mask_switch_to_pcon (true); + return 1; +} + +static void +pty_slave_cleanup (select_record *s, select_stuff *) +{ + fhandler_base *fh = (fhandler_base *) s->fh; + ((fhandler_pty_slave *) fh)->mask_switch_to_pcon (false); +} + select_record * fhandler_pty_slave::select_read (select_stuff *ss) { select_record *s = ss->start.next; s->h = input_available_event; - s->startup = no_startup; + s->startup = pty_slave_startup; s->peek = peek_pipe; s->verify = verify_tty_slave; s->read_selected = true; s->read_ready = false; - s->cleanup = NULL; + s->cleanup = pty_slave_cleanup; return s; } diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index d95772802..98612bd0f 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -259,6 +259,8 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, { bool rc; int res = -1; + DWORD pidRestore = 0; + bool attach_to_pcon = false; /* Check if we have been called from exec{lv}p or spawn{lv}p and mask mode to keep only the spawn mode. */ @@ -572,6 +574,58 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, PROCESS_QUERY_LIMITED_INFORMATION)) sa = &sec_none_nih; + /* Attach to pseudo console if pty salve is used */ + pidRestore = fhandler_console::get_console_process_id + (GetCurrentProcessId (), false); + fhandler_pty_slave *ptys = NULL; + for (int fd = 0; fd < 3; fd ++) + { + fhandler_base *fh = ::cygheap->fdtab[fd]; + if (fh && fh->get_major () == DEV_PTYS_MAJOR) + { + ptys = (fhandler_pty_slave *) fh; + if (ptys->getPseudoConsole () && + !fhandler_console::get_console_process_id ( + ptys->getHelperProcessId (), true)) + { + DWORD dwHelperProcessId = ptys->getHelperProcessId (); + debug_printf ("found a PTY slave %d: helper_PID=%d", + fh->get_minor (), dwHelperProcessId); + FreeConsole (); + if (!AttachConsole (dwHelperProcessId)) + { + /* Fallback */ + DWORD target[3] = { + STD_INPUT_HANDLE, + STD_OUTPUT_HANDLE, + STD_ERROR_HANDLE + }; + if (fd == 0) + { + ptys->set_handle (ptys->get_handle_cyg ()); + SetStdHandle (target[fd], + ptys->get_handle ()); + } + else + { + ptys->set_output_handle ( + ptys->get_output_handle_cyg ()); + SetStdHandle (target[fd], + ptys->get_output_handle ()); + } + } + else + { + init_console_handler (true); + attach_to_pcon = true; + break; + } + } + } + } + if (ptys) + ptys->fixup_after_attach (true); + loop: /* When ruid != euid we create the new process under the current original account and impersonate in child, this way maintaining the different @@ -869,6 +923,13 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, this->cleanup (); if (envblock) free (envblock); + + if (attach_to_pcon && pidRestore) + { + FreeConsole (); + AttachConsole (pidRestore); + } + return (int) res; } diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc index 35f8a59ae..b1eb5f3e4 100644 --- a/winsup/cygwin/strace.cc +++ b/winsup/cygwin/strace.cc @@ -279,6 +279,30 @@ strace::vprntf (unsigned category, const char *func, const char *fmt, va_list ap CloseHandle (h); } } +#if 1 /* Experimental code */ + /* PTY with pseudo console cannot display data written to + STD_ERROR_HANDLE (output_handle) if the process is cygwin + process. output_handle works only in native console apps. + Therefore the data should be written to output_handle_cyg + as well. */ + fhandler_base *fh = ::cygheap->fdtab[2]; + if (fh && fh->get_major () == DEV_PTYS_MAJOR) + { + fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; + if (ptys->getPseudoConsole ()) + { + HANDLE h_cyg = ptys->get_output_handle_cyg (); + if (buf[len-1] == '\n' && len < NT_MAX_PATH - 1) + { + buf[len-1] = '\r'; + buf[len] = '\n'; + len ++; + } + WriteFile (h_cyg, buf, len, &done, 0); + FlushFileBuffers (h_cyg); + } + } +#endif } #ifndef NOSTRACE diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index ad46cb312..9244267c0 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -234,7 +234,15 @@ tty::init () was_opened = false; master_pid = 0; is_console = false; + attach_pcon_in_fork = false; + hPseudoConsole = NULL; column = 0; + switch_to_pcon = false; + screen_alternated = false; + mask_switch_to_pcon = false; + pcon_pid = 0; + num_pcon_attached_slaves = 0; + TermCodePage = 20127; /* ASCII */ } HANDLE diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h index 9aee43b9c..d59b2027d 100644 --- a/winsup/cygwin/tty.h +++ b/winsup/cygwin/tty.h @@ -28,6 +28,8 @@ details. */ #define MIN_CTRL_C_SLOP 50 #endif +typedef void *HPCON; + #include class tty_min { @@ -88,14 +90,28 @@ public: private: HANDLE _from_master; + HANDLE _from_master_cyg; HANDLE _to_master; HANDLE _to_master_cyg; + HPCON hPseudoConsole; + HANDLE hHelperProcess; + DWORD HelperProcessId; + HANDLE hHelperGoodbye; + bool attach_pcon_in_fork; + bool switch_to_pcon; + bool screen_alternated; + bool mask_switch_to_pcon; + pid_t pcon_pid; + int num_pcon_attached_slaves; + UINT TermCodePage; public: - HANDLE from_master() const { return _from_master; } - HANDLE to_master() const { return _to_master; } - HANDLE to_master_cyg() const { return _to_master_cyg; } + HANDLE from_master () const { return _from_master; } + HANDLE from_master_cyg () const { return _from_master_cyg; } + HANDLE to_master () const { return _to_master; } + HANDLE to_master_cyg () const { return _to_master_cyg; } void set_from_master (HANDLE h) { _from_master = h; } + void set_from_master_cyg (HANDLE h) { _from_master_cyg = h; } void set_to_master (HANDLE h) { _to_master = h; } void set_to_master_cyg (HANDLE h) { _to_master_cyg = h; } @@ -117,7 +133,9 @@ public: void set_master_ctl_closed () {master_pid = -1;} static void __stdcall create_master (int); static void __stdcall init_session (); + friend class fhandler_pty_common; friend class fhandler_pty_master; + friend class fhandler_pty_slave; }; class tty_list diff --git a/winsup/utils/cygwin-console-helper.cc b/winsup/utils/cygwin-console-helper.cc index 0e04f4d18..ad451ecf5 100644 --- a/winsup/utils/cygwin-console-helper.cc +++ b/winsup/utils/cygwin-console-helper.cc @@ -1,12 +1,24 @@ #include +#include int main (int argc, char **argv) { char *end; - if (argc != 3) + if (argc < 3) exit (1); HANDLE h = (HANDLE) strtoull (argv[1], &end, 0); SetEvent (h); + if (argc == 4) /* Pseudo console helper mode for PTY */ + { + HANDLE hPipe = (HANDLE) strtoull (argv[3], &end, 0); + char buf[64]; + sprintf (buf, "StdHandles=%p,%p\n", + GetStdHandle (STD_INPUT_HANDLE), + GetStdHandle (STD_OUTPUT_HANDLE)); + DWORD dwLen; + WriteFile (hPipe, buf, strlen (buf), &dwLen, NULL); + CloseHandle (hPipe); + } h = (HANDLE) strtoull (argv[2], &end, 0); WaitForSingleObject (h, INFINITE); exit (0); From 483fb49ea0a3f5ad14c71f672c72d43a692e2957 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 29 Aug 2019 13:56:00 +0200 Subject: [PATCH 003/520] Cygwin: add W10 pseudo console support to release notes Signed-off-by: Corinna Vinschen --- winsup/cygwin/release/3.1.0 | 5 +++++ winsup/doc/new-features.xml | 19 +++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/winsup/cygwin/release/3.1.0 b/winsup/cygwin/release/3.1.0 index ccb63c317..12a5f323c 100644 --- a/winsup/cygwin/release/3.1.0 +++ b/winsup/cygwin/release/3.1.0 @@ -5,6 +5,11 @@ What's new: 1703 or later. Add fake 24 bit color support for legacy console, which uses the nearest color from 16 system colors. +- Support pseudo console in PTY. Pseudo console is a new feature + in Windows 10 1809, which provides console APIs on virtual + terminal. With this patch, native console applications can work + in PTYs such as mintty, ssh, gnu screen or tmux. + - New APIs: sched_getaffinity, sched_setaffinity, pthread_getaffinity_np, pthread_setaffinity_np, plus CPU_SET macros. diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml index 5fee581e7..118e37821 100644 --- a/winsup/doc/new-features.xml +++ b/winsup/doc/new-features.xml @@ -8,12 +8,6 @@ - -Eliminate a header file name collision with <X11/XLocale.h> on -case insensitive filesystems by reverting <xlocale.h> back to -<sys/_locale.h>. - - FIFOs can now be opened multiple times for writing. @@ -24,6 +18,19 @@ Add 24 bit color support using xterm compatibility mode in Windows 10 uses the nearest color from 16 system colors. + +Support pseudo console in PTY. Pseudo console is a new feature +in Windows 10 1809, which provides console APIs on virtual +terminal. With this patch, native console applications can work +in PTYs such as mintty, ssh, gnu screen or tmux. + + + +Eliminate a header file name collision with <X11/XLocale.h> on +case insensitive filesystems by reverting <xlocale.h> back to +<sys/_locale.h>. + + If a SA_SIGINFO signal handler changes the ucontext_t pointed to by the third parameter, follow it after returning from the handler. From c7113713845eaf31cbc44bdf12b2001414c92cbb Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 27 Aug 2019 07:46:47 -0500 Subject: [PATCH 004/520] riscv/include/fenv.h: Use shared fenv.h. libc/include/fenv.h was a direct copy of this file. --- newlib/libc/machine/riscv/include/fenv.h | 42 ------------------------ 1 file changed, 42 deletions(-) delete mode 100644 newlib/libc/machine/riscv/include/fenv.h diff --git a/newlib/libc/machine/riscv/include/fenv.h b/newlib/libc/machine/riscv/include/fenv.h deleted file mode 100644 index 4795cc925..000000000 --- a/newlib/libc/machine/riscv/include/fenv.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2017 SiFive Inc. All rights reserved. - - This copyrighted material is made available to anyone wishing to use, - modify, copy, or redistribute it subject to the terms and conditions - of the FreeBSD License. This program is distributed in the hope that - it will be useful, but WITHOUT ANY WARRANTY expressed or implied, - including the implied warranties of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. A copy of this license is available at - http://www.opensource.org/licenses. -*/ - -#ifndef _FENV_H -#define _FENV_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Exception */ -int feclearexcept(int excepts); -int fegetexceptflag(fexcept_t *flagp, int excepts); -int feraiseexcept(int excepts); -int fesetexceptflag(const fexcept_t *flagp, int excepts); -int fetestexcept(int excepts); - -/* Rounding mode */ -int fegetround(void); -int fesetround(int rounding_mode); - -/* Float environment */ -int fegetenv(fenv_t *envp); -int feholdexcept(fenv_t *envp); -int fesetenv(const fenv_t *envp); -int feupdateenv(const fenv_t *envp); - -#ifdef __cplusplus -} -#endif - -#endif From 1082cd8ea270ce33bbcb64d4bc96fa36351184c7 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 28 Aug 2019 12:22:41 -0500 Subject: [PATCH 005/520] fe_dfl_env.c: Fix typo in comment --- newlib/libm/fenv/fe_dfl_env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libm/fenv/fe_dfl_env.c b/newlib/libm/fenv/fe_dfl_env.c index 0606327fa..a52cd45e4 100644 --- a/newlib/libm/fenv/fe_dfl_env.c +++ b/newlib/libm/fenv/fe_dfl_env.c @@ -32,7 +32,7 @@ * This is a non-functional implementation that should be overridden * by an architecture specific implementation in newlib/libm/machine/ARCH. * - * The implementation must defined FE_DFL_ENV to point to a default + * The implementation must define FE_DFL_ENV to point to a default * environment of type fenv_t. */ From 7630c77026da1c98a0c77f50ad3fbd4589a7a260 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 3 Sep 2019 12:45:55 +0200 Subject: [PATCH 006/520] Cygwin: sys/wait.h: Add _wait prototype to avoid compiler warning Signed-off-by: Corinna Vinschen --- winsup/cygwin/include/sys/wait.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/winsup/cygwin/include/sys/wait.h b/winsup/cygwin/include/sys/wait.h index 97e5d9998..1ed1f5a2e 100644 --- a/winsup/cygwin/include/sys/wait.h +++ b/winsup/cygwin/include/sys/wait.h @@ -22,6 +22,10 @@ pid_t waitpid (pid_t __pid, int *__status, int __options); pid_t wait3 (int *__status, int __options, struct rusage *__rusage); pid_t wait4 (pid_t __pid, int *__status, int __options, struct rusage *__rusage); +#ifdef _COMPILING_NEWLIB +pid_t _wait (int *); +#endif + #ifdef __cplusplus } #endif From fa29288ef162250ce67499832ca0f471b2a1c949 Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Tue, 3 Sep 2019 09:35:18 -0600 Subject: [PATCH 007/520] Adjust nios2 and m68k semihosting for sys/stat.h changes. Commit 72ff9acad2ab54e80a19ddaec0106065c817e3f6 caused st_atime, st_ctime, and st_mtime to be defined as macros. This collided with use of these identifiers as field names in struct gdb_stat (which represents the GDB RSP encoding of struct stat) in libgloss semihosting support for nios2 and m68k. This patch renames the affected fields of struct gdb_stat. Signed-off-by: Sandra Loosemore --- libgloss/m68k/io-gdb.c | 6 +++--- libgloss/m68k/io.h | 6 +++--- libgloss/nios2/io-gdb.c | 6 +++--- libgloss/nios2/io.h | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libgloss/m68k/io-gdb.c b/libgloss/m68k/io-gdb.c index 4f16b2f7b..e662226e3 100644 --- a/libgloss/m68k/io-gdb.c +++ b/libgloss/m68k/io-gdb.c @@ -94,9 +94,9 @@ __hosted_from_gdb_stat (const struct gdb_stat *gs, s->st_size = gs->st_size; s->st_blksize = gs->st_blksize; s->st_blocks = gs->st_blocks; - s->st_atime = gs->st_atime; - s->st_mtime = gs->st_mtime; - s->st_ctime = gs->st_ctime; + s->st_atime = gs->st_atim; + s->st_mtime = gs->st_mtim; + s->st_ctime = gs->st_ctim; } void diff --git a/libgloss/m68k/io.h b/libgloss/m68k/io.h index b6b228739..be947283e 100644 --- a/libgloss/m68k/io.h +++ b/libgloss/m68k/io.h @@ -58,9 +58,9 @@ struct gdb_stat { uint64_t st_size; /* total size, in bytes */ uint64_t st_blksize; /* blocksize for filesystem I/O */ uint64_t st_blocks; /* number of blocks allocated */ - gdb_time_t st_atime; /* time of last access */ - gdb_time_t st_mtime; /* time of last modification */ - gdb_time_t st_ctime; /* time of last change */ + gdb_time_t st_atim; /* time of last access */ + gdb_time_t st_mtim; /* time of last modification */ + gdb_time_t st_ctim; /* time of last change */ }; struct gdb_timeval { diff --git a/libgloss/nios2/io-gdb.c b/libgloss/nios2/io-gdb.c index ee585595a..48a5be603 100644 --- a/libgloss/nios2/io-gdb.c +++ b/libgloss/nios2/io-gdb.c @@ -106,9 +106,9 @@ __hosted_from_gdb_stat (const struct gdb_stat *gs, s->st_size = SWAP64 (gs->st_size); s->st_blksize = SWAP64 (gs->st_blksize); s->st_blocks = SWAP64 (gs->st_blocks); - s->st_atime = SWAP32 (gs->st_atime); - s->st_mtime = SWAP32 (gs->st_mtime); - s->st_ctime = SWAP32 (gs->st_ctime); + s->st_atime = SWAP32 (gs->st_atim); + s->st_mtime = SWAP32 (gs->st_mtim); + s->st_ctime = SWAP32 (gs->st_ctim); } void diff --git a/libgloss/nios2/io.h b/libgloss/nios2/io.h index e11843516..1acc16a2d 100644 --- a/libgloss/nios2/io.h +++ b/libgloss/nios2/io.h @@ -57,9 +57,9 @@ struct gdb_stat { uint64_t st_size; /* total size, in bytes */ uint64_t st_blksize; /* blocksize for filesystem I/O */ uint64_t st_blocks; /* number of blocks allocated */ - gdb_time_t st_atime; /* time of last access */ - gdb_time_t st_mtime; /* time of last modification */ - gdb_time_t st_ctime; /* time of last change */ + gdb_time_t st_atim; /* time of last access */ + gdb_time_t st_mtim; /* time of last modification */ + gdb_time_t st_ctim; /* time of last change */ }; struct gdb_timeval { From 9adb260181fa148fad0e91c55e41ea6d75eb8eb8 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 4 Sep 2019 10:44:23 +0900 Subject: [PATCH 008/520] Cygwin: pty: Code cleanup - Cleanup the code which is commented out by #if 0 regarding pseudo console. - Remove #if 1 for experimental code which seems to be stable. --- winsup/cygwin/fhandler_tty.cc | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index dd5ab528a..4dbe96b4a 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -855,26 +855,6 @@ fhandler_pty_slave::cleanup () int fhandler_pty_slave::close () { -#if 0 - if (getPseudoConsole ()) - { - INPUT_RECORD inp[128]; - DWORD n; - PeekFunc = - PeekConsoleInputA_Orig ? PeekConsoleInputA_Orig : PeekConsoleInput; - PeekFunc (get_handle (), inp, 128, &n); - bool pipe_empty = true; - while (n-- > 0) - if (inp[n].EventType == KEY_EVENT && inp[n].Event.KeyEvent.bKeyDown) - pipe_empty = false; - if (pipe_empty) - { - /* Flush input buffer */ - size_t len = UINT_MAX; - read (NULL, len); - } - } -#endif termios_printf ("closing last open %s handle", ttyname ()); if (inuse && !CloseHandle (inuse)) termios_printf ("CloseHandle (inuse), %E"); @@ -1524,7 +1504,6 @@ fhandler_pty_slave::read (void *ptr, size_t& len) out: termios_printf ("%d = read(%p, %lu)", totalread, ptr, len); len = (size_t) totalread; -#if 1 /* Experimenta code */ /* Push slave read as echo to pseudo console screen buffer. */ if (getPseudoConsole () && ptr0 && (get_ttyp ()->ti.c_lflag & ECHO)) { @@ -1532,7 +1511,6 @@ out: push_to_pcon_screenbuffer (ptr0, len); release_output_mutex (); } -#endif mask_switch_to_pcon (false); } @@ -2748,10 +2726,6 @@ restart: if (p) *p = L'-'; LCID lcid = LocaleNameToLCID (lc, 0); -#if 0 - if (lcid == (LCID) -1) - return lcid; -#endif if (!lcid && !strcmp (charset, "ASCII")) return 0; @@ -2842,7 +2816,6 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe) } } -#if 1 /* Experimental code */ /* Clear screen to synchronize pseudo console screen buffer with real terminal. This is necessary because pseudo console screen buffer is empty at start. */ @@ -2854,7 +2827,6 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe) /* Assume this is the first process using this pty slave. */ WriteFile (get_output_handle_cyg (), "\033[H\033[J", 6, &n, NULL); -#endif pcon_attached[get_minor ()] = true; get_ttyp ()->num_pcon_attached_slaves ++; From bddb018e10e90ea300537d5a13999558b7dce476 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 4 Sep 2019 10:44:24 +0900 Subject: [PATCH 009/520] Cygwin: pty: Speed up a little hooked Win32 API for pseudo console. - Some Win32 APIs are hooked in pty code for pseudo console support. This causes slow down. This patch improves speed a little. --- winsup/cygwin/fhandler_tty.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 4dbe96b4a..94ef2f8d4 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -155,7 +155,9 @@ DEF_HOOK (PeekConsoleInputW); #define CHK_CONSOLE_ACCESS(h) \ { \ DWORD dummy; \ - if (!isHybrid && GetConsoleMode (h, &dummy)) \ + if (!isHybrid \ + && GetFileType (h) == FILE_TYPE_CHAR \ + && GetConsoleMode (h, &dummy)) \ { \ isHybrid = true; \ set_switch_to_pcon (); \ From ffbb9b49711f6a8e3c4f83b226ff9476327dcb61 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 4 Sep 2019 10:44:25 +0900 Subject: [PATCH 010/520] Cygwin: pty: Move function hook_api() into hookapi.cc. - PTY uses Win32 API hook for pseudo console suppot. The function hook_api() is used for this purpose and defined in fhandler_tty.cc previously. This patch moves it into hookapi.cc. --- winsup/cygwin/fhandler_tty.cc | 44 ----------------------------------- winsup/cygwin/hookapi.cc | 34 +++++++++++++++++++++++++++ winsup/cygwin/winsup.h | 1 + 3 files changed, 35 insertions(+), 44 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 94ef2f8d4..f76f7b262 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -75,50 +75,6 @@ static bool pcon_attached[NTTYS]; static bool isHybrid; #if USE_API_HOOK -/* Hook WIN32 API */ -static -void *hook_api (const char *mname, const char *name, const void *fn) -{ - HMODULE hm = GetModuleHandle (mname); - PIMAGE_NT_HEADERS pExeNTHdr = PIMAGE_NT_HEADERS (PBYTE (hm) - + PIMAGE_DOS_HEADER (hm)->e_lfanew); - DWORD importRVA = pExeNTHdr->OptionalHeader.DataDirectory - [IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress; - PIMAGE_IMPORT_DESCRIPTOR pdfirst = - (PIMAGE_IMPORT_DESCRIPTOR) ((char *) hm + importRVA); - for (PIMAGE_IMPORT_DESCRIPTOR pd = pdfirst; pd->FirstThunk; pd++) - { - if (pd->OriginalFirstThunk == 0) - continue; - PIMAGE_THUNK_DATA pt = - (PIMAGE_THUNK_DATA) ((char *) hm + pd->FirstThunk); - PIMAGE_THUNK_DATA pn = - (PIMAGE_THUNK_DATA) ((char *) hm + pd->OriginalFirstThunk); - for (PIMAGE_THUNK_DATA pi = pt; pn->u1.Ordinal; pi++, pn++) - { - if (IMAGE_SNAP_BY_ORDINAL (pn->u1.Ordinal)) - continue; - PIMAGE_IMPORT_BY_NAME pimp = - (PIMAGE_IMPORT_BY_NAME) ((char *) hm + pn->u1.AddressOfData); - if (strcmp (name, (char *) pimp->Name) != 0) - continue; -#ifdef __x86_64__ -#define THUNK_FUNC_TYPE ULONGLONG -#else -#define THUNK_FUNC_TYPE DWORD -#endif - DWORD ofl = PAGE_READWRITE; - if (!VirtualProtect (pi, sizeof (THUNK_FUNC_TYPE), ofl, &ofl)) - return NULL; - void *origfn = (void *) pi->u1.Function; - pi->u1.Function = (THUNK_FUNC_TYPE) fn; - VirtualProtect (pi, sizeof (THUNK_FUNC_TYPE), ofl, &ofl); - return origfn; - } - } - return NULL; -} - static void set_switch_to_pcon (void) { diff --git a/winsup/cygwin/hookapi.cc b/winsup/cygwin/hookapi.cc index 4078e65bd..dcd9b1df8 100644 --- a/winsup/cygwin/hookapi.cc +++ b/winsup/cygwin/hookapi.cc @@ -428,6 +428,40 @@ hook_or_detect_cygwin (const char *name, const void *fn, WORD& subsys, HANDLE h) return fh.origfn; } +/* Hook a function in any DLL such as kernel32.dll */ +/* The DLL must be loaded in advance. */ +/* Used in fhandler_tty.cc */ +void *hook_api (const char *mname, const char *name, const void *fn) +{ + HMODULE hm = GetModuleHandle (mname); + PIMAGE_NT_HEADERS pExeNTHdr = + rva (PIMAGE_NT_HEADERS, hm, PIMAGE_DOS_HEADER (hm)->e_lfanew); + DWORD importRVA = pExeNTHdr->OptionalHeader.DataDirectory + [IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress; + PIMAGE_IMPORT_DESCRIPTOR pdfirst = + rva (PIMAGE_IMPORT_DESCRIPTOR, hm, importRVA); + for (PIMAGE_IMPORT_DESCRIPTOR pd = pdfirst; pd->FirstThunk; pd++) + { + if (pd->OriginalFirstThunk == 0) + continue; + PIMAGE_THUNK_DATA pt = rva (PIMAGE_THUNK_DATA, hm, pd->FirstThunk); + PIMAGE_THUNK_DATA pn = + rva (PIMAGE_THUNK_DATA, hm, pd->OriginalFirstThunk); + for (PIMAGE_THUNK_DATA pi = pt; pn->u1.Ordinal; pi++, pn++) + { + if (IMAGE_SNAP_BY_ORDINAL (pn->u1.Ordinal)) + continue; + PIMAGE_IMPORT_BY_NAME pimp = + rva (PIMAGE_IMPORT_BY_NAME, hm, pn->u1.AddressOfData); + if (strcmp (name, (char *) pimp->Name) != 0) + continue; + void *origfn = putmem (pi, fn); + return origfn; + } + } + return NULL; +} + void ld_preload () { diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h index 95ab41e6b..ab7b3bbdc 100644 --- a/winsup/cygwin/winsup.h +++ b/winsup/cygwin/winsup.h @@ -199,6 +199,7 @@ ino_t __reg2 hash_path_name (ino_t hash, const char *name); void __reg2 nofinalslash (const char *src, char *dst); void __reg3 *hook_or_detect_cygwin (const char *, const void *, WORD&, HANDLE h = NULL); +void __reg3 *hook_api (const char *mname, const char *name, const void *fn); /* Time related */ void __stdcall totimeval (struct timeval *, PLARGE_INTEGER, int, int); From 583102e7c9255ae25310154995f855e4f573f81c Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 4 Sep 2019 10:45:35 +0900 Subject: [PATCH 011/520] Cygwin: pty: Fix state management for pseudo console support. - Pseudo console support introduced by commit 169d65a5774acc76ce3f3feeedcbae7405aa9b57 has some bugs which cause mismatch between state variables and real pseudo console state regarding console attaching and r/w pipe switching. This patch fixes this issue by redesigning the state management. --- winsup/cygwin/dtable.cc | 38 +-- winsup/cygwin/fhandler.h | 6 +- winsup/cygwin/fhandler_console.cc | 25 +- winsup/cygwin/fhandler_tty.cc | 383 ++++++++++++++++-------------- winsup/cygwin/fork.cc | 24 +- winsup/cygwin/spawn.cc | 69 +++--- 6 files changed, 290 insertions(+), 255 deletions(-) diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index ba5d16206..4e9b6ed56 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -147,18 +147,16 @@ dtable::get_debugger_info () void dtable::stdio_init () { - bool need_fixup_handle = false; - fhandler_pty_slave *ptys = NULL; - bool is_pty[3] = {false, false, false}; - for (int fd = 0; fd < 3; fd ++) + int chk_order[] = {1, 0, 2}; + for (int i = 0; i < 3; i ++) { + int fd = chk_order[i]; fhandler_base *fh = cygheap->fdtab[fd]; if (fh && fh->get_major () == DEV_PTYS_MAJOR) { - ptys = (fhandler_pty_slave *) fh; + fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; if (ptys->getPseudoConsole ()) { - is_pty[fd] = true; bool attached = !!fhandler_console::get_console_process_id (ptys->getHelperProcessId (), true); if (!attached) @@ -167,15 +165,12 @@ dtable::stdio_init () by some reason. This happens if the executable is a windows GUI binary, such as mintty. */ FreeConsole (); - AttachConsole (ptys->getHelperProcessId ()); - need_fixup_handle = true; + if (AttachConsole (ptys->getHelperProcessId ())) + break; } - ptys->reset_switch_to_pcon (); } } } - if (need_fixup_handle) - goto fixup_handle; if (myself->cygstarted || ISSTATE (myself, PID_CYGPARENT)) { @@ -185,27 +180,6 @@ dtable::stdio_init () return; } -fixup_handle: - if (need_fixup_handle) - { - HANDLE h; - h = CreateFile ("CONIN$", GENERIC_READ, FILE_SHARE_READ, - NULL, OPEN_EXISTING, 0, 0); - if (is_pty[0]) - { - SetStdHandle (STD_INPUT_HANDLE, h); - ptys->set_handle (h); - } - h = CreateFile ("CONOUT$", GENERIC_WRITE, FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, 0, 0); - if (is_pty[1]) - SetStdHandle (STD_OUTPUT_HANDLE, h); - if (is_pty[2]) - SetStdHandle (STD_ERROR_HANDLE, h); - if (is_pty[1] || is_pty[2]) - ptys->set_output_handle (h); - } - HANDLE in = GetStdHandle (STD_INPUT_HANDLE); HANDLE out = GetStdHandle (STD_OUTPUT_HANDLE); HANDLE err = GetStdHandle (STD_ERROR_HANDLE); diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index c75e40c0a..e8c165100 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -2106,19 +2106,22 @@ class fhandler_pty_common: public fhandler_termios protected: BOOL process_opost_output (HANDLE h, const void *ptr, ssize_t& len, bool is_echo); - bool check_switch_to_pcon (void); }; class fhandler_pty_slave: public fhandler_pty_common { HANDLE inuse; // used to indicate that a tty is in use HANDLE output_handle_cyg, io_handle_cyg; + DWORD pid_restore; /* Helper functions for fchmod and fchown. */ bool fch_open_handles (bool chown); int fch_set_sd (security_descriptor &sd, bool chown); void fch_close_handles (); + bool try_reattach_pcon (); + void restore_reattach_pcon (); + public: /* Constructor */ fhandler_pty_slave (int); @@ -2172,7 +2175,6 @@ class fhandler_pty_slave: public fhandler_pty_common void set_switch_to_pcon (void); void reset_switch_to_pcon (void); void push_to_pcon_screenbuffer (const char *ptr, size_t len); - bool has_master_opened (void); void mask_switch_to_pcon (bool mask) { get_ttyp ()->mask_switch_to_pcon = mask; diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 997c50d23..1b034f4b9 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -3136,16 +3136,29 @@ DWORD fhandler_console::get_console_process_id (DWORD pid, bool match) { DWORD tmp; - int num = GetConsoleProcessList (&tmp, 1); - DWORD *list = (DWORD *) - HeapAlloc (GetProcessHeap (), 0, num * sizeof (DWORD)); - num = GetConsoleProcessList (list, num); + DWORD num, num_req; + num = 1; + num_req = GetConsoleProcessList (&tmp, num); + DWORD *list; + while (true) + { + list = (DWORD *) + HeapAlloc (GetProcessHeap (), 0, num_req * sizeof (DWORD)); + num = num_req; + num_req = GetConsoleProcessList (list, num); + if (num_req > num) + HeapFree (GetProcessHeap (), 0, list); + else + break; + } + num = num_req; + tmp = 0; - for (int i=0; iset_switch_to_pcon (); - return; } } @@ -339,25 +338,6 @@ fhandler_pty_common::__release_output_mutex (const char *fn, int ln) #endif } -static bool switch_to_pcon_prev; - -bool -fhandler_pty_common::check_switch_to_pcon (void) -{ - bool switch_to_pcon_now = get_ttyp ()->switch_to_pcon; - if (!isHybrid && !switch_to_pcon_prev && switch_to_pcon_now) - { - Sleep (40); - /* Check again */ - switch_to_pcon_now = get_ttyp ()->switch_to_pcon; - if (switch_to_pcon_now) - switch_to_pcon_prev = true; - } - else - switch_to_pcon_prev = switch_to_pcon_now; - return switch_to_pcon_prev; -} - /* Process pty input. */ void @@ -553,7 +533,7 @@ out: fhandler_pty_slave::fhandler_pty_slave (int unit) : fhandler_pty_common (), inuse (NULL), output_handle_cyg (NULL), - io_handle_cyg (NULL) + io_handle_cyg (NULL), pid_restore (0) { if (unit >= 0) dev ().parse (DEV_PTYS_MAJOR, unit); @@ -562,32 +542,33 @@ fhandler_pty_slave::fhandler_pty_slave (int unit) fhandler_pty_slave::~fhandler_pty_slave () { if (!get_ttyp ()) - { - /* Why it comes here? */ - init_console_handler (false); - FreeConsole (); - pcon_attached[get_minor ()] = false; - } - else if (getPseudoConsole ()) + /* Why comes here? Who clears _tc? */ + return; + if (getPseudoConsole ()) { int used = 0; + int attached = 0; cygheap_fdenum cfd (false); while (cfd.next () >= 0) - if (cfd->get_major () == DEV_PTYS_MAJOR && - cfd->get_minor () == get_minor ()) - used ++; + { + if (cfd->get_major () == DEV_PTYS_MAJOR || + cfd->get_major () == DEV_CONS_MAJOR) + used ++; + if (cfd->get_major () == DEV_PTYS_MAJOR && + cfd->get_minor () == pcon_attached_to) + attached ++; + } - /* Call FreeConsole() if no pty slave on this pty is - opened and the process is attached to the pseudo - console corresponding to this pty. This is needed - to make GNU screen and tmux work in Windows 10 1903. */ - if (used == 0 && - fhandler_console::get_console_process_id (getHelperProcessId (), - true)) + /* Call FreeConsole() if no tty is opened and the process + is attached to console corresponding to tty. This is + needed to make GNU screen and tmux work in Windows 10 + 1903. */ + if (attached == 0) + pcon_attached_to = -1; + if (used == 0) { init_console_handler (false); FreeConsole (); - pcon_attached[get_minor ()] = false; } } } @@ -771,7 +752,27 @@ fhandler_pty_slave::open (int flags, mode_t) set_output_handle (to_master_local); set_output_handle_cyg (to_master_cyg_local); - fhandler_console::need_invisible (); + if (!getPseudoConsole ()) + { + fhandler_console::need_invisible (); + pcon_attached_to = -1; + } + else if (!fhandler_console::get_console_process_id + (GetCurrentProcessId (), true)) + { + fhandler_console::need_invisible (); + pcon_attached_to = -1; + } + else if (fhandler_console::get_console_process_id + (getHelperProcessId (), true)) + /* Attached to pcon of this pty */ + { + pcon_attached_to = get_minor (); + init_console_handler (true); + } + else if (pcon_attached_to < 0) + fhandler_console::need_invisible (); + set_open_status (); return 1; @@ -824,12 +825,13 @@ fhandler_pty_slave::close () if (!ForceCloseHandle (get_handle_cyg ())) termios_printf ("CloseHandle (get_handle_cyg ()<%p>), %E", get_handle_cyg ()); - if ((unsigned) myself->ctty == FHDEV (DEV_PTYS_MAJOR, get_minor ())) + if (!getPseudoConsole () && + (unsigned) myself->ctty == FHDEV (DEV_PTYS_MAJOR, get_minor ())) fhandler_console::free_console (); /* assumes that we are the last pty closer */ fhandler_pty_common::close (); if (!ForceCloseHandle (output_mutex)) termios_printf ("CloseHandle (output_mutex<%p>), %E", output_mutex); - if (pcon_attached[get_minor ()]) + if (pcon_attached_to == get_minor ()) get_ttyp ()->num_pcon_attached_slaves --; return 0; } @@ -874,14 +876,53 @@ fhandler_pty_slave::init (HANDLE h, DWORD a, mode_t) return ret; } +bool +fhandler_pty_slave::try_reattach_pcon (void) +{ + pid_restore = 0; + + /* Do not detach from the console because re-attaching will + fail if helper process is running as service account. */ + if (pcon_attached_to >= 0 && + cygwin_shared->tty[pcon_attached_to]->attach_pcon_in_fork) + return false; + + pid_restore = + fhandler_console::get_console_process_id (GetCurrentProcessId (), + false); + /* If pid_restore is not set, give up. */ + if (!pid_restore) + return false; + + FreeConsole (); + if (!AttachConsole (getHelperProcessId ())) + { + system_printf ("pty%d: AttachConsole(helper=%d) failed. 0x%08lx", + get_minor (), getHelperProcessId (), GetLastError ()); + return false; + } + return true; +} + +void +fhandler_pty_slave::restore_reattach_pcon (void) +{ + if (pid_restore) + { + FreeConsole (); + if (!AttachConsole (pid_restore)) + { + system_printf ("pty%d: AttachConsole(restore=%d) failed. 0x%08lx", + get_minor (), pid_restore, GetLastError ()); + pcon_attached_to = -1; + } + } + pid_restore = 0; +} + void fhandler_pty_slave::set_switch_to_pcon (void) { - if (!pcon_attached[get_minor ()]) - { - isHybrid = false; - return; - } if (!isHybrid) { reset_switch_to_pcon (); @@ -889,6 +930,16 @@ fhandler_pty_slave::set_switch_to_pcon (void) } if (!get_ttyp ()->switch_to_pcon) { + pid_restore = 0; + if (pcon_attached_to != get_minor ()) + if (!try_reattach_pcon ()) + goto skip_console_setting; + FlushConsoleInputBuffer (get_handle ()); + DWORD mode; + GetConsoleMode (get_handle (), &mode); + SetConsoleMode (get_handle (), mode | ENABLE_ECHO_INPUT); +skip_console_setting: + restore_reattach_pcon (); Sleep (20); if (get_ttyp ()->pcon_pid == 0 || kill (get_ttyp ()->pcon_pid, 0) != 0) @@ -904,7 +955,7 @@ fhandler_pty_slave::reset_switch_to_pcon (void) return; if (isHybrid) { - set_switch_to_pcon (); + this->set_switch_to_pcon (); return; } if (get_ttyp ()->pcon_pid && @@ -918,7 +969,7 @@ fhandler_pty_slave::reset_switch_to_pcon (void) DWORD mode; GetConsoleMode (get_handle (), &mode); SetConsoleMode (get_handle (), mode & ~ENABLE_ECHO_INPUT); - Sleep (60); /* Wait for pty_master_fwd_thread() */ + Sleep (20); /* Wait for pty_master_fwd_thread() */ } get_ttyp ()->pcon_pid = 0; get_ttyp ()->switch_to_pcon = false; @@ -927,43 +978,31 @@ fhandler_pty_slave::reset_switch_to_pcon (void) void fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) { - DWORD pidRestore = 0; - if (!fhandler_console::get_console_process_id (getHelperProcessId (), true)) - if (pcon_attached[get_minor ()]) - { - Sleep (20); - /* Check again */ - if (!fhandler_console::get_console_process_id - (getHelperProcessId (), true)) - { - system_printf ("pty%d: pcon_attach mismatch?????? (%p)", - get_minor (), this); - //pcon_attached[get_minor ()] = false; - return; - } - } - /* If not attached pseudo console yet, try to attach temporally. */ - if (!pcon_attached[get_minor ()]) + bool attached = + !!fhandler_console::get_console_process_id (getHelperProcessId (), true); + if (!attached && pcon_attached_to == get_minor ()) { - if (has_master_opened ()) - return; - - pidRestore = - fhandler_console::get_console_process_id (GetCurrentProcessId (), - false); - /* If pidRestore is not set, give up to push. */ - if (!pidRestore) - return; - - FreeConsole (); - if (!AttachConsole (getHelperProcessId ())) + for (DWORD t0 = GetTickCount (); GetTickCount () - t0 < 100; ) { - system_printf ("pty%d: AttachConsole(%d) failed. (%p) %08lx", - get_minor (), getHelperProcessId (), - this, GetLastError ()); - goto detach; + Sleep (1); + attached = fhandler_console::get_console_process_id + (getHelperProcessId (), true); + if (attached) + break; + } + if (!attached) + { + system_printf ("pty%d: pcon_attach_to mismatch??????", get_minor ()); + return; } } + + /* If not attached to this pseudo console, try to attach temporarily. */ + pid_restore = 0; + if (pcon_attached_to != get_minor ()) + if (!try_reattach_pcon ()) + goto detach; + char *buf; size_t nlen; DWORD origCP; @@ -1005,7 +1044,7 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) } if (!nlen) /* Nothing to be synchronized */ goto cleanup; - if (check_switch_to_pcon ()) + if (get_ttyp ()->switch_to_pcon) goto cleanup; /* Remove ESC sequence which returns results to console input buffer. Without this, cursor position report @@ -1060,27 +1099,7 @@ cleanup: SetConsoleOutputCP (origCP); HeapFree (GetProcessHeap (), 0, buf); detach: - if (!pcon_attached[get_minor ()]) - { - FreeConsole (); - if (!AttachConsole (pidRestore)) - { - system_printf ("pty%d: AttachConsole(%d) failed. (%p) %08lx", - get_minor (), pidRestore, this, GetLastError ()); - pcon_attached[get_minor ()] = false; - } - } -} - -bool -fhandler_pty_slave::has_master_opened (void) -{ - cygheap_fdenum cfd (false); - while (cfd.next () >= 0) - if (cfd->get_major () == DEV_PTYM_MAJOR && - cfd->get_minor () == get_minor ()) - return true; - return false; + restore_reattach_pcon (); } ssize_t __stdcall @@ -1100,7 +1119,7 @@ fhandler_pty_slave::write (const void *ptr, size_t len) char *buf; ssize_t nlen; - UINT targetCodePage = (check_switch_to_pcon ()) ? + UINT targetCodePage = get_ttyp ()->switch_to_pcon ? GetConsoleOutputCP () : get_ttyp ()->TermCodePage; if (targetCodePage != get_ttyp ()->TermCodePage) { @@ -1127,18 +1146,25 @@ fhandler_pty_slave::write (const void *ptr, size_t len) nlen = len; } + /* If not attached to this pseudo console, try to attach temporarily. */ + pid_restore = 0; + bool fallback = false; + if (get_ttyp ()->switch_to_pcon && pcon_attached_to != get_minor ()) + if (!try_reattach_pcon ()) + fallback = true; + DWORD dwMode, flags; flags = ENABLE_VIRTUAL_TERMINAL_PROCESSING; if (!(get_ttyp ()->ti.c_oflag & OPOST) || !(get_ttyp ()->ti.c_oflag & ONLCR)) flags |= DISABLE_NEWLINE_AUTO_RETURN; - if (check_switch_to_pcon ()) + if (get_ttyp ()->switch_to_pcon && !fallback) { GetConsoleMode (get_output_handle (), &dwMode); SetConsoleMode (get_output_handle (), dwMode | flags); } - HANDLE to = - check_switch_to_pcon () ? get_output_handle () : get_output_handle_cyg (); + HANDLE to = (get_ttyp ()->switch_to_pcon && !fallback) ? + get_output_handle () : get_output_handle_cyg (); acquire_output_mutex (INFINITE); if (!process_opost_output (to, buf, nlen, false)) { @@ -1157,8 +1183,10 @@ fhandler_pty_slave::write (const void *ptr, size_t len) release_output_mutex (); HeapFree (GetProcessHeap (), 0, buf); flags = ENABLE_VIRTUAL_TERMINAL_PROCESSING; - if (check_switch_to_pcon ()) - SetConsoleMode (get_output_handle (), dwMode | flags); + if (get_ttyp ()->switch_to_pcon && !fallback) + SetConsoleMode (get_output_handle (), dwMode); + + restore_reattach_pcon (); /* Push slave output to pseudo console screen buffer */ if (getPseudoConsole ()) @@ -1299,9 +1327,15 @@ fhandler_pty_slave::read (void *ptr, size_t& len) } goto out; } - if (check_switch_to_pcon () && - !get_ttyp ()->mask_switch_to_pcon) + if (get_ttyp ()->switch_to_pcon && + (!get_ttyp ()->mask_switch_to_pcon || ALWAYS_USE_PCON)) { + if (!try_reattach_pcon ()) + { + restore_reattach_pcon (); + goto do_read_cyg; + } + DWORD dwMode; GetConsoleMode (get_handle (), &dwMode); DWORD flags = ENABLE_VIRTUAL_TERMINAL_INPUT; @@ -1344,8 +1378,13 @@ fhandler_pty_slave::read (void *ptr, size_t& len) ResetEvent (input_available_event); ReleaseMutex (input_mutex); len = rlen; + + restore_reattach_pcon (); + mask_switch_to_pcon (false); return; } + +do_read_cyg: if (!bytes_available (bytes_in_pipe)) { ReleaseMutex (input_mutex); @@ -1611,31 +1650,13 @@ fhandler_pty_slave::ioctl (unsigned int cmd, void *arg) case TIOCSWINSZ: if (getPseudoConsole ()) { - /* If not attached pseudo console yet, try to attach - temporally. */ - DWORD pidRestore = 0; - if (!pcon_attached[get_minor ()]) - { - if (has_master_opened () && get_ttyp ()->attach_pcon_in_fork) - goto resize_cyg; + /* If not attached to this pseudo console, + try to attach temporarily. */ + pid_restore = 0; + if (pcon_attached_to != get_minor ()) + if (!try_reattach_pcon ()) + goto cleanup; - pidRestore = fhandler_console::get_console_process_id - (GetCurrentProcessId (), false); - - /* This happens at mintty startup if fhandler_console:: - need_invisible() is called in stdio_init() in dtable.cc */ - if (!pidRestore) /* Give up to resize pseudo console */ - goto resize_cyg; - - FreeConsole (); - if (!AttachConsole (getHelperProcessId ())) - { - system_printf ("pty%d: AttachConsole(%d) failed. (%p) %08lx", - get_minor(), getHelperProcessId (), - this, GetLastError ()); - goto cleanup; - } - } COORD size; size.X = ((struct winsize *) arg)->ws_col; size.Y = ((struct winsize *) arg)->ws_row; @@ -1653,20 +1674,9 @@ fhandler_pty_slave::ioctl (unsigned int cmd, void *arg) rect.Bottom = size.Y-1; SetConsoleWindowInfo (get_output_handle (), TRUE, &rect); cleanup: - /* Detach from pseudo console and resume. */ - if (pidRestore) - { - FreeConsole (); - if (!AttachConsole (pidRestore)) - { - system_printf ("pty%d: AttachConsole(%d) failed. (%p) %08lx", - get_minor (), pidRestore, - this, GetLastError ()); - pcon_attached[get_minor ()] = false; - } - } + restore_reattach_pcon (); } -resize_cyg: + if (get_ttyp ()->winsize.ws_row != ((struct winsize *) arg)->ws_row || get_ttyp ()->winsize.ws_col != ((struct winsize *) arg)->ws_col) { @@ -2042,7 +2052,6 @@ fhandler_pty_master::close () ClosePseudoConsole = (VOID (WINAPI *) (HPCON)) func; ClosePseudoConsole (getPseudoConsole ()); } - get_ttyp ()->hPseudoConsole = NULL; get_ttyp ()->switch_to_pcon = false; } if (get_ttyp ()->getsid () > 0) @@ -2096,8 +2105,8 @@ fhandler_pty_master::write (const void *ptr, size_t len) /* Write terminal input to to_slave pipe instead of output_handle if current application is native console application. */ - if (check_switch_to_pcon () && - !get_ttyp ()->mask_switch_to_pcon) + if (get_ttyp ()->switch_to_pcon && + (!get_ttyp ()->mask_switch_to_pcon || ALWAYS_USE_PCON)) { char *buf; size_t nlen; @@ -2702,8 +2711,9 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe) if (fhandler_console::get_console_process_id (getHelperProcessId (), true)) { - if (!pcon_attached[get_minor ()]) + if (pcon_attached_to != get_minor ()) { + pcon_attached_to = get_minor (); init_console_handler (true); #if USE_OWN_NLS_FUNC char locale[ENCODING_LEN + 1] = "C"; @@ -2786,19 +2796,20 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe) WriteFile (get_output_handle_cyg (), "\033[H\033[J", 6, &n, NULL); - pcon_attached[get_minor ()] = true; get_ttyp ()->num_pcon_attached_slaves ++; } } - else - pcon_attached[get_minor ()] = false; } - if (pcon_attached[get_minor ()] && native_maybe) + if (pcon_attached_to == get_minor () && (native_maybe || ALWAYS_USE_PCON)) { FlushConsoleInputBuffer (get_handle ()); DWORD mode; GetConsoleMode (get_handle (), &mode); - SetConsoleMode (get_handle (), mode | ENABLE_ECHO_INPUT); + SetConsoleMode (get_handle (), + (mode & ~ENABLE_VIRTUAL_TERMINAL_INPUT) | + ENABLE_ECHO_INPUT | + ENABLE_LINE_INPUT | + ENABLE_PROCESSED_INPUT); Sleep (20); if (get_ttyp ()->pcon_pid == 0 || kill (get_ttyp ()->pcon_pid, 0) != 0) @@ -2826,23 +2837,28 @@ fhandler_pty_slave::fixup_after_exec () else if (getPseudoConsole ()) { int used = 0; + int attached = 0; cygheap_fdenum cfd (false); while (cfd.next () >= 0) - if (cfd->get_major () == DEV_PTYS_MAJOR && - cfd->get_minor () == get_minor ()) - used ++; + { + if (cfd->get_major () == DEV_PTYS_MAJOR || + cfd->get_major () == DEV_CONS_MAJOR) + used ++; + if (cfd->get_major () == DEV_PTYS_MAJOR && + cfd->get_minor () == pcon_attached_to) + attached ++; + } - /* Call FreeConsole() if no pty slave on this pty is - opened and the process is attached to the pseudo - console corresponding to this pty. This is needed - to make GNU screen and tmux work in Windows 10 1903. */ - if (used == 1 /* About to close this one */ && - fhandler_console::get_console_process_id (getHelperProcessId (), - true)) + /* Call FreeConsole() if no tty is opened and the process + is attached to console corresponding to tty. This is + needed to make GNU screen and tmux work in Windows 10 + 1903. */ + if (attached == 1 && get_minor () == pcon_attached_to) + pcon_attached_to = -1; + if (used == 1 /* About to close this tty */) { init_console_handler (false); FreeConsole (); - pcon_attached[get_minor ()] = false; } } @@ -3049,7 +3065,7 @@ fhandler_pty_master::pty_master_fwd_thread () { /* Avoid duplicating slave output which is already sent to to_master_cyg */ - if (!check_switch_to_pcon ()) + if (!get_ttyp ()->switch_to_pcon) continue; /* Avoid setting window title to "cygwin-console-helper.exe" */ @@ -3064,25 +3080,42 @@ fhandler_pty_master::pty_master_fwd_thread () } else if ((state == 1 && outbuf[i] == ']') || (state == 2 && outbuf[i] == '0') || - (state == 3 && outbuf[i] == ';') || - (state == 4 && outbuf[i] == '\0')) + (state == 3 && outbuf[i] == ';')) { state ++; continue; } - else if (state == 5 && outbuf[i] == '\a') + else if (state == 4 && outbuf[i] == '\a') { memmove (&outbuf[start_at], &outbuf[i+1], rlen-i-1); state = 0; rlen = wlen = start_at + rlen - i - 1; continue; } - else if (state != 4 || outbuf[i] == '\a') + else if (outbuf[i] == '\a') { state = 0; continue; } + /* Remove ESC sequence which returns results to console + input buffer. Without this, cursor position report + is put into the input buffer as a garbage. */ + /* Remove ESC sequence to report cursor position. */ + char *p0; + while ((p0 = (char *) memmem (outbuf, rlen, "\033[6n", 4))) + { + memmove (p0, p0+4, rlen - (p0+4 - outbuf)); + rlen -= 4; + } + /* Remove ESC sequence to report terminal identity. */ + while ((p0 = (char *) memmem (outbuf, rlen, "\033[0c", 4))) + { + memmove (p0, p0+4, rlen - (p0+4 - outbuf)); + rlen -= 4; + } + wlen = rlen; + char *buf; size_t nlen; if (get_ttyp ()->TermCodePage != CP_UTF8) diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 0c089dbe9..a3a7e7505 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -140,20 +140,24 @@ frok::child (volatile char * volatile here) { fhandler_base *fh = cfd; fhandler_pty_master *ptym = (fhandler_pty_master *) fh; - if (ptym->getPseudoConsole () && - !fhandler_console::get_console_process_id ( - ptym->getHelperProcessId (), true)) - + if (ptym->getPseudoConsole ()) { debug_printf ("found a PTY master %d: helper_PID=%d", ptym->get_minor (), ptym->getHelperProcessId ()); - if (ptym->attach_pcon_in_fork ()) + if (fhandler_console::get_console_process_id ( + ptym->getHelperProcessId (), true)) + /* Already attached */ + break; + else { - FreeConsole (); - if (!AttachConsole (ptym->getHelperProcessId ())) - /* Error */; - else - break; + if (ptym->attach_pcon_in_fork ()) + { + FreeConsole (); + if (!AttachConsole (ptym->getHelperProcessId ())) + /* Error */; + else + break; + } } } } diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 98612bd0f..4bb28c47b 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -578,53 +578,62 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, pidRestore = fhandler_console::get_console_process_id (GetCurrentProcessId (), false); fhandler_pty_slave *ptys = NULL; - for (int fd = 0; fd < 3; fd ++) + int chk_order[] = {1, 0, 2}; + for (int i = 0; i < 3; i ++) { + int fd = chk_order[i]; fhandler_base *fh = ::cygheap->fdtab[fd]; if (fh && fh->get_major () == DEV_PTYS_MAJOR) { ptys = (fhandler_pty_slave *) fh; - if (ptys->getPseudoConsole () && - !fhandler_console::get_console_process_id ( - ptys->getHelperProcessId (), true)) + if (ptys->getPseudoConsole ()) { DWORD dwHelperProcessId = ptys->getHelperProcessId (); debug_printf ("found a PTY slave %d: helper_PID=%d", - fh->get_minor (), dwHelperProcessId); - FreeConsole (); - if (!AttachConsole (dwHelperProcessId)) + fh->get_minor (), dwHelperProcessId); + if (fhandler_console::get_console_process_id + (dwHelperProcessId, true)) { - /* Fallback */ - DWORD target[3] = { - STD_INPUT_HANDLE, - STD_OUTPUT_HANDLE, - STD_ERROR_HANDLE - }; - if (fd == 0) - { - ptys->set_handle (ptys->get_handle_cyg ()); - SetStdHandle (target[fd], - ptys->get_handle ()); - } - else - { - ptys->set_output_handle ( - ptys->get_output_handle_cyg ()); - SetStdHandle (target[fd], - ptys->get_output_handle ()); - } + /* Already attached */ + attach_to_pcon = true; + break; } else { - init_console_handler (true); - attach_to_pcon = true; - break; + FreeConsole (); + if (AttachConsole (dwHelperProcessId)) + { + attach_to_pcon = true; + break; + } + else + { + /* Fallback */ + DWORD target[3] = { + STD_INPUT_HANDLE, + STD_OUTPUT_HANDLE, + STD_ERROR_HANDLE + }; + if (fd == 0) + { + ptys->set_handle (ptys->get_handle_cyg ()); + SetStdHandle (target[fd], + ptys->get_handle ()); + } + else if (fd < 3) + { + ptys->set_output_handle ( + ptys->get_output_handle_cyg ()); + SetStdHandle (target[fd], + ptys->get_output_handle ()); + } + } } } } } if (ptys) - ptys->fixup_after_attach (true); + ptys->fixup_after_attach (!iscygwin ()); loop: /* When ruid != euid we create the new process under the current original From 83b2d576c835dad6b8e2ea53b55a25e7bfcdcde7 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 4 Sep 2019 22:46:51 +0900 Subject: [PATCH 012/520] Cygwin: pty: Limit API hook to the program linked with the APIs. - API hook used for pseudo console support causes slow down. This patch limits API hook to only program which is linked with the corresponding APIs. Normal cygwin program is not linked with such APIs (such as WriteFile, etc...) directly, therefore, no slow down occurs. However, console access by cygwin.dll itself cannot switch the r/w pipe to pseudo console side. Therefore, the code to switch it forcely to pseudo console side is added to smallprint.cc and strace.cc. --- winsup/cygwin/fhandler_tty.cc | 104 +++++++++++++++++++--------------- winsup/cygwin/smallprint.cc | 2 + winsup/cygwin/strace.cc | 26 +-------- winsup/cygwin/winsup.h | 3 + 4 files changed, 65 insertions(+), 70 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 262c41bfe..fadff59a3 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -88,6 +88,19 @@ set_switch_to_pcon (void) } } +void +set_ishybrid_and_switch_to_pcon (HANDLE h) +{ + DWORD dummy; + if (!isHybrid + && GetFileType (h) == FILE_TYPE_CHAR + && GetConsoleMode (h, &dummy)) + { + isHybrid = true; + set_switch_to_pcon (); + } +} + #define DEF_HOOK(name) static __typeof__ (name) *name##_Orig DEF_HOOK (WriteFile); DEF_HOOK (WriteConsoleA); @@ -100,6 +113,7 @@ DEF_HOOK (WriteConsoleOutputW); DEF_HOOK (WriteConsoleOutputCharacterA); DEF_HOOK (WriteConsoleOutputCharacterW); DEF_HOOK (WriteConsoleOutputAttribute); +DEF_HOOK (SetConsoleTextAttribute); DEF_HOOK (WriteConsoleInputA); DEF_HOOK (WriteConsoleInputW); DEF_HOOK (ReadConsoleInputA); @@ -107,140 +121,137 @@ DEF_HOOK (ReadConsoleInputW); DEF_HOOK (PeekConsoleInputA); DEF_HOOK (PeekConsoleInputW); -#define CHK_CONSOLE_ACCESS(h) \ -{ \ - DWORD dummy; \ - if (!isHybrid \ - && GetFileType (h) == FILE_TYPE_CHAR \ - && GetConsoleMode (h, &dummy)) \ - { \ - isHybrid = true; \ - set_switch_to_pcon (); \ - } \ -} static BOOL WINAPI WriteFile_Hooked (HANDLE h, LPCVOID p, DWORD l, LPDWORD n, LPOVERLAPPED o) { - CHK_CONSOLE_ACCESS (h); + set_ishybrid_and_switch_to_pcon (h); return WriteFile_Orig (h, p, l, n, o); } static BOOL WINAPI WriteConsoleA_Hooked (HANDLE h, LPCVOID p, DWORD l, LPDWORD n, LPVOID o) { - CHK_CONSOLE_ACCESS (h); + set_ishybrid_and_switch_to_pcon (h); return WriteConsoleA_Orig (h, p, l, n, o); } static BOOL WINAPI WriteConsoleW_Hooked (HANDLE h, LPCVOID p, DWORD l, LPDWORD n, LPVOID o) { - CHK_CONSOLE_ACCESS (h); + set_ishybrid_and_switch_to_pcon (h); return WriteConsoleW_Orig (h, p, l, n, o); } static BOOL WINAPI ReadFile_Hooked (HANDLE h, LPVOID p, DWORD l, LPDWORD n, LPOVERLAPPED o) { - CHK_CONSOLE_ACCESS (h); + set_ishybrid_and_switch_to_pcon (h); return ReadFile_Orig (h, p, l, n, o); } static BOOL WINAPI ReadConsoleA_Hooked (HANDLE h, LPVOID p, DWORD l, LPDWORD n, LPVOID o) { - CHK_CONSOLE_ACCESS (h); + set_ishybrid_and_switch_to_pcon (h); return ReadConsoleA_Orig (h, p, l, n, o); } static BOOL WINAPI ReadConsoleW_Hooked (HANDLE h, LPVOID p, DWORD l, LPDWORD n, LPVOID o) { - CHK_CONSOLE_ACCESS (h); + set_ishybrid_and_switch_to_pcon (h); return ReadConsoleW_Orig (h, p, l, n, o); } static BOOL WINAPI WriteConsoleOutputA_Hooked (HANDLE h, CONST CHAR_INFO *p, COORD s, COORD c, PSMALL_RECT r) { - CHK_CONSOLE_ACCESS (h); + set_ishybrid_and_switch_to_pcon (h); return WriteConsoleOutputA_Orig (h, p, s, c, r); } static BOOL WINAPI WriteConsoleOutputW_Hooked (HANDLE h, CONST CHAR_INFO *p, COORD s, COORD c, PSMALL_RECT r) { - CHK_CONSOLE_ACCESS (h); + set_ishybrid_and_switch_to_pcon (h); return WriteConsoleOutputW_Orig (h, p, s, c, r); } static BOOL WINAPI WriteConsoleOutputCharacterA_Hooked (HANDLE h, LPCSTR p, DWORD l, COORD c, LPDWORD n) { - CHK_CONSOLE_ACCESS (h); + set_ishybrid_and_switch_to_pcon (h); return WriteConsoleOutputCharacterA_Orig (h, p, l, c, n); } static BOOL WINAPI WriteConsoleOutputCharacterW_Hooked (HANDLE h, LPCWSTR p, DWORD l, COORD c, LPDWORD n) { - CHK_CONSOLE_ACCESS (h); + set_ishybrid_and_switch_to_pcon (h); return WriteConsoleOutputCharacterW_Orig (h, p, l, c, n); } static BOOL WINAPI WriteConsoleOutputAttribute_Hooked (HANDLE h, CONST WORD *a, DWORD l, COORD c, LPDWORD n) { - CHK_CONSOLE_ACCESS (h); + set_ishybrid_and_switch_to_pcon (h); return WriteConsoleOutputAttribute_Orig (h, a, l, c, n); } static BOOL WINAPI +SetConsoleTextAttribute_Hooked + (HANDLE h, WORD a) +{ + set_ishybrid_and_switch_to_pcon (h); + return SetConsoleTextAttribute_Orig (h, a); +} +static BOOL WINAPI WriteConsoleInputA_Hooked (HANDLE h, CONST INPUT_RECORD *r, DWORD l, LPDWORD n) { - CHK_CONSOLE_ACCESS (h); + set_ishybrid_and_switch_to_pcon (h); return WriteConsoleInputA_Orig (h, r, l, n); } static BOOL WINAPI WriteConsoleInputW_Hooked (HANDLE h, CONST INPUT_RECORD *r, DWORD l, LPDWORD n) { - CHK_CONSOLE_ACCESS (h); + set_ishybrid_and_switch_to_pcon (h); return WriteConsoleInputW_Orig (h, r, l, n); } static BOOL WINAPI ReadConsoleInputA_Hooked (HANDLE h, PINPUT_RECORD r, DWORD l, LPDWORD n) { - CHK_CONSOLE_ACCESS (h); + set_ishybrid_and_switch_to_pcon (h); return ReadConsoleInputA_Orig (h, r, l, n); } static BOOL WINAPI ReadConsoleInputW_Hooked (HANDLE h, PINPUT_RECORD r, DWORD l, LPDWORD n) { - CHK_CONSOLE_ACCESS (h); + set_ishybrid_and_switch_to_pcon (h); return ReadConsoleInputW_Orig (h, r, l, n); } static BOOL WINAPI PeekConsoleInputA_Hooked (HANDLE h, PINPUT_RECORD r, DWORD l, LPDWORD n) { - CHK_CONSOLE_ACCESS (h); + set_ishybrid_and_switch_to_pcon (h); return PeekConsoleInputA_Orig (h, r, l, n); } static BOOL WINAPI PeekConsoleInputW_Hooked (HANDLE h, PINPUT_RECORD r, DWORD l, LPDWORD n) { - CHK_CONSOLE_ACCESS (h); + set_ishybrid_and_switch_to_pcon (h); return PeekConsoleInputW_Orig (h, r, l, n); } #else /* USE_API_HOOK */ #define WriteFile_Orig 0 #define ReadFile_Orig 0 #define PeekConsoleInputA_Orig 0 +void set_ishybrid_and_switch_to_pcon (void) {} #endif /* USE_API_HOOK */ bool @@ -2871,25 +2882,26 @@ fhandler_pty_slave::fixup_after_exec () { \ void *api = hook_api (module, #name, (void *) name##_Hooked); \ name##_Orig = (__typeof__ (name) *) api; \ - if (!api) system_printf("Hooking " #name " failed."); \ + /*if (api) system_printf(#name " hooked.");*/ \ } - DO_HOOK ("kernel32.dll", WriteFile); - DO_HOOK ("kernel32.dll", WriteConsoleA); - DO_HOOK ("kernel32.dll", WriteConsoleW); - DO_HOOK ("kernel32.dll", ReadFile); - DO_HOOK ("kernel32.dll", ReadConsoleA); - DO_HOOK ("kernel32.dll", ReadConsoleW); - DO_HOOK ("kernel32.dll", WriteConsoleOutputA); - DO_HOOK ("kernel32.dll", WriteConsoleOutputW); - DO_HOOK ("kernel32.dll", WriteConsoleOutputCharacterA); - DO_HOOK ("kernel32.dll", WriteConsoleOutputCharacterW); - DO_HOOK ("kernel32.dll", WriteConsoleOutputAttribute); - DO_HOOK ("kernel32.dll", WriteConsoleInputA); - DO_HOOK ("kernel32.dll", WriteConsoleInputW); - DO_HOOK ("kernel32.dll", ReadConsoleInputA); - DO_HOOK ("kernel32.dll", ReadConsoleInputW); - DO_HOOK ("kernel32.dll", PeekConsoleInputA); - DO_HOOK ("kernel32.dll", PeekConsoleInputW); + DO_HOOK (NULL, WriteFile); + DO_HOOK (NULL, WriteConsoleA); + DO_HOOK (NULL, WriteConsoleW); + DO_HOOK (NULL, ReadFile); + DO_HOOK (NULL, ReadConsoleA); + DO_HOOK (NULL, ReadConsoleW); + DO_HOOK (NULL, WriteConsoleOutputA); + DO_HOOK (NULL, WriteConsoleOutputW); + DO_HOOK (NULL, WriteConsoleOutputCharacterA); + DO_HOOK (NULL, WriteConsoleOutputCharacterW); + DO_HOOK (NULL, WriteConsoleOutputAttribute); + DO_HOOK (NULL, SetConsoleTextAttribute); + DO_HOOK (NULL, WriteConsoleInputA); + DO_HOOK (NULL, WriteConsoleInputW); + DO_HOOK (NULL, ReadConsoleInputA); + DO_HOOK (NULL, ReadConsoleInputW); + DO_HOOK (NULL, PeekConsoleInputA); + DO_HOOK (NULL, PeekConsoleInputW); } #endif /* USE_API_HOOK */ } diff --git a/winsup/cygwin/smallprint.cc b/winsup/cygwin/smallprint.cc index a7a19132b..9310b9313 100644 --- a/winsup/cygwin/smallprint.cc +++ b/winsup/cygwin/smallprint.cc @@ -405,6 +405,7 @@ small_printf (const char *fmt, ...) count = __small_vsprintf (buf, fmt, ap); va_end (ap); + set_ishybrid_and_switch_to_pcon (GetStdHandle (STD_ERROR_HANDLE)); WriteFile (GetStdHandle (STD_ERROR_HANDLE), buf, count, &done, NULL); FlushFileBuffers (GetStdHandle (STD_ERROR_HANDLE)); } @@ -431,6 +432,7 @@ console_printf (const char *fmt, ...) count = __small_vsprintf (buf, fmt, ap); va_end (ap); + set_ishybrid_and_switch_to_pcon (console_handle); WriteFile (console_handle, buf, count, &done, NULL); FlushFileBuffers (console_handle); } diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc index b1eb5f3e4..f0aef3a36 100644 --- a/winsup/cygwin/strace.cc +++ b/winsup/cygwin/strace.cc @@ -264,6 +264,7 @@ strace::vprntf (unsigned category, const char *func, const char *fmt, va_list ap if (category & _STRACE_SYSTEM) { DWORD done; + set_ishybrid_and_switch_to_pcon (GetStdHandle (STD_ERROR_HANDLE)); WriteFile (GetStdHandle (STD_ERROR_HANDLE), buf, len, &done, 0); FlushFileBuffers (GetStdHandle (STD_ERROR_HANDLE)); /* Make sure that the message shows up on the screen, too, since this is @@ -275,34 +276,11 @@ strace::vprntf (unsigned category, const char *func, const char *fmt, va_list ap &sec_none, OPEN_EXISTING, 0, 0); if (h != INVALID_HANDLE_VALUE) { + set_ishybrid_and_switch_to_pcon (h); WriteFile (h, buf, len, &done, 0); CloseHandle (h); } } -#if 1 /* Experimental code */ - /* PTY with pseudo console cannot display data written to - STD_ERROR_HANDLE (output_handle) if the process is cygwin - process. output_handle works only in native console apps. - Therefore the data should be written to output_handle_cyg - as well. */ - fhandler_base *fh = ::cygheap->fdtab[2]; - if (fh && fh->get_major () == DEV_PTYS_MAJOR) - { - fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; - if (ptys->getPseudoConsole ()) - { - HANDLE h_cyg = ptys->get_output_handle_cyg (); - if (buf[len-1] == '\n' && len < NT_MAX_PATH - 1) - { - buf[len-1] = '\r'; - buf[len] = '\n'; - len ++; - } - WriteFile (h_cyg, buf, len, &done, 0); - FlushFileBuffers (h_cyg); - } - } -#endif } #ifndef NOSTRACE diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h index ab7b3bbdc..de9bfacda 100644 --- a/winsup/cygwin/winsup.h +++ b/winsup/cygwin/winsup.h @@ -216,6 +216,9 @@ void init_console_handler (bool); extern bool wsock_started; +/* PTY related */ +void set_ishybrid_and_switch_to_pcon (HANDLE h); + /* Printf type functions */ extern "C" void vapi_fatal (const char *, va_list ap) __attribute__ ((noreturn)); extern "C" void api_fatal (const char *, ...) __attribute__ ((noreturn)); From d4045fdbef60d8e7e0d11dfe38b048ea2cb8708b Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 4 Sep 2019 22:47:42 +0900 Subject: [PATCH 013/520] Cygwin: pty: Add a workaround for ^C handling. - Pseudo console support introduced by commit 169d65a5774acc76ce3f3feeedcbae7405aa9b57 sometimes cause random crash or freeze by pressing ^C while cygwin and non-cygwin processes are executed simultaneously in the same pty. This patch is a workaround for this issue. --- winsup/cygwin/fork.cc | 1 - winsup/cygwin/spawn.cc | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index a3a7e7505..0a929dffd 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -213,7 +213,6 @@ frok::child (volatile char * volatile here) - terminate the current fork call even if the child is initialized. */ sync_with_parent ("performed fork fixups and dynamic dll loading", true); - init_console_handler (myself->ctty > 0); ForceCloseHandle1 (fork_info->forker_finished, forker_finished); pthread::atforkchild (); diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 4bb28c47b..15cba3610 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -635,6 +635,12 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, if (ptys) ptys->fixup_after_attach (!iscygwin ()); + if (!iscygwin ()) + { + init_console_handler (myself->ctty > 0); + myself->ctty = 0; + } + loop: /* When ruid != euid we create the new process under the current original account and impersonate in child, this way maintaining the different From 433c6b8e0a667f9eae41a52efadec35ac62730df Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 5 Sep 2019 09:24:26 +0900 Subject: [PATCH 014/520] Cygwin: pty: Disable clear screen on new pty if TERM=dumb or emacs*. - Pseudo console support introduced by commit 169d65a5774acc76ce3f3feeedcbae7405aa9b57 shows garbage ^[[H^[[J in some of emacs screens. These screens do not handle ANSI escape sequences. Therefore, clear screen is disabled on these screens. --- winsup/cygwin/fhandler_tty.cc | 19 ++++++++++++++----- winsup/cygwin/tty.cc | 1 + winsup/cygwin/tty.h | 1 + 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index fadff59a3..a6844832b 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -962,6 +962,19 @@ skip_console_setting: void fhandler_pty_slave::reset_switch_to_pcon (void) { + if (get_ttyp ()->need_clear_screen) + { + const char *term = getenv ("TERM"); + if (term && strcmp (term, "dumb") && !strstr (term, "emacs")) + { + /* FIXME: Clearing sequence may not be "^[[H^[[J" + depending on the terminal type. */ + DWORD n; + WriteFile (get_output_handle_cyg (), "\033[H\033[J", 6, &n, NULL); + } + get_ttyp ()->need_clear_screen = false; + } + if (ALWAYS_USE_PCON) return; if (isHybrid) @@ -2798,14 +2811,10 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe) /* Clear screen to synchronize pseudo console screen buffer with real terminal. This is necessary because pseudo console screen buffer is empty at start. */ - /* FIXME: Clearing sequence may not be "^[[H^[[J" - depending on the terminal type. */ - DWORD n; if (get_ttyp ()->num_pcon_attached_slaves == 0 && !ALWAYS_USE_PCON) /* Assume this is the first process using this pty slave. */ - WriteFile (get_output_handle_cyg (), - "\033[H\033[J", 6, &n, NULL); + get_ttyp ()->need_clear_screen = true; get_ttyp ()->num_pcon_attached_slaves ++; } diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index 9244267c0..c94aee3ba 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -243,6 +243,7 @@ tty::init () pcon_pid = 0; num_pcon_attached_slaves = 0; TermCodePage = 20127; /* ASCII */ + need_clear_screen = false; } HANDLE diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h index d59b2027d..c2b0490d0 100644 --- a/winsup/cygwin/tty.h +++ b/winsup/cygwin/tty.h @@ -104,6 +104,7 @@ private: pid_t pcon_pid; int num_pcon_attached_slaves; UINT TermCodePage; + bool need_clear_screen; public: HANDLE from_master () const { return _from_master; } From 915fcd0ae8d83546ce135131cd25bf6795d97966 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 5 Sep 2019 13:22:54 +0900 Subject: [PATCH 015/520] Cygwin: pty: Fix select() with pseudo console support. - select() did not work correctly when both read and except are polled simultaneously for the same fd and the r/w pipe is switched to pseudo console side. This patch fixes this isseu. --- winsup/cygwin/fhandler.h | 15 +++ winsup/cygwin/fhandler_tty.cc | 13 ++- winsup/cygwin/select.cc | 192 ++++++++++++++++++++++++++++++++-- winsup/cygwin/select.h | 2 + 4 files changed, 207 insertions(+), 15 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index e8c165100..e72e11f7a 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -2102,6 +2102,7 @@ class fhandler_pty_common: public fhandler_termios { return get_ttyp ()->hPseudoConsole; } + bool to_be_read_from_pcon (void); protected: BOOL process_opost_output (HANDLE h, @@ -2150,6 +2151,8 @@ class fhandler_pty_slave: public fhandler_pty_common void fixup_after_exec (); select_record *select_read (select_stuff *); + select_record *select_write (select_stuff *); + select_record *select_except (select_stuff *); virtual char const *ttyname () { return pc.dev.name (); } int __reg2 fstat (struct stat *buf); int __reg3 facl (int, int, struct acl *); @@ -2177,9 +2180,21 @@ class fhandler_pty_slave: public fhandler_pty_common void push_to_pcon_screenbuffer (const char *ptr, size_t len); void mask_switch_to_pcon (bool mask) { + if (!mask && get_ttyp ()->pcon_pid && + get_ttyp ()->pcon_pid != myself->pid && + kill (get_ttyp ()->pcon_pid, 0) == 0) + return; get_ttyp ()->mask_switch_to_pcon = mask; } void fixup_after_attach (bool native_maybe); + pid_t get_pcon_pid (void) + { + return get_ttyp ()->pcon_pid; + } + bool is_line_input (void) + { + return get_ttyp ()->ti.c_lflag & ICANON; + } }; #define __ptsname(buf, unit) __small_sprintf ((buf), "/dev/pty%d", (unit)) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index a6844832b..78c9c9128 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1223,6 +1223,13 @@ fhandler_pty_slave::write (const void *ptr, size_t len) return towrite; } +bool +fhandler_pty_common::to_be_read_from_pcon (void) +{ + return get_ttyp ()->switch_to_pcon && + (!get_ttyp ()->mask_switch_to_pcon || ALWAYS_USE_PCON); +} + void __reg3 fhandler_pty_slave::read (void *ptr, size_t& len) { @@ -1351,8 +1358,7 @@ fhandler_pty_slave::read (void *ptr, size_t& len) } goto out; } - if (get_ttyp ()->switch_to_pcon && - (!get_ttyp ()->mask_switch_to_pcon || ALWAYS_USE_PCON)) + if (to_be_read_from_pcon ()) { if (!try_reattach_pcon ()) { @@ -2129,8 +2135,7 @@ fhandler_pty_master::write (const void *ptr, size_t len) /* Write terminal input to to_slave pipe instead of output_handle if current application is native console application. */ - if (get_ttyp ()->switch_to_pcon && - (!get_ttyp ()->mask_switch_to_pcon || ALWAYS_USE_PCON)) + if (to_be_read_from_pcon ()) { char *buf; size_t nlen; diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index d29f3d2f4..4efc302df 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -667,9 +667,6 @@ peek_pipe (select_record *s, bool from_select) fhm->flush_to_slave (); } break; - case DEV_PTYS_MAJOR: - ((fhandler_pty_slave *) fh)->reset_switch_to_pcon (); - break; default: if (fh->get_readahead_valid ()) { @@ -713,6 +710,7 @@ peek_pipe (select_record *s, bool from_select) } out: + h = fh->get_output_handle_cyg (); if (s->write_selected && dev != FH_PIPER) { gotone += s->write_ready = pipe_data_available (s->fd, fh, h, true); @@ -1176,33 +1174,173 @@ static int verify_tty_slave (select_record *me, fd_set *readfds, fd_set *writefds, fd_set *exceptfds) { - if (IsEventSignalled (me->h)) + fhandler_pty_slave *ptys = (fhandler_pty_slave *) me->fh; + if (me->read_selected && !ptys->to_be_read_from_pcon () && + IsEventSignalled (ptys->input_available_event)) me->read_ready = true; return set_bits (me, readfds, writefds, exceptfds); } static int -pty_slave_startup (select_record *s, select_stuff *) +peek_pty_slave (select_record *s, bool from_select) { + int gotone = 0; fhandler_base *fh = (fhandler_base *) s->fh; - ((fhandler_pty_slave *) fh)->mask_switch_to_pcon (true); + fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; + + ptys->reset_switch_to_pcon (); + + if (s->read_selected) + { + if (s->read_ready) + { + select_printf ("%s, already ready for read", fh->get_name ()); + gotone = 1; + goto out; + } + + if (fh->bg_check (SIGTTIN, true) <= bg_eof) + { + gotone = s->read_ready = true; + goto out; + } + + if (ptys->to_be_read_from_pcon ()) + { + if (ptys->is_line_input ()) + { +#define INREC_SIZE (65536 / sizeof (INPUT_RECORD)) + INPUT_RECORD inp[INREC_SIZE]; + DWORD n; + PeekConsoleInput (ptys->get_handle (), inp, INREC_SIZE, &n); + bool end_of_line = false; + while (n-- > 0) + if (inp[n].EventType == KEY_EVENT && + inp[n].Event.KeyEvent.bKeyDown && + inp[n].Event.KeyEvent.uChar.AsciiChar == '\r') + end_of_line = true; + if (end_of_line) + { + gotone = s->read_ready = true; + goto out; + } + else + goto out; + } + } + + if (IsEventSignalled (ptys->input_available_event)) + { + gotone = s->read_ready = true; + goto out; + } + + if (!gotone && s->fh->hit_eof ()) + { + select_printf ("read: %s, saw EOF", fh->get_name ()); + if (s->except_selected) + gotone += s->except_ready = true; + if (s->read_selected) + gotone += s->read_ready = true; + } + } + +out: + HANDLE h = ptys->get_output_handle_cyg (); + if (s->write_selected) + { + gotone += s->write_ready = pipe_data_available (s->fd, fh, h, true); + select_printf ("write: %s, gotone %d", fh->get_name (), gotone); + } + return gotone; +} + +static int pty_slave_startup (select_record *me, select_stuff *stuff); + +static DWORD WINAPI +thread_pty_slave (void *arg) +{ + select_pipe_info *pi = (select_pipe_info *) arg; + DWORD sleep_time = 0; + bool looping = true; + + while (looping) + { + for (select_record *s = pi->start; (s = s->next); ) + if (s->startup == pty_slave_startup) + { + if (peek_pty_slave (s, true)) + looping = false; + if (pi->stop_thread) + { + select_printf ("stopping"); + looping = false; + break; + } + } + if (!looping) + break; + Sleep (sleep_time >> 3); + if (sleep_time < 80) + ++sleep_time; + if (pi->stop_thread) + break; + } + return 0; +} + +static int +pty_slave_startup (select_record *me, select_stuff *stuff) +{ + fhandler_base *fh = (fhandler_base *) me->fh; + fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; + if (me->read_selected && ptys->get_pcon_pid () != myself->pid) + ptys->mask_switch_to_pcon (true); + + select_pipe_info *pi = stuff->device_specific_ptys; + if (pi->start) + me->h = *((select_pipe_info *) stuff->device_specific_ptys)->thread; + else + { + pi->start = &stuff->start; + pi->stop_thread = false; + pi->thread = new cygthread (thread_pty_slave, pi, "ptyssel"); + me->h = *pi->thread; + if (!me->h) + return 0; + } return 1; } static void -pty_slave_cleanup (select_record *s, select_stuff *) +pty_slave_cleanup (select_record *me, select_stuff *stuff) { - fhandler_base *fh = (fhandler_base *) s->fh; - ((fhandler_pty_slave *) fh)->mask_switch_to_pcon (false); + fhandler_base *fh = (fhandler_base *) me->fh; + fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; + if (me->read_selected) + ptys->mask_switch_to_pcon (false); + + select_pipe_info *pi = (select_pipe_info *) stuff->device_specific_ptys; + if (!pi) + return; + if (pi->thread) + { + pi->stop_thread = true; + pi->thread->detach (); + } + delete pi; + stuff->device_specific_ptys = NULL; } select_record * fhandler_pty_slave::select_read (select_stuff *ss) { + if (!ss->device_specific_ptys + && (ss->device_specific_ptys = new select_pipe_info) == NULL) + return NULL; select_record *s = ss->start.next; - s->h = input_available_event; s->startup = pty_slave_startup; - s->peek = peek_pipe; + s->peek = peek_pty_slave; s->verify = verify_tty_slave; s->read_selected = true; s->read_ready = false; @@ -1210,6 +1348,38 @@ fhandler_pty_slave::select_read (select_stuff *ss) return s; } +select_record * +fhandler_pty_slave::select_write (select_stuff *ss) +{ + if (!ss->device_specific_ptys + && (ss->device_specific_ptys = new select_pipe_info) == NULL) + return NULL; + select_record *s = ss->start.next; + s->startup = pty_slave_startup; + s->peek = peek_pty_slave; + s->verify = verify_tty_slave; + s->write_selected = true; + s->write_ready = false; + s->cleanup = pty_slave_cleanup; + return s; +} + +select_record * +fhandler_pty_slave::select_except (select_stuff *ss) +{ + if (!ss->device_specific_ptys + && (ss->device_specific_ptys = new select_pipe_info) == NULL) + return NULL; + select_record *s = ss->start.next; + s->startup = pty_slave_startup; + s->peek = peek_pty_slave; + s->verify = verify_tty_slave; + s->except_selected = true; + s->except_ready = false; + s->cleanup = pty_slave_cleanup; + return s; +} + select_record * fhandler_dev_null::select_read (select_stuff *ss) { diff --git a/winsup/cygwin/select.h b/winsup/cygwin/select.h index 7d6dee753..ae98c658d 100644 --- a/winsup/cygwin/select.h +++ b/winsup/cygwin/select.h @@ -88,6 +88,7 @@ public: select_record start; select_pipe_info *device_specific_pipe; + select_pipe_info *device_specific_ptys; select_fifo_info *device_specific_fifo; select_socket_info *device_specific_socket; select_serial_info *device_specific_serial; @@ -101,6 +102,7 @@ public: select_stuff (): return_on_signal (false), always_ready (false), windows_used (false), start (), device_specific_pipe (NULL), + device_specific_ptys (NULL), device_specific_fifo (NULL), device_specific_socket (NULL), device_specific_serial (NULL) From b7e429420063264d0be7ee6804f3e6f143f66232 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 5 Sep 2019 19:44:41 +0900 Subject: [PATCH 016/520] Cygwin: pty: Fix potential state mismatch regarding pseudo console. - PTY with pseudo console support sitll has problem which potentially cause state mismatch between state variable and real console state. This patch fixes this issue. --- winsup/cygwin/dtable.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 4e9b6ed56..7b2e52005 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -159,14 +159,19 @@ dtable::stdio_init () { bool attached = !!fhandler_console::get_console_process_id (ptys->getHelperProcessId (), true); - if (!attached) + if (attached) + break; + else { /* Not attached to pseudo console in fork() or spawn() by some reason. This happens if the executable is a windows GUI binary, such as mintty. */ FreeConsole (); if (AttachConsole (ptys->getHelperProcessId ())) - break; + { + ptys->fixup_after_attach (false); + break; + } } } } From 46d3953d644bd7381c9cc3231b4826c018c51b90 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 5 Sep 2019 22:22:27 +0900 Subject: [PATCH 017/520] Cygwin: pty: Make sure to show system error messages - Forcibly attach to pseudo console in advance so that the error messages by system_printf() are displayed to screen reliably. This is needed when stdout is redirected to another pty. In this case, process has two ptys opened. However, process can attach to only one console. So it is necessary to change console attached. --- winsup/cygwin/fhandler_tty.cc | 55 +++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 6 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 78c9c9128..2533e5618 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -88,16 +88,59 @@ set_switch_to_pcon (void) } } +static void +force_attach_to_pcon (HANDLE h) +{ + bool attach_done = false; + for (int n = 0; n < 2; n ++) + { + /* First time, attach to the pty whose handle value is match. + Second time, try to attach to any pty. */ + cygheap_fdenum cfd (false); + while (cfd.next () >= 0) + if (cfd->get_major () == DEV_PTYS_MAJOR) + { + fhandler_base *fh = cfd; + fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; + if (n != 0 + || h == ptys->get_handle () + || h == ptys->get_output_handle ()) + { + if (fhandler_console::get_console_process_id + (ptys->getHelperProcessId (), true)) + attach_done = true; + else + { + FreeConsole (); + if (AttachConsole (ptys->getHelperProcessId ())) + { + pcon_attached_to = ptys->get_minor (); + attach_done = true; + } + else + pcon_attached_to = -1; + } + break; + } + } + if (attach_done) + break; + } +} + void set_ishybrid_and_switch_to_pcon (HANDLE h) { - DWORD dummy; - if (!isHybrid - && GetFileType (h) == FILE_TYPE_CHAR - && GetConsoleMode (h, &dummy)) + if (GetFileType (h) == FILE_TYPE_CHAR) { - isHybrid = true; - set_switch_to_pcon (); + force_attach_to_pcon (h); + DWORD dummy; + if (!isHybrid && (GetConsoleMode (h, &dummy) + || GetLastError () != ERROR_INVALID_HANDLE)) + { + isHybrid = true; + set_switch_to_pcon (); + } } } From f39a694c463c1a1ea14e60f5d03652d94e6f76ee Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Fri, 6 Sep 2019 22:01:27 +0900 Subject: [PATCH 018/520] Cygwin: pty: Make SetConsoleCursorPosition() to be hooked. - Win32 API SetConsoleCursorPosition() injects ANSI escape sequence to pseudo console. Therefore, it should be added to the API list to be hooked. --- winsup/cygwin/fhandler_tty.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 2533e5618..3ffd64e21 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -156,6 +156,7 @@ DEF_HOOK (WriteConsoleOutputW); DEF_HOOK (WriteConsoleOutputCharacterA); DEF_HOOK (WriteConsoleOutputCharacterW); DEF_HOOK (WriteConsoleOutputAttribute); +DEF_HOOK (SetConsoleCursorPosition); DEF_HOOK (SetConsoleTextAttribute); DEF_HOOK (WriteConsoleInputA); DEF_HOOK (WriteConsoleInputW); @@ -242,6 +243,13 @@ WriteConsoleOutputAttribute_Hooked return WriteConsoleOutputAttribute_Orig (h, a, l, c, n); } static BOOL WINAPI +SetConsoleCursorPosition_Hooked + (HANDLE h, COORD c) +{ + set_ishybrid_and_switch_to_pcon (h); + return SetConsoleCursorPosition_Orig (h, c); +} +static BOOL WINAPI SetConsoleTextAttribute_Hooked (HANDLE h, WORD a) { @@ -2952,6 +2960,7 @@ fhandler_pty_slave::fixup_after_exec () DO_HOOK (NULL, WriteConsoleOutputCharacterA); DO_HOOK (NULL, WriteConsoleOutputCharacterW); DO_HOOK (NULL, WriteConsoleOutputAttribute); + DO_HOOK (NULL, SetConsoleCursorPosition); DO_HOOK (NULL, SetConsoleTextAttribute); DO_HOOK (NULL, WriteConsoleInputA); DO_HOOK (NULL, WriteConsoleInputW); From 9786b0559565616b1b35282157d9f42f239ed656 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 10 Sep 2019 10:49:11 -0500 Subject: [PATCH 019/520] libc/include/devctl.h: Add SOCKCLOSE per FACE Technical Standard, Edition 3.0 The FACE Technical Standard, Edition 3.0 and later require the definition of the subcommand SOCKCLOSE in . Reference: https://www.opengroup.org/face --- newlib/libc/include/devctl.h | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/newlib/libc/include/devctl.h b/newlib/libc/include/devctl.h index f6055fb96..fd3409f89 100644 --- a/newlib/libc/include/devctl.h +++ b/newlib/libc/include/devctl.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2016 Joel Sherrill . All rights reserved. + * Copyright (c) 2016,2019 Joel Sherrill . + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,6 +27,28 @@ #ifndef _POSIX_DEVCTL_h_ #define _POSIX_DEVCTL_h_ +/* + * Nothing in this file should be visible unless _POSIX_26_C_SOURCE is + * defined. + */ +#ifdef _POSIX_26_C_SOURCE + +#include + +#if defined(__rtems__) +/* + * The FACE Technical Standard, Edition 3.0 and later require the + * definition of the subcommand SOCKCLOSE in . + * + * Reference: https://www.opengroup.org/face + * + * Using 'D' should avoid the letters used by other users of + */ +#include + +#define SOCKCLOSE _IO('D', 1) /* socket close */ +#endif + /* * The posix_devctl() method is defined by POSIX 1003.26-2003. Aside * from the single method, it adds the following requirements: @@ -35,10 +58,6 @@ * + application must define _POSIX_26_C_SOURCE to use posix_devctl(). * + posix_devctl() is prototyped in */ - -#ifdef _POSIX_26_C_SOURCE -#include - int posix_devctl( int fd, int dcmd, From b088f504265018c394f7061cc4d8013856f686f1 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sun, 8 Sep 2019 21:58:35 +0900 Subject: [PATCH 020/520] Cygwin: pty: Fix the behaviour of Ctrl-C in the pseudo console mode. - When the I/O pipe is switched to the pseudo console side, the behaviour of Ctrl-C was unstable. This rarely happens, however, for example, shell sometimes crashes by Ctrl-C in that situation. Furthermore, Ctrl-C was ignored if output of non-cygwin program is redirected to pipe. This patch fixes these issues. --- winsup/cygwin/fhandler.h | 4 ---- winsup/cygwin/fhandler_tty.cc | 44 +++++++++++++++++++++++++---------- winsup/cygwin/select.cc | 2 +- winsup/cygwin/spawn.cc | 42 ++++++++++++++------------------- 4 files changed, 50 insertions(+), 42 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index e72e11f7a..e0c56cd34 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -2187,10 +2187,6 @@ class fhandler_pty_slave: public fhandler_pty_common get_ttyp ()->mask_switch_to_pcon = mask; } void fixup_after_attach (bool native_maybe); - pid_t get_pcon_pid (void) - { - return get_ttyp ()->pcon_pid; - } bool is_line_input (void) { return get_ttyp ()->ti.c_lflag & ICANON; diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 3ffd64e21..a8821c72c 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -895,6 +895,7 @@ fhandler_pty_slave::close () termios_printf ("CloseHandle (output_mutex<%p>), %E", output_mutex); if (pcon_attached_to == get_minor ()) get_ttyp ()->num_pcon_attached_slaves --; + get_ttyp ()->mask_switch_to_pcon = false; return 0; } @@ -1026,20 +1027,26 @@ fhandler_pty_slave::reset_switch_to_pcon (void) get_ttyp ()->need_clear_screen = false; } - if (ALWAYS_USE_PCON) - return; if (isHybrid) - { - this->set_switch_to_pcon (); - return; - } + this->set_switch_to_pcon (); if (get_ttyp ()->pcon_pid && get_ttyp ()->pcon_pid != myself->pid && kill (get_ttyp ()->pcon_pid, 0) == 0) /* There is a process which is grabbing pseudo console. */ return; - if (get_ttyp ()->switch_to_pcon && - get_ttyp ()->pcon_pid != myself->pid) + if (isHybrid) + { + if (ALWAYS_USE_PCON) + { + DWORD mode; + GetConsoleMode (get_handle (), &mode); + SetConsoleMode (get_handle (), mode & ~ENABLE_PROCESSED_INPUT); + } + get_ttyp ()->pcon_pid = 0; + init_console_handler (true); + return; + } + if (get_ttyp ()->switch_to_pcon) { DWORD mode; GetConsoleMode (get_handle (), &mode); @@ -1048,6 +1055,7 @@ fhandler_pty_slave::reset_switch_to_pcon (void) } get_ttyp ()->pcon_pid = 0; get_ttyp ()->switch_to_pcon = false; + init_console_handler (true); } void @@ -1307,8 +1315,7 @@ fhandler_pty_slave::read (void *ptr, size_t& len) if (ptr) /* Indicating not tcflush(). */ { reset_switch_to_pcon (); - if (get_ttyp ()->pcon_pid != myself->pid) - mask_switch_to_pcon (true); + mask_switch_to_pcon (true); } if (is_nonblocking () || !ptr) /* Indicating tcflush(). */ @@ -1428,7 +1435,7 @@ fhandler_pty_slave::read (void *ptr, size_t& len) flags &= ~ENABLE_ECHO_INPUT; if ((get_ttyp ()->ti.c_lflag & ISIG) && !(get_ttyp ()->ti.c_iflag & IGNBRK)) - flags |= ENABLE_PROCESSED_INPUT; + flags |= ALWAYS_USE_PCON ? 0 : ENABLE_PROCESSED_INPUT; if (dwMode != flags) SetConsoleMode (get_handle (), flags); /* Read get_handle() instad of get_handle_cyg() */ @@ -2222,6 +2229,16 @@ fhandler_pty_master::write (const void *ptr, size_t len) return len; } + if (get_ttyp ()->switch_to_pcon && + (ti.c_lflag & ISIG) && + memchr (p, ti.c_cc[VINTR], len) && + get_ttyp ()->getpgid () == get_ttyp ()->pcon_pid) + { + DWORD n; + /* Send ^C to pseudo console as well */ + WriteFile (to_slave, "\003", 1, &n, 0); + } + line_edit_status status = line_edit (p++, len, ti, &ret); if (status > line_edit_signalled && status != line_edit_pipe_full) ret = -1; @@ -2875,8 +2892,10 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe) get_ttyp ()->num_pcon_attached_slaves ++; } } + if (ALWAYS_USE_PCON && pcon_attached_to == get_minor ()) + set_ishybrid_and_switch_to_pcon (get_output_handle ()); } - if (pcon_attached_to == get_minor () && (native_maybe || ALWAYS_USE_PCON)) + if (pcon_attached_to == get_minor () && native_maybe) { FlushConsoleInputBuffer (get_handle ()); DWORD mode; @@ -2891,6 +2910,7 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe) kill (get_ttyp ()->pcon_pid, 0) != 0) get_ttyp ()->pcon_pid = myself->pid; get_ttyp ()->switch_to_pcon = true; + init_console_handler(false); } } diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 4efc302df..3589ccabf 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -1294,7 +1294,7 @@ pty_slave_startup (select_record *me, select_stuff *stuff) { fhandler_base *fh = (fhandler_base *) me->fh; fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; - if (me->read_selected && ptys->get_pcon_pid () != myself->pid) + if (me->read_selected) ptys->mask_switch_to_pcon (true); select_pipe_info *pi = stuff->device_specific_ptys; diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 15cba3610..7c9e67303 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -261,6 +261,21 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, int res = -1; DWORD pidRestore = 0; bool attach_to_pcon = false; + pid_t ctty_pgid = 0; + + /* Search for CTTY and retrieve its PGID */ + cygheap_fdenum cfd (false); + while (cfd.next () >= 0) + if (cfd->get_major () == DEV_PTYS_MAJOR || + cfd->get_major () == DEV_CONS_MAJOR) + { + fhandler_termios *fh = (fhandler_termios *) (fhandler_base *) cfd; + if (fh->tc ()->ntty == myself->ctty) + { + ctty_pgid = fh->tc ()->getpgid (); + break; + } + } /* Check if we have been called from exec{lv}p or spawn{lv}p and mask mode to keep only the spawn mode. */ @@ -539,8 +554,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, in a console will break native processes running in the background, because the Ctrl-C event is sent to all processes in the console, unless they ignore it explicitely. CREATE_NEW_PROCESS_GROUP does that for us. */ - if (!iscygwin () && fhandler_console::exists () - && fhandler_console::tc_getpgid () != myself->pgid) + if (!iscygwin () && ctty_pgid && ctty_pgid != myself->pgid) c_flags |= CREATE_NEW_PROCESS_GROUP; refresh_cygheap (); @@ -606,33 +620,11 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, attach_to_pcon = true; break; } - else - { - /* Fallback */ - DWORD target[3] = { - STD_INPUT_HANDLE, - STD_OUTPUT_HANDLE, - STD_ERROR_HANDLE - }; - if (fd == 0) - { - ptys->set_handle (ptys->get_handle_cyg ()); - SetStdHandle (target[fd], - ptys->get_handle ()); - } - else if (fd < 3) - { - ptys->set_output_handle ( - ptys->get_output_handle_cyg ()); - SetStdHandle (target[fd], - ptys->get_output_handle ()); - } - } } } } } - if (ptys) + if (ptys && attach_to_pcon) ptys->fixup_after_attach (!iscygwin ()); if (!iscygwin ()) From bd31b7c5d54e26d3fb02946f1a88e97fa7379e3e Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sun, 8 Sep 2019 22:23:23 +0900 Subject: [PATCH 021/520] Cygwin: pty: Fix screen alternation while pseudo console switching. - If screen alternated while pseudo console switching, it sometimes failed. This might happen when the output of the non-cygwin program is piped to less. This patch fixes this issue. --- winsup/cygwin/fhandler_tty.cc | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index a8821c72c..b4591c17a 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -73,6 +73,7 @@ struct pipe_reply { static int pcon_attached_to = -1; static bool isHybrid; +static bool do_not_reset_switch_to_pcon; #if USE_API_HOOK static void @@ -1046,6 +1047,8 @@ fhandler_pty_slave::reset_switch_to_pcon (void) init_console_handler (true); return; } + if (do_not_reset_switch_to_pcon) + return; if (get_ttyp ()->switch_to_pcon) { DWORD mode; @@ -1108,6 +1111,8 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) { //p0 += 8; get_ttyp ()->screen_alternated = true; + if (get_ttyp ()->switch_to_pcon) + do_not_reset_switch_to_pcon = true; } } if (get_ttyp ()->screen_alternated) @@ -1118,6 +1123,7 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) { p1 += 8; get_ttyp ()->screen_alternated = false; + do_not_reset_switch_to_pcon = false; memmove (p0, p1, buf+nlen - p1); nlen -= p1 - p0; } @@ -1177,7 +1183,8 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) p += wLen; } /* Detach from pseudo console and resume. */ - SetConsoleMode (get_output_handle (), dwMode); + flags = ENABLE_VIRTUAL_TERMINAL_PROCESSING; + SetConsoleMode (get_output_handle (), dwMode | flags); cleanup: SetConsoleOutputCP (origCP); HeapFree (GetProcessHeap (), 0, buf); @@ -1267,7 +1274,7 @@ fhandler_pty_slave::write (const void *ptr, size_t len) HeapFree (GetProcessHeap (), 0, buf); flags = ENABLE_VIRTUAL_TERMINAL_PROCESSING; if (get_ttyp ()->switch_to_pcon && !fallback) - SetConsoleMode (get_output_handle (), dwMode); + SetConsoleMode (get_output_handle (), dwMode | flags); restore_reattach_pcon (); @@ -2899,12 +2906,11 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe) { FlushConsoleInputBuffer (get_handle ()); DWORD mode; - GetConsoleMode (get_handle (), &mode); - SetConsoleMode (get_handle (), - (mode & ~ENABLE_VIRTUAL_TERMINAL_INPUT) | - ENABLE_ECHO_INPUT | - ENABLE_LINE_INPUT | - ENABLE_PROCESSED_INPUT); + mode = ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT; + SetConsoleMode (get_output_handle (), mode); + FlushConsoleInputBuffer (get_handle ()); + mode = ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT; + SetConsoleMode (get_handle (), mode); Sleep (20); if (get_ttyp ()->pcon_pid == 0 || kill (get_ttyp ()->pcon_pid, 0) != 0) From cac5f8781a7bfb21e7e0bd938ac235d5063166c8 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Mon, 9 Sep 2019 21:08:20 +0900 Subject: [PATCH 022/520] Cygwin: pty: Prevent the helper process from exiting by Ctrl-C. --- winsup/utils/cygwin-console-helper.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/utils/cygwin-console-helper.cc b/winsup/utils/cygwin-console-helper.cc index ad451ecf5..66004bd15 100644 --- a/winsup/utils/cygwin-console-helper.cc +++ b/winsup/utils/cygwin-console-helper.cc @@ -10,6 +10,7 @@ main (int argc, char **argv) SetEvent (h); if (argc == 4) /* Pseudo console helper mode for PTY */ { + SetConsoleCtrlHandler (NULL, TRUE); HANDLE hPipe = (HANDLE) strtoull (argv[3], &end, 0); char buf[64]; sprintf (buf, "StdHandles=%p,%p\n", From 3355a6d4b9d5a7b9ba86215f734967fcbb32f8c4 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sat, 14 Sep 2019 06:48:14 +0900 Subject: [PATCH 023/520] Cygwin: pty: Switch input and output pipes individually. - Previously, input and output pipes were switched together between the traditional pty and the pseudo console. However, for example, if stdin is redirected to another device, it is better to leave input pipe traditional pty side even for non-cygwin program. This patch realizes such behaviour. --- winsup/cygwin/dtable.cc | 6 +- winsup/cygwin/fhandler.h | 9 +- winsup/cygwin/fhandler_console.cc | 7 +- winsup/cygwin/fhandler_tty.cc | 196 ++++++++++++++++++++---------- winsup/cygwin/select.cc | 4 +- winsup/cygwin/spawn.cc | 44 +++---- winsup/cygwin/tty.cc | 5 +- winsup/cygwin/tty.h | 5 +- 8 files changed, 174 insertions(+), 102 deletions(-) diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 7b2e52005..cb5f47395 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -147,9 +147,9 @@ dtable::get_debugger_info () void dtable::stdio_init () { - int chk_order[] = {1, 0, 2}; for (int i = 0; i < 3; i ++) { + const int chk_order[] = {1, 0, 2}; int fd = chk_order[i]; fhandler_base *fh = cygheap->fdtab[fd]; if (fh && fh->get_major () == DEV_PTYS_MAJOR) @@ -169,12 +169,14 @@ dtable::stdio_init () FreeConsole (); if (AttachConsole (ptys->getHelperProcessId ())) { - ptys->fixup_after_attach (false); + ptys->fixup_after_attach (false, fd); break; } } } } + else if (fh && fh->get_major () == DEV_CONS_MAJOR) + break; } if (myself->cygstarted || ISSTATE (myself, PID_CYGPARENT)) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index e0c56cd34..1bf5dfb09 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -2114,6 +2114,7 @@ class fhandler_pty_slave: public fhandler_pty_common HANDLE inuse; // used to indicate that a tty is in use HANDLE output_handle_cyg, io_handle_cyg; DWORD pid_restore; + int fd; /* Helper functions for fchmod and fchown. */ bool fch_open_handles (bool chown); @@ -2175,18 +2176,18 @@ class fhandler_pty_slave: public fhandler_pty_common copyto (fh); return fh; } - void set_switch_to_pcon (void); + void set_switch_to_pcon (int fd); void reset_switch_to_pcon (void); void push_to_pcon_screenbuffer (const char *ptr, size_t len); - void mask_switch_to_pcon (bool mask) + void mask_switch_to_pcon_in (bool mask) { if (!mask && get_ttyp ()->pcon_pid && get_ttyp ()->pcon_pid != myself->pid && kill (get_ttyp ()->pcon_pid, 0) == 0) return; - get_ttyp ()->mask_switch_to_pcon = mask; + get_ttyp ()->mask_switch_to_pcon_in = mask; } - void fixup_after_attach (bool native_maybe); + void fixup_after_attach (bool native_maybe, int fd); bool is_line_input (void) { return get_ttyp ()->ti.c_lflag & ICANON; diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 1b034f4b9..778279f99 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -3156,10 +3156,9 @@ fhandler_console::get_console_process_id (DWORD pid, bool match) tmp = 0; for (DWORD i=0; i= 0) + int fd; + while ((fd = cfd.next ()) >= 0) if (cfd->get_major () == DEV_PTYS_MAJOR) { fhandler_base *fh = cfd; fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; - ptys->set_switch_to_pcon (); + ptys->set_switch_to_pcon (fd); } } @@ -124,6 +125,29 @@ force_attach_to_pcon (HANDLE h) break; } } + else if (cfd->get_major () == DEV_CONS_MAJOR) + { + fhandler_base *fh = cfd; + fhandler_console *cons = (fhandler_console *) fh; + if (n != 0 + || h == cons->get_handle () + || h == cons->get_output_handle ()) + { + /* If the process is running on a console, + the parent process should be attached + to the same console. */ + pinfo p (myself->ppid); + FreeConsole (); + if (AttachConsole (p->dwProcessId)) + { + pcon_attached_to = -1; + attach_done = true; + } + else + pcon_attached_to = -1; + break; + } + } if (attach_done) break; } @@ -303,7 +327,7 @@ PeekConsoleInputW_Hooked #define WriteFile_Orig 0 #define ReadFile_Orig 0 #define PeekConsoleInputA_Orig 0 -void set_ishybrid_and_switch_to_pcon (void) {} +void set_ishybrid_and_switch_to_pcon (HANDLE) {} #endif /* USE_API_HOOK */ bool @@ -596,7 +620,7 @@ out: fhandler_pty_slave::fhandler_pty_slave (int unit) : fhandler_pty_common (), inuse (NULL), output_handle_cyg (NULL), - io_handle_cyg (NULL), pid_restore (0) + io_handle_cyg (NULL), pid_restore (0), fd (-1) { if (unit >= 0) dev ().parse (DEV_PTYS_MAJOR, unit); @@ -896,7 +920,7 @@ fhandler_pty_slave::close () termios_printf ("CloseHandle (output_mutex<%p>), %E", output_mutex); if (pcon_attached_to == get_minor ()) get_ttyp ()->num_pcon_attached_slaves --; - get_ttyp ()->mask_switch_to_pcon = false; + get_ttyp ()->mask_switch_to_pcon_in = false; return 0; } @@ -985,14 +1009,16 @@ fhandler_pty_slave::restore_reattach_pcon (void) } void -fhandler_pty_slave::set_switch_to_pcon (void) +fhandler_pty_slave::set_switch_to_pcon (int fd_set) { + if (fd < 0) + fd = fd_set; if (!isHybrid) { reset_switch_to_pcon (); return; } - if (!get_ttyp ()->switch_to_pcon) + if (fd == 0 && !get_ttyp ()->switch_to_pcon_in) { pid_restore = 0; if (pcon_attached_to != get_minor ()) @@ -1000,15 +1026,22 @@ fhandler_pty_slave::set_switch_to_pcon (void) goto skip_console_setting; FlushConsoleInputBuffer (get_handle ()); DWORD mode; - GetConsoleMode (get_handle (), &mode); - SetConsoleMode (get_handle (), mode | ENABLE_ECHO_INPUT); + mode = ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT; + SetConsoleMode (get_handle (), mode); skip_console_setting: restore_reattach_pcon (); + if (get_ttyp ()->pcon_pid == 0 || + kill (get_ttyp ()->pcon_pid, 0) != 0) + get_ttyp ()->pcon_pid = myself->pid; + get_ttyp ()->switch_to_pcon_in = true; + } + else if ((fd == 1 || fd == 2) && !get_ttyp ()->switch_to_pcon_out) + { Sleep (20); if (get_ttyp ()->pcon_pid == 0 || kill (get_ttyp ()->pcon_pid, 0) != 0) get_ttyp ()->pcon_pid = myself->pid; - get_ttyp ()->switch_to_pcon = true; + get_ttyp ()->switch_to_pcon_out = true; } } @@ -1029,7 +1062,7 @@ fhandler_pty_slave::reset_switch_to_pcon (void) } if (isHybrid) - this->set_switch_to_pcon (); + this->set_switch_to_pcon (fd); if (get_ttyp ()->pcon_pid && get_ttyp ()->pcon_pid != myself->pid && kill (get_ttyp ()->pcon_pid, 0) == 0) @@ -1041,7 +1074,10 @@ fhandler_pty_slave::reset_switch_to_pcon (void) { DWORD mode; GetConsoleMode (get_handle (), &mode); - SetConsoleMode (get_handle (), mode & ~ENABLE_PROCESSED_INPUT); + mode |= ENABLE_ECHO_INPUT; + mode |= ENABLE_LINE_INPUT; + mode &= ~ENABLE_PROCESSED_INPUT; + SetConsoleMode (get_handle (), mode); } get_ttyp ()->pcon_pid = 0; init_console_handler (true); @@ -1049,15 +1085,17 @@ fhandler_pty_slave::reset_switch_to_pcon (void) } if (do_not_reset_switch_to_pcon) return; - if (get_ttyp ()->switch_to_pcon) + if (get_ttyp ()->switch_to_pcon_in) { DWORD mode; GetConsoleMode (get_handle (), &mode); SetConsoleMode (get_handle (), mode & ~ENABLE_ECHO_INPUT); - Sleep (20); /* Wait for pty_master_fwd_thread() */ } + if (get_ttyp ()->switch_to_pcon_out) + Sleep (20); /* Wait for pty_master_fwd_thread() */ get_ttyp ()->pcon_pid = 0; - get_ttyp ()->switch_to_pcon = false; + get_ttyp ()->switch_to_pcon_in = false; + get_ttyp ()->switch_to_pcon_out = false; init_console_handler (true); } @@ -1111,7 +1149,7 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) { //p0 += 8; get_ttyp ()->screen_alternated = true; - if (get_ttyp ()->switch_to_pcon) + if (get_ttyp ()->switch_to_pcon_out) do_not_reset_switch_to_pcon = true; } } @@ -1133,7 +1171,7 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) } if (!nlen) /* Nothing to be synchronized */ goto cleanup; - if (get_ttyp ()->switch_to_pcon) + if (get_ttyp ()->switch_to_pcon_out) goto cleanup; /* Remove ESC sequence which returns results to console input buffer. Without this, cursor position report @@ -1209,7 +1247,7 @@ fhandler_pty_slave::write (const void *ptr, size_t len) char *buf; ssize_t nlen; - UINT targetCodePage = get_ttyp ()->switch_to_pcon ? + UINT targetCodePage = get_ttyp ()->switch_to_pcon_out ? GetConsoleOutputCP () : get_ttyp ()->TermCodePage; if (targetCodePage != get_ttyp ()->TermCodePage) { @@ -1239,7 +1277,7 @@ fhandler_pty_slave::write (const void *ptr, size_t len) /* If not attached to this pseudo console, try to attach temporarily. */ pid_restore = 0; bool fallback = false; - if (get_ttyp ()->switch_to_pcon && pcon_attached_to != get_minor ()) + if (get_ttyp ()->switch_to_pcon_out && pcon_attached_to != get_minor ()) if (!try_reattach_pcon ()) fallback = true; @@ -1248,12 +1286,12 @@ fhandler_pty_slave::write (const void *ptr, size_t len) if (!(get_ttyp ()->ti.c_oflag & OPOST) || !(get_ttyp ()->ti.c_oflag & ONLCR)) flags |= DISABLE_NEWLINE_AUTO_RETURN; - if (get_ttyp ()->switch_to_pcon && !fallback) + if (get_ttyp ()->switch_to_pcon_out && !fallback) { GetConsoleMode (get_output_handle (), &dwMode); SetConsoleMode (get_output_handle (), dwMode | flags); } - HANDLE to = (get_ttyp ()->switch_to_pcon && !fallback) ? + HANDLE to = (get_ttyp ()->switch_to_pcon_out && !fallback) ? get_output_handle () : get_output_handle_cyg (); acquire_output_mutex (INFINITE); if (!process_opost_output (to, buf, nlen, false)) @@ -1273,7 +1311,7 @@ fhandler_pty_slave::write (const void *ptr, size_t len) release_output_mutex (); HeapFree (GetProcessHeap (), 0, buf); flags = ENABLE_VIRTUAL_TERMINAL_PROCESSING; - if (get_ttyp ()->switch_to_pcon && !fallback) + if (get_ttyp ()->switch_to_pcon_out && !fallback) SetConsoleMode (get_output_handle (), dwMode | flags); restore_reattach_pcon (); @@ -1292,8 +1330,8 @@ fhandler_pty_slave::write (const void *ptr, size_t len) bool fhandler_pty_common::to_be_read_from_pcon (void) { - return get_ttyp ()->switch_to_pcon && - (!get_ttyp ()->mask_switch_to_pcon || ALWAYS_USE_PCON); + return get_ttyp ()->switch_to_pcon_in && + (!get_ttyp ()->mask_switch_to_pcon_in || ALWAYS_USE_PCON); } void __reg3 @@ -1322,7 +1360,7 @@ fhandler_pty_slave::read (void *ptr, size_t& len) if (ptr) /* Indicating not tcflush(). */ { reset_switch_to_pcon (); - mask_switch_to_pcon (true); + mask_switch_to_pcon_in (true); } if (is_nonblocking () || !ptr) /* Indicating tcflush(). */ @@ -1475,7 +1513,7 @@ fhandler_pty_slave::read (void *ptr, size_t& len) len = rlen; restore_reattach_pcon (); - mask_switch_to_pcon (false); + mask_switch_to_pcon_in (false); return; } @@ -1491,7 +1529,7 @@ do_read_cyg: if (ptr && !bytes_in_pipe && !vmin && !time_to_wait) { ReleaseMutex (input_mutex); - mask_switch_to_pcon (false); + mask_switch_to_pcon_in (false); len = (size_t) bytes_in_pipe; return; } @@ -1603,7 +1641,7 @@ out: push_to_pcon_screenbuffer (ptr0, len); release_output_mutex (); } - mask_switch_to_pcon (false); + mask_switch_to_pcon_in (false); } int @@ -2147,7 +2185,8 @@ fhandler_pty_master::close () ClosePseudoConsole = (VOID (WINAPI *) (HPCON)) func; ClosePseudoConsole (getPseudoConsole ()); } - get_ttyp ()->switch_to_pcon = false; + get_ttyp ()->switch_to_pcon_in = false; + get_ttyp ()->switch_to_pcon_out = false; } if (get_ttyp ()->getsid () > 0) kill (get_ttyp ()->getsid (), SIGHUP); @@ -2231,12 +2270,24 @@ fhandler_pty_master::write (const void *ptr, size_t len) } DWORD wLen; WriteFile (to_slave, buf, nlen, &wLen, NULL); - SetEvent (input_available_event); + + if (ALWAYS_USE_PCON && + (ti.c_lflag & ISIG) && memchr (p, ti.c_cc[VINTR], len)) + get_ttyp ()->kill_pgrp (SIGINT); + + if (ti.c_lflag & ICANON) + { + if (memchr (buf, '\r', nlen)) + SetEvent (input_available_event); + } + else + SetEvent (input_available_event); + HeapFree (GetProcessHeap (), 0, buf); return len; } - if (get_ttyp ()->switch_to_pcon && + if (get_ttyp ()->switch_to_pcon_in && (ti.c_lflag & ISIG) && memchr (p, ti.c_cc[VINTR], len) && get_ttyp ()->getpgid () == get_ttyp ()->pcon_pid) @@ -2808,8 +2859,10 @@ restart: #endif /* USE_OWN_NLS_FUNC */ void -fhandler_pty_slave::fixup_after_attach (bool native_maybe) +fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) { + if (fd < 0) + fd = fd_set; if (getPseudoConsole ()) { if (fhandler_console::get_console_process_id (getHelperProcessId (), @@ -2887,43 +2940,58 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe) break; } } - - /* Clear screen to synchronize pseudo console screen buffer - with real terminal. This is necessary because pseudo - console screen buffer is empty at start. */ - if (get_ttyp ()->num_pcon_attached_slaves == 0 - && !ALWAYS_USE_PCON) - /* Assume this is the first process using this pty slave. */ - get_ttyp ()->need_clear_screen = true; - - get_ttyp ()->num_pcon_attached_slaves ++; } + /* Clear screen to synchronize pseudo console screen buffer + with real terminal. This is necessary because pseudo + console screen buffer is empty at start. */ + if (get_ttyp ()->num_pcon_attached_slaves == 0 + && !ALWAYS_USE_PCON) + /* Assume this is the first process using this pty slave. */ + get_ttyp ()->need_clear_screen = true; + + get_ttyp ()->num_pcon_attached_slaves ++; } - if (ALWAYS_USE_PCON && pcon_attached_to == get_minor ()) + + if (ALWAYS_USE_PCON && !isHybrid && pcon_attached_to == get_minor ()) set_ishybrid_and_switch_to_pcon (get_output_handle ()); - } - if (pcon_attached_to == get_minor () && native_maybe) - { - FlushConsoleInputBuffer (get_handle ()); - DWORD mode; - mode = ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT; - SetConsoleMode (get_output_handle (), mode); - FlushConsoleInputBuffer (get_handle ()); - mode = ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT; - SetConsoleMode (get_handle (), mode); - Sleep (20); - if (get_ttyp ()->pcon_pid == 0 || - kill (get_ttyp ()->pcon_pid, 0) != 0) - get_ttyp ()->pcon_pid = myself->pid; - get_ttyp ()->switch_to_pcon = true; - init_console_handler(false); + + if (pcon_attached_to == get_minor () && native_maybe) + { + if (fd == 0) + { + FlushConsoleInputBuffer (get_handle ()); + DWORD mode = + ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT; + SetConsoleMode (get_handle (), mode); + if (get_ttyp ()->pcon_pid == 0 || + kill (get_ttyp ()->pcon_pid, 0) != 0) + get_ttyp ()->pcon_pid = myself->pid; + get_ttyp ()->switch_to_pcon_in = true; + } + else if (fd == 1 || fd == 2) + { + DWORD mode = ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT; + SetConsoleMode (get_output_handle (), mode); + if (!get_ttyp ()->switch_to_pcon_out) + Sleep (20); + if (get_ttyp ()->pcon_pid == 0 || + kill (get_ttyp ()->pcon_pid, 0) != 0) + get_ttyp ()->pcon_pid = myself->pid; + get_ttyp ()->switch_to_pcon_out = true; + } + init_console_handler(false); + } + else if (fd == 0 && native_maybe) + /* Read from unattached pseudo console cause freeze, + therefore, fallback to legacy pty. */ + set_handle (get_handle_cyg ()); } } void fhandler_pty_slave::fixup_after_fork (HANDLE parent) { - fixup_after_attach (false); + fixup_after_attach (false, -1); // fork_fixup (parent, inuse, "inuse"); // fhandler_pty_common::fixup_after_fork (parent); report_tty_counts (this, "inherited", ""); @@ -2932,6 +3000,12 @@ fhandler_pty_slave::fixup_after_fork (HANDLE parent) void fhandler_pty_slave::fixup_after_exec () { + /* Native windows program does not reset event on read. + Therefore, reset here if no input is available. */ + DWORD bytes_in_pipe; + if (bytes_available (bytes_in_pipe) && !bytes_in_pipe) + ResetEvent (input_available_event); + reset_switch_to_pcon (); if (!close_on_exec ()) @@ -3169,7 +3243,7 @@ fhandler_pty_master::pty_master_fwd_thread () { /* Avoid duplicating slave output which is already sent to to_master_cyg */ - if (!get_ttyp ()->switch_to_pcon) + if (!get_ttyp ()->switch_to_pcon_out) continue; /* Avoid setting window title to "cygwin-console-helper.exe" */ diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 3589ccabf..ed8c98d1c 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -1295,7 +1295,7 @@ pty_slave_startup (select_record *me, select_stuff *stuff) fhandler_base *fh = (fhandler_base *) me->fh; fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; if (me->read_selected) - ptys->mask_switch_to_pcon (true); + ptys->mask_switch_to_pcon_in (true); select_pipe_info *pi = stuff->device_specific_ptys; if (pi->start) @@ -1318,7 +1318,7 @@ pty_slave_cleanup (select_record *me, select_stuff *stuff) fhandler_base *fh = (fhandler_base *) me->fh; fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; if (me->read_selected) - ptys->mask_switch_to_pcon (false); + ptys->mask_switch_to_pcon_in (false); select_pipe_info *pi = (select_pipe_info *) stuff->device_specific_ptys; if (!pi) diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 7c9e67303..4396ec9e5 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -260,7 +260,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, bool rc; int res = -1; DWORD pidRestore = 0; - bool attach_to_pcon = false; + bool attach_to_console = false; pid_t ctty_pgid = 0; /* Search for CTTY and retrieve its PGID */ @@ -408,14 +408,6 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, pi.hProcess = pi.hThread = NULL; pi.dwProcessId = pi.dwThreadId = 0; - /* Set up needed handles for stdio */ - si.dwFlags = STARTF_USESTDHANDLES; - si.hStdInput = handle ((in__stdin < 0 ? 0 : in__stdin), false); - si.hStdOutput = handle ((in__stdout < 0 ? 1 : in__stdout), true); - si.hStdError = handle (2, true); - - si.cb = sizeof (si); - c_flags = GetPriorityClass (GetCurrentProcess ()); sigproc_printf ("priority class %d", c_flags); @@ -591,15 +583,14 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, /* Attach to pseudo console if pty salve is used */ pidRestore = fhandler_console::get_console_process_id (GetCurrentProcessId (), false); - fhandler_pty_slave *ptys = NULL; - int chk_order[] = {1, 0, 2}; for (int i = 0; i < 3; i ++) { + const int chk_order[] = {1, 0, 2}; int fd = chk_order[i]; fhandler_base *fh = ::cygheap->fdtab[fd]; if (fh && fh->get_major () == DEV_PTYS_MAJOR) { - ptys = (fhandler_pty_slave *) fh; + fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; if (ptys->getPseudoConsole ()) { DWORD dwHelperProcessId = ptys->getHelperProcessId (); @@ -607,25 +598,28 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, fh->get_minor (), dwHelperProcessId); if (fhandler_console::get_console_process_id (dwHelperProcessId, true)) - { - /* Already attached */ - attach_to_pcon = true; - break; - } - else + /* Already attached */ + attach_to_console = true; + else if (!attach_to_console) { FreeConsole (); if (AttachConsole (dwHelperProcessId)) - { - attach_to_pcon = true; - break; - } + attach_to_console = true; } + ptys->fixup_after_attach (!iscygwin (), fd); } } + else if (fh && fh->get_major () == DEV_CONS_MAJOR) + attach_to_console = true; } - if (ptys && attach_to_pcon) - ptys->fixup_after_attach (!iscygwin ()); + + /* Set up needed handles for stdio */ + si.dwFlags = STARTF_USESTDHANDLES; + si.hStdInput = handle ((in__stdin < 0 ? 0 : in__stdin), false); + si.hStdOutput = handle ((in__stdout < 0 ? 1 : in__stdout), true); + si.hStdError = handle (2, true); + + si.cb = sizeof (si); if (!iscygwin ()) { @@ -931,7 +925,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, if (envblock) free (envblock); - if (attach_to_pcon && pidRestore) + if (attach_to_console && pidRestore) { FreeConsole (); AttachConsole (pidRestore); diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index c94aee3ba..54c25d997 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -237,9 +237,10 @@ tty::init () attach_pcon_in_fork = false; hPseudoConsole = NULL; column = 0; - switch_to_pcon = false; + switch_to_pcon_in = false; + switch_to_pcon_out = false; screen_alternated = false; - mask_switch_to_pcon = false; + mask_switch_to_pcon_in = false; pcon_pid = 0; num_pcon_attached_slaves = 0; TermCodePage = 20127; /* ASCII */ diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h index c2b0490d0..b7d1e23ad 100644 --- a/winsup/cygwin/tty.h +++ b/winsup/cygwin/tty.h @@ -98,9 +98,10 @@ private: DWORD HelperProcessId; HANDLE hHelperGoodbye; bool attach_pcon_in_fork; - bool switch_to_pcon; + bool switch_to_pcon_in; + bool switch_to_pcon_out; bool screen_alternated; - bool mask_switch_to_pcon; + bool mask_switch_to_pcon_in; pid_t pcon_pid; int num_pcon_attached_slaves; UINT TermCodePage; From fca4cda7a420d7b15ac217d008527e029d05758e Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sat, 14 Sep 2019 04:34:39 +0900 Subject: [PATCH 024/520] Cygwin: console: Fix read() in non-canonical mode. - In non-canonical mode, cygwin console returned only one character even if several keys are typed before read() called. This patch fixes this behaviour. --- winsup/cygwin/fhandler_console.cc | 664 ++++++++++++++++-------------- 1 file changed, 344 insertions(+), 320 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 778279f99..709b8255d 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -499,354 +499,378 @@ fhandler_console::process_input_message (void) termios *ti = &(get_ttyp ()->ti); - DWORD nread; - INPUT_RECORD input_rec; - const char *toadd = NULL; + /* Per MSDN, max size of buffer required is below 64K. */ +#define INREC_SIZE (65536 / sizeof (INPUT_RECORD)) - if (!ReadConsoleInputW (get_handle (), &input_rec, 1, &nread)) + fhandler_console::input_states stat = input_processing; + DWORD total_read, i; + INPUT_RECORD input_rec[INREC_SIZE]; + + if (!PeekConsoleInputW (get_handle (), input_rec, INREC_SIZE, &total_read)) { - termios_printf ("ReadConsoleInput failed, %E"); + termios_printf ("PeekConsoleInput failed, %E"); return input_error; } - const WCHAR &unicode_char = input_rec.Event.KeyEvent.uChar.UnicodeChar; - const DWORD &ctrl_key_state = input_rec.Event.KeyEvent.dwControlKeyState; - - /* check the event that occurred */ - switch (input_rec.EventType) + for (i = 0; i < total_read; i ++) { - case KEY_EVENT: + DWORD nread = 1; + const char *toadd = NULL; - con.nModifiers = 0; + const WCHAR &unicode_char = + input_rec[i].Event.KeyEvent.uChar.UnicodeChar; + const DWORD &ctrl_key_state = + input_rec[i].Event.KeyEvent.dwControlKeyState; + + /* check the event that occurred */ + switch (input_rec[i].EventType) + { + case KEY_EVENT: + + con.nModifiers = 0; #ifdef DEBUGGING - /* allow manual switching to/from raw mode via ctrl-alt-scrolllock */ - if (input_rec.Event.KeyEvent.bKeyDown - && input_rec.Event.KeyEvent.wVirtualKeyCode == VK_SCROLL - && (ctrl_key_state & (LEFT_ALT_PRESSED | LEFT_CTRL_PRESSED)) - == (LEFT_ALT_PRESSED | LEFT_CTRL_PRESSED)) - { - set_raw_win32_keyboard_mode (!con.raw_win32_keyboard_mode); - return input_processing; - } + /* allow manual switching to/from raw mode via ctrl-alt-scrolllock */ + if (input_rec[i].Event.KeyEvent.bKeyDown + && input_rec[i].Event.KeyEvent.wVirtualKeyCode == VK_SCROLL + && (ctrl_key_state & (LEFT_ALT_PRESSED | LEFT_CTRL_PRESSED)) + == (LEFT_ALT_PRESSED | LEFT_CTRL_PRESSED)) + { + set_raw_win32_keyboard_mode (!con.raw_win32_keyboard_mode); + continue; + } #endif - if (con.raw_win32_keyboard_mode) - { - __small_sprintf (tmp, "\033{%u;%u;%u;%u;%u;%luK", - input_rec.Event.KeyEvent.bKeyDown, - input_rec.Event.KeyEvent.wRepeatCount, - input_rec.Event.KeyEvent.wVirtualKeyCode, - input_rec.Event.KeyEvent.wVirtualScanCode, - input_rec.Event.KeyEvent.uChar.UnicodeChar, - input_rec.Event.KeyEvent.dwControlKeyState); - toadd = tmp; - nread = strlen (toadd); + if (con.raw_win32_keyboard_mode) + { + __small_sprintf (tmp, "\033{%u;%u;%u;%u;%u;%luK", + input_rec[i].Event.KeyEvent.bKeyDown, + input_rec[i].Event.KeyEvent.wRepeatCount, + input_rec[i].Event.KeyEvent.wVirtualKeyCode, + input_rec[i].Event.KeyEvent.wVirtualScanCode, + input_rec[i].Event.KeyEvent.uChar.UnicodeChar, + input_rec[i].Event.KeyEvent.dwControlKeyState); + toadd = tmp; + nread = strlen (toadd); + break; + } + + /* Ignore key up events, except for Alt+Numpad events. */ + if (!input_rec[i].Event.KeyEvent.bKeyDown && + !is_alt_numpad_event (&input_rec[i])) + continue; + /* Ignore Alt+Numpad keys. They are eventually handled below after + releasing the Alt key. */ + if (input_rec[i].Event.KeyEvent.bKeyDown + && is_alt_numpad_key (&input_rec[i])) + continue; + + if (ctrl_key_state & SHIFT_PRESSED) + con.nModifiers |= 1; + if (ctrl_key_state & RIGHT_ALT_PRESSED) + con.nModifiers |= 2; + if (ctrl_key_state & CTRL_PRESSED) + con.nModifiers |= 4; + if (ctrl_key_state & LEFT_ALT_PRESSED) + con.nModifiers |= 8; + + /* Allow Backspace to emit ^? and escape sequences. */ + if (input_rec[i].Event.KeyEvent.wVirtualKeyCode == VK_BACK) + { + char c = con.backspace_keycode; + nread = 0; + if (ctrl_key_state & ALT_PRESSED) + { + if (con.metabit) + c |= 0x80; + else + tmp[nread++] = '\e'; + } + tmp[nread++] = c; + tmp[nread] = 0; + toadd = tmp; + } + /* Allow Ctrl-Space to emit ^@ */ + else if (input_rec[i].Event.KeyEvent.wVirtualKeyCode + == (wincap.has_con_24bit_colors () ? '2' : VK_SPACE) + && (ctrl_key_state & CTRL_PRESSED) + && !(ctrl_key_state & ALT_PRESSED)) + toadd = ""; + else if (unicode_char == 0 + /* arrow/function keys */ + || (input_rec[i].Event.KeyEvent.dwControlKeyState + & ENHANCED_KEY)) + { + toadd = get_nonascii_key (input_rec[i], tmp); + if (!toadd) + { + con.nModifiers = 0; + continue; + } + nread = strlen (toadd); + } + else + { + nread = con.con_to_str (tmp + 1, 59, unicode_char); + /* Determine if the keystroke is modified by META. The tricky + part is to distinguish whether the right Alt key should be + recognized as Alt, or as AltGr. */ + bool meta = + /* Alt but not AltGr (= left ctrl + right alt)? */ + (ctrl_key_state & ALT_PRESSED) != 0 + && ((ctrl_key_state & CTRL_PRESSED) == 0 + /* but also allow Alt-AltGr: */ + || (ctrl_key_state & ALT_PRESSED) == ALT_PRESSED + || (unicode_char <= 0x1f || unicode_char == 0x7f)); + if (!meta) + { + /* Determine if the character is in the current multibyte + charset. The test is easy. If the multibyte sequence + is > 1 and the first byte is ASCII CAN, the character + has been translated into the ASCII CAN + UTF-8 replacement + sequence. If so, just ignore the keypress. + FIXME: Is there a better solution? */ + if (nread > 1 && tmp[1] == 0x18) + beep (); + else + toadd = tmp + 1; + } + else if (con.metabit) + { + tmp[1] |= 0x80; + toadd = tmp + 1; + } + else + { + tmp[0] = '\033'; + tmp[1] = cyg_tolower (tmp[1]); + toadd = tmp; + nread++; + con.nModifiers &= ~4; + } + } break; - } - /* Ignore key up events, except for Alt+Numpad events. */ - if (!input_rec.Event.KeyEvent.bKeyDown && - !is_alt_numpad_event (&input_rec)) - return input_processing; - /* Ignore Alt+Numpad keys. They are eventually handled below after - releasing the Alt key. */ - if (input_rec.Event.KeyEvent.bKeyDown - && is_alt_numpad_key (&input_rec)) - return input_processing; - - if (ctrl_key_state & SHIFT_PRESSED) - con.nModifiers |= 1; - if (ctrl_key_state & RIGHT_ALT_PRESSED) - con.nModifiers |= 2; - if (ctrl_key_state & CTRL_PRESSED) - con.nModifiers |= 4; - if (ctrl_key_state & LEFT_ALT_PRESSED) - con.nModifiers |= 8; - - /* Allow Backspace to emit ^? and escape sequences. */ - if (input_rec.Event.KeyEvent.wVirtualKeyCode == VK_BACK) - { - char c = con.backspace_keycode; - nread = 0; - if (ctrl_key_state & ALT_PRESSED) + case MOUSE_EVENT: + send_winch_maybe (); { - if (con.metabit) - c |= 0x80; - else - tmp[nread++] = '\e'; - } - tmp[nread++] = c; - tmp[nread] = 0; - toadd = tmp; - } - /* Allow Ctrl-Space to emit ^@ */ - else if (input_rec.Event.KeyEvent.wVirtualKeyCode - == (wincap.has_con_24bit_colors () ? '2' : VK_SPACE) - && (ctrl_key_state & CTRL_PRESSED) - && !(ctrl_key_state & ALT_PRESSED)) - toadd = ""; - else if (unicode_char == 0 - /* arrow/function keys */ - || (input_rec.Event.KeyEvent.dwControlKeyState & ENHANCED_KEY)) - { - toadd = get_nonascii_key (input_rec, tmp); - if (!toadd) - { - con.nModifiers = 0; - return input_processing; - } - nread = strlen (toadd); - } - else - { - nread = con.con_to_str (tmp + 1, 59, unicode_char); - /* Determine if the keystroke is modified by META. The tricky - part is to distinguish whether the right Alt key should be - recognized as Alt, or as AltGr. */ - bool meta = - /* Alt but not AltGr (= left ctrl + right alt)? */ - (ctrl_key_state & ALT_PRESSED) != 0 - && ((ctrl_key_state & CTRL_PRESSED) == 0 - /* but also allow Alt-AltGr: */ - || (ctrl_key_state & ALT_PRESSED) == ALT_PRESSED - || (unicode_char <= 0x1f || unicode_char == 0x7f)); - if (!meta) - { - /* Determine if the character is in the current multibyte - charset. The test is easy. If the multibyte sequence - is > 1 and the first byte is ASCII CAN, the character - has been translated into the ASCII CAN + UTF-8 replacement - sequence. If so, just ignore the keypress. - FIXME: Is there a better solution? */ - if (nread > 1 && tmp[1] == 0x18) - beep (); - else - toadd = tmp + 1; - } - else if (con.metabit) - { - tmp[1] |= 0x80; - toadd = tmp + 1; - } - else - { - tmp[0] = '\033'; - tmp[1] = cyg_tolower (tmp[1]); - toadd = tmp; - nread++; - con.nModifiers &= ~4; - } - } - break; - - case MOUSE_EVENT: - send_winch_maybe (); - { - MOUSE_EVENT_RECORD& mouse_event = input_rec.Event.MouseEvent; - /* As a unique guard for mouse report generation, - call mouse_aware() which is common with select(), so the result - of select() and the actual read() will be consistent on the - issue of whether input (i.e. a mouse escape sequence) will - be available or not */ - if (mouse_aware (mouse_event)) - { - /* Note: Reported mouse position was already retrieved by - mouse_aware() and adjusted by window scroll buffer offset */ - - /* Treat the double-click event like a regular button press */ - if (mouse_event.dwEventFlags == DOUBLE_CLICK) + MOUSE_EVENT_RECORD& mouse_event = input_rec[i].Event.MouseEvent; + /* As a unique guard for mouse report generation, + call mouse_aware() which is common with select(), so the result + of select() and the actual read() will be consistent on the + issue of whether input (i.e. a mouse escape sequence) will + be available or not */ + if (mouse_aware (mouse_event)) { - syscall_printf ("mouse: double-click -> click"); - mouse_event.dwEventFlags = 0; - } + /* Note: Reported mouse position was already retrieved by + mouse_aware() and adjusted by window scroll buffer offset */ - /* This code assumes Windows never reports multiple button - events at the same time. */ - int b = 0; - char sz[32]; - char mode6_term = 'M'; - - if (mouse_event.dwEventFlags == MOUSE_WHEELED) - { - if (mouse_event.dwButtonState & 0xFF800000) + /* Treat the double-click event like a regular button press */ + if (mouse_event.dwEventFlags == DOUBLE_CLICK) { - b = 0x41; - strcpy (sz, "wheel down"); + syscall_printf ("mouse: double-click -> click"); + mouse_event.dwEventFlags = 0; + } + + /* This code assumes Windows never reports multiple button + events at the same time. */ + int b = 0; + char sz[32]; + char mode6_term = 'M'; + + if (mouse_event.dwEventFlags == MOUSE_WHEELED) + { + if (mouse_event.dwButtonState & 0xFF800000) + { + b = 0x41; + strcpy (sz, "wheel down"); + } + else + { + b = 0x40; + strcpy (sz, "wheel up"); + } } else { - b = 0x40; - strcpy (sz, "wheel up"); + /* Ignore unimportant mouse buttons */ + mouse_event.dwButtonState &= 0x7; + + if (mouse_event.dwEventFlags == MOUSE_MOVED) + { + b = con.last_button_code; + } + else if (mouse_event.dwButtonState < con.dwLastButtonState + && !con.ext_mouse_mode6) + { + b = 3; + strcpy (sz, "btn up"); + } + else if ((mouse_event.dwButtonState & 1) + != (con.dwLastButtonState & 1)) + { + b = 0; + strcpy (sz, "btn1 down"); + } + else if ((mouse_event.dwButtonState & 2) + != (con.dwLastButtonState & 2)) + { + b = 2; + strcpy (sz, "btn2 down"); + } + else if ((mouse_event.dwButtonState & 4) + != (con.dwLastButtonState & 4)) + { + b = 1; + strcpy (sz, "btn3 down"); + } + + if (con.ext_mouse_mode6 /* distinguish release */ + && mouse_event.dwButtonState < con.dwLastButtonState) + mode6_term = 'm'; + + con.last_button_code = b; + + if (mouse_event.dwEventFlags == MOUSE_MOVED) + { + b += 32; + strcpy (sz, "move"); + } + else + { + /* Remember the modified button state */ + con.dwLastButtonState = mouse_event.dwButtonState; + } } + + /* Remember mouse position */ + con.dwLastMousePosition.X = con.dwMousePosition.X; + con.dwLastMousePosition.Y = con.dwMousePosition.Y; + + /* Remember the modifiers */ + con.nModifiers = 0; + if (mouse_event.dwControlKeyState & SHIFT_PRESSED) + con.nModifiers |= 0x4; + if (mouse_event.dwControlKeyState & ALT_PRESSED) + con.nModifiers |= 0x8; + if (mouse_event.dwControlKeyState & CTRL_PRESSED) + con.nModifiers |= 0x10; + + /* Indicate the modifiers */ + b |= con.nModifiers; + + /* We can now create the code. */ + if (con.ext_mouse_mode6) + { + __small_sprintf (tmp, "\033[<%d;%d;%d%c", b, + con.dwMousePosition.X + 1, + con.dwMousePosition.Y + 1, + mode6_term); + nread = strlen (tmp); + } + else if (con.ext_mouse_mode15) + { + __small_sprintf (tmp, "\033[%d;%d;%dM", b + 32, + con.dwMousePosition.X + 1, + con.dwMousePosition.Y + 1); + nread = strlen (tmp); + } + else if (con.ext_mouse_mode5) + { + unsigned int xcode = con.dwMousePosition.X + ' ' + 1; + unsigned int ycode = con.dwMousePosition.Y + ' ' + 1; + + __small_sprintf (tmp, "\033[M%c", b + ' '); + nread = 4; + /* the neat nested encoding function of mintty + does not compile in g++, so let's unfold it: */ + if (xcode < 0x80) + tmp [nread++] = xcode; + else if (xcode < 0x800) + { + tmp [nread++] = 0xC0 + (xcode >> 6); + tmp [nread++] = 0x80 + (xcode & 0x3F); + } + else + tmp [nread++] = 0; + if (ycode < 0x80) + tmp [nread++] = ycode; + else if (ycode < 0x800) + { + tmp [nread++] = 0xC0 + (ycode >> 6); + tmp [nread++] = 0x80 + (ycode & 0x3F); + } + else + tmp [nread++] = 0; + } + else + { + unsigned int xcode = con.dwMousePosition.X + ' ' + 1; + unsigned int ycode = con.dwMousePosition.Y + ' ' + 1; + if (xcode >= 256) + xcode = 0; + if (ycode >= 256) + ycode = 0; + __small_sprintf (tmp, "\033[M%c%c%c", b + ' ', + xcode, ycode); + nread = 6; /* tmp may contain NUL bytes */ + } + syscall_printf ("mouse: %s at (%d,%d)", sz, + con.dwMousePosition.X, + con.dwMousePosition.Y); + + toadd = tmp; } + } + break; + + case FOCUS_EVENT: + if (con.use_focus) + { + if (input_rec[i].Event.FocusEvent.bSetFocus) + __small_sprintf (tmp, "\033[I"); else - { - /* Ignore unimportant mouse buttons */ - mouse_event.dwButtonState &= 0x7; - - if (mouse_event.dwEventFlags == MOUSE_MOVED) - { - b = con.last_button_code; - } - else if (mouse_event.dwButtonState < con.dwLastButtonState - && !con.ext_mouse_mode6) - { - b = 3; - strcpy (sz, "btn up"); - } - else if ((mouse_event.dwButtonState & 1) - != (con.dwLastButtonState & 1)) - { - b = 0; - strcpy (sz, "btn1 down"); - } - else if ((mouse_event.dwButtonState & 2) - != (con.dwLastButtonState & 2)) - { - b = 2; - strcpy (sz, "btn2 down"); - } - else if ((mouse_event.dwButtonState & 4) - != (con.dwLastButtonState & 4)) - { - b = 1; - strcpy (sz, "btn3 down"); - } - - if (con.ext_mouse_mode6 /* distinguish release */ - && mouse_event.dwButtonState < con.dwLastButtonState) - mode6_term = 'm'; - - con.last_button_code = b; - - if (mouse_event.dwEventFlags == MOUSE_MOVED) - { - b += 32; - strcpy (sz, "move"); - } - else - { - /* Remember the modified button state */ - con.dwLastButtonState = mouse_event.dwButtonState; - } - } - - /* Remember mouse position */ - con.dwLastMousePosition.X = con.dwMousePosition.X; - con.dwLastMousePosition.Y = con.dwMousePosition.Y; - - /* Remember the modifiers */ - con.nModifiers = 0; - if (mouse_event.dwControlKeyState & SHIFT_PRESSED) - con.nModifiers |= 0x4; - if (mouse_event.dwControlKeyState & ALT_PRESSED) - con.nModifiers |= 0x8; - if (mouse_event.dwControlKeyState & CTRL_PRESSED) - con.nModifiers |= 0x10; - - /* Indicate the modifiers */ - b |= con.nModifiers; - - /* We can now create the code. */ - if (con.ext_mouse_mode6) - { - __small_sprintf (tmp, "\033[<%d;%d;%d%c", b, - con.dwMousePosition.X + 1, - con.dwMousePosition.Y + 1, - mode6_term); - nread = strlen (tmp); - } - else if (con.ext_mouse_mode15) - { - __small_sprintf (tmp, "\033[%d;%d;%dM", b + 32, - con.dwMousePosition.X + 1, - con.dwMousePosition.Y + 1); - nread = strlen (tmp); - } - else if (con.ext_mouse_mode5) - { - unsigned int xcode = con.dwMousePosition.X + ' ' + 1; - unsigned int ycode = con.dwMousePosition.Y + ' ' + 1; - - __small_sprintf (tmp, "\033[M%c", b + ' '); - nread = 4; - /* the neat nested encoding function of mintty - does not compile in g++, so let's unfold it: */ - if (xcode < 0x80) - tmp [nread++] = xcode; - else if (xcode < 0x800) - { - tmp [nread++] = 0xC0 + (xcode >> 6); - tmp [nread++] = 0x80 + (xcode & 0x3F); - } - else - tmp [nread++] = 0; - if (ycode < 0x80) - tmp [nread++] = ycode; - else if (ycode < 0x800) - { - tmp [nread++] = 0xC0 + (ycode >> 6); - tmp [nread++] = 0x80 + (ycode & 0x3F); - } - else - tmp [nread++] = 0; - } - else - { - unsigned int xcode = con.dwMousePosition.X + ' ' + 1; - unsigned int ycode = con.dwMousePosition.Y + ' ' + 1; - if (xcode >= 256) - xcode = 0; - if (ycode >= 256) - ycode = 0; - __small_sprintf (tmp, "\033[M%c%c%c", b + ' ', - xcode, ycode); - nread = 6; /* tmp may contain NUL bytes */ - } - syscall_printf ("mouse: %s at (%d,%d)", sz, - con.dwMousePosition.X, - con.dwMousePosition.Y); + __small_sprintf (tmp, "\033[O"); toadd = tmp; + nread = 3; + } + break; + + case WINDOW_BUFFER_SIZE_EVENT: + if (send_winch_maybe ()) + { + stat = input_winch; + goto out; + } + /* fall through */ + default: + continue; + } + + if (toadd) + { + ssize_t ret; + line_edit_status res = line_edit (toadd, nread, *ti, &ret); + if (res == line_edit_signalled) + { + stat = input_signalled; + goto out; + } + else if (res == line_edit_input_done) + { + input_ready = true; + stat = input_ok; + if (ti->c_lflag & ICANON) + goto out; } } - break; - - case FOCUS_EVENT: - if (con.use_focus) - { - if (input_rec.Event.FocusEvent.bSetFocus) - __small_sprintf (tmp, "\033[I"); - else - __small_sprintf (tmp, "\033[O"); - - toadd = tmp; - nread = 3; - } - break; - - case WINDOW_BUFFER_SIZE_EVENT: - if (send_winch_maybe ()) - return input_winch; - /* fall through */ - default: - return input_processing; } - - if (toadd) - { - ssize_t ret; - line_edit_status res = line_edit (toadd, nread, *ti, &ret); - if (res == line_edit_signalled) - return input_signalled; - else if (res == line_edit_input_done) - { - input_ready = true; - return input_ok; - } - } - return input_processing; +out: + /* Discard processed recored. */ + DWORD dummy; + ReadConsoleInputW (get_handle (), input_rec, min (total_read, i+1), &dummy); + return stat; } void From a083a4f2661dd465b30e508fca343f678421762f Mon Sep 17 00:00:00 2001 From: Mark Geisert Date: Fri, 13 Sep 2019 21:58:02 -0700 Subject: [PATCH 025/520] Cygwin: fix CPU_SET macro visibility The CPU_SET macros defined in Cygwin's include/sys/cpuset.h must not be visible in an application's namespace unless _GNU_SOURCE has been #defined. Internally this means wrapping them in #if __GNU_VISIBLE. --- winsup/cygwin/include/sys/cpuset.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/include/sys/cpuset.h b/winsup/cygwin/include/sys/cpuset.h index 2056f6af7..1adf48d54 100644 --- a/winsup/cygwin/include/sys/cpuset.h +++ b/winsup/cygwin/include/sys/cpuset.h @@ -26,6 +26,7 @@ typedef struct __cpu_mask __bits[__CPU_GROUPMAX]; } cpu_set_t; +#if __GNU_VISIBLE int __sched_getaffinity_sys (pid_t, size_t, cpu_set_t *); /* These macros alloc or free dynamically-sized cpu sets of size 'num' cpus. @@ -88,6 +89,8 @@ int __sched_getaffinity_sys (pid_t, size_t, cpu_set_t *); #define CPU_XOR(dst, src1, src2) CPU_XOR_S(sizeof (cpu_set_t), dst, src1, src2) #define CPU_EQUAL(src1, src2) CPU_EQUAL_S(sizeof (cpu_set_t), src1, src2) +#endif /* __GNU_VISIBLE */ + #ifdef __cplusplus } #endif From 6983433f8e097449a7182def4c4393306e9a9a46 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sun, 15 Sep 2019 13:05:51 +0900 Subject: [PATCH 026/520] Cygwin: pty: Fix bad file descriptor error in some environment. - The bad file descriptor problem reported in: https://cygwin.com/ml/cygwin-patches/2019-q3/msg00104.html was recurring. Fixed again. --- winsup/cygwin/fhandler_tty.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 9aa832641..1b1d54447 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -857,8 +857,6 @@ fhandler_pty_slave::open (int flags, mode_t) pcon_attached_to = get_minor (); init_console_handler (true); } - else if (pcon_attached_to < 0) - fhandler_console::need_invisible (); set_open_status (); return 1; From d83c45b46cdff9e550bac50ca382392c838b4e68 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sun, 15 Sep 2019 13:05:52 +0900 Subject: [PATCH 027/520] Cygwin: pty: Use system NLS function instead of PTY's own one. - Since calling system __loadlocale() caused execution error, PTY used its own NLS function. The cause of the error has been found, the corresponding code has been rewritten using system function. --- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_tty.cc | 487 +++++++--------------------------- winsup/cygwin/tty.cc | 2 +- winsup/cygwin/tty.h | 2 +- 4 files changed, 101 insertions(+), 391 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 1bf5dfb09..4efb6a4f2 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -2192,6 +2192,7 @@ class fhandler_pty_slave: public fhandler_pty_common { return get_ttyp ()->ti.c_lflag & ICANON; } + void setup_locale (void); }; #define __ptsname(buf, unit) __small_sprintf ((buf), "/dev/pty%d", (unit)) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 1b1d54447..3bf8d0b75 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -29,11 +29,6 @@ details. */ #define ALWAYS_USE_PCON false #define USE_API_HOOK true -#define USE_OWN_NLS_FUNC true - -#if !USE_OWN_NLS_FUNC -#include "langinfo.h" -#endif /* Not yet defined in Mingw-w64 */ #ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING @@ -1129,7 +1124,7 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) size_t nlen; DWORD origCP; origCP = GetConsoleOutputCP (); - SetConsoleOutputCP (get_ttyp ()->TermCodePage); + SetConsoleOutputCP (get_ttyp ()->term_code_page); /* Just copy */ buf = (char *) HeapAlloc (GetProcessHeap (), 0, len); memcpy (buf, (char *)ptr, len); @@ -1246,16 +1241,16 @@ fhandler_pty_slave::write (const void *ptr, size_t len) char *buf; ssize_t nlen; UINT targetCodePage = get_ttyp ()->switch_to_pcon_out ? - GetConsoleOutputCP () : get_ttyp ()->TermCodePage; - if (targetCodePage != get_ttyp ()->TermCodePage) + GetConsoleOutputCP () : get_ttyp ()->term_code_page; + if (targetCodePage != get_ttyp ()->term_code_page) { size_t wlen = - MultiByteToWideChar (get_ttyp ()->TermCodePage, 0, + MultiByteToWideChar (get_ttyp ()->term_code_page, 0, (char *)ptr, len, NULL, 0); wchar_t *wbuf = (wchar_t *) HeapAlloc (GetProcessHeap (), 0, wlen * sizeof (wchar_t)); wlen = - MultiByteToWideChar (get_ttyp ()->TermCodePage, 0, + MultiByteToWideChar (get_ttyp ()->term_code_page, 0, (char *)ptr, len, wbuf, wlen); nlen = WideCharToMultiByte (targetCodePage, 0, wbuf, wlen, NULL, 0, NULL, NULL); @@ -2242,15 +2237,15 @@ fhandler_pty_master::write (const void *ptr, size_t len) char *buf; size_t nlen; - if (get_ttyp ()->TermCodePage != CP_UTF8) + if (get_ttyp ()->term_code_page != CP_UTF8) { size_t wlen = - MultiByteToWideChar (get_ttyp ()->TermCodePage, 0, + MultiByteToWideChar (get_ttyp ()->term_code_page, 0, (char *)ptr, len, NULL, 0); wchar_t *wbuf = (wchar_t *) HeapAlloc (GetProcessHeap (), 0, wlen * sizeof (wchar_t)); wlen = - MultiByteToWideChar (get_ttyp ()->TermCodePage, 0, + MultiByteToWideChar (get_ttyp ()->term_code_page, 0, (char *)ptr, len, wbuf, wlen); nlen = WideCharToMultiByte (CP_UTF8, 0, wbuf, wlen, NULL, 0, NULL, NULL); @@ -2502,7 +2497,6 @@ get_locale_from_env (char *locale) strcpy (locale, env); } -#if USE_OWN_NLS_FUNC static LCID get_langinfo (char *locale_out, char *charset_out) { @@ -2510,318 +2504,52 @@ get_langinfo (char *locale_out, char *charset_out) char new_locale[ENCODING_LEN + 1]; get_locale_from_env (new_locale); - /* The following code is borrowed from __loadlocale() in - newlib/libc/locale/locale.c */ - - /* At this point a full-featured system would just load the locale - specific data from the locale files. - What we do here for now is to check the incoming string for correctness. - The string must be in one of the allowed locale strings, either - one in POSIX-style, or one in the old newlib style to maintain - backward compatibility. If the local string is correct, the charset - is extracted and stored in ctype_codeset or message_charset - dependent on the cateogry. */ - char *locale = NULL; - char charset[ENCODING_LEN + 1]; - long val = 0; - char *end, *c = NULL; - - /* This additional code handles the case that the incoming locale string - is not valid. If so, it calls the function __set_locale_from_locale_alias, - which is only available on Cygwin right now. The function reads the - file /usr/share/locale/locale.alias. The file contains locale aliases - and their replacement locale. For instance, the alias "french" is - translated to "fr_FR.ISO-8859-1", the alias "thai" is translated to - "th_TH.TIS-620". If successful, the function returns with LCID - correspoding to the locale. */ - char tmp_locale[ENCODING_LEN + 1]; - -restart: + __locale_t loc; + memset(&loc, 0, sizeof (loc)); + const char *locale = __loadlocale (&loc, LC_CTYPE, new_locale); if (!locale) - locale = new_locale; - else if (locale != tmp_locale) - { - locale = __set_locale_from_locale_alias (locale, tmp_locale); - if (!locale) - return 0; - } -# define FAIL goto restart + locale = "C"; - /* "POSIX" is translated to "C", as on Linux. */ - if (!strcmp (locale, "POSIX")) - strcpy (locale, "C"); - if (!strcmp (locale, "C")) /* Default "C" locale */ - strcpy (charset, "ASCII"); - else if (locale[0] == 'C' - && (locale[1] == '-' /* Old newlib style */ - || locale[1] == '.')) /* Extension for the C locale to allow - specifying different charsets while - sticking to the C locale in terms - of sort order, etc. Proposed in - the Debian project. */ - { - char *chp; + char tmp_locale[ENCODING_LEN + 1]; + char *ret = __set_locale_from_locale_alias (locale, tmp_locale); + if (ret) + locale = tmp_locale; - c = locale + 2; - strcpy (charset, c); - if ((chp = strchr (charset, '@'))) - /* Strip off modifier */ - *chp = '\0'; - c += strlen (charset); - } - else /* POSIX style */ - { - c = locale; - - /* Don't use ctype macros here, they might be localized. */ - /* Language */ - if (c[0] < 'a' || c[0] > 'z' - || c[1] < 'a' || c[1] > 'z') - FAIL; - c += 2; - /* Allow three character Language per ISO 639-3 */ - if (c[0] >= 'a' && c[0] <= 'z') - ++c; - if (c[0] == '_') - { - /* Territory */ - ++c; - if (c[0] < 'A' || c[0] > 'Z' - || c[1] < 'A' || c[1] > 'Z') - FAIL; - c += 2; - } - if (c[0] == '.') - { - /* Charset */ - char *chp; - - ++c; - strcpy (charset, c); - if ((chp = strchr (charset, '@'))) - /* Strip off modifier */ - *chp = '\0'; - c += strlen (charset); - } - else if (c[0] == '\0' || c[0] == '@') - /* End of string or just a modifier */ - - /* The Cygwin-only function __set_charset_from_locale checks - for the default charset which is connected to the given locale. - The function uses Windows functions in turn so it can't be easily - adapted to other targets. However, if any other target provides - equivalent functionality, preferrably using the same function name - it would be sufficient to change the guarding #ifdef. */ - __set_charset_from_locale (locale, charset); - else - /* Invalid string */ - FAIL; - } - /* We only support this subset of charsets. */ - switch (charset[0]) - { - case 'U': - case 'u': - if (strcasecmp (charset, "UTF-8") && strcasecmp (charset, "UTF8")) - FAIL; - strcpy (charset, "UTF-8"); - break; - case 'E': - case 'e': - if (strncasecmp (charset, "EUC", 3)) - FAIL; - c = charset + 3; - if (*c == '-') - ++c; - if (!strcasecmp (c, "JP")) - strcpy (charset, "EUCJP"); - /* Newlib does neither provide EUC-KR nor EUC-CN, and Cygwin's - implementation requires Windows support. */ - else if (!strcasecmp (c, "KR")) - strcpy (charset, "EUCKR"); - else if (!strcasecmp (c, "CN")) - strcpy (charset, "EUCCN"); - else - FAIL; - break; - case 'S': - case 's': - if (strcasecmp (charset, "SJIS")) - FAIL; - strcpy (charset, "SJIS"); - break; - case 'I': - case 'i': - /* Must be exactly one of ISO-8859-1, [...] ISO-8859-16, except for - ISO-8859-12. This code also recognizes the aliases without dashes. */ - if (strncasecmp (charset, "ISO", 3)) - FAIL; - c = charset + 3; - if (*c == '-') - ++c; - if (strncasecmp (c, "8859", 4)) - FAIL; - c += 4; - if (*c == '-') - ++c; - val = strtol (c, &end, 10); - if (val < 1 || val > 16 || val == 12 || *end) - FAIL; - strcpy (charset, "ISO-8859-"); - c = charset + 9; - if (val > 10) - *c++ = '1'; - *c++ = val % 10 + '0'; - *c = '\0'; - break; - case 'C': - case 'c': - if (charset[1] != 'P' && charset[1] != 'p') - FAIL; - strncpy (charset, "CP", 2); - val = strtol (charset + 2, &end, 10); - if (*end) - FAIL; - switch (val) - { - case 437: - case 720: - case 737: - case 775: - case 850: - case 852: - case 855: - case 857: - case 858: - case 862: - case 866: - case 874: - case 1125: - case 1250: - case 1251: - case 1252: - case 1253: - case 1254: - case 1255: - case 1256: - case 1257: - case 1258: - case 932: - break; - default: - FAIL; - } - break; - case 'K': - case 'k': - /* KOI8-R, KOI8-U and the aliases without dash */ - if (strncasecmp (charset, "KOI8", 4)) - FAIL; - c = charset + 4; - if (*c == '-') - ++c; - if (*c == 'R' || *c == 'r') - { - val = 20866; - strcpy (charset, "CP20866"); - } - else if (*c == 'U' || *c == 'u') - { - val = 21866; - strcpy (charset, "CP21866"); - } - else - FAIL; - break; - case 'A': - case 'a': - if (strcasecmp (charset, "ASCII")) - FAIL; - strcpy (charset, "ASCII"); - break; - case 'G': - case 'g': - /* Newlib does not provide GBK/GB2312 and Cygwin's implementation - requires Windows support. */ - if (!strcasecmp (charset, "GBK") - || !strcasecmp (charset, "GB2312")) - strcpy (charset, charset[2] == '2' ? "GB2312" : "GBK"); - else - /* GEORGIAN-PS and the alias without dash */ - if (!strncasecmp (charset, "GEORGIAN", 8)) - { - c = charset + 8; - if (*c == '-') - ++c; - if (strcasecmp (c, "PS")) - FAIL; - val = 101; - strcpy (charset, "CP101"); - } - else - FAIL; - break; - case 'P': - case 'p': - /* PT154 */ - if (strcasecmp (charset, "PT154")) - FAIL; - val = 102; - strcpy (charset, "CP102"); - break; - case 'T': - case 't': - if (strncasecmp (charset, "TIS", 3)) - FAIL; - c = charset + 3; - if (*c == '-') - ++c; - if (strcasecmp (c, "620")) - FAIL; - val = 874; - strcpy (charset, "CP874"); - break; - /* Newlib does not provide Big5 and Cygwin's implementation - requires Windows support. */ - case 'B': - case 'b': - if (strcasecmp (charset, "BIG5")) - FAIL; - strcpy (charset, "BIG5"); - break; - default: - FAIL; - } + const char *charset; + struct lc_ctype_T *lc_ctype = (struct lc_ctype_T *) loc.lc_cat[LC_CTYPE].ptr; + if (!lc_ctype) + charset = "ASCII"; + else + charset = lc_ctype->codeset; /* The following code is borrowed from nl_langinfo() in newlib/libc/locale/nl_langinfo.c */ /* Convert charset to Linux compatible codeset string. */ - const char *ret = charset; - if (ret[0] == 'A'/*SCII*/) - ret = "ANSI_X3.4-1968"; - else if (ret[0] == 'E') + if (charset[0] == 'A'/*SCII*/) + charset = "ANSI_X3.4-1968"; + else if (charset[0] == 'E') { - if (strcmp (ret, "EUCJP") == 0) - ret = "EUC-JP"; - else if (strcmp (ret, "EUCKR") == 0) - ret = "EUC-KR"; - else if (strcmp (ret, "EUCCN") == 0) - ret = "GB2312"; + if (strcmp (charset, "EUCJP") == 0) + charset = "EUC-JP"; + else if (strcmp (charset, "EUCKR") == 0) + charset = "EUC-KR"; + else if (strcmp (charset, "EUCCN") == 0) + charset = "GB2312"; } - else if (ret[0] == 'C'/*Pxxxx*/) + else if (charset[0] == 'C'/*Pxxxx*/) { - if (strcmp (ret + 2, "874") == 0) - ret = "TIS-620"; - else if (strcmp (ret + 2, "20866") == 0) - ret = "KOI8-R"; - else if (strcmp (ret + 2, "21866") == 0) - ret = "KOI8-U"; - else if (strcmp (ret + 2, "101") == 0) - ret = "GEORGIAN-PS"; - else if (strcmp (ret + 2, "102") == 0) - ret = "PT154"; + if (strcmp (charset + 2, "874") == 0) + charset = "TIS-620"; + else if (strcmp (charset + 2, "20866") == 0) + charset = "KOI8-R"; + else if (strcmp (charset + 2, "21866") == 0) + charset = "KOI8-U"; + else if (strcmp (charset + 2, "101") == 0) + charset = "GEORGIAN-PS"; + else if (strcmp (charset + 2, "102") == 0) + charset = "PT154"; } - else if (ret[0] == 'S'/*JIS*/) + else if (charset[0] == 'S'/*JIS*/) { /* Cygwin uses MSFT's implementation of SJIS, which differs in some codepoints from the real thing, especially @@ -2833,7 +2561,7 @@ restart: differently to our internal functions. Therefore we return what we really implement, CP932. This is handled fine by libiconv. */ - ret = "CP932"; + charset = "CP932"; } wchar_t lc[ENCODING_LEN + 1]; @@ -2851,10 +2579,56 @@ restart: /* Set results */ strcpy(locale_out, new_locale); - strcpy(charset_out, ret); + strcpy(charset_out, charset); return lcid; } -#endif /* USE_OWN_NLS_FUNC */ + +void +fhandler_pty_slave::setup_locale (void) +{ + char locale[ENCODING_LEN + 1] = "C"; + char charset[ENCODING_LEN + 1] = "ASCII"; + LCID lcid = get_langinfo (locale, charset); + + /* Set console code page form locale */ + UINT code_page; + if (lcid == 0 || lcid == (LCID) -1) + code_page = 20127; /* ASCII */ + else if (!GetLocaleInfo (lcid, + LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER, + (char *) &code_page, sizeof (code_page))) + code_page = 20127; /* ASCII */ + SetConsoleCP (code_page); + SetConsoleOutputCP (code_page); + + if (get_ttyp ()->term_code_page == 0) + { + /* Set terminal code page from locale */ + /* This code is borrowed from mintty: charset.c */ + get_ttyp ()->term_code_page = 20127; /* Default ASCII */ + char charset_u[ENCODING_LEN + 1] = {0, }; + for (int i=0; charset[i] && iterm_code_page = 28590 + iso; + } + else if (sscanf (charset_u, "CP%u", &cp) == 1) + get_ttyp ()->term_code_page = cp; + else + for (int i=0; cs_names[i].cp; i++) + if (strcasecmp (charset_u, cs_names[i].name) == 0) + { + get_ttyp ()->term_code_page = cs_names[i].cp; + break; + } + } +} void fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) @@ -2870,74 +2644,6 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) { pcon_attached_to = get_minor (); init_console_handler (true); -#if USE_OWN_NLS_FUNC - char locale[ENCODING_LEN + 1] = "C"; - char charset[ENCODING_LEN + 1] = "ASCII"; - LCID lcid = get_langinfo (locale, charset); -#else /* USE_OWN_NLS_FUNC */ - char env[ENCODING_LEN + 1]; - get_locale_from_env (env); - setlocale (LC_CTYPE, env); - const char *locale = setlocale (LC_CTYPE, NULL); -#if 0 - char tmp_locale[ENCODING_LEN + 1]; - char *ret = __set_locale_from_locale_alias (locale, tmp_locale); - if (ret) - locale = tmp_locale; -#endif - wchar_t lc[ENCODING_LEN + 1]; - wchar_t *p; - mbstowcs (lc, locale, ENCODING_LEN); - p = wcschr (lc, L'.'); - if (p) - *p = L'\0'; - p = wcschr (lc, L'@'); - if (p) - *p = L'\0'; - p = wcschr (lc, L'_'); - if (p) - *p = L'-'; - LCID lcid = LocaleNameToLCID (lc, 0); - const char *charset = nl_langinfo (CODESET); -#endif /* USE_OWN_NLS_FUNC */ - - /* Set console code page form locale */ - UINT CodePage; - if (lcid == 0 || lcid == (LCID) -1) - CodePage = 20127; /* ASCII */ - else if (!GetLocaleInfo (lcid, - LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER, - (char *) &CodePage, sizeof (CodePage))) - CodePage = 20127; /* ASCII */ - SetConsoleCP (CodePage); - SetConsoleOutputCP (CodePage); - - if (get_ttyp ()->num_pcon_attached_slaves == 0) - { - /* Set terminal code page from locale */ - /* This code is borrowed from mintty: charset.c */ - char charset_u[ENCODING_LEN + 1] = {0, }; - for (int i=0; charset[i] && iTermCodePage = 28590 + iso; - } - else if (sscanf (charset_u, "CP%u", &cp) == 1) - get_ttyp ()->TermCodePage = cp; - else - for (int i=0; cs_names[i].cp; i++) - if (strcasecmp (charset_u, cs_names[i].name) == 0) - { - get_ttyp ()->TermCodePage = cs_names[i].cp; - break; - } - } } /* Clear screen to synchronize pseudo console screen buffer with real terminal. This is necessary because pseudo @@ -3036,6 +2742,9 @@ fhandler_pty_slave::fixup_after_exec () } } + /* Set locale */ + setup_locale (); + #if USE_API_HOOK /* Hook Console API */ if (getPseudoConsole ()) @@ -3294,7 +3003,7 @@ fhandler_pty_master::pty_master_fwd_thread () char *buf; size_t nlen; - if (get_ttyp ()->TermCodePage != CP_UTF8) + if (get_ttyp ()->term_code_page != CP_UTF8) { size_t wlen2 = MultiByteToWideChar (CP_UTF8, 0, @@ -3304,10 +3013,10 @@ fhandler_pty_master::pty_master_fwd_thread () wlen2 = MultiByteToWideChar (CP_UTF8, 0, (char *)ptr, wlen, wbuf, wlen2); - nlen = WideCharToMultiByte (get_ttyp ()->TermCodePage, 0, + nlen = WideCharToMultiByte (get_ttyp ()->term_code_page, 0, wbuf, wlen2, NULL, 0, NULL, NULL); buf = (char *) HeapAlloc (GetProcessHeap (), 0, nlen); - nlen = WideCharToMultiByte (get_ttyp ()->TermCodePage, 0, + nlen = WideCharToMultiByte (get_ttyp ()->term_code_page, 0, wbuf, wlen2, buf, nlen, NULL, NULL); HeapFree (GetProcessHeap (), 0, wbuf); } diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index 54c25d997..460153cdb 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -243,7 +243,7 @@ tty::init () mask_switch_to_pcon_in = false; pcon_pid = 0; num_pcon_attached_slaves = 0; - TermCodePage = 20127; /* ASCII */ + term_code_page = 0; need_clear_screen = false; } diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h index b7d1e23ad..927d7afd9 100644 --- a/winsup/cygwin/tty.h +++ b/winsup/cygwin/tty.h @@ -104,7 +104,7 @@ private: bool mask_switch_to_pcon_in; pid_t pcon_pid; int num_pcon_attached_slaves; - UINT TermCodePage; + UINT term_code_page; bool need_clear_screen; public: From 244f03627d37ea5ba642fc9a4b7c7b4a1a7be11d Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sun, 15 Sep 2019 13:05:53 +0900 Subject: [PATCH 028/520] Cygwin: pty: Change the timing of clearing screen. - The code which clears screen is moved from reset_switch_to_pcon() to fixup_after_exec() because it seems not too early even at this timing. --- winsup/cygwin/fhandler_tty.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 3bf8d0b75..5c27510be 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1041,19 +1041,6 @@ skip_console_setting: void fhandler_pty_slave::reset_switch_to_pcon (void) { - if (get_ttyp ()->need_clear_screen) - { - const char *term = getenv ("TERM"); - if (term && strcmp (term, "dumb") && !strstr (term, "emacs")) - { - /* FIXME: Clearing sequence may not be "^[[H^[[J" - depending on the terminal type. */ - DWORD n; - WriteFile (get_output_handle_cyg (), "\033[H\033[J", 6, &n, NULL); - } - get_ttyp ()->need_clear_screen = false; - } - if (isHybrid) this->set_switch_to_pcon (fd); if (get_ttyp ()->pcon_pid && @@ -2742,6 +2729,19 @@ fhandler_pty_slave::fixup_after_exec () } } + if (get_ttyp ()->need_clear_screen) + { + const char *term = getenv ("TERM"); + if (term && strcmp (term, "dumb") && !strstr (term, "emacs")) + { + /* FIXME: Clearing sequence may not be "^[[H^[[J" + depending on the terminal type. */ + DWORD n; + WriteFile (get_output_handle_cyg (), "\033[H\033[J", 6, &n, NULL); + } + get_ttyp ()->need_clear_screen = false; + } + /* Set locale */ setup_locale (); From fac5a01aec19480a1c1b039788cd26714928335f Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sun, 15 Sep 2019 13:36:23 +0900 Subject: [PATCH 029/520] Cygwin: pty: Correct typos that do not fit the coding style. --- winsup/cygwin/fhandler_tty.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 5c27510be..5072c6243 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -45,7 +45,7 @@ details. */ #endif /* ENABLE_VIRTUAL_TERMINAL_INPUT */ extern "C" int sscanf (const char *, const char *, ...); -extern "C" int ttyname_r(int, char*, size_t); +extern "C" int ttyname_r (int, char*, size_t); #define close_maybe(h) \ do { \ @@ -2147,7 +2147,7 @@ fhandler_pty_master::close () else if (obi.HandleCount == (getPseudoConsole () ? 2 : 1)) /* Helper process has inherited one. */ { - termios_printf("Closing last master of pty%d", get_minor ()); + termios_printf ("Closing last master of pty%d", get_minor ()); /* Close Pseudo Console */ if (getPseudoConsole ()) { @@ -2446,9 +2446,9 @@ get_locale_from_env (char *locale) char lang[ENCODING_LEN + 1] = {0, }, country[ENCODING_LEN + 1] = {0, }; env = getenv ("LC_ALL"); if (env == NULL || !*env) - env = getenv("LC_CTYPE"); + env = getenv ("LC_CTYPE"); if (env == NULL || !*env) - env = getenv("LANG"); + env = getenv ("LANG"); if (env == NULL || !*env) { if (GetLocaleInfo (LOCALE_CUSTOM_UI_DEFAULT, @@ -2476,7 +2476,7 @@ get_locale_from_env (char *locale) LOCALE_SISO3166CTRYNAME, country, sizeof (country)); if (strlen (lang) && strlen (country)) - __small_sprintf (lang + strlen(lang), "_%s.UTF-8", country); + __small_sprintf (lang + strlen (lang), "_%s.UTF-8", country); else strcpy (lang , "C.UTF-8"); env = lang; @@ -2492,7 +2492,7 @@ get_langinfo (char *locale_out, char *charset_out) get_locale_from_env (new_locale); __locale_t loc; - memset(&loc, 0, sizeof (loc)); + memset (&loc, 0, sizeof (loc)); const char *locale = __loadlocale (&loc, LC_CTYPE, new_locale); if (!locale) locale = "C"; @@ -2565,8 +2565,8 @@ get_langinfo (char *locale_out, char *charset_out) return 0; /* Set results */ - strcpy(locale_out, new_locale); - strcpy(charset_out, charset); + strcpy (locale_out, new_locale); + strcpy (charset_out, charset); return lcid; } @@ -2670,7 +2670,7 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) get_ttyp ()->pcon_pid = myself->pid; get_ttyp ()->switch_to_pcon_out = true; } - init_console_handler(false); + init_console_handler (false); } else if (fd == 0 && native_maybe) /* Read from unattached pseudo console cause freeze, @@ -2754,7 +2754,7 @@ fhandler_pty_slave::fixup_after_exec () { \ void *api = hook_api (module, #name, (void *) name##_Hooked); \ name##_Orig = (__typeof__ (name) *) api; \ - /*if (api) system_printf(#name " hooked.");*/ \ + /*if (api) system_printf (#name " hooked.");*/ \ } DO_HOOK (NULL, WriteFile); DO_HOOK (NULL, WriteConsoleA); @@ -3118,7 +3118,7 @@ fhandler_pty_master::setup_pseudoconsole () if (res != S_OK) { system_printf ("CreatePseudoConsole() failed. %08x\n", - GetLastError()); + GetLastError ()); CloseHandle (from_master); CloseHandle (to_slave); from_master = from_master_cyg; @@ -3230,7 +3230,7 @@ fhandler_pty_master::setup () termios_printf ("can't set output_handle(%p) to non-blocking mode", get_output_handle ()); - char pipename[sizeof("ptyNNNN-to-master-cyg")]; + char pipename[sizeof ("ptyNNNN-to-master-cyg")]; __small_sprintf (pipename, "pty%d-to-master", unit); res = fhandler_pipe::create (&sec_none, &from_slave, &to_master, fhandler_pty_common::pipesize, pipename, 0); @@ -3406,7 +3406,7 @@ fhandler_pty_common::process_opost_output (HANDLE h, const void *ptr, ssize_t& l break; else { - set_errno(EAGAIN); + set_errno (EAGAIN); len = -1; return TRUE; } From 70cd49e2045bae06faff1955342a1b0e1b038466 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sun, 15 Sep 2019 19:55:44 +0900 Subject: [PATCH 030/520] Cygwin: pty: Use autoload feature for pseudo console system calls. - The autoload feature is used rather than GetModuleHandle(), GetProcAddress() for CreatePseudoConsole(), ResizePseudoConsole() and ClosePseudoConsole(). --- winsup/cygwin/autoload.cc | 3 +++ winsup/cygwin/fhandler_tty.cc | 36 +++++++++++++---------------------- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc index c4d91611e..1851ab3b6 100644 --- a/winsup/cygwin/autoload.cc +++ b/winsup/cygwin/autoload.cc @@ -759,4 +759,7 @@ LoadDLLfunc (PdhAddEnglishCounterW, 16, pdh) LoadDLLfunc (PdhCollectQueryData, 4, pdh) LoadDLLfunc (PdhGetFormattedCounterValue, 16, pdh) LoadDLLfunc (PdhOpenQueryW, 12, pdh) +LoadDLLfuncEx (CreatePseudoConsole, 20, kernel32, 1) +LoadDLLfuncEx (ResizePseudoConsole, 8, kernel32, 1) +LoadDLLfuncEx (ClosePseudoConsole, 4, kernel32, 1) } diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 5072c6243..659e7b595 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -47,6 +47,12 @@ details. */ extern "C" int sscanf (const char *, const char *, ...); extern "C" int ttyname_r (int, char*, size_t); +extern "C" { + HRESULT WINAPI CreatePseudoConsole (COORD, HANDLE, HANDLE, DWORD, HPCON *); + HRESULT WINAPI ResizePseudoConsole (HPCON, COORD); + VOID WINAPI ClosePseudoConsole (HPCON); +} + #define close_maybe(h) \ do { \ if (h && h != INVALID_HANDLE_VALUE) \ @@ -2157,14 +2163,8 @@ fhandler_pty_master::close () /* FIXME: Pseudo console can be accessed via its handle only in the process which created it. What else can we do? */ if (master_pid_tmp == myself->pid) - { - /* Release pseudo console */ - HMODULE hModule = GetModuleHandle ("kernel32.dll"); - FARPROC func = GetProcAddress (hModule, "ClosePseudoConsole"); - VOID (WINAPI *ClosePseudoConsole) (HPCON) = NULL; - ClosePseudoConsole = (VOID (WINAPI *) (HPCON)) func; - ClosePseudoConsole (getPseudoConsole ()); - } + /* Release pseudo console */ + ClosePseudoConsole (getPseudoConsole ()); get_ttyp ()->switch_to_pcon_in = false; get_ttyp ()->switch_to_pcon_out = false; } @@ -2348,10 +2348,6 @@ fhandler_pty_master::ioctl (unsigned int cmd, void *arg) only in the process which created it. What else can we do? */ if (getPseudoConsole () && get_ttyp ()->master_pid == myself->pid) { - HMODULE hModule = GetModuleHandle ("kernel32.dll"); - FARPROC func = GetProcAddress (hModule, "ResizePseudoConsole"); - HRESULT (WINAPI *ResizePseudoConsole) (HPCON, COORD) = NULL; - ResizePseudoConsole = (HRESULT (WINAPI *) (HPCON, COORD)) func; COORD size; size.X = ((struct winsize *) arg)->ws_col; size.Y = ((struct winsize *) arg)->ws_row; @@ -3103,22 +3099,16 @@ fhandler_pty_master::setup_pseudoconsole () process in a pseudo console and get them from the helper. Slave process will attach to the pseudo console in the helper process using AttachConsole(). */ - HMODULE hModule = GetModuleHandle ("kernel32.dll"); - FARPROC func = GetProcAddress (hModule, "CreatePseudoConsole"); - HRESULT (WINAPI *CreatePseudoConsole) - (COORD, HANDLE, HANDLE, DWORD, HPCON *) = NULL; - if (!func) - return false; - CreatePseudoConsole = - (HRESULT (WINAPI *) (COORD, HANDLE, HANDLE, DWORD, HPCON *)) func; COORD size = {80, 25}; CreatePipe (&from_master, &to_slave, &sec_none, 0); + SetLastError (ERROR_SUCCESS); HRESULT res = CreatePseudoConsole (size, from_master, to_master, 0, &get_ttyp ()->hPseudoConsole); - if (res != S_OK) + if (res != S_OK || GetLastError () == ERROR_PROC_NOT_FOUND) { - system_printf ("CreatePseudoConsole() failed. %08x\n", - GetLastError ()); + if (res != S_OK) + system_printf ("CreatePseudoConsole() failed. %08x\n", + GetLastError ()); CloseHandle (from_master); CloseHandle (to_slave); from_master = from_master_cyg; From d5f84126e56ee860b10a8a5826dc568e2c266f1b Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Sun, 15 Sep 2019 18:28:21 +0200 Subject: [PATCH 031/520] winsup/cygwin/times.cc (times): follow Linux and allow for a NULL buf argument Adresses the problem reported here: https://cygwin.com/ml/cygwin/2019-09/msg00141.html --- winsup/cygwin/times.cc | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc index 8908d44f1..909cae1f1 100644 --- a/winsup/cygwin/times.cc +++ b/winsup/cygwin/times.cc @@ -72,12 +72,17 @@ times (struct tms *buf) /* ticks is in in 100ns, convert to clock ticks. */ tc = (clock_t) (ticks.QuadPart * CLOCKS_PER_SEC / NS100PERSEC); - buf->tms_stime = __to_clock_t (&kut.KernelTime, 0); - buf->tms_utime = __to_clock_t (&kut.UserTime, 0); - timeval_to_filetime (&myself->rusage_children.ru_stime, &kut.KernelTime); - buf->tms_cstime = __to_clock_t (&kut.KernelTime, 1); - timeval_to_filetime (&myself->rusage_children.ru_utime, &kut.UserTime); - buf->tms_cutime = __to_clock_t (&kut.UserTime, 1); + /* Linux allows a NULL buf and just returns tc in that case, so + mimic that */ + if (buf) + { + buf->tms_stime = __to_clock_t (&kut.KernelTime, 0); + buf->tms_utime = __to_clock_t (&kut.UserTime, 0); + timeval_to_filetime (&myself->rusage_children.ru_stime, &kut.KernelTime); + buf->tms_cstime = __to_clock_t (&kut.KernelTime, 1); + timeval_to_filetime (&myself->rusage_children.ru_utime, &kut.UserTime); + buf->tms_cutime = __to_clock_t (&kut.UserTime, 1); + } } __except (EFAULT) { From bbc625da81076bf31ea77af346d368fd221c4079 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sun, 15 Sep 2019 13:40:12 -0400 Subject: [PATCH 032/520] Cygwin: document last change --- winsup/cygwin/release/3.1.0 | 3 +++ winsup/doc/new-features.xml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/winsup/cygwin/release/3.1.0 b/winsup/cygwin/release/3.1.0 index 12a5f323c..72664abdc 100644 --- a/winsup/cygwin/release/3.1.0 +++ b/winsup/cygwin/release/3.1.0 @@ -30,6 +30,9 @@ What changed: - Eliminate a header file name collision with on case insensitive filesystems by reverting back to . +- Allow times(2) to have a NULL argument, as on Linux. + Addresses: https://cygwin.com/ml/cygwin/2019-09/msg00141.html + Bug Fixes --------- diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml index 118e37821..cbfdf32dc 100644 --- a/winsup/doc/new-features.xml +++ b/winsup/doc/new-features.xml @@ -46,6 +46,10 @@ New APIs: dbm_clearerr, dbm_close, dbm_delete, dbm_dirfno, dbm_error, dbm_fetch, dbm_firstkey, dbm_nextkey, dbm_open, dbm_store. + +Allow times(2) to have a NULL argument, as on Linux. + + From 1a44ad03e0f723e9479d090c43444bce2798a35d Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 19 Sep 2019 05:49:55 +0900 Subject: [PATCH 033/520] Cygwin: console: Revive Win7 compatibility. - The commit fca4cda7a420d7b15ac217d008527e029d05758e broke Win7 compatibility. This patch fixes the issue. --- winsup/cygwin/fhandler.h | 6 ++++++ winsup/cygwin/fhandler_console.cc | 6 ------ winsup/cygwin/select.cc | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 4efb6a4f2..d5aa57300 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -43,6 +43,12 @@ details. */ #define O_TMPFILE_FILE_ATTRS (FILE_ATTRIBUTE_TEMPORARY | FILE_ATTRIBUTE_HIDDEN) +/* Buffer size for ReadConsoleInput() and PeekConsoleInput(). */ +/* Per MSDN, max size of buffer required is below 64K. */ +/* (65536 / sizeof (INPUT_RECORD)) is 3276, however, + ERROR_NOT_ENOUGH_MEMORY occurs in win7 if this value is used. */ +#define INREC_SIZE 2048 + extern const char *windows_device_names[]; extern struct __cygwin_perfile *perfile_table; #define __fmode (*(user_data->fmode_ptr)) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 709b8255d..86c39db25 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -499,9 +499,6 @@ fhandler_console::process_input_message (void) termios *ti = &(get_ttyp ()->ti); - /* Per MSDN, max size of buffer required is below 64K. */ -#define INREC_SIZE (65536 / sizeof (INPUT_RECORD)) - fhandler_console::input_states stat = input_processing; DWORD total_read, i; INPUT_RECORD input_rec[INREC_SIZE]; @@ -1165,9 +1162,6 @@ fhandler_console::ioctl (unsigned int cmd, void *arg) return -1; case FIONREAD: { - /* Per MSDN, max size of buffer required is below 64K. */ -#define INREC_SIZE (65536 / sizeof (INPUT_RECORD)) - DWORD n; int ret = 0; INPUT_RECORD inp[INREC_SIZE]; diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index ed8c98d1c..e7014422b 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -1209,7 +1209,6 @@ peek_pty_slave (select_record *s, bool from_select) { if (ptys->is_line_input ()) { -#define INREC_SIZE (65536 / sizeof (INPUT_RECORD)) INPUT_RECORD inp[INREC_SIZE]; DWORD n; PeekConsoleInput (ptys->get_handle (), inp, INREC_SIZE, &n); From 831b1569dc8a1ab9a9767f525eca17fccdb3e0d0 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 18 Sep 2019 23:29:17 +0900 Subject: [PATCH 034/520] Cygwin: pty: Avoid potential segfault in PTY code when ppid = 1. --- winsup/cygwin/fhandler_tty.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 659e7b595..2a1c34f7d 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -137,9 +137,16 @@ force_attach_to_pcon (HANDLE h) /* If the process is running on a console, the parent process should be attached to the same console. */ - pinfo p (myself->ppid); + DWORD attach_wpid; + if (myself->ppid == 1) + attach_wpid = ATTACH_PARENT_PROCESS; + else + { + pinfo p (myself->ppid); + attach_wpid = p->dwProcessId; + } FreeConsole (); - if (AttachConsole (p->dwProcessId)) + if (AttachConsole (attach_wpid)) { pcon_attached_to = -1; attach_done = true; From ac5357b9fe3486b909076ec706de64e91ba8ad81 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 18 Sep 2019 23:29:18 +0900 Subject: [PATCH 035/520] Cygwin: pty: Make GDB work again on pty. --- winsup/cygwin/fhandler_tty.cc | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 2a1c34f7d..843807aab 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -197,6 +197,9 @@ DEF_HOOK (ReadConsoleInputA); DEF_HOOK (ReadConsoleInputW); DEF_HOOK (PeekConsoleInputA); DEF_HOOK (PeekConsoleInputW); +/* CreateProcess() is hooked for GDB etc. */ +DEF_HOOK (CreateProcessA); +DEF_HOOK (CreateProcessW); static BOOL WINAPI WriteFile_Hooked @@ -331,6 +334,35 @@ PeekConsoleInputW_Hooked set_ishybrid_and_switch_to_pcon (h); return PeekConsoleInputW_Orig (h, r, l, n); } +/* CreateProcess() is hooked for GDB etc. */ +static BOOL WINAPI +CreateProcessA_Hooked + (LPCSTR n, LPSTR c, LPSECURITY_ATTRIBUTES pa, LPSECURITY_ATTRIBUTES ta, + BOOL inh, DWORD f, LPVOID e, LPCSTR d, + LPSTARTUPINFOA si, LPPROCESS_INFORMATION pi) +{ + HANDLE h; + if (si->dwFlags & STARTF_USESTDHANDLES) + h = si->hStdOutput; + else + h = GetStdHandle (STD_OUTPUT_HANDLE); + set_ishybrid_and_switch_to_pcon (h); + return CreateProcessA_Orig (n, c, pa, ta, inh, f, e, d, si, pi); +} +static BOOL WINAPI +CreateProcessW_Hooked + (LPCWSTR n, LPWSTR c, LPSECURITY_ATTRIBUTES pa, LPSECURITY_ATTRIBUTES ta, + BOOL inh, DWORD f, LPVOID e, LPCWSTR d, + LPSTARTUPINFOW si, LPPROCESS_INFORMATION pi) +{ + HANDLE h; + if (si->dwFlags & STARTF_USESTDHANDLES) + h = si->hStdOutput; + else + h = GetStdHandle (STD_OUTPUT_HANDLE); + set_ishybrid_and_switch_to_pcon (h); + return CreateProcessW_Orig (n, c, pa, ta, inh, f, e, d, si, pi); +} #else /* USE_API_HOOK */ #define WriteFile_Orig 0 #define ReadFile_Orig 0 @@ -2778,6 +2810,9 @@ fhandler_pty_slave::fixup_after_exec () DO_HOOK (NULL, ReadConsoleInputW); DO_HOOK (NULL, PeekConsoleInputA); DO_HOOK (NULL, PeekConsoleInputW); + /* CreateProcess() is hooked for GDB etc. */ + DO_HOOK (NULL, CreateProcessA); + DO_HOOK (NULL, CreateProcessW); } #endif /* USE_API_HOOK */ } From 24554ab9239510b60b5d04b3b92446fb53d57ae8 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 18 Sep 2019 23:29:19 +0900 Subject: [PATCH 036/520] Cygwin: pty: Unify the charset conversion codes into a function. --- winsup/cygwin/fhandler_tty.cc | 130 +++++++++++++--------------------- 1 file changed, 49 insertions(+), 81 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 843807aab..f723ec7cf 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -370,7 +370,43 @@ CreateProcessW_Hooked void set_ishybrid_and_switch_to_pcon (HANDLE) {} #endif /* USE_API_HOOK */ -bool +static char * +convert_mb_str (UINT cp_to, size_t *len_to, + UINT cp_from, const char *ptr_from, size_t len_from) +{ + char *buf; + size_t nlen; + if (cp_to != cp_from) + { + size_t wlen = + MultiByteToWideChar (cp_from, 0, ptr_from, len_from, NULL, 0); + wchar_t *wbuf = (wchar_t *) + HeapAlloc (GetProcessHeap (), 0, wlen * sizeof (wchar_t)); + wlen = + MultiByteToWideChar (cp_from, 0, ptr_from, len_from, wbuf, wlen); + nlen = WideCharToMultiByte (cp_to, 0, wbuf, wlen, NULL, 0, NULL, NULL); + buf = (char *) HeapAlloc (GetProcessHeap (), 0, nlen); + nlen = WideCharToMultiByte (cp_to, 0, wbuf, wlen, buf, nlen, NULL, NULL); + HeapFree (GetProcessHeap (), 0, wbuf); + } + else + { + /* Just copy */ + buf = (char *) HeapAlloc (GetProcessHeap (), 0, len_from); + memcpy (buf, ptr_from, len_from); + nlen = len_from; + } + *len_to = nlen; + return buf; +} + +static void +mb_str_free (char *ptr) +{ + HeapFree (GetProcessHeap (), 0, ptr); +} + +static bool bytes_available (DWORD& n, HANDLE h) { DWORD navail, nleft; @@ -1270,34 +1306,11 @@ fhandler_pty_slave::write (const void *ptr, size_t len) reset_switch_to_pcon (); - char *buf; - ssize_t nlen; - UINT targetCodePage = get_ttyp ()->switch_to_pcon_out ? + UINT target_code_page = get_ttyp ()->switch_to_pcon_out ? GetConsoleOutputCP () : get_ttyp ()->term_code_page; - if (targetCodePage != get_ttyp ()->term_code_page) - { - size_t wlen = - MultiByteToWideChar (get_ttyp ()->term_code_page, 0, - (char *)ptr, len, NULL, 0); - wchar_t *wbuf = (wchar_t *) - HeapAlloc (GetProcessHeap (), 0, wlen * sizeof (wchar_t)); - wlen = - MultiByteToWideChar (get_ttyp ()->term_code_page, 0, - (char *)ptr, len, wbuf, wlen); - nlen = WideCharToMultiByte (targetCodePage, 0, - wbuf, wlen, NULL, 0, NULL, NULL); - buf = (char *) HeapAlloc (GetProcessHeap (), 0, nlen); - nlen = WideCharToMultiByte (targetCodePage, 0, - wbuf, wlen, buf, nlen, NULL, NULL); - HeapFree (GetProcessHeap (), 0, wbuf); - } - else - { - /* Just copy */ - buf = (char *) HeapAlloc (GetProcessHeap (), 0, len); - memcpy (buf, (char *)ptr, len); - nlen = len; - } + ssize_t nlen; + char *buf = convert_mb_str (target_code_page, (size_t *) &nlen, + get_ttyp ()->term_code_page, (const char *) ptr, len); /* If not attached to this pseudo console, try to attach temporarily. */ pid_restore = 0; @@ -1334,7 +1347,7 @@ fhandler_pty_slave::write (const void *ptr, size_t len) towrite = -1; } release_output_mutex (); - HeapFree (GetProcessHeap (), 0, buf); + mb_str_free (buf); flags = ENABLE_VIRTUAL_TERMINAL_PROCESSING; if (get_ttyp ()->switch_to_pcon_out && !fallback) SetConsoleMode (get_output_handle (), dwMode | flags); @@ -2260,33 +2273,10 @@ fhandler_pty_master::write (const void *ptr, size_t len) if current application is native console application. */ if (to_be_read_from_pcon ()) { - char *buf; size_t nlen; + char *buf = convert_mb_str + (CP_UTF8, &nlen, get_ttyp ()->term_code_page, (const char *) ptr, len); - if (get_ttyp ()->term_code_page != CP_UTF8) - { - size_t wlen = - MultiByteToWideChar (get_ttyp ()->term_code_page, 0, - (char *)ptr, len, NULL, 0); - wchar_t *wbuf = (wchar_t *) - HeapAlloc (GetProcessHeap (), 0, wlen * sizeof (wchar_t)); - wlen = - MultiByteToWideChar (get_ttyp ()->term_code_page, 0, - (char *)ptr, len, wbuf, wlen); - nlen = WideCharToMultiByte (CP_UTF8, 0, - wbuf, wlen, NULL, 0, NULL, NULL); - buf = (char *) HeapAlloc (GetProcessHeap (), 0, nlen); - nlen = WideCharToMultiByte (CP_UTF8, 0, - wbuf, wlen, buf, nlen, NULL, NULL); - HeapFree (GetProcessHeap (), 0, wbuf); - } - else - { - /* Just copy */ - buf = (char *) HeapAlloc (GetProcessHeap (), 0, len); - memcpy (buf, (char *)ptr, len); - nlen = len; - } DWORD wLen; WriteFile (to_slave, buf, nlen, &wLen, NULL); @@ -2302,7 +2292,7 @@ fhandler_pty_master::write (const void *ptr, size_t len) else SetEvent (input_available_event); - HeapFree (GetProcessHeap (), 0, buf); + mb_str_free (buf); return len; } @@ -3039,32 +3029,10 @@ fhandler_pty_master::pty_master_fwd_thread () } wlen = rlen; - char *buf; size_t nlen; - if (get_ttyp ()->term_code_page != CP_UTF8) - { - size_t wlen2 = - MultiByteToWideChar (CP_UTF8, 0, - (char *)ptr, wlen, NULL, 0); - wchar_t *wbuf = (wchar_t *) - HeapAlloc (GetProcessHeap (), 0, wlen2 * sizeof (wchar_t)); - wlen2 = - MultiByteToWideChar (CP_UTF8, 0, - (char *)ptr, wlen, wbuf, wlen2); - nlen = WideCharToMultiByte (get_ttyp ()->term_code_page, 0, - wbuf, wlen2, NULL, 0, NULL, NULL); - buf = (char *) HeapAlloc (GetProcessHeap (), 0, nlen); - nlen = WideCharToMultiByte (get_ttyp ()->term_code_page, 0, - wbuf, wlen2, buf, nlen, NULL, NULL); - HeapFree (GetProcessHeap (), 0, wbuf); - } - else - { - /* Just copy */ - buf = (char *) HeapAlloc (GetProcessHeap (), 0, wlen); - memcpy (buf, (char *)ptr, wlen); - nlen = wlen; - } + char *buf = convert_mb_str + (get_ttyp ()->term_code_page, &nlen, CP_UTF8, ptr, wlen); + ptr = buf; wlen = rlen = nlen; @@ -3083,7 +3051,7 @@ fhandler_pty_master::pty_master_fwd_thread () wlen = (rlen -= written); } release_output_mutex (); - HeapFree (GetProcessHeap (), 0, buf); + mb_str_free (buf); continue; } acquire_output_mutex (INFINITE); From b757a21d857608d800529149b1f05192a0d2d0f6 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 18 Sep 2019 23:29:20 +0900 Subject: [PATCH 037/520] Cygwin: pty: Add charset conversion for console apps in legacy PTY. --- winsup/cygwin/fhandler_tty.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index f723ec7cf..2a92e44cf 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -3054,6 +3054,12 @@ fhandler_pty_master::pty_master_fwd_thread () mb_str_free (buf); continue; } + size_t nlen; + char *buf = convert_mb_str + (get_ttyp ()->term_code_page, &nlen, GetConsoleOutputCP (), ptr, wlen); + + ptr = buf; + wlen = rlen = nlen; acquire_output_mutex (INFINITE); while (rlen>0) { @@ -3066,6 +3072,7 @@ fhandler_pty_master::pty_master_fwd_thread () wlen = (rlen -= wlen); } release_output_mutex (); + mb_str_free (buf); } return 0; } From 81c55654e63e512f89e219ebf929a8fdb3e72a95 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 18 Sep 2019 23:29:21 +0900 Subject: [PATCH 038/520] Cygwin: pty: Add missing guard when PTY is in the legacy mode. --- winsup/cygwin/fhandler_tty.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 2a92e44cf..1095c82eb 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -87,7 +87,8 @@ set_switch_to_pcon (void) { fhandler_base *fh = cfd; fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; - ptys->set_switch_to_pcon (fd); + if (ptys->getPseudoConsole ()) + ptys->set_switch_to_pcon (fd); } } @@ -105,6 +106,8 @@ force_attach_to_pcon (HANDLE h) { fhandler_base *fh = cfd; fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; + if (!ptys->getPseudoConsole ()) + continue; if (n != 0 || h == ptys->get_handle () || h == ptys->get_output_handle ()) From aa529d00ea98a2c4f77460df1a4c6a9f97e842cb Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sat, 21 Sep 2019 06:10:35 +0900 Subject: [PATCH 039/520] Cygwin: console: Make console input work in GDB and strace. - After commit 2232498c712acc97a38fdc297cbe53ba74d0ec2c, console input cause error in GDB or strace. This patch fixes this issue. --- winsup/cygwin/pinfo.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index ffd4c8cd9..35c1ffe25 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -570,7 +570,7 @@ _pinfo::set_ctty (fhandler_termios *fh, int flags) tc.setsid (sid); sid = tc.getsid (); /* See above */ - if (!tc.getpgid () && pgid == pid) + if ((!tc.getpgid () || being_debugged ()) && pgid == pid) tc.setpgid (pgid); } debug_printf ("cygheap->ctty now %p, archetype %p", cygheap->ctty, fh ? fh->archetype : NULL); From 41864091014b63b0cb72ae98281fa53349b6ef77 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Fri, 20 Sep 2019 12:04:36 +0900 Subject: [PATCH 040/520] Cygwin: Fix incorrect TTY for non-cygwin process. - After commit d4045fdbef60d8e7e0d11dfe38b048ea2cb8708b, the TTY displayed by ps command is incorrect if the process is non-cygwin process. This patch fixes this issue. --- winsup/cygwin/exceptions.cc | 2 +- winsup/cygwin/spawn.cc | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 848f9bd68..db0fe0867 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -949,7 +949,7 @@ _cygtls::interrupt_setup (siginfo_t& si, void *handler, struct sigaction& siga) if (incyg) set_signal_arrived (); - if (!have_execed) + if (!have_execed && ch_spawn.iscygwin ()) proc_subproc (PROC_CLEARWAIT, 1); sigproc_printf ("armed signal_arrived %p, signal %d", signal_arrived, si.si_signo); diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 4396ec9e5..4d8bcc9fa 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -622,10 +622,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, si.cb = sizeof (si); if (!iscygwin ()) - { - init_console_handler (myself->ctty > 0); - myself->ctty = 0; - } + init_console_handler (myself->ctty > 0); loop: /* When ruid != euid we create the new process under the current original From 9f24260ee90bec2506ae5c624dc06ab3fc67ae64 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sat, 21 Sep 2019 13:09:09 -0400 Subject: [PATCH 041/520] Cygwin: remove old cruft from path_conv::check Prior to commit b0717aae, path_conv::check had the following code: if (strncmp (path, "\\\\.\\", 4)) { /* Windows ignores trailing dots and spaces in the last path component, and ignores exactly one trailing dot in inner path components. */ char *tail = NULL; [...] if (!tail || tail == path) /* nothing */; else if (tail[-1] != '\\') { *tail = '\0'; [...] } Commit b0717aae0 intended to disable this code, but it inadvertently disabled only part of it. In particular, the declaration of the local tail variable was in the disabled code, but the following remained: if (!tail || tail == path) /* nothing */; else if (tail[-1] != '\\') { *tail = '\0'; [...] } [A later commit removed the disabled code.] The tail variable here points into a string different from path, causing that string to be truncated under some circumstances. See https://cygwin.com/ml/cygwin/2019-09/msg00001.html for more details. This commit fixes the problem by removing the leftover code that was intended to be removed in b0717aae. --- winsup/cygwin/path.cc | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index c13701aa0..2fbacd881 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1168,19 +1168,6 @@ path_conv::check (const char *src, unsigned opt, if (dev.isfs ()) { - if (strncmp (path, "\\\\.\\", 4)) - { - if (!tail || tail == path) - /* nothing */; - else if (tail[-1] != '\\') - *tail = '\0'; - else - { - error = ENOENT; - return; - } - } - /* If FS hasn't been checked already in symlink_info::check, do so now. */ if (fs.inited ()|| fs.update (get_nt_native_path (), NULL)) From d1b5feef8232e82a0f31e5ed421abda84c3f4705 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sun, 22 Sep 2019 11:33:34 -0400 Subject: [PATCH 042/520] Cygwin: rmdir: fail if last component is a symlink, as on Linux If the last component of the directory name is a symlink followed by a slash, rmdir now fails, following Linux but not POSIX, even if the symlink resolves to an existing empty directory. mkdir was similarly changed in 2009 in commit 52dba6a5c45e8d8ba1e237a15213311dc11d91fb. Modify a comment to clarify the purpose of that commit. Addresses https://cygwin.com/ml/cygwin/2019-09/msg00221.html. --- winsup/cygwin/dir.cc | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc index b757851d5..29a9dfa83 100644 --- a/winsup/cygwin/dir.cc +++ b/winsup/cygwin/dir.cc @@ -305,15 +305,15 @@ mkdir (const char *dir, mode_t mode) __try { - /* POSIX says mkdir("symlink-to-missing/") should create the - directory "missing", but Linux rejects it with EEXIST. Copy - Linux behavior for now. */ - if (!*dir) { set_errno (ENOENT); __leave; } + /* Following Linux, and intentionally ignoring POSIX, do not + resolve the last component of DIR if it is a symlink, even if + DIR has a trailing slash. Achieve this by stripping trailing + slashes or backslashes. */ if (isdirsep (dir[strlen (dir) - 1])) { /* This converts // to /, but since both give EEXIST, we're okay. */ @@ -351,9 +351,30 @@ rmdir (const char *dir) { int res = -1; fhandler_base *fh = NULL; + tmp_pathbuf tp; __try { + if (!*dir) + { + set_errno (ENOENT); + __leave; + } + + /* Following Linux, and intentionally ignoring POSIX, do not + resolve the last component of DIR if it is a symlink, even if + DIR has a trailing slash. Achieve this by stripping trailing + slashes or backslashes. */ + if (isdirsep (dir[strlen (dir) - 1])) + { + /* This converts // to /, but since both give ENOTEMPTY, + we're okay. */ + char *buf; + char *p = stpcpy (buf = tp.c_get (), dir) - 1; + dir = buf; + while (p > dir && isdirsep (*p)) + *p-- = '\0'; + } if (!(fh = build_fh_name (dir, PC_SYM_NOFOLLOW))) __leave; /* errno already set */; From a9724c3904c5680890f23ce248e4b7092eeabf35 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Tue, 24 Sep 2019 15:31:17 -0400 Subject: [PATCH 043/520] Document the last change --- winsup/cygwin/release/3.1.0 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/release/3.1.0 b/winsup/cygwin/release/3.1.0 index 72664abdc..03bbc7aba 100644 --- a/winsup/cygwin/release/3.1.0 +++ b/winsup/cygwin/release/3.1.0 @@ -79,3 +79,6 @@ Bug Fixes - 64 bit only: Avoid collisions between memory maps created with shmat and Windows datastructures during fork. Addresses: https://cygwin.com/ml/cygwin/2019-08/msg00107.html + +- Make rmdir fail if its argument is a symlink. + Addresses: https://cygwin.com/ml/cygwin/2019-09/msg00221.html From 84ba60e6ebc9a2ea3898278b2a6a9669cd5b58b5 Mon Sep 17 00:00:00 2001 From: pfg Date: Sun, 23 Dec 2018 18:15:48 +0000 Subject: [PATCH 044/520] gai_strerror() - Update string error messages according to RFC 3493. Error messages in gai_strerror(3) vary largely among OSs. For new software we largely replaced the obsoleted EAI_NONAME and with EAI_NODATA but we never updated the corresponding message to better match the intended use. We also have references to ai_flags and ai_family which are not very descriptive for non-developer end users. Bring new new error messages based on informational RFC 3493, which has obsoleted RFC 2553, and make them consistent among the header adn manpage. MFC after: 1 month Differentical Revision: D18630 --- newlib/libc/sys/rtems/include/netdb.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/newlib/libc/sys/rtems/include/netdb.h b/newlib/libc/sys/rtems/include/netdb.h index 3a42485aa..cf0330a2f 100644 --- a/newlib/libc/sys/rtems/include/netdb.h +++ b/newlib/libc/sys/rtems/include/netdb.h @@ -159,24 +159,24 @@ struct addrinfo { #define NO_ADDRESS NO_DATA /* no address, look for MX record */ /* - * Error return codes from getaddrinfo() + * Error return codes from gai_strerror(3), see RFC 3493. */ #if 0 -/* obsoleted */ +/* Obsoleted on RFC 2553bis-02 */ #define EAI_ADDRFAMILY 1 /* address family for hostname not supported */ #endif -#define EAI_AGAIN 2 /* temporary failure in name resolution */ -#define EAI_BADFLAGS 3 /* invalid value for ai_flags */ +#define EAI_AGAIN 2 /* name could not be resolved at this time */ +#define EAI_BADFLAGS 3 /* flags parameter had an invalid value */ #define EAI_FAIL 4 /* non-recoverable failure in name resolution */ -#define EAI_FAMILY 5 /* ai_family not supported */ +#define EAI_FAMILY 5 /* address family was recognized */ #define EAI_MEMORY 6 /* memory allocation failure */ #if 0 -/* obsoleted */ +/* Obsoleted on RFC 2553bis-02 */ #define EAI_NODATA 7 /* no address associated with hostname */ #endif -#define EAI_NONAME 8 /* hostname nor servname provided, or not known */ -#define EAI_SERVICE 9 /* servname not supported for ai_socktype */ -#define EAI_SOCKTYPE 10 /* ai_socktype not supported */ +#define EAI_NONAME 8 /* name does not resolve */ +#define EAI_SERVICE 9 /* service not recognized for socket type */ +#define EAI_SOCKTYPE 10 /* intended socket type was not recognized */ #define EAI_SYSTEM 11 /* system error returned in errno */ #define EAI_BADHINTS 12 /* invalid value for hints */ #define EAI_PROTOCOL 13 /* resolved protocol is unknown */ From 6bd0b9ed277e8025ca29bf265d419566ceb643b2 Mon Sep 17 00:00:00 2001 From: pfg Date: Sun, 23 Dec 2018 20:51:13 +0000 Subject: [PATCH 045/520] Fix mismatch from r342379. --- newlib/libc/sys/rtems/include/netdb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newlib/libc/sys/rtems/include/netdb.h b/newlib/libc/sys/rtems/include/netdb.h index cf0330a2f..f06b96912 100644 --- a/newlib/libc/sys/rtems/include/netdb.h +++ b/newlib/libc/sys/rtems/include/netdb.h @@ -53,7 +53,7 @@ /* * @(#)netdb.h 8.1 (Berkeley) 6/2/93 * From: Id: netdb.h,v 8.9 1996/11/19 08:39:29 vixie Exp $ - * $FreeBSD: head/include/netdb.h 326695 2017-12-08 15:57:29Z pfg $ + * $FreeBSD: head/include/netdb.h 342383 2018-12-23 20:51:13Z pfg $ */ #ifndef _NETDB_H_ @@ -168,7 +168,7 @@ struct addrinfo { #define EAI_AGAIN 2 /* name could not be resolved at this time */ #define EAI_BADFLAGS 3 /* flags parameter had an invalid value */ #define EAI_FAIL 4 /* non-recoverable failure in name resolution */ -#define EAI_FAMILY 5 /* address family was recognized */ +#define EAI_FAMILY 5 /* address family not recognized */ #define EAI_MEMORY 6 /* memory allocation failure */ #if 0 /* Obsoleted on RFC 2553bis-02 */ From 17baf5e3909ecc0a25fec7a06637d5347f509cde Mon Sep 17 00:00:00 2001 From: shurd Date: Wed, 12 Jun 2019 18:07:04 +0000 Subject: [PATCH 046/520] Some devices take undesired actions when RTS and DTR are asserted. Some development boards for example will reset on DTR, and some radio interfaces will transmit on RTS. This patch allows "stty -f /dev/ttyu9.init -rtsdtr" to prevent RTS and DTR from being asserted on open(), allowing these devices to be used without problems. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D20031 --- newlib/libc/sys/rtems/include/sys/_termios.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/newlib/libc/sys/rtems/include/sys/_termios.h b/newlib/libc/sys/rtems/include/sys/_termios.h index 38b52bf0e..c539f88f1 100644 --- a/newlib/libc/sys/rtems/include/sys/_termios.h +++ b/newlib/libc/sys/rtems/include/sys/_termios.h @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * @(#)termios.h 8.3 (Berkeley) 3/28/94 - * $FreeBSD: head/sys/sys/_termios.h 326023 2017-11-20 19:43:44Z pfg $ + * $FreeBSD: head/sys/sys/_termios.h 348999 2019-06-12 18:07:04Z shurd $ */ #ifndef _SYS__TERMIOS_H_ @@ -143,6 +143,7 @@ #define CDTR_IFLOW 0x00040000 /* DTR flow control of input */ #define CDSR_OFLOW 0x00080000 /* DSR flow control of output */ #define CCAR_OFLOW 0x00100000 /* DCD flow control of output */ +#define CNO_RTSDTR 0x00200000 /* Do not assert RTS or DTR automatically */ #endif From e94d2a0f8bff63c2a544f31cdc81891b8d6e1a95 Mon Sep 17 00:00:00 2001 From: brooks Date: Thu, 20 Jun 2019 18:24:16 +0000 Subject: [PATCH 047/520] Extend mmap/mprotect API to specify the max page protections. A new macro PROT_MAX() alters a protection value so it can be OR'd with a regular protection value to specify the maximum permissions. If present, these flags specify the maximum permissions. While these flags are non-portable, they can be used in portable code with simple ifdefs to expand PROT_MAX() to 0. This change allows (e.g.) a region that must be writable during run-time linking or JIT code generation to be made permanently read+execute after writes are complete. This complements W^X protections allowing more precise control by the programmer. This change alters mprotect argument checking and returns an error when unhandled protection flags are set. This differs from POSIX (in that POSIX only specifies an error), but is the documented behavior on Linux and more closely matches historical mmap behavior. In addition to explicit setting of the maximum permissions, an experimental sysctl vm.imply_prot_max causes mmap to assume that the initial permissions requested should be the maximum when the sysctl is set to 1. PROT_NONE mappings are excluded from this for compatibility with rtld and other consumers that use such mappings to reserve address space before mapping contents into part of the reservation. A final version this is expected to provide per-binary and per-process opt-in/out options and this sysctl will go away in its current form. As such it is undocumented. Reviewed by: emaste, kib (prior version), markj Additional suggestions from: alc Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D18880 --- newlib/libc/sys/rtems/include/sys/mman.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/newlib/libc/sys/rtems/include/sys/mman.h b/newlib/libc/sys/rtems/include/sys/mman.h index f74f47360..4ac4f34c6 100644 --- a/newlib/libc/sys/rtems/include/sys/mman.h +++ b/newlib/libc/sys/rtems/include/sys/mman.h @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * @(#)mman.h 8.2 (Berkeley) 1/9/95 - * $FreeBSD: head/sys/sys/mman.h 326023 2017-11-20 19:43:44Z pfg $ + * $FreeBSD: head/sys/sys/mman.h 349240 2019-06-20 18:24:16Z brooks $ */ #ifndef _SYS_MMAN_H_ @@ -55,6 +55,14 @@ #define PROT_READ 0x01 /* pages can be read */ #define PROT_WRITE 0x02 /* pages can be written */ #define PROT_EXEC 0x04 /* pages can be executed */ +#if __BSD_VISIBLE +#define _PROT_ALL (PROT_READ | PROT_WRITE | PROT_EXEC) +#define PROT_EXTRACT(prot) ((prot) & _PROT_ALL) + +#define _PROT_MAX_SHIFT 16 +#define PROT_MAX(prot) ((prot) << _PROT_MAX_SHIFT) +#define PROT_MAX_EXTRACT(prot) (((prot) >> _PROT_MAX_SHIFT) & _PROT_ALL) +#endif /* * Flags contain sharing type and options. From d41e144869ca8f89fb42692b0858a2310c1df407 Mon Sep 17 00:00:00 2001 From: hselasky Date: Tue, 25 Jun 2019 11:54:41 +0000 Subject: [PATCH 048/520] Convert all IPv4 and IPv6 multicast memberships into using a STAILQ instead of a linear array. The multicast memberships for the inpcb structure are protected by a non-sleepable lock, INP_WLOCK(), which needs to be dropped when calling the underlying possibly sleeping if_ioctl() method. When using a linear array to keep track of multicast memberships, the computed memory location of the multicast filter may suddenly change, due to concurrent insertion or removal of elements in the linear array. This in turn leads to various invalid memory access issues and kernel panics. To avoid this problem, put all multicast memberships on a STAILQ based list. Then the memory location of the IPv4 and IPv6 multicast filters become fixed during their lifetime and use after free and memory leak issues are easier to track, for example by: vmstat -m | grep multi All list manipulation has been factored into inline functions including some macros, to easily allow for a future hash-list implementation, if needed. This patch has been tested by pho@ . Differential Revision: https://reviews.freebsd.org/D20080 Reviewed by: markj @ MFC after: 1 week Sponsored by: Mellanox Technologies --- newlib/libc/sys/rtems/include/netinet/in.h | 6 +----- newlib/libc/sys/rtems/include/netinet6/in6.h | 7 ++----- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/newlib/libc/sys/rtems/include/netinet/in.h b/newlib/libc/sys/rtems/include/netinet/in.h index 11f32627f..727cc88cc 100644 --- a/newlib/libc/sys/rtems/include/netinet/in.h +++ b/newlib/libc/sys/rtems/include/netinet/in.h @@ -505,13 +505,9 @@ __END_DECLS #define IP_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */ /* - * The imo_membership vector for each socket is now dynamically allocated at - * run-time, bounded by USHRT_MAX, and is reallocated when needed, sized - * according to a power-of-two increment. + * Limit for IPv4 multicast memberships */ -#define IP_MIN_MEMBERSHIPS 31 #define IP_MAX_MEMBERSHIPS 4095 -#define IP_MAX_SOURCE_FILTER 1024 /* XXX to be unused */ /* * Default resource limits for IPv4 multicast source filtering. diff --git a/newlib/libc/sys/rtems/include/netinet6/in6.h b/newlib/libc/sys/rtems/include/netinet6/in6.h index c936cfe16..a9c7cbc00 100644 --- a/newlib/libc/sys/rtems/include/netinet6/in6.h +++ b/newlib/libc/sys/rtems/include/netinet6/in6.h @@ -60,7 +60,7 @@ * SUCH DAMAGE. * * @(#)in.h 8.3 (Berkeley) 1/3/94 - * $FreeBSD: head/sys/netinet6/in6.h 337783 2018-08-14 17:27:41Z jtl $ + * $FreeBSD: head/sys/netinet6/in6.h 349369 2019-06-25 11:54:41Z hselasky $ */ #ifndef __KAME_NETINET_IN_H_INCLUDED_ @@ -395,11 +395,8 @@ struct route_in6 { #define IPV6_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */ /* - * The im6o_membership vector for each socket is now dynamically allocated at - * run-time, bounded by USHRT_MAX, and is reallocated when needed, sized - * according to a power-of-two increment. + * Limit for IPv6 multicast memberships */ -#define IPV6_MIN_MEMBERSHIPS 31 #define IPV6_MAX_MEMBERSHIPS 4095 /* From 2f55e1fa06fc0236cc0c1a9cd3ca5f8bf9d86a65 Mon Sep 17 00:00:00 2001 From: jhb Date: Sat, 29 Jun 2019 00:48:33 +0000 Subject: [PATCH 049/520] Add an external mbuf buffer type that holds multiple unmapped pages. Unmapped mbufs allow sendfile to carry multiple pages of data in a single mbuf, without mapping those pages. It is a requirement for Netflix's in-kernel TLS, and provides a 5-10% CPU savings on heavy web serving workloads when used by sendfile, due to effectively compressing socket buffers by an order of magnitude, and hence reducing cache misses. For this new external mbuf buffer type (EXT_PGS), the ext_buf pointer now points to a struct mbuf_ext_pgs structure instead of a data buffer. This structure contains an array of physical addresses (this reduces cache misses compared to an earlier version that stored an array of vm_page_t pointers). It also stores additional fields needed for in-kernel TLS such as the TLS header and trailer data that are currently unused. To more easily detect these mbufs, the M_NOMAP flag is set in m_flags in addition to M_EXT. Various functions like m_copydata() have been updated to safely access packet contents (using uiomove_fromphys()), to make things like BPF safe. NIC drivers advertise support for unmapped mbufs on transmit via a new IFCAP_NOMAP capability. This capability can be toggled via the new 'nomap' and '-nomap' ifconfig(8) commands. For NIC drivers that only transmit packet contents via DMA and use bus_dma, adding the capability to if_capabilities and if_capenable should be all that is required. If a NIC does not support unmapped mbufs, they are converted to a chain of mapped mbufs (using sf_bufs to provide the mapping) in ip_output or ip6_output. If an unmapped mbuf requires software checksums, it is also converted to a chain of mapped mbufs before computing the checksum. Submitted by: gallatin (earlier version) Reviewed by: gallatin, hselasky, rrs Discussed with: ae, kp (firewalls) Relnotes: yes Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20616 --- newlib/libc/sys/rtems/include/net/if.h | 1 + 1 file changed, 1 insertion(+) diff --git a/newlib/libc/sys/rtems/include/net/if.h b/newlib/libc/sys/rtems/include/net/if.h index a9b875cf1..a60374d54 100644 --- a/newlib/libc/sys/rtems/include/net/if.h +++ b/newlib/libc/sys/rtems/include/net/if.h @@ -246,6 +246,7 @@ struct if_data { #define IFCAP_HWSTATS 0x800000 /* manages counters internally */ #define IFCAP_TXRTLMT 0x1000000 /* hardware supports TX rate limiting */ #define IFCAP_HWRXTSTMP 0x2000000 /* hardware rx timestamping */ +#define IFCAP_NOMAP 0x4000000 /* can TX unmapped mbufs */ #define IFCAP_HWCSUM_IPV6 (IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6) From 693ba4025f83533985d3a6256b10b73acd8ee100 Mon Sep 17 00:00:00 2001 From: rrs Date: Wed, 10 Jul 2019 20:40:39 +0000 Subject: [PATCH 050/520] This commit updates rack to what is basically being used at NF as well as sets in some of the groundwork for committing BBR. The hpts system is updated as well as some other needed utilities for the entrance of BBR. This is actually part 1 of 3 more needed commits which will finally complete with BBRv1 being added as a new tcp stack. Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D20834 --- newlib/libc/sys/rtems/include/netinet/tcp.h | 27 +++++++++++++++------ 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/newlib/libc/sys/rtems/include/netinet/tcp.h b/newlib/libc/sys/rtems/include/netinet/tcp.h index c3ae655bd..37cf35caa 100644 --- a/newlib/libc/sys/rtems/include/netinet/tcp.h +++ b/newlib/libc/sys/rtems/include/netinet/tcp.h @@ -201,9 +201,8 @@ struct tcphdr { #define TCP_RACK_TLP_THRESH 1063 /* RACK TLP theshold i.e. srtt+(srtt/N) */ #define TCP_RACK_PKT_DELAY 1064 /* RACK added ms i.e. rack-rtt + reord + N */ #define TCP_RACK_TLP_INC_VAR 1065 /* Does TLP include rtt variance in t-o */ -#define TCP_RACK_SESS_CWV 1066 /* Enable RFC7611 cwnd validation on sess */ #define TCP_BBR_IWINTSO 1067 /* Initial TSO window for BBRs first sends */ -#define TCP_BBR_RECFORCE 1068 /* Enter recovery force out a segment disregard pacer */ +#define TCP_BBR_RECFORCE 1068 /* Enter recovery force out a segment disregard pacer no longer valid */ #define TCP_BBR_STARTUP_PG 1069 /* Startup pacing gain */ #define TCP_BBR_DRAIN_PG 1070 /* Drain pacing gain */ #define TCP_BBR_RWND_IS_APP 1071 /* Rwnd limited is considered app limited */ @@ -211,14 +210,18 @@ struct tcphdr { #define TCP_BBR_ONE_RETRAN 1073 /* Is only one segment allowed out during retran */ #define TCP_BBR_STARTUP_LOSS_EXIT 1074 /* Do we exit a loss during startup if not 20% incr */ #define TCP_BBR_USE_LOWGAIN 1075 /* lower the gain in PROBE_BW enable */ -#define TCP_BBR_LOWGAIN_THRESH 1076 /* How many cycles do we stay in lowgain */ -#define TCP_BBR_LOWGAIN_HALF 1077 /* Do we halfstep lowgain down */ -#define TCP_BBR_LOWGAIN_FD 1078 /* Do we force a drain when lowgain in place */ +#define TCP_BBR_LOWGAIN_THRESH 1076 /* Unused after 2.3 morphs to TSLIMITS >= 2.3 */ +#define TCP_BBR_TSLIMITS 1076 /* Do we use experimental Timestamp limiting for our algo */ +#define TCP_BBR_LOWGAIN_HALF 1077 /* Unused after 2.3 */ +#define TCP_BBR_PACE_OH 1077 /* Reused in 4.2 for pacing overhead setting */ +#define TCP_BBR_LOWGAIN_FD 1078 /* Unused after 2.3 */ +#define TCP_BBR_HOLD_TARGET 1078 /* For 4.3 on */ #define TCP_BBR_USEDEL_RATE 1079 /* Enable use of delivery rate for loss recovery */ #define TCP_BBR_MIN_RTO 1080 /* Min RTO in milliseconds */ #define TCP_BBR_MAX_RTO 1081 /* Max RTO in milliseconds */ #define TCP_BBR_REC_OVER_HPTS 1082 /* Recovery override htps settings 0/1/3 */ -#define TCP_BBR_UNLIMITED 1083 /* Does BBR, in non-recovery not use cwnd */ +#define TCP_BBR_UNLIMITED 1083 /* Not used before 2.3 and morphs to algorithm >= 2.3 */ +#define TCP_BBR_ALGORITHM 1083 /* What measurement algo does BBR use netflix=0, google=1 */ #define TCP_BBR_DRAIN_INC_EXTRA 1084 /* Does the 3/4 drain target include the extra gain */ #define TCP_BBR_STARTUP_EXIT_EPOCH 1085 /* what epoch gets us out of startup */ #define TCP_BBR_PACE_PER_SEC 1086 @@ -227,17 +230,27 @@ struct tcphdr { #define TCP_BBR_PACE_SEG_MIN 1089 #define TCP_BBR_PACE_CROSS 1090 #define TCP_RACK_IDLE_REDUCE_HIGH 1092 /* Reduce the highest cwnd seen to IW on idle */ -#define TCP_RACK_IDLE_REDUCE_HIGH 1092 /* Reduce the highest cwnd seen to IW on idle */ #define TCP_RACK_MIN_PACE 1093 /* Do we enforce rack min pace time */ #define TCP_RACK_MIN_PACE_SEG 1094 /* If so what is the seg threshould */ +#define TCP_RACK_GP_INCREASE 1094 /* After 4.1 its the GP increase */ #define TCP_RACK_TLP_USE 1095 #define TCP_BBR_ACK_COMP_ALG 1096 /* Not used */ +#define TCP_BBR_TMR_PACE_OH 1096 /* Recycled in 4.2 */ #define TCP_BBR_EXTRA_GAIN 1097 #define TCP_BBR_RACK_RTT_USE 1098 /* what RTT should we use 0, 1, or 2? */ #define TCP_BBR_RETRAN_WTSO 1099 #define TCP_DATA_AFTER_CLOSE 1100 #define TCP_BBR_PROBE_RTT_GAIN 1101 #define TCP_BBR_PROBE_RTT_LEN 1102 +#define TCP_BBR_SEND_IWND_IN_TSO 1103 /* Do we burst out whole iwin size chunks at start? */ +#define TCP_BBR_USE_RACK_CHEAT 1104 /* Do we use the rack cheat for pacing rxt's */ +#define TCP_BBR_HDWR_PACE 1105 /* Enable/disable hardware pacing */ +#define TCP_BBR_UTTER_MAX_TSO 1106 /* Do we enforce an utter max TSO size */ +#define TCP_BBR_EXTRA_STATE 1107 /* Special exit-persist catch up */ +#define TCP_BBR_FLOOR_MIN_TSO 1108 /* The min tso size */ +#define TCP_BBR_MIN_TOPACEOUT 1109 /* Do we suspend pacing until */ +#define TCP_BBR_TSTMP_RAISES 1110 /* Can a timestamp measurement raise the b/w */ +#define TCP_BBR_POLICER_DETECT 1111 /* Turn on/off google mode policer detection */ /* Start of reserved space for third-party user-settable options. */ From 28a44b1ecd44ef86ebe98a177d252b9b10343b52 Mon Sep 17 00:00:00 2001 From: thj Date: Thu, 8 Aug 2019 11:43:09 +0000 Subject: [PATCH 051/520] Rename IPPROTO 33 from SEP to DCCP IPPROTO 33 is DCCP in the IANA Registry: https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml IPPROTO_SEP was added about 20 years ago in r33804. The entries were added straight from RFC1700, without regard to whether they were used. The reference in RFC1700 for SEP is '[JC120] ', this is an indication that the protocol number was probably in use in a private network. As RFC1700 is no longer the authoritative list of internet numbers and that IANA assinged 33 to DCCP in RFC4340, change the header to the actual authoritative source. Reviewed by: Richard Scheffenegger, bz Approved by: bz (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D21178 --- newlib/libc/sys/rtems/include/netinet/in.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newlib/libc/sys/rtems/include/netinet/in.h b/newlib/libc/sys/rtems/include/netinet/in.h index 727cc88cc..1ef4672ba 100644 --- a/newlib/libc/sys/rtems/include/netinet/in.h +++ b/newlib/libc/sys/rtems/include/netinet/in.h @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * @(#)in.h 8.3 (Berkeley) 1/3/94 - * $FreeBSD: head/sys/netinet/in.h 326023 2017-11-20 19:43:44Z pfg $ + * $FreeBSD: head/sys/netinet/in.h 350749 2019-08-08 11:43:09Z thj $ */ #ifndef _NETINET_IN_H_ @@ -169,7 +169,7 @@ __END_DECLS #define IPPROTO_BLT 30 /* Bulk Data Transfer */ #define IPPROTO_NSP 31 /* Network Services */ #define IPPROTO_INP 32 /* Merit Internodal */ -#define IPPROTO_SEP 33 /* Sequential Exchange */ +#define IPPROTO_DCCP 33 /* Datagram Congestion Control Protocol */ #define IPPROTO_3PC 34 /* Third Party Connect */ #define IPPROTO_IDPR 35 /* InterDomain Policy Routing */ #define IPPROTO_XTP 36 /* XTP */ From 1b356361196fe3095717c91b669976bb91e998ec Mon Sep 17 00:00:00 2001 From: jhb Date: Tue, 27 Aug 2019 00:01:56 +0000 Subject: [PATCH 052/520] Add kernel-side support for in-kernel TLS. KTLS adds support for in-kernel framing and encryption of Transport Layer Security (1.0-1.2) data on TCP sockets. KTLS only supports offload of TLS for transmitted data. Key negotation must still be performed in userland. Once completed, transmit session keys for a connection are provided to the kernel via a new TCP_TXTLS_ENABLE socket option. All subsequent data transmitted on the socket is placed into TLS frames and encrypted using the supplied keys. Any data written to a KTLS-enabled socket via write(2), aio_write(2), or sendfile(2) is assumed to be application data and is encoded in TLS frames with an application data type. Individual records can be sent with a custom type (e.g. handshake messages) via sendmsg(2) with a new control message (TLS_SET_RECORD_TYPE) specifying the record type. At present, rekeying is not supported though the in-kernel framework should support rekeying. KTLS makes use of the recently added unmapped mbufs to store TLS frames in the socket buffer. Each TLS frame is described by a single ext_pgs mbuf. The ext_pgs structure contains the header of the TLS record (and trailer for encrypted records) as well as references to the associated TLS session. KTLS supports two primary methods of encrypting TLS frames: software TLS and ifnet TLS. Software TLS marks mbufs holding socket data as not ready via M_NOTREADY similar to sendfile(2) when TLS framing information is added to an unmapped mbuf in ktls_frame(). ktls_enqueue() is then called to schedule TLS frames for encryption. In the case of sendfile_iodone() calls ktls_enqueue() instead of pru_ready() leaving the mbufs marked M_NOTREADY until encryption is completed. For other writes (vn_sendfile when pages are available, write(2), etc.), the PRUS_NOTREADY is set when invoking pru_send() along with invoking ktls_enqueue(). A pool of worker threads (the "KTLS" kernel process) encrypts TLS frames queued via ktls_enqueue(). Each TLS frame is temporarily mapped using the direct map and passed to a software encryption backend to perform the actual encryption. (Note: The use of PHYS_TO_DMAP could be replaced with sf_bufs if someone wished to make this work on architectures without a direct map.) KTLS supports pluggable software encryption backends. Internally, Netflix uses proprietary pure-software backends. This commit includes a simple backend in a new ktls_ocf.ko module that uses the kernel's OpenCrypto framework to provide AES-GCM encryption of TLS frames. As a result, software TLS is now a bit of a misnomer as it can make use of hardware crypto accelerators. Once software encryption has finished, the TLS frame mbufs are marked ready via pru_ready(). At this point, the encrypted data appears as regular payload to the TCP stack stored in unmapped mbufs. ifnet TLS permits a NIC to offload the TLS encryption and TCP segmentation. In this mode, a new send tag type (IF_SND_TAG_TYPE_TLS) is allocated on the interface a socket is routed over and associated with a TLS session. TLS records for a TLS session using ifnet TLS are not marked M_NOTREADY but are passed down the stack unencrypted. The ip_output_send() and ip6_output_send() helper functions that apply send tags to outbound IP packets verify that the send tag of the TLS record matches the outbound interface. If so, the packet is tagged with the TLS send tag and sent to the interface. The NIC device driver must recognize packets with the TLS send tag and schedule them for TLS encryption and TCP segmentation. If the the outbound interface does not match the interface in the TLS send tag, the packet is dropped. In addition, a task is scheduled to refresh the TLS send tag for the TLS session. If a new TLS send tag cannot be allocated, the connection is dropped. If a new TLS send tag is allocated, however, subsequent packets will be tagged with the correct TLS send tag. (This latter case has been tested by configuring both ports of a Chelsio T6 in a lagg and failing over from one port to another. As the connections migrated to the new port, new TLS send tags were allocated for the new port and connections resumed without being dropped.) ifnet TLS can be enabled and disabled on supported network interfaces via new '[-]txtls[46]' options to ifconfig(8). ifnet TLS is supported across both vlan devices and lagg interfaces using failover, lacp with flowid enabled, or lacp with flowid enabled. Applications may request the current KTLS mode of a connection via a new TCP_TXTLS_MODE socket option. They can also use this socket option to toggle between software and ifnet TLS modes. In addition, a testing tool is available in tools/tools/switch_tls. This is modeled on tcpdrop and uses similar syntax. However, instead of dropping connections, -s is used to force KTLS connections to switch to software TLS and -i is used to switch to ifnet TLS. Various sysctls and counters are available under the kern.ipc.tls sysctl node. The kern.ipc.tls.enable node must be set to true to enable KTLS (it is off by default). The use of unmapped mbufs must also be enabled via kern.ipc.mb_use_ext_pgs to enable KTLS. KTLS is enabled via the KERN_TLS kernel option. This patch is the culmination of years of work by several folks including Scott Long and Randall Stewart for the original design and implementation; Drew Gallatin for several optimizations including the use of ext_pgs mbufs, the M_NOTREADY mechanism for TLS records awaiting software encryption, and pluggable software crypto backends; and John Baldwin for modifications to support hardware TLS offload. Reviewed by: gallatin, hselasky, rrs Obtained from: Netflix Sponsored by: Netflix, Chelsio Communications Differential Revision: https://reviews.freebsd.org/D21277 --- newlib/libc/sys/rtems/include/net/if.h | 3 +++ newlib/libc/sys/rtems/include/netinet/tcp.h | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/newlib/libc/sys/rtems/include/net/if.h b/newlib/libc/sys/rtems/include/net/if.h index a60374d54..a5539bdcd 100644 --- a/newlib/libc/sys/rtems/include/net/if.h +++ b/newlib/libc/sys/rtems/include/net/if.h @@ -247,6 +247,8 @@ struct if_data { #define IFCAP_TXRTLMT 0x1000000 /* hardware supports TX rate limiting */ #define IFCAP_HWRXTSTMP 0x2000000 /* hardware rx timestamping */ #define IFCAP_NOMAP 0x4000000 /* can TX unmapped mbufs */ +#define IFCAP_TXTLS4 0x8000000 /* can do TLS encryption and segmentation for TCP */ +#define IFCAP_TXTLS6 0x10000000 /* can do TLS encryption and segmentation for TCP6 */ #define IFCAP_HWCSUM_IPV6 (IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6) @@ -254,6 +256,7 @@ struct if_data { #define IFCAP_TSO (IFCAP_TSO4 | IFCAP_TSO6) #define IFCAP_WOL (IFCAP_WOL_UCAST | IFCAP_WOL_MCAST | IFCAP_WOL_MAGIC) #define IFCAP_TOE (IFCAP_TOE4 | IFCAP_TOE6) +#define IFCAP_TXTLS (IFCAP_TXTLS4 | IFCAP_TXTLS6) #define IFCAP_CANTCHANGE (IFCAP_NETMAP) diff --git a/newlib/libc/sys/rtems/include/netinet/tcp.h b/newlib/libc/sys/rtems/include/netinet/tcp.h index 37cf35caa..bce1d59c6 100644 --- a/newlib/libc/sys/rtems/include/netinet/tcp.h +++ b/newlib/libc/sys/rtems/include/netinet/tcp.h @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * @(#)tcp.h 8.1 (Berkeley) 6/10/93 - * $FreeBSD: head/sys/netinet/tcp.h 334804 2018-06-07 18:18:13Z rrs $ + * $FreeBSD: head/sys/netinet/tcp.h 351522 2019-08-27 00:01:56Z jhb $ */ #ifndef _NETINET_TCP_H_ @@ -174,6 +174,8 @@ struct tcphdr { #define TCP_LOGDUMP 37 /* dump connection log events to device */ #define TCP_LOGDUMPID 38 /* dump events from connections with same ID to device */ +#define TCP_TXTLS_ENABLE 39 /* TLS framing and encryption for transmit */ +#define TCP_TXTLS_MODE 40 /* Transmit TLS mode */ #define TCP_CONGESTION 64 /* get/set congestion control algorithm */ #define TCP_CCALGOOPT 65 /* get/set cc algorithm specific options */ #define TCP_DELACK 72 /* socket option for delayed ack */ @@ -350,4 +352,14 @@ struct tcp_function_set { uint32_t pcbcnt; }; +/* TLS modes for TCP_TXTLS_MODE */ +#define TCP_TLS_MODE_NONE 0 +#define TCP_TLS_MODE_SW 1 +#define TCP_TLS_MODE_IFNET 2 + +/* + * TCP Control message types + */ +#define TLS_SET_RECORD_TYPE 1 + #endif /* !_NETINET_TCP_H_ */ From 7e9b1550fd1c9690bc560404388ba4907d10996a Mon Sep 17 00:00:00 2001 From: kib Date: Tue, 17 Sep 2019 18:49:13 +0000 Subject: [PATCH 053/520] Add SIOCGIFDOWNREASON. The ioctl(2) is intended to provide more details about the cause of the down for the link. Eventually we might define a comprehensive list of codes for the situations. But interface also allows the driver to provide free-form null-terminated ASCII string to provide arbitrary non-formalized information. Sample implementation exists for mlx5(4), where the string is fetched from firmware controlling the port. Reviewed by: hselasky, rrs Sponsored by: Mellanox Technologies MFC after: 1 week Differential revision: https://reviews.freebsd.org/D21527 --- newlib/libc/sys/rtems/include/net/if.h | 12 +++++++++++- newlib/libc/sys/rtems/include/sys/sockio.h | 4 +++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/newlib/libc/sys/rtems/include/net/if.h b/newlib/libc/sys/rtems/include/net/if.h index a5539bdcd..c7c5e8669 100644 --- a/newlib/libc/sys/rtems/include/net/if.h +++ b/newlib/libc/sys/rtems/include/net/if.h @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * @(#)if.h 8.1 (Berkeley) 6/10/93 - * $FreeBSD: head/sys/net/if.h 340968 2018-11-26 13:42:18Z markj $ + * $FreeBSD: head/sys/net/if.h 352458 2019-09-17 18:49:13Z kib $ */ #ifndef _NET_IF_H_ @@ -585,6 +585,16 @@ struct ifrsshash { #define IFNET_PCP_NONE 0xff /* PCP disabled */ +#define IFDR_MSG_SIZE 64 +#define IFDR_REASON_MSG 1 +#define IFDR_REASON_VENDOR 2 +struct ifdownreason { + char ifdr_name[IFNAMSIZ]; + uint32_t ifdr_reason; + uint32_t ifdr_vendor; + char ifdr_msg[IFDR_MSG_SIZE]; +}; + #endif /* __BSD_VISIBLE */ #ifndef _KERNEL diff --git a/newlib/libc/sys/rtems/include/sys/sockio.h b/newlib/libc/sys/rtems/include/sys/sockio.h index 786202a58..7f33ffaef 100644 --- a/newlib/libc/sys/rtems/include/sys/sockio.h +++ b/newlib/libc/sys/rtems/include/sys/sockio.h @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * @(#)sockio.h 8.1 (Berkeley) 3/28/94 - * $FreeBSD: head/sys/sys/sockio.h 331622 2018-03-27 15:29:32Z kib $ + * $FreeBSD: head/sys/sys/sockio.h 352458 2019-09-17 18:49:13Z kib $ */ #ifndef _SYS_SOCKIO_H_ @@ -143,4 +143,6 @@ #define SIOCGLANPCP _IOWR('i', 152, struct ifreq) /* Get (V)LAN PCP */ #define SIOCSLANPCP _IOW('i', 153, struct ifreq) /* Set (V)LAN PCP */ +#define SIOCGIFDOWNREASON _IOWR('i', 154, struct ifdownreason) + #endif /* !_SYS_SOCKIO_H_ */ From e1a0775dc0545b5f9c81b09a327fc110c538b7b4 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 26 Sep 2019 19:52:46 +0900 Subject: [PATCH 054/520] Cygwin: pty: Fix PTY so that cygwin setup shows help with -h option. - After commit 169d65a5774acc76ce3f3feeedcbae7405aa9b57, cygwin setup fails to show help message when -h option is specified, as reported in https://cygwin.com/ml/cygwin/2019-09/msg00248.html. This patch fixes the problem. --- winsup/cygwin/spawn.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 4d8bcc9fa..f8090a6a4 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -790,8 +790,6 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, NtClose (old_winpid_hdl); real_path.get_wide_win32_path (myself->progname); // FIXME: race? sigproc_printf ("new process name %W", myself->progname); - if (!iscygwin ()) - close_all_files (); } else { @@ -890,6 +888,8 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, wait_for_myself (); } myself.exit (EXITCODE_NOSET); + if (!iscygwin ()) + close_all_files (); break; case _P_WAIT: case _P_SYSTEM: From 283cb372e4e25d1d11123d98e3d14e85b525e48d Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Wed, 25 Sep 2019 14:18:18 -0400 Subject: [PATCH 055/520] Cygwin: normalize_win32_path: improve error checking If the source path starts with the Win32 long path prefix '\\?\' or the NT object directory prefix '\??\', require the prefix to be followed by 'UNC\' or ':\'. Otherwise return EINVAL. This fixes the assertion failure in symlink_info::check that was reported here: https://cygwin.com/ml/cygwin/2019-09/msg00228.html That assertion failure was caused by normalize_win32_path returning a path with no backslashes when the source path was '\\?\DRIVE'. --- winsup/cygwin/path.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 2fbacd881..f61003578 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1406,15 +1406,18 @@ normalize_win32_path (const char *src, char *dst, char *&tail) bool beg_src_slash = isdirsep (src[0]); tail = dst; - /* Skip long path name prefixes in Win32 or NT syntax. */ + /* Skip Win32 long path name prefix and NT object directory prefix. */ if (beg_src_slash && (src[1] == '?' || isdirsep (src[1])) && src[2] == '?' && isdirsep (src[3])) { src += 4; - if (src[1] != ':') /* native UNC path */ + if (isdrive (src) && isdirsep (src[2])) + beg_src_slash = false; + else if (!strncmp (src, "UNC", 3) && isdirsep (src[3])) + /* native UNC path */ src += 2; /* Fortunately the first char is not copied... */ else - beg_src_slash = false; + return EINVAL; } if (beg_src_slash && isdirsep (src[1])) { From 6061f9c76f242f851e1d5119e1cbdef683dd0aa4 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Fri, 27 Sep 2019 13:36:45 -0400 Subject: [PATCH 056/520] Document the last bug fix --- winsup/cygwin/release/3.1.0 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/release/3.1.0 b/winsup/cygwin/release/3.1.0 index 03bbc7aba..7f88c53fd 100644 --- a/winsup/cygwin/release/3.1.0 +++ b/winsup/cygwin/release/3.1.0 @@ -82,3 +82,6 @@ Bug Fixes - Make rmdir fail if its argument is a symlink. Addresses: https://cygwin.com/ml/cygwin/2019-09/msg00221.html + +- Fix an assertion failure on an invalid path. + Addresses: https://cygwin.com/ml/cygwin/2019-09/msg00228.html From df5c79f30c3f871b7e0edd6d4629af78b30fca15 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 3 Oct 2019 19:43:37 +0900 Subject: [PATCH 057/520] Cygwin: Fix signal handling issue introduced by PTY related change. - After commit 41864091014b63b0cb72ae98281fa53349b6ef77, there is a regression in signal handling reported in https://www.cygwin.com/ml/cygwin/2019-10/msg00010.html. This patch fixes the issue. --- winsup/cygwin/exceptions.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index db0fe0867..132fea427 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -949,7 +949,7 @@ _cygtls::interrupt_setup (siginfo_t& si, void *handler, struct sigaction& siga) if (incyg) set_signal_arrived (); - if (!have_execed && ch_spawn.iscygwin ()) + if (!have_execed && !(myself->exec_sendsig && !ch_spawn.iscygwin ())) proc_subproc (PROC_CLEARWAIT, 1); sigproc_printf ("armed signal_arrived %p, signal %d", signal_arrived, si.si_signo); From f88aece242178ff0c187d56e34a79645fbc44a23 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Fri, 4 Oct 2019 17:01:03 -0400 Subject: [PATCH 058/520] Prevent NULL ptr accesses due to Balloc out of memory - add new eBalloc macro to mprec.h which calls Balloc and aborts if Balloc fails due to out of memory - change mprec.c functions that use Balloc without checking to use eBalloc instead - fix dtoa.c to use eBalloc --- newlib/libc/stdlib/dtoa.c | 4 ++-- newlib/libc/stdlib/mprec.c | 20 ++++++++++---------- newlib/libc/stdlib/mprec.h | 8 ++++++++ 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/newlib/libc/stdlib/dtoa.c b/newlib/libc/stdlib/dtoa.c index c38f37afd..e47a8bc77 100644 --- a/newlib/libc/stdlib/dtoa.c +++ b/newlib/libc/stdlib/dtoa.c @@ -423,7 +423,7 @@ _dtoa_r (struct _reent *ptr, for (_REENT_MP_RESULT_K(ptr) = 0; sizeof (_Bigint) - sizeof (__ULong) + j <= i; j <<= 1) _REENT_MP_RESULT_K(ptr)++; - _REENT_MP_RESULT(ptr) = Balloc (ptr, _REENT_MP_RESULT_K(ptr)); + _REENT_MP_RESULT(ptr) = eBalloc (ptr, _REENT_MP_RESULT_K(ptr)); s = s0 = (char *) _REENT_MP_RESULT(ptr); if (ilim >= 0 && ilim <= Quick_max && try_quick) @@ -743,7 +743,7 @@ _dtoa_r (struct _reent *ptr, mlo = mhi; if (spec_case) { - mhi = Balloc (ptr, mhi->_k); + mhi = eBalloc (ptr, mhi->_k); Bcopy (mhi, mlo); mhi = lshift (ptr, mhi, Log2P); } diff --git a/newlib/libc/stdlib/mprec.c b/newlib/libc/stdlib/mprec.c index e433fa8c1..930c984ca 100644 --- a/newlib/libc/stdlib/mprec.c +++ b/newlib/libc/stdlib/mprec.c @@ -178,7 +178,7 @@ multadd (struct _reent *ptr, { if (wds >= b->_maxwds) { - b1 = Balloc (ptr, b->_k + 1); + b1 = eBalloc (ptr, b->_k + 1); Bcopy (b1, b); Bfree (ptr, b); b = b1; @@ -203,11 +203,11 @@ s2b (struct _reent * ptr, x = (nd + 8) / 9; for (k = 0, y = 1; x > y; y <<= 1, k++); #ifdef Pack_32 - b = Balloc (ptr, k); + b = eBalloc (ptr, k); b->_x[0] = y9; b->_wds = 1; #else - b = Balloc (ptr, k + 1); + b = eBalloc (ptr, k + 1); b->_x[0] = y9 & 0xffff; b->_wds = (b->_x[1] = y9 >> 16) ? 2 : 1; #endif @@ -317,7 +317,7 @@ i2b (struct _reent * ptr, int i) { _Bigint *b; - b = Balloc (ptr, 1); + b = eBalloc (ptr, 1); b->_x[0] = i; b->_wds = 1; return b; @@ -346,7 +346,7 @@ mult (struct _reent * ptr, _Bigint * a, _Bigint * b) wc = wa + wb; if (wc > a->_maxwds) k++; - c = Balloc (ptr, k); + c = eBalloc (ptr, k); for (x = c->_x, xa = x + wc; x < xa; x++) *x = 0; xa = a->_x; @@ -470,7 +470,7 @@ lshift (struct _reent * ptr, _Bigint * b, int k) n1 = n + b->_wds + 1; for (i = b->_maxwds; n1 > i; i <<= 1) k1++; - b1 = Balloc (ptr, k1); + b1 = eBalloc (ptr, k1); x1 = b1->_x; for (i = 0; i < n; i++) *x1++ = 0; @@ -559,7 +559,7 @@ diff (struct _reent * ptr, i = cmp (a, b); if (!i) { - c = Balloc (ptr, 0); + c = eBalloc (ptr, 0); c->_wds = 1; c->_x[0] = 0; return c; @@ -573,7 +573,7 @@ diff (struct _reent * ptr, } else i = 0; - c = Balloc (ptr, a->_k); + c = eBalloc (ptr, a->_k); c->_sign = i; wa = a->_wds; xa = a->_x; @@ -775,9 +775,9 @@ d2b (struct _reent * ptr, #endif #ifdef Pack_32 - b = Balloc (ptr, 1); + b = eBalloc (ptr, 1); #else - b = Balloc (ptr, 2); + b = eBalloc (ptr, 2); #endif x = b->_x; diff --git a/newlib/libc/stdlib/mprec.h b/newlib/libc/stdlib/mprec.h index 7e9a88be4..a1492aa38 100644 --- a/newlib/libc/stdlib/mprec.h +++ b/newlib/libc/stdlib/mprec.h @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include "../locale/setlocale.h" @@ -340,6 +341,13 @@ typedef struct _Bigint _Bigint; #define copybits __copybits #define hexnan __hexnan +#define eBalloc(__reent_ptr, __len) ({ \ + void *__ptr = Balloc(__reent_ptr, __len); \ + if (__ptr == NULL) \ + __assert_func(__FILE__, __LINE__, (char *)0, "Balloc succeeded"); \ + __ptr; \ + }) + #if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__) && !defined(_SMALL_HEXDIG) #define __get_hexdig(x) __hexdig[x] /* NOTE: must evaluate arg only once */ #else /* !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__) && !defined(_SMALL_HEXDIG) */ From 175b215e054a8cee50d91317f3af22a3b2c3d320 Mon Sep 17 00:00:00 2001 From: Christos Gentsos Date: Mon, 7 Oct 2019 14:38:14 +0100 Subject: [PATCH 059/520] Optimize epilogue sequence for architectures with POP interworking. ARMv5 and above supports arm/thumb interworking using POP, so we can improve the exit sequence in this case. --- newlib/libc/machine/arm/aeabi_memmove-thumb.S | 6 ++++++ newlib/libc/machine/arm/aeabi_memset-thumb.S | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/newlib/libc/machine/arm/aeabi_memmove-thumb.S b/newlib/libc/machine/arm/aeabi_memmove-thumb.S index 61a72581c..fadeb9a3b 100644 --- a/newlib/libc/machine/arm/aeabi_memmove-thumb.S +++ b/newlib/libc/machine/arm/aeabi_memmove-thumb.S @@ -26,6 +26,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "acle-compat.h" + .thumb .syntax unified .global __aeabi_memmove @@ -49,9 +51,13 @@ __aeabi_memmove: subs r3, r3, #1 bcs 1b 2: +#if __ARM_ARCH >= 5 + pop {r4, pc} +#else pop {r4} pop {r1} bx r1 +#endif 3: movs r3, #0 cmp r2, #0 diff --git a/newlib/libc/machine/arm/aeabi_memset-thumb.S b/newlib/libc/machine/arm/aeabi_memset-thumb.S index aa8f2719e..ed6ce8860 100644 --- a/newlib/libc/machine/arm/aeabi_memset-thumb.S +++ b/newlib/libc/machine/arm/aeabi_memset-thumb.S @@ -26,6 +26,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "acle-compat.h" + .thumb .syntax unified .global __aeabi_memset @@ -110,9 +112,13 @@ __aeabi_memset: cmp r4, r3 bne 8b 9: +#if __ARM_ARCH >= 5 + pop {r4, r5, r6, pc} +#else pop {r4, r5, r6} pop {r1} bx r1 +#endif 10: movs r3, r0 movs r4, r1 From e06f2fbde7d9d8ca3d363035dacbbc4b81e29c9a Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Mon, 7 Oct 2019 15:29:33 -0400 Subject: [PATCH 060/520] Allow verifying _REENT_CHECK macros memory allocation - change sys/reent.h to replace _REENT_CHECK_DEBUG with _REENT_CHECK_VERIFY which when set asserts that any memory allocated is non-NULL and calls __assert_func directly - add new --enable-newlib-reent-check-verify configure option - add support for configure.host to specify default for newlib_reent_check_verify - add _REENT_CHECK_VERIFY macro support to acconfig.h and newlib.hin --- newlib/acconfig.h | 3 +++ newlib/configure | 24 ++++++++++++++++++++++-- newlib/configure.host | 9 +++++++++ newlib/configure.in | 14 ++++++++++++++ newlib/libc/include/sys/reent.h | 6 +++--- newlib/newlib.hin | 3 +++ 6 files changed, 54 insertions(+), 5 deletions(-) diff --git a/newlib/acconfig.h b/newlib/acconfig.h index de26c5ef3..c28f7d692 100644 --- a/newlib/acconfig.h +++ b/newlib/acconfig.h @@ -26,6 +26,9 @@ very restricted storage. */ #undef _WANT_REENT_SMALL +/* Verify _REENT_CHECK macros allocate memory successfully. */ +#undef _REENT_CHECK_VERIFY + /* Multibyte supported */ #undef _MB_CAPABLE diff --git a/newlib/configure b/newlib/configure index 6eef23c40..55c664206 100755 --- a/newlib/configure +++ b/newlib/configure @@ -788,6 +788,7 @@ enable_newlib_register_fini enable_newlib_io_long_long enable_newlib_io_long_double enable_newlib_mb +enable_newlib_reent_check_verify enable_newlib_iconv_encodings enable_newlib_iconv_from_encodings enable_newlib_iconv_to_encodings @@ -1463,6 +1464,7 @@ Optional Features: --enable-newlib-io-long-long enable long long type support in IO functions like printf/scanf --enable-newlib-io-long-double enable long double type support in IO functions printf/scanf --enable-newlib-mb enable multibyte support + --enable-newlib-reent-check-verify enable checking of _REENT_CHECK memory allocation --enable-newlib-iconv-encodings enable specific comma-separated list of bidirectional iconv encodings to be built-in --enable-newlib-iconv-from-encodings enable specific comma-separated list of \"from\" iconv encodings to be built-in --enable-newlib-iconv-to-encodings enable specific comma-separated list of \"to\" iconv encodings to be built-in @@ -2310,6 +2312,17 @@ else newlib_mb= fi +# Check whether --enable-newlib-reent-check-verify was given. +if test "${enable_newlib_reent_check_verify+set}" = set; then : + enableval=$enable_newlib_reent_check_verify; case "${enableval}" in + yes) newlib_reent_check_verify=yes;; + no) newlib_reent_check_verify=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-reent-check-verify option" "$LINENO" 5 ;; + esac +else + newlib_reent_check_verify= +fi + # Check whether --enable-newlib-iconv-encodings was given. if test "${enable_newlib_iconv_encodings+set}" = set; then : enableval=$enable_newlib_iconv_encodings; if test x${enableval} = x; then @@ -11840,7 +11853,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11843 "configure" +#line 11856 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11946,7 +11959,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11949 "configure" +#line 11962 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12351,6 +12364,13 @@ _ACEOF fi +if test "${newlib_reent_check_verify}" = "yes"; then +cat >>confdefs.h <<_ACEOF +#define _REENT_CHECK_VERIFY 1 +_ACEOF + +fi + if test "${newlib_io_c99_formats}" = "yes"; then cat >>confdefs.h <<_ACEOF #define _WANT_IO_C99_FORMATS 1 diff --git a/newlib/configure.host b/newlib/configure.host index 87bf78a3a..fe7d9b7b5 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -29,6 +29,7 @@ # newlib_io_long_double --enable-newlib-io-long-double ("yes", "no", "") # newlib_global_stdio_streams --enable-global-stdio-streams ("yes", "no, "") # newlib_fno_builtin --disable-newlib-fno-builtin ("yes", "no, "") +# newlib_reent_check_verify --enable-newlib-reent-check-verify ("yes", "no, "") # It sets the following shell variables: # newlib_cflags Special CFLAGS to use when building @@ -76,6 +77,7 @@ default_newlib_io_long_double=no default_newlib_io_pos_args=no default_newlib_atexit_dynamic_alloc=yes default_newlib_nano_malloc=no +default_newlib_reent_check_verify=no aext=a oext=o lpfx="lib_a-" @@ -952,6 +954,13 @@ if [ "x${newlib_nano_malloc}" = "x" ]; then fi fi +# Enable _REENT_CHECK macro memory allocation verification. +if [ "x${newlib_reent_check_verify}" = "x" ]; then + if [ ${default_newlib_reent_check_verify} = "yes" ]; then + newlib_reent_check_verify="yes"; + fi +fi + # Remove rpc headers if xdr_dir not specified if [ "x${xdr_dir}" = "x" ]; then noinclude="${noinclude} rpc/types.h rpc/xdr.h" diff --git a/newlib/configure.in b/newlib/configure.in index adce036bf..ec5039d2b 100644 --- a/newlib/configure.in +++ b/newlib/configure.in @@ -66,6 +66,16 @@ AC_ARG_ENABLE(newlib-mb, *) AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;; esac], [newlib_mb=])dnl +dnl Enable verification of successful memory allocation for _REENT_CHECK family of macros +dnl Support --enable-newlib-reent-check-verify +AC_ARG_ENABLE(newlib-reent-check-verify, +[ --enable-newlib-reent-check-verify enable checking of _REENT_CHECK memory allocation], +[case "${enableval}" in + yes) newlib_reent_check_verify=yes;; + no) newlib_reent_check_verify=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for newlib-reent-check-verify option) ;; + esac], [newlib_reent_check_verify=])dnl + dnl Support --enable-newlib-iconv-encodings AC_ARG_ENABLE(newlib-iconv-encodings, [ --enable-newlib-iconv-encodings enable specific comma-separated list of bidirectional iconv encodings to be built-in], @@ -396,6 +406,10 @@ if test "${newlib_elix_level}" -gt "0"; then AC_DEFINE_UNQUOTED(_ELIX_LEVEL,${newlib_elix_level}) fi +if test "${newlib_reent_check_verify}" = "yes"; then +AC_DEFINE_UNQUOTED(_REENT_CHECK_VERIFY) +fi + if test "${newlib_io_c99_formats}" = "yes"; then AC_DEFINE_UNQUOTED(_WANT_IO_C99_FORMATS) fi diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h index 7f8124deb..74b70e9c0 100644 --- a/newlib/libc/include/sys/reent.h +++ b/newlib/libc/include/sys/reent.h @@ -498,10 +498,10 @@ extern const struct __sFILE_fake __sf_fake_stderr; #endif /* _REENT_GLOBAL_STDIO_STREAMS */ -/* Only add assert() calls if we are specified to debug. */ -#ifdef _REENT_CHECK_DEBUG +/* Specify how to handle reent_check malloc failures. */ +#ifdef _REENT_CHECK_VERIFY #include -#define __reent_assert(x) assert(x) +#define __reent_assert(x) ((x) ? (void)0 : __assert_func(__FILE__, __LINE__, (char *)0, "REENT malloc succeeded")) #else #define __reent_assert(x) ((void)0) #endif diff --git a/newlib/newlib.hin b/newlib/newlib.hin index 18306f293..416d0c629 100644 --- a/newlib/newlib.hin +++ b/newlib/newlib.hin @@ -32,6 +32,9 @@ very restricted storage. */ #undef _WANT_REENT_SMALL +/* Verify _REENT_CHECK macros allocate memory successfully. */ +#undef _REENT_CHECK_VERIFY + /* Multibyte supported */ #undef _MB_CAPABLE From acc8849f844f2dbc41ef8da9687bbe1c1d5b3bdc Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Mon, 7 Oct 2019 10:22:58 -0600 Subject: [PATCH 061/520] fhandler_proc.cc(format_proc_cpuinfo): fix cache size Fix cache size return code handling and make AMD/Intel code common. --- winsup/cygwin/fhandler_proc.cc | 45 ++++++++++++++-------------------- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 48476beb8..13cc36858 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -744,6 +744,8 @@ format_proc_cpuinfo (void *, char *&destbuf) int cache_size = -1, clflush = 64, cache_alignment = 64; + long (*get_cpu_cache) (int, uint32_t) = NULL; + uint32_t max; if (features1 & (1 << 19)) /* CLFSH */ clflush = ((extra_info >> 8) & 0xff) << 3; if (is_intel && family == 15) @@ -751,45 +753,34 @@ format_proc_cpuinfo (void *, char *&destbuf) if (is_intel) { extern long get_cpu_cache_intel (int sysc, uint32_t maxf); - long cs; - - cs = get_cpu_cache_intel (_SC_LEVEL3_CACHE_SIZE, maxf); - if (cs == -1) - cs = get_cpu_cache_intel (_SC_LEVEL2_CACHE_SIZE, maxf); - if (cs == -1) - { - cs = get_cpu_cache_intel (_SC_LEVEL1_ICACHE_SIZE, maxf); - if (cs != -1) - cache_size = cs; - cs = get_cpu_cache_intel (_SC_LEVEL1_DCACHE_SIZE, maxf); - if (cs != -1) - cache_size += cs; - } - else - cache_size = cs; - if (cache_size != -1) - cache_size >>= 10; + get_cpu_cache = get_cpu_cache_intel; + max = maxf; /* Intel uses normal cpuid levels */ } else if (is_amd) { extern long get_cpu_cache_amd (int sysc, uint32_t maxe); + get_cpu_cache = get_cpu_cache_amd; + max = maxe; /* AMD uses extended cpuid levels */ + } + if (get_cpu_cache) + { long cs; - cs = get_cpu_cache_amd (_SC_LEVEL3_CACHE_SIZE, maxe); - if (cs == -1) - cs = get_cpu_cache_amd (_SC_LEVEL2_CACHE_SIZE, maxe); - if (cs == -1) + cs = get_cpu_cache (_SC_LEVEL3_CACHE_SIZE, max); + if (cs <= 0) + cs = get_cpu_cache (_SC_LEVEL2_CACHE_SIZE, max); + if (cs <= 0) { - cs = get_cpu_cache_amd (_SC_LEVEL1_ICACHE_SIZE, maxe); - if (cs != -1) + cs = get_cpu_cache (_SC_LEVEL1_ICACHE_SIZE, max); + if (cs > 0) cache_size = cs; - cs = get_cpu_cache_amd (_SC_LEVEL1_DCACHE_SIZE, maxe); - if (cs != -1) + cs = get_cpu_cache (_SC_LEVEL1_DCACHE_SIZE, max); + if (cs > 0) cache_size += cs; } else cache_size = cs; - if (cache_size != -1) + if (cache_size > 0) cache_size >>= 10; } bufptr += __small_sprintf (bufptr, "cpu family\t: %d\n" From 74aa6e3cdb167bdbfa02d5781e9efb154a15bcdb Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Mon, 7 Oct 2019 10:22:59 -0600 Subject: [PATCH 062/520] fhandler_proc.cc(format_proc_cpuinfo): fix cpuid level count Fix cpuid level count as number of non-zero leafs excluding sub-leafs. --- winsup/cygwin/fhandler_proc.cc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 13cc36858..78518baf9 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -927,13 +927,30 @@ format_proc_cpuinfo (void *, char *&destbuf) } + /* level is number of non-zero leafs exc. sub-leafs */ + int level = maxf + 1 + (maxe & 0x7fffffff) + 1; + + for (uint32_t l = maxe; 0x80000001 < l; --l) + { + uint32_t a, b, c, d; + cpuid (&a, &b, &c, &d, l); + if (!(a | b | c | d)) --level; + } + + for (uint32_t l = maxf; 1 < l; --l) + { + uint32_t a, b, c, d; + cpuid (&a, &b, &c, &d, l); + if (!(a | b | c | d)) --level; + } + bufptr += __small_sprintf (bufptr, "fpu\t\t: %s\n" "fpu_exception\t: %s\n" "cpuid level\t: %d\n" "wp\t\t: yes\n", (features1 & (1 << 0)) ? "yes" : "no", (features1 & (1 << 0)) ? "yes" : "no", - maxf); + level); print ("flags\t\t:"); if (features1 & (1 << 0)) print (" fpu"); From 7a0496f78f60d43cf9545a794cbf8c00d7bb8e02 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Mon, 7 Oct 2019 10:23:00 -0600 Subject: [PATCH 063/520] fhandler_proc.cc(format_proc_cpuinfo): fix AMD physical cores count Fix AMD physical cores count documented as core_info low byte + 1. --- winsup/cygwin/fhandler_proc.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 78518baf9..c94cde910 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -885,11 +885,10 @@ format_proc_cpuinfo (void *, char *&destbuf) cpuid (&unused, &unused, &core_info, &unused, 0x80000008); cpuid (&unused, &cus, &unused, &unused, 0x8000001e); - siblings = (core_info & 0xff) + 1; + siblings = cpu_cores = (core_info & 0xff) + 1; logical_bits = (core_info >> 12) & 0xf; cus = ((cus >> 8) & 0x3) + 1; ht_bits = mask_bits (cus); - cpu_cores = siblings >> ht_bits; } else if (maxe >= 0x80000008) { From 70e834ea7c970dd9bf98167e0cf7d4d7c643a225 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Mon, 7 Oct 2019 10:23:01 -0600 Subject: [PATCH 064/520] fhandler_proc.cc(format_proc_cpuinfo): round cpu MHz Round cpu MHz to correct Windows and match Linux cpuinfo. --- winsup/cygwin/fhandler_proc.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index c94cde910..86c1f6253 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -695,6 +695,7 @@ format_proc_cpuinfo (void *, char *&destbuf) RtlQueryRegistryValues (RTL_REGISTRY_ABSOLUTE, cpu_key, tab, NULL, NULL); + cpu_mhz = ((cpu_mhz - 1) / 10 + 1) * 10; /* round up to multiple of 10 */ bufptr += __small_sprintf (bufptr, "processor\t: %d\n", cpu_number); uint32_t maxf, vendor_id[4], unused; From 9682c25bb32df1428e4469b457034e87f199a3c8 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Mon, 7 Oct 2019 10:23:02 -0600 Subject: [PATCH 065/520] fhandler_proc.cc(format_proc_cpuinfo): add bogomips Add bogomips which has been cpu MHz*2 since Pentium MMX. --- winsup/cygwin/fhandler_proc.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 86c1f6253..8c290d2ff 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -696,6 +696,7 @@ format_proc_cpuinfo (void *, char *&destbuf) RtlQueryRegistryValues (RTL_REGISTRY_ABSOLUTE, cpu_key, tab, NULL, NULL); cpu_mhz = ((cpu_mhz - 1) / 10 + 1) * 10; /* round up to multiple of 10 */ + DWORD bogomips = cpu_mhz * 2; /* bogomips is double cpu MHz since MMX */ bufptr += __small_sprintf (bufptr, "processor\t: %d\n", cpu_number); uint32_t maxf, vendor_id[4], unused; @@ -1228,7 +1229,8 @@ format_proc_cpuinfo (void *, char *&destbuf) print ("\n"); - /* TODO: bogomips */ + bufptr += __small_sprintf (bufptr, "bogomips\t: %d.00\n", + bogomips); bufptr += __small_sprintf (bufptr, "clflush size\t: %d\n" "cache_alignment\t: %d\n", From b8ccc22762285dac75261d2beae778e6c460ce71 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Mon, 7 Oct 2019 10:23:03 -0600 Subject: [PATCH 066/520] fhandler_proc.cc(format_proc_cpuinfo): add microcode Add microcode from Windows registry Update Revision REG_BINARY. --- winsup/cygwin/fhandler_proc.cc | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 8c290d2ff..51bbdc43f 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -687,16 +687,30 @@ format_proc_cpuinfo (void *, char *&destbuf) yield (); DWORD cpu_mhz = 0; - RTL_QUERY_REGISTRY_TABLE tab[2] = { - { NULL, RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOSTRING, - L"~Mhz", &cpu_mhz, REG_NONE, NULL, 0 }, - { NULL, 0, NULL, NULL, 0, NULL, 0 } - }; + union + { + LONG uc_len; /* -max size of buffer before call */ + char uc_microcode[16]; + } uc; + RTL_QUERY_REGISTRY_TABLE tab[3] = + { + { NULL, RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOSTRING, + L"~Mhz", &cpu_mhz, REG_NONE, NULL, 0 }, + { NULL, RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOSTRING, + L"Update Revision", &uc, REG_NONE, NULL, 0 }, + { NULL, 0, NULL, NULL, 0, NULL, 0 } + }; + + memset (&uc, 0, sizeof (uc.uc_microcode)); + uc.uc_len = -16; /* -max size of microcode buffer */ RtlQueryRegistryValues (RTL_REGISTRY_ABSOLUTE, cpu_key, tab, NULL, NULL); cpu_mhz = ((cpu_mhz - 1) / 10 + 1) * 10; /* round up to multiple of 10 */ DWORD bogomips = cpu_mhz * 2; /* bogomips is double cpu MHz since MMX */ + long long microcode = 0; /* at least 8 bytes for AMD */ + memcpy (µcode, &uc, sizeof (microcode)); + bufptr += __small_sprintf (bufptr, "processor\t: %d\n", cpu_number); uint32_t maxf, vendor_id[4], unused; @@ -789,11 +803,13 @@ format_proc_cpuinfo (void *, char *&destbuf) "model\t\t: %d\n" "model name\t: %s\n" "stepping\t: %d\n" + "microcode\t: 0x%x\n" "cpu MHz\t\t: %d.000\n", family, model, in_buf.s + strspn (in_buf.s, " "), stepping, + microcode, cpu_mhz); if (cache_size >= 0) From 08d1ae0543bc56312bcf5c6183a709b7b271c3e3 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Mon, 7 Oct 2019 10:23:04 -0600 Subject: [PATCH 067/520] fhandler_proc.cc(format_proc_cpuinfo): use feature test print macro Add feature test print macro that makes feature, bit, and flag text comparison and checking easier. Handle as common former Intel only feature flags also supported on AMD. Change order and some flag names to agree with current Linux. --- winsup/cygwin/fhandler_proc.cc | 415 ++++++++++++--------------------- 1 file changed, 150 insertions(+), 265 deletions(-) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 51bbdc43f..fbcec38df 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -609,6 +609,8 @@ format_proc_stat (void *, char *&destbuf) } #define print(x) { bufptr = stpcpy (bufptr, (x)); } +/* feature test bit position (0-32) and conditional print */ +#define ftcprint(feat,bitno,msg) if ((feat) & (1 << (bitno))) { print (" " msg); } static inline uint32_t get_msb (uint32_t in) @@ -969,278 +971,170 @@ format_proc_cpuinfo (void *, char *&destbuf) (features1 & (1 << 0)) ? "yes" : "no", level); print ("flags\t\t:"); - if (features1 & (1 << 0)) - print (" fpu"); - if (features1 & (1 << 1)) - print (" vme"); - if (features1 & (1 << 2)) - print (" de"); - if (features1 & (1 << 3)) - print (" pse"); - if (features1 & (1 << 4)) - print (" tsc"); - if (features1 & (1 << 5)) - print (" msr"); - if (features1 & (1 << 6)) - print (" pae"); - if (features1 & (1 << 7)) - print (" mce"); - if (features1 & (1 << 8)) - print (" cx8"); - if (features1 & (1 << 9)) - print (" apic"); - if (features1 & (1 << 11)) - print (" sep"); - if (features1 & (1 << 12)) - print (" mtrr"); - if (features1 & (1 << 13)) - print (" pge"); - if (features1 & (1 << 14)) - print (" mca"); - if (features1 & (1 << 15)) - print (" cmov"); - if (features1 & (1 << 16)) - print (" pat"); - if (features1 & (1 << 17)) - print (" pse36"); - if (features1 & (1 << 18)) - print (" pn"); - if (features1 & (1 << 19)) - print (" clflush"); - if (is_intel && features1 & (1 << 21)) - print (" dts"); - if (is_intel && features1 & (1 << 22)) - print (" acpi"); - if (features1 & (1 << 23)) - print (" mmx"); - if (features1 & (1 << 24)) - print (" fxsr"); - if (features1 & (1 << 25)) - print (" sse"); - if (features1 & (1 << 26)) - print (" sse2"); - if (is_intel && (features1 & (1 << 27))) - print (" ss"); - if (features1 & (1 << 28)) - print (" ht"); - if (is_intel) - { - if (features1 & (1 << 29)) - print (" tm"); - if (features1 & (1 << 30)) - print (" ia64"); - if (features1 & (1 << 31)) - print (" pbe"); - } + /* cpuid 0x00000001 edx */ + ftcprint (features1, 0, "fpu"); /* x87 floating point */ + ftcprint (features1, 1, "vme"); /* VM enhancements */ + ftcprint (features1, 2, "de"); /* debugging extensions */ + ftcprint (features1, 3, "pse"); /* page size extensions */ + ftcprint (features1, 4, "tsc"); /* rdtsc/p */ + ftcprint (features1, 5, "msr"); /* rd/wrmsr */ + ftcprint (features1, 6, "pae"); /* phy addr extensions */ + ftcprint (features1, 7, "mce"); /* Machine check exception */ + ftcprint (features1, 8, "cx8"); /* cmpxchg8b */ + ftcprint (features1, 9, "apic"); /* APIC enabled */ + ftcprint (features1, 11, "sep"); /* sysenter/sysexit */ + ftcprint (features1, 12, "mtrr"); /* memory type range registers */ + ftcprint (features1, 13, "pge"); /* page global extension */ + ftcprint (features1, 14, "mca"); /* machine check architecture */ + ftcprint (features1, 15, "cmov"); /* conditional move */ + ftcprint (features1, 16, "pat"); /* page attribute table */ + ftcprint (features1, 17, "pse36");/* 36 bit page size extensions */ + ftcprint (features1, 18, "pn"); /* processor serial number */ + ftcprint (features1, 19, "clflush"); /* clflush instruction */ + ftcprint (features1, 21, "dts"); /* debug store */ + ftcprint (features1, 22, "acpi"); /* ACPI via MSR */ + ftcprint (features1, 23, "mmx"); /* multimedia extensions */ + ftcprint (features1, 24, "fxsr"); /* fxsave/fxrstor */ + ftcprint (features1, 25, "sse"); /* xmm */ + ftcprint (features1, 26, "sse2"); /* xmm2 */ + ftcprint (features1, 27, "ss"); /* CPU self snoop */ + ftcprint (features1, 28, "ht"); /* hyper threading */ + ftcprint (features1, 29, "tm"); /* acc automatic clock control */ + ftcprint (features1, 30, "ia64"); /* IA 64 processor */ + ftcprint (features1, 31, "pbe"); /* pending break enable */ + /* AMD cpuid 0x80000001 edx */ if (is_amd && maxe >= 0x80000001) { cpuid (&unused, &unused, &unused, &features1, 0x80000001); - if (features1 & (1 << 11)) - print (" syscall"); - if (features1 & (1 << 19)) /* Huh? Not in AMD64 specs. */ - print (" mp"); - if (features1 & (1 << 20)) - print (" nx"); - if (features1 & (1 << 22)) - print (" mmxext"); - if (features1 & (1 << 25)) - print (" fxsr_opt"); - if (features1 & (1 << 26)) - print (" pdpe1gb"); - if (features1 & (1 << 27)) - print (" rdtscp"); - if (features1 & (1 << 29)) - print (" lm"); - if (features1 & (1 << 30)) /* 31th bit is on. */ - print (" 3dnowext"); - if (features1 & (1 << 31)) /* 32th bit (highest) is on. */ - print (" 3dnow"); + ftcprint (features1, 11, "syscall"); /* syscall/sysret */ + ftcprint (features1, 19, "mp"); /* MP capable */ + ftcprint (features1, 20, "nx"); /* no-execute protection */ + ftcprint (features1, 22, "mmxext"); /* MMX extensions */ + ftcprint (features1, 25, "fxsr_opt"); /* fxsave/fxrstor optims */ + ftcprint (features1, 26, "pdpe1gb"); /* GB large pages */ + ftcprint (features1, 27, "rdtscp"); /* rdtscp */ + ftcprint (features1, 29, "lm"); /* long mode (x86 64) */ + ftcprint (features1, 30, "3dnowext"); /* 3DNow extensions */ + ftcprint (features1, 31, "3dnow"); /* 3DNow */ } - if (features2 & (1 << 0)) - print (" pni"); - if (is_intel) - { - if (features2 & (1 << 2)) - print (" dtes64"); - if (features2 & (1 << 3)) - print (" monitor"); - if (features2 & (1 << 4)) - print (" ds_cpl"); - if (features2 & (1 << 5)) - print (" vmx"); - if (features2 & (1 << 6)) - print (" smx"); - if (features2 & (1 << 7)) - print (" est"); - if (features2 & (1 << 8)) - print (" tm2"); - if (features2 & (1 << 9)) - print (" ssse3"); - if (features2 & (1 << 10)) - print (" cid"); - if (features2 & (1 << 12)) - print (" fma"); - } - if (features2 & (1 << 13)) - print (" cx16"); - if (is_intel) - { - if (features2 & (1 << 14)) - print (" xtpr"); - if (features2 & (1 << 15)) - print (" pdcm"); - if (features2 & (1 << 18)) - print (" dca"); - if (features2 & (1 << 19)) - print (" sse4_1"); - if (features2 & (1 << 20)) - print (" sse4_2"); - if (features2 & (1 << 21)) - print (" x2apic"); - if (features2 & (1 << 22)) - print (" movbe"); - if (features2 & (1 << 23)) - print (" popcnt"); - if (features2 & (1 << 25)) - print (" aes"); - if (features2 & (1 << 26)) - print (" xsave"); - if (features2 & (1 << 27)) - print (" osxsave"); - if (features2 & (1 << 28)) - print (" avx"); - if (features2 & (1 << 29)) - print (" f16c"); - if (features2 & (1 << 30)) - print (" rdrand"); - if (features2 & (1 << 31)) - print (" hypervisor"); - } + /* cpuid 0x00000001 ecx */ + ftcprint (features2, 0, "pni"); /* xmm3 sse3 */ + ftcprint (features2, 1, "pclmuldq"); /* pclmulqdq instruction */ + ftcprint (features2, 2, "dtes64"); /* 64-bit debug store */ + ftcprint (features2, 3, "monitor"); /* monitor/mwait support */ + ftcprint (features2, 4, "ds_cpl"); /* CPL-qual debug store */ + ftcprint (features2, 5, "vmx"); /* hardware virtualization */ + ftcprint (features2, 6, "smx"); /* safer mode extensions */ + ftcprint (features2, 7, "est"); /* enhanced speedstep */ + ftcprint (features2, 8, "tm2"); /* thermal monitor 2 */ + ftcprint (features2, 9, "ssse3"); /* supplemental sse3 */ + ftcprint (features2, 10, "cid"); /* context id */ + ftcprint (features2, 11, "sdbg"); /* silicon debug */ + ftcprint (features2, 12, "fma"); /* fused multiply add */ + ftcprint (features2, 13, "cx16"); /* cmpxchg16b instruction */ + ftcprint (features2, 14, "xtpr"); /* send task priority messages */ + ftcprint (features2, 15, "pdcm"); /* perf/debug capabilities MSR */ + ftcprint (features2, 17, "pcid"); /* process context identifiers */ + ftcprint (features2, 18, "dca"); /* direct cache access */ + ftcprint (features2, 19, "sse4_1"); /* xmm 4_1 sse 4.1 */ + ftcprint (features2, 20, "sse4_2"); /* xmm 4_2 sse 4.2 */ + ftcprint (features2, 21, "x2apic"); /* x2 APIC */ + ftcprint (features2, 22, "movbe"); /* movbe instruction */ + ftcprint (features2, 23, "popcnt"); /* popcnt instruction */ + ftcprint (features2, 25, "aes"); /* AES instructions */ + ftcprint (features2, 26, "xsave"); /* xsave/xrstor/xsetbv/xgetbv */ + ftcprint (features2, 27, "osxsave"); /* not output on Linux */ + ftcprint (features2, 28, "avx"); /* advanced vector extensions */ + ftcprint (features2, 29, "f16c"); /* 16 bit FP conversions */ + ftcprint (features2, 30, "rdrand"); /* RNG rdrand instruction */ + ftcprint (features2, 31, "hypervisor"); /* hypervisor guest */ + /* cpuid 0x80000001 ecx */ if (maxe >= 0x80000001) { cpuid (&unused, &unused, &features1, &unused, 0x80000001); - if (features1 & (1 << 0)) - print (" lahf_lm"); - if (features1 & (1 << 1)) - print (" cmp_legacy"); + ftcprint (features1, 0, "lahf_lm"); /* l/sahf long mode */ + ftcprint (features1, 1, "cmp_legacy"); /* HT not valid */ if (is_amd) { - if (features1 & (1 << 2)) - print (" svm"); - if (features1 & (1 << 3)) - print (" extapic"); - if (features1 & (1 << 4)) - print (" cr8_legacy"); - if (features1 & (1 << 5)) - print (" abm"); - if (features1 & (1 << 6)) - print (" sse4a"); - if (features1 & (1 << 7)) - print (" misalignsse"); - if (features1 & (1 << 8)) - print (" 3dnowprefetch"); - if (features1 & (1 << 9)) - print (" osvw"); + ftcprint (features1, 2, "svm"); /* secure VM */ + ftcprint (features1, 3, "extapic"); /* ext APIC space */ + ftcprint (features1, 4, "cr8_legacy"); /* CR8 32 bit mode */ + ftcprint (features1, 5, "abm"); /* adv bit manip lzcnt */ + ftcprint (features1, 6, "sse4a"); /* sse 4a */ + ftcprint (features1, 7, "misalignsse"); /* misaligned SSE ok */ + ftcprint (features1, 8, "3dnowprefetch"); /* 3DNow prefetch */ + ftcprint (features1, 9, "osvw"); /* OS vis workaround */ } - if (features1 & (1 << 10)) - print (" ibs"); + ftcprint (features1, 10, "ibs"); /* instr based sampling */ if (is_amd) { - if (features1 & (1 << 11)) - print (" sse5"); - if (features1 & (1 << 12)) - print (" skinit"); - if (features1 & (1 << 13)) - print (" wdt"); - if (features1 & (1 << 15)) - print (" lwp"); - if (features1 & (1 << 16)) - print (" fma4"); - if (features1 & (1 << 17)) - print (" tce"); - if (features1 & (1 << 19)) - print (" nodeid_msr"); - if (features1 & (1 << 21)) - print (" tbm"); - if (features1 & (1 << 22)) - print (" topoext"); - if (features1 & (1 << 23)) - print (" perfctr_core"); - if (features1 & (1 << 24)) - print (" perfctr_nb"); - if (features1 & (1 << 28)) - print (" perfctr_l2"); + ftcprint (features1, 11, "xop"); /* sse 5 extended AVX */ + ftcprint (features1, 12, "skinit"); /* skinit/stgi */ + ftcprint (features1, 13, "wdt"); /* watchdog timer */ + ftcprint (features1, 15, "lwp"); /* light weight prof */ + ftcprint (features1, 16, "fma4"); /* 4 operand MAC */ + ftcprint (features1, 17, "tce"); /* translat cache ext */ + ftcprint (features1, 19, "nodeid_msr"); /* nodeid MSR */ + ftcprint (features1, 21, "tbm"); /* trailing bit manip */ + ftcprint (features1, 22, "topoext"); /* topology ext */ + ftcprint (features1, 23, "perfctr_core"); /* core perf ctr ext */ + ftcprint (features1, 24, "perfctr_nb"); /* NB perf ctr ext */ + ftcprint (features1, 28, "perfctr_llc"); /* ll cache perf ctr */ + ftcprint (features1, 29, "mwaitx"); /* monitor/mwaitx ext */ } } - if (is_intel) /* features scattered in various CPUID levels. */ + + /* features scattered in various CPUID levels. */ + /* thermal & power cpuid 0x00000006 eax ecx */ + if (maxf >= 0x06) { cpuid (&features1, &unused, &features2, &unused, 0x06); - if (features1 & (1 << 1)) - print (" ida"); - if (features1 & (1 << 2)) - print (" arat"); - if (features2 & (1 << 3)) - print (" epb"); + ftcprint (features2, 3, "epb"); /* energy perf bias */ - cpuid (&features2, &unused, &unused, &unused, 0x0d, 1); - if (features2 & (1 << 0)) - print (" xsaveopt"); - - if (features1 & (1 << 4)) - print (" pln"); - if (features1 & (1 << 6)) - print (" pts"); - if (features1 & (1 << 0)) - print (" dtherm"); + ftcprint (features1, 0, "dtherm"); /* digital thermal sensor */ + ftcprint (features1, 1, "ida"); /* Intel dynamic acceleration */ + ftcprint (features1, 2, "arat"); /* always running APIC timer */ + ftcprint (features1, 4, "pln"); /* power limit notification */ + ftcprint (features1, 6, "pts"); /* package thermal status */ } - if (is_intel) /* Extended feature flags */ + /* cpuid 0x00000007 ebx */ + if (maxf >= 0x07) { cpuid (&unused, &features1, &unused, &unused, 0x07, 0); - if (features1 & (1 << 0)) - print (" fsgsbase"); - if (features1 & (1 << 1)) - print (" tsc_adjust"); - if (features1 & (1 << 3)) - print (" bmi1"); - if (features1 & (1 << 4)) - print (" hle"); - if (features1 & (1 << 5)) - print (" avx2"); - if (features1 & (1 << 7)) - print (" smep"); - if (features1 & (1 << 8)) - print (" bmi2"); - if (features1 & (1 << 9)) - print (" erms"); - if (features1 & (1 << 10)) - print (" invpcid"); - if (features1 & (1 << 11)) - print (" rtm"); - if (features1 & (1 << 14)) - print (" mpx"); - if (features1 & (1 << 16)) - print (" avx512f"); - if (features1 & (1 << 18)) - print (" rdseed"); - if (features1 & (1 << 19)) - print (" adx"); - if (features1 & (1 << 20)) - print (" smap"); - if (features1 & (1 << 23)) - print (" clflushopt"); - if (features1 & (1 << 26)) - print (" avx512pf"); - if (features1 & (1 << 27)) - print (" avx512er"); - if (features1 & (1 << 28)) - print (" avx512cd"); + ftcprint (features1, 0, "fsgsbase"); /* rd/wr fs/gs base */ + ftcprint (features1, 1, "tsc_adjust"); /* TSC adjustment MSR 0x3B */ + ftcprint (features1, 3, "bmi1"); /* bit manip ext group 1 */ + ftcprint (features1, 4, "hle"); /* hardware lock elision */ + ftcprint (features1, 5, "avx2"); /* AVX ext instructions */ + ftcprint (features1, 7, "smep"); /* super mode exec prot */ + ftcprint (features1, 8, "bmi2"); /* bit manip ext group 2 */ + ftcprint (features1, 9, "erms"); /* enh rep movsb/stosb */ + ftcprint (features1, 10, "invpcid"); /* inv proc context id */ + ftcprint (features1, 11, "rtm"); /* restricted txnal mem */ + ftcprint (features1, 14, "mpx"); /* mem prot ext */ + ftcprint (features1, 16, "avx512f"); /* vec foundation */ + ftcprint (features1, 18, "rdseed"); /* RNG rdseed instruction */ + ftcprint (features1, 19, "adx"); /* adcx/adox */ + ftcprint (features1, 20, "smap"); /* sec mode access prev */ + ftcprint (features1, 23, "clflushopt"); /* cache line flush opt */ + ftcprint (features1, 26, "avx512pf"); /* vec prefetch */ + ftcprint (features1, 27, "avx512er"); /* vec exp/recip aprx */ + ftcprint (features1, 28, "avx512cd"); /* vec conflict detect */ + } + + /* cpuid 0x0000000d:1 eax */ + if (maxf >= 0x0d) + { + cpuid (&features1, &unused, &unused, &unused, 0x0d, 1); + + ftcprint (features1, 0, "xsaveopt"); /* xsaveopt instruction */ } print ("\n"); @@ -1269,31 +1163,22 @@ format_proc_cpuinfo (void *, char *&destbuf) phys, virt); } + /* cpuid 0x80000007 edx */ if (maxe >= 0x80000007) /* Advanced power management. */ { cpuid (&unused, &unused, &unused, &features1, 0x80000007); print ("power management:"); - if (features1 & (1 << 0)) - print (" ts"); - if (features1 & (1 << 1)) - print (" fid"); - if (features1 & (1 << 2)) - print (" vid"); - if (features1 & (1 << 3)) - print (" ttp"); - if (features1 & (1 << 4)) - print (" tm"); - if (features1 & (1 << 5)) - print (" stc"); - if (features1 & (1 << 6)) - print (" 100mhzsteps"); - if (features1 & (1 << 7)) - print (" hwpstate"); - if (features1 & (1 << 9)) - print (" cpb"); - if (features1 & (1 << 10)) - print (" eff_freq_ro"); + ftcprint (features1, 0, "ts"); /* temperature sensor */ + ftcprint (features1, 1, "fid"); /* frequency id control */ + ftcprint (features1, 2, "vid"); /* voltage id control */ + ftcprint (features1, 3, "ttp"); /* thermal trip */ + ftcprint (features1, 4, "tm"); /* hw thermal control */ + ftcprint (features1, 5, "stc"); /* sw thermal control */ + ftcprint (features1, 6, "100mhzsteps"); /* 100 MHz mult control */ + ftcprint (features1, 7, "hwpstate"); /* hw P state control */ + ftcprint (features1, 9, "cpb"); /* core performance boost */ + ftcprint (features1, 10, "eff_freq_ro"); /* ro eff freq interface */ } if (orig_affinity_mask != 0) From f723e3caaedd462a13190c000b1be6c3c31e60c2 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Mon, 7 Oct 2019 10:23:05 -0600 Subject: [PATCH 068/520] fhandler_proc.cc(format_proc_cpuinfo): add feature flags Add 99 feature flags including AVX512 extensions, AES, SHA with 20 cpuid calls. --- winsup/cygwin/fhandler_proc.cc | 240 +++++++++++++++++++++++++++++++-- 1 file changed, 230 insertions(+), 10 deletions(-) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index fbcec38df..13338230d 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -1019,6 +1019,21 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features1, 30, "3dnowext"); /* 3DNow extensions */ ftcprint (features1, 31, "3dnow"); /* 3DNow */ } + /* AMD cpuid 0x80000007 edx */ + if (is_amd && maxe >= 0x80000007) + { + cpuid (&unused, &unused, &unused, &features1, 0x80000007); + + ftcprint (features1, 8, "constant_tsc"); /* TSC constant rate */ + ftcprint (features1, 8, "nonstop_tsc"); /* nonstop C states */ + } + /* cpuid 0x00000006 ecx */ + if (maxf >= 0x06) + { + cpuid (&unused, &unused, &features1, &unused, 0x06); + + ftcprint (features1, 0, "aperfmperf"); /* P state hw coord fb */ + } /* cpuid 0x00000001 ecx */ ftcprint (features2, 0, "pni"); /* xmm3 sse3 */ @@ -1044,6 +1059,7 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features2, 21, "x2apic"); /* x2 APIC */ ftcprint (features2, 22, "movbe"); /* movbe instruction */ ftcprint (features2, 23, "popcnt"); /* popcnt instruction */ + ftcprint (features2, 24, "tsc_deadline_timer"); /* TSC deadline timer */ ftcprint (features2, 25, "aes"); /* AES instructions */ ftcprint (features2, 26, "xsave"); /* xsave/xrstor/xsetbv/xgetbv */ ftcprint (features2, 27, "osxsave"); /* not output on Linux */ @@ -1084,25 +1100,83 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features1, 22, "topoext"); /* topology ext */ ftcprint (features1, 23, "perfctr_core"); /* core perf ctr ext */ ftcprint (features1, 24, "perfctr_nb"); /* NB perf ctr ext */ + ftcprint (features1, 26, "bpext"); /* data brkpt ext */ + ftcprint (features1, 27, "ptsc"); /* perf timestamp ctr */ ftcprint (features1, 28, "perfctr_llc"); /* ll cache perf ctr */ ftcprint (features1, 29, "mwaitx"); /* monitor/mwaitx ext */ } } /* features scattered in various CPUID levels. */ - /* thermal & power cpuid 0x00000006 eax ecx */ + /* cpuid 0x80000007 edx */ + if (maxf >= 0x07) + { + cpuid (&unused, &unused, &unused, &features1, 0x80000007); + + ftcprint (features1, 9, "cpb"); /* core performance boost */ + } + /* cpuid 0x00000006 ecx */ if (maxf >= 0x06) { - cpuid (&features1, &unused, &features2, &unused, 0x06); + cpuid (&unused, &unused, &features1, &unused, 0x06); - ftcprint (features2, 3, "epb"); /* energy perf bias */ - - ftcprint (features1, 0, "dtherm"); /* digital thermal sensor */ - ftcprint (features1, 1, "ida"); /* Intel dynamic acceleration */ - ftcprint (features1, 2, "arat"); /* always running APIC timer */ - ftcprint (features1, 4, "pln"); /* power limit notification */ - ftcprint (features1, 6, "pts"); /* package thermal status */ + ftcprint (features1, 3, "epb"); /* energy perf bias */ } + /* cpuid 0x00000010 ebx */ + if (maxf >= 0x10) + { + cpuid (&unused, &features1, &unused, &unused, 0x10); + + ftcprint (features1, 1, "cat_l3"); /* cache alloc tech l3 */ + ftcprint (features1, 2, "cat_l2"); /* cache alloc tech l2 */ + + /* cpuid 0x00000010:1 ecx */ + cpuid (&unused, &unused, &features1, &unused, 0x10, 1); + + ftcprint (features1, 2, "cdp_l3"); /* code data prior l3 */ + } + /* cpuid 0x80000007 edx */ + if (maxe >= 0x80000007) + { + cpuid (&unused, &unused, &unused, &features1, 0x80000007); + + ftcprint (features1, 7, "hw_pstate"); /* hw P state */ + ftcprint (features1, 11, "proc_feedback"); /* proc feedback interf */ + } + /* cpuid 0x8000001f eax */ + if (maxe >= 0x8000001f) + { + cpuid (&features1, &unused, &unused, &unused, 0x8000001f); + + ftcprint (features1, 0, "sme"); /* secure memory encryption */ + } + /* cpuid 0x00000010:2 ecx */ + if (maxf >= 0x10) + { + cpuid (&unused, &unused, &features1, &unused, 0x10, 2); + + ftcprint (features1, 2, "cdp_l2"); /* code data prior l2 */ + + /* cpuid 0x00000010 ebx */ + cpuid (&unused, &features1, &unused, &unused, 0x10); + + ftcprint (features1, 3, "mba"); /* memory bandwidth alloc */ + } + /* cpuid 0x80000008 ebx */ + if (maxe >= 0x80000008) + { + cpuid (&unused, &features1, &unused, &unused, 0x80000008); + + ftcprint (features1, 6, "mba"); /* memory bandwidth alloc */ + } + /* cpuid 0x8000001f eax */ + if (maxe >= 0x8000001f) + { + cpuid (&features1, &unused, &unused, &unused, 0x8000001f); + + ftcprint (features1, 1, "sev"); /* secure encrypted virt */ + } + /* cpuid 0x00000007 ebx */ if (maxf >= 0x07) { @@ -1113,29 +1187,170 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features1, 3, "bmi1"); /* bit manip ext group 1 */ ftcprint (features1, 4, "hle"); /* hardware lock elision */ ftcprint (features1, 5, "avx2"); /* AVX ext instructions */ + ftcprint (features1, 6, "fpdx"); /* FP data ptr upd on exc */ ftcprint (features1, 7, "smep"); /* super mode exec prot */ ftcprint (features1, 8, "bmi2"); /* bit manip ext group 2 */ ftcprint (features1, 9, "erms"); /* enh rep movsb/stosb */ ftcprint (features1, 10, "invpcid"); /* inv proc context id */ ftcprint (features1, 11, "rtm"); /* restricted txnal mem */ + ftcprint (features1, 12, "cqm"); /* cache QoS monitoring */ + ftcprint (features1, 13, "fpcsdsz"); /* zero FP cs/ds */ ftcprint (features1, 14, "mpx"); /* mem prot ext */ + ftcprint (features1, 15, "rdt_a"); /* rsrc dir tech alloc */ ftcprint (features1, 16, "avx512f"); /* vec foundation */ + ftcprint (features1, 17, "avx512dq"); /* vec dq granular */ ftcprint (features1, 18, "rdseed"); /* RNG rdseed instruction */ ftcprint (features1, 19, "adx"); /* adcx/adox */ ftcprint (features1, 20, "smap"); /* sec mode access prev */ + ftcprint (features1, 21, "avx512ifma"); /* vec int FMA */ ftcprint (features1, 23, "clflushopt"); /* cache line flush opt */ + ftcprint (features1, 24, "clwb"); /* cache line write back */ + ftcprint (features1, 25, "intel_pt"); /* intel processor trace */ ftcprint (features1, 26, "avx512pf"); /* vec prefetch */ ftcprint (features1, 27, "avx512er"); /* vec exp/recip aprx */ ftcprint (features1, 28, "avx512cd"); /* vec conflict detect */ + ftcprint (features1, 29, "sha_ni"); /* SHA extensions */ + ftcprint (features1, 30, "avx512bw"); /* vec byte/word gran */ + ftcprint (features1, 31, "avx512vl"); /* vec vec len ext */ } - /* cpuid 0x0000000d:1 eax */ + /* more random feature flags */ + /* cpuid 0x0000000d:1 eax */ if (maxf >= 0x0d) { cpuid (&features1, &unused, &unused, &unused, 0x0d, 1); ftcprint (features1, 0, "xsaveopt"); /* xsaveopt instruction */ + ftcprint (features1, 1, "xsavec"); /* xsavec instruction */ + ftcprint (features1, 2, "xgetbv1"); /* xgetbv ecx 1 */ + ftcprint (features1, 3, "xsaves"); /* xsaves/xrstors */ } + /* cpuid 0x0000000f edx */ + if (maxf >= 0x0f) + { + cpuid (&unused, &unused, &unused, &features1, 0x0f); + + ftcprint (features1, 1, "cqm_llc"); /* llc QoS */ + + /* cpuid 0x0000000f:1 edx */ + cpuid (&unused, &unused, &unused, &features1, 0x0f, 1); + + ftcprint (features1, 0, "cqm_occup_llc"); /* llc occup monitor */ + ftcprint (features1, 1, "cqm_mbm_total"); /* llc total MBM mon */ + ftcprint (features1, 2, "cqm_mbm_local"); /* llc local MBM mon */ + } + /* cpuid 0x00000007:1 eax */ + if (maxf >= 0x07) + { + cpuid (&features1, &unused, &unused, &unused, 0x07, 1); + + ftcprint (features1, 5, "avx512_bf16"); /* vec bfloat16 short */ + } + + /* AMD cpuid 0x80000008 ebx */ + if (is_amd && maxe >= 0x80000008) + { + cpuid (&unused, &features1, &unused, &unused, 0x80000008, 0); + + ftcprint (features1, 0, "clzero"); /* clzero instruction */ + ftcprint (features1, 1, "irperf"); /* instr retired count */ + ftcprint (features1, 2, "xsaveerptr"); /* save/rest FP err ptrs */ + ftcprint (features1, 6, "mba"); /* memory BW alloc */ + ftcprint (features1, 9, "wbnoinvd"); /* wbnoinvd instruction */ + ftcprint (features1, 12, "ibpb" ); /* ind br pred barrier */ + ftcprint (features1, 14, "ibrs" ); /* ind br restricted spec */ + ftcprint (features1, 15, "stibp"); /* 1 thread ind br pred */ + ftcprint (features1, 17, "stibp_always_on"); /* stibp always on */ + ftcprint (features1, 24, "ssbd"); /* spec store byp dis */ + ftcprint (features1, 25, "virt_ssbd"); /* vir spec store byp dis */ + ftcprint (features1, 26, "ssb_no"); /* ssb fixed in hardware */ + } + + /* thermal & power cpuid 0x00000006 eax */ + if (maxf >= 0x06) + { + cpuid (&features1, &unused, &features2, &unused, 0x06); + + ftcprint (features1, 0, "dtherm"); /* digital thermal sensor */ + ftcprint (features1, 1, "ida"); /* Intel dynamic acceleration */ + ftcprint (features1, 2, "arat"); /* always running APIC timer */ + ftcprint (features1, 4, "pln"); /* power limit notification */ + ftcprint (features1, 6, "pts"); /* package thermal status */ + ftcprint (features1, 7, "hwp"); /* hardware P states */ + ftcprint (features1, 8, "hwp_notify"); /* HWP notification */ + ftcprint (features1, 9, "hwp_act_window"); /* HWP activity window */ + ftcprint (features1, 10, "hwp_epp"); /* HWP energy perf pref */ + ftcprint (features1, 11, "hwp_pkg_req"); /* HWP package level req */ + } + + /* AMD SVM cpuid 0x8000000a edx */ + if (is_amd && maxe >= 0x8000000a) + { + cpuid (&unused, &unused, &unused, &features1, 0x8000000a, 0); + + ftcprint (features1, 0, "npt"); /* nested paging */ + ftcprint (features1, 1, "lbrv"); /* lbr virtualization */ + ftcprint (features1, 2, "svm_lock"); /* SVM locking MSR */ + ftcprint (features1, 3, "nrip_save"); /* SVM next rip save */ + ftcprint (features1, 4, "tsc_scale"); /* TSC rate control */ + ftcprint (features1, 5, "vmcb_clean"); /* VMCB clean bits */ + ftcprint (features1, 6, "flushbyasid"); /* flush by ASID */ + ftcprint (features1, 7, "decode_assists"); /* decode assists */ + ftcprint (features1, 10, "pausefilter"); /* filt pause intrcpt */ + ftcprint (features1, 12, "pfthreshold"); /* pause filt thresh */ + ftcprint (features1, 13, "avic"); /* virt int control */ + ftcprint (features1, 15, "v_vmsave_vmload"); /* virt vmsave vmload */ + ftcprint (features1, 16, "vgif"); /* virt glb int flag */ + } + + /* Intel cpuid 0x00000007 ecx */ + if (is_intel && maxf >= 0x07) + { + cpuid (&unused, &unused, &features1, &unused, 0x07, 0); + + ftcprint (features1, 1, "avx512vbmi"); /* vec bit manip */ + ftcprint (features1, 2, "umip"); /* user mode ins prot */ + ftcprint (features1, 3, "pku"); /* prot key userspace */ + ftcprint (features1, 4, "ospke"); /* OS prot keys en */ + ftcprint (features1, 5, "waitpkg"); /* umon/umwait/tpause */ + ftcprint (features1, 6, "avx512_vbmi2"); /* vec bit manip 2 */ + ftcprint (features1, 8, "gfni"); /* Galois field instr */ + ftcprint (features1, 9, "vaes"); /* vector AES */ + ftcprint (features1, 10, "vpclmulqdq"); /* nc mul dbl quad */ + ftcprint (features1, 11, "avx512_vnni"); /* vec neural net */ + ftcprint (features1, 12, "avx512_bitalg"); /* vpopcnt/b/w vpshuf */ + ftcprint (features1, 13, "tme"); /* total mem encrypt */ + ftcprint (features1, 14, "avx512_vpopcntdq"); /* vec popcnt dw/qw */ + ftcprint (features1, 16, "la57"); /* 5 level paging */ + ftcprint (features1, 22, "rdpid"); /* rdpid instruction */ + ftcprint (features1, 25, "cldemote"); /* cldemote instr */ + ftcprint (features1, 27, "movdiri"); /* movdiri instr */ + ftcprint (features1, 28, "movdir64b"); /* movdir64b instr */ + } + + /* AMD MCA cpuid 0x80000007 ebx */ + if (is_amd && maxe >= 0x80000007) + { + cpuid (&unused, &features1, &unused, &unused, 0x80000007, 0); + + ftcprint (features1, 0, "overflow_recov"); /* MCA oflow recovery */ + ftcprint (features1, 1, "succor"); /* uncor err recovery */ + ftcprint (features1, 3, "smca"); /* scalable MCA */ + } + + /* Intel cpuid 0x00000007 edx */ + if (is_intel && maxf >= 0x07) + { + cpuid (&unused, &unused, &unused, &features1, 0x07, 0); + + ftcprint (features1, 2, "avx512_4vnniw"); /* vec dot prod dw */ + ftcprint (features1, 3, "avx512_4fmaps"); /* vec 4 FMA single */ + ftcprint (features1, 8, "avx512_vp2intersect"); /* vec intcpt d/q */ + ftcprint (features1, 10, "md_clear"); /* verw clear buf */ + ftcprint (features1, 18, "pconfig"); /* platform config */ + ftcprint (features1, 28, "flush_l1d"); /* flush l1d cache */ + ftcprint (features1, 29, "arch_capabilities"); /* arch cap MSR */ + } print ("\n"); @@ -1177,8 +1392,13 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features1, 5, "stc"); /* sw thermal control */ ftcprint (features1, 6, "100mhzsteps"); /* 100 MHz mult control */ ftcprint (features1, 7, "hwpstate"); /* hw P state control */ + ftcprint (features1, 8, "invariant_tsc"); /* TSC invariant */ ftcprint (features1, 9, "cpb"); /* core performance boost */ ftcprint (features1, 10, "eff_freq_ro"); /* ro eff freq interface */ + ftcprint (features1, 11, "proc_feedback"); /* proc feedback if */ + ftcprint (features1, 12, "acc_power"); /* core power reporting */ + ftcprint (features1, 13, "connstby"); /* connected standby */ + ftcprint (features1, 14, "rapl"); /* running average power limit */ } if (orig_affinity_mask != 0) From 8cf614a88bfb2c0383fca372dc401998222823a9 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Mon, 7 Oct 2019 10:23:06 -0600 Subject: [PATCH 069/520] fhandler_proc.cc(format_proc_cpuinfo): comment flags not reported Comment out flags not reported by Linux in cpuinfo, although some flags may not be used at all by Linux. --- winsup/cygwin/fhandler_proc.cc | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 13338230d..c924cf2e0 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -1062,7 +1062,7 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features2, 24, "tsc_deadline_timer"); /* TSC deadline timer */ ftcprint (features2, 25, "aes"); /* AES instructions */ ftcprint (features2, 26, "xsave"); /* xsave/xrstor/xsetbv/xgetbv */ - ftcprint (features2, 27, "osxsave"); /* not output on Linux */ +/* ftcprint (features2, 27, "osxsave"); */ /* not output on Linux */ ftcprint (features2, 28, "avx"); /* advanced vector extensions */ ftcprint (features2, 29, "f16c"); /* 16 bit FP conversions */ ftcprint (features2, 30, "rdrand"); /* RNG rdrand instruction */ @@ -1187,14 +1187,14 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features1, 3, "bmi1"); /* bit manip ext group 1 */ ftcprint (features1, 4, "hle"); /* hardware lock elision */ ftcprint (features1, 5, "avx2"); /* AVX ext instructions */ - ftcprint (features1, 6, "fpdx"); /* FP data ptr upd on exc */ +/* ftcprint (features1, 6, "fpdx"); */ /* FP data ptr upd on exc */ ftcprint (features1, 7, "smep"); /* super mode exec prot */ ftcprint (features1, 8, "bmi2"); /* bit manip ext group 2 */ ftcprint (features1, 9, "erms"); /* enh rep movsb/stosb */ ftcprint (features1, 10, "invpcid"); /* inv proc context id */ ftcprint (features1, 11, "rtm"); /* restricted txnal mem */ ftcprint (features1, 12, "cqm"); /* cache QoS monitoring */ - ftcprint (features1, 13, "fpcsdsz"); /* zero FP cs/ds */ +/* ftcprint (features1, 13, "fpcsdsz"); */ /* zero FP cs/ds */ ftcprint (features1, 14, "mpx"); /* mem prot ext */ ftcprint (features1, 15, "rdt_a"); /* rsrc dir tech alloc */ ftcprint (features1, 16, "avx512f"); /* vec foundation */ @@ -1255,15 +1255,15 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features1, 0, "clzero"); /* clzero instruction */ ftcprint (features1, 1, "irperf"); /* instr retired count */ ftcprint (features1, 2, "xsaveerptr"); /* save/rest FP err ptrs */ - ftcprint (features1, 6, "mba"); /* memory BW alloc */ +/* ftcprint (features1, 6, "mba"); */ /* memory BW alloc */ ftcprint (features1, 9, "wbnoinvd"); /* wbnoinvd instruction */ - ftcprint (features1, 12, "ibpb" ); /* ind br pred barrier */ - ftcprint (features1, 14, "ibrs" ); /* ind br restricted spec */ - ftcprint (features1, 15, "stibp"); /* 1 thread ind br pred */ - ftcprint (features1, 17, "stibp_always_on"); /* stibp always on */ - ftcprint (features1, 24, "ssbd"); /* spec store byp dis */ +/* ftcprint (features1, 12, "ibpb" ); */ /* ind br pred barrier */ +/* ftcprint (features1, 14, "ibrs" ); */ /* ind br restricted spec */ +/* ftcprint (features1, 15, "stibp"); */ /* 1 thread ind br pred */ +/* ftcprint (features1, 17, "stibp_always_on"); */ /* stibp always on */ +/* ftcprint (features1, 24, "ssbd"); */ /* spec store byp dis */ ftcprint (features1, 25, "virt_ssbd"); /* vir spec store byp dis */ - ftcprint (features1, 26, "ssb_no"); /* ssb fixed in hardware */ +/* ftcprint (features1, 26, "ssb_no"); */ /* ssb fixed in hardware */ } /* thermal & power cpuid 0x00000006 eax */ @@ -1392,13 +1392,13 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features1, 5, "stc"); /* sw thermal control */ ftcprint (features1, 6, "100mhzsteps"); /* 100 MHz mult control */ ftcprint (features1, 7, "hwpstate"); /* hw P state control */ - ftcprint (features1, 8, "invariant_tsc"); /* TSC invariant */ +/* ftcprint (features1, 8, "invariant_tsc"); */ /* TSC invariant */ ftcprint (features1, 9, "cpb"); /* core performance boost */ ftcprint (features1, 10, "eff_freq_ro"); /* ro eff freq interface */ - ftcprint (features1, 11, "proc_feedback"); /* proc feedback if */ - ftcprint (features1, 12, "acc_power"); /* core power reporting */ - ftcprint (features1, 13, "connstby"); /* connected standby */ - ftcprint (features1, 14, "rapl"); /* running average power limit */ +/* ftcprint (features1, 11, "proc_feedback"); */ /* proc feedback if */ +/* ftcprint (features1, 12, "acc_power"); */ /* core power reporting */ +/* ftcprint (features1, 13, "connstby"); */ /* connected standby */ +/* ftcprint (features1, 14, "rapl"); */ /* running average power limit */ } if (orig_affinity_mask != 0) From 2160c52a49c80c0c7fe86a47476a1815d20c2c03 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Mon, 7 Oct 2019 10:23:07 -0600 Subject: [PATCH 070/520] fhandler_proc.cc(format_proc_cpuinfo): or model extension bits or model extension bits into model high bits instead of adding arithmetically like family extension. --- winsup/cygwin/fhandler_proc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index c924cf2e0..8c331f5f4 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -740,7 +740,7 @@ format_proc_cpuinfo (void *, char *&destbuf) if (family == 15) family += (cpuid_sig >> 20) & 0xff; if (family >= 6) - model += ((cpuid_sig >> 16) & 0x0f) << 4; + model |= ((cpuid_sig >> 16) & 0x0f) << 4; /* ext model << 4 | model */ uint32_t maxe = 0; cpuid (&maxe, &unused, &unused, &unused, 0x80000000); From e82a0c959a7dcff1560290ec696721f5660b4330 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Mon, 7 Oct 2019 16:06:28 -0400 Subject: [PATCH 071/520] Cygwin: document recent changes to format_proc_cpuinfo --- winsup/cygwin/release/3.1.0 | 2 ++ winsup/doc/new-features.xml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/winsup/cygwin/release/3.1.0 b/winsup/cygwin/release/3.1.0 index 7f88c53fd..f3abff10f 100644 --- a/winsup/cygwin/release/3.1.0 +++ b/winsup/cygwin/release/3.1.0 @@ -33,6 +33,8 @@ What changed: - Allow times(2) to have a NULL argument, as on Linux. Addresses: https://cygwin.com/ml/cygwin/2019-09/msg00141.html +- Improve /proc/cpuinfo output and align more closely with Linux. + Bug Fixes --------- diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml index cbfdf32dc..65bdc17ab 100644 --- a/winsup/doc/new-features.xml +++ b/winsup/doc/new-features.xml @@ -50,6 +50,10 @@ dbm_fetch, dbm_firstkey, dbm_nextkey, dbm_open, dbm_store. Allow times(2) to have a NULL argument, as on Linux. + +Improve /proc/cpuinfo output and align more closely with Linux. + + From c561a625af9bdbcc475214036ebbedbcae1cb702 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Fri, 27 Sep 2019 14:00:52 -0400 Subject: [PATCH 072/520] Cygwin: mkdir and rmdir: treat drive names specially If the directory name has the form 'x:' followed by one or more slashes or backslashes, and if there's at least one backslash, assume that the user is referring to 'x:\', the root directory of drive x, and don't strip the backslash. Previously all trailing slashes and backslashes were stripped, and the name was treated as a relative file name containing a literal colon. Addresses https://cygwin.com/ml/cygwin/2019-08/msg00334.html. --- winsup/cygwin/dir.cc | 33 ++++++++++++++++++++++++++++----- winsup/cygwin/release/3.1.0 | 4 ++++ 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc index 29a9dfa83..3429fe022 100644 --- a/winsup/cygwin/dir.cc +++ b/winsup/cygwin/dir.cc @@ -313,15 +313,27 @@ mkdir (const char *dir, mode_t mode) /* Following Linux, and intentionally ignoring POSIX, do not resolve the last component of DIR if it is a symlink, even if DIR has a trailing slash. Achieve this by stripping trailing - slashes or backslashes. */ + slashes or backslashes. + + Exception: If DIR == 'x:' followed by one or more slashes or + backslashes, and if there's at least one backslash, assume + that the user is referring to the root directory of drive x. + Retain one backslash in this case. */ if (isdirsep (dir[strlen (dir) - 1])) { /* This converts // to /, but since both give EEXIST, we're okay. */ char *buf; char *p = stpcpy (buf = tp.c_get (), dir) - 1; + bool msdos = false; dir = buf; while (p > dir && isdirsep (*p)) - *p-- = '\0'; + { + if (*p == '\\') + msdos = true; + *p-- = '\0'; + } + if (msdos && p == dir + 1 && isdrive (dir)) + p[1] = '\\'; } if (!(fh = build_fh_name (dir, PC_SYM_NOFOLLOW))) __leave; /* errno already set */; @@ -360,20 +372,31 @@ rmdir (const char *dir) set_errno (ENOENT); __leave; } - /* Following Linux, and intentionally ignoring POSIX, do not resolve the last component of DIR if it is a symlink, even if DIR has a trailing slash. Achieve this by stripping trailing - slashes or backslashes. */ + slashes or backslashes. + + Exception: If DIR == 'x:' followed by one or more slashes or + backslashes, and if there's at least one backslash, assume + that the user is referring to the root directory of drive x. + Retain one backslash in this case. */ if (isdirsep (dir[strlen (dir) - 1])) { /* This converts // to /, but since both give ENOTEMPTY, we're okay. */ char *buf; char *p = stpcpy (buf = tp.c_get (), dir) - 1; + bool msdos = false; dir = buf; while (p > dir && isdirsep (*p)) - *p-- = '\0'; + { + if (*p == '\\') + msdos = true; + *p-- = '\0'; + } + if (msdos && p == dir + 1 && isdrive (dir)) + p[1] = '\\'; } if (!(fh = build_fh_name (dir, PC_SYM_NOFOLLOW))) __leave; /* errno already set */; diff --git a/winsup/cygwin/release/3.1.0 b/winsup/cygwin/release/3.1.0 index f3abff10f..3f2f3c86b 100644 --- a/winsup/cygwin/release/3.1.0 +++ b/winsup/cygwin/release/3.1.0 @@ -87,3 +87,7 @@ Bug Fixes - Fix an assertion failure on an invalid path. Addresses: https://cygwin.com/ml/cygwin/2019-09/msg00228.html + +- If the argument to mkdir(2) or rmdir(2) is 'x:\', don't strip the + trailing backslash. + Addresses: https://cygwin.com/ml/cygwin/2019-08/msg00334.html From cfc4955234828881145a20987c8a0a3cd373585c Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 8 Oct 2019 16:57:37 -0400 Subject: [PATCH 073/520] Add patch from Joel Sherrill for i386 and x86_64 fenv support --- newlib/configure.host | 1 + newlib/libc/machine/i386/sys/fenv.h | 1 + newlib/libc/machine/x86_64/sys/fenv.h | 170 + newlib/libm/fenv/fenv_stub.c | 23 + newlib/libm/machine/configure | 9 +- newlib/libm/machine/configure.in | 1 + newlib/libm/machine/i386/Makefile.am | 6 +- newlib/libm/machine/i386/Makefile.in | 92 +- newlib/libm/machine/i386/feclearexcept.c | 1 + newlib/libm/machine/i386/fegetenv.c | 1 + newlib/libm/machine/i386/fegetexceptflag.c | 1 + newlib/libm/machine/i386/fegetround.c | 1 + newlib/libm/machine/i386/feholdexcept.c | 1 + newlib/libm/machine/i386/fenv.c | 1 + newlib/libm/machine/i386/feraiseexcept.c | 1 + newlib/libm/machine/i386/fesetenv.c | 1 + newlib/libm/machine/i386/fesetexceptflag.c | 1 + newlib/libm/machine/i386/fesetround.c | 1 + newlib/libm/machine/i386/fetestexcept.c | 1 + newlib/libm/machine/i386/feupdateenv.c | 1 + newlib/libm/machine/x86_64/Makefile.am | 28 + newlib/libm/machine/x86_64/Makefile.in | 633 + newlib/libm/machine/x86_64/aclocal.m4 | 1017 ++ newlib/libm/machine/x86_64/configure | 14047 +++++++++++++++++ newlib/libm/machine/x86_64/configure.in | 25 + newlib/libm/machine/x86_64/feclearexcept.c | 1 + newlib/libm/machine/x86_64/fegetenv.c | 1 + newlib/libm/machine/x86_64/fegetexceptflag.c | 1 + newlib/libm/machine/x86_64/fegetround.c | 1 + newlib/libm/machine/x86_64/feholdexcept.c | 1 + newlib/libm/machine/x86_64/fenv.c | 477 + newlib/libm/machine/x86_64/feraiseexcept.c | 1 + newlib/libm/machine/x86_64/fesetenv.c | 1 + newlib/libm/machine/x86_64/fesetexceptflag.c | 1 + newlib/libm/machine/x86_64/fesetround.c | 1 + newlib/libm/machine/x86_64/fetestexcept.c | 1 + newlib/libm/machine/x86_64/feupdateenv.c | 1 + 37 files changed, 16544 insertions(+), 9 deletions(-) create mode 120000 newlib/libc/machine/i386/sys/fenv.h create mode 100644 newlib/libc/machine/x86_64/sys/fenv.h create mode 100644 newlib/libm/fenv/fenv_stub.c create mode 120000 newlib/libm/machine/i386/feclearexcept.c create mode 120000 newlib/libm/machine/i386/fegetenv.c create mode 120000 newlib/libm/machine/i386/fegetexceptflag.c create mode 120000 newlib/libm/machine/i386/fegetround.c create mode 120000 newlib/libm/machine/i386/feholdexcept.c create mode 120000 newlib/libm/machine/i386/fenv.c create mode 120000 newlib/libm/machine/i386/feraiseexcept.c create mode 120000 newlib/libm/machine/i386/fesetenv.c create mode 120000 newlib/libm/machine/i386/fesetexceptflag.c create mode 120000 newlib/libm/machine/i386/fesetround.c create mode 120000 newlib/libm/machine/i386/fetestexcept.c create mode 120000 newlib/libm/machine/i386/feupdateenv.c create mode 100644 newlib/libm/machine/x86_64/Makefile.am create mode 100644 newlib/libm/machine/x86_64/Makefile.in create mode 100644 newlib/libm/machine/x86_64/aclocal.m4 create mode 100755 newlib/libm/machine/x86_64/configure create mode 100644 newlib/libm/machine/x86_64/configure.in create mode 120000 newlib/libm/machine/x86_64/feclearexcept.c create mode 120000 newlib/libm/machine/x86_64/fegetenv.c create mode 120000 newlib/libm/machine/x86_64/fegetexceptflag.c create mode 120000 newlib/libm/machine/x86_64/fegetround.c create mode 120000 newlib/libm/machine/x86_64/feholdexcept.c create mode 100644 newlib/libm/machine/x86_64/fenv.c create mode 120000 newlib/libm/machine/x86_64/feraiseexcept.c create mode 120000 newlib/libm/machine/x86_64/fesetenv.c create mode 120000 newlib/libm/machine/x86_64/fesetexceptflag.c create mode 120000 newlib/libm/machine/x86_64/fesetround.c create mode 120000 newlib/libm/machine/x86_64/fetestexcept.c create mode 120000 newlib/libm/machine/x86_64/feupdateenv.c diff --git a/newlib/configure.host b/newlib/configure.host index fe7d9b7b5..eee630b34 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -341,6 +341,7 @@ case "${host_cpu}" in ;; x86_64) machine_dir=x86_64 + libm_machine_dir=x86_64 ;; xc16x*) machine_dir=xc16x diff --git a/newlib/libc/machine/i386/sys/fenv.h b/newlib/libc/machine/i386/sys/fenv.h new file mode 120000 index 000000000..218057825 --- /dev/null +++ b/newlib/libc/machine/i386/sys/fenv.h @@ -0,0 +1 @@ +../../x86_64/sys/fenv.h \ No newline at end of file diff --git a/newlib/libc/machine/x86_64/sys/fenv.h b/newlib/libc/machine/x86_64/sys/fenv.h new file mode 100644 index 000000000..83f599577 --- /dev/null +++ b/newlib/libc/machine/x86_64/sys/fenv.h @@ -0,0 +1,170 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2010-2019 Red Hat, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _SYS_FENV_H +#define _SYS_FENV_H 1 + +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Primary sources: + + The Open Group Base Specifications Issue 6: + http://www.opengroup.org/onlinepubs/000095399/basedefs/fenv.h.html + + C99 Language spec (draft n1256): + + + Intel(R) 64 and IA-32 Architectures Software Developer's Manuals: + http://www.intel.com/products/processor/manuals/ + + GNU C library manual pages: + http://www.gnu.org/software/libc/manual/html_node/Control-Functions.html + http://www.gnu.org/software/libc/manual/html_node/Rounding.html + http://www.gnu.org/software/libc/manual/html_node/FP-Exceptions.html + http://www.gnu.org/software/libc/manual/html_node/Status-bit-operations.html + + Linux online man page(s): + http://linux.die.net/man/3/fegetexcept + + The documentation quotes these sources for reference. All definitions and + code have been developed solely based on the information from these specs. + +*/ + +/* Represents the entire floating-point environment. The floating-point + environment refers collectively to any floating-point status flags and + control modes supported by the implementation. + In this implementation, the struct contains the state information from + the fstenv/fnstenv instructions and a copy of the SSE MXCSR, since GCC + uses SSE for a lot of floating-point operations. (Cygwin assumes i686 + or above these days, as does the compiler.) */ + +typedef struct _fenv_t +{ + struct _fpu_env_info { + unsigned int _fpu_cw; /* low 16 bits only. */ + unsigned int _fpu_sw; /* low 16 bits only. */ + unsigned int _fpu_tagw; /* low 16 bits only. */ + unsigned int _fpu_ipoff; + unsigned int _fpu_ipsel; + unsigned int _fpu_opoff; + unsigned int _fpu_opsel; /* low 16 bits only. */ + } _fpu; + unsigned int _sse_mxcsr; +} fenv_t; + +/* Represents the floating-point status flags collectively, including + any status the implementation associates with the flags. A floating-point + status flag is a system variable whose value is set (but never cleared) + when a floating-point exception is raised, which occurs as a side effect + of exceptional floating-point arithmetic to provide auxiliary information. + A floating-point control mode is a system variable whose value may be + set by the user to affect the subsequent behavior of floating-point + arithmetic. */ + +typedef __uint32_t fexcept_t; + +/* The header shall define the following constants if and only + if the implementation supports the floating-point exception by means + of the floating-point functions feclearexcept(), fegetexceptflag(), + feraiseexcept(), fesetexceptflag(), and fetestexcept(). Each expands to + an integer constant expression with values such that bitwise-inclusive + ORs of all combinations of the constants result in distinct values. */ + +#define FE_DIVBYZERO (1 << 2) +#define FE_INEXACT (1 << 5) +#define FE_INVALID (1 << 0) +#define FE_OVERFLOW (1 << 3) +#define FE_UNDERFLOW (1 << 4) + +/* The header shall define the following constant, which is + simply the bitwise-inclusive OR of all floating-point exception + constants defined above: */ + +/* in agreement w/ Linux the subnormal exception will always be masked */ +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_UNDERFLOW | FE_OVERFLOW | FE_DIVBYZERO | FE_INVALID) + +/* The header shall define the following constants if and only + if the implementation supports getting and setting the represented + rounding direction by means of the fegetround() and fesetround() + functions. Each expands to an integer constant expression whose values + are distinct non-negative vales. */ + +#define FE_DOWNWARD (1) +#define FE_TONEAREST (0) +#define FE_TOWARDZERO (3) +#define FE_UPWARD (2) + +/* Only Solaris and QNX implement fegetprec/fesetprec. As Solaris, use the + values defined by http://www.open-std.org/jtc1/sc22//WG14/www/docs/n752.htm + QNX defines different values. */ +#if __MISC_VISIBLE +#define FE_FLTPREC (0) +#define FE_DBLPREC (2) +#define FE_LDBLPREC (3) +#endif + +/* The header shall define the following constant, which + represents the default floating-point environment (that is, the one + installed at program startup) and has type pointer to const-qualified + fenv_t. It can be used as an argument to the functions within the + header that manage the floating-point environment. */ + +extern const fenv_t *_fe_dfl_env; +#define FE_DFL_ENV (_fe_dfl_env) + +/* Additional implementation-defined environments, with macro + definitions beginning with FE_ and an uppercase letter,and having + type "pointer to const-qualified fenv_t",may also be specified by + the implementation. */ + +#if __GNU_VISIBLE +/* If possible, the GNU C Library defines a macro FE_NOMASK_ENV which + represents an environment where every exception raised causes a trap + to occur. You can test for this macro using #ifdef. It is only defined + if _GNU_SOURCE is defined. */ +extern const fenv_t *_fe_nomask_env; +#define FE_NOMASK_ENV (_fe_nomask_env) +#endif /* __GNU_VISIBLE */ + +#ifdef __INSIDE_CYGWIN__ +/* This is Cygwin-custom, not from the standard, for use in the Cygwin CRT. */ +extern void _feinitialise (); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _FENV_H */ diff --git a/newlib/libm/fenv/fenv_stub.c b/newlib/libm/fenv/fenv_stub.c new file mode 100644 index 000000000..a4eb652f3 --- /dev/null +++ b/newlib/libm/fenv/fenv_stub.c @@ -0,0 +1,23 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill , it will need + * to override the default implementation found in a file in this directory. + * + * For each file that the target's machine directory needs to override, + * this file should be symbolically linked to that specific file name + * in the target directory. For example, the target may use fe_dfl_env.c + * from the default implementation but need to override all others. + */ + +/* deliberately empty */ + diff --git a/newlib/libm/machine/configure b/newlib/libm/machine/configure index 071a70c6f..2053e9cd3 100755 --- a/newlib/libm/machine/configure +++ b/newlib/libm/machine/configure @@ -791,7 +791,8 @@ arm i386 nds32 spu -riscv' +riscv +x86_64' # Initialize some variables set by options. ac_init_help= @@ -11453,7 +11454,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11456 "configure" +#line 11457 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11559,7 +11560,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11562 "configure" +#line 11563 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11815,6 +11816,8 @@ subdirs="$subdirs aarch64" spu) subdirs="$subdirs spu" ;; riscv) subdirs="$subdirs riscv" + ;; + x86_64) subdirs="$subdirs x86_64" ;; esac; if test "${use_libtool}" = "yes"; then diff --git a/newlib/libm/machine/configure.in b/newlib/libm/machine/configure.in index 55e2d35c3..f43ae1b67 100644 --- a/newlib/libm/machine/configure.in +++ b/newlib/libm/machine/configure.in @@ -31,6 +31,7 @@ if test -n "${libm_machine_dir}"; then nds32) AC_CONFIG_SUBDIRS(nds32) ;; spu) AC_CONFIG_SUBDIRS(spu) ;; riscv) AC_CONFIG_SUBDIRS(riscv) ;; + x86_64) AC_CONFIG_SUBDIRS(x86_64) ;; esac; if test "${use_libtool}" = "yes"; then machlib=${libm_machine_dir}/lib${libm_machine_dir}.${aext} diff --git a/newlib/libm/machine/i386/Makefile.am b/newlib/libm/machine/i386/Makefile.am index 6fade2d9a..249f87691 100644 --- a/newlib/libm/machine/i386/Makefile.am +++ b/newlib/libm/machine/i386/Makefile.am @@ -12,8 +12,10 @@ LIB_SOURCES = \ f_log.S f_logf.S f_log10.S f_log10f.S \ f_ldexp.S f_ldexpf.S f_lrint.c f_lrintf.c f_lrintl.c \ f_pow.c f_powf.c f_rint.c f_rintf.c f_rintl.c \ - f_tan.S f_tanf.S f_math.h \ - i386mach.h + f_tan.S f_tanf.S f_math.h i386mach.h \ + fenv.c feclearexcept.c fegetenv.c fegetexceptflag.c \ + fegetround.c feholdexcept.c feraiseexcept.c fesetenv.c \ + fesetexceptflag.c fesetround.c fetestexcept.c feupdateenv.c libi386_la_LDFLAGS = -Xcompiler -nostdlib diff --git a/newlib/libm/machine/i386/Makefile.in b/newlib/libm/machine/i386/Makefile.in index 13f536e40..2be90ee0b 100644 --- a/newlib/libm/machine/i386/Makefile.in +++ b/newlib/libm/machine/i386/Makefile.in @@ -87,7 +87,13 @@ am__objects_1 = lib_a-f_atan2.$(OBJEXT) lib_a-f_atan2f.$(OBJEXT) \ lib_a-f_pow.$(OBJEXT) lib_a-f_powf.$(OBJEXT) \ lib_a-f_rint.$(OBJEXT) lib_a-f_rintf.$(OBJEXT) \ lib_a-f_rintl.$(OBJEXT) lib_a-f_tan.$(OBJEXT) \ - lib_a-f_tanf.$(OBJEXT) + lib_a-f_tanf.$(OBJEXT) lib_a-fenv.$(OBJEXT) \ + lib_a-feclearexcept.$(OBJEXT) lib_a-fegetenv.$(OBJEXT) \ + lib_a-fegetexceptflag.$(OBJEXT) lib_a-fegetround.$(OBJEXT) \ + lib_a-feholdexcept.$(OBJEXT) lib_a-feraiseexcept.$(OBJEXT) \ + lib_a-fesetenv.$(OBJEXT) lib_a-fesetexceptflag.$(OBJEXT) \ + lib_a-fesetround.$(OBJEXT) lib_a-fetestexcept.$(OBJEXT) \ + lib_a-feupdateenv.$(OBJEXT) @USE_LIBTOOL_FALSE@am_lib_a_OBJECTS = $(am__objects_1) lib_a_OBJECTS = $(am_lib_a_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -96,7 +102,11 @@ am__objects_2 = f_atan2.lo f_atan2f.lo f_exp.lo f_expf.lo f_frexp.lo \ f_frexpf.lo f_llrint.lo f_llrintf.lo f_llrintl.lo f_log.lo \ f_logf.lo f_log10.lo f_log10f.lo f_ldexp.lo f_ldexpf.lo \ f_lrint.lo f_lrintf.lo f_lrintl.lo f_pow.lo f_powf.lo \ - f_rint.lo f_rintf.lo f_rintl.lo f_tan.lo f_tanf.lo + f_rint.lo f_rintf.lo f_rintl.lo f_tan.lo f_tanf.lo fenv.lo \ + feclearexcept.lo fegetenv.lo fegetexceptflag.lo fegetround.lo \ + feholdexcept.lo feraiseexcept.lo fesetenv.lo \ + fesetexceptflag.lo fesetround.lo fetestexcept.lo \ + feupdateenv.lo @USE_LIBTOOL_TRUE@am_libi386_la_OBJECTS = $(am__objects_2) libi386_la_OBJECTS = $(am_libi386_la_OBJECTS) libi386_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -263,8 +273,10 @@ LIB_SOURCES = \ f_log.S f_logf.S f_log10.S f_log10f.S \ f_ldexp.S f_ldexpf.S f_lrint.c f_lrintf.c f_lrintl.c \ f_pow.c f_powf.c f_rint.c f_rintf.c f_rintl.c \ - f_tan.S f_tanf.S f_math.h \ - i386mach.h + f_tan.S f_tanf.S f_math.h i386mach.h \ + fenv.c feclearexcept.c fegetenv.c fegetexceptflag.c \ + fegetround.c feholdexcept.c feraiseexcept.c fesetenv.c \ + fesetexceptflag.c fesetround.c fetestexcept.c feupdateenv.c libi386_la_LDFLAGS = -Xcompiler -nostdlib @USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libi386.la @@ -519,6 +531,78 @@ lib_a-f_rintl.o: f_rintl.c lib_a-f_rintl.obj: f_rintl.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-f_rintl.obj `if test -f 'f_rintl.c'; then $(CYGPATH_W) 'f_rintl.c'; else $(CYGPATH_W) '$(srcdir)/f_rintl.c'; fi` +lib_a-fenv.o: fenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.o `test -f 'fenv.c' || echo '$(srcdir)/'`fenv.c + +lib_a-fenv.obj: fenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.obj `if test -f 'fenv.c'; then $(CYGPATH_W) 'fenv.c'; else $(CYGPATH_W) '$(srcdir)/fenv.c'; fi` + +lib_a-feclearexcept.o: feclearexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feclearexcept.o `test -f 'feclearexcept.c' || echo '$(srcdir)/'`feclearexcept.c + +lib_a-feclearexcept.obj: feclearexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feclearexcept.obj `if test -f 'feclearexcept.c'; then $(CYGPATH_W) 'feclearexcept.c'; else $(CYGPATH_W) '$(srcdir)/feclearexcept.c'; fi` + +lib_a-fegetenv.o: fegetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetenv.o `test -f 'fegetenv.c' || echo '$(srcdir)/'`fegetenv.c + +lib_a-fegetenv.obj: fegetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetenv.obj `if test -f 'fegetenv.c'; then $(CYGPATH_W) 'fegetenv.c'; else $(CYGPATH_W) '$(srcdir)/fegetenv.c'; fi` + +lib_a-fegetexceptflag.o: fegetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexceptflag.o `test -f 'fegetexceptflag.c' || echo '$(srcdir)/'`fegetexceptflag.c + +lib_a-fegetexceptflag.obj: fegetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexceptflag.obj `if test -f 'fegetexceptflag.c'; then $(CYGPATH_W) 'fegetexceptflag.c'; else $(CYGPATH_W) '$(srcdir)/fegetexceptflag.c'; fi` + +lib_a-fegetround.o: fegetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetround.o `test -f 'fegetround.c' || echo '$(srcdir)/'`fegetround.c + +lib_a-fegetround.obj: fegetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetround.obj `if test -f 'fegetround.c'; then $(CYGPATH_W) 'fegetround.c'; else $(CYGPATH_W) '$(srcdir)/fegetround.c'; fi` + +lib_a-feholdexcept.o: feholdexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.o `test -f 'feholdexcept.c' || echo '$(srcdir)/'`feholdexcept.c + +lib_a-feholdexcept.obj: feholdexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.obj `if test -f 'feholdexcept.c'; then $(CYGPATH_W) 'feholdexcept.c'; else $(CYGPATH_W) '$(srcdir)/feholdexcept.c'; fi` + +lib_a-feraiseexcept.o: feraiseexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feraiseexcept.o `test -f 'feraiseexcept.c' || echo '$(srcdir)/'`feraiseexcept.c + +lib_a-feraiseexcept.obj: feraiseexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feraiseexcept.obj `if test -f 'feraiseexcept.c'; then $(CYGPATH_W) 'feraiseexcept.c'; else $(CYGPATH_W) '$(srcdir)/feraiseexcept.c'; fi` + +lib_a-fesetenv.o: fesetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetenv.o `test -f 'fesetenv.c' || echo '$(srcdir)/'`fesetenv.c + +lib_a-fesetenv.obj: fesetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetenv.obj `if test -f 'fesetenv.c'; then $(CYGPATH_W) 'fesetenv.c'; else $(CYGPATH_W) '$(srcdir)/fesetenv.c'; fi` + +lib_a-fesetexceptflag.o: fesetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetexceptflag.o `test -f 'fesetexceptflag.c' || echo '$(srcdir)/'`fesetexceptflag.c + +lib_a-fesetexceptflag.obj: fesetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetexceptflag.obj `if test -f 'fesetexceptflag.c'; then $(CYGPATH_W) 'fesetexceptflag.c'; else $(CYGPATH_W) '$(srcdir)/fesetexceptflag.c'; fi` + +lib_a-fesetround.o: fesetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetround.o `test -f 'fesetround.c' || echo '$(srcdir)/'`fesetround.c + +lib_a-fesetround.obj: fesetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetround.obj `if test -f 'fesetround.c'; then $(CYGPATH_W) 'fesetround.c'; else $(CYGPATH_W) '$(srcdir)/fesetround.c'; fi` + +lib_a-fetestexcept.o: fetestexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fetestexcept.o `test -f 'fetestexcept.c' || echo '$(srcdir)/'`fetestexcept.c + +lib_a-fetestexcept.obj: fetestexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fetestexcept.obj `if test -f 'fetestexcept.c'; then $(CYGPATH_W) 'fetestexcept.c'; else $(CYGPATH_W) '$(srcdir)/fetestexcept.c'; fi` + +lib_a-feupdateenv.o: feupdateenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.o `test -f 'feupdateenv.c' || echo '$(srcdir)/'`feupdateenv.c + +lib_a-feupdateenv.obj: feupdateenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.obj `if test -f 'feupdateenv.c'; then $(CYGPATH_W) 'feupdateenv.c'; else $(CYGPATH_W) '$(srcdir)/feupdateenv.c'; fi` + mostlyclean-libtool: -rm -f *.lo diff --git a/newlib/libm/machine/i386/feclearexcept.c b/newlib/libm/machine/i386/feclearexcept.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/i386/feclearexcept.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fegetenv.c b/newlib/libm/machine/i386/fegetenv.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/i386/fegetenv.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fegetexceptflag.c b/newlib/libm/machine/i386/fegetexceptflag.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/i386/fegetexceptflag.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fegetround.c b/newlib/libm/machine/i386/fegetround.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/i386/fegetround.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/feholdexcept.c b/newlib/libm/machine/i386/feholdexcept.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/i386/feholdexcept.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fenv.c b/newlib/libm/machine/i386/fenv.c new file mode 120000 index 000000000..1d7c7a117 --- /dev/null +++ b/newlib/libm/machine/i386/fenv.c @@ -0,0 +1 @@ +../x86_64/fenv.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/feraiseexcept.c b/newlib/libm/machine/i386/feraiseexcept.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/i386/feraiseexcept.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fesetenv.c b/newlib/libm/machine/i386/fesetenv.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/i386/fesetenv.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fesetexceptflag.c b/newlib/libm/machine/i386/fesetexceptflag.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/i386/fesetexceptflag.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fesetround.c b/newlib/libm/machine/i386/fesetround.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/i386/fesetround.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fetestexcept.c b/newlib/libm/machine/i386/fetestexcept.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/i386/fetestexcept.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/feupdateenv.c b/newlib/libm/machine/i386/feupdateenv.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/i386/feupdateenv.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/Makefile.am b/newlib/libm/machine/x86_64/Makefile.am new file mode 100644 index 000000000..3c34ca7d8 --- /dev/null +++ b/newlib/libm/machine/x86_64/Makefile.am @@ -0,0 +1,28 @@ +## Process this file with automake to generate Makefile.in + +INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \ + $(CROSS_CFLAGS) $(TARGET_CFLAGS) + +LIB_SOURCES = \ + feclearexcept.c fegetenv.c fegetexceptflag.c fegetround.c \ + feholdexcept.c fenv.c feraiseexcept.c fesetenv.c fesetexceptflag.c \ + fesetround.c fetestexcept.c feupdateenv.c + +libx86_64_la_LDFLAGS = -Xcompiler -nostdlib + +if USE_LIBTOOL +noinst_LTLIBRARIES = libx86_64.la +libx86_64_la_SOURCES = $(LIB_SOURCES) +noinst_DATA = objectlist.awk.in +else +noinst_LIBRARIES = lib.a +lib_a_SOURCES = $(LIB_SOURCES) +lib_a_CFLAGS = $(AM_CFLAGS) +lib_a_CCASFLAGS = $(AM_CCASFLAGS) +noinst_DATA = +endif # USE_LIBTOOL + +include $(srcdir)/../../../Makefile.shared + +ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. +CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host diff --git a/newlib/libm/machine/x86_64/Makefile.in b/newlib/libm/machine/x86_64/Makefile.in new file mode 100644 index 000000000..71881666b --- /dev/null +++ b/newlib/libm/machine/x86_64/Makefile.in @@ -0,0 +1,633 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/../../../Makefile.shared $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/../../../../newlib-3.1.0libtool.m4 \ + $(top_srcdir)/../../../../newlib-3.1.0ltoptions.m4 \ + $(top_srcdir)/../../../../newlib-3.1.0ltsugar.m4 \ + $(top_srcdir)/../../../../newlib-3.1.0ltversion.m4 \ + $(top_srcdir)/../../../../newlib-3.1.0lt~obsolete.m4 \ + $(top_srcdir)/../../../acinclude.m4 $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +lib_a_AR = $(AR) $(ARFLAGS) +lib_a_LIBADD = +am__objects_1 = lib_a-feclearexcept.$(OBJEXT) lib_a-fegetenv.$(OBJEXT) \ + lib_a-fegetexceptflag.$(OBJEXT) lib_a-fegetround.$(OBJEXT) \ + lib_a-feholdexcept.$(OBJEXT) lib_a-fenv.$(OBJEXT) \ + lib_a-feraiseexcept.$(OBJEXT) lib_a-fesetenv.$(OBJEXT) \ + lib_a-fesetexceptflag.$(OBJEXT) lib_a-fesetround.$(OBJEXT) \ + lib_a-fetestexcept.$(OBJEXT) lib_a-feupdateenv.$(OBJEXT) +@USE_LIBTOOL_FALSE@am_lib_a_OBJECTS = $(am__objects_1) +lib_a_OBJECTS = $(am_lib_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +libx86_64_la_LIBADD = +am__objects_2 = feclearexcept.lo fegetenv.lo fegetexceptflag.lo \ + fegetround.lo feholdexcept.lo fenv.lo feraiseexcept.lo \ + fesetenv.lo fesetexceptflag.lo fesetround.lo fetestexcept.lo \ + feupdateenv.lo +@USE_LIBTOOL_TRUE@am_libx86_64_la_OBJECTS = $(am__objects_2) +libx86_64_la_OBJECTS = $(am_libx86_64_la_OBJECTS) +libx86_64_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libx86_64_la_LDFLAGS) $(LDFLAGS) -o $@ +@USE_LIBTOOL_TRUE@am_libx86_64_la_rpath = +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = +am__depfiles_maybe = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(lib_a_SOURCES) $(libx86_64_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +DATA = $(noinst_DATA) +ETAGS = etags +CTAGS = ctags +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NEWLIB_CFLAGS = @NEWLIB_CFLAGS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NO_INCLUDE_LIST = @NO_INCLUDE_LIST@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +READELF = @READELF@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +aext = @aext@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +libm_machine_dir = @libm_machine_dir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lpfx = @lpfx@ +machine_dir = @machine_dir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +newlib_basedir = @newlib_basedir@ +oext = @oext@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sys_dir = @sys_dir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \ + $(CROSS_CFLAGS) $(TARGET_CFLAGS) + +LIB_SOURCES = \ + feclearexcept.c fegetenv.c fegetexceptflag.c fegetround.c \ + feholdexcept.c fenv.c feraiseexcept.c fesetenv.c fesetexceptflag.c \ + fesetround.c fetestexcept.c feupdateenv.c + +libx86_64_la_LDFLAGS = -Xcompiler -nostdlib +@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libx86_64.la +@USE_LIBTOOL_TRUE@libx86_64_la_SOURCES = $(LIB_SOURCES) +@USE_LIBTOOL_FALSE@noinst_DATA = +@USE_LIBTOOL_TRUE@noinst_DATA = objectlist.awk.in +@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a +@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES) +@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS) +@USE_LIBTOOL_FALSE@lib_a_CCASFLAGS = $(AM_CCASFLAGS) + +# +# documentation rules +# +SUFFIXES = .def .xml +CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str +DOCBOOK_CHEW = ${top_srcdir}/../doc/makedocbook.py +DOCBOOK_OUT_FILES = $(CHEWOUT_FILES:.def=.xml) +DOCBOOK_CHAPTERS = $(CHAPTERS:.tex=.xml) +CLEANFILES = $(CHEWOUT_FILES) $(DOCBOOK_OUT_FILES) +ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. +CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host +all: all-am + +.SUFFIXES: +.SUFFIXES: .def .xml .c .lo .o .obj +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../../Makefile.shared $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --cygnus \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --cygnus Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; +$(srcdir)/../../../Makefile.shared: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES) + -rm -f lib.a + $(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD) + $(RANLIB) lib.a + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libx86_64.la: $(libx86_64_la_OBJECTS) $(libx86_64_la_DEPENDENCIES) $(EXTRA_libx86_64_la_DEPENDENCIES) + $(libx86_64_la_LINK) $(am_libx86_64_la_rpath) $(libx86_64_la_OBJECTS) $(libx86_64_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.c.o: + $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(LTCOMPILE) -c -o $@ $< + +lib_a-feclearexcept.o: feclearexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feclearexcept.o `test -f 'feclearexcept.c' || echo '$(srcdir)/'`feclearexcept.c + +lib_a-feclearexcept.obj: feclearexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feclearexcept.obj `if test -f 'feclearexcept.c'; then $(CYGPATH_W) 'feclearexcept.c'; else $(CYGPATH_W) '$(srcdir)/feclearexcept.c'; fi` + +lib_a-fegetenv.o: fegetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetenv.o `test -f 'fegetenv.c' || echo '$(srcdir)/'`fegetenv.c + +lib_a-fegetenv.obj: fegetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetenv.obj `if test -f 'fegetenv.c'; then $(CYGPATH_W) 'fegetenv.c'; else $(CYGPATH_W) '$(srcdir)/fegetenv.c'; fi` + +lib_a-fegetexceptflag.o: fegetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexceptflag.o `test -f 'fegetexceptflag.c' || echo '$(srcdir)/'`fegetexceptflag.c + +lib_a-fegetexceptflag.obj: fegetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexceptflag.obj `if test -f 'fegetexceptflag.c'; then $(CYGPATH_W) 'fegetexceptflag.c'; else $(CYGPATH_W) '$(srcdir)/fegetexceptflag.c'; fi` + +lib_a-fegetround.o: fegetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetround.o `test -f 'fegetround.c' || echo '$(srcdir)/'`fegetround.c + +lib_a-fegetround.obj: fegetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetround.obj `if test -f 'fegetround.c'; then $(CYGPATH_W) 'fegetround.c'; else $(CYGPATH_W) '$(srcdir)/fegetround.c'; fi` + +lib_a-feholdexcept.o: feholdexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.o `test -f 'feholdexcept.c' || echo '$(srcdir)/'`feholdexcept.c + +lib_a-feholdexcept.obj: feholdexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.obj `if test -f 'feholdexcept.c'; then $(CYGPATH_W) 'feholdexcept.c'; else $(CYGPATH_W) '$(srcdir)/feholdexcept.c'; fi` + +lib_a-fenv.o: fenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.o `test -f 'fenv.c' || echo '$(srcdir)/'`fenv.c + +lib_a-fenv.obj: fenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.obj `if test -f 'fenv.c'; then $(CYGPATH_W) 'fenv.c'; else $(CYGPATH_W) '$(srcdir)/fenv.c'; fi` + +lib_a-feraiseexcept.o: feraiseexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feraiseexcept.o `test -f 'feraiseexcept.c' || echo '$(srcdir)/'`feraiseexcept.c + +lib_a-feraiseexcept.obj: feraiseexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feraiseexcept.obj `if test -f 'feraiseexcept.c'; then $(CYGPATH_W) 'feraiseexcept.c'; else $(CYGPATH_W) '$(srcdir)/feraiseexcept.c'; fi` + +lib_a-fesetenv.o: fesetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetenv.o `test -f 'fesetenv.c' || echo '$(srcdir)/'`fesetenv.c + +lib_a-fesetenv.obj: fesetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetenv.obj `if test -f 'fesetenv.c'; then $(CYGPATH_W) 'fesetenv.c'; else $(CYGPATH_W) '$(srcdir)/fesetenv.c'; fi` + +lib_a-fesetexceptflag.o: fesetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetexceptflag.o `test -f 'fesetexceptflag.c' || echo '$(srcdir)/'`fesetexceptflag.c + +lib_a-fesetexceptflag.obj: fesetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetexceptflag.obj `if test -f 'fesetexceptflag.c'; then $(CYGPATH_W) 'fesetexceptflag.c'; else $(CYGPATH_W) '$(srcdir)/fesetexceptflag.c'; fi` + +lib_a-fesetround.o: fesetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetround.o `test -f 'fesetround.c' || echo '$(srcdir)/'`fesetround.c + +lib_a-fesetround.obj: fesetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetround.obj `if test -f 'fesetround.c'; then $(CYGPATH_W) 'fesetround.c'; else $(CYGPATH_W) '$(srcdir)/fesetround.c'; fi` + +lib_a-fetestexcept.o: fetestexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fetestexcept.o `test -f 'fetestexcept.c' || echo '$(srcdir)/'`fetestexcept.c + +lib_a-fetestexcept.obj: fetestexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fetestexcept.obj `if test -f 'fetestexcept.c'; then $(CYGPATH_W) 'fetestexcept.c'; else $(CYGPATH_W) '$(srcdir)/fetestexcept.c'; fi` + +lib_a-feupdateenv.o: feupdateenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.o `test -f 'feupdateenv.c' || echo '$(srcdir)/'`feupdateenv.c + +lib_a-feupdateenv.obj: feupdateenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.obj `if test -f 'feupdateenv.c'; then $(CYGPATH_W) 'feupdateenv.c'; else $(CYGPATH_W) '$(srcdir)/feupdateenv.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +check-am: +check: check-am +all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-generic clean-libtool clean-noinstLIBRARIES \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags dvi dvi-am \ + html html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am + +objectlist.awk.in: $(noinst_LTLIBRARIES) + -rm -f objectlist.awk.in + for i in `ls *.lo` ; \ + do \ + echo $$i `pwd`/$$i >> objectlist.awk.in ; \ + done + +.c.def: + $(CHEW) < $< > $*.def || ( rm $*.def && false ) + @touch stmp-def + +TARGETDOC ?= ../tmp.texi + +doc: $(CHEWOUT_FILES) + for chapter in $(CHAPTERS) ; \ + do \ + cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \ + done + +.c.xml: + $(DOCBOOK_CHEW) < $< > $*.xml || ( rm $*.xml && false ) + @touch stmp-xml + +docbook: $(DOCBOOK_OUT_FILES) + for chapter in $(DOCBOOK_CHAPTERS) ; \ + do \ + ${top_srcdir}/../doc/chapter-texi2docbook.py <$(srcdir)/$${chapter%.xml}.tex >../$$chapter ; \ + done + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/newlib/libm/machine/x86_64/aclocal.m4 b/newlib/libm/machine/x86_64/aclocal.m4 new file mode 100644 index 000000000..c5293fc4b --- /dev/null +++ b/newlib/libm/machine/x86_64/aclocal.m4 @@ -0,0 +1,1017 @@ +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.6], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.11.6])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 16 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, +# 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless `enable' is passed literally. +# For symmetry, `disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], +[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([../../../../newlib-3.1.0libtool.m4]) +m4_include([../../../../newlib-3.1.0ltoptions.m4]) +m4_include([../../../../newlib-3.1.0ltsugar.m4]) +m4_include([../../../../newlib-3.1.0ltversion.m4]) +m4_include([../../../../newlib-3.1.0lt~obsolete.m4]) +m4_include([../../../acinclude.m4]) diff --git a/newlib/libm/machine/x86_64/configure b/newlib/libm/machine/x86_64/configure new file mode 100755 index 000000000..2872be24f --- /dev/null +++ b/newlib/libm/machine/x86_64/configure @@ -0,0 +1,14047 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +SHELL=${CONFIG_SHELL-/bin/sh} + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='newlib' +PACKAGE_TARNAME='newlib' +PACKAGE_VERSION='3.1.0' +PACKAGE_STRING='newlib 3.1.0' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +ac_unique_file="Makefile.am" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +LIBOBJS +CPP +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +EXEEXT +ac_ct_CC +CPPFLAGS +CFLAGS +LIBTOOL +OBJDUMP +DLLTOOL +SED +sys_dir +machine_dir +libm_machine_dir +lpfx +aext +oext +OBJEXT +USE_LIBTOOL_FALSE +USE_LIBTOOL_TRUE +ELIX_LEVEL_4_FALSE +ELIX_LEVEL_4_TRUE +ELIX_LEVEL_3_FALSE +ELIX_LEVEL_3_TRUE +ELIX_LEVEL_2_FALSE +ELIX_LEVEL_2_TRUE +ELIX_LEVEL_1_FALSE +ELIX_LEVEL_1_TRUE +ELIX_LEVEL_0_FALSE +ELIX_LEVEL_0_TRUE +LDFLAGS +NO_INCLUDE_LIST +NEWLIB_CFLAGS +CCASFLAGS +CCAS +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +READELF +RANLIB +AR +AS +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +CC +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +newlib_basedir +MAY_SUPPLY_SYSCALLS_FALSE +MAY_SUPPLY_SYSCALLS_TRUE +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_multilib +enable_target_optspace +enable_malloc_debugging +enable_newlib_multithread +enable_newlib_iconv +enable_newlib_elix_level +enable_newlib_io_float +enable_newlib_supplied_syscalls +enable_newlib_fno_builtin +enable_dependency_tracking +enable_maintainer_mode +enable_shared +enable_static +with_pic +enable_fast_install +with_gnu_ld +enable_libtool_lock +' + ac_precious_vars='build_alias +host_alias +target_alias +CCAS +CCASFLAGS +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/newlib] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of newlib 3.1.0:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-multilib build many library versions (default) + --enable-target-optspace optimize for space + --enable-malloc-debugging indicate malloc debugging requested + --enable-newlib-multithread enable support for multiple threads + --enable-newlib-iconv enable iconv library support + --enable-newlib-elix-level supply desired elix library level (1-4) + --disable-newlib-io-float disable printf/scanf family float support + --disable-newlib-supplied-syscalls disable newlib from supplying syscalls + --disable-newlib-fno-builtin disable -fno-builtin flag to allow compiler to use builtin library functions + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + +Some influential environment variables: + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to the package provider. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +newlib configure 3.1.0 +generated by GNU Autoconf 2.68 + +Copyright (C) 2010 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by newlib $as_me 3.1.0, which was +generated by GNU Autoconf 2.68. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +ac_aux_dir= +for ac_dir in ../../../.. "$srcdir"/../../../..; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../../.. \"$srcdir\"/../../../.." "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +am__api_version='1.11' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" = set; then : + enableval=$enable_multilib; case "${enableval}" in + yes) multilib=yes ;; + no) multilib=no ;; + *) as_fn_error $? "bad value ${enableval} for multilib option" "$LINENO" 5 ;; + esac +else + multilib=yes +fi + +# Check whether --enable-target-optspace was given. +if test "${enable_target_optspace+set}" = set; then : + enableval=$enable_target_optspace; case "${enableval}" in + yes) target_optspace=yes ;; + no) target_optspace=no ;; + *) as_fn_error $? "bad value ${enableval} for target-optspace option" "$LINENO" 5 ;; + esac +else + target_optspace= +fi + +# Check whether --enable-malloc-debugging was given. +if test "${enable_malloc_debugging+set}" = set; then : + enableval=$enable_malloc_debugging; case "${enableval}" in + yes) malloc_debugging=yes ;; + no) malloc_debugging=no ;; + *) as_fn_error $? "bad value ${enableval} for malloc-debugging option" "$LINENO" 5 ;; + esac +else + malloc_debugging= +fi + +# Check whether --enable-newlib-multithread was given. +if test "${enable_newlib_multithread+set}" = set; then : + enableval=$enable_newlib_multithread; case "${enableval}" in + yes) newlib_multithread=yes ;; + no) newlib_multithread=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-multithread option" "$LINENO" 5 ;; + esac +else + newlib_multithread=yes +fi + +# Check whether --enable-newlib-iconv was given. +if test "${enable_newlib_iconv+set}" = set; then : + enableval=$enable_newlib_iconv; if test "${newlib_iconv+set}" != set; then + case "${enableval}" in + yes) newlib_iconv=yes ;; + no) newlib_iconv=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-iconv option" "$LINENO" 5 ;; + esac + fi +else + newlib_iconv=${newlib_iconv} +fi + +# Check whether --enable-newlib-elix-level was given. +if test "${enable_newlib_elix_level+set}" = set; then : + enableval=$enable_newlib_elix_level; case "${enableval}" in + 0) newlib_elix_level=0 ;; + 1) newlib_elix_level=1 ;; + 2) newlib_elix_level=2 ;; + 3) newlib_elix_level=3 ;; + 4) newlib_elix_level=4 ;; + *) as_fn_error $? "bad value ${enableval} for newlib-elix-level option" "$LINENO" 5 ;; + esac +else + newlib_elix_level=0 +fi + +# Check whether --enable-newlib-io-float was given. +if test "${enable_newlib_io_float+set}" = set; then : + enableval=$enable_newlib_io_float; case "${enableval}" in + yes) newlib_io_float=yes ;; + no) newlib_io_float=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-io-float option" "$LINENO" 5 ;; + esac +else + newlib_io_float=yes +fi + +# Check whether --enable-newlib-supplied-syscalls was given. +if test "${enable_newlib_supplied_syscalls+set}" = set; then : + enableval=$enable_newlib_supplied_syscalls; case "${enableval}" in + yes) newlib_may_supply_syscalls=yes ;; + no) newlib_may_supply_syscalls=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;; + esac +else + newlib_may_supply_syscalls=yes +fi + + if test x${newlib_may_supply_syscalls} = xyes; then + MAY_SUPPLY_SYSCALLS_TRUE= + MAY_SUPPLY_SYSCALLS_FALSE='#' +else + MAY_SUPPLY_SYSCALLS_TRUE='#' + MAY_SUPPLY_SYSCALLS_FALSE= +fi + + +# Check whether --enable-newlib-fno-builtin was given. +if test "${enable_newlib_fno_builtin+set}" = set; then : + enableval=$enable_newlib_fno_builtin; case "${enableval}" in + yes) newlib_fno_builtin=yes ;; + no) newlib_fno_builtin=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-fno-builtin option" "$LINENO" 5 ;; + esac +else + newlib_fno_builtin= +fi + + + +test -z "${with_target_subdir}" && with_target_subdir=. + +if test "${srcdir}" = "."; then + if test "${with_target_subdir}" != "."; then + newlib_basedir="${srcdir}/${with_multisrctop}../../../.." + else + newlib_basedir="${srcdir}/${with_multisrctop}../../.." + fi +else + newlib_basedir="${srcdir}/../../.." +fi + + + + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='newlib' + VERSION='3.1.0' + + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + +# FIXME: We temporarily define our own version of AC_PROG_CC. This is +# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We +# are probably using a cross compiler, which will not be able to fully +# link an executable. This should really be fixed in autoconf +# itself. + + + + + + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5 +$as_echo_n "checking whether we are using GNU C... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.c <&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_c_compiler_gnu=yes +else + ac_cv_c_compiler_gnu=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } + +if test $ac_cv_c_compiler_gnu = yes; then + GCC=yes + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + elif test $ac_cv_prog_cc_g = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-O2" + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AS="${ac_tool_prefix}as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AS="as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args. +set dummy ${ac_tool_prefix}readelf; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_READELF+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$READELF"; then + ac_cv_prog_READELF="$READELF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_READELF="${ac_tool_prefix}readelf" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +READELF=$ac_cv_prog_READELF +if test -n "$READELF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5 +$as_echo "$READELF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_READELF"; then + ac_ct_READELF=$READELF + # Extract the first word of "readelf", so it can be a program name with args. +set dummy readelf; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_READELF+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_READELF"; then + ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_READELF="readelf" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_READELF=$ac_cv_prog_ac_ct_READELF +if test -n "$ac_ct_READELF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5 +$as_echo "$ac_ct_READELF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_READELF" = x; then + READELF=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + READELF=$ac_ct_READELF + fi +else + READELF="$ac_cv_prog_READELF" +fi + + + + +# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */ +ac_given_INSTALL=$INSTALL + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + +# By default we simply use the C compiler to build assembly code. + +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS + + + + +# We need AC_EXEEXT to keep automake happy in cygnus mode. However, +# at least currently, we never actually build a program, so we never +# need to use $(EXEEXT). Moreover, the test for EXEEXT normally +# fails, because we are probably configuring with a cross compiler +# which can't create executables. So we include AC_EXEEXT to keep +# automake happy, but we don't execute it, since we don't care about +# the result. +if false; then + + dummy_var=1 +fi + +. ${newlib_basedir}/configure.host + +NEWLIB_CFLAGS=${newlib_cflags} + + +NO_INCLUDE_LIST=${noinclude} + + +LDFLAGS=${ldflags} + + + if test x${newlib_elix_level} = x0; then + ELIX_LEVEL_0_TRUE= + ELIX_LEVEL_0_FALSE='#' +else + ELIX_LEVEL_0_TRUE='#' + ELIX_LEVEL_0_FALSE= +fi + + if test x${newlib_elix_level} = x1; then + ELIX_LEVEL_1_TRUE= + ELIX_LEVEL_1_FALSE='#' +else + ELIX_LEVEL_1_TRUE='#' + ELIX_LEVEL_1_FALSE= +fi + + if test x${newlib_elix_level} = x2; then + ELIX_LEVEL_2_TRUE= + ELIX_LEVEL_2_FALSE='#' +else + ELIX_LEVEL_2_TRUE='#' + ELIX_LEVEL_2_FALSE= +fi + + if test x${newlib_elix_level} = x3; then + ELIX_LEVEL_3_TRUE= + ELIX_LEVEL_3_FALSE='#' +else + ELIX_LEVEL_3_TRUE='#' + ELIX_LEVEL_3_FALSE= +fi + + if test x${newlib_elix_level} = x4; then + ELIX_LEVEL_4_TRUE= + ELIX_LEVEL_4_FALSE='#' +else + ELIX_LEVEL_4_TRUE='#' + ELIX_LEVEL_4_FALSE= +fi + + + if test x${use_libtool} = xyes; then + USE_LIBTOOL_TRUE= + USE_LIBTOOL_FALSE='#' +else + USE_LIBTOOL_TRUE='#' + USE_LIBTOOL_FALSE= +fi + + +# Emit any target-specific warnings. +if test "x${newlib_msg_warn}" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${newlib_msg_warn}" >&5 +$as_echo "$as_me: WARNING: ${newlib_msg_warn}" >&2;} +fi + +# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we +# use oext, which is set in configure.host based on the target platform. +OBJEXT=${oext} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`print -r -- -n 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + +if test "${use_libtool}" = "yes"; then +enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AS="${ac_tool_prefix}as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AS="as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + + ;; +esac + +test -z "$AS" && AS=as + + + + + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.2.7a' +macro_revision='1.3134' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +fi + + + + + + + + + + + + + + + + + + + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + + + + + +# Set options + + + + enable_dlopen=no + + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; pic_mode="$withval" +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + lt_prog_compiler_pic='-fPIC' + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + lt_prog_compiler_pic='-Xcompiler -fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +$as_echo "$lt_prog_compiler_pic" >&6; } + + + + + + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' + archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec='' + fi + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo(void) {} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 11446 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +void fnord () __attribute__((visibility("default"))); +#endif + +void fnord () { int i=42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 11552 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +void fnord () __attribute__((visibility("default"))); +#endif + +void fnord () { int i=42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + +fi + +ac_config_files="$ac_config_files Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then + as_fn_error $? "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_0\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_1\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_3\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_4\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then + as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by newlib $as_me 3.1.0, which was +generated by GNU Autoconf 2.68. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Configuration commands: +$config_commands + +Report bugs to the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +newlib config.status 3.1.0 +configured by $0, generated by GNU Autoconf 2.68, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2010 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in SED \ +SHELL \ +ECHO \ +AS \ +DLLTOOL \ +OBJDUMP \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +deplibs_check_method \ +file_magic_cmd \ +AR \ +AR_FLAGS \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_wl \ +lt_prog_compiler_pic \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_flag_spec_ld \ +hardcode_libdir_separator \ +fix_srcfile_path \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +install_override_mode \ +finish_eval \ +old_striplib \ +striplib; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="" + +# ### BEGIN LIBTOOL CONFIG + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# Assembler program. +AS=$lt_AS + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Object dumper program. +OBJDUMP=$lt_OBJDUMP + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into a binary +# during linking. This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $* )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "${1}" | $SED "$basename"` +} + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[^=]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$@"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1+=\$2" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1=\$$1\$2" +} + +_LT_EOF + ;; + esac + + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/newlib/libm/machine/x86_64/configure.in b/newlib/libm/machine/x86_64/configure.in new file mode 100644 index 000000000..29492a608 --- /dev/null +++ b/newlib/libm/machine/x86_64/configure.in @@ -0,0 +1,25 @@ +dnl This is the newlib/libc/machine/x86_64 configure.in file. +dnl Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.59) +AC_INIT([newlib],[NEWLIB_VERSION]) +AC_CONFIG_SRCDIR([Makefile.am]) + +dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake. +AC_CONFIG_AUX_DIR(../../../..) + +NEWLIB_CONFIGURE(../../..) + +dnl We have to add the following lines because automake detects the +dnl references to libtool libraries from aclocal and tries to verify that +dnl AM_PROG_LIBTOOL is being used. This code must occur after +dnl NEWLIB_CONFIGURE. +_LT_DECL_SED +_LT_PROG_ECHO_BACKSLASH +if test "${use_libtool}" = "yes"; then +AC_LIBTOOL_WIN32_DLL +AM_PROG_LIBTOOL +fi + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/newlib/libm/machine/x86_64/feclearexcept.c b/newlib/libm/machine/x86_64/feclearexcept.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/x86_64/feclearexcept.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fegetenv.c b/newlib/libm/machine/x86_64/fegetenv.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/x86_64/fegetenv.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fegetexceptflag.c b/newlib/libm/machine/x86_64/fegetexceptflag.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/x86_64/fegetexceptflag.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fegetround.c b/newlib/libm/machine/x86_64/fegetround.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/x86_64/fegetround.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/feholdexcept.c b/newlib/libm/machine/x86_64/feholdexcept.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/x86_64/feholdexcept.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fenv.c b/newlib/libm/machine/x86_64/fenv.c new file mode 100644 index 000000000..ccc08e2d8 --- /dev/null +++ b/newlib/libm/machine/x86_64/fenv.c @@ -0,0 +1,477 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2010-2019 Red Hat, Inc. + */ + +#define _GNU_SOURCE // for FE_NOMASK_ENV + +#include +#include +#include // for memcpy +#include + +/* x87 supports subnormal numbers so we need it below. */ +#define __FE_DENORM (1 << 1) +/* mask (= 0x3f) to disable all exceptions at initialization */ +#define __FE_ALL_EXCEPT_X86 (FE_ALL_EXCEPT | __FE_DENORM) + +/* Mask and shift amount for rounding bits. */ +#define FE_CW_ROUND_MASK (0x0c00) +#define FE_CW_ROUND_SHIFT (10) +/* Same, for SSE MXCSR. */ +#define FE_MXCSR_ROUND_MASK (0x6000) +#define FE_MXCSR_ROUND_SHIFT (13) + +/* Mask and shift amount for precision bits. */ +#define FE_CW_PREC_MASK (0x0300) +#define FE_CW_PREC_SHIFT (8) + +/* In x87, exception status bits and mask bits occupy + corresponding bit positions in the status and control + registers, respectively. In SSE, they are both located + in the control-and-status register, with the status bits + corresponding to the x87 positions, and the mask bits + shifted by this amount to the left. */ +#define FE_SSE_EXCEPT_MASK_SHIFT (7) + +/* These are writable so we can initialise them at startup. */ +static fenv_t fe_nomask_env; + +/* These pointers provide the outside world with read-only access to them. */ +const fenv_t *_fe_nomask_env = &fe_nomask_env; + +/* Assume i686 or above (hence SSE available) these days, with the + compiler feels free to use it (depending on compile- time flags of + course), but we should avoid needlessly breaking any purely integer mode + apps (or apps compiled with -mno-sse), so we only manage SSE state in this + fenv module if we detect that SSE instructions are available at runtime. + If we didn't do this, all applications run on older machines would bomb + out with an invalid instruction exception right at startup; let's not + be *that* WJM! */ +static inline bool use_sse(void) +{ + unsigned int edx, eax; + + /* Check for presence of SSE: invoke CPUID #1, check EDX bit 25. */ + eax = 1; + __asm__ volatile ("cpuid" : "=d" (edx), "+a" (eax) :: "%ecx", "%ebx"); + /* If this flag isn't set we'll avoid trying to execute any SSE. */ + if ((edx & (1 << 25)) != 0) + return true; + + return false; +} + +/* forward declaration */ +static void _feinitialise (void); + +/* This function enables traps for each of the exceptions as indicated + by the parameter except. The individual exceptions are described in + [ ... glibc manual xref elided ...]. Only the specified exceptions are + enabled, the status of the other exceptions is not changed. + The function returns the previous enabled exceptions in case the + operation was successful, -1 otherwise. */ +int +feenableexcept (int excepts) +{ + unsigned short cw, old_cw; + unsigned int mxcsr = 0; + + if (excepts & ~FE_ALL_EXCEPT) + return -1; + + /* Get control words. */ + __asm__ volatile ("fnstcw %0" : "=m" (old_cw) : ); + if (use_sse()) + __asm__ volatile ("stmxcsr %0" : "=m" (mxcsr) : ); + + /* Enable exceptions by clearing mask bits. */ + cw = old_cw & ~excepts; + mxcsr &= ~(excepts << FE_SSE_EXCEPT_MASK_SHIFT); + + /* Store updated control words. */ + __asm__ volatile ("fldcw %0" :: "m" (cw)); + if (use_sse()) + __asm__ volatile ("ldmxcsr %0" :: "m" (mxcsr)); + + /* Return old value. We assume SSE and x87 stay in sync. Note that + we are returning a mask of enabled exceptions, which is the opposite + of the flags in the register, which are set to disable (mask) their + related exceptions. */ + return (~old_cw) & FE_ALL_EXCEPT; +} + +/* This function disables traps for each of the exceptions as indicated + by the parameter except. The individual exceptions are described in + [ ... glibc manual xref elided ...]. Only the specified exceptions are + disabled, the status of the other exceptions is not changed. + The function returns the previous enabled exceptions in case the + operation was successful, -1 otherwise. */ +int +fedisableexcept (int excepts) +{ + unsigned short cw, old_cw; + unsigned int mxcsr = 0; + + if (excepts & ~FE_ALL_EXCEPT) + return -1; + + /* Get control words. */ + __asm__ volatile ("fnstcw %0" : "=m" (old_cw) : ); + if (use_sse()) + __asm__ volatile ("stmxcsr %0" : "=m" (mxcsr) : ); + + /* Disable exceptions by setting mask bits. */ + cw = old_cw | excepts; + mxcsr |= (excepts << FE_SSE_EXCEPT_MASK_SHIFT); + + /* Store updated control words. */ + __asm__ volatile ("fldcw %0" :: "m" (cw)); + if (use_sse()) + __asm__ volatile ("ldmxcsr %0" :: "m" (mxcsr)); + + /* Return old value. We assume SSE and x87 stay in sync. Note that + we are returning a mask of enabled exceptions, which is the opposite + of the flags in the register, which are set to disable (mask) their + related exceptions. */ + return (~old_cw) & FE_ALL_EXCEPT; +} + +/* This function returns a bitmask of all currently enabled exceptions. It + returns -1 in case of failure. */ +int +fegetexcept (void) +{ + unsigned short cw; + + /* Get control word. We assume SSE and x87 stay in sync. */ + __asm__ volatile ("fnstcw %0" : "=m" (cw) : ); + + /* Exception is *dis*abled when mask bit is set. */ + return (~cw) & FE_ALL_EXCEPT; +} + +/* Store the floating-point environment in the variable pointed to by envp. + The function returns zero in case the operation was successful, a non-zero + value otherwise. */ +int +fegetenv (fenv_t *envp) +{ + /* fnstenv disables all exceptions in the x87 FPU; as this is not what is + desired here, reload the cfg saved from the x87 FPU, back to the FPU */ + __asm__ volatile ("fnstenv %0\n\ + fldenv %0" + : "=m" (envp->_fpu) : ); + if (use_sse()) + __asm__ volatile ("stmxcsr %0" : "=m" (envp->_sse_mxcsr) : ); + return 0; +} + +/* Store the current floating-point environment in the object pointed to + by envp. Then clear all exception flags, and set the FPU to trap no + exceptions. Not all FPUs support trapping no exceptions; if feholdexcept + cannot set this mode, it returns nonzero value. If it succeeds, it + returns zero. */ +int +feholdexcept (fenv_t *envp) +{ + unsigned int mxcsr; + fegetenv (envp); + mxcsr = envp->_sse_mxcsr & ~FE_ALL_EXCEPT; + if (use_sse()) + __asm__ volatile ("ldmxcsr %0" :: "m" (mxcsr)); + __asm__ volatile ("fnclex"); + fedisableexcept (FE_ALL_EXCEPT); + return 0; +} + +/* Set the floating-point environment to that described by envp. The + function returns zero in case the operation was successful, a non-zero + value otherwise. */ +int +fesetenv (const fenv_t *envp) +{ + if ((envp == FE_DFL_ENV || envp == FE_NOMASK_ENV) && + envp->_fpu._fpu_cw == 0) + _feinitialise (); + + __asm__ volatile ("fldenv %0" :: "m" (envp->_fpu) ); + if (use_sse()) + __asm__ volatile ("ldmxcsr %0" :: "m" (envp->_sse_mxcsr)); + return 0; +} + +/* Like fesetenv, this function sets the floating-point environment to + that described by envp. However, if any exceptions were flagged in the + status word before feupdateenv was called, they remain flagged after + the call. In other words, after feupdateenv is called, the status + word is the bitwise OR of the previous status word and the one saved + in envp. The function returns zero in case the operation was successful, + a non-zero value otherwise. */ +int +feupdateenv (const fenv_t *envp) +{ + fenv_t envcopy; + unsigned int mxcsr = 0; + unsigned short sw; + + /* Don't want to modify *envp, but want to update environment atomically, + so take a copy and merge the existing exceptions into it. */ + memcpy (&envcopy, envp, sizeof *envp); + __asm__ volatile ("fnstsw %0" : "=m" (sw) : ); + if (use_sse()) + __asm__ volatile ("stmxcsr %0" : "=m" (mxcsr) : ); + envcopy._fpu._fpu_sw |= (sw & FE_ALL_EXCEPT); + envcopy._sse_mxcsr |= (mxcsr & FE_ALL_EXCEPT); + + return fesetenv (&envcopy); +} + +/* This function clears all of the supported exception flags indicated by + excepts. The function returns zero in case the operation was successful, + a non-zero value otherwise. */ +int +feclearexcept (int excepts) +{ + fenv_t fenv; + + if (excepts & ~FE_ALL_EXCEPT) + return EINVAL; + + /* Need to save/restore whole environment to modify status word. */ + fegetenv (&fenv); + + /* Mask undesired bits out. */ + fenv._fpu._fpu_sw &= ~excepts; + fenv._sse_mxcsr &= ~excepts; + + /* Set back into FPU state. */ + return fesetenv (&fenv); +} + +/* This function raises the supported exceptions indicated by + excepts. If more than one exception bit in excepts is set the order + in which the exceptions are raised is undefined except that overflow + (FE_OVERFLOW) or underflow (FE_UNDERFLOW) are raised before inexact + (FE_INEXACT). Whether for overflow or underflow the inexact exception + is also raised is also implementation dependent. The function returns + zero in case the operation was successful, a non-zero value otherwise. */ +int +feraiseexcept (int excepts) +{ + fenv_t fenv; + + if (excepts & ~FE_ALL_EXCEPT) + return EINVAL; + + /* Need to save/restore whole environment to modify status word. */ + __asm__ volatile ("fnstenv %0" : "=m" (fenv) : ); + + /* Set desired exception bits. */ + fenv._fpu._fpu_sw |= excepts; + + /* Set back into FPU state. */ + __asm__ volatile ("fldenv %0" :: "m" (fenv)); + + /* And trigger them - whichever are unmasked. */ + __asm__ volatile ("fwait"); + + return 0; +} + +/* Test whether the exception flags indicated by the parameter except + are currently set. If any of them are, a nonzero value is returned + which specifies which exceptions are set. Otherwise the result is zero. */ +int +fetestexcept (int excepts) +{ + unsigned short sw; + unsigned int mxcsr = 0; + + if (excepts & ~FE_ALL_EXCEPT) + return EINVAL; + + /* Get status registers. */ + __asm__ volatile ("fnstsw %0" : "=m" (sw) : ); + if (use_sse()) + __asm__ volatile ("stmxcsr %0" : "=m" (mxcsr) : ); + + /* Mask undesired bits out and return result. */ + return (sw | mxcsr) & excepts; +} +/* This function stores in the variable pointed to by flagp an + implementation-defined value representing the current setting of the + exception flags indicated by excepts. The function returns zero in + case the operation was successful, a non-zero value otherwise. */ +int +fegetexceptflag (fexcept_t *flagp, int excepts) +{ + unsigned short sw; + unsigned int mxcsr = 0; + + if (excepts & ~FE_ALL_EXCEPT) + return EINVAL; + + /* Get status registers. */ + __asm__ volatile ("fnstsw %0" : "=m" (sw) : ); + if (use_sse()) + __asm__ volatile ("stmxcsr %0" : "=m" (mxcsr) : ); + + /* Mask undesired bits out and set result. */ + *flagp = (sw | mxcsr) & excepts; + + return 0; +} + +/* This function restores the flags for the exceptions indicated by + excepts to the values stored in the variable pointed to by flagp. */ +int +fesetexceptflag (const fexcept_t *flagp, int excepts) +{ + fenv_t fenv; + + if (excepts & ~FE_ALL_EXCEPT) + return EINVAL; + + /* Need to save/restore whole environment to modify status word. */ + fegetenv (&fenv); + + /* Set/Clear desired exception bits. */ + fenv._fpu._fpu_sw &= ~excepts; + fenv._fpu._fpu_sw |= excepts & *flagp; + fenv._sse_mxcsr &= ~excepts; + fenv._sse_mxcsr |= excepts & *flagp; + + /* Set back into FPU state. */ + return fesetenv (&fenv); +} + +/* Returns the currently selected rounding mode, represented by one of the + values of the defined rounding mode macros. */ +int +fegetround (void) +{ + unsigned short cw; + + /* Get control word. We assume SSE and x87 stay in sync. */ + __asm__ volatile ("fnstcw %0" : "=m" (cw) : ); + + return (cw & FE_CW_ROUND_MASK) >> FE_CW_ROUND_SHIFT; +} + +/* Changes the currently selected rounding mode to round. If round does + not correspond to one of the supported rounding modes nothing is changed. + fesetround returns zero if it changed the rounding mode, a nonzero value + if the mode is not supported. */ +int +fesetround (int round) +{ + unsigned short cw; + unsigned int mxcsr = 0; + + /* Will succeed for any valid value of the input parameter. */ + if (round < FE_TONEAREST || round > FE_TOWARDZERO) + return EINVAL; + + /* Get control words. */ + __asm__ volatile ("fnstcw %0" : "=m" (cw) : ); + if (use_sse()) + __asm__ volatile ("stmxcsr %0" : "=m" (mxcsr) : ); + + /* Twiddle bits. */ + cw &= ~FE_CW_ROUND_MASK; + cw |= (round << FE_CW_ROUND_SHIFT); + mxcsr &= ~FE_MXCSR_ROUND_MASK; + mxcsr |= (round << FE_MXCSR_ROUND_SHIFT); + + /* Set back into FPU state. */ + __asm__ volatile ("fldcw %0" :: "m" (cw)); + if (use_sse()) + __asm__ volatile ("ldmxcsr %0" :: "m" (mxcsr)); + + /* Indicate success. */ + return 0; +} + +#if defined(__CYGWIN__) +/* Returns the currently selected precision, represented by one of the + values of the defined precision macros. */ +int +fegetprec (void) +{ + unsigned short cw; + + /* Get control word. */ + __asm__ volatile ("fnstcw %0" : "=m" (cw) : ); + + return (cw & FE_CW_PREC_MASK) >> FE_CW_PREC_SHIFT; +} + +/* http://www.open-std.org/jtc1/sc22//WG14/www/docs/n752.htm: + + The fesetprec function establishes the precision represented by its + argument prec. If the argument does not match a precision macro, the + precision is not changed. + + The fesetprec function returns a nonzero value if and only if the + argument matches a precision macro (that is, if and only if the requested + precision can be established). */ +int +fesetprec (int prec) +{ + unsigned short cw; + + /* Will succeed for any valid value of the input parameter. */ + switch (prec) + { + case FE_FLTPREC: + case FE_DBLPREC: + case FE_LDBLPREC: + break; + default: + return 0; + } + + /* Get control word. */ + __asm__ volatile ("fnstcw %0" : "=m" (cw) : ); + + /* Twiddle bits. */ + cw &= ~FE_CW_PREC_MASK; + cw |= (prec << FE_CW_PREC_SHIFT); + + /* Set back into FPU state. */ + __asm__ volatile ("fldcw %0" :: "m" (cw)); + + /* Indicate success. */ + return 1; +} +#endif + +/* Set up the FPU and SSE environment at the start of execution. */ +static void +_feinitialise (void) +{ + extern fenv_t __fe_dfl_env; + + /* Reset FPU: extended prec, all exceptions cleared and masked off. */ + __asm__ volatile ("fninit"); + /* The default cw value, 0x37f, is rounding mode zero. The MXCSR has + no precision control, so the only thing to do is set the exception + mask bits. */ + + /* initialize the MXCSR register: mask all exceptions */ + unsigned int mxcsr = __FE_ALL_EXCEPT_X86 << FE_SSE_EXCEPT_MASK_SHIFT; + if (use_sse()) + __asm__ volatile ("ldmxcsr %0" :: "m" (mxcsr)); + + /* Setup unmasked environment, but leave __FE_DENORM masked. */ + feenableexcept (FE_ALL_EXCEPT); + fegetenv (&fe_nomask_env); + + /* Restore default exception masking (all masked). */ + fedisableexcept (FE_ALL_EXCEPT); + + /* Finally cache state as default environment. */ + fegetenv (&__fe_dfl_env); +} diff --git a/newlib/libm/machine/x86_64/feraiseexcept.c b/newlib/libm/machine/x86_64/feraiseexcept.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/x86_64/feraiseexcept.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fesetenv.c b/newlib/libm/machine/x86_64/fesetenv.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/x86_64/fesetenv.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fesetexceptflag.c b/newlib/libm/machine/x86_64/fesetexceptflag.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/x86_64/fesetexceptflag.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fesetround.c b/newlib/libm/machine/x86_64/fesetround.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/x86_64/fesetround.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fetestexcept.c b/newlib/libm/machine/x86_64/fetestexcept.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/x86_64/fetestexcept.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/feupdateenv.c b/newlib/libm/machine/x86_64/feupdateenv.c new file mode 120000 index 000000000..f97d27dd8 --- /dev/null +++ b/newlib/libm/machine/x86_64/feupdateenv.c @@ -0,0 +1 @@ +../../fenv/fenv_stub.c \ No newline at end of file From 9e06ba1ac310c5a2392bb9d150e4686bbb118d6c Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 9 Oct 2019 11:00:45 -0500 Subject: [PATCH 074/520] riscv/sys/fenv.h: Add missing extern for fe_dfl_env_p --- newlib/libc/machine/riscv/sys/fenv.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/newlib/libc/machine/riscv/sys/fenv.h b/newlib/libc/machine/riscv/sys/fenv.h index e69978dca..6cbd321f3 100644 --- a/newlib/libc/machine/riscv/sys/fenv.h +++ b/newlib/libc/machine/riscv/sys/fenv.h @@ -72,6 +72,8 @@ typedef size_t fenv_t; typedef size_t fexcept_t; extern const fenv_t fe_dfl_env; +extern const fenv_t *fe_dfl_env_p; + #define FE_DFL_ENV fe_dfl_env_p #endif /* _SYS_FENV_H */ From 9bedd6807dc3a1ad6c80e62a6a7aae27ca769de0 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 16 Oct 2019 21:34:08 +0900 Subject: [PATCH 075/520] Cygwin: pty: Avoid detach console in the process running as service. --- winsup/cygwin/fhandler_tty.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 1095c82eb..dbb035ff3 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1048,6 +1048,8 @@ fhandler_pty_slave::try_reattach_pcon (void) /* Do not detach from the console because re-attaching will fail if helper process is running as service account. */ + if (get_ttyp()->attach_pcon_in_fork) + return false; if (pcon_attached_to >= 0 && cygwin_shared->tty[pcon_attached_to]->attach_pcon_in_fork) return false; From 43d7f33e2cab414a9f42a03b3347bc41e029dbbc Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 16 Oct 2019 21:34:09 +0900 Subject: [PATCH 076/520] Cygwin: pty: Change the timing of clear screen. --- winsup/cygwin/fhandler_tty.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index dbb035ff3..da6119dfb 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -2716,6 +2716,19 @@ fhandler_pty_slave::fixup_after_fork (HANDLE parent) // fork_fixup (parent, inuse, "inuse"); // fhandler_pty_common::fixup_after_fork (parent); report_tty_counts (this, "inherited", ""); + + if (get_ttyp ()->need_clear_screen) + { + const char *term = getenv ("TERM"); + if (term && strcmp (term, "dumb") && !strstr (term, "emacs")) + { + /* FIXME: Clearing sequence may not be "^[[H^[[J" + depending on the terminal type. */ + DWORD n; + WriteFile (get_output_handle_cyg (), "\033[H\033[J", 6, &n, NULL); + } + get_ttyp ()->need_clear_screen = false; + } } void @@ -2759,19 +2772,6 @@ fhandler_pty_slave::fixup_after_exec () } } - if (get_ttyp ()->need_clear_screen) - { - const char *term = getenv ("TERM"); - if (term && strcmp (term, "dumb") && !strstr (term, "emacs")) - { - /* FIXME: Clearing sequence may not be "^[[H^[[J" - depending on the terminal type. */ - DWORD n; - WriteFile (get_output_handle_cyg (), "\033[H\033[J", 6, &n, NULL); - } - get_ttyp ()->need_clear_screen = false; - } - /* Set locale */ setup_locale (); From b61dc22adaf82114eee3edce91cc3433bcd27fe5 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Wed, 9 Oct 2019 20:06:02 +0000 Subject: [PATCH 077/520] Cygwin: spawnvp, spawnvpe: fail if executable is not in $PATH Call find_exec with the FE_NNF flag to enforce a NULL return when the executable isn't found in $PATH. Convert NULL to "". This aligns spawnvp and spawnvpe with execvp and execvpe. --- winsup/cygwin/release/3.1.0 | 3 +++ winsup/cygwin/spawn.cc | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/release/3.1.0 b/winsup/cygwin/release/3.1.0 index 3f2f3c86b..fb0e37215 100644 --- a/winsup/cygwin/release/3.1.0 +++ b/winsup/cygwin/release/3.1.0 @@ -91,3 +91,6 @@ Bug Fixes - If the argument to mkdir(2) or rmdir(2) is 'x:\', don't strip the trailing backslash. Addresses: https://cygwin.com/ml/cygwin/2019-08/msg00334.html + +- Make spawnvp, spawnvpe fail if the executable is not in $PATH. + Addresses: https://cygwin.com/ml/cygwin/2019-10/msg00032.html diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index f8090a6a4..f82860e72 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -1081,8 +1081,9 @@ extern "C" int spawnvp (int mode, const char *file, const char * const *argv) { path_conv buf; - return spawnve (mode | _P_PATH_TYPE_EXEC, find_exec (file, buf), argv, - cur_environ ()); + return spawnve (mode | _P_PATH_TYPE_EXEC, + find_exec (file, buf, "PATH", FE_NNF) ?: "", + argv, cur_environ ()); } extern "C" int @@ -1090,7 +1091,9 @@ spawnvpe (int mode, const char *file, const char * const *argv, const char * const *envp) { path_conv buf; - return spawnve (mode | _P_PATH_TYPE_EXEC, find_exec (file, buf), argv, envp); + return spawnve (mode | _P_PATH_TYPE_EXEC, + find_exec (file, buf, "PATH", FE_NNF) ?: "", + argv, envp); } int From 25ce0e1213dcc74e211a20ab80738ffbc1283c5c Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Tue, 22 Oct 2019 19:52:40 +0200 Subject: [PATCH 078/520] Cygwin: Provide more COM devices Provide for 128 COM devices since Windows likes to create lots of these over time (one per identifiable device and USB port). --- winsup/cygwin/devices.cc | 2406 ++++++++++++++++++++++++++++---------- winsup/cygwin/devices.in | 2 +- 2 files changed, 1761 insertions(+), 647 deletions(-) diff --git a/winsup/cygwin/devices.cc b/winsup/cygwin/devices.cc index 2e31ca366..3875a43cd 100644 --- a/winsup/cygwin/devices.cc +++ b/winsup/cygwin/devices.cc @@ -798,6 +798,70 @@ const _RDATA _device dev_storage[] = {"/dev/ttyS61", BRACK(FHDEV(DEV_SERIAL_MAJOR, 61)), "\\??\\COM62", exists_ntdev, S_IFCHR, true}, {"/dev/ttyS62", BRACK(FHDEV(DEV_SERIAL_MAJOR, 62)), "\\??\\COM63", exists_ntdev, S_IFCHR, true}, {"/dev/ttyS63", BRACK(FHDEV(DEV_SERIAL_MAJOR, 63)), "\\??\\COM64", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS64", BRACK(FHDEV(DEV_SERIAL_MAJOR, 64)), "\\??\\COM65", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS65", BRACK(FHDEV(DEV_SERIAL_MAJOR, 65)), "\\??\\COM66", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS66", BRACK(FHDEV(DEV_SERIAL_MAJOR, 66)), "\\??\\COM67", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS67", BRACK(FHDEV(DEV_SERIAL_MAJOR, 67)), "\\??\\COM68", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS68", BRACK(FHDEV(DEV_SERIAL_MAJOR, 68)), "\\??\\COM69", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS69", BRACK(FHDEV(DEV_SERIAL_MAJOR, 69)), "\\??\\COM70", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS70", BRACK(FHDEV(DEV_SERIAL_MAJOR, 70)), "\\??\\COM71", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS71", BRACK(FHDEV(DEV_SERIAL_MAJOR, 71)), "\\??\\COM72", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS72", BRACK(FHDEV(DEV_SERIAL_MAJOR, 72)), "\\??\\COM73", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS73", BRACK(FHDEV(DEV_SERIAL_MAJOR, 73)), "\\??\\COM74", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS74", BRACK(FHDEV(DEV_SERIAL_MAJOR, 74)), "\\??\\COM75", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS75", BRACK(FHDEV(DEV_SERIAL_MAJOR, 75)), "\\??\\COM76", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS76", BRACK(FHDEV(DEV_SERIAL_MAJOR, 76)), "\\??\\COM77", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS77", BRACK(FHDEV(DEV_SERIAL_MAJOR, 77)), "\\??\\COM78", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS78", BRACK(FHDEV(DEV_SERIAL_MAJOR, 78)), "\\??\\COM79", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS79", BRACK(FHDEV(DEV_SERIAL_MAJOR, 79)), "\\??\\COM80", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS80", BRACK(FHDEV(DEV_SERIAL_MAJOR, 80)), "\\??\\COM81", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS81", BRACK(FHDEV(DEV_SERIAL_MAJOR, 81)), "\\??\\COM82", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS82", BRACK(FHDEV(DEV_SERIAL_MAJOR, 82)), "\\??\\COM83", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS83", BRACK(FHDEV(DEV_SERIAL_MAJOR, 83)), "\\??\\COM84", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS84", BRACK(FHDEV(DEV_SERIAL_MAJOR, 84)), "\\??\\COM85", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS85", BRACK(FHDEV(DEV_SERIAL_MAJOR, 85)), "\\??\\COM86", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS86", BRACK(FHDEV(DEV_SERIAL_MAJOR, 86)), "\\??\\COM87", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS87", BRACK(FHDEV(DEV_SERIAL_MAJOR, 87)), "\\??\\COM88", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS88", BRACK(FHDEV(DEV_SERIAL_MAJOR, 88)), "\\??\\COM89", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS89", BRACK(FHDEV(DEV_SERIAL_MAJOR, 89)), "\\??\\COM90", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS90", BRACK(FHDEV(DEV_SERIAL_MAJOR, 90)), "\\??\\COM91", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS91", BRACK(FHDEV(DEV_SERIAL_MAJOR, 91)), "\\??\\COM92", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS92", BRACK(FHDEV(DEV_SERIAL_MAJOR, 92)), "\\??\\COM93", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS93", BRACK(FHDEV(DEV_SERIAL_MAJOR, 93)), "\\??\\COM94", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS94", BRACK(FHDEV(DEV_SERIAL_MAJOR, 94)), "\\??\\COM95", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS95", BRACK(FHDEV(DEV_SERIAL_MAJOR, 95)), "\\??\\COM96", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS96", BRACK(FHDEV(DEV_SERIAL_MAJOR, 96)), "\\??\\COM97", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS97", BRACK(FHDEV(DEV_SERIAL_MAJOR, 97)), "\\??\\COM98", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS98", BRACK(FHDEV(DEV_SERIAL_MAJOR, 98)), "\\??\\COM99", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS99", BRACK(FHDEV(DEV_SERIAL_MAJOR, 99)), "\\??\\COM100", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS100", BRACK(FHDEV(DEV_SERIAL_MAJOR, 100)), "\\??\\COM101", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS101", BRACK(FHDEV(DEV_SERIAL_MAJOR, 101)), "\\??\\COM102", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS102", BRACK(FHDEV(DEV_SERIAL_MAJOR, 102)), "\\??\\COM103", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS103", BRACK(FHDEV(DEV_SERIAL_MAJOR, 103)), "\\??\\COM104", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS104", BRACK(FHDEV(DEV_SERIAL_MAJOR, 104)), "\\??\\COM105", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS105", BRACK(FHDEV(DEV_SERIAL_MAJOR, 105)), "\\??\\COM106", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS106", BRACK(FHDEV(DEV_SERIAL_MAJOR, 106)), "\\??\\COM107", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS107", BRACK(FHDEV(DEV_SERIAL_MAJOR, 107)), "\\??\\COM108", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS108", BRACK(FHDEV(DEV_SERIAL_MAJOR, 108)), "\\??\\COM109", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS109", BRACK(FHDEV(DEV_SERIAL_MAJOR, 109)), "\\??\\COM110", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS110", BRACK(FHDEV(DEV_SERIAL_MAJOR, 110)), "\\??\\COM111", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS111", BRACK(FHDEV(DEV_SERIAL_MAJOR, 111)), "\\??\\COM112", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS112", BRACK(FHDEV(DEV_SERIAL_MAJOR, 112)), "\\??\\COM113", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS113", BRACK(FHDEV(DEV_SERIAL_MAJOR, 113)), "\\??\\COM114", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS114", BRACK(FHDEV(DEV_SERIAL_MAJOR, 114)), "\\??\\COM115", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS115", BRACK(FHDEV(DEV_SERIAL_MAJOR, 115)), "\\??\\COM116", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS116", BRACK(FHDEV(DEV_SERIAL_MAJOR, 116)), "\\??\\COM117", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS117", BRACK(FHDEV(DEV_SERIAL_MAJOR, 117)), "\\??\\COM118", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS118", BRACK(FHDEV(DEV_SERIAL_MAJOR, 118)), "\\??\\COM119", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS119", BRACK(FHDEV(DEV_SERIAL_MAJOR, 119)), "\\??\\COM120", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS120", BRACK(FHDEV(DEV_SERIAL_MAJOR, 120)), "\\??\\COM121", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS121", BRACK(FHDEV(DEV_SERIAL_MAJOR, 121)), "\\??\\COM122", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS122", BRACK(FHDEV(DEV_SERIAL_MAJOR, 122)), "\\??\\COM123", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS123", BRACK(FHDEV(DEV_SERIAL_MAJOR, 123)), "\\??\\COM124", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS124", BRACK(FHDEV(DEV_SERIAL_MAJOR, 124)), "\\??\\COM125", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS125", BRACK(FHDEV(DEV_SERIAL_MAJOR, 125)), "\\??\\COM126", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS126", BRACK(FHDEV(DEV_SERIAL_MAJOR, 126)), "\\??\\COM127", exists_ntdev, S_IFCHR, true}, + {"/dev/ttyS127", BRACK(FHDEV(DEV_SERIAL_MAJOR, 127)), "\\??\\COM128", exists_ntdev, S_IFCHR, true}, {"/dev/urandom", BRACK(FH_URANDOM), "\\Device\\Null", exists_ntdev, S_IFCHR, true}, {"/dev/windows", BRACK(FH_WINDOWS), "\\Device\\Null", exists_ntdev, S_IFCHR, true}, {"/dev/zero", BRACK(FH_ZERO), "\\Device\\Null", exists_ntdev, S_IFCHR, true}, @@ -935,9 +999,9 @@ const _RDATA _device dev_storage[] = const _device *cons_dev = dev_storage + 20; const _device *console_dev = dev_storage + 148; -const _device *ptym_dev = dev_storage + 656; +const _device *ptym_dev = dev_storage + 720; const _device *ptys_dev = dev_storage + 297; -const _device *urandom_dev = dev_storage + 651; +const _device *urandom_dev = dev_storage + 715; static KR_device_t KR_find_keyword (const char *KR_keyword, int KR_length) @@ -967,7 +1031,7 @@ return NULL; if (strncmp (KR_keyword, ":pipe", 5) == 0) { { -return dev_storage + 655; +return dev_storage + 719; } } @@ -982,7 +1046,7 @@ return NULL; if (strncmp (KR_keyword, ":fifo", 5) == 0) { { -return dev_storage + 654; +return dev_storage + 718; } } @@ -1006,7 +1070,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym9", 6) == 0) { { -return dev_storage + 665; +return dev_storage + 729; } } @@ -1021,7 +1085,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym8", 6) == 0) { { -return dev_storage + 664; +return dev_storage + 728; } } @@ -1036,7 +1100,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym7", 6) == 0) { { -return dev_storage + 663; +return dev_storage + 727; } } @@ -1051,7 +1115,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym6", 6) == 0) { { -return dev_storage + 662; +return dev_storage + 726; } } @@ -1066,7 +1130,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym5", 6) == 0) { { -return dev_storage + 661; +return dev_storage + 725; } } @@ -1081,7 +1145,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym4", 6) == 0) { { -return dev_storage + 660; +return dev_storage + 724; } } @@ -1096,7 +1160,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym3", 6) == 0) { { -return dev_storage + 659; +return dev_storage + 723; } } @@ -1111,7 +1175,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym2", 6) == 0) { { -return dev_storage + 658; +return dev_storage + 722; } } @@ -1126,7 +1190,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym1", 6) == 0) { { -return dev_storage + 657; +return dev_storage + 721; } } @@ -1141,7 +1205,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym0", 6) == 0) { { -return dev_storage + 656; +return dev_storage + 720; } } @@ -1168,7 +1232,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym99", 7) == 0) { { -return dev_storage + 755; +return dev_storage + 819; } } @@ -1183,7 +1247,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym98", 7) == 0) { { -return dev_storage + 754; +return dev_storage + 818; } } @@ -1198,7 +1262,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym97", 7) == 0) { { -return dev_storage + 753; +return dev_storage + 817; } } @@ -1213,7 +1277,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym96", 7) == 0) { { -return dev_storage + 752; +return dev_storage + 816; } } @@ -1228,7 +1292,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym95", 7) == 0) { { -return dev_storage + 751; +return dev_storage + 815; } } @@ -1243,7 +1307,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym94", 7) == 0) { { -return dev_storage + 750; +return dev_storage + 814; } } @@ -1258,7 +1322,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym93", 7) == 0) { { -return dev_storage + 749; +return dev_storage + 813; } } @@ -1273,7 +1337,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym92", 7) == 0) { { -return dev_storage + 748; +return dev_storage + 812; } } @@ -1288,7 +1352,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym91", 7) == 0) { { -return dev_storage + 747; +return dev_storage + 811; } } @@ -1303,7 +1367,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym90", 7) == 0) { { -return dev_storage + 746; +return dev_storage + 810; } } @@ -1327,7 +1391,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym89", 7) == 0) { { -return dev_storage + 745; +return dev_storage + 809; } } @@ -1342,7 +1406,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym88", 7) == 0) { { -return dev_storage + 744; +return dev_storage + 808; } } @@ -1357,7 +1421,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym87", 7) == 0) { { -return dev_storage + 743; +return dev_storage + 807; } } @@ -1372,7 +1436,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym86", 7) == 0) { { -return dev_storage + 742; +return dev_storage + 806; } } @@ -1387,7 +1451,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym85", 7) == 0) { { -return dev_storage + 741; +return dev_storage + 805; } } @@ -1402,7 +1466,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym84", 7) == 0) { { -return dev_storage + 740; +return dev_storage + 804; } } @@ -1417,7 +1481,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym83", 7) == 0) { { -return dev_storage + 739; +return dev_storage + 803; } } @@ -1432,7 +1496,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym82", 7) == 0) { { -return dev_storage + 738; +return dev_storage + 802; } } @@ -1447,7 +1511,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym81", 7) == 0) { { -return dev_storage + 737; +return dev_storage + 801; } } @@ -1462,7 +1526,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym80", 7) == 0) { { -return dev_storage + 736; +return dev_storage + 800; } } @@ -1486,7 +1550,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym79", 7) == 0) { { -return dev_storage + 735; +return dev_storage + 799; } } @@ -1501,7 +1565,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym78", 7) == 0) { { -return dev_storage + 734; +return dev_storage + 798; } } @@ -1516,7 +1580,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym77", 7) == 0) { { -return dev_storage + 733; +return dev_storage + 797; } } @@ -1531,7 +1595,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym76", 7) == 0) { { -return dev_storage + 732; +return dev_storage + 796; } } @@ -1546,7 +1610,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym75", 7) == 0) { { -return dev_storage + 731; +return dev_storage + 795; } } @@ -1561,7 +1625,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym74", 7) == 0) { { -return dev_storage + 730; +return dev_storage + 794; } } @@ -1576,7 +1640,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym73", 7) == 0) { { -return dev_storage + 729; +return dev_storage + 793; } } @@ -1591,7 +1655,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym72", 7) == 0) { { -return dev_storage + 728; +return dev_storage + 792; } } @@ -1606,7 +1670,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym71", 7) == 0) { { -return dev_storage + 727; +return dev_storage + 791; } } @@ -1621,7 +1685,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym70", 7) == 0) { { -return dev_storage + 726; +return dev_storage + 790; } } @@ -1645,7 +1709,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym69", 7) == 0) { { -return dev_storage + 725; +return dev_storage + 789; } } @@ -1660,7 +1724,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym68", 7) == 0) { { -return dev_storage + 724; +return dev_storage + 788; } } @@ -1675,7 +1739,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym67", 7) == 0) { { -return dev_storage + 723; +return dev_storage + 787; } } @@ -1690,7 +1754,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym66", 7) == 0) { { -return dev_storage + 722; +return dev_storage + 786; } } @@ -1705,7 +1769,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym65", 7) == 0) { { -return dev_storage + 721; +return dev_storage + 785; } } @@ -1720,7 +1784,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym64", 7) == 0) { { -return dev_storage + 720; +return dev_storage + 784; } } @@ -1735,7 +1799,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym63", 7) == 0) { { -return dev_storage + 719; +return dev_storage + 783; } } @@ -1750,7 +1814,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym62", 7) == 0) { { -return dev_storage + 718; +return dev_storage + 782; } } @@ -1765,7 +1829,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym61", 7) == 0) { { -return dev_storage + 717; +return dev_storage + 781; } } @@ -1780,7 +1844,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym60", 7) == 0) { { -return dev_storage + 716; +return dev_storage + 780; } } @@ -1804,7 +1868,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym59", 7) == 0) { { -return dev_storage + 715; +return dev_storage + 779; } } @@ -1819,7 +1883,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym58", 7) == 0) { { -return dev_storage + 714; +return dev_storage + 778; } } @@ -1834,7 +1898,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym57", 7) == 0) { { -return dev_storage + 713; +return dev_storage + 777; } } @@ -1849,7 +1913,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym56", 7) == 0) { { -return dev_storage + 712; +return dev_storage + 776; } } @@ -1864,7 +1928,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym55", 7) == 0) { { -return dev_storage + 711; +return dev_storage + 775; } } @@ -1879,7 +1943,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym54", 7) == 0) { { -return dev_storage + 710; +return dev_storage + 774; } } @@ -1894,7 +1958,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym53", 7) == 0) { { -return dev_storage + 709; +return dev_storage + 773; } } @@ -1909,7 +1973,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym52", 7) == 0) { { -return dev_storage + 708; +return dev_storage + 772; } } @@ -1924,7 +1988,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym51", 7) == 0) { { -return dev_storage + 707; +return dev_storage + 771; } } @@ -1939,7 +2003,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym50", 7) == 0) { { -return dev_storage + 706; +return dev_storage + 770; } } @@ -1963,7 +2027,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym49", 7) == 0) { { -return dev_storage + 705; +return dev_storage + 769; } } @@ -1978,7 +2042,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym48", 7) == 0) { { -return dev_storage + 704; +return dev_storage + 768; } } @@ -1993,7 +2057,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym47", 7) == 0) { { -return dev_storage + 703; +return dev_storage + 767; } } @@ -2008,7 +2072,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym46", 7) == 0) { { -return dev_storage + 702; +return dev_storage + 766; } } @@ -2023,7 +2087,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym45", 7) == 0) { { -return dev_storage + 701; +return dev_storage + 765; } } @@ -2038,7 +2102,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym44", 7) == 0) { { -return dev_storage + 700; +return dev_storage + 764; } } @@ -2053,7 +2117,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym43", 7) == 0) { { -return dev_storage + 699; +return dev_storage + 763; } } @@ -2068,7 +2132,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym42", 7) == 0) { { -return dev_storage + 698; +return dev_storage + 762; } } @@ -2083,7 +2147,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym41", 7) == 0) { { -return dev_storage + 697; +return dev_storage + 761; } } @@ -2098,7 +2162,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym40", 7) == 0) { { -return dev_storage + 696; +return dev_storage + 760; } } @@ -2122,7 +2186,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym39", 7) == 0) { { -return dev_storage + 695; +return dev_storage + 759; } } @@ -2137,7 +2201,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym38", 7) == 0) { { -return dev_storage + 694; +return dev_storage + 758; } } @@ -2152,7 +2216,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym37", 7) == 0) { { -return dev_storage + 693; +return dev_storage + 757; } } @@ -2167,7 +2231,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym36", 7) == 0) { { -return dev_storage + 692; +return dev_storage + 756; } } @@ -2182,7 +2246,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym35", 7) == 0) { { -return dev_storage + 691; +return dev_storage + 755; } } @@ -2197,7 +2261,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym34", 7) == 0) { { -return dev_storage + 690; +return dev_storage + 754; } } @@ -2212,7 +2276,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym33", 7) == 0) { { -return dev_storage + 689; +return dev_storage + 753; } } @@ -2227,7 +2291,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym32", 7) == 0) { { -return dev_storage + 688; +return dev_storage + 752; } } @@ -2242,7 +2306,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym31", 7) == 0) { { -return dev_storage + 687; +return dev_storage + 751; } } @@ -2257,7 +2321,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym30", 7) == 0) { { -return dev_storage + 686; +return dev_storage + 750; } } @@ -2281,7 +2345,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym29", 7) == 0) { { -return dev_storage + 685; +return dev_storage + 749; } } @@ -2296,7 +2360,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym28", 7) == 0) { { -return dev_storage + 684; +return dev_storage + 748; } } @@ -2311,7 +2375,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym27", 7) == 0) { { -return dev_storage + 683; +return dev_storage + 747; } } @@ -2326,7 +2390,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym26", 7) == 0) { { -return dev_storage + 682; +return dev_storage + 746; } } @@ -2341,7 +2405,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym25", 7) == 0) { { -return dev_storage + 681; +return dev_storage + 745; } } @@ -2356,7 +2420,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym24", 7) == 0) { { -return dev_storage + 680; +return dev_storage + 744; } } @@ -2371,7 +2435,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym23", 7) == 0) { { -return dev_storage + 679; +return dev_storage + 743; } } @@ -2386,7 +2450,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym22", 7) == 0) { { -return dev_storage + 678; +return dev_storage + 742; } } @@ -2401,7 +2465,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym21", 7) == 0) { { -return dev_storage + 677; +return dev_storage + 741; } } @@ -2416,7 +2480,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym20", 7) == 0) { { -return dev_storage + 676; +return dev_storage + 740; } } @@ -2440,7 +2504,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym19", 7) == 0) { { -return dev_storage + 675; +return dev_storage + 739; } } @@ -2455,7 +2519,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym18", 7) == 0) { { -return dev_storage + 674; +return dev_storage + 738; } } @@ -2470,7 +2534,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym17", 7) == 0) { { -return dev_storage + 673; +return dev_storage + 737; } } @@ -2485,7 +2549,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym16", 7) == 0) { { -return dev_storage + 672; +return dev_storage + 736; } } @@ -2500,7 +2564,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym15", 7) == 0) { { -return dev_storage + 671; +return dev_storage + 735; } } @@ -2515,7 +2579,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym14", 7) == 0) { { -return dev_storage + 670; +return dev_storage + 734; } } @@ -2530,7 +2594,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym13", 7) == 0) { { -return dev_storage + 669; +return dev_storage + 733; } } @@ -2545,7 +2609,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym12", 7) == 0) { { -return dev_storage + 668; +return dev_storage + 732; } } @@ -2560,7 +2624,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym11", 7) == 0) { { -return dev_storage + 667; +return dev_storage + 731; } } @@ -2575,7 +2639,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym10", 7) == 0) { { -return dev_storage + 666; +return dev_storage + 730; } } @@ -2683,7 +2747,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym119", 8) == 0) { { -return dev_storage + 775; +return dev_storage + 839; } } @@ -2698,7 +2762,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym109", 8) == 0) { { -return dev_storage + 765; +return dev_storage + 829; } } @@ -2767,7 +2831,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym118", 8) == 0) { { -return dev_storage + 774; +return dev_storage + 838; } } @@ -2782,7 +2846,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym108", 8) == 0) { { -return dev_storage + 764; +return dev_storage + 828; } } @@ -2851,7 +2915,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym127", 8) == 0) { { -return dev_storage + 783; +return dev_storage + 847; } } @@ -2866,7 +2930,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym117", 8) == 0) { { -return dev_storage + 773; +return dev_storage + 837; } } @@ -2881,7 +2945,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym107", 8) == 0) { { -return dev_storage + 763; +return dev_storage + 827; } } @@ -2950,7 +3014,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym126", 8) == 0) { { -return dev_storage + 782; +return dev_storage + 846; } } @@ -2965,7 +3029,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym116", 8) == 0) { { -return dev_storage + 772; +return dev_storage + 836; } } @@ -2980,7 +3044,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym106", 8) == 0) { { -return dev_storage + 762; +return dev_storage + 826; } } @@ -3049,7 +3113,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym125", 8) == 0) { { -return dev_storage + 781; +return dev_storage + 845; } } @@ -3064,7 +3128,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym115", 8) == 0) { { -return dev_storage + 771; +return dev_storage + 835; } } @@ -3079,7 +3143,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym105", 8) == 0) { { -return dev_storage + 761; +return dev_storage + 825; } } @@ -3148,7 +3212,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym124", 8) == 0) { { -return dev_storage + 780; +return dev_storage + 844; } } @@ -3163,7 +3227,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym114", 8) == 0) { { -return dev_storage + 770; +return dev_storage + 834; } } @@ -3178,7 +3242,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym104", 8) == 0) { { -return dev_storage + 760; +return dev_storage + 824; } } @@ -3247,7 +3311,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym123", 8) == 0) { { -return dev_storage + 779; +return dev_storage + 843; } } @@ -3262,7 +3326,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym113", 8) == 0) { { -return dev_storage + 769; +return dev_storage + 833; } } @@ -3277,7 +3341,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym103", 8) == 0) { { -return dev_storage + 759; +return dev_storage + 823; } } @@ -3346,7 +3410,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym122", 8) == 0) { { -return dev_storage + 778; +return dev_storage + 842; } } @@ -3361,7 +3425,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym112", 8) == 0) { { -return dev_storage + 768; +return dev_storage + 832; } } @@ -3376,7 +3440,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym102", 8) == 0) { { -return dev_storage + 758; +return dev_storage + 822; } } @@ -3445,7 +3509,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym121", 8) == 0) { { -return dev_storage + 777; +return dev_storage + 841; } } @@ -3460,7 +3524,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym111", 8) == 0) { { -return dev_storage + 767; +return dev_storage + 831; } } @@ -3475,7 +3539,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym101", 8) == 0) { { -return dev_storage + 757; +return dev_storage + 821; } } @@ -3544,7 +3608,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym120", 8) == 0) { { -return dev_storage + 776; +return dev_storage + 840; } } @@ -3559,7 +3623,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym110", 8) == 0) { { -return dev_storage + 766; +return dev_storage + 830; } } @@ -3574,7 +3638,7 @@ return NULL; if (strncmp (KR_keyword, ":ptym100", 8) == 0) { { -return dev_storage + 756; +return dev_storage + 820; } } @@ -3619,7 +3683,7 @@ return NULL; if (strncmp (KR_keyword, "/dev/zero", 9) == 0) { { -return dev_storage + 653; +return dev_storage + 717; } } @@ -9913,153 +9977,321 @@ return NULL; } } case '9': - switch (KR_keyword [10]) + switch (KR_keyword [5]) { - case '9': - if (strncmp (KR_keyword, "/dev/cons99", 11) == 0) + case 't': + switch (KR_keyword [10]) { + case '9': + if (strncmp (KR_keyword, "/dev/ttyS99", 11) == 0) + { +{ +return dev_storage + 686; + +} + } + else + { +{ +return NULL; + +} + } + case '8': + if (strncmp (KR_keyword, "/dev/ttyS98", 11) == 0) + { +{ +return dev_storage + 685; + +} + } + else + { +{ +return NULL; + +} + } + case '7': + if (strncmp (KR_keyword, "/dev/ttyS97", 11) == 0) + { +{ +return dev_storage + 684; + +} + } + else + { +{ +return NULL; + +} + } + case '6': + if (strncmp (KR_keyword, "/dev/ttyS96", 11) == 0) + { +{ +return dev_storage + 683; + +} + } + else + { +{ +return NULL; + +} + } + case '5': + if (strncmp (KR_keyword, "/dev/ttyS95", 11) == 0) + { +{ +return dev_storage + 682; + +} + } + else + { +{ +return NULL; + +} + } + case '4': + if (strncmp (KR_keyword, "/dev/ttyS94", 11) == 0) + { +{ +return dev_storage + 681; + +} + } + else + { +{ +return NULL; + +} + } + case '3': + if (strncmp (KR_keyword, "/dev/ttyS93", 11) == 0) + { +{ +return dev_storage + 680; + +} + } + else + { +{ +return NULL; + +} + } + case '2': + if (strncmp (KR_keyword, "/dev/ttyS92", 11) == 0) + { +{ +return dev_storage + 679; + +} + } + else + { +{ +return NULL; + +} + } + case '1': + if (strncmp (KR_keyword, "/dev/ttyS91", 11) == 0) + { +{ +return dev_storage + 678; + +} + } + else + { +{ +return NULL; + +} + } + case '0': + if (strncmp (KR_keyword, "/dev/ttyS90", 11) == 0) + { +{ +return dev_storage + 677; + +} + } + else + { +{ +return NULL; + +} + } + default: +{ +return NULL; + +} + } + case 'c': + switch (KR_keyword [10]) + { + case '9': + if (strncmp (KR_keyword, "/dev/cons99", 11) == 0) + { { return dev_storage + 119; } - } - else - { + } + else + { { return NULL; } - } - case '8': - if (strncmp (KR_keyword, "/dev/cons98", 11) == 0) - { + } + case '8': + if (strncmp (KR_keyword, "/dev/cons98", 11) == 0) + { { return dev_storage + 118; } - } - else - { + } + else + { { return NULL; } - } - case '7': - if (strncmp (KR_keyword, "/dev/cons97", 11) == 0) - { + } + case '7': + if (strncmp (KR_keyword, "/dev/cons97", 11) == 0) + { { return dev_storage + 117; } - } - else - { + } + else + { { return NULL; } - } - case '6': - if (strncmp (KR_keyword, "/dev/cons96", 11) == 0) - { + } + case '6': + if (strncmp (KR_keyword, "/dev/cons96", 11) == 0) + { { return dev_storage + 116; } - } - else - { + } + else + { { return NULL; } - } - case '5': - if (strncmp (KR_keyword, "/dev/cons95", 11) == 0) - { + } + case '5': + if (strncmp (KR_keyword, "/dev/cons95", 11) == 0) + { { return dev_storage + 115; } - } - else - { + } + else + { { return NULL; } - } - case '4': - if (strncmp (KR_keyword, "/dev/cons94", 11) == 0) - { + } + case '4': + if (strncmp (KR_keyword, "/dev/cons94", 11) == 0) + { { return dev_storage + 114; } - } - else - { + } + else + { { return NULL; } - } - case '3': - if (strncmp (KR_keyword, "/dev/cons93", 11) == 0) - { + } + case '3': + if (strncmp (KR_keyword, "/dev/cons93", 11) == 0) + { { return dev_storage + 113; } - } - else - { + } + else + { { return NULL; } - } - case '2': - if (strncmp (KR_keyword, "/dev/cons92", 11) == 0) - { + } + case '2': + if (strncmp (KR_keyword, "/dev/cons92", 11) == 0) + { { return dev_storage + 112; } - } - else - { + } + else + { { return NULL; } - } - case '1': - if (strncmp (KR_keyword, "/dev/cons91", 11) == 0) - { + } + case '1': + if (strncmp (KR_keyword, "/dev/cons91", 11) == 0) + { { return dev_storage + 111; } - } - else - { + } + else + { { return NULL; } - } - case '0': - if (strncmp (KR_keyword, "/dev/cons90", 11) == 0) - { + } + case '0': + if (strncmp (KR_keyword, "/dev/cons90", 11) == 0) + { { return dev_storage + 110; } - } - else - { + } + else + { +{ +return NULL; + +} + } + default: { return NULL; @@ -10072,153 +10304,321 @@ return NULL; } } case '8': - switch (KR_keyword [10]) + switch (KR_keyword [5]) { - case '9': - if (strncmp (KR_keyword, "/dev/cons89", 11) == 0) + case 't': + switch (KR_keyword [10]) { + case '9': + if (strncmp (KR_keyword, "/dev/ttyS89", 11) == 0) + { +{ +return dev_storage + 676; + +} + } + else + { +{ +return NULL; + +} + } + case '8': + if (strncmp (KR_keyword, "/dev/ttyS88", 11) == 0) + { +{ +return dev_storage + 675; + +} + } + else + { +{ +return NULL; + +} + } + case '7': + if (strncmp (KR_keyword, "/dev/ttyS87", 11) == 0) + { +{ +return dev_storage + 674; + +} + } + else + { +{ +return NULL; + +} + } + case '6': + if (strncmp (KR_keyword, "/dev/ttyS86", 11) == 0) + { +{ +return dev_storage + 673; + +} + } + else + { +{ +return NULL; + +} + } + case '5': + if (strncmp (KR_keyword, "/dev/ttyS85", 11) == 0) + { +{ +return dev_storage + 672; + +} + } + else + { +{ +return NULL; + +} + } + case '4': + if (strncmp (KR_keyword, "/dev/ttyS84", 11) == 0) + { +{ +return dev_storage + 671; + +} + } + else + { +{ +return NULL; + +} + } + case '3': + if (strncmp (KR_keyword, "/dev/ttyS83", 11) == 0) + { +{ +return dev_storage + 670; + +} + } + else + { +{ +return NULL; + +} + } + case '2': + if (strncmp (KR_keyword, "/dev/ttyS82", 11) == 0) + { +{ +return dev_storage + 669; + +} + } + else + { +{ +return NULL; + +} + } + case '1': + if (strncmp (KR_keyword, "/dev/ttyS81", 11) == 0) + { +{ +return dev_storage + 668; + +} + } + else + { +{ +return NULL; + +} + } + case '0': + if (strncmp (KR_keyword, "/dev/ttyS80", 11) == 0) + { +{ +return dev_storage + 667; + +} + } + else + { +{ +return NULL; + +} + } + default: +{ +return NULL; + +} + } + case 'c': + switch (KR_keyword [10]) + { + case '9': + if (strncmp (KR_keyword, "/dev/cons89", 11) == 0) + { { return dev_storage + 109; } - } - else - { + } + else + { { return NULL; } - } - case '8': - if (strncmp (KR_keyword, "/dev/cons88", 11) == 0) - { + } + case '8': + if (strncmp (KR_keyword, "/dev/cons88", 11) == 0) + { { return dev_storage + 108; } - } - else - { + } + else + { { return NULL; } - } - case '7': - if (strncmp (KR_keyword, "/dev/cons87", 11) == 0) - { + } + case '7': + if (strncmp (KR_keyword, "/dev/cons87", 11) == 0) + { { return dev_storage + 107; } - } - else - { + } + else + { { return NULL; } - } - case '6': - if (strncmp (KR_keyword, "/dev/cons86", 11) == 0) - { + } + case '6': + if (strncmp (KR_keyword, "/dev/cons86", 11) == 0) + { { return dev_storage + 106; } - } - else - { + } + else + { { return NULL; } - } - case '5': - if (strncmp (KR_keyword, "/dev/cons85", 11) == 0) - { + } + case '5': + if (strncmp (KR_keyword, "/dev/cons85", 11) == 0) + { { return dev_storage + 105; } - } - else - { + } + else + { { return NULL; } - } - case '4': - if (strncmp (KR_keyword, "/dev/cons84", 11) == 0) - { + } + case '4': + if (strncmp (KR_keyword, "/dev/cons84", 11) == 0) + { { return dev_storage + 104; } - } - else - { + } + else + { { return NULL; } - } - case '3': - if (strncmp (KR_keyword, "/dev/cons83", 11) == 0) - { + } + case '3': + if (strncmp (KR_keyword, "/dev/cons83", 11) == 0) + { { return dev_storage + 103; } - } - else - { + } + else + { { return NULL; } - } - case '2': - if (strncmp (KR_keyword, "/dev/cons82", 11) == 0) - { + } + case '2': + if (strncmp (KR_keyword, "/dev/cons82", 11) == 0) + { { return dev_storage + 102; } - } - else - { + } + else + { { return NULL; } - } - case '1': - if (strncmp (KR_keyword, "/dev/cons81", 11) == 0) - { + } + case '1': + if (strncmp (KR_keyword, "/dev/cons81", 11) == 0) + { { return dev_storage + 101; } - } - else - { + } + else + { { return NULL; } - } - case '0': - if (strncmp (KR_keyword, "/dev/cons80", 11) == 0) - { + } + case '0': + if (strncmp (KR_keyword, "/dev/cons80", 11) == 0) + { { return dev_storage + 100; } - } - else - { + } + else + { +{ +return NULL; + +} + } + default: { return NULL; @@ -10231,153 +10631,321 @@ return NULL; } } case '7': - switch (KR_keyword [10]) + switch (KR_keyword [5]) { - case '9': - if (strncmp (KR_keyword, "/dev/cons79", 11) == 0) + case 't': + switch (KR_keyword [10]) { + case '9': + if (strncmp (KR_keyword, "/dev/ttyS79", 11) == 0) + { +{ +return dev_storage + 666; + +} + } + else + { +{ +return NULL; + +} + } + case '8': + if (strncmp (KR_keyword, "/dev/ttyS78", 11) == 0) + { +{ +return dev_storage + 665; + +} + } + else + { +{ +return NULL; + +} + } + case '7': + if (strncmp (KR_keyword, "/dev/ttyS77", 11) == 0) + { +{ +return dev_storage + 664; + +} + } + else + { +{ +return NULL; + +} + } + case '6': + if (strncmp (KR_keyword, "/dev/ttyS76", 11) == 0) + { +{ +return dev_storage + 663; + +} + } + else + { +{ +return NULL; + +} + } + case '5': + if (strncmp (KR_keyword, "/dev/ttyS75", 11) == 0) + { +{ +return dev_storage + 662; + +} + } + else + { +{ +return NULL; + +} + } + case '4': + if (strncmp (KR_keyword, "/dev/ttyS74", 11) == 0) + { +{ +return dev_storage + 661; + +} + } + else + { +{ +return NULL; + +} + } + case '3': + if (strncmp (KR_keyword, "/dev/ttyS73", 11) == 0) + { +{ +return dev_storage + 660; + +} + } + else + { +{ +return NULL; + +} + } + case '2': + if (strncmp (KR_keyword, "/dev/ttyS72", 11) == 0) + { +{ +return dev_storage + 659; + +} + } + else + { +{ +return NULL; + +} + } + case '1': + if (strncmp (KR_keyword, "/dev/ttyS71", 11) == 0) + { +{ +return dev_storage + 658; + +} + } + else + { +{ +return NULL; + +} + } + case '0': + if (strncmp (KR_keyword, "/dev/ttyS70", 11) == 0) + { +{ +return dev_storage + 657; + +} + } + else + { +{ +return NULL; + +} + } + default: +{ +return NULL; + +} + } + case 'c': + switch (KR_keyword [10]) + { + case '9': + if (strncmp (KR_keyword, "/dev/cons79", 11) == 0) + { { return dev_storage + 99; } - } - else - { + } + else + { { return NULL; } - } - case '8': - if (strncmp (KR_keyword, "/dev/cons78", 11) == 0) - { + } + case '8': + if (strncmp (KR_keyword, "/dev/cons78", 11) == 0) + { { return dev_storage + 98; } - } - else - { + } + else + { { return NULL; } - } - case '7': - if (strncmp (KR_keyword, "/dev/cons77", 11) == 0) - { + } + case '7': + if (strncmp (KR_keyword, "/dev/cons77", 11) == 0) + { { return dev_storage + 97; } - } - else - { + } + else + { { return NULL; } - } - case '6': - if (strncmp (KR_keyword, "/dev/cons76", 11) == 0) - { + } + case '6': + if (strncmp (KR_keyword, "/dev/cons76", 11) == 0) + { { return dev_storage + 96; } - } - else - { + } + else + { { return NULL; } - } - case '5': - if (strncmp (KR_keyword, "/dev/cons75", 11) == 0) - { + } + case '5': + if (strncmp (KR_keyword, "/dev/cons75", 11) == 0) + { { return dev_storage + 95; } - } - else - { + } + else + { { return NULL; } - } - case '4': - if (strncmp (KR_keyword, "/dev/cons74", 11) == 0) - { + } + case '4': + if (strncmp (KR_keyword, "/dev/cons74", 11) == 0) + { { return dev_storage + 94; } - } - else - { + } + else + { { return NULL; } - } - case '3': - if (strncmp (KR_keyword, "/dev/cons73", 11) == 0) - { + } + case '3': + if (strncmp (KR_keyword, "/dev/cons73", 11) == 0) + { { return dev_storage + 93; } - } - else - { + } + else + { { return NULL; } - } - case '2': - if (strncmp (KR_keyword, "/dev/cons72", 11) == 0) - { + } + case '2': + if (strncmp (KR_keyword, "/dev/cons72", 11) == 0) + { { return dev_storage + 92; } - } - else - { + } + else + { { return NULL; } - } - case '1': - if (strncmp (KR_keyword, "/dev/cons71", 11) == 0) - { + } + case '1': + if (strncmp (KR_keyword, "/dev/cons71", 11) == 0) + { { return dev_storage + 91; } - } - else - { + } + else + { { return NULL; } - } - case '0': - if (strncmp (KR_keyword, "/dev/cons70", 11) == 0) - { + } + case '0': + if (strncmp (KR_keyword, "/dev/cons70", 11) == 0) + { { return dev_storage + 90; } - } - else - { + } + else + { +{ +return NULL; + +} + } + default: { return NULL; @@ -10390,102 +10958,102 @@ return NULL; } } case '6': - switch (KR_keyword [10]) + switch (KR_keyword [5]) { - case '9': - if (strncmp (KR_keyword, "/dev/cons69", 11) == 0) + case 't': + switch (KR_keyword [10]) { + case '9': + if (strncmp (KR_keyword, "/dev/ttyS69", 11) == 0) + { { -return dev_storage + 89; +return dev_storage + 656; } - } - else - { + } + else + { { return NULL; } - } - case '8': - if (strncmp (KR_keyword, "/dev/cons68", 11) == 0) - { + } + case '8': + if (strncmp (KR_keyword, "/dev/ttyS68", 11) == 0) + { { -return dev_storage + 88; +return dev_storage + 655; } - } - else - { + } + else + { { return NULL; } - } - case '7': - if (strncmp (KR_keyword, "/dev/cons67", 11) == 0) - { + } + case '7': + if (strncmp (KR_keyword, "/dev/ttyS67", 11) == 0) + { { -return dev_storage + 87; +return dev_storage + 654; } - } - else - { + } + else + { { return NULL; } - } - case '6': - if (strncmp (KR_keyword, "/dev/cons66", 11) == 0) - { + } + case '6': + if (strncmp (KR_keyword, "/dev/ttyS66", 11) == 0) + { { -return dev_storage + 86; +return dev_storage + 653; } - } - else - { + } + else + { { return NULL; } - } - case '5': - if (strncmp (KR_keyword, "/dev/cons65", 11) == 0) - { + } + case '5': + if (strncmp (KR_keyword, "/dev/ttyS65", 11) == 0) + { { -return dev_storage + 85; +return dev_storage + 652; } - } - else - { + } + else + { { return NULL; } - } - case '4': - if (strncmp (KR_keyword, "/dev/cons64", 11) == 0) - { + } + case '4': + if (strncmp (KR_keyword, "/dev/ttyS64", 11) == 0) + { { -return dev_storage + 84; +return dev_storage + 651; } - } - else - { + } + else + { { return NULL; } - } - case '3': - switch (KR_keyword [5]) - { - case 't': + } + case '3': if (strncmp (KR_keyword, "/dev/ttyS63", 11) == 0) { { @@ -10500,31 +11068,7 @@ return NULL; } } - case 'c': - if (strncmp (KR_keyword, "/dev/cons63", 11) == 0) - { -{ -return dev_storage + 83; - -} - } - else - { -{ -return NULL; - -} - } - default: -{ -return NULL; - -} - } - case '2': - switch (KR_keyword [5]) - { - case 't': + case '2': if (strncmp (KR_keyword, "/dev/ttyS62", 11) == 0) { { @@ -10539,31 +11083,7 @@ return NULL; } } - case 'c': - if (strncmp (KR_keyword, "/dev/cons62", 11) == 0) - { -{ -return dev_storage + 82; - -} - } - else - { -{ -return NULL; - -} - } - default: -{ -return NULL; - -} - } - case '1': - switch (KR_keyword [5]) - { - case 't': + case '1': if (strncmp (KR_keyword, "/dev/ttyS61", 11) == 0) { { @@ -10578,11 +11098,11 @@ return NULL; } } - case 'c': - if (strncmp (KR_keyword, "/dev/cons61", 11) == 0) + case '0': + if (strncmp (KR_keyword, "/dev/ttyS60", 11) == 0) { { -return dev_storage + 81; +return dev_storage + 647; } } @@ -10599,14 +11119,14 @@ return NULL; } } - case '0': - switch (KR_keyword [5]) + case 'c': + switch (KR_keyword [10]) { - case 't': - if (strncmp (KR_keyword, "/dev/ttyS60", 11) == 0) + case '9': + if (strncmp (KR_keyword, "/dev/cons69", 11) == 0) { { -return dev_storage + 647; +return dev_storage + 89; } } @@ -10617,7 +11137,127 @@ return NULL; } } - case 'c': + case '8': + if (strncmp (KR_keyword, "/dev/cons68", 11) == 0) + { +{ +return dev_storage + 88; + +} + } + else + { +{ +return NULL; + +} + } + case '7': + if (strncmp (KR_keyword, "/dev/cons67", 11) == 0) + { +{ +return dev_storage + 87; + +} + } + else + { +{ +return NULL; + +} + } + case '6': + if (strncmp (KR_keyword, "/dev/cons66", 11) == 0) + { +{ +return dev_storage + 86; + +} + } + else + { +{ +return NULL; + +} + } + case '5': + if (strncmp (KR_keyword, "/dev/cons65", 11) == 0) + { +{ +return dev_storage + 85; + +} + } + else + { +{ +return NULL; + +} + } + case '4': + if (strncmp (KR_keyword, "/dev/cons64", 11) == 0) + { +{ +return dev_storage + 84; + +} + } + else + { +{ +return NULL; + +} + } + case '3': + if (strncmp (KR_keyword, "/dev/cons63", 11) == 0) + { +{ +return dev_storage + 83; + +} + } + else + { +{ +return NULL; + +} + } + case '2': + if (strncmp (KR_keyword, "/dev/cons62", 11) == 0) + { +{ +return dev_storage + 82; + +} + } + else + { +{ +return NULL; + +} + } + case '1': + if (strncmp (KR_keyword, "/dev/cons61", 11) == 0) + { +{ +return dev_storage + 81; + +} + } + else + { +{ +return NULL; + +} + } + case '0': if (strncmp (KR_keyword, "/dev/cons60", 11) == 0) { { @@ -13195,7 +13835,7 @@ return NULL; if (strncmp (KR_keyword, "/dev/windows", 12) == 0) { { -return dev_storage + 652; +return dev_storage + 716; } } @@ -13210,7 +13850,7 @@ return NULL; if (strncmp (KR_keyword, "/dev/urandom", 12) == 0) { { -return dev_storage + 651; +return dev_storage + 715; } } @@ -13237,123 +13877,261 @@ return NULL; } } case '2': - switch (KR_keyword [11]) + switch (KR_keyword [5]) { - case '7': - if (strncmp (KR_keyword, "/dev/cons127", 12) == 0) + case 't': + switch (KR_keyword [11]) { + case '7': + if (strncmp (KR_keyword, "/dev/ttyS127", 12) == 0) + { +{ +return dev_storage + 714; + +} + } + else + { +{ +return NULL; + +} + } + case '6': + if (strncmp (KR_keyword, "/dev/ttyS126", 12) == 0) + { +{ +return dev_storage + 713; + +} + } + else + { +{ +return NULL; + +} + } + case '5': + if (strncmp (KR_keyword, "/dev/ttyS125", 12) == 0) + { +{ +return dev_storage + 712; + +} + } + else + { +{ +return NULL; + +} + } + case '4': + if (strncmp (KR_keyword, "/dev/ttyS124", 12) == 0) + { +{ +return dev_storage + 711; + +} + } + else + { +{ +return NULL; + +} + } + case '3': + if (strncmp (KR_keyword, "/dev/ttyS123", 12) == 0) + { +{ +return dev_storage + 710; + +} + } + else + { +{ +return NULL; + +} + } + case '2': + if (strncmp (KR_keyword, "/dev/ttyS122", 12) == 0) + { +{ +return dev_storage + 709; + +} + } + else + { +{ +return NULL; + +} + } + case '1': + if (strncmp (KR_keyword, "/dev/ttyS121", 12) == 0) + { +{ +return dev_storage + 708; + +} + } + else + { +{ +return NULL; + +} + } + case '0': + if (strncmp (KR_keyword, "/dev/ttyS120", 12) == 0) + { +{ +return dev_storage + 707; + +} + } + else + { +{ +return NULL; + +} + } + default: +{ +return NULL; + +} + } + case 'c': + switch (KR_keyword [11]) + { + case '7': + if (strncmp (KR_keyword, "/dev/cons127", 12) == 0) + { { return dev_storage + 147; } - } - else - { + } + else + { { return NULL; } - } - case '6': - if (strncmp (KR_keyword, "/dev/cons126", 12) == 0) - { + } + case '6': + if (strncmp (KR_keyword, "/dev/cons126", 12) == 0) + { { return dev_storage + 146; } - } - else - { + } + else + { { return NULL; } - } - case '5': - if (strncmp (KR_keyword, "/dev/cons125", 12) == 0) - { + } + case '5': + if (strncmp (KR_keyword, "/dev/cons125", 12) == 0) + { { return dev_storage + 145; } - } - else - { + } + else + { { return NULL; } - } - case '4': - if (strncmp (KR_keyword, "/dev/cons124", 12) == 0) - { + } + case '4': + if (strncmp (KR_keyword, "/dev/cons124", 12) == 0) + { { return dev_storage + 144; } - } - else - { + } + else + { { return NULL; } - } - case '3': - if (strncmp (KR_keyword, "/dev/cons123", 12) == 0) - { + } + case '3': + if (strncmp (KR_keyword, "/dev/cons123", 12) == 0) + { { return dev_storage + 143; } - } - else - { + } + else + { { return NULL; } - } - case '2': - if (strncmp (KR_keyword, "/dev/cons122", 12) == 0) - { + } + case '2': + if (strncmp (KR_keyword, "/dev/cons122", 12) == 0) + { { return dev_storage + 142; } - } - else - { + } + else + { { return NULL; } - } - case '1': - if (strncmp (KR_keyword, "/dev/cons121", 12) == 0) - { + } + case '1': + if (strncmp (KR_keyword, "/dev/cons121", 12) == 0) + { { return dev_storage + 141; } - } - else - { + } + else + { { return NULL; } - } - case '0': - if (strncmp (KR_keyword, "/dev/cons120", 12) == 0) - { + } + case '0': + if (strncmp (KR_keyword, "/dev/cons120", 12) == 0) + { { return dev_storage + 140; } - } - else - { + } + else + { +{ +return NULL; + +} + } + default: { return NULL; @@ -13366,153 +14144,321 @@ return NULL; } } case '1': - switch (KR_keyword [11]) + switch (KR_keyword [5]) { - case '9': - if (strncmp (KR_keyword, "/dev/cons119", 12) == 0) + case 't': + switch (KR_keyword [11]) { + case '9': + if (strncmp (KR_keyword, "/dev/ttyS119", 12) == 0) + { +{ +return dev_storage + 706; + +} + } + else + { +{ +return NULL; + +} + } + case '8': + if (strncmp (KR_keyword, "/dev/ttyS118", 12) == 0) + { +{ +return dev_storage + 705; + +} + } + else + { +{ +return NULL; + +} + } + case '7': + if (strncmp (KR_keyword, "/dev/ttyS117", 12) == 0) + { +{ +return dev_storage + 704; + +} + } + else + { +{ +return NULL; + +} + } + case '6': + if (strncmp (KR_keyword, "/dev/ttyS116", 12) == 0) + { +{ +return dev_storage + 703; + +} + } + else + { +{ +return NULL; + +} + } + case '5': + if (strncmp (KR_keyword, "/dev/ttyS115", 12) == 0) + { +{ +return dev_storage + 702; + +} + } + else + { +{ +return NULL; + +} + } + case '4': + if (strncmp (KR_keyword, "/dev/ttyS114", 12) == 0) + { +{ +return dev_storage + 701; + +} + } + else + { +{ +return NULL; + +} + } + case '3': + if (strncmp (KR_keyword, "/dev/ttyS113", 12) == 0) + { +{ +return dev_storage + 700; + +} + } + else + { +{ +return NULL; + +} + } + case '2': + if (strncmp (KR_keyword, "/dev/ttyS112", 12) == 0) + { +{ +return dev_storage + 699; + +} + } + else + { +{ +return NULL; + +} + } + case '1': + if (strncmp (KR_keyword, "/dev/ttyS111", 12) == 0) + { +{ +return dev_storage + 698; + +} + } + else + { +{ +return NULL; + +} + } + case '0': + if (strncmp (KR_keyword, "/dev/ttyS110", 12) == 0) + { +{ +return dev_storage + 697; + +} + } + else + { +{ +return NULL; + +} + } + default: +{ +return NULL; + +} + } + case 'c': + switch (KR_keyword [11]) + { + case '9': + if (strncmp (KR_keyword, "/dev/cons119", 12) == 0) + { { return dev_storage + 139; } - } - else - { + } + else + { { return NULL; } - } - case '8': - if (strncmp (KR_keyword, "/dev/cons118", 12) == 0) - { + } + case '8': + if (strncmp (KR_keyword, "/dev/cons118", 12) == 0) + { { return dev_storage + 138; } - } - else - { + } + else + { { return NULL; } - } - case '7': - if (strncmp (KR_keyword, "/dev/cons117", 12) == 0) - { + } + case '7': + if (strncmp (KR_keyword, "/dev/cons117", 12) == 0) + { { return dev_storage + 137; } - } - else - { + } + else + { { return NULL; } - } - case '6': - if (strncmp (KR_keyword, "/dev/cons116", 12) == 0) - { + } + case '6': + if (strncmp (KR_keyword, "/dev/cons116", 12) == 0) + { { return dev_storage + 136; } - } - else - { + } + else + { { return NULL; } - } - case '5': - if (strncmp (KR_keyword, "/dev/cons115", 12) == 0) - { + } + case '5': + if (strncmp (KR_keyword, "/dev/cons115", 12) == 0) + { { return dev_storage + 135; } - } - else - { + } + else + { { return NULL; } - } - case '4': - if (strncmp (KR_keyword, "/dev/cons114", 12) == 0) - { + } + case '4': + if (strncmp (KR_keyword, "/dev/cons114", 12) == 0) + { { return dev_storage + 134; } - } - else - { + } + else + { { return NULL; } - } - case '3': - if (strncmp (KR_keyword, "/dev/cons113", 12) == 0) - { + } + case '3': + if (strncmp (KR_keyword, "/dev/cons113", 12) == 0) + { { return dev_storage + 133; } - } - else - { + } + else + { { return NULL; } - } - case '2': - if (strncmp (KR_keyword, "/dev/cons112", 12) == 0) - { + } + case '2': + if (strncmp (KR_keyword, "/dev/cons112", 12) == 0) + { { return dev_storage + 132; } - } - else - { + } + else + { { return NULL; } - } - case '1': - if (strncmp (KR_keyword, "/dev/cons111", 12) == 0) - { + } + case '1': + if (strncmp (KR_keyword, "/dev/cons111", 12) == 0) + { { return dev_storage + 131; } - } - else - { + } + else + { { return NULL; } - } - case '0': - if (strncmp (KR_keyword, "/dev/cons110", 12) == 0) - { + } + case '0': + if (strncmp (KR_keyword, "/dev/cons110", 12) == 0) + { { return dev_storage + 130; } - } - else - { + } + else + { +{ +return NULL; + +} + } + default: { return NULL; @@ -13525,153 +14471,321 @@ return NULL; } } case '0': - switch (KR_keyword [11]) + switch (KR_keyword [5]) { - case '9': - if (strncmp (KR_keyword, "/dev/cons109", 12) == 0) + case 't': + switch (KR_keyword [11]) { + case '9': + if (strncmp (KR_keyword, "/dev/ttyS109", 12) == 0) + { +{ +return dev_storage + 696; + +} + } + else + { +{ +return NULL; + +} + } + case '8': + if (strncmp (KR_keyword, "/dev/ttyS108", 12) == 0) + { +{ +return dev_storage + 695; + +} + } + else + { +{ +return NULL; + +} + } + case '7': + if (strncmp (KR_keyword, "/dev/ttyS107", 12) == 0) + { +{ +return dev_storage + 694; + +} + } + else + { +{ +return NULL; + +} + } + case '6': + if (strncmp (KR_keyword, "/dev/ttyS106", 12) == 0) + { +{ +return dev_storage + 693; + +} + } + else + { +{ +return NULL; + +} + } + case '5': + if (strncmp (KR_keyword, "/dev/ttyS105", 12) == 0) + { +{ +return dev_storage + 692; + +} + } + else + { +{ +return NULL; + +} + } + case '4': + if (strncmp (KR_keyword, "/dev/ttyS104", 12) == 0) + { +{ +return dev_storage + 691; + +} + } + else + { +{ +return NULL; + +} + } + case '3': + if (strncmp (KR_keyword, "/dev/ttyS103", 12) == 0) + { +{ +return dev_storage + 690; + +} + } + else + { +{ +return NULL; + +} + } + case '2': + if (strncmp (KR_keyword, "/dev/ttyS102", 12) == 0) + { +{ +return dev_storage + 689; + +} + } + else + { +{ +return NULL; + +} + } + case '1': + if (strncmp (KR_keyword, "/dev/ttyS101", 12) == 0) + { +{ +return dev_storage + 688; + +} + } + else + { +{ +return NULL; + +} + } + case '0': + if (strncmp (KR_keyword, "/dev/ttyS100", 12) == 0) + { +{ +return dev_storage + 687; + +} + } + else + { +{ +return NULL; + +} + } + default: +{ +return NULL; + +} + } + case 'c': + switch (KR_keyword [11]) + { + case '9': + if (strncmp (KR_keyword, "/dev/cons109", 12) == 0) + { { return dev_storage + 129; } - } - else - { + } + else + { { return NULL; } - } - case '8': - if (strncmp (KR_keyword, "/dev/cons108", 12) == 0) - { + } + case '8': + if (strncmp (KR_keyword, "/dev/cons108", 12) == 0) + { { return dev_storage + 128; } - } - else - { + } + else + { { return NULL; } - } - case '7': - if (strncmp (KR_keyword, "/dev/cons107", 12) == 0) - { + } + case '7': + if (strncmp (KR_keyword, "/dev/cons107", 12) == 0) + { { return dev_storage + 127; } - } - else - { + } + else + { { return NULL; } - } - case '6': - if (strncmp (KR_keyword, "/dev/cons106", 12) == 0) - { + } + case '6': + if (strncmp (KR_keyword, "/dev/cons106", 12) == 0) + { { return dev_storage + 126; } - } - else - { + } + else + { { return NULL; } - } - case '5': - if (strncmp (KR_keyword, "/dev/cons105", 12) == 0) - { + } + case '5': + if (strncmp (KR_keyword, "/dev/cons105", 12) == 0) + { { return dev_storage + 125; } - } - else - { + } + else + { { return NULL; } - } - case '4': - if (strncmp (KR_keyword, "/dev/cons104", 12) == 0) - { + } + case '4': + if (strncmp (KR_keyword, "/dev/cons104", 12) == 0) + { { return dev_storage + 124; } - } - else - { + } + else + { { return NULL; } - } - case '3': - if (strncmp (KR_keyword, "/dev/cons103", 12) == 0) - { + } + case '3': + if (strncmp (KR_keyword, "/dev/cons103", 12) == 0) + { { return dev_storage + 123; } - } - else - { + } + else + { { return NULL; } - } - case '2': - if (strncmp (KR_keyword, "/dev/cons102", 12) == 0) - { + } + case '2': + if (strncmp (KR_keyword, "/dev/cons102", 12) == 0) + { { return dev_storage + 122; } - } - else - { + } + else + { { return NULL; } - } - case '1': - if (strncmp (KR_keyword, "/dev/cons101", 12) == 0) - { + } + case '1': + if (strncmp (KR_keyword, "/dev/cons101", 12) == 0) + { { return dev_storage + 121; } - } - else - { + } + else + { { return NULL; } - } - case '0': - if (strncmp (KR_keyword, "/dev/cons100", 12) == 0) - { + } + case '0': + if (strncmp (KR_keyword, "/dev/cons100", 12) == 0) + { { return dev_storage + 120; } - } - else - { + } + else + { +{ +return NULL; + +} + } + default: { return NULL; diff --git a/winsup/cygwin/devices.in b/winsup/cygwin/devices.in index 59f5f00d2..9a42951f6 100644 --- a/winsup/cygwin/devices.in +++ b/winsup/cygwin/devices.in @@ -164,7 +164,7 @@ const _device dev_error_storage = "/dev/urandom", BRACK(FH_URANDOM), "\\Device\\Null", exists_ntdev, S_IFCHR, =urandom_dev "/dev/clipboard", BRACK(FH_CLIPBOARD), "\\Device\\Null", exists_ntdev, S_IFCHR "/dev/com%(1-16)d", BRACK(FHDEV(DEV_SERIAL_MAJOR, {$1 - 1})), "\\??\\COM{$1}", exists_ntdev_silent, S_IFCHR -"/dev/ttyS%(0-63)d", BRACK(FHDEV(DEV_SERIAL_MAJOR, {$1})), "\\??\\COM{$1 + 1}", exists_ntdev, S_IFCHR +"/dev/ttyS%(0-127)d", BRACK(FHDEV(DEV_SERIAL_MAJOR, {$1})), "\\??\\COM{$1 + 1}", exists_ntdev, S_IFCHR ":pipe", BRACK(FH_PIPE), "/dev/pipe", exists_internal, S_IFCHR ":fifo", BRACK(FH_FIFO), "/dev/fifo", exists_internal, S_IFCHR "/dev/st%(0-127)d", BRACK(FHDEV(DEV_TAPE_MAJOR, {$1})), "\\Device\\Tape{$1}", exists_ntdev, S_IFBLK From 0574317971f53d4471ef92aca4c57315bf777358 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Thu, 24 Oct 2019 16:12:24 +0100 Subject: [PATCH 079/520] MSP430: Add missing build rule for unlink() to libgloss Makefile --- libgloss/msp430/Makefile.in | 1 + 1 file changed, 1 insertion(+) diff --git a/libgloss/msp430/Makefile.in b/libgloss/msp430/Makefile.in index 59c11a9a9..5342596a6 100644 --- a/libgloss/msp430/Makefile.in +++ b/libgloss/msp430/Makefile.in @@ -69,6 +69,7 @@ LIB_CRT = libcrt.a SIM_OBJS = syscalls.o \ cio.o \ write.o \ + unlink.o \ sbrk.o NOSYS_OBJS = ciosyscalls.o \ From 0c7734673a981e81a88235851be219ce23fd242b Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov Date: Sun, 11 Mar 2018 22:23:26 +0200 Subject: [PATCH 080/520] Initial PRU port for libgloss and newlib Signed-off-by: Dimitar Dimitrov --- libgloss/configure | 5 + libgloss/configure.in | 3 + libgloss/pru/Makefile.in | 155 + libgloss/pru/aclocal.m4 | 409 ++ libgloss/pru/configure | 3874 ++++++++++++++++++ libgloss/pru/configure.in | 66 + libgloss/pru/crt0.S | 97 + libgloss/pru/device-specs/sim | 5 + libgloss/pru/do_global_dtors.c | 53 + libgloss/pru/gettimeofday.c | 31 + libgloss/pru/inbyte.c | 51 + libgloss/pru/isatty.c | 26 + libgloss/pru/ldscripts/gen-ld-scripts.sh | 80 + libgloss/pru/ldscripts/pruelf-sim.x | 200 + libgloss/pru/outbyte.c | 37 + libgloss/pru/print.c | 25 + libgloss/pru/putnum.c | 42 + libgloss/pru/raise.c | 24 + libgloss/pru/sbrk.c | 46 + libgloss/pru/stat.c | 31 + libgloss/pru/syscalls.S | 78 + newlib/configure.host | 14 +- newlib/libc/include/machine/ieeefp.h | 4 + newlib/libc/include/machine/setjmp.h | 5 + newlib/libc/machine/configure | 7 +- newlib/libc/machine/configure.in | 1 + newlib/libc/machine/pru/Makefile.am | 16 + newlib/libc/machine/pru/Makefile.in | 439 ++ newlib/libc/machine/pru/aclocal.m4 | 1012 +++++ newlib/libc/machine/pru/configure | 4766 ++++++++++++++++++++++ newlib/libc/machine/pru/configure.in | 14 + newlib/libc/machine/pru/setjmp.s | 45 + 32 files changed, 11658 insertions(+), 3 deletions(-) create mode 100644 libgloss/pru/Makefile.in create mode 100644 libgloss/pru/aclocal.m4 create mode 100755 libgloss/pru/configure create mode 100644 libgloss/pru/configure.in create mode 100644 libgloss/pru/crt0.S create mode 100644 libgloss/pru/device-specs/sim create mode 100644 libgloss/pru/do_global_dtors.c create mode 100644 libgloss/pru/gettimeofday.c create mode 100644 libgloss/pru/inbyte.c create mode 100644 libgloss/pru/isatty.c create mode 100755 libgloss/pru/ldscripts/gen-ld-scripts.sh create mode 100644 libgloss/pru/ldscripts/pruelf-sim.x create mode 100644 libgloss/pru/outbyte.c create mode 100644 libgloss/pru/print.c create mode 100644 libgloss/pru/putnum.c create mode 100644 libgloss/pru/raise.c create mode 100644 libgloss/pru/sbrk.c create mode 100644 libgloss/pru/stat.c create mode 100644 libgloss/pru/syscalls.S create mode 100644 newlib/libc/machine/pru/Makefile.am create mode 100644 newlib/libc/machine/pru/Makefile.in create mode 100644 newlib/libc/machine/pru/aclocal.m4 create mode 100755 newlib/libc/machine/pru/configure create mode 100644 newlib/libc/machine/pru/configure.in create mode 100644 newlib/libc/machine/pru/setjmp.s diff --git a/libgloss/configure b/libgloss/configure index 1a4033dce..eb116b58d 100755 --- a/libgloss/configure +++ b/libgloss/configure @@ -710,6 +710,7 @@ spu tic6x iq2000 or1k +pru nios2 libnosys' @@ -2586,6 +2587,10 @@ case "${target}" in or1k-*-* | or1knd-*-* ) subdirs="$subdirs or1k" + ;; + pru-*-*) + subdirs="$subdirs pru" + ;; nios2-*-*) subdirs="$subdirs nios2" diff --git a/libgloss/configure.in b/libgloss/configure.in index 41843eed1..a681f233f 100644 --- a/libgloss/configure.in +++ b/libgloss/configure.in @@ -176,6 +176,9 @@ case "${target}" in or1k-*-* | or1knd-*-* ) AC_CONFIG_SUBDIRS([or1k]) ;; + pru-*-*) + AC_CONFIG_SUBDIRS([pru]) + ;; nios2-*-*) AC_CONFIG_SUBDIRS([nios2]) ;; diff --git a/libgloss/pru/Makefile.in b/libgloss/pru/Makefile.in new file mode 100644 index 000000000..7fdbc0cb5 --- /dev/null +++ b/libgloss/pru/Makefile.in @@ -0,0 +1,155 @@ +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2018-2019 Dimitar Dimitrov +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +VPATH = @srcdir@ @srcdir@/.. + +srcdir = @srcdir@ +objdir = . +srcroot = $(srcdir)/../.. +objroot = $(objdir)/../.. +top_srcdir = @top_srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +host_alias = @host_alias@ +target_alias = @target_alias@ + +bindir = @bindir@ +libdir = @libdir@ +includedir = @includedir@ +tooldir = $(exec_prefix)/$(target_alias) + +# Multilib support variables. +# TOP is used instead of MULTI{BUILD,SRC}TOP. +MULTIDIRS = +MULTISUBDIR = + +SHELL = /bin/sh + +mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs + +CC = @CC@ + +AS = @AS@ + +AR = @AR@ + +LD = @LD@ + +RANLIB = @RANLIB@ + +OBJDUMP = `t='$(program_transform_name)'; echo objdump | sed -e $$t` +OBJCOPY = `t='$(program_transform_name)'; echo objcopy | sed -e $$t` + +# linker scripts +SCRIPTS = `ls ${srcdir}/ldscripts/*.x` + +# object files needed +OBJS = \ + do_global_dtors.o gettimeofday.o \ + isatty.o putnum.o raise.o \ + inbyte.o outbyte.o sbrk.o stat.o syscalls.o \ + do_global_dtors.o + +# Object files specific to particular targets. +EVALOBJS = ${OBJS} + +CRTOBJS = crt0.o crt0-minrt.o +OUTPUTS = libgloss.a $(CRTOBJS) + +INCLUDES = -I$(srcdir)/.. + +# Note that when building the library, ${MULTILIB} is not the way multilib +# options are passed; they're passed in $(CFLAGS). +CFLAGS_FOR_TARGET = ${MULTILIB} ${INCLUDES} +LDFLAGS_FOR_TARGET = ${MULTILIB} + +.c.o: + $(CC) $(CFLAGS_FOR_TARGET) -Os $(INCLUDES) -c $(CFLAGS) $< + +.C.o: + $(CC) $(CFLAGS_FOR_TARGET) -Os $(INCLUDES) -c $(CFLAGS) $< +.s.o: + $(AS) $(ASFLAGS_FOR_TARGET) $(INCLUDES) $(ASFLAGS) -o $*.o $< + +# +# GCC knows to run the preprocessor on .S files before it assembles them. +# +.S.o: + $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $< + +all: ${OUTPUTS} copy_scripts_to_objdir + +copy_scripts_to_objdir: $(srcdir)/ldscripts/gen-ld-scripts.sh + cp $(SCRIPTS) $(objdir) + +# +# here's where we build the library for each target +# + +libgloss.a: $(EVALOBJS) + ${AR} ${ARFLAGS} $@ $(EVALOBJS) + ${RANLIB} $@ + +# C Runtime Library startup code. +crt0.o: $(srcdir)/crt0.S + $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) $< -c -o $@ + +crt0-minrt.o: $(srcdir)/crt0.S + $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -DMINRT $< -c -o $@ + +doc: + +clean mostlyclean: + rm -f $(OUTPUTS) *.i *~ *.o *-test *.srec *.dis *.map *.x + +distclean maintainer-clean realclean: clean + rm -f Makefile config.status $(OUTPUTS) + +.PHONY: install info install-info clean-info +install: $(OUTPUTS) $(srcdir)/ldscripts/gen-ld-scripts.sh + for outputs in ${OUTPUTS}; do\ + ${INSTALL_DATA} $${outputs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR}/$${outputs}; \ + done + for s in $(SCRIPTS); do \ + b=`basename $$s`; \ + ${INSTALL_DATA} $$s ${DESTDIR}${tooldir}/lib${MULTISUBDIR}/$$b ;\ + done + ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR}/device-specs; \ + for s in ${srcdir}/device-specs/*; do \ + b=`basename $$s`; \ + $(INSTALL_DATA) $$s $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/device-specs/$$b ;\ + done + +info: +install-info: +clean-info: + +Makefile: $(srcdir)/Makefile.in config.status @host_makefile_frag_path@ + $(SHELL) config.status + +config.status: $(srcdir)/configure + $(SHELL) config.status --recheck diff --git a/libgloss/pru/aclocal.m4 b/libgloss/pru/aclocal.m4 new file mode 100644 index 000000000..6ba621054 --- /dev/null +++ b/libgloss/pru/aclocal.m4 @@ -0,0 +1,409 @@ +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +m4_include([../acinclude.m4]) diff --git a/libgloss/pru/configure b/libgloss/pru/configure new file mode 100755 index 000000000..73546f777 --- /dev/null +++ b/libgloss/pru/configure @@ -0,0 +1,3874 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.68. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= +PACKAGE_URL= + +ac_unique_file="crt0.S" +ac_subst_vars='LTLIBOBJS +LIBOBJS +host_makefile_frag_path +CCASFLAGS +CCAS +RANLIB +LD +AR +AS +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +am__leading_dot +CC +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_os +target_vendor +target_cpu +target +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='host_makefile_frag' +ac_user_opts=' +enable_option_checking +enable_dependency_tracking +' + ac_precious_vars='build_alias +host_alias +target_alias +CCAS +CCASFLAGS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + +Some influential environment variables: + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to the package provider. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +configure +generated by GNU Autoconf 2.68 + +Copyright (C) 2010 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.68. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +if test "${enable_shared}" = "yes" ; then + echo "Shared libraries not supported for cross compiling, ignored" +fi + +if test "$srcdir" = "." ; then + if test "${with_target_subdir}" != "." ; then + libgloss_topdir="${srcdir}/${with_multisrctop}../../.." + else + libgloss_topdir="${srcdir}/${with_multisrctop}../.." + fi +else + libgloss_topdir="${srcdir}/../.." +fi +ac_aux_dir= +for ac_dir in $libgloss_topdir "$srcdir"/$libgloss_topdir; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in $libgloss_topdir \"$srcdir\"/$libgloss_topdir" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } +if ${ac_cv_target+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5 +$as_echo_n "checking whether we are using GNU C... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.c <&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_c_compiler_gnu=yes +else + ac_cv_c_compiler_gnu=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } + +if test $ac_cv_c_compiler_gnu = yes; then + GCC=yes + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + elif test $ac_cv_prog_cc_g = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-O2" + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + +AS=${AS-as} + +AR=${AR-ar} + +LD=${LD-ld} + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +# By default we simply use the C compiler to build assembly code. + +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS + + + + +host_makefile_frag=${srcdir}/../config/default.mh + +host_makefile_frag_path=$host_makefile_frag + + + +ac_config_files="$ac_config_files Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by $as_me, which was +generated by GNU Autoconf 2.68. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Configuration commands: +$config_commands + +Report bugs to the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.68, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2010 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +srcdir=${srcdir} +target=${target} +with_multisubdir=${with_multisubdir} +ac_configure_args="${ac_configure_args} --enable-multilib" +CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} +libgloss_topdir=${libgloss_topdir} + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + +if $AWK 'BEGIN { getline <"/dev/null" }' /dev/null; then + ac_cs_awk_getline=: + ac_cs_awk_pipe_init= + ac_cs_awk_read_file=' + while ((getline aline < (F[key])) > 0) + print(aline) + close(F[key])' + ac_cs_awk_pipe_fini= +else + ac_cs_awk_getline=false + ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" + ac_cs_awk_read_file=' + print "|#_!!_#|" + print "cat " F[key] " &&" + '$ac_cs_awk_pipe_init + # The final `:' finishes the AND list. + ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' +fi +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + +# Create commands to substitute file output variables. +{ + echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && + echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && + echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && + echo "_ACAWK" && + echo "_ACEOF" +} >conf$$files.sh && +. ./conf$$files.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +rm -f conf$$files.sh + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + \$ac_cs_awk_pipe_init +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + if (nfields == 3 && !substed) { + key = field[2] + if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { + \$ac_cs_awk_read_file + next + } + } + print line +} +\$ac_cs_awk_pipe_fini +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | +if $ac_cs_awk_getline; then + $AWK -f "$ac_tmp/subs.awk" +else + $AWK -f "$ac_tmp/subs.awk" | $SHELL +fi \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "Makefile":F) . ${libgloss_topdir}/config-ml.in ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/libgloss/pru/configure.in b/libgloss/pru/configure.in new file mode 100644 index 000000000..2a4c946e8 --- /dev/null +++ b/libgloss/pru/configure.in @@ -0,0 +1,66 @@ +# Copyright (c) 2008, 2009, 2011, 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing to use, modify, +# copy, or redistribute it subject to the terms and conditions of the BSD +# License. This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY expressed or implied, including the implied warranties +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. A copy of this license +# is available at http://www.opensource.org/licenses. Any Red Hat trademarks that +# are incorporated in the source code or documentation are not subject to the BSD +# License and may only be used or replicated with the express permission of +# Red Hat, Inc. + +dnl Process this file with autoconf to produce a configure script. +AC_PREREQ(2.59) +AC_INIT(crt0.S) + +if test "${enable_shared}" = "yes" ; then + echo "Shared libraries not supported for cross compiling, ignored" +fi + +if test "$srcdir" = "." ; then + if test "${with_target_subdir}" != "." ; then + libgloss_topdir="${srcdir}/${with_multisrctop}../../.." + else + libgloss_topdir="${srcdir}/${with_multisrctop}../.." + fi +else + libgloss_topdir="${srcdir}/../.." +fi +AC_CONFIG_AUX_DIR($libgloss_topdir) + +AC_CANONICAL_SYSTEM +AC_ARG_PROGRAM + +AC_PROG_INSTALL + +LIB_AC_PROG_CC +AS=${AS-as} +AC_SUBST(AS) +AR=${AR-ar} +AC_SUBST(AR) +LD=${LD-ld} +AC_SUBST(LD) +AC_PROG_RANLIB +LIB_AM_PROG_AS + +host_makefile_frag=${srcdir}/../config/default.mh + +dnl We have to assign the same value to other variables because autoconf +dnl doesn't provide a mechanism to substitute a replacement keyword with +dnl arbitrary data or pathnames. +dnl +host_makefile_frag_path=$host_makefile_frag +AC_SUBST(host_makefile_frag_path) +AC_SUBST_FILE(host_makefile_frag) + +AC_CONFIG_FILES(Makefile, +. ${libgloss_topdir}/config-ml.in, +srcdir=${srcdir} +target=${target} +with_multisubdir=${with_multisubdir} +ac_configure_args="${ac_configure_args} --enable-multilib" +CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} +libgloss_topdir=${libgloss_topdir} +) +AC_OUTPUT diff --git a/libgloss/pru/crt0.S b/libgloss/pru/crt0.S new file mode 100644 index 000000000..b3f0d53a9 --- /dev/null +++ b/libgloss/pru/crt0.S @@ -0,0 +1,97 @@ +/* SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * crt0.S -- PRU startup code + * + * Copyright (c) 2018-2019 Dimitar Dimitrov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "newlib.h" + + .extern main + .extern exit + + .text + .section .init0, "x" + .global _start +_start: + /* Initialize stack pointer. */ + ldi32 sp, _stack_top + + /* DATA and BSS are handled by the loader, so nothing to do here. */ + +#if !defined(MINRT) + .extern _do_global_dtors + /* Ensure destructors get called. Call is per GNU ABI (i.e. 32-bit + function pointers). But it is also compatible with the TI ABI + since GCC supports only little endian PRU. + + WARNING: Keep this compatible with both ABIs! */ + ldi r14, %pmem(_do_global_dtors) + call atexit + + /* Call constructors. Use non-call-clobbered registers. */ + ldi r5, __init_array_start + ldi r6, __init_array_end +ctors_loop: + qbeq ctors_done, r5, r6 + /* ABI dictates 16-bit IMEM pointers. */ + lbbo r7, r5, 0, 2 + call r7.w0 + add r5, r5, 2 + jmp ctors_loop +ctors_done: +#endif + + /* Just in case main() tries to access argc, argv[] and envp. */ + zero r14, 3 * 4 + +#if !defined(MINRT) + .weak __c_args__ + ldi32 r5, __c_args__ + qbeq __skip_c_args, r5, 0 + lbbo r14, r5, 0, 4 /* argc */ + add r15, r5, 4 /* argv */ +__skip_c_args: +#endif + + /* Call main */ + call main + +#if !defined(MINRT) + /* Call exit */ + call exit +#endif + + /* We should never reach here. */ +_crt_exit: + halt + jmp _crt_exit + + /* PRU obviously has no shared libraries, but dso_handle + helps to achieve better GCC test coverage. Besides, + it should be free with minrt. */ + .section .data + .global __dso_handle + .weak __dso_handle +__dso_handle: + .long 0 diff --git a/libgloss/pru/device-specs/sim b/libgloss/pru/device-specs/sim new file mode 100644 index 000000000..50d4689e0 --- /dev/null +++ b/libgloss/pru/device-specs/sim @@ -0,0 +1,5 @@ +*cpp_device: +-D__SIM__ + +*link_device: +%{!r:-Tpruelf-sim.x} diff --git a/libgloss/pru/do_global_dtors.c b/libgloss/pru/do_global_dtors.c new file mode 100644 index 000000000..149c631f7 --- /dev/null +++ b/libgloss/pru/do_global_dtors.c @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * do_global_dtors - invoke global destructors + * + * Copyright (c) 2018-2019 Dimitar Dimitrov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include +#include <_ansi.h> +#include "syscall.h" + +extern void *__fini_array_start; +extern void *__fini_array_end; + +/* + * _do_global_dtors + */ +void +_do_global_dtors (void) +{ + /* ABI dictates pointers in init/fini arrays are 16-bit. */ + const uint16_t *end = (uint16_t *)&__fini_array_end; + const uint16_t *begin = (uint16_t *)&__fini_array_start; + const uint16_t *p; + void (**dtor) (void); + + /* call destructors in reverse order */ + for (p = end; p > begin; ) { + p--; + dtor = (void *)p; + (*dtor) (); + } +} diff --git a/libgloss/pru/gettimeofday.c b/libgloss/pru/gettimeofday.c new file mode 100644 index 000000000..b4b7cb078 --- /dev/null +++ b/libgloss/pru/gettimeofday.c @@ -0,0 +1,31 @@ +/* gettimeofday.c -- get the current time of day + * + * Copyright (c) 1995, 1999 Cygnus Support + * + * The authors hereby grant permission to use, copy, modify, distribute, + * and license this software and its documentation for any purpose, provided + * that existing copyright notices are retained in all copies and that this + * notice is included verbatim in any distributions. No written agreement, + * license, or royalty fee is required for any of the authorized uses. + * Modifications to this software may be copyrighted by their authors + * and need not follow the licensing terms described here, provided that + * the new terms are clearly indicated on the first page of each file where + * they apply. + */ +#include +#include "glue.h" + +#undef errno +extern int errno; +struct timeval; + +/* + * gettimeofday -- no clock + * struct timeval * tp, void * tzvp + */ +int +_gettimeofday (struct timeval * tp, void * tzvp) +{ + errno = ENOSYS; + return -1; +} diff --git a/libgloss/pru/inbyte.c b/libgloss/pru/inbyte.c new file mode 100644 index 000000000..36eb363f4 --- /dev/null +++ b/libgloss/pru/inbyte.c @@ -0,0 +1,51 @@ +/* SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * inbyte.c -- inbyte function for remoteproc + * + * Copyright (c) 2018-2019 Dimitar Dimitrov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include +#include <_ansi.h> +#include +#include +#include "glue.h" + +extern ssize_t _read(int fd, void *b, size_t count); + +int +inbyte (void) +{ + ssize_t n; + char c; + + /* PRU has no interrupts, so it is inherently thread-safe. */ + n = _read(STDIN_FILENO, &c, 1); + if (n < 0) + return n; + else if (n == 0) + return -ENODATA; + else + return 1; +} + diff --git a/libgloss/pru/isatty.c b/libgloss/pru/isatty.c new file mode 100644 index 000000000..5ec816ba5 --- /dev/null +++ b/libgloss/pru/isatty.c @@ -0,0 +1,26 @@ +/* isatty.c -- chek the terminal device. + * + * Copyright (c) 1995 Cygnus Support + * + * The authors hereby grant permission to use, copy, modify, distribute, + * and license this software and its documentation for any purpose, provided + * that existing copyright notices are retained in all copies and that this + * notice is included verbatim in any distributions. No written agreement, + * license, or royalty fee is required for any of the authorized uses. + * Modifications to this software may be copyrighted by their authors + * and need not follow the licensing terms described here, provided that + * the new terms are clearly indicated on the first page of each file where + * they apply. + */ +#include "glue.h" + +/* + * isatty -- returns 1 if connected to a terminal device, + * returns 0 if not. Since we're hooked up to a + * serial port, we'll say yes _AND return a 1. + */ +int +_isatty (int fd) +{ + return (1); +} diff --git a/libgloss/pru/ldscripts/gen-ld-scripts.sh b/libgloss/pru/ldscripts/gen-ld-scripts.sh new file mode 100755 index 000000000..ddaf75a7a --- /dev/null +++ b/libgloss/pru/ldscripts/gen-ld-scripts.sh @@ -0,0 +1,80 @@ +#!/bin/bash +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2018-2019 Dimitar Dimitrov +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +# Generate additional MCU-specific linker scripts by using the +# default PRU-LD linker script. +# +# We do it automatically so that: +# 1. We only change the default linker script in binutils. +# 2. All the default script complexity stays in binutils. +# 3. Here in libgloss we only bump the memory sizes to +# allow large test programs to be executed. + +dump_modified() +{ + IMEM_SIZE=$1 + DMEM_SIZE=$2 + HEAP_SIZE=$3 + STACK_SIZE=$4 + + echo "/* WARNING: automatically generated from the default pru-ld script! */" + echo -e "\n\n" + pru-ld --verbose | awk " +BEGIN { LDV_MARKER = 0; } +{ + if (\$0 == \"==================================================\" ) + { + LDV_MARKER++; + } + else if (LDV_MARKER != 1) + { + } + else if (\$0 ~ /^ imem.*ORIGIN =.*LENGTH =/) + { + print \" imem (x) : ORIGIN = 0x20000000, LENGTH = $IMEM_SIZE\" + } + else if (\$0 ~ /^ dmem.*ORIGIN =.*LENGTH =/) + { + print \" dmem (rw!x) : ORIGIN = 0x0, LENGTH = $DMEM_SIZE\" + } + else if (\$0 ~ /^__HEAP_SIZE = DEFINED/) + { + print \"__HEAP_SIZE = DEFINED(__HEAP_SIZE) ? __HEAP_SIZE : $HEAP_SIZE ;\"; + } + else if (\$0 ~ /^__STACK_SIZE = DEFINED/) + { + print \"__STACK_SIZE = DEFINED(__STACK_SIZE) ? __STACK_SIZE : $STACK_SIZE ;\"; + } + else + { + print \$0; + } +}" +} + +# IMEM DMEM HEAP_SIZE STACK_SIZE +dump_modified 256K 65536K "32 * 1024 * 1024" "1024 * 1024" | tee pruelf-sim.x diff --git a/libgloss/pru/ldscripts/pruelf-sim.x b/libgloss/pru/ldscripts/pruelf-sim.x new file mode 100644 index 000000000..1dc8b4f2e --- /dev/null +++ b/libgloss/pru/ldscripts/pruelf-sim.x @@ -0,0 +1,200 @@ +/* WARNING: automatically generated from the default pru-ld script! */ + + + +/* Default linker script, for normal executables */ +OUTPUT_FORMAT("elf32-pru","elf32-pru","elf32-pru") +OUTPUT_ARCH(pru) +MEMORY +{ + imem (x) : ORIGIN = 0x20000000, LENGTH = 256K + dmem (rw!x) : ORIGIN = 0x0, LENGTH = 65536K +} +__HEAP_SIZE = DEFINED(__HEAP_SIZE) ? __HEAP_SIZE : 32 * 1024 * 1024 ; +__STACK_SIZE = DEFINED(__STACK_SIZE) ? __STACK_SIZE : 1024 * 1024 ; +PROVIDE (_stack_top = ORIGIN(dmem) + LENGTH(dmem)); +ENTRY (_start) +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + .rel.init : { *(.rel.init) } + .rela.init : { *(.rela.init) } + .rel.text : + { + *(.rel.text) + *(.rel.text.*) + *(.rel.text:*) + *(.rel.gnu.linkonce.t*) + } + .rela.text : + { + *(.rela.text) + *(.rela.text.*) + *(.rela.text:*) + *(.rela.gnu.linkonce.t*) + } + .rel.fini : { *(.rel.fini) } + .rela.fini : { *(.rela.fini) } + .rel.rodata : + { + *(.rel.rodata) + *(.rel.rodata.*) + *(.rel.rodata:*) + *(.rel.gnu.linkonce.r*) + } + .rela.rodata : + { + *(.rela.rodata) + *(.rela.rodata.*) + *(.rela.rodata:*) + *(.rela.gnu.linkonce.r*) + } + .rel.data : + { + *(.rel.data) + *(.rel.data.*) + *(.rel.data:*) + *(.rel.gnu.linkonce.d*) + } + .rela.data : + { + *(.rela.data) + *(.rela.data.*) + *(.rela.data:*) + *(.rela.gnu.linkonce.d*) + } + .rel.init_array : { *(.rel.init_array) } + .rela.init_array : { *(.rela.init_array) } + .rel.fini_array : { *(.rel.fini_array) } + .rela.fini_array : { *(.rela.fini_array) } + .rel.got : { *(.rel.got) } + .rela.got : { *(.rela.got) } + .rel.bss : { *(.rel.bss) } + .rela.bss : { *(.rela.bss) } + .rel.plt : { *(.rel.plt) } + .rela.plt : { *(.rela.plt) } + /* Internal text space. */ + .text : + { + _text_start = . ; + . = ALIGN(4); + *(.init0) /* Start here after reset. */ + KEEP (*(.init0)) + . = ALIGN(4); + *(.text) + . = ALIGN(4); + *(.text.*) + . = ALIGN(4); + *(.text:*) + . = ALIGN(4); + *(.gnu.linkonce.t*) + . = ALIGN(4); + _text_end = . ; + } > imem + .data : + { + /* Optional variable that user is prepared to have NULL address. */ + *(.data.atzero*) + /* CRT is prepared for constructor/destructor table to have + a "valid" NULL address. */ + __init_array_start = . ; + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*))) + KEEP (*(.init_array)) + __init_array_end = . ; + __fini_array_start = . ; + KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*))) + KEEP (*(.fini_array)) + __fini_array_end = . ; + /* DATA memory starts at address 0. So to avoid placing a valid static + variable at the invalid NULL address, we introduce the .data.atzero + section. If CRT can make some use of it - great. Otherwise skip a + word. In all cases .data/.bss sections must start at non-zero. */ + . += (. == 0 ? 4 : 0); + PROVIDE (_data_start = .) ; + *(.data) + *(.data*) + *(.data:*) + *(.rodata) /* We need to include .rodata here if gcc is used. */ + *(.rodata.*) /* with -fdata-sections. */ + *(.rodata:*) + *(.gnu.linkonce.d*) + *(.gnu.linkonce.r*) + . = ALIGN(4); + PROVIDE (_data_end = .) ; + } > dmem + .resource_table : + { + KEEP (*(.resource_table)) + } > dmem + .bss : + { + PROVIDE (_bss_start = .) ; + *(.bss) + *(.bss.*) + *(.bss:*) + *(.gnu.linkonce.b*) + *(COMMON) + PROVIDE (_bss_end = .) ; + } > dmem + /* Global data not cleared after reset. */ + .noinit : + { + PROVIDE (_noinit_start = .) ; + *(.noinit) + PROVIDE (_noinit_end = .) ; + PROVIDE (_heap_start = .) ; + . += __HEAP_SIZE ; + /* Stack is not here really. It will be put at the end of DMEM. + But we take into account its size here, in order to allow + for MEMORY overflow checking during link time. */ + . += __STACK_SIZE ; + } > dmem + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + .note.gnu.build-id : { *(.note.gnu.build-id) } + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + /* DWARF 3 */ + .debug_pubtypes 0 : { *(.debug_pubtypes) } + .debug_ranges 0 : { *(.debug_ranges) } + /* DWARF Extension. */ + .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } +} + + diff --git a/libgloss/pru/outbyte.c b/libgloss/pru/outbyte.c new file mode 100644 index 000000000..fc2ec06cf --- /dev/null +++ b/libgloss/pru/outbyte.c @@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * outbyte.c -- outbyte function for simulator + * + * Copyright (c) 2018-2019 Dimitar Dimitrov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include +#include <_ansi.h> + +extern ssize_t _write(int fd, const void *b, size_t count); + +void +outbyte (char ch) +{ + _write(STDOUT_FILENO, &ch, 1); +} diff --git a/libgloss/pru/print.c b/libgloss/pru/print.c new file mode 100644 index 000000000..00a40b387 --- /dev/null +++ b/libgloss/pru/print.c @@ -0,0 +1,25 @@ +/* print.c -- print a string on the output device. + * + * Copyright (c) 1995, 1999 Cygnus Support + * + * The authors hereby grant permission to use, copy, modify, distribute, + * and license this software and its documentation for any purpose, provided + * that existing copyright notices are retained in all copies and that this + * notice is included verbatim in any distributions. No written agreement, + * license, or royalty fee is required for any of the authorized uses. + * Modifications to this software may be copyrighted by their authors + * and need not follow the licensing terms described here, provided that + * the new terms are clearly indicated on the first page of each file where + * they apply. + */ +#include +#include "glue.h" + +/* + * print -- do a raw print of a string + */ +void +_print (char *ptr) +{ + _write(STDOUT_FILENO, ptr, strlen(ptr)); +} diff --git a/libgloss/pru/putnum.c b/libgloss/pru/putnum.c new file mode 100644 index 000000000..127e1c3dd --- /dev/null +++ b/libgloss/pru/putnum.c @@ -0,0 +1,42 @@ +/* putnum.c -- put a hex number on the output device. + * + * Copyright (c) 1995, 1999 Cygnus Support + * + * The authors hereby grant permission to use, copy, modify, distribute, + * and license this software and its documentation for any purpose, provided + * that existing copyright notices are retained in all copies and that this + * notice is included verbatim in any distributions. No written agreement, + * license, or royalty fee is required for any of the authorized uses. + * Modifications to this software may be copyrighted by their authors + * and need not follow the licensing terms described here, provided that + * the new terms are clearly indicated on the first page of each file where + * they apply. + */ +#include "glue.h" + +extern void print (char *ptr); + +/* + * putnum -- print a 32 bit number in hex + */ +void +_putnum (unsigned int num) +{ + char buf[9]; + int cnt; + char *ptr; + int digit; + + ptr = buf; + for (cnt = 7 ; cnt >= 0 ; cnt--) { + digit = (num >> (cnt * 4)) & 0xf; + + if (digit <= 9) + *ptr++ = (char) ('0' + digit); + else + *ptr++ = (char) ('a' - 10 + digit); + } + + *ptr = (char) 0; + print (buf); +} diff --git a/libgloss/pru/raise.c b/libgloss/pru/raise.c new file mode 100644 index 000000000..d8e902605 --- /dev/null +++ b/libgloss/pru/raise.c @@ -0,0 +1,24 @@ +/* raise.c -- raise a signal for current process. + * + * Copyright (c) 1999 Cygnus Support + * + * The authors hereby grant permission to use, copy, modify, distribute, + * and license this software and its documentation for any purpose, provided + * that existing copyright notices are retained in all copies and that this + * notice is included verbatim in any distributions. No written agreement, + * license, or royalty fee is required for any of the authorized uses. + * Modifications to this software may be copyrighted by their authors + * and need not follow the licensing terms described here, provided that + * the new terms are clearly indicated on the first page of each file where + * they apply. + */ +#include "glue.h" + +extern int _kill (int, int); +extern int _getpid(void); + +int +_raise (int sig) +{ + return _kill (_getpid (), sig); +} diff --git a/libgloss/pru/sbrk.c b/libgloss/pru/sbrk.c new file mode 100644 index 000000000..7210ee8ff --- /dev/null +++ b/libgloss/pru/sbrk.c @@ -0,0 +1,46 @@ +/* sbrk.c -- allocate memory dynamically. + * + * Copyright (c) 1995,1996,1999 Cygnus Support + * + * The authors hereby grant permission to use, copy, modify, distribute, + * and license this software and its documentation for any purpose, provided + * that existing copyright notices are retained in all copies and that this + * notice is included verbatim in any distributions. No written agreement, + * license, or royalty fee is required for any of the authorized uses. + * Modifications to this software may be copyrighted by their authors + * and need not follow the licensing terms described here, provided that + * the new terms are clearly indicated on the first page of each file where + * they apply. + */ +#include +#include +#include "glue.h" + +extern char _heap_start[]; +extern void exit (int) __attribute ((__noreturn__)); +extern int _write (int, char *, int); + +caddr_t +_sbrk (size_t incr) +{ + static char *heap_end; + char *prev_heap_end; + char *sp = (char *)&sp; + + if (heap_end == 0) + { + heap_end = _heap_start; + } + prev_heap_end = heap_end; + if (heap_end > sp) + { + _write (1, "Heap and stack collision\n", 25); +#if 0 /* Calling abort brings in the signal handling code. */ + abort (); +#else + exit (1); +#endif + } + heap_end += incr; + return (caddr_t) prev_heap_end; +} diff --git a/libgloss/pru/stat.c b/libgloss/pru/stat.c new file mode 100644 index 000000000..64cb27253 --- /dev/null +++ b/libgloss/pru/stat.c @@ -0,0 +1,31 @@ +/* stat.c -- Get the status of a file. + * + * Copyright (c) 1995, 1999 Cygnus Support + * + * The authors hereby grant permission to use, copy, modify, distribute, + * and license this software and its documentation for any purpose, provided + * that existing copyright notices are retained in all copies and that this + * notice is included verbatim in any distributions. No written agreement, + * license, or royalty fee is required for any of the authorized uses. + * Modifications to this software may be copyrighted by their authors + * and need not follow the licensing terms described here, provided that + * the new terms are clearly indicated on the first page of each file where + * they apply. + */ +#include +#include +#include "glue.h" + +#undef errno +extern int errno; + +/* + * stat -- Since we have no file system, we just return an error. + */ +int +_stat (const char *path, struct stat *buf) +{ + errno = EIO; + return (-1); +} + diff --git a/libgloss/pru/syscalls.S b/libgloss/pru/syscalls.S new file mode 100644 index 000000000..8ed7601a4 --- /dev/null +++ b/libgloss/pru/syscalls.S @@ -0,0 +1,78 @@ +/* SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * syscalls.S -- PRU system calls code + * + * Copyright (c) 2018-2019 Dimitar Dimitrov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "newlib.h" + +#include "syscall.h" + + .extern _impure_ptr + + /* Handle return from syscall. */ + .global __SC_ret + .type __SC_ret,@function + .func +__SC_ret: + /* Check for negative return code */ + qbbc __SC_ret_skip_errno_set, r14, 31 + + /* Invert return code and store to errno (first int in _impure_ptr). */ + rsb r14, r14, 0 + ldi32 r1, _impure_ptr + sbbo r14, r1, 0, 4 + /* Return -1 (for both int32_t or int64_t). */ + fill r14, 8 + +__SC_ret_skip_errno_set: + ret + .endfunc + +.macro SC fname, id + .global \fname + .type \fname,@function + .func +\fname: + ldi r1, \id + halt + jmp __SC_ret + .endfunc +.endm + + .text + + /* Syscalls are used only by simulator. Real HW + users use other methods for communicating with + the host - remoteproc, rpmsg, shared memory. */ + SC _exit, SYS_exit + SC _open, SYS_open + SC _close, SYS_close + SC _read, SYS_read + SC _write, SYS_write + SC _lseek, SYS_lseek + SC _unlink, SYS_unlink + SC _getpid, SYS_getpid + SC _kill, SYS_kill + SC _fstat, SYS_fstat diff --git a/newlib/configure.host b/newlib/configure.host index eee630b34..517dc8255 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -87,7 +87,7 @@ case "${target_optspace}:${host}" in yes:*) newlib_cflags="${newlib_cflags} -Os" ;; - :m32r-* | :d10v-* | :d30v-* | :avr-* | :m32c-* | :msp430*-* | :nds32* | :rl78-* ) + :m32r-* | :d10v-* | :d30v-* | :avr-* | :m32c-* | :msp430*-* | :nds32* | :pru-* | :rl78-* ) newlib_cflags="${newlib_cflags} -Os" ;; no:* | :*) @@ -291,6 +291,14 @@ case "${host_cpu}" in powerpc*) machine_dir=powerpc ;; + pru*) + newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED" + newlib_cflags="${newlib_cflags} -DNO_EXEC" + newlib_cflags="${newlib_cflags} -DSMALL_MEMORY" + default_newlib_nano_malloc="yes" + default_newlib_atexit_dynamic_alloc="no" + machine_dir=pru + ;; riscv*) libm_machine_dir=riscv machine_dir=riscv @@ -857,6 +865,10 @@ newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED -DMALLOC_PROVIDED -DEXIT_PROVID newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DHAVE_FCNTL -D_NO_POSIX_SPAWN" syscall_dir=syscalls ;; + pru*) + syscall_dir=syscalls + newlib_cflags="${newlib_cflags} -DSMALL_MEMORY -D_REENT_SMALL" + ;; riscv*-*-*) syscall_dir=syscalls ;; diff --git a/newlib/libc/include/machine/ieeefp.h b/newlib/libc/include/machine/ieeefp.h index 911eeb51e..536ac11fc 100644 --- a/newlib/libc/include/machine/ieeefp.h +++ b/newlib/libc/include/machine/ieeefp.h @@ -409,6 +409,10 @@ #define __SMALL_BITFIELDS /* 16 Bit INT */ #endif +#ifdef __PRU__ +#define __IEEE_LITTLE_ENDIAN +#endif + #ifdef __RL78__ #define __IEEE_LITTLE_ENDIAN #define __SMALL_BITFIELDS /* 16 Bit INT */ diff --git a/newlib/libc/include/machine/setjmp.h b/newlib/libc/include/machine/setjmp.h index 6b37bcce4..25fdea28c 100644 --- a/newlib/libc/include/machine/setjmp.h +++ b/newlib/libc/include/machine/setjmp.h @@ -352,6 +352,11 @@ _BEGIN_STD_C #define _JBTYPE unsigned long #endif +#ifdef __PRU__ +#define _JBLEN 48 +#define _JBTYPE unsigned int +#endif + #ifdef __RX__ #define _JBLEN 0x44 #endif diff --git a/newlib/libc/machine/configure b/newlib/libc/machine/configure index de68f32fb..51963a8d8 100755 --- a/newlib/libc/machine/configure +++ b/newlib/libc/machine/configure @@ -827,6 +827,7 @@ nios2 nvptx or1k powerpc +pru rl78 rx sh @@ -11503,7 +11504,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11506 "configure" +#line 11507 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11609,7 +11610,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11612 "configure" +#line 11613 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11935,6 +11936,8 @@ subdirs="$subdirs a29k" or1k) subdirs="$subdirs or1k" ;; powerpc) subdirs="$subdirs powerpc" + ;; + pru) subdirs="$subdirs pru" ;; rl78) subdirs="$subdirs rl78" ;; diff --git a/newlib/libc/machine/configure.in b/newlib/libc/machine/configure.in index 0d4068c13..a070b5838 100644 --- a/newlib/libc/machine/configure.in +++ b/newlib/libc/machine/configure.in @@ -65,6 +65,7 @@ if test -n "${machine_dir}"; then nvptx) AC_CONFIG_SUBDIRS(nvptx) ;; or1k) AC_CONFIG_SUBDIRS(or1k) ;; powerpc) AC_CONFIG_SUBDIRS(powerpc) ;; + pru) AC_CONFIG_SUBDIRS(pru) ;; rl78) AC_CONFIG_SUBDIRS(rl78) ;; rx) AC_CONFIG_SUBDIRS(rx) ;; sh) AC_CONFIG_SUBDIRS(sh) ;; diff --git a/newlib/libc/machine/pru/Makefile.am b/newlib/libc/machine/pru/Makefile.am new file mode 100644 index 000000000..60885128d --- /dev/null +++ b/newlib/libc/machine/pru/Makefile.am @@ -0,0 +1,16 @@ +## Process this file with automake to generate Makefile.in + +AUTOMAKE_OPTIONS = cygnus + +INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) + +AM_CCASFLAGS = $(INCLUDES) + +noinst_LIBRARIES = lib.a + +lib_a_SOURCES = setjmp.s +lib_a_CCASFLAGS=$(AM_CCASFLAGS) +lib_a_CFLAGS=$(AM_CFLAGS) + +ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. +CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host diff --git a/newlib/libc/machine/pru/Makefile.in b/newlib/libc/machine/pru/Makefile.in new file mode 100644 index 000000000..c1a13e857 --- /dev/null +++ b/newlib/libc/machine/pru/Makefile.in @@ -0,0 +1,439 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/../../../../mkinstalldirs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +lib_a_AR = $(AR) $(ARFLAGS) +lib_a_LIBADD = +am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) +lib_a_OBJECTS = $(am_lib_a_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = +am__depfiles_maybe = +CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(lib_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +ETAGS = etags +CTAGS = ctags +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NEWLIB_CFLAGS = @NEWLIB_CFLAGS@ +NO_INCLUDE_LIST = @NO_INCLUDE_LIST@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +READELF = @READELF@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +aext = @aext@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +libm_machine_dir = @libm_machine_dir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lpfx = @lpfx@ +machine_dir = @machine_dir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +newlib_basedir = @newlib_basedir@ +oext = @oext@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sys_dir = @sys_dir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = cygnus +INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) +AM_CCASFLAGS = $(INCLUDES) +noinst_LIBRARIES = lib.a +lib_a_SOURCES = setjmp.s +lib_a_CCASFLAGS = $(AM_CCASFLAGS) +lib_a_CFLAGS = $(AM_CFLAGS) +ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. +CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host +all: all-am + +.SUFFIXES: +.SUFFIXES: .o .obj .s +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --cygnus \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --cygnus Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES) + -rm -f lib.a + $(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD) + $(RANLIB) lib.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.s.o: + $(CCASCOMPILE) -c -o $@ $< + +.s.obj: + $(CCASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +lib_a-setjmp.o: setjmp.s + $(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.o `test -f 'setjmp.s' || echo '$(srcdir)/'`setjmp.s + +lib_a-setjmp.obj: setjmp.s + $(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.obj `if test -f 'setjmp.s'; then $(CYGPATH_W) 'setjmp.s'; else $(CYGPATH_W) '$(srcdir)/setjmp.s'; fi` + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +check-am: +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-generic clean-noinstLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-tags dvi dvi-am \ + html html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/newlib/libc/machine/pru/aclocal.m4 b/newlib/libc/machine/pru/aclocal.m4 new file mode 100644 index 000000000..18dab02aa --- /dev/null +++ b/newlib/libc/machine/pru/aclocal.m4 @@ -0,0 +1,1012 @@ +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.6], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.11.6])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 16 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, +# 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless `enable' is passed literally. +# For symmetry, `disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], +[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([../../../acinclude.m4]) diff --git a/newlib/libc/machine/pru/configure b/newlib/libc/machine/pru/configure new file mode 100755 index 000000000..e6fb5c02f --- /dev/null +++ b/newlib/libc/machine/pru/configure @@ -0,0 +1,4766 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='newlib' +PACKAGE_TARNAME='newlib' +PACKAGE_VERSION='3.1.0' +PACKAGE_STRING='newlib 3.1.0' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +ac_unique_file="setjmp.s" +ac_subst_vars='LTLIBOBJS +LIBOBJS +sys_dir +machine_dir +libm_machine_dir +lpfx +aext +oext +OBJEXT +USE_LIBTOOL_FALSE +USE_LIBTOOL_TRUE +ELIX_LEVEL_4_FALSE +ELIX_LEVEL_4_TRUE +ELIX_LEVEL_3_FALSE +ELIX_LEVEL_3_TRUE +ELIX_LEVEL_2_FALSE +ELIX_LEVEL_2_TRUE +ELIX_LEVEL_1_FALSE +ELIX_LEVEL_1_TRUE +ELIX_LEVEL_0_FALSE +ELIX_LEVEL_0_TRUE +LDFLAGS +NO_INCLUDE_LIST +NEWLIB_CFLAGS +CCASFLAGS +CCAS +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +READELF +RANLIB +AR +AS +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +CC +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +newlib_basedir +MAY_SUPPLY_SYSCALLS_FALSE +MAY_SUPPLY_SYSCALLS_TRUE +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_multilib +enable_target_optspace +enable_malloc_debugging +enable_newlib_multithread +enable_newlib_iconv +enable_newlib_elix_level +enable_newlib_io_float +enable_newlib_supplied_syscalls +enable_newlib_fno_builtin +enable_dependency_tracking +enable_maintainer_mode +' + ac_precious_vars='build_alias +host_alias +target_alias +CCAS +CCASFLAGS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/newlib] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of newlib 3.1.0:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-multilib build many library versions (default) + --enable-target-optspace optimize for space + --enable-malloc-debugging indicate malloc debugging requested + --enable-newlib-multithread enable support for multiple threads + --enable-newlib-iconv enable iconv library support + --enable-newlib-elix-level supply desired elix library level (1-4) + --disable-newlib-io-float disable printf/scanf family float support + --disable-newlib-supplied-syscalls disable newlib from supplying syscalls + --disable-newlib-fno-builtin disable -fno-builtin flag to allow compiler to use builtin library functions + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + +Some influential environment variables: + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to the package provider. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +newlib configure 3.1.0 +generated by GNU Autoconf 2.68 + +Copyright (C) 2010 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by newlib $as_me 3.1.0, which was +generated by GNU Autoconf 2.68. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +ac_aux_dir= +for ac_dir in ../../../.. "$srcdir"/../../../..; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../../.. \"$srcdir\"/../../../.." "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +am__api_version='1.11' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" = set; then : + enableval=$enable_multilib; case "${enableval}" in + yes) multilib=yes ;; + no) multilib=no ;; + *) as_fn_error $? "bad value ${enableval} for multilib option" "$LINENO" 5 ;; + esac +else + multilib=yes +fi + +# Check whether --enable-target-optspace was given. +if test "${enable_target_optspace+set}" = set; then : + enableval=$enable_target_optspace; case "${enableval}" in + yes) target_optspace=yes ;; + no) target_optspace=no ;; + *) as_fn_error $? "bad value ${enableval} for target-optspace option" "$LINENO" 5 ;; + esac +else + target_optspace= +fi + +# Check whether --enable-malloc-debugging was given. +if test "${enable_malloc_debugging+set}" = set; then : + enableval=$enable_malloc_debugging; case "${enableval}" in + yes) malloc_debugging=yes ;; + no) malloc_debugging=no ;; + *) as_fn_error $? "bad value ${enableval} for malloc-debugging option" "$LINENO" 5 ;; + esac +else + malloc_debugging= +fi + +# Check whether --enable-newlib-multithread was given. +if test "${enable_newlib_multithread+set}" = set; then : + enableval=$enable_newlib_multithread; case "${enableval}" in + yes) newlib_multithread=yes ;; + no) newlib_multithread=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-multithread option" "$LINENO" 5 ;; + esac +else + newlib_multithread=yes +fi + +# Check whether --enable-newlib-iconv was given. +if test "${enable_newlib_iconv+set}" = set; then : + enableval=$enable_newlib_iconv; if test "${newlib_iconv+set}" != set; then + case "${enableval}" in + yes) newlib_iconv=yes ;; + no) newlib_iconv=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-iconv option" "$LINENO" 5 ;; + esac + fi +else + newlib_iconv=${newlib_iconv} +fi + +# Check whether --enable-newlib-elix-level was given. +if test "${enable_newlib_elix_level+set}" = set; then : + enableval=$enable_newlib_elix_level; case "${enableval}" in + 0) newlib_elix_level=0 ;; + 1) newlib_elix_level=1 ;; + 2) newlib_elix_level=2 ;; + 3) newlib_elix_level=3 ;; + 4) newlib_elix_level=4 ;; + *) as_fn_error $? "bad value ${enableval} for newlib-elix-level option" "$LINENO" 5 ;; + esac +else + newlib_elix_level=0 +fi + +# Check whether --enable-newlib-io-float was given. +if test "${enable_newlib_io_float+set}" = set; then : + enableval=$enable_newlib_io_float; case "${enableval}" in + yes) newlib_io_float=yes ;; + no) newlib_io_float=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-io-float option" "$LINENO" 5 ;; + esac +else + newlib_io_float=yes +fi + +# Check whether --enable-newlib-supplied-syscalls was given. +if test "${enable_newlib_supplied_syscalls+set}" = set; then : + enableval=$enable_newlib_supplied_syscalls; case "${enableval}" in + yes) newlib_may_supply_syscalls=yes ;; + no) newlib_may_supply_syscalls=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;; + esac +else + newlib_may_supply_syscalls=yes +fi + + if test x${newlib_may_supply_syscalls} = xyes; then + MAY_SUPPLY_SYSCALLS_TRUE= + MAY_SUPPLY_SYSCALLS_FALSE='#' +else + MAY_SUPPLY_SYSCALLS_TRUE='#' + MAY_SUPPLY_SYSCALLS_FALSE= +fi + + +# Check whether --enable-newlib-fno-builtin was given. +if test "${enable_newlib_fno_builtin+set}" = set; then : + enableval=$enable_newlib_fno_builtin; case "${enableval}" in + yes) newlib_fno_builtin=yes ;; + no) newlib_fno_builtin=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-fno-builtin option" "$LINENO" 5 ;; + esac +else + newlib_fno_builtin= +fi + + + +test -z "${with_target_subdir}" && with_target_subdir=. + +if test "${srcdir}" = "."; then + if test "${with_target_subdir}" != "."; then + newlib_basedir="${srcdir}/${with_multisrctop}../../../.." + else + newlib_basedir="${srcdir}/${with_multisrctop}../../.." + fi +else + newlib_basedir="${srcdir}/../../.." +fi + + + + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='newlib' + VERSION='3.1.0' + + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + +# FIXME: We temporarily define our own version of AC_PROG_CC. This is +# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We +# are probably using a cross compiler, which will not be able to fully +# link an executable. This should really be fixed in autoconf +# itself. + + + + + + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5 +$as_echo_n "checking whether we are using GNU C... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.c <&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_c_compiler_gnu=yes +else + ac_cv_c_compiler_gnu=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } + +if test $ac_cv_c_compiler_gnu = yes; then + GCC=yes + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + elif test $ac_cv_prog_cc_g = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-O2" + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AS="${ac_tool_prefix}as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AS="as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args. +set dummy ${ac_tool_prefix}readelf; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_READELF+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$READELF"; then + ac_cv_prog_READELF="$READELF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_READELF="${ac_tool_prefix}readelf" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +READELF=$ac_cv_prog_READELF +if test -n "$READELF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5 +$as_echo "$READELF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_READELF"; then + ac_ct_READELF=$READELF + # Extract the first word of "readelf", so it can be a program name with args. +set dummy readelf; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_READELF+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_READELF"; then + ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_READELF="readelf" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_READELF=$ac_cv_prog_ac_ct_READELF +if test -n "$ac_ct_READELF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5 +$as_echo "$ac_ct_READELF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_READELF" = x; then + READELF=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + READELF=$ac_ct_READELF + fi +else + READELF="$ac_cv_prog_READELF" +fi + + + + +# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */ +ac_given_INSTALL=$INSTALL + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + +# By default we simply use the C compiler to build assembly code. + +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS + + + + +# We need AC_EXEEXT to keep automake happy in cygnus mode. However, +# at least currently, we never actually build a program, so we never +# need to use $(EXEEXT). Moreover, the test for EXEEXT normally +# fails, because we are probably configuring with a cross compiler +# which can't create executables. So we include AC_EXEEXT to keep +# automake happy, but we don't execute it, since we don't care about +# the result. +if false; then + + dummy_var=1 +fi + +. ${newlib_basedir}/configure.host + +NEWLIB_CFLAGS=${newlib_cflags} + + +NO_INCLUDE_LIST=${noinclude} + + +LDFLAGS=${ldflags} + + + if test x${newlib_elix_level} = x0; then + ELIX_LEVEL_0_TRUE= + ELIX_LEVEL_0_FALSE='#' +else + ELIX_LEVEL_0_TRUE='#' + ELIX_LEVEL_0_FALSE= +fi + + if test x${newlib_elix_level} = x1; then + ELIX_LEVEL_1_TRUE= + ELIX_LEVEL_1_FALSE='#' +else + ELIX_LEVEL_1_TRUE='#' + ELIX_LEVEL_1_FALSE= +fi + + if test x${newlib_elix_level} = x2; then + ELIX_LEVEL_2_TRUE= + ELIX_LEVEL_2_FALSE='#' +else + ELIX_LEVEL_2_TRUE='#' + ELIX_LEVEL_2_FALSE= +fi + + if test x${newlib_elix_level} = x3; then + ELIX_LEVEL_3_TRUE= + ELIX_LEVEL_3_FALSE='#' +else + ELIX_LEVEL_3_TRUE='#' + ELIX_LEVEL_3_FALSE= +fi + + if test x${newlib_elix_level} = x4; then + ELIX_LEVEL_4_TRUE= + ELIX_LEVEL_4_FALSE='#' +else + ELIX_LEVEL_4_TRUE='#' + ELIX_LEVEL_4_FALSE= +fi + + + if test x${use_libtool} = xyes; then + USE_LIBTOOL_TRUE= + USE_LIBTOOL_FALSE='#' +else + USE_LIBTOOL_TRUE='#' + USE_LIBTOOL_FALSE= +fi + + +# Emit any target-specific warnings. +if test "x${newlib_msg_warn}" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${newlib_msg_warn}" >&5 +$as_echo "$as_me: WARNING: ${newlib_msg_warn}" >&2;} +fi + +# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we +# use oext, which is set in configure.host based on the target platform. +OBJEXT=${oext} + + + + + + + + + + + +ac_config_files="$ac_config_files Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then + as_fn_error $? "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_0\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_1\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_3\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_4\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then + as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by newlib $as_me 3.1.0, which was +generated by GNU Autoconf 2.68. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Configuration commands: +$config_commands + +Report bugs to the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +newlib config.status 3.1.0 +configured by $0, generated by GNU Autoconf 2.68, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2010 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/newlib/libc/machine/pru/configure.in b/newlib/libc/machine/pru/configure.in new file mode 100644 index 000000000..d6eea0e9c --- /dev/null +++ b/newlib/libc/machine/pru/configure.in @@ -0,0 +1,14 @@ +dnl This is the newlib/libc/machine/pru configure.in file. +dnl Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.59) +AC_INIT([newlib],[NEWLIB_VERSION]) +AC_CONFIG_SRCDIR([setjmp.s]) + +dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake. +AC_CONFIG_AUX_DIR(../../../..) + +NEWLIB_CONFIGURE(../../..) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/newlib/libc/machine/pru/setjmp.s b/newlib/libc/machine/pru/setjmp.s new file mode 100644 index 000000000..094d931a9 --- /dev/null +++ b/newlib/libc/machine/pru/setjmp.s @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018-2019 Dimitar Dimitrov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + .section .text + .align 3 + .globl setjmp + .type setjmp,@function + .globl longjmp + .type longjmp,@function + + +setjmp: + sbbo r2, r14, 0, 4*12 /* SP, RA, FP, r5-r13 */ + ldi r14, 0 + ret + +longjmp: + lbbo r2, r14, 0, 4*12 /* SP, RA, FP, r5-r13 */ + mov r14, r15 /* copy second arg to return location */ + qbne 1f, r14, 0 /* per stdC, we cannot return 0 */ + ldi r14, 1 +1: + ret From 0764a2eab84ee0c22dddc7cbed40d5f39e54adf6 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 31 Oct 2019 14:52:04 -0400 Subject: [PATCH 081/520] Fix some generated files --- newlib/libm/Makefile.in | 4 +++- newlib/libm/machine/aarch64/Makefile.in | 7 +++---- newlib/libm/machine/x86_64/Makefile.in | 11 +++++------ newlib/libm/machine/x86_64/aclocal.m4 | 10 +++++----- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/newlib/libm/Makefile.in b/newlib/libm/Makefile.in index dd1a71750..20fc2902c 100644 --- a/newlib/libm/Makefile.in +++ b/newlib/libm/Makefile.in @@ -907,7 +907,7 @@ uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ $(SUBLIBS): -libm.dvi: targetdep.tex math/stmp-def complex/stmp-def +libm.dvi: targetdep.tex math/stmp-def complex/stmp-def fenv/stmp-def stmp-targetdep: force rm -f tmp.texi @@ -926,6 +926,8 @@ math/stmp-def: stmp-targetdep ; @true complex/stmp-def: stmp-targetdep ; @true +fenv/stmp-def: stmp-targetdep ; @true + docbook-recursive: force for d in $(SUBDIRS); do \ if test "$$d" != "."; then \ diff --git a/newlib/libm/machine/aarch64/Makefile.in b/newlib/libm/machine/aarch64/Makefile.in index ac85b3fef..d31237e0f 100644 --- a/newlib/libm/machine/aarch64/Makefile.in +++ b/newlib/libm/machine/aarch64/Makefile.in @@ -52,10 +52,9 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(srcdir)/../../../Makefile.shared INSTALL \ - $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/../../../../mkinstalldirs +DIST_COMMON = $(srcdir)/../../../Makefile.shared $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \ diff --git a/newlib/libm/machine/x86_64/Makefile.in b/newlib/libm/machine/x86_64/Makefile.in index 71881666b..201913a68 100644 --- a/newlib/libm/machine/x86_64/Makefile.in +++ b/newlib/libm/machine/x86_64/Makefile.in @@ -58,12 +58,11 @@ DIST_COMMON = $(srcdir)/../../../Makefile.shared $(srcdir)/Makefile.in \ $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = \ - $(top_srcdir)/../../../../newlib-3.1.0libtool.m4 \ - $(top_srcdir)/../../../../newlib-3.1.0ltoptions.m4 \ - $(top_srcdir)/../../../../newlib-3.1.0ltsugar.m4 \ - $(top_srcdir)/../../../../newlib-3.1.0ltversion.m4 \ - $(top_srcdir)/../../../../newlib-3.1.0lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/../../../../libtool.m4 \ + $(top_srcdir)/../../../../ltoptions.m4 \ + $(top_srcdir)/../../../../ltsugar.m4 \ + $(top_srcdir)/../../../../ltversion.m4 \ + $(top_srcdir)/../../../../lt~obsolete.m4 \ $(top_srcdir)/../../../acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) diff --git a/newlib/libm/machine/x86_64/aclocal.m4 b/newlib/libm/machine/x86_64/aclocal.m4 index c5293fc4b..b10d973c5 100644 --- a/newlib/libm/machine/x86_64/aclocal.m4 +++ b/newlib/libm/machine/x86_64/aclocal.m4 @@ -1009,9 +1009,9 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR -m4_include([../../../../newlib-3.1.0libtool.m4]) -m4_include([../../../../newlib-3.1.0ltoptions.m4]) -m4_include([../../../../newlib-3.1.0ltsugar.m4]) -m4_include([../../../../newlib-3.1.0ltversion.m4]) -m4_include([../../../../newlib-3.1.0lt~obsolete.m4]) +m4_include([../../../../libtool.m4]) +m4_include([../../../../ltoptions.m4]) +m4_include([../../../../ltsugar.m4]) +m4_include([../../../../ltversion.m4]) +m4_include([../../../../lt~obsolete.m4]) m4_include([../../../acinclude.m4]) From a1f617466da75b6b395244def2b2df20e99c2095 Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov Date: Sun, 11 Mar 2018 22:15:05 +0200 Subject: [PATCH 082/520] PRU: Align libmath to PRU ABI The TI proprietary toolchain uses nonstandard names for some math library functions. In order to achieve ABI compatibility between GNU and TI toolchains, add support for the TI function names. Signed-off-by: Dimitar Dimitrov --- newlib/configure.host | 1 + newlib/libm/machine/configure | 7 +- newlib/libm/machine/configure.in | 1 + newlib/libm/machine/pru/Makefile.am | 19 + newlib/libm/machine/pru/Makefile.in | 544 +++ newlib/libm/machine/pru/aclocal.m4 | 1012 ++++++ newlib/libm/machine/pru/configure | 4766 +++++++++++++++++++++++++ newlib/libm/machine/pru/configure.in | 11 + newlib/libm/machine/pru/fpclassify.c | 36 + newlib/libm/machine/pru/fpclassifyf.c | 36 + newlib/libm/machine/pru/isfinite.c | 36 + newlib/libm/machine/pru/isfinitef.c | 36 + newlib/libm/machine/pru/isinf.c | 36 + newlib/libm/machine/pru/isinff.c | 36 + newlib/libm/machine/pru/isnan.c | 36 + newlib/libm/machine/pru/isnanf.c | 36 + newlib/libm/machine/pru/isnormal.c | 36 + newlib/libm/machine/pru/isnormalf.c | 36 + 18 files changed, 6719 insertions(+), 2 deletions(-) create mode 100644 newlib/libm/machine/pru/Makefile.am create mode 100644 newlib/libm/machine/pru/Makefile.in create mode 100644 newlib/libm/machine/pru/aclocal.m4 create mode 100755 newlib/libm/machine/pru/configure create mode 100644 newlib/libm/machine/pru/configure.in create mode 100644 newlib/libm/machine/pru/fpclassify.c create mode 100644 newlib/libm/machine/pru/fpclassifyf.c create mode 100644 newlib/libm/machine/pru/isfinite.c create mode 100644 newlib/libm/machine/pru/isfinitef.c create mode 100644 newlib/libm/machine/pru/isinf.c create mode 100644 newlib/libm/machine/pru/isinff.c create mode 100644 newlib/libm/machine/pru/isnan.c create mode 100644 newlib/libm/machine/pru/isnanf.c create mode 100644 newlib/libm/machine/pru/isnormal.c create mode 100644 newlib/libm/machine/pru/isnormalf.c diff --git a/newlib/configure.host b/newlib/configure.host index 517dc8255..43beb829a 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -298,6 +298,7 @@ case "${host_cpu}" in default_newlib_nano_malloc="yes" default_newlib_atexit_dynamic_alloc="no" machine_dir=pru + libm_machine_dir=pru ;; riscv*) libm_machine_dir=riscv diff --git a/newlib/libm/machine/configure b/newlib/libm/machine/configure index 2053e9cd3..81553d408 100755 --- a/newlib/libm/machine/configure +++ b/newlib/libm/machine/configure @@ -790,6 +790,7 @@ ac_subdirs_all='aarch64 arm i386 nds32 +pru spu riscv x86_64' @@ -11454,7 +11455,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11457 "configure" +#line 11458 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11560,7 +11561,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11563 "configure" +#line 11564 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11812,6 +11813,8 @@ subdirs="$subdirs aarch64" i386) subdirs="$subdirs i386" ;; nds32) subdirs="$subdirs nds32" + ;; + pru) subdirs="$subdirs pru" ;; spu) subdirs="$subdirs spu" ;; diff --git a/newlib/libm/machine/configure.in b/newlib/libm/machine/configure.in index f43ae1b67..d4635214a 100644 --- a/newlib/libm/machine/configure.in +++ b/newlib/libm/machine/configure.in @@ -29,6 +29,7 @@ if test -n "${libm_machine_dir}"; then arm) AC_CONFIG_SUBDIRS(arm) ;; i386) AC_CONFIG_SUBDIRS(i386) ;; nds32) AC_CONFIG_SUBDIRS(nds32) ;; + pru) AC_CONFIG_SUBDIRS(pru) ;; spu) AC_CONFIG_SUBDIRS(spu) ;; riscv) AC_CONFIG_SUBDIRS(riscv) ;; x86_64) AC_CONFIG_SUBDIRS(x86_64) ;; diff --git a/newlib/libm/machine/pru/Makefile.am b/newlib/libm/machine/pru/Makefile.am new file mode 100644 index 000000000..69facdf34 --- /dev/null +++ b/newlib/libm/machine/pru/Makefile.am @@ -0,0 +1,19 @@ +## Process this file with automake to generate Makefile.in + +INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \ + $(CROSS_CFLAGS) $(TARGET_CFLAGS) + +LIB_SOURCES = \ + fpclassify.c fpclassifyf.c isfinite.c isfinitef.c isinf.c \ + isinff.c isnan.c isnanf.c isnormal.c isnormalf.c + +noinst_LIBRARIES = lib.a +lib_a_SOURCES = $(LIB_SOURCES) +lib_a_CFLAGS = $(AM_CFLAGS) +lib_a_CCASFLAGS = $(AM_CCASFLAGS) +noinst_DATA = + +include $(srcdir)/../../../Makefile.shared + +ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. +CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host diff --git a/newlib/libm/machine/pru/Makefile.in b/newlib/libm/machine/pru/Makefile.in new file mode 100644 index 000000000..39e393207 --- /dev/null +++ b/newlib/libm/machine/pru/Makefile.in @@ -0,0 +1,544 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/../../../Makefile.shared $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +lib_a_AR = $(AR) $(ARFLAGS) +lib_a_LIBADD = +am__objects_1 = lib_a-fpclassify.$(OBJEXT) lib_a-fpclassifyf.$(OBJEXT) \ + lib_a-isfinite.$(OBJEXT) lib_a-isfinitef.$(OBJEXT) \ + lib_a-isinf.$(OBJEXT) lib_a-isinff.$(OBJEXT) \ + lib_a-isnan.$(OBJEXT) lib_a-isnanf.$(OBJEXT) \ + lib_a-isnormal.$(OBJEXT) lib_a-isnormalf.$(OBJEXT) +am_lib_a_OBJECTS = $(am__objects_1) +lib_a_OBJECTS = $(am_lib_a_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = +am__depfiles_maybe = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(lib_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +DATA = $(noinst_DATA) +ETAGS = etags +CTAGS = ctags +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NEWLIB_CFLAGS = @NEWLIB_CFLAGS@ +NO_INCLUDE_LIST = @NO_INCLUDE_LIST@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +READELF = @READELF@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +aext = @aext@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +libm_machine_dir = @libm_machine_dir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lpfx = @lpfx@ +machine_dir = @machine_dir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +newlib_basedir = @newlib_basedir@ +oext = @oext@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sys_dir = @sys_dir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \ + $(CROSS_CFLAGS) $(TARGET_CFLAGS) + +LIB_SOURCES = \ + fpclassify.c fpclassifyf.c isfinite.c isfinitef.c isinf.c \ + isinff.c isnan.c isnanf.c isnormal.c isnormalf.c + +noinst_LIBRARIES = lib.a +lib_a_SOURCES = $(LIB_SOURCES) +lib_a_CFLAGS = $(AM_CFLAGS) +lib_a_CCASFLAGS = $(AM_CCASFLAGS) +noinst_DATA = + +# +# documentation rules +# +SUFFIXES = .def .xml +CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str +DOCBOOK_CHEW = ${top_srcdir}/../doc/makedocbook.py +DOCBOOK_OUT_FILES = $(CHEWOUT_FILES:.def=.xml) +DOCBOOK_CHAPTERS = $(CHAPTERS:.tex=.xml) +CLEANFILES = $(CHEWOUT_FILES) $(DOCBOOK_OUT_FILES) +ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. +CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host +all: all-am + +.SUFFIXES: +.SUFFIXES: .def .xml .c .o .obj +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../../Makefile.shared $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --cygnus \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --cygnus Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; +$(srcdir)/../../../Makefile.shared: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES) + -rm -f lib.a + $(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD) + $(RANLIB) lib.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.c.o: + $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -c `$(CYGPATH_W) '$<'` + +lib_a-fpclassify.o: fpclassify.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fpclassify.o `test -f 'fpclassify.c' || echo '$(srcdir)/'`fpclassify.c + +lib_a-fpclassify.obj: fpclassify.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fpclassify.obj `if test -f 'fpclassify.c'; then $(CYGPATH_W) 'fpclassify.c'; else $(CYGPATH_W) '$(srcdir)/fpclassify.c'; fi` + +lib_a-fpclassifyf.o: fpclassifyf.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fpclassifyf.o `test -f 'fpclassifyf.c' || echo '$(srcdir)/'`fpclassifyf.c + +lib_a-fpclassifyf.obj: fpclassifyf.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fpclassifyf.obj `if test -f 'fpclassifyf.c'; then $(CYGPATH_W) 'fpclassifyf.c'; else $(CYGPATH_W) '$(srcdir)/fpclassifyf.c'; fi` + +lib_a-isfinite.o: isfinite.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isfinite.o `test -f 'isfinite.c' || echo '$(srcdir)/'`isfinite.c + +lib_a-isfinite.obj: isfinite.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isfinite.obj `if test -f 'isfinite.c'; then $(CYGPATH_W) 'isfinite.c'; else $(CYGPATH_W) '$(srcdir)/isfinite.c'; fi` + +lib_a-isfinitef.o: isfinitef.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isfinitef.o `test -f 'isfinitef.c' || echo '$(srcdir)/'`isfinitef.c + +lib_a-isfinitef.obj: isfinitef.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isfinitef.obj `if test -f 'isfinitef.c'; then $(CYGPATH_W) 'isfinitef.c'; else $(CYGPATH_W) '$(srcdir)/isfinitef.c'; fi` + +lib_a-isinf.o: isinf.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isinf.o `test -f 'isinf.c' || echo '$(srcdir)/'`isinf.c + +lib_a-isinf.obj: isinf.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isinf.obj `if test -f 'isinf.c'; then $(CYGPATH_W) 'isinf.c'; else $(CYGPATH_W) '$(srcdir)/isinf.c'; fi` + +lib_a-isinff.o: isinff.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isinff.o `test -f 'isinff.c' || echo '$(srcdir)/'`isinff.c + +lib_a-isinff.obj: isinff.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isinff.obj `if test -f 'isinff.c'; then $(CYGPATH_W) 'isinff.c'; else $(CYGPATH_W) '$(srcdir)/isinff.c'; fi` + +lib_a-isnan.o: isnan.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isnan.o `test -f 'isnan.c' || echo '$(srcdir)/'`isnan.c + +lib_a-isnan.obj: isnan.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isnan.obj `if test -f 'isnan.c'; then $(CYGPATH_W) 'isnan.c'; else $(CYGPATH_W) '$(srcdir)/isnan.c'; fi` + +lib_a-isnanf.o: isnanf.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isnanf.o `test -f 'isnanf.c' || echo '$(srcdir)/'`isnanf.c + +lib_a-isnanf.obj: isnanf.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isnanf.obj `if test -f 'isnanf.c'; then $(CYGPATH_W) 'isnanf.c'; else $(CYGPATH_W) '$(srcdir)/isnanf.c'; fi` + +lib_a-isnormal.o: isnormal.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isnormal.o `test -f 'isnormal.c' || echo '$(srcdir)/'`isnormal.c + +lib_a-isnormal.obj: isnormal.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isnormal.obj `if test -f 'isnormal.c'; then $(CYGPATH_W) 'isnormal.c'; else $(CYGPATH_W) '$(srcdir)/isnormal.c'; fi` + +lib_a-isnormalf.o: isnormalf.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isnormalf.o `test -f 'isnormalf.c' || echo '$(srcdir)/'`isnormalf.c + +lib_a-isnormalf.obj: isnormalf.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isnormalf.obj `if test -f 'isnormalf.c'; then $(CYGPATH_W) 'isnormalf.c'; else $(CYGPATH_W) '$(srcdir)/isnormalf.c'; fi` + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +check-am: +check: check-am +all-am: Makefile $(LIBRARIES) $(DATA) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-generic clean-noinstLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-tags dvi dvi-am \ + html html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am + +objectlist.awk.in: $(noinst_LTLIBRARIES) + -rm -f objectlist.awk.in + for i in `ls *.lo` ; \ + do \ + echo $$i `pwd`/$$i >> objectlist.awk.in ; \ + done + +.c.def: + $(CHEW) < $< > $*.def || ( rm $*.def && false ) + @touch stmp-def + +TARGETDOC ?= ../tmp.texi + +doc: $(CHEWOUT_FILES) + for chapter in $(CHAPTERS) ; \ + do \ + cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \ + done + +.c.xml: + $(DOCBOOK_CHEW) < $< > $*.xml || ( rm $*.xml && false ) + @touch stmp-xml + +docbook: $(DOCBOOK_OUT_FILES) + for chapter in $(DOCBOOK_CHAPTERS) ; \ + do \ + ${top_srcdir}/../doc/chapter-texi2docbook.py <$(srcdir)/$${chapter%.xml}.tex >../$$chapter ; \ + done + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/newlib/libm/machine/pru/aclocal.m4 b/newlib/libm/machine/pru/aclocal.m4 new file mode 100644 index 000000000..18dab02aa --- /dev/null +++ b/newlib/libm/machine/pru/aclocal.m4 @@ -0,0 +1,1012 @@ +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.6], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.11.6])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 16 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, +# 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless `enable' is passed literally. +# For symmetry, `disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], +[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([../../../acinclude.m4]) diff --git a/newlib/libm/machine/pru/configure b/newlib/libm/machine/pru/configure new file mode 100755 index 000000000..24feba10f --- /dev/null +++ b/newlib/libm/machine/pru/configure @@ -0,0 +1,4766 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='newlib' +PACKAGE_TARNAME='newlib' +PACKAGE_VERSION='3.1.0' +PACKAGE_STRING='newlib 3.1.0' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +ac_unique_file="Makefile.am" +ac_subst_vars='LTLIBOBJS +LIBOBJS +sys_dir +machine_dir +libm_machine_dir +lpfx +aext +oext +OBJEXT +USE_LIBTOOL_FALSE +USE_LIBTOOL_TRUE +ELIX_LEVEL_4_FALSE +ELIX_LEVEL_4_TRUE +ELIX_LEVEL_3_FALSE +ELIX_LEVEL_3_TRUE +ELIX_LEVEL_2_FALSE +ELIX_LEVEL_2_TRUE +ELIX_LEVEL_1_FALSE +ELIX_LEVEL_1_TRUE +ELIX_LEVEL_0_FALSE +ELIX_LEVEL_0_TRUE +LDFLAGS +NO_INCLUDE_LIST +NEWLIB_CFLAGS +CCASFLAGS +CCAS +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +READELF +RANLIB +AR +AS +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +CC +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +newlib_basedir +MAY_SUPPLY_SYSCALLS_FALSE +MAY_SUPPLY_SYSCALLS_TRUE +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_multilib +enable_target_optspace +enable_malloc_debugging +enable_newlib_multithread +enable_newlib_iconv +enable_newlib_elix_level +enable_newlib_io_float +enable_newlib_supplied_syscalls +enable_newlib_fno_builtin +enable_dependency_tracking +enable_maintainer_mode +' + ac_precious_vars='build_alias +host_alias +target_alias +CCAS +CCASFLAGS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/newlib] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of newlib 3.1.0:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-multilib build many library versions (default) + --enable-target-optspace optimize for space + --enable-malloc-debugging indicate malloc debugging requested + --enable-newlib-multithread enable support for multiple threads + --enable-newlib-iconv enable iconv library support + --enable-newlib-elix-level supply desired elix library level (1-4) + --disable-newlib-io-float disable printf/scanf family float support + --disable-newlib-supplied-syscalls disable newlib from supplying syscalls + --disable-newlib-fno-builtin disable -fno-builtin flag to allow compiler to use builtin library functions + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + +Some influential environment variables: + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to the package provider. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +newlib configure 3.1.0 +generated by GNU Autoconf 2.68 + +Copyright (C) 2010 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by newlib $as_me 3.1.0, which was +generated by GNU Autoconf 2.68. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +ac_aux_dir= +for ac_dir in ../../../.. "$srcdir"/../../../..; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../../.. \"$srcdir\"/../../../.." "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +am__api_version='1.11' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" = set; then : + enableval=$enable_multilib; case "${enableval}" in + yes) multilib=yes ;; + no) multilib=no ;; + *) as_fn_error $? "bad value ${enableval} for multilib option" "$LINENO" 5 ;; + esac +else + multilib=yes +fi + +# Check whether --enable-target-optspace was given. +if test "${enable_target_optspace+set}" = set; then : + enableval=$enable_target_optspace; case "${enableval}" in + yes) target_optspace=yes ;; + no) target_optspace=no ;; + *) as_fn_error $? "bad value ${enableval} for target-optspace option" "$LINENO" 5 ;; + esac +else + target_optspace= +fi + +# Check whether --enable-malloc-debugging was given. +if test "${enable_malloc_debugging+set}" = set; then : + enableval=$enable_malloc_debugging; case "${enableval}" in + yes) malloc_debugging=yes ;; + no) malloc_debugging=no ;; + *) as_fn_error $? "bad value ${enableval} for malloc-debugging option" "$LINENO" 5 ;; + esac +else + malloc_debugging= +fi + +# Check whether --enable-newlib-multithread was given. +if test "${enable_newlib_multithread+set}" = set; then : + enableval=$enable_newlib_multithread; case "${enableval}" in + yes) newlib_multithread=yes ;; + no) newlib_multithread=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-multithread option" "$LINENO" 5 ;; + esac +else + newlib_multithread=yes +fi + +# Check whether --enable-newlib-iconv was given. +if test "${enable_newlib_iconv+set}" = set; then : + enableval=$enable_newlib_iconv; if test "${newlib_iconv+set}" != set; then + case "${enableval}" in + yes) newlib_iconv=yes ;; + no) newlib_iconv=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-iconv option" "$LINENO" 5 ;; + esac + fi +else + newlib_iconv=${newlib_iconv} +fi + +# Check whether --enable-newlib-elix-level was given. +if test "${enable_newlib_elix_level+set}" = set; then : + enableval=$enable_newlib_elix_level; case "${enableval}" in + 0) newlib_elix_level=0 ;; + 1) newlib_elix_level=1 ;; + 2) newlib_elix_level=2 ;; + 3) newlib_elix_level=3 ;; + 4) newlib_elix_level=4 ;; + *) as_fn_error $? "bad value ${enableval} for newlib-elix-level option" "$LINENO" 5 ;; + esac +else + newlib_elix_level=0 +fi + +# Check whether --enable-newlib-io-float was given. +if test "${enable_newlib_io_float+set}" = set; then : + enableval=$enable_newlib_io_float; case "${enableval}" in + yes) newlib_io_float=yes ;; + no) newlib_io_float=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-io-float option" "$LINENO" 5 ;; + esac +else + newlib_io_float=yes +fi + +# Check whether --enable-newlib-supplied-syscalls was given. +if test "${enable_newlib_supplied_syscalls+set}" = set; then : + enableval=$enable_newlib_supplied_syscalls; case "${enableval}" in + yes) newlib_may_supply_syscalls=yes ;; + no) newlib_may_supply_syscalls=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;; + esac +else + newlib_may_supply_syscalls=yes +fi + + if test x${newlib_may_supply_syscalls} = xyes; then + MAY_SUPPLY_SYSCALLS_TRUE= + MAY_SUPPLY_SYSCALLS_FALSE='#' +else + MAY_SUPPLY_SYSCALLS_TRUE='#' + MAY_SUPPLY_SYSCALLS_FALSE= +fi + + +# Check whether --enable-newlib-fno-builtin was given. +if test "${enable_newlib_fno_builtin+set}" = set; then : + enableval=$enable_newlib_fno_builtin; case "${enableval}" in + yes) newlib_fno_builtin=yes ;; + no) newlib_fno_builtin=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-fno-builtin option" "$LINENO" 5 ;; + esac +else + newlib_fno_builtin= +fi + + + +test -z "${with_target_subdir}" && with_target_subdir=. + +if test "${srcdir}" = "."; then + if test "${with_target_subdir}" != "."; then + newlib_basedir="${srcdir}/${with_multisrctop}../../../.." + else + newlib_basedir="${srcdir}/${with_multisrctop}../../.." + fi +else + newlib_basedir="${srcdir}/../../.." +fi + + + + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='newlib' + VERSION='3.1.0' + + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + +# FIXME: We temporarily define our own version of AC_PROG_CC. This is +# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We +# are probably using a cross compiler, which will not be able to fully +# link an executable. This should really be fixed in autoconf +# itself. + + + + + + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5 +$as_echo_n "checking whether we are using GNU C... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.c <&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_c_compiler_gnu=yes +else + ac_cv_c_compiler_gnu=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } + +if test $ac_cv_c_compiler_gnu = yes; then + GCC=yes + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + elif test $ac_cv_prog_cc_g = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-O2" + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AS="${ac_tool_prefix}as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AS="as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args. +set dummy ${ac_tool_prefix}readelf; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_READELF+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$READELF"; then + ac_cv_prog_READELF="$READELF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_READELF="${ac_tool_prefix}readelf" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +READELF=$ac_cv_prog_READELF +if test -n "$READELF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5 +$as_echo "$READELF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_READELF"; then + ac_ct_READELF=$READELF + # Extract the first word of "readelf", so it can be a program name with args. +set dummy readelf; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_READELF+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_READELF"; then + ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_READELF="readelf" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_READELF=$ac_cv_prog_ac_ct_READELF +if test -n "$ac_ct_READELF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5 +$as_echo "$ac_ct_READELF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_READELF" = x; then + READELF=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + READELF=$ac_ct_READELF + fi +else + READELF="$ac_cv_prog_READELF" +fi + + + + +# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */ +ac_given_INSTALL=$INSTALL + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + +# By default we simply use the C compiler to build assembly code. + +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS + + + + +# We need AC_EXEEXT to keep automake happy in cygnus mode. However, +# at least currently, we never actually build a program, so we never +# need to use $(EXEEXT). Moreover, the test for EXEEXT normally +# fails, because we are probably configuring with a cross compiler +# which can't create executables. So we include AC_EXEEXT to keep +# automake happy, but we don't execute it, since we don't care about +# the result. +if false; then + + dummy_var=1 +fi + +. ${newlib_basedir}/configure.host + +NEWLIB_CFLAGS=${newlib_cflags} + + +NO_INCLUDE_LIST=${noinclude} + + +LDFLAGS=${ldflags} + + + if test x${newlib_elix_level} = x0; then + ELIX_LEVEL_0_TRUE= + ELIX_LEVEL_0_FALSE='#' +else + ELIX_LEVEL_0_TRUE='#' + ELIX_LEVEL_0_FALSE= +fi + + if test x${newlib_elix_level} = x1; then + ELIX_LEVEL_1_TRUE= + ELIX_LEVEL_1_FALSE='#' +else + ELIX_LEVEL_1_TRUE='#' + ELIX_LEVEL_1_FALSE= +fi + + if test x${newlib_elix_level} = x2; then + ELIX_LEVEL_2_TRUE= + ELIX_LEVEL_2_FALSE='#' +else + ELIX_LEVEL_2_TRUE='#' + ELIX_LEVEL_2_FALSE= +fi + + if test x${newlib_elix_level} = x3; then + ELIX_LEVEL_3_TRUE= + ELIX_LEVEL_3_FALSE='#' +else + ELIX_LEVEL_3_TRUE='#' + ELIX_LEVEL_3_FALSE= +fi + + if test x${newlib_elix_level} = x4; then + ELIX_LEVEL_4_TRUE= + ELIX_LEVEL_4_FALSE='#' +else + ELIX_LEVEL_4_TRUE='#' + ELIX_LEVEL_4_FALSE= +fi + + + if test x${use_libtool} = xyes; then + USE_LIBTOOL_TRUE= + USE_LIBTOOL_FALSE='#' +else + USE_LIBTOOL_TRUE='#' + USE_LIBTOOL_FALSE= +fi + + +# Emit any target-specific warnings. +if test "x${newlib_msg_warn}" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${newlib_msg_warn}" >&5 +$as_echo "$as_me: WARNING: ${newlib_msg_warn}" >&2;} +fi + +# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we +# use oext, which is set in configure.host based on the target platform. +OBJEXT=${oext} + + + + + + + + + + + +ac_config_files="$ac_config_files Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then + as_fn_error $? "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_0\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_1\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_3\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_4\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then + as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by newlib $as_me 3.1.0, which was +generated by GNU Autoconf 2.68. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Configuration commands: +$config_commands + +Report bugs to the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +newlib config.status 3.1.0 +configured by $0, generated by GNU Autoconf 2.68, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2010 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/newlib/libm/machine/pru/configure.in b/newlib/libm/machine/pru/configure.in new file mode 100644 index 000000000..7a22fa31c --- /dev/null +++ b/newlib/libm/machine/pru/configure.in @@ -0,0 +1,11 @@ + +AC_PREREQ(2.59) +AC_INIT([newlib],[NEWLIB_VERSION]) +AC_CONFIG_SRCDIR([Makefile.am]) + +AC_CONFIG_AUX_DIR(../../../..) + +NEWLIB_CONFIGURE(../../..) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/newlib/libm/machine/pru/fpclassify.c b/newlib/libm/machine/pru/fpclassify.c new file mode 100644 index 000000000..3556f6532 --- /dev/null +++ b/newlib/libm/machine/pru/fpclassify.c @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018-2019 Dimitar Dimitrov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +/* GCC will not generate code calling this function, since the corresponding + builtin will produce code that uses simple ops only. In order to support + linking against TI CLPRU objects, though, provide the function mandated + by TI ABI. */ +int __pruabi_fpclassify(double a) +{ + return fpclassify(a); +} diff --git a/newlib/libm/machine/pru/fpclassifyf.c b/newlib/libm/machine/pru/fpclassifyf.c new file mode 100644 index 000000000..f4dd201d9 --- /dev/null +++ b/newlib/libm/machine/pru/fpclassifyf.c @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018-2019 Dimitar Dimitrov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +/* GCC will not generate code calling this function, since the corresponding + builtin will produce code that uses simple ops only. In order to support + linking against TI CLPRU objects, though, provide the function mandated + by TI ABI. */ +int __pruabi_fpclassifyf(float a) +{ + return fpclassifyf(a); +} diff --git a/newlib/libm/machine/pru/isfinite.c b/newlib/libm/machine/pru/isfinite.c new file mode 100644 index 000000000..2e61877e9 --- /dev/null +++ b/newlib/libm/machine/pru/isfinite.c @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018-2019 Dimitar Dimitrov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +/* GCC will not generate code calling this function, since the corresponding + builtin will produce code that uses simple ops only. In order to support + linking against TI CLPRU objects, though, provide the function mandated + by TI ABI. */ +int __pruabi_isfinite(double a) +{ + return isfinite(a); +} diff --git a/newlib/libm/machine/pru/isfinitef.c b/newlib/libm/machine/pru/isfinitef.c new file mode 100644 index 000000000..be88157de --- /dev/null +++ b/newlib/libm/machine/pru/isfinitef.c @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018-2019 Dimitar Dimitrov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +/* GCC will not generate code calling this function, since the corresponding + builtin will produce code that uses simple ops only. In order to support + linking against TI CLPRU objects, though, provide the function mandated + by TI ABI. */ +int __pruabi_isfinitef(float a) +{ + return isfinite(a); +} diff --git a/newlib/libm/machine/pru/isinf.c b/newlib/libm/machine/pru/isinf.c new file mode 100644 index 000000000..bd2d883b0 --- /dev/null +++ b/newlib/libm/machine/pru/isinf.c @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018-2019 Dimitar Dimitrov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +/* GCC will not generate code calling this function, since the corresponding + builtin will produce code that uses simple ops only. In order to support + linking against TI CLPRU objects, though, provide the function mandated + by TI ABI. */ +int __pruabi_isinf(double a) +{ + return isinf(a); +} diff --git a/newlib/libm/machine/pru/isinff.c b/newlib/libm/machine/pru/isinff.c new file mode 100644 index 000000000..094371050 --- /dev/null +++ b/newlib/libm/machine/pru/isinff.c @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018-2019 Dimitar Dimitrov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +/* GCC will not generate code calling this function, since the corresponding + builtin will produce code that uses simple ops only. In order to support + linking against TI CLPRU objects, though, provide the function mandated + by TI ABI. */ +int __pruabi_isinff(float a) +{ + return isinf(a); +} diff --git a/newlib/libm/machine/pru/isnan.c b/newlib/libm/machine/pru/isnan.c new file mode 100644 index 000000000..4d2f4dc1f --- /dev/null +++ b/newlib/libm/machine/pru/isnan.c @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018-2019 Dimitar Dimitrov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +/* GCC will not generate code calling this function, since the corresponding + builtin will produce code that uses simple ops only. In order to support + linking against TI CLPRU objects, though, provide the function mandated + by TI ABI. */ +int __pruabi_isnan(double a) +{ + return isnan(a); +} diff --git a/newlib/libm/machine/pru/isnanf.c b/newlib/libm/machine/pru/isnanf.c new file mode 100644 index 000000000..21a2f04ea --- /dev/null +++ b/newlib/libm/machine/pru/isnanf.c @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018-2019 Dimitar Dimitrov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +/* GCC will not generate code calling this function, since the corresponding + builtin will produce code that uses simple ops only. In order to support + linking against TI CLPRU objects, though, provide the function mandated + by TI ABI. */ +int __pruabi_isnanf(float a) +{ + return isnan(a); +} diff --git a/newlib/libm/machine/pru/isnormal.c b/newlib/libm/machine/pru/isnormal.c new file mode 100644 index 000000000..915ec0277 --- /dev/null +++ b/newlib/libm/machine/pru/isnormal.c @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018-2019 Dimitar Dimitrov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +/* GCC will not generate code calling this function, since the corresponding + builtin will produce code that uses simple ops only. In order to support + linking against TI CLPRU objects, though, provide the function mandated + by TI ABI. */ +int __pruabi_isnormal(double a) +{ + return isnormal(a); +} diff --git a/newlib/libm/machine/pru/isnormalf.c b/newlib/libm/machine/pru/isnormalf.c new file mode 100644 index 000000000..b0e9a45fc --- /dev/null +++ b/newlib/libm/machine/pru/isnormalf.c @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018-2019 Dimitar Dimitrov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +/* GCC will not generate code calling this function, since the corresponding + builtin will produce code that uses simple ops only. In order to support + linking against TI CLPRU objects, though, provide the function mandated + by TI ABI. */ +int __pruabi_isnormalf(float a) +{ + return isnormal(a); +} From 235eb63034dcedeb12d4feb0165e50582c090a14 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 31 Oct 2019 15:09:07 -0400 Subject: [PATCH 083/520] Add PRU license to COPYING.NEWLIB and COPYING.LIBGLOSS --- COPYING.LIBGLOSS | 27 +++++++++++++++++++++++++++ COPYING.NEWLIB | 27 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/COPYING.LIBGLOSS b/COPYING.LIBGLOSS index c7a4c2924..99b14310c 100644 --- a/COPYING.LIBGLOSS +++ b/COPYING.LIBGLOSS @@ -425,3 +425,30 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(21) BSD-2-Clause-FreeBSD (pru-* targets) + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2018-2019 Dimitar Dimitrov +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/COPYING.NEWLIB b/COPYING.NEWLIB index 0c39f9031..2ed849342 100644 --- a/COPYING.NEWLIB +++ b/COPYING.NEWLIB @@ -1193,3 +1193,30 @@ and need not follow the licensing terms described here, provided that the new terms are clearly indicated on the first page of each file where they apply. +(52) BSD-2-Clause-FreeBSD (pru-* targets) + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2018-2019 Dimitar Dimitrov +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + From fe239aef1b397145707561fa0bb0a8795cf41fd0 Mon Sep 17 00:00:00 2001 From: Anton Lavrentiev via cygwin-patches Date: Wed, 30 Oct 2019 11:47:25 -0400 Subject: [PATCH 084/520] Cygwin: getpriority() consistent with process priority https://cygwin.com/ml/cygwin/2019-08/msg00122.html --- winsup/cygwin/syscalls.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index a914ae8a9..20126ce10 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -3977,7 +3977,12 @@ getpriority (int which, id_t who) if (!who) who = myself->pid; if ((pid_t) who == myself->pid) - return myself->nice; + { + DWORD winprio = GetPriorityClass(GetCurrentProcess()); + if (winprio != nice_to_winprio(myself->nice)) + myself->nice = winprio_to_nice(winprio); + return myself->nice; + } break; case PRIO_PGRP: if (!who) From fa14f445ba1fb360fb5c4957798bf788345b0ef2 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Wed, 30 Oct 2019 14:35:21 +0000 Subject: [PATCH 085/520] Fix libgloss being built for disabled multilibs Target libraries are considered to be built for GCC's "host", not GCC's "target". The "host" variable must be set by configure scripts using "config-ml.in" to determine multilib support, otherwise disabled multilibs (specified as a configure argument with --disable-) will still be built for the subdirectories those configure scripts reside in. --- libgloss/configure | 1 + libgloss/configure.in | 1 + 2 files changed, 2 insertions(+) diff --git a/libgloss/configure b/libgloss/configure index eb116b58d..6c592b16b 100755 --- a/libgloss/configure +++ b/libgloss/configure @@ -3883,6 +3883,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" srcdir=${srcdir} target=${target} +host=${host} with_multisubdir=${with_multisubdir} ac_configure_args="--enable-multilib ${ac_configure_args}" CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} diff --git a/libgloss/configure.in b/libgloss/configure.in index a681f233f..16f413f66 100644 --- a/libgloss/configure.in +++ b/libgloss/configure.in @@ -229,6 +229,7 @@ AC_CONFIG_FILES([Makefile], fi], srcdir=${srcdir} target=${target} +host=${host} with_multisubdir=${with_multisubdir} ac_configure_args="--enable-multilib ${ac_configure_args}" CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} From 57640bee75d18fac5ce6507f9a2c7a712ca750d8 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sat, 2 Nov 2019 12:49:15 +0100 Subject: [PATCH 086/520] Cygwin: fix process parent/child relationship after execve Commit 5a0f2c00aa "Cygwin: fork/exec: fix child process permissions" removed the PROCESS_DUP_HANDLE handle permission of the parent process handle in the child to avoid a security problem. It turned out that this broke the following scenario: If a process forks and then the parent execs, the child loses the ability to register the parent's death. To wit, after the parent died the child process does not set its own PPID to 1 anymore. The current exec mechanism copies required handle values (handles to keep contact to the child processes) into the child_info for the about-to-be-exec'ed process. The exec'ed process is supposed to duplicate these handles. This fails, given that we don't allow the exec'ed process PROCESS_DUP_HANDLE access to the exec'ing process since commit 5a0f2c00aa. The fix is to avoid the DuplicateHandle calls in the exec'ed process. This patch sets the affected handles to "inheritable" in the exec'ing process at exec time. The exec'ed process just copies the handle values and resets handle inheritance to "non-inheritable". The exec'ing process doesn't have to reset handle inheritance, it exits after setting up the exec'ed process anyway. Testcase: $ ssh-agent /bin/sleep 3 ssh-agent forks and the parent exec's sleep. After sleep exits, `ps' should show ssh-agent to have PPID 1, and eventually ssh-agent exits. Signed-off-by: Corinna Vinschen --- winsup/cygwin/pinfo.cc | 41 ++++++++++++++++--------------------- winsup/cygwin/pinfo.h | 1 + winsup/cygwin/release/3.1.0 | 3 +++ winsup/cygwin/sigproc.cc | 3 +++ 4 files changed, 25 insertions(+), 23 deletions(-) diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 35c1ffe25..800adbff1 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -478,33 +478,28 @@ pinfo::set_acl() debug_printf ("NtSetSecurityObject %y", status); } +void +pinfo_minimal::set_inheritance (bool inherit) +{ + DWORD i_flag = inherit ? HANDLE_FLAG_INHERIT : 0; + + SetHandleInformation (rd_proc_pipe, HANDLE_FLAG_INHERIT, i_flag); + SetHandleInformation (hProcess, HANDLE_FLAG_INHERIT, i_flag); + SetHandleInformation (h, HANDLE_FLAG_INHERIT, i_flag); +} + pinfo::pinfo (HANDLE parent, pinfo_minimal& from, pid_t pid): pinfo_minimal (), destroy (false), procinfo (NULL), waiter_ready (false), wait_thread (NULL) { - HANDLE herr; - const char *duperr = NULL; - if (!DuplicateHandle (parent, herr = from.rd_proc_pipe, GetCurrentProcess (), - &rd_proc_pipe, 0, false, DUPLICATE_SAME_ACCESS)) - duperr = "couldn't duplicate parent rd_proc_pipe handle %p for forked child %d after exec, %E"; - else if (!DuplicateHandle (parent, herr = from.hProcess, GetCurrentProcess (), - &hProcess, 0, false, DUPLICATE_SAME_ACCESS)) - duperr = "couldn't duplicate parent process handle %p for forked child %d after exec, %E"; - else - { - h = NULL; - DuplicateHandle (parent, from.h, GetCurrentProcess (), &h, 0, false, - DUPLICATE_SAME_ACCESS); - init (pid, PID_MAP_RW, h); - if (*this) - return; - } - - if (duperr) - debug_printf (duperr, herr, pid); - - /* Returning with procinfo == NULL. Any open handles will be closed by the - destructor. */ + /* cygheap_exec_info::record_children set the inheritance of the required + child handles so just copy them over... */ + rd_proc_pipe = from.rd_proc_pipe; + hProcess = from.hProcess; + h = from.h; + /* ...and reset their inheritance. */ + set_inheritance (false); + init (pid, PID_MAP_RW, h); } const char * diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h index 8cf1bba2e..23f308360 100644 --- a/winsup/cygwin/pinfo.h +++ b/winsup/cygwin/pinfo.h @@ -139,6 +139,7 @@ public: HANDLE rd_proc_pipe; pinfo_minimal (): h (NULL), hProcess (NULL), rd_proc_pipe (NULL) {} void set_rd_proc_pipe (HANDLE& h) {rd_proc_pipe = h;} + void set_inheritance (bool); friend class pinfo; }; diff --git a/winsup/cygwin/release/3.1.0 b/winsup/cygwin/release/3.1.0 index fb0e37215..23f752ca7 100644 --- a/winsup/cygwin/release/3.1.0 +++ b/winsup/cygwin/release/3.1.0 @@ -94,3 +94,6 @@ Bug Fixes - Make spawnvp, spawnvpe fail if the executable is not in $PATH. Addresses: https://cygwin.com/ml/cygwin/2019-10/msg00032.html + +- Fix parent/child relationship after parent dies. + Addresses: https://cygwin.com/ml/cygwin/2019-09/msg00263.html diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 91abb717c..aff1ed61b 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -949,6 +949,9 @@ cygheap_exec_info::record_children () { children[nchildren].pid = procs[nchildren]->pid; children[nchildren].p = procs[nchildren]; + /* Set inheritance of required child handles for reattach_children + in the about-to-be-execed process. */ + children[nchildren].p.set_inheritance (true); } } From 7346e14d44e0f5ad78759bafc218b4be61408527 Mon Sep 17 00:00:00 2001 From: imp Date: Sat, 13 Apr 2019 04:46:35 +0000 Subject: [PATCH 087/520] Fix sbttons for values > 2s Add test against negative times. Add code to cope with larger values properly. Discussed with: bde@ (quite some time ago, for an earlier version) --- newlib/libc/include/sys/time.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/newlib/libc/include/sys/time.h b/newlib/libc/include/sys/time.h index c760adfbd..103f56660 100644 --- a/newlib/libc/include/sys/time.h +++ b/newlib/libc/include/sys/time.h @@ -33,7 +33,7 @@ * SUCH DAMAGE. * * @(#)time.h 8.5 (Berkeley) 5/4/95 - * $FreeBSD: head/sys/sys/time.h 340664 2018-11-20 07:11:23Z imp $ + * $FreeBSD: head/sys/sys/time.h 346176 2019-04-13 04:46:35Z imp $ */ #ifndef _SYS_TIME_H_ @@ -191,8 +191,15 @@ sbttobt(sbintime_t _sbt) static __inline int64_t sbttons(sbintime_t _sbt) { + uint64_t ns; - return ((1000000000 * _sbt) >> 32); + ns = _sbt; + if (ns >= SBT_1S) + ns = (ns >> 32) * 1000000000; + else + ns = 0; + + return (ns + (1000000000 * (_sbt & 0xffffffffu) >> 32)); } static __inline sbintime_t From 4b3f69e4ac7e603ffe031aa3ec61c76e991fe6eb Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 24 Sep 2019 08:32:47 +0200 Subject: [PATCH 088/520] Synchronize with FreeBSD --- newlib/libc/include/sys/_timespec.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/newlib/libc/include/sys/_timespec.h b/newlib/libc/include/sys/_timespec.h index 7609e4a46..f810b008f 100644 --- a/newlib/libc/include/sys/_timespec.h +++ b/newlib/libc/include/sys/_timespec.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * @@ -10,7 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -28,7 +30,7 @@ * * @(#)time.h 8.5 (Berkeley) 5/4/95 * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp - * $FreeBSD$ + * $FreeBSD: head/sys/sys/_timespec.h 326023 2017-11-20 19:43:44Z pfg $ */ #ifndef _SYS__TIMESPEC_H_ From aae831b083ab762726bfb2c07584a481e6925b81 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 23 Sep 2019 12:02:11 +0200 Subject: [PATCH 089/520] Synchronize with FreeBSD This change is based on the FreeBSD commit: Author: asomers Date: Mon Jul 30 15:46:40 2018 +0000 Make timespecadd(3) and friends public The timespecadd(3) family of macros were imported from NetBSD back in r35029. However, they were initially guarded by #ifdef _KERNEL. In the meantime, we have grown at least 28 syscalls that use timespecs in some way, leading many programs both inside and outside of the base system to redefine those macros. It's better just to make the definitions public. Our kernel currently defines two-argument versions of timespecadd and timespecsub. NetBSD, OpenBSD, and FreeDesktop.org's libbsd, however, define three-argument versions. Solaris also defines a three-argument version, but only in its kernel. This revision changes our definition to match the common three-argument version. Bump _FreeBSD_version due to the breaking KPI change. Discussed with: cem, jilles, ian, bde Differential Revision: https://reviews.freebsd.org/D14725 --- newlib/libc/include/sys/time.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/newlib/libc/include/sys/time.h b/newlib/libc/include/sys/time.h index 103f56660..370c13406 100644 --- a/newlib/libc/include/sys/time.h +++ b/newlib/libc/include/sys/time.h @@ -340,6 +340,33 @@ tvtosbt(struct timeval _tv) return (((sbintime_t)_tv.tv_sec << 32) + ustosbt(_tv.tv_usec)); } + +/* Operations on timespecs */ +#define timespecclear(tvp) ((tvp)->tv_sec = (tvp)->tv_nsec = 0) +#define timespecisset(tvp) ((tvp)->tv_sec || (tvp)->tv_nsec) +#define timespeccmp(tvp, uvp, cmp) \ + (((tvp)->tv_sec == (uvp)->tv_sec) ? \ + ((tvp)->tv_nsec cmp (uvp)->tv_nsec) : \ + ((tvp)->tv_sec cmp (uvp)->tv_sec)) + +#define timespecadd(tsp, usp, vsp) \ + do { \ + (vsp)->tv_sec = (tsp)->tv_sec + (usp)->tv_sec; \ + (vsp)->tv_nsec = (tsp)->tv_nsec + (usp)->tv_nsec; \ + if ((vsp)->tv_nsec >= 1000000000L) { \ + (vsp)->tv_sec++; \ + (vsp)->tv_nsec -= 1000000000L; \ + } \ + } while (0) +#define timespecsub(tsp, usp, vsp) \ + do { \ + (vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \ + (vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \ + if ((vsp)->tv_nsec < 0) { \ + (vsp)->tv_sec--; \ + (vsp)->tv_nsec += 1000000000L; \ + } \ + } while (0) #endif /* __BSD_VISIBLE */ /* From 4082e91b59e7fe34fe50964ecfc970ed2283b3d9 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 24 Sep 2019 08:34:35 +0200 Subject: [PATCH 090/520] Move timeval macros to In FreeBSD, NetBSD, and OpenBSD these macros are defined in . --- newlib/libc/include/sys/_timeval.h | 35 +++--------------------------- newlib/libc/include/sys/time.h | 28 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 32 deletions(-) diff --git a/newlib/libc/include/sys/_timeval.h b/newlib/libc/include/sys/_timeval.h index 676a0b894..6b250c0d0 100644 --- a/newlib/libc/include/sys/_timeval.h +++ b/newlib/libc/include/sys/_timeval.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2002 Mike Barcroft * All rights reserved. * @@ -23,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: head/sys/sys/_timeval.h 326256 2017-11-27 15:01:59Z pfg $ */ #ifndef _SYS__TIMEVAL_H_ @@ -53,37 +55,6 @@ struct timeval { time_t tv_sec; /* seconds */ suseconds_t tv_usec; /* and microseconds */ }; - -#if __BSD_VISIBLE -#ifndef _KERNEL /* NetBSD/OpenBSD compatible interfaces */ - -#define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) -#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) -#define timercmp(tvp, uvp, cmp) \ - (((tvp)->tv_sec == (uvp)->tv_sec) ? \ - ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ - ((tvp)->tv_sec cmp (uvp)->tv_sec)) -#define timeradd(tvp, uvp, vvp) \ - do { \ - (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \ - (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \ - if ((vvp)->tv_usec >= 1000000) { \ - (vvp)->tv_sec++; \ - (vvp)->tv_usec -= 1000000; \ - } \ - } while (0) -#define timersub(tvp, uvp, vvp) \ - do { \ - (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ - (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ - if ((vvp)->tv_usec < 0) { \ - (vvp)->tv_sec--; \ - (vvp)->tv_usec += 1000000; \ - } \ - } while (0) -#endif -#endif /* __BSD_VISIBLE */ - #endif /* _TIMEVAL_DEFINED */ #endif /* !_SYS__TIMEVAL_H_ */ diff --git a/newlib/libc/include/sys/time.h b/newlib/libc/include/sys/time.h index 370c13406..84a429bf2 100644 --- a/newlib/libc/include/sys/time.h +++ b/newlib/libc/include/sys/time.h @@ -367,6 +367,34 @@ tvtosbt(struct timeval _tv) (vsp)->tv_nsec += 1000000000L; \ } \ } while (0) + +#ifndef _KERNEL /* NetBSD/OpenBSD compatible interfaces */ + +#define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) +#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) +#define timercmp(tvp, uvp, cmp) \ + (((tvp)->tv_sec == (uvp)->tv_sec) ? \ + ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ + ((tvp)->tv_sec cmp (uvp)->tv_sec)) +#define timeradd(tvp, uvp, vvp) \ + do { \ + (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \ + (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \ + if ((vvp)->tv_usec >= 1000000) { \ + (vvp)->tv_sec++; \ + (vvp)->tv_usec -= 1000000; \ + } \ + } while (0) +#define timersub(tvp, uvp, vvp) \ + do { \ + (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ + (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ + if ((vvp)->tv_usec < 0) { \ + (vvp)->tv_sec--; \ + (vvp)->tv_usec += 1000000; \ + } \ + } while (0) +#endif #endif /* __BSD_VISIBLE */ /* From 7a26e19d4f43f71b4f6940ef9219589d7d5e7c05 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 4 Nov 2019 10:34:14 +0100 Subject: [PATCH 091/520] Cygwin: devices: drop MAX_CONSOLES and fix FH_CONS_MAX FH_CONS_MAX should refelect the fact that we allow 128 consoles, even if it's unused. Suggested-by: Achim Gratz Signed-off-by: Corinna Vinschen --- winsup/cygwin/devices.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/winsup/cygwin/devices.h b/winsup/cygwin/devices.h index 47156f275..5a077c2ef 100644 --- a/winsup/cygwin/devices.h +++ b/winsup/cygwin/devices.h @@ -19,7 +19,6 @@ typedef unsigned short _minor_t; #include #include "cygheap_malloc.h" -#define MAX_CONSOLES 63 enum fh_devices { DEV_TTY_MAJOR = 5, @@ -31,7 +30,7 @@ enum fh_devices DEV_CONS_MAJOR = 3, FH_CONS = FHDEV (DEV_CONS_MAJOR, 0), - FH_CONS_MAX = FHDEV (DEV_CONS_MAJOR, MAX_CONSOLES), + FH_CONS_MAX = FHDEV (DEV_CONS_MAJOR, 127), DEV_PTYM_MAJOR = 128, FH_PTYM = FHDEV (DEV_PTYM_MAJOR, 0), From 530b866c8e47af0effa7f913c2b7438d782ea03a Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 5 Nov 2019 11:29:02 +0100 Subject: [PATCH 092/520] Cygwin: fix quoting when starting invisible console process fhandler_console::create_invisible_console_workaround() does not use the lpApplicationName parameter and neglects to quote its command name on lpCommandLine in the call to CreateProcessW. Given CreateProcessW's brain-dead method to evaluate the application path given on the command line, this opens up a security problem if Cygwin is installed into a path with spaces in it. Fix this by using the lpApplicationName parameter and quoting of the application path in the lpCommandLine parameter (used as argv[0] in the called console helper. For extended paranoia, make the argument string array big enough to fit full 64 bit pointer values into it. Handles usually only use the lower 32 bit, but better safe than sorry. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_console.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 86c39db25..241759203 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -3042,20 +3042,22 @@ fhandler_console::create_invisible_console_workaround () STARTUPINFOW si = {}; PROCESS_INFORMATION pi; size_t len = helper.get_wide_win32_path_len (); - WCHAR cmd[len + (2 * strlen (" 0xffffffff")) + 1]; + WCHAR cmd[len + 1]; + WCHAR args[len + 1 + (2 * sizeof (" 0xffffffffffffffff")) + 1]; WCHAR title[] = L"invisible cygwin console"; + /* Create a new hidden process. Use the two event handles as + argv[1] and argv[2]. */ + helper.get_wide_win32_path (cmd); - __small_swprintf (cmd + len, L" %p %p", hello, goodbye); + __small_swprintf (args, L"\"%W\" %p %p", cmd, hello, goodbye); si.cb = sizeof (si); si.dwFlags = STARTF_USESHOWWINDOW; si.wShowWindow = SW_HIDE; si.lpTitle = title; - /* Create a new hidden process. Use the two event handles as - argv[1] and argv[2]. */ - BOOL x = CreateProcessW (NULL, cmd, + BOOL x = CreateProcessW (cmd, args, &sec_none_nih, &sec_none_nih, true, CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi); if (x) From 44432b93add22888a849110f12e2c146291d2176 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 5 Nov 2019 11:57:24 +0100 Subject: [PATCH 093/520] Cygwin: document console helper patch Signed-off-by: Corinna Vinschen --- winsup/cygwin/release/3.1.0 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/winsup/cygwin/release/3.1.0 b/winsup/cygwin/release/3.1.0 index 23f752ca7..1b9d23615 100644 --- a/winsup/cygwin/release/3.1.0 +++ b/winsup/cygwin/release/3.1.0 @@ -97,3 +97,7 @@ Bug Fixes - Fix parent/child relationship after parent dies. Addresses: https://cygwin.com/ml/cygwin/2019-09/msg00263.html + +- Fix a security problem if Cygwin is installed into a path + with spaces in it. + Addresses: https://cygwin.com/ml/cygwin/2019-11/msg00018.html From e5db0d2fe06d66607f7d3423f75451fab2bda6ee Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 6 Nov 2019 21:08:43 +0900 Subject: [PATCH 094/520] Cygwin: pty: Change how to determine if running as service or not. --- winsup/cygwin/fhandler_tty.cc | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index da6119dfb..0109d452b 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -3094,22 +3094,11 @@ pty_master_fwd_thread (VOID *arg) the helper process is running as privileged user while slave process is not. This function is used to determine if the process is running as a srvice or not. */ -static bool +inline static bool is_running_as_service (void) { - DWORD dwSize = 0; - PTOKEN_GROUPS pGroupInfo; - tmp_pathbuf tp; - pGroupInfo = (PTOKEN_GROUPS) tp.w_get (); - NtQueryInformationToken (hProcToken, TokenGroups, pGroupInfo, - 2 * NT_MAX_PATH, &dwSize); - for (DWORD i=0; iGroupCount; i++) - if (RtlEqualSid (well_known_service_sid, pGroupInfo->Groups[i].Sid)) - return true; - for (DWORD i=0; iGroupCount; i++) - if (RtlEqualSid (well_known_interactive_sid, pGroupInfo->Groups[i].Sid)) - return false; - return true; + return check_token_membership (well_known_service_sid) + || cygheap->user.saved_sid () == well_known_system_sid; } bool From 3880efb28390fe52e03de82b3b1e817a35b62577 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 7 Nov 2019 01:29:29 +0900 Subject: [PATCH 095/520] Cygwin: console, pty: Prevent error in legacy console mode. --- winsup/cygwin/environ.cc | 2 +- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_console.cc | 46 ++++++++++++++++++++----------- winsup/cygwin/fhandler_tty.cc | 14 ++++++++++ 4 files changed, 46 insertions(+), 17 deletions(-) diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index 8fa01b2d5..8c5ce64e1 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -859,6 +859,7 @@ environ_init (char **envp, int envc) __endtry } +int sawTERM = 0; char ** __reg2 win32env_to_cygenv (PWCHAR rawenv, bool posify) @@ -868,7 +869,6 @@ win32env_to_cygenv (PWCHAR rawenv, bool posify) int envc; char *newp; int i; - int sawTERM = 0; const char cygterm[] = "TERM=cygwin"; const char xterm[] = "TERM=xterm-256color"; char *tmpbuf = tp.t_get (); diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index d5aa57300..313172ec5 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1831,6 +1831,7 @@ enum cltype class dev_console { pid_t owner; + bool is_legacy; WORD default_color, underline_color, dim_color; diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 241759203..d875ad65c 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -309,7 +309,7 @@ fhandler_console::set_cursor_maybe () { con.fillin (get_output_handle ()); /* Nothing to do for xterm compatible mode. */ - if (wincap.has_con_24bit_colors ()) + if (wincap.has_con_24bit_colors () && !con.is_legacy) return; if (con.dwLastCursorPosition.X != con.b.dwCursorPosition.X || con.dwLastCursorPosition.Y != con.b.dwCursorPosition.Y) @@ -349,7 +349,7 @@ fhandler_console::send_winch_maybe () { con.scroll_region.Top = 0; con.scroll_region.Bottom = -1; - if (wincap.has_con_24bit_colors ()) + if (wincap.has_con_24bit_colors () && !con.is_legacy) fix_tab_position (get_output_handle (), con.dwWinSize.X); get_ttyp ()->kill_pgrp (SIGWINCH); return true; @@ -483,7 +483,7 @@ sig_exit: fhandler_console::input_states fhandler_console::process_input_message (void) { - if (wincap.has_con_24bit_colors ()) + if (wincap.has_con_24bit_colors () && !con.is_legacy) { DWORD dwMode; /* Enable xterm compatible mode in input */ @@ -589,7 +589,8 @@ fhandler_console::process_input_message (void) } /* Allow Ctrl-Space to emit ^@ */ else if (input_rec[i].Event.KeyEvent.wVirtualKeyCode - == (wincap.has_con_24bit_colors () ? '2' : VK_SPACE) + == ((wincap.has_con_24bit_colors () && !con.is_legacy) ? + '2' : VK_SPACE) && (ctrl_key_state & CTRL_PRESSED) && !(ctrl_key_state & ALT_PRESSED)) toadd = ""; @@ -1023,17 +1024,28 @@ fhandler_console::open (int flags, mode_t) /* Enable xterm compatible mode in output */ GetConsoleMode (get_output_handle (), &dwMode); dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; - SetConsoleMode (get_output_handle (), dwMode); + if (!SetConsoleMode (get_output_handle (), dwMode)) + con.is_legacy = true; + else + con.is_legacy = false; /* Enable xterm compatible mode in input */ - GetConsoleMode (get_handle (), &dwMode); - dwMode |= ENABLE_VIRTUAL_TERMINAL_INPUT; - SetConsoleMode (get_handle (), dwMode); + if (!con.is_legacy) + { + GetConsoleMode (get_handle (), &dwMode); + dwMode |= ENABLE_VIRTUAL_TERMINAL_INPUT; + if (!SetConsoleMode (get_handle (), dwMode)) + con.is_legacy = true; + } + extern int sawTERM; + if (con.is_legacy && !sawTERM) + setenv ("TERM", "cygwin", 1); } DWORD cflags; if (GetConsoleMode (get_handle (), &cflags)) SetConsoleMode (get_handle (), ENABLE_WINDOW_INPUT - | (wincap.has_con_24bit_colors () ? 0 : ENABLE_MOUSE_INPUT) + | ((wincap.has_con_24bit_colors () && !con.is_legacy) ? + 0 : ENABLE_MOUSE_INPUT) | cflags); debug_printf ("opened conin$ %p, conout$ %p", get_handle (), @@ -1062,7 +1074,7 @@ fhandler_console::close () output_mutex = NULL; if (shared_console_info && getpid () == con.owner && - wincap.has_con_24bit_colors ()) + wincap.has_con_24bit_colors () && !con.is_legacy) { DWORD dwMode; /* Disable xterm compatible mode in input */ @@ -1209,7 +1221,7 @@ fhandler_console::output_tcsetattr (int, struct termios const *t) acquire_output_mutex (INFINITE); DWORD flags = ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT; /* If system has 24 bit color capability, use xterm compatible mode. */ - if (wincap.has_con_24bit_colors ()) + if (wincap.has_con_24bit_colors () && !con.is_legacy) { flags |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; if (!(t->c_oflag & OPOST) || !(t->c_oflag & ONLCR)) @@ -1274,9 +1286,10 @@ fhandler_console::input_tcsetattr (int, struct termios const *t) } flags |= ENABLE_WINDOW_INPUT | - (wincap.has_con_24bit_colors () ? 0 : ENABLE_MOUSE_INPUT); + ((wincap.has_con_24bit_colors () && !con.is_legacy) ? + 0 : ENABLE_MOUSE_INPUT); /* if system has 24 bit color capability, use xterm compatible mode. */ - if (wincap.has_con_24bit_colors ()) + if (wincap.has_con_24bit_colors () && !con.is_legacy) flags |= ENABLE_VIRTUAL_TERMINAL_INPUT; int res; @@ -1650,7 +1663,7 @@ bool fhandler_console::write_console (PWCHAR buf, DWORD len, DWORD& done) { bool need_fix_tab_position = false; /* Check if screen will be alternated. */ - if (wincap.has_con_24bit_colors () + if (wincap.has_con_24bit_colors () && !con.is_legacy && memmem (buf, len*sizeof (WCHAR), L"\033[?1049", 7*sizeof (WCHAR))) need_fix_tab_position = true; @@ -2498,7 +2511,8 @@ fhandler_console::write_normal (const unsigned char *src, memset (&ps, 0, sizeof ps); while (found < end && found - src < CONVERT_LIMIT - && (wincap.has_con_24bit_colors () || base_chars[*found] == NOR) ) + && ((wincap.has_con_24bit_colors () && !con.is_legacy) + || base_chars[*found] == NOR) ) { switch (ret = f_mbtowc (_REENT, NULL, (const char *) found, end - found, &ps)) @@ -2958,7 +2972,7 @@ fhandler_console::fixup_after_fork_exec (bool execing) { set_unit (); setup_io_mutex (); - if (wincap.has_con_24bit_colors ()) + if (wincap.has_con_24bit_colors () && !con.is_legacy) { DWORD dwMode; /* Disable xterm compatible mode in input */ diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 0109d452b..c71603068 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -26,6 +26,7 @@ details. */ #include #include "cygwait.h" #include "tls_pbuf.h" +#include "registry.h" #define ALWAYS_USE_PCON false #define USE_API_HOOK true @@ -3104,6 +3105,19 @@ is_running_as_service (void) bool fhandler_pty_master::setup_pseudoconsole () { + /* If the legacy console mode is enabled, pseudo console seems + not to work as expected. To determine console mode, registry + key ForceV2 in HKEY_CURRENT_USER\Console is checked. */ + reg_key reg (HKEY_CURRENT_USER, KEY_READ, L"Console", NULL); + if (reg.error ()) + return false; + if (reg.get_dword (L"ForceV2", 1) == 0) + { + termios_printf ("Pseudo console is disabled " + "because the legacy console mode is enabled."); + return false; + } + /* Pseudo console supprot is realized using a tricky technic. PTY need the pseudo console handles, however, they cannot be retrieved by normal procedure. Therefore, run a helper From 7c9c94b9c8af34152d18cf2264e5c723e9e61ab7 Mon Sep 17 00:00:00 2001 From: Mark Geisert Date: Thu, 7 Nov 2019 16:13:34 -0800 Subject: [PATCH 096/520] Cygwin: Raise dumpstack frame limit to 32 Create a #define for the limit and raise it from 16 to 32. --- winsup/cygwin/exceptions.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 132fea427..3e7d7275c 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -42,6 +42,7 @@ details. */ #define CALL_HANDLER_RETRY_OUTER 10 #define CALL_HANDLER_RETRY_INNER 10 +#define DUMPSTACK_FRAME_LIMIT 32 PWCHAR debugger_command; extern uint8_t _sigbe; @@ -382,7 +383,7 @@ cygwin_exception::dumpstack () #else small_printf ("Stack trace:\r\nFrame Function Args\r\n"); #endif - for (i = 0; i < 16 && thestack++; i++) + for (i = 0; i < DUMPSTACK_FRAME_LIMIT && thestack++; i++) { small_printf (_AFMT " " _AFMT, thestack.sf.AddrFrame.Offset, thestack.sf.AddrPC.Offset); @@ -392,7 +393,8 @@ cygwin_exception::dumpstack () small_printf (")\r\n"); } small_printf ("End of stack trace%s\n", - i == 16 ? " (more stack frames may be present)" : ""); + i == DUMPSTACK_FRAME_LIMIT ? + " (more stack frames may be present)" : ""); if (h) NtClose (h); } From 04d85dea5746572ef4b45df9add7d7aaec9a0821 Mon Sep 17 00:00:00 2001 From: Mark Geisert Date: Thu, 7 Nov 2019 16:14:05 -0800 Subject: [PATCH 097/520] Cygwin: Doc change to note stackdump limit patch --- winsup/cygwin/release/3.1.0 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/release/3.1.0 b/winsup/cygwin/release/3.1.0 index 1b9d23615..345dd62a5 100644 --- a/winsup/cygwin/release/3.1.0 +++ b/winsup/cygwin/release/3.1.0 @@ -35,6 +35,9 @@ What changed: - Improve /proc/cpuinfo output and align more closely with Linux. +- Raise stackdump frame limit from 16 to 32. + Addresses: https://cygwin.com/ml/cygwin/2019-11/msg00038.html + Bug Fixes --------- From d14714c690c0b11b0aa7e6d09c930a321eeac7f9 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 7 Nov 2019 14:46:41 -0800 Subject: [PATCH 098/520] Stash reent marker in upper bits of s1 on AMD GCN s[0:3] contain a descriptor used to set up the initial value of the stack, but only the lower 48 bits of s[0:1] are currently used. The reent marker is currently set in s3, but by stashing it in the upper 16 bits of s[0:1] instead, s3 can be freed up for other purposes. --- newlib/libc/machine/amdgcn/getreent.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/newlib/libc/machine/amdgcn/getreent.c b/newlib/libc/machine/amdgcn/getreent.c index bc50ca022..be7d2edc9 100644 --- a/newlib/libc/machine/amdgcn/getreent.c +++ b/newlib/libc/machine/amdgcn/getreent.c @@ -34,7 +34,7 @@ __getreent (void) s11 contains the offset to the base of the stack. s[4:5] contains the dispatch pointer. - WARNING: this code will break if s[0:3] is ever used for anything! */ + WARNING: this code will break if s[0:1] is ever used for anything! */ const register unsigned long buffer_descriptor asm("s0"); unsigned long private_segment = buffer_descriptor & 0x0000ffffffffffff; const register unsigned int stack_offset asm("s11"); @@ -54,20 +54,20 @@ __getreent (void) if (sp >= addr) goto stackoverflow; - /* Place a marker in s3 to indicate that the reent data is initialized. - The register is known to hold part of an unused buffer descriptor - when the kernel is launched. This may not be unused forever, but - we already used s0 and s1 above, so this doesn't do extra harm. */ - register int s3 asm("s3"); - if (s3 != 123456) + /* Stash a marker in the unused upper 16 bits of s[0:1] to indicate that + the reent data is initialized. */ + const register unsigned int s1 asm("s1"); + unsigned int marker = s1 >> 16; + if (marker != 12345) { - asm("s_mov_b32 s3, 123456"); - data->marker = 123456; + asm("s_and_b32\ts1, s1, 0xffff"); + asm("s_or_b32\ts1, s1, (12345 << 16)"); + data->marker = 12345; __builtin_memset (&data->reent, 0, sizeof(struct _reent)); _REENT_INIT_PTR_ZEROED (&data->reent); } - else if (data->marker != 123456) + else if (data->marker != 12345) goto stackoverflow; From d3110717f0a39ec7d00921c048bfd3c8f8efe7c4 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Mon, 11 Nov 2019 10:29:00 -0700 Subject: [PATCH 099/520] regtool: allow /proc/registry{,32,64}/ registry path prefix The user can supply the registry path prefix /proc/registry{,32,64}/ to use path completion. --- winsup/doc/utils.xml | 7 +++++-- winsup/utils/regtool.cc | 17 ++++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/winsup/doc/utils.xml b/winsup/doc/utils.xml index 043ed7358..5f266bcb1 100644 --- a/winsup/doc/utils.xml +++ b/winsup/doc/utils.xml @@ -1976,8 +1976,11 @@ remote host in either \\hostname or hostname: format and prefix is any of: users HKU HKEY_USERS You can use forward slash ('/') as a separator instead of backslash, in -that case backslash is treated as escape character -Example: regtool get '\user\software\Microsoft\Clock\iFormat' +that case backslash is treated as an escape character. +You can also supply the registry path prefix /proc/registry{,32,64}/ to +use path completion. +Example: + regtool list '/HKLM/SOFTWARE/Classes/MIME/Database/Content Type/audio\\/wav' diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc index a44d90768..f91e61d00 100644 --- a/winsup/utils/regtool.cc +++ b/winsup/utils/regtool.cc @@ -166,11 +166,13 @@ usage (FILE *where = stderr) " machine HKLM HKEY_LOCAL_MACHINE\n" " users HKU HKEY_USERS\n" "\n" - "If the keyname starts with a forward slash ('/'), the forward slash is used\n" - "as separator and the backslash can be used as escape character.\n"); + "You can use forward slash ('/') as a separator instead of backslash, in\n" + "that case backslash is treated as an escape character.\n" + "You can also supply the registry path prefix /proc/registry{,32,64}/ to\n" + "use path completion.\n"); fprintf (where, "" "Example:\n" - "%s list '/machine/SOFTWARE/Classes/MIME/Database/Content Type/audio\\/wav'\n\n", prog_name); + "%s list '/HKLM/SOFTWARE/Classes/MIME/Database/Content Type/audio\\/wav'\n\n", prog_name); } if (where == stderr) fprintf (where, @@ -350,6 +352,15 @@ find_key (int howmanyparts, REGSAM access, int option = 0) *h = 0; n = e; } + else if (strncmp ("\\proc\\registry", n, strlen ("\\proc\\registry")) == 0) + { + /* skip /proc/registry{,32,64}/ prefix */ + n += strlen ("\\proc\\registry"); + if (strncmp ("64", n, strlen ("64")) == 0) + n += strlen ("64"); + else if (strncmp ("32", n, strlen ("32")) == 0) + n += strlen ("32"); + } while (*n != '\\') n++; *n++ = 0; From 7ef4290a98edca60cfbab44327384f8ad6b471da Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Tue, 12 Nov 2019 22:00:23 +0900 Subject: [PATCH 100/520] Cygwin: pty: Use redraw screen instead of clear screen. - Previously, pty cleared screen at startup for synchronization between the real screen and console screen buffer for pseudo console. With this patch, instead of clearing screen, the screen is redrawn when the first native program is executed after pty is created. In other words, synchronization is deferred until the native app is executed. Moreover, this realizes excluding $TERM dependent code. --- winsup/cygwin/fhandler_tty.cc | 30 ++++++++++++++++-------------- winsup/cygwin/tty.cc | 2 +- winsup/cygwin/tty.h | 2 +- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index c71603068..e02a8f43b 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -2669,7 +2669,7 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) if (get_ttyp ()->num_pcon_attached_slaves == 0 && !ALWAYS_USE_PCON) /* Assume this is the first process using this pty slave. */ - get_ttyp ()->need_clear_screen = true; + get_ttyp ()->need_redraw_screen = true; get_ttyp ()->num_pcon_attached_slaves ++; } @@ -2700,6 +2700,21 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) kill (get_ttyp ()->pcon_pid, 0) != 0) get_ttyp ()->pcon_pid = myself->pid; get_ttyp ()->switch_to_pcon_out = true; + + if (get_ttyp ()->need_redraw_screen) + { + /* Forcibly redraw screen based on console screen buffer. */ + /* The following code triggers redrawing the screen. */ + CONSOLE_SCREEN_BUFFER_INFO sbi; + GetConsoleScreenBufferInfo (get_output_handle (), &sbi); + SMALL_RECT rect = {0, 0, + (SHORT) (sbi.dwSize.X -1), (SHORT) (sbi.dwSize.Y - 1)}; + COORD dest = {0, 0}; + CHAR_INFO fill = {' ', 0}; + ScrollConsoleScreenBuffer (get_output_handle (), + &rect, NULL, dest, &fill); + get_ttyp ()->need_redraw_screen = false; + } } init_console_handler (false); } @@ -2717,19 +2732,6 @@ fhandler_pty_slave::fixup_after_fork (HANDLE parent) // fork_fixup (parent, inuse, "inuse"); // fhandler_pty_common::fixup_after_fork (parent); report_tty_counts (this, "inherited", ""); - - if (get_ttyp ()->need_clear_screen) - { - const char *term = getenv ("TERM"); - if (term && strcmp (term, "dumb") && !strstr (term, "emacs")) - { - /* FIXME: Clearing sequence may not be "^[[H^[[J" - depending on the terminal type. */ - DWORD n; - WriteFile (get_output_handle_cyg (), "\033[H\033[J", 6, &n, NULL); - } - get_ttyp ()->need_clear_screen = false; - } } void diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index 460153cdb..9c66b89d8 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -244,7 +244,7 @@ tty::init () pcon_pid = 0; num_pcon_attached_slaves = 0; term_code_page = 0; - need_clear_screen = false; + need_redraw_screen = false; } HANDLE diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h index 927d7afd9..a6732aecc 100644 --- a/winsup/cygwin/tty.h +++ b/winsup/cygwin/tty.h @@ -105,7 +105,7 @@ private: pid_t pcon_pid; int num_pcon_attached_slaves; UINT term_code_page; - bool need_clear_screen; + bool need_redraw_screen; public: HANDLE from_master () const { return _from_master; } From 8f8522c82a43c926119a5764ff009e4e5c26bbdf Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 13 Nov 2019 03:04:59 +0900 Subject: [PATCH 101/520] Cygwin: console: Revise the code checking if the console is legacy. - Accessing shared_console_info before initializing causes access violation in checking if the console is legacy mode. This patch fixes this issue. This solves the problem reported in: https://www.cygwin.com/ml/cygwin-patches/2019-q4/msg00099.html --- winsup/cygwin/fhandler_console.cc | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index d875ad65c..0b1c82fb9 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -56,6 +56,7 @@ details. */ #define srBottom ((con.scroll_region.Bottom < 0) ? \ con.b.srWindow.Bottom : \ con.b.srWindow.Top + con.scroll_region.Bottom) +#define con_is_legacy (shared_console_info && con.is_legacy) const unsigned fhandler_console::MAX_WRITE_CHARS = 16384; @@ -309,7 +310,7 @@ fhandler_console::set_cursor_maybe () { con.fillin (get_output_handle ()); /* Nothing to do for xterm compatible mode. */ - if (wincap.has_con_24bit_colors () && !con.is_legacy) + if (wincap.has_con_24bit_colors () && !con_is_legacy) return; if (con.dwLastCursorPosition.X != con.b.dwCursorPosition.X || con.dwLastCursorPosition.Y != con.b.dwCursorPosition.Y) @@ -349,7 +350,7 @@ fhandler_console::send_winch_maybe () { con.scroll_region.Top = 0; con.scroll_region.Bottom = -1; - if (wincap.has_con_24bit_colors () && !con.is_legacy) + if (wincap.has_con_24bit_colors () && !con_is_legacy) fix_tab_position (get_output_handle (), con.dwWinSize.X); get_ttyp ()->kill_pgrp (SIGWINCH); return true; @@ -483,7 +484,7 @@ sig_exit: fhandler_console::input_states fhandler_console::process_input_message (void) { - if (wincap.has_con_24bit_colors () && !con.is_legacy) + if (wincap.has_con_24bit_colors () && !con_is_legacy) { DWORD dwMode; /* Enable xterm compatible mode in input */ @@ -589,7 +590,7 @@ fhandler_console::process_input_message (void) } /* Allow Ctrl-Space to emit ^@ */ else if (input_rec[i].Event.KeyEvent.wVirtualKeyCode - == ((wincap.has_con_24bit_colors () && !con.is_legacy) ? + == ((wincap.has_con_24bit_colors () && !con_is_legacy) ? '2' : VK_SPACE) && (ctrl_key_state & CTRL_PRESSED) && !(ctrl_key_state & ALT_PRESSED)) @@ -1029,7 +1030,7 @@ fhandler_console::open (int flags, mode_t) else con.is_legacy = false; /* Enable xterm compatible mode in input */ - if (!con.is_legacy) + if (!con_is_legacy) { GetConsoleMode (get_handle (), &dwMode); dwMode |= ENABLE_VIRTUAL_TERMINAL_INPUT; @@ -1037,14 +1038,14 @@ fhandler_console::open (int flags, mode_t) con.is_legacy = true; } extern int sawTERM; - if (con.is_legacy && !sawTERM) + if (con_is_legacy && !sawTERM) setenv ("TERM", "cygwin", 1); } DWORD cflags; if (GetConsoleMode (get_handle (), &cflags)) SetConsoleMode (get_handle (), ENABLE_WINDOW_INPUT - | ((wincap.has_con_24bit_colors () && !con.is_legacy) ? + | ((wincap.has_con_24bit_colors () && !con_is_legacy) ? 0 : ENABLE_MOUSE_INPUT) | cflags); @@ -1074,7 +1075,7 @@ fhandler_console::close () output_mutex = NULL; if (shared_console_info && getpid () == con.owner && - wincap.has_con_24bit_colors () && !con.is_legacy) + wincap.has_con_24bit_colors () && !con_is_legacy) { DWORD dwMode; /* Disable xterm compatible mode in input */ @@ -1221,7 +1222,7 @@ fhandler_console::output_tcsetattr (int, struct termios const *t) acquire_output_mutex (INFINITE); DWORD flags = ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT; /* If system has 24 bit color capability, use xterm compatible mode. */ - if (wincap.has_con_24bit_colors () && !con.is_legacy) + if (wincap.has_con_24bit_colors () && !con_is_legacy) { flags |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; if (!(t->c_oflag & OPOST) || !(t->c_oflag & ONLCR)) @@ -1286,10 +1287,10 @@ fhandler_console::input_tcsetattr (int, struct termios const *t) } flags |= ENABLE_WINDOW_INPUT | - ((wincap.has_con_24bit_colors () && !con.is_legacy) ? + ((wincap.has_con_24bit_colors () && !con_is_legacy) ? 0 : ENABLE_MOUSE_INPUT); /* if system has 24 bit color capability, use xterm compatible mode. */ - if (wincap.has_con_24bit_colors () && !con.is_legacy) + if (wincap.has_con_24bit_colors () && !con_is_legacy) flags |= ENABLE_VIRTUAL_TERMINAL_INPUT; int res; @@ -1663,7 +1664,7 @@ bool fhandler_console::write_console (PWCHAR buf, DWORD len, DWORD& done) { bool need_fix_tab_position = false; /* Check if screen will be alternated. */ - if (wincap.has_con_24bit_colors () && !con.is_legacy + if (wincap.has_con_24bit_colors () && !con_is_legacy && memmem (buf, len*sizeof (WCHAR), L"\033[?1049", 7*sizeof (WCHAR))) need_fix_tab_position = true; @@ -2511,7 +2512,7 @@ fhandler_console::write_normal (const unsigned char *src, memset (&ps, 0, sizeof ps); while (found < end && found - src < CONVERT_LIMIT - && ((wincap.has_con_24bit_colors () && !con.is_legacy) + && ((wincap.has_con_24bit_colors () && !con_is_legacy) || base_chars[*found] == NOR) ) { switch (ret = f_mbtowc (_REENT, NULL, (const char *) found, @@ -2972,7 +2973,7 @@ fhandler_console::fixup_after_fork_exec (bool execing) { set_unit (); setup_io_mutex (); - if (wincap.has_con_24bit_colors () && !con.is_legacy) + if (wincap.has_con_24bit_colors () && !con_is_legacy) { DWORD dwMode; /* Disable xterm compatible mode in input */ From 1626569222066ee601f6c41b29efcc95202674b7 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 13 Nov 2019 19:49:29 +0900 Subject: [PATCH 102/520] Cygwin: pty: Trigger redraw screen if ESC[?3h or ESC[?3l is sent. - Pseudo console clears console screen buffer if ESC[?3h or ESC[?3l is sent. However, xterm/vt100 does not clear screen. This cause mismatch between real screen and console screen buffer. Therefore, this patch triggers redraw screen in that situation so that the synchronization is done on the next execution of native app. This solves the problem reported in: https://www.cygwin.com/ml/cygwin-patches/2019-q4/msg00116.html --- winsup/cygwin/fhandler_tty.cc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index e02a8f43b..f9c7c3ade 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1255,6 +1255,28 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) memmove (p0, p0+4, nlen - (p0+4 - buf)); nlen -= 4; } + + /* If the ESC sequence ESC[?3h or ESC[?3l which clears console screen + buffer is pushed, set need_redraw_screen to trigger redraw screen. */ + p0 = buf; + while ((p0 = (char *) memmem (p0, nlen - (p0 - buf), "\033[?", 3))) + { + p0 += 3; + while (p0 < buf + nlen && *p0 != 'h' && *p0 != 'l') + { + int arg = 0; + while (p0 < buf + nlen && isdigit (*p0)) + arg = arg * 10 + (*p0 ++) - '0'; + if (arg == 3) + get_ttyp ()->need_redraw_screen = true; + if (p0 < buf + nlen && *p0 == ';') + p0 ++; + } + p0 ++; + if (p0 >= buf + nlen) + break; + } + DWORD dwMode, flags; flags = ENABLE_VIRTUAL_TERMINAL_PROCESSING; GetConsoleMode (get_output_handle (), &dwMode); From 59362c80e3a02c011fd0ef3d7f07a20098d2a9d5 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sat, 9 Nov 2019 17:28:04 +0100 Subject: [PATCH 103/520] newlib: fix fseek optimization with SEEK_CUR The call to fflush was invalidating the read buffer, preventing relative seeks to positions that would have been inside the read buffer from being optimized. The call to srefill would then re-read mostly the same data that was initially in the read buffer. --- newlib/libc/stdio/fseeko.c | 31 ++++++------------------------- newlib/libc/stdio64/fseeko64.c | 31 ++++++------------------------- 2 files changed, 12 insertions(+), 50 deletions(-) diff --git a/newlib/libc/stdio/fseeko.c b/newlib/libc/stdio/fseeko.c index 3e0f9e90b..bbf1af43e 100644 --- a/newlib/libc/stdio/fseeko.c +++ b/newlib/libc/stdio/fseeko.c @@ -141,31 +141,12 @@ _fseeko_r (struct _reent *ptr, switch (whence) { case SEEK_CUR: - /* - * In order to seek relative to the current stream offset, - * we have to first find the current stream offset a la - * ftell (see ftell for details). - */ - _fflush_r (ptr, fp); /* may adjust seek offset on append stream */ - if (fp->_flags & __SOFF) - curoff = fp->_offset; - else - { - curoff = seekfn (ptr, fp->_cookie, (_fpos_t) 0, SEEK_CUR); - if (curoff == -1L) - { - _newlib_flockfile_exit (fp); - return EOF; - } - } - if (fp->_flags & __SRD) - { - curoff -= fp->_r; - if (HASUB (fp)) - curoff -= fp->_ur; - } - else if (fp->_flags & __SWR && fp->_p != NULL) - curoff += fp->_p - fp->_bf._base; + curoff = _ftello_r(ptr, fp); + if (curoff == -1L) + { + _newlib_flockfile_exit (fp); + return EOF; + } offset += curoff; whence = SEEK_SET; diff --git a/newlib/libc/stdio64/fseeko64.c b/newlib/libc/stdio64/fseeko64.c index 0672086a3..f38005570 100644 --- a/newlib/libc/stdio64/fseeko64.c +++ b/newlib/libc/stdio64/fseeko64.c @@ -142,31 +142,12 @@ _fseeko64_r (struct _reent *ptr, switch (whence) { case SEEK_CUR: - /* - * In order to seek relative to the current stream offset, - * we have to first find the current stream offset a la - * ftell (see ftell for details). - */ - _fflush_r (ptr, fp); /* may adjust seek offset on append stream */ - if (fp->_flags & __SOFF) - curoff = fp->_offset; - else - { - curoff = seekfn (ptr, fp->_cookie, (_fpos64_t) 0, SEEK_CUR); - if (curoff == -1L) - { - _newlib_flockfile_exit(fp); - return EOF; - } - } - if (fp->_flags & __SRD) - { - curoff -= fp->_r; - if (HASUB (fp)) - curoff -= fp->_ur; - } - else if (fp->_flags & __SWR && fp->_p != NULL) - curoff += fp->_p - fp->_bf._base; + curoff = _ftello64_r(ptr, fp); + if (curoff == -1L) + { + _newlib_flockfile_exit (fp); + return EOF; + } offset += curoff; whence = SEEK_SET; From edb1be4ccec1e26c886e8a4646f57f47c0b7468e Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sat, 16 Nov 2019 08:27:24 +0900 Subject: [PATCH 104/520] Cygwin: pty: Convert CamelCase names to snake_case names. --- winsup/cygwin/dtable.cc | 6 +-- winsup/cygwin/fhandler.h | 8 ++-- winsup/cygwin/fhandler_console.cc | 2 +- winsup/cygwin/fhandler_tty.cc | 68 +++++++++++++++---------------- winsup/cygwin/fork.cc | 8 ++-- winsup/cygwin/spawn.cc | 18 ++++---- winsup/cygwin/tty.cc | 2 +- winsup/cygwin/tty.h | 8 ++-- 8 files changed, 60 insertions(+), 60 deletions(-) diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index cb5f47395..4652de929 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -155,10 +155,10 @@ dtable::stdio_init () if (fh && fh->get_major () == DEV_PTYS_MAJOR) { fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; - if (ptys->getPseudoConsole ()) + if (ptys->get_pseudo_console ()) { bool attached = !!fhandler_console::get_console_process_id - (ptys->getHelperProcessId (), true); + (ptys->get_helper_process_id (), true); if (attached) break; else @@ -167,7 +167,7 @@ dtable::stdio_init () by some reason. This happens if the executable is a windows GUI binary, such as mintty. */ FreeConsole (); - if (AttachConsole (ptys->getHelperProcessId ())) + if (AttachConsole (ptys->get_helper_process_id ())) { ptys->fixup_after_attach (false, fd); break; diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 313172ec5..3954c37d1 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -2101,13 +2101,13 @@ class fhandler_pty_common: public fhandler_termios { return get_ttyp ()->attach_pcon_in_fork; } - DWORD getHelperProcessId (void) + DWORD get_helper_process_id (void) { - return get_ttyp ()->HelperProcessId; + return get_ttyp ()->helper_process_id; } - HPCON getPseudoConsole (void) + HPCON get_pseudo_console (void) { - return get_ttyp ()->hPseudoConsole; + return get_ttyp ()->h_pseudo_console; } bool to_be_read_from_pcon (void); diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 0b1c82fb9..b3095bbe3 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1099,7 +1099,7 @@ fhandler_console::close () { fhandler_pty_common *t = (fhandler_pty_common *) (fhandler_base *) cfd; - if (get_console_process_id (t->getHelperProcessId (), true)) + if (get_console_process_id (t->get_helper_process_id (), true)) return 0; } diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index f9c7c3ade..1d344c7fe 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -88,7 +88,7 @@ set_switch_to_pcon (void) { fhandler_base *fh = cfd; fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; - if (ptys->getPseudoConsole ()) + if (ptys->get_pseudo_console ()) ptys->set_switch_to_pcon (fd); } } @@ -107,19 +107,19 @@ force_attach_to_pcon (HANDLE h) { fhandler_base *fh = cfd; fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; - if (!ptys->getPseudoConsole ()) + if (!ptys->get_pseudo_console ()) continue; if (n != 0 || h == ptys->get_handle () || h == ptys->get_output_handle ()) { if (fhandler_console::get_console_process_id - (ptys->getHelperProcessId (), true)) + (ptys->get_helper_process_id (), true)) attach_done = true; else { FreeConsole (); - if (AttachConsole (ptys->getHelperProcessId ())) + if (AttachConsole (ptys->get_helper_process_id ())) { pcon_attached_to = ptys->get_minor (); attach_done = true; @@ -711,7 +711,7 @@ fhandler_pty_slave::~fhandler_pty_slave () if (!get_ttyp ()) /* Why comes here? Who clears _tc? */ return; - if (getPseudoConsole ()) + if (get_pseudo_console ()) { int used = 0; int attached = 0; @@ -919,7 +919,7 @@ fhandler_pty_slave::open (int flags, mode_t) set_output_handle (to_master_local); set_output_handle_cyg (to_master_cyg_local); - if (!getPseudoConsole ()) + if (!get_pseudo_console ()) { fhandler_console::need_invisible (); pcon_attached_to = -1; @@ -931,7 +931,7 @@ fhandler_pty_slave::open (int flags, mode_t) pcon_attached_to = -1; } else if (fhandler_console::get_console_process_id - (getHelperProcessId (), true)) + (get_helper_process_id (), true)) /* Attached to pcon of this pty */ { pcon_attached_to = get_minor (); @@ -990,7 +990,7 @@ fhandler_pty_slave::close () if (!ForceCloseHandle (get_handle_cyg ())) termios_printf ("CloseHandle (get_handle_cyg ()<%p>), %E", get_handle_cyg ()); - if (!getPseudoConsole () && + if (!get_pseudo_console () && (unsigned) myself->ctty == FHDEV (DEV_PTYS_MAJOR, get_minor ())) fhandler_console::free_console (); /* assumes that we are the last pty closer */ fhandler_pty_common::close (); @@ -1063,10 +1063,10 @@ fhandler_pty_slave::try_reattach_pcon (void) return false; FreeConsole (); - if (!AttachConsole (getHelperProcessId ())) + if (!AttachConsole (get_helper_process_id ())) { system_printf ("pty%d: AttachConsole(helper=%d) failed. 0x%08lx", - get_minor (), getHelperProcessId (), GetLastError ()); + get_minor (), get_helper_process_id (), GetLastError ()); return false; } return true; @@ -1170,14 +1170,14 @@ void fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) { bool attached = - !!fhandler_console::get_console_process_id (getHelperProcessId (), true); + !!fhandler_console::get_console_process_id (get_helper_process_id (), true); if (!attached && pcon_attached_to == get_minor ()) { for (DWORD t0 = GetTickCount (); GetTickCount () - t0 < 100; ) { Sleep (1); attached = fhandler_console::get_console_process_id - (getHelperProcessId (), true); + (get_helper_process_id (), true); if (attached) break; } @@ -1383,7 +1383,7 @@ fhandler_pty_slave::write (const void *ptr, size_t len) restore_reattach_pcon (); /* Push slave output to pseudo console screen buffer */ - if (getPseudoConsole ()) + if (get_pseudo_console ()) { acquire_output_mutex (INFINITE); push_to_pcon_screenbuffer ((char *)ptr, len); @@ -1701,7 +1701,7 @@ out: termios_printf ("%d = read(%p, %lu)", totalread, ptr, len); len = (size_t) totalread; /* Push slave read as echo to pseudo console screen buffer. */ - if (getPseudoConsole () && ptr0 && (get_ttyp ()->ti.c_lflag & ECHO)) + if (get_pseudo_console () && ptr0 && (get_ttyp ()->ti.c_lflag & ECHO)) { acquire_output_mutex (INFINITE); push_to_pcon_screenbuffer (ptr0, len); @@ -1847,7 +1847,7 @@ fhandler_pty_slave::ioctl (unsigned int cmd, void *arg) get_ttyp ()->winsize = get_ttyp ()->arg.winsize; break; case TIOCSWINSZ: - if (getPseudoConsole ()) + if (get_pseudo_console ()) { /* If not attached to this pseudo console, try to attach temporarily. */ @@ -2230,21 +2230,21 @@ fhandler_pty_master::close () termios_printf ("CloseHandle (output_mutex<%p>), %E", output_mutex); if (!NT_SUCCESS (status)) debug_printf ("NtQueryObject: %y", status); - else if (obi.HandleCount == (getPseudoConsole () ? 2 : 1)) + else if (obi.HandleCount == (get_pseudo_console () ? 2 : 1)) /* Helper process has inherited one. */ { termios_printf ("Closing last master of pty%d", get_minor ()); /* Close Pseudo Console */ - if (getPseudoConsole ()) + if (get_pseudo_console ()) { /* Terminate helper process */ - SetEvent (get_ttyp ()->hHelperGoodbye); - WaitForSingleObject (get_ttyp ()->hHelperProcess, INFINITE); + SetEvent (get_ttyp ()->h_helper_goodbye); + WaitForSingleObject (get_ttyp ()->h_helper_process, INFINITE); /* FIXME: Pseudo console can be accessed via its handle only in the process which created it. What else can we do? */ if (master_pid_tmp == myself->pid) /* Release pseudo console */ - ClosePseudoConsole (getPseudoConsole ()); + ClosePseudoConsole (get_pseudo_console ()); get_ttyp ()->switch_to_pcon_in = false; get_ttyp ()->switch_to_pcon_out = false; } @@ -2403,12 +2403,12 @@ fhandler_pty_master::ioctl (unsigned int cmd, void *arg) case TIOCSWINSZ: /* FIXME: Pseudo console can be accessed via its handle only in the process which created it. What else can we do? */ - if (getPseudoConsole () && get_ttyp ()->master_pid == myself->pid) + if (get_pseudo_console () && get_ttyp ()->master_pid == myself->pid) { COORD size; size.X = ((struct winsize *) arg)->ws_col; size.Y = ((struct winsize *) arg)->ws_row; - ResizePseudoConsole (getPseudoConsole (), size); + ResizePseudoConsole (get_pseudo_console (), size); } if (get_ttyp ()->winsize.ws_row != ((struct winsize *) arg)->ws_row || get_ttyp ()->winsize.ws_col != ((struct winsize *) arg)->ws_col) @@ -2675,9 +2675,9 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) { if (fd < 0) fd = fd_set; - if (getPseudoConsole ()) + if (get_pseudo_console ()) { - if (fhandler_console::get_console_process_id (getHelperProcessId (), + if (fhandler_console::get_console_process_id (get_helper_process_id (), true)) { if (pcon_attached_to != get_minor ()) @@ -2769,7 +2769,7 @@ fhandler_pty_slave::fixup_after_exec () if (!close_on_exec ()) fixup_after_fork (NULL); - else if (getPseudoConsole ()) + else if (get_pseudo_console ()) { int used = 0; int attached = 0; @@ -2802,7 +2802,7 @@ fhandler_pty_slave::fixup_after_exec () #if USE_API_HOOK /* Hook Console API */ - if (getPseudoConsole ()) + if (get_pseudo_console ()) { #define DO_HOOK(module, name) \ if (!name##_Orig) \ @@ -3004,7 +3004,7 @@ fhandler_pty_master::pty_master_fwd_thread () } ssize_t wlen = rlen; char *ptr = outbuf; - if (getPseudoConsole ()) + if (get_pseudo_console ()) { /* Avoid duplicating slave output which is already sent to to_master_cyg */ @@ -3152,7 +3152,7 @@ fhandler_pty_master::setup_pseudoconsole () CreatePipe (&from_master, &to_slave, &sec_none, 0); SetLastError (ERROR_SUCCESS); HRESULT res = CreatePseudoConsole (size, from_master, to_master, - 0, &get_ttyp ()->hPseudoConsole); + 0, &get_ttyp ()->h_pseudo_console); if (res != S_OK || GetLastError () == ERROR_PROC_NOT_FOUND) { if (res != S_OK) @@ -3162,7 +3162,7 @@ fhandler_pty_master::setup_pseudoconsole () CloseHandle (to_slave); from_master = from_master_cyg; to_slave = NULL; - get_ttyp ()->hPseudoConsole = NULL; + get_ttyp ()->h_pseudo_console = NULL; return false; } @@ -3186,8 +3186,8 @@ fhandler_pty_master::setup_pseudoconsole () UpdateProcThreadAttribute (si_helper.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE, - get_ttyp ()->hPseudoConsole, - sizeof (get_ttyp ()->hPseudoConsole), + get_ttyp ()->h_pseudo_console, + sizeof (get_ttyp ()->h_pseudo_console), NULL, NULL); HANDLE hello = CreateEvent (&sec_none, true, false, NULL); HANDLE goodbye = CreateEvent (&sec_none, true, false, NULL); @@ -3228,9 +3228,9 @@ fhandler_pty_master::setup_pseudoconsole () DeleteProcThreadAttributeList (si_helper.lpAttributeList); HeapFree (GetProcessHeap (), 0, si_helper.lpAttributeList); /* Setting information of stuffs regarding pseudo console */ - get_ttyp ()->hHelperGoodbye = goodbye; - get_ttyp ()->hHelperProcess = pi_helper.hProcess; - get_ttyp ()->HelperProcessId = pi_helper.dwProcessId; + get_ttyp ()->h_helper_goodbye = goodbye; + get_ttyp ()->h_helper_process = pi_helper.hProcess; + get_ttyp ()->helper_process_id = pi_helper.dwProcessId; CloseHandle (from_master); CloseHandle (to_master); from_master = hpConIn; diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 0a929dffd..a8f0fb82a 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -140,12 +140,12 @@ frok::child (volatile char * volatile here) { fhandler_base *fh = cfd; fhandler_pty_master *ptym = (fhandler_pty_master *) fh; - if (ptym->getPseudoConsole ()) + if (ptym->get_pseudo_console ()) { debug_printf ("found a PTY master %d: helper_PID=%d", - ptym->get_minor (), ptym->getHelperProcessId ()); + ptym->get_minor (), ptym->get_helper_process_id ()); if (fhandler_console::get_console_process_id ( - ptym->getHelperProcessId (), true)) + ptym->get_helper_process_id (), true)) /* Already attached */ break; else @@ -153,7 +153,7 @@ frok::child (volatile char * volatile here) if (ptym->attach_pcon_in_fork ()) { FreeConsole (); - if (!AttachConsole (ptym->getHelperProcessId ())) + if (!AttachConsole (ptym->get_helper_process_id ())) /* Error */; else break; diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index f82860e72..cea79e326 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -259,7 +259,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, { bool rc; int res = -1; - DWORD pidRestore = 0; + DWORD pid_restore = 0; bool attach_to_console = false; pid_t ctty_pgid = 0; @@ -581,7 +581,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, sa = &sec_none_nih; /* Attach to pseudo console if pty salve is used */ - pidRestore = fhandler_console::get_console_process_id + pid_restore = fhandler_console::get_console_process_id (GetCurrentProcessId (), false); for (int i = 0; i < 3; i ++) { @@ -591,19 +591,19 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, if (fh && fh->get_major () == DEV_PTYS_MAJOR) { fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; - if (ptys->getPseudoConsole ()) + if (ptys->get_pseudo_console ()) { - DWORD dwHelperProcessId = ptys->getHelperProcessId (); + DWORD helper_process_id = ptys->get_helper_process_id (); debug_printf ("found a PTY slave %d: helper_PID=%d", - fh->get_minor (), dwHelperProcessId); + fh->get_minor (), helper_process_id); if (fhandler_console::get_console_process_id - (dwHelperProcessId, true)) + (helper_process_id, true)) /* Already attached */ attach_to_console = true; else if (!attach_to_console) { FreeConsole (); - if (AttachConsole (dwHelperProcessId)) + if (AttachConsole (helper_process_id)) attach_to_console = true; } ptys->fixup_after_attach (!iscygwin (), fd); @@ -922,10 +922,10 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, if (envblock) free (envblock); - if (attach_to_console && pidRestore) + if (attach_to_console && pid_restore) { FreeConsole (); - AttachConsole (pidRestore); + AttachConsole (pid_restore); } return (int) res; diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index 9c66b89d8..695ce91f1 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -235,7 +235,7 @@ tty::init () master_pid = 0; is_console = false; attach_pcon_in_fork = false; - hPseudoConsole = NULL; + h_pseudo_console = NULL; column = 0; switch_to_pcon_in = false; switch_to_pcon_out = false; diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h index a6732aecc..cd4c0ed44 100644 --- a/winsup/cygwin/tty.h +++ b/winsup/cygwin/tty.h @@ -93,10 +93,10 @@ private: HANDLE _from_master_cyg; HANDLE _to_master; HANDLE _to_master_cyg; - HPCON hPseudoConsole; - HANDLE hHelperProcess; - DWORD HelperProcessId; - HANDLE hHelperGoodbye; + HPCON h_pseudo_console; + HANDLE h_helper_process; + DWORD helper_process_id; + HANDLE h_helper_goodbye; bool attach_pcon_in_fork; bool switch_to_pcon_in; bool switch_to_pcon_out; From c63c29e76e7511c43972c400002f93872885a330 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Tue, 26 Nov 2019 08:34:42 -0700 Subject: [PATCH 105/520] newlib/libc/include/sys/features.h: update __STDC_ISO_10646__ newlib wide char conversion functions were updated to Unicode 11 on 2019-01-12 update standard symbol __STDC_ISO_10646__ to Unicode 11 release date 2018-06-05 for Cygwin --- newlib/libc/include/sys/features.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/newlib/libc/include/sys/features.h b/newlib/libc/include/sys/features.h index f28dd071b..218807178 100644 --- a/newlib/libc/include/sys/features.h +++ b/newlib/libc/include/sys/features.h @@ -521,9 +521,13 @@ extern "C" { /* #define _XOPEN_UNIX -1 */ #endif /* __XSI_VISIBLE */ -/* The value corresponds to UNICODE version 5.2, which is the current - state of newlib's wide char conversion functions. */ -#define __STDC_ISO_10646__ 200910L +/* + * newlib's wide char conversion functions were updated on + * 2019-01-12 + * to UNICODE version: + * 11.0.0 released 2018-06-05 + */ +#define __STDC_ISO_10646__ 201806L #endif /* __CYGWIN__ */ From 8574f8a1e4b02a4b47e2434111c4e2c382a9f046 Mon Sep 17 00:00:00 2001 From: Anton Lavrentiev via cygwin-patches Date: Sat, 30 Nov 2019 22:58:14 -0500 Subject: [PATCH 106/520] Cygwin: /proc/[PID]/stat to pull process priority correctly Fix to prior commit 5fa9a0e7 to address https://cygwin.com/ml/cygwin/2019-08/msg00082.html --- winsup/cygwin/fhandler_process.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index 9527fea7d..6fc3476b2 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -1076,6 +1076,7 @@ format_process_stat (void *data, char *&destbuf) unsigned long fault_count = 0UL, vmsize = 0UL, vmrss = 0UL, vmmaxrss = 0UL; uint64_t utime = 0ULL, stime = 0ULL, start_time = 0ULL; + int nice = 0; if (p->process_state & PID_EXITED) strcpy (cmd, ""); @@ -1138,6 +1139,7 @@ format_process_stat (void *data, char *&destbuf) if (!NT_SUCCESS (status)) debug_printf ("NtQueryInformationProcess(ProcessQuotaLimits): " "status %y", status); + nice = winprio_to_nice (GetPriorityClass (hProcess)); CloseHandle (hProcess); } status = NtQuerySystemInformation (SystemTimeOfDayInformation, @@ -1157,7 +1159,6 @@ format_process_stat (void *data, char *&destbuf) vmsize = vmc.PagefileUsage; vmrss = vmc.WorkingSetSize / page_size; vmmaxrss = ql.MaximumWorkingSetSize / page_size; - int nice = winprio_to_nice(GetPriorityClass(hProcess)); destbuf = (char *) crealloc_abort (destbuf, strlen (cmd) + 320); return __small_sprintf (destbuf, "%d (%s) %c " @@ -1169,7 +1170,7 @@ format_process_stat (void *data, char *&destbuf) p->pid, cmd, state, p->ppid, p->pgid, p->sid, p->ctty, -1, 0, fault_count, fault_count, 0, 0, utime, stime, - utime, stime, NZERO + nice, nice, 0, 0, + utime, stime, NZERO + nice, nice, 0, 0, start_time, vmsize, vmrss, vmmaxrss ); From 7a526cdc28a3c4acce98e8a99b06562452c90d07 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 29 Nov 2019 11:23:20 -0800 Subject: [PATCH 107/520] libm: switch sf_log1p from double error routines to float sf_log1p was using __math_divzero and __math_invalid, which drag in a pile of double-precision code. Switch to using the single-precision variants. This also required making those available in __OBSOLETE_MATH mode. Signed-off-by: Keith Packard --- newlib/libm/common/math_errf.c | 2 -- newlib/libm/common/sf_log1p.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/newlib/libm/common/math_errf.c b/newlib/libm/common/math_errf.c index 762fc2799..53c68b1cf 100644 --- a/newlib/libm/common/math_errf.c +++ b/newlib/libm/common/math_errf.c @@ -75,7 +75,6 @@ __math_oflowf (uint32_t sign) return xflowf (sign, 0x1p97f); } -#if !__OBSOLETE_MATH HIDDEN float __math_divzerof (uint32_t sign) { @@ -89,4 +88,3 @@ __math_invalidf (float x) float y = (x - x) / (x - x); return isnan (x) ? y : with_errnof (y, EDOM); } -#endif /* !__OBSOLETE_MATH */ diff --git a/newlib/libm/common/sf_log1p.c b/newlib/libm/common/sf_log1p.c index d86768082..d326e00ba 100644 --- a/newlib/libm/common/sf_log1p.c +++ b/newlib/libm/common/sf_log1p.c @@ -56,9 +56,9 @@ static float zero = 0.0; if (hx < 0x3ed413d7) { /* x < 0.41422 */ if(ax>=0x3f800000) { /* x <= -1.0 */ if(x==(float)-1.0) - return __math_divzero (1); /* log1p(-1)=-inf */ + return __math_divzerof (1); /* log1p(-1)=-inf */ else - return __math_invalid (x); /* log1p(x<-1)=NaN */ + return __math_invalidf (x); /* log1p(x<-1)=NaN */ } if(ax<0x31000000) { /* |x| < 2**-29 */ if(two25+x>zero /* raise inexact */ From 48fbe173f403c853e7f9fef128b0228f472e715d Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Mon, 9 Dec 2019 07:27:18 -0500 Subject: [PATCH 108/520] Cygwin: symlink_info::check: avoid assertion failure On certain error conditions there is a code snippet that checks whether the last component of the path has a trailing dot or space or a leading space. Skip this check if the last component is empty, i.e., if the path ends with a backslash. This avoids an assertion failure if the trailing backslash is the only backslash in the path, as is the case for a DOS drive 'X:\'. Addresses: https://cygwin.com/ml/cygwin/2019-12/msg00016.html --- winsup/cygwin/path.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index f61003578..b5efd61b2 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -2895,7 +2895,8 @@ restart: slow down normal operation. This extra check only kicks in if we encountered a STATUS_OBJECT_NAME_NOT_FOUND *and* we didn't already attach a suffix. */ - if (!restarted && !*ext_here && !(mount_flags & MOUNT_DOS)) + if (!restarted && !*ext_here && ext_here[-1] != '\\' + && !(mount_flags & MOUNT_DOS)) { /* Check for trailing dot or space or leading space in last component. */ From 69772c43327727c49b7691717a7886fa1088d5bf Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Tue, 10 Dec 2019 08:45:17 -0500 Subject: [PATCH 109/520] Cygwin: document the last bugfix --- winsup/cygwin/release/3.1.0 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/winsup/cygwin/release/3.1.0 b/winsup/cygwin/release/3.1.0 index 345dd62a5..b0e845657 100644 --- a/winsup/cygwin/release/3.1.0 +++ b/winsup/cygwin/release/3.1.0 @@ -104,3 +104,7 @@ Bug Fixes - Fix a security problem if Cygwin is installed into a path with spaces in it. Addresses: https://cygwin.com/ml/cygwin/2019-11/msg00018.html + +- Fix an assertion failure when /cygdrive contains an offline network + drive. + Addresses: https://cygwin.com/ml/cygwin/2019-12/msg00016.html From 31227ba53d39ec1dac19a488c967ebbe9a04c19a Mon Sep 17 00:00:00 2001 From: Anthony Green Date: Fri, 13 Dec 2019 13:08:06 -0500 Subject: [PATCH 110/520] Fix setjmp/longjmp for the moxie port. These functions needs to save and restore the stack frame, because that's where the return address is stored. --- newlib/libc/include/machine/setjmp.h | 2 +- newlib/libc/machine/moxie/setjmp.S | 71 ++++++++++++++++++---------- 2 files changed, 48 insertions(+), 25 deletions(-) diff --git a/newlib/libc/include/machine/setjmp.h b/newlib/libc/include/machine/setjmp.h index 25fdea28c..78a81b5d9 100644 --- a/newlib/libc/include/machine/setjmp.h +++ b/newlib/libc/include/machine/setjmp.h @@ -238,7 +238,7 @@ _BEGIN_STD_C #endif #ifdef __moxie__ -#define _JBLEN 16 +#define _JBLEN 19 #endif #ifdef __CRX__ diff --git a/newlib/libc/machine/moxie/setjmp.S b/newlib/libc/machine/moxie/setjmp.S index 6c2c015e3..ed261d54d 100644 --- a/newlib/libc/machine/moxie/setjmp.S +++ b/newlib/libc/machine/moxie/setjmp.S @@ -1,5 +1,5 @@ /* A setjmp.c for Moxie - Copyright (C) 2009 Anthony Green + Copyright (C) 2009, 2019 Anthony Green The authors hereby grant permission to use, copy, modify, distribute, and license this software and its documentation for any purpose, provided @@ -12,28 +12,31 @@ they apply. */ # setjmp/longjmp for moxie. The jmpbuf looks like this: -# -# Register jmpbuf offset -# $r0 0x00 -# $r1 0x04 -# $r2 0x08 -# $r3 0x0c -# $r4 0x10 -# $r5 0x14 -# $r6 0x18 -# $r7 0x1c -# $r8 0x20 -# $r9 0x24 -# $r10 0x28 -# $r11 0x2c -# $r12 0x30 -# $r13 0x34 -# $fp 0x38 -# $sp 0x3c - - .text - .global setjmp - .type setjmp,@function +# +# Register jmpbuf offset +# $r0 0x00 +# $r1 0x04 +# $r2 0x08 +# $r3 0x0c +# $r4 0x10 +# $r5 0x14 +# $r6 0x18 +# $r7 0x1c +# $r8 0x20 +# $r9 0x24 +# $r10 0x28 +# $r11 0x2c +# $r12 0x30 +# $r13 0x34 +# $fp 0x38 +# $sp 0x3c +# stack frame fp 0x40 +# stack frame ra 0x44 +# stack frame sc 0x48 + + .text + .global setjmp + .type setjmp,@function setjmp: st.l ($r0), $r0 sto.l 0x04($r0), $r1 @@ -51,6 +54,13 @@ setjmp: sto.l 0x34($r0), $r13 sto.l 0x38($r0), $sp sto.l 0x3c($r0), $fp + ldo.l $r1, 0x0($fp) + sto.l 0x40($r0), $r1 + ldo.l $r1, 0x04($fp) + sto.l 0x44($r0), $r1 + ldo.l $r1, 0x08($fp) + sto.l 0x48($r0), $r1 + ldo.l $r1, 0x04($r0) xor $r0, $r0 ret .Lend1: @@ -62,7 +72,6 @@ longjmp: ldi.l $r2, 0x00 cmp $r1, $r2 beq .Lreturn1 - ldo.l $r1, 0x04($r0) ldo.l $r2, 0x08($r0) ldo.l $r3, 0x0c($r0) ldo.l $r4, 0x10($r0) @@ -77,6 +86,13 @@ longjmp: ldo.l $r13, 0x34($r0) ldo.l $sp, 0x38($r0) ldo.l $fp, 0x3c($r0) + ldo.l $r1, 0x40($r0) + sto.l 0x0($fp), $r1 + ldo.l $r1, 0x44($r0) + sto.l 0x4($fp), $r1 + ldo.l $r1, 0x48($r0) + sto.l 0x8($fp), $r1 + ldo.l $r1, 0x04($r0) mov $r0, $r1 ret .Lreturn1: @@ -95,6 +111,13 @@ longjmp: ldo.l $r13, 0x34($r0) ldo.l $sp, 0x38($r0) ldo.l $fp, 0x3c($r0) + ldo.l $r1, 0x40($r0) + sto.l 0x0($fp), $r1 + ldo.l $r1, 0x44($r0) + sto.l 0x4($fp), $r1 + ldo.l $r1, 0x48($r0) + sto.l 0x8($fp), $r1 + ldo.l $r1, 0x04($r0) ldi.l $r0, 0x01 ret .Lend2: From 78b7a3b0f879715f6078720aaa07e0fb6156b586 Mon Sep 17 00:00:00 2001 From: Anthony Green Date: Sat, 14 Dec 2019 05:27:38 -0500 Subject: [PATCH 111/520] Implement the unlink system call for the moxie simulator. Corresponding support for this was just added to the gdb moxie simulator. Unlink support is required by the GCC testsuite. --- libgloss/moxie/sim-unlink.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libgloss/moxie/sim-unlink.S b/libgloss/moxie/sim-unlink.S index 87ae90fad..e6bd7dc2a 100644 --- a/libgloss/moxie/sim-unlink.S +++ b/libgloss/moxie/sim-unlink.S @@ -1,7 +1,7 @@ /* * sim-unlink.S -- write interface for moxie simulator * - * Copyright (c) 2008 Anthony Green + * Copyright (c) 2008, 2019 Anthony Green * * The authors hereby grant permission to use, copy, modify, distribute, * and license this software and its documentation for any purpose, provided @@ -22,7 +22,7 @@ .text _unlink: unlink: - jmpa unlink + swi SYS_unlink ret .Lend: .size _unlink,.Lend-_unlink From b74ba7dca6489f5bb16048eb6bcddd5cd646c925 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Mon, 25 Nov 2019 21:17:41 +0000 Subject: [PATCH 112/520] MSP430: Support new msp430-elfbare target Update the target triplet glob used when configuring for msp430 to support a new msp430-elfbare target being added to gcc. --- libgloss/configure | 2 +- libgloss/configure.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libgloss/configure b/libgloss/configure index 6c592b16b..0d2918cee 100755 --- a/libgloss/configure +++ b/libgloss/configure @@ -2552,7 +2552,7 @@ case "${target}" in subdirs="$subdirs m32c" ;; - msp430*-*-elf) + msp430-*-elf*) subdirs="$subdirs msp430" config_libnosys=false diff --git a/libgloss/configure.in b/libgloss/configure.in index 16f413f66..f38d5298e 100644 --- a/libgloss/configure.in +++ b/libgloss/configure.in @@ -148,7 +148,7 @@ case "${target}" in m32c-*-*) AC_CONFIG_SUBDIRS([m32c]) ;; - msp430*-*-elf) + msp430-*-elf*) AC_CONFIG_SUBDIRS([msp430]) config_libnosys=false ;; From 29ba52da95532f61e2e15694245d5f25620e34b6 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 16 Dec 2019 10:50:17 +0100 Subject: [PATCH 113/520] Cygwin: ilogbl: Make sure to return FP_ILGB0 on zero input Signed-off-by: Corinna Vinschen --- winsup/cygwin/math/ilogbl.S | 10 ++++++++++ winsup/cygwin/release/3.1.0 | 3 +++ 2 files changed, 13 insertions(+) diff --git a/winsup/cygwin/math/ilogbl.S b/winsup/cygwin/math/ilogbl.S index f68082ce6..a4fe503ad 100644 --- a/winsup/cygwin/math/ilogbl.S +++ b/winsup/cygwin/math/ilogbl.S @@ -23,6 +23,8 @@ __MINGW_USYMBOL(ilogbl): andb %ah, %dh cmpb $0x05, %dh je 1f /* Is +-Inf, jump. */ + cmpb $0x40, %dh + je 2f /* Is +-Inf, jump. */ fxtract pushq %rax @@ -37,6 +39,9 @@ __MINGW_USYMBOL(ilogbl): 1: fstp %st movl $0x7fffffff, %eax ret +2: fstp %st + movl $0x80000001, %eax /* FP_ILOGB0 */ + ret #else fldt 4(%esp) /* I added the following ugly construct because ilogb(+-Inf) is @@ -48,6 +53,8 @@ __MINGW_USYMBOL(ilogbl): andb %ah, %dh cmpb $0x05, %dh je 1f /* Is +-Inf, jump. */ + cmpb $0x40, %dh + je 2f /* Is +-Inf, jump. */ fxtract pushl %eax @@ -62,4 +69,7 @@ __MINGW_USYMBOL(ilogbl): 1: fstp %st movl $0x7fffffff, %eax ret +2: fstp %st + movl $0x80000001, %eax /* FP_ILOGB0 */ + ret #endif diff --git a/winsup/cygwin/release/3.1.0 b/winsup/cygwin/release/3.1.0 index b0e845657..681ea5db9 100644 --- a/winsup/cygwin/release/3.1.0 +++ b/winsup/cygwin/release/3.1.0 @@ -108,3 +108,6 @@ Bug Fixes - Fix an assertion failure when /cygdrive contains an offline network drive. Addresses: https://cygwin.com/ml/cygwin/2019-12/msg00016.html + +- Fix return value of ilogbl for 0 input. + Addresses: https://cygwin.com/ml/cygwin/2019-12/msg00074.html From c81a76b3b96a7e4b12e13d73ef4834142852213b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 16 Dec 2019 15:11:47 +0100 Subject: [PATCH 114/520] strtold: set errno to ERANGE on underflow per POSIX https://pubs.opengroup.org/onlinepubs/9699919799/functions/strtod.html --- newlib/libc/stdlib/strtodg.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/newlib/libc/stdlib/strtodg.c b/newlib/libc/stdlib/strtodg.c index 013315946..743f60be5 100644 --- a/newlib/libc/stdlib/strtodg.c +++ b/newlib/libc/stdlib/strtodg.c @@ -348,6 +348,9 @@ rvOK (struct _reent *p, double d, FPI *fpi, Long *exp, __ULong *bits, int exact, if (k > nb || fpi->sudden_underflow) { b->_wds = inex = 0; *irv = STRTOG_Underflow | STRTOG_Inexlo; +#ifndef NO_ERRNO + errno = ERANGE; +#endif } else { k1 = k - 1; @@ -362,9 +365,15 @@ rvOK (struct _reent *p, double d, FPI *fpi, Long *exp, __ULong *bits, int exact, if (carry) { b = increment(p, b); inex = STRTOG_Inexhi | STRTOG_Underflow; +#ifndef NO_ERRNO + errno = ERANGE; +#endif } else if (lostbits) inex = STRTOG_Inexlo | STRTOG_Underflow; +#ifndef NO_ERRNO + errno = ERANGE; +#endif } } else if (e > fpi->emax) { @@ -761,6 +770,9 @@ _strtodg_l (struct _reent *p, const char *s00, char **se, FPI *fpi, Long *exp, rvb->_x[0] = 0; *exp = emin; irv = STRTOG_Underflow | STRTOG_Inexlo; +#ifndef NO_ERRNO + errno = ERANGE; +#endif goto ret; } rvb->_x[0] = rvb->_wds = rvbits = 1; @@ -940,6 +952,9 @@ _strtodg_l (struct _reent *p, const char *s00, char **se, FPI *fpi, Long *exp, rvb->_wds = 0; rve = emin; irv = STRTOG_Underflow | STRTOG_Inexlo; +#ifndef NO_ERRNO + errno = ERANGE; +#endif break; } adj0 = dval(adj) = 1.; @@ -1083,12 +1098,18 @@ _strtodg_l (struct _reent *p, const char *s00, char **se, FPI *fpi, Long *exp, if (sudden_underflow) { rvb->_wds = 0; irv = STRTOG_Underflow | STRTOG_Inexlo; +#ifndef NO_ERRNO + errno = ERANGE; +#endif } else { irv = (irv & ~STRTOG_Retmask) | (rvb->_wds > 0 ? STRTOG_Denormal : STRTOG_Zero); if (irv & STRTOG_Inexact) irv |= STRTOG_Underflow; +#ifndef NO_ERRNO + errno = ERANGE; +#endif } } if (se) From f69b2421bb385787b17aec061f538d75f272e5b9 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 16 Dec 2019 16:39:17 +0100 Subject: [PATCH 115/520] Cygwin: add strtold fix to release message Signed-off-by: Corinna Vinschen --- winsup/cygwin/release/3.1.0 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/release/3.1.0 b/winsup/cygwin/release/3.1.0 index 681ea5db9..82f9c53b3 100644 --- a/winsup/cygwin/release/3.1.0 +++ b/winsup/cygwin/release/3.1.0 @@ -111,3 +111,6 @@ Bug Fixes - Fix return value of ilogbl for 0 input. Addresses: https://cygwin.com/ml/cygwin/2019-12/msg00074.html + +- Let strtold set errno to ERANGE on underflow per POSIX. + Addresses: https://cygwin.com/ml/cygwin/2019-12/msg00072.html From d3574fc148721fbaf5be8afa7c32e0bc1aa3bf5c Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 16 Dec 2019 21:09:50 +0100 Subject: [PATCH 116/520] Cygwin: Bump DLL version to 3.1.1 Signed-off-by: Corinna Vinschen --- winsup/cygwin/include/cygwin/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 73d9c7840..add224411 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -11,7 +11,7 @@ details. */ changes to the DLL and is mainly informative in nature. */ #define CYGWIN_VERSION_DLL_MAJOR 3001 -#define CYGWIN_VERSION_DLL_MINOR 0 +#define CYGWIN_VERSION_DLL_MINOR 1 /* Major numbers before CYGWIN_VERSION_DLL_EPOCH are incompatible. */ From 2635b580ec16aff4230c6ff5fb35c965bf30a251 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 16 Dec 2019 13:55:30 -0800 Subject: [PATCH 117/520] Return EINVAL for illegal base in strtol Signed-off-by: Keith Packard --- newlib/libc/stdlib/strtol.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/newlib/libc/stdlib/strtol.c b/newlib/libc/stdlib/strtol.c index f7572b169..897890fe0 100644 --- a/newlib/libc/stdlib/strtol.c +++ b/newlib/libc/stdlib/strtol.c @@ -140,6 +140,11 @@ _strtol_l (struct _reent *rptr, const char *__restrict nptr, register unsigned long cutoff; register int neg = 0, any, cutlim; + if (base < 0 || base == 1 || base > 36) { + errno = EINVAL; + return 0; + } + /* * Skip white space and pick up leading +/- sign if any. * If base is 0, allow 0x for hex and 0 for octal, else @@ -193,9 +198,9 @@ _strtol_l (struct _reent *rptr, const char *__restrict nptr, break; if (c >= base) break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) { any = -1; - else { + } else { any = 1; acc *= base; acc += c; From ed2a469cdd281182fe2a9c2c6fcb3da3fa659979 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 16 Dec 2019 13:56:11 -0800 Subject: [PATCH 118/520] Set __IEEE_LITTLE_ENDIAN for _XTENSA_EL__ (ESP32) Signed-off-by: Keith Packard --- newlib/libc/include/machine/ieeefp.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/newlib/libc/include/machine/ieeefp.h b/newlib/libc/include/machine/ieeefp.h index 536ac11fc..aa8a1903b 100644 --- a/newlib/libc/include/machine/ieeefp.h +++ b/newlib/libc/include/machine/ieeefp.h @@ -460,6 +460,10 @@ #define __IEEE_LITTLE_ENDIAN #endif +#ifdef __XTENSA_EL__ +#define __IEEE_LITTLE_ENDIAN +#endif + #ifdef __CYGWIN__ #define __OBSOLETE_MATH_DEFAULT 0 #endif From 26cc7769b4b587564b610845eed9bf4efb1b16f7 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 17 Dec 2019 16:44:54 +0100 Subject: [PATCH 119/520] Cygwin: autoload: Add missing GetProcessGroupAffinity/GetThreadGroupAffinity Both functions were introduce with Windows 7 only, so we need to autoload them for the sake of Vista/2008. Signed-off-by: Corinna Vinschen --- winsup/cygwin/autoload.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc index 1851ab3b6..454bf514c 100644 --- a/winsup/cygwin/autoload.cc +++ b/winsup/cygwin/autoload.cc @@ -584,7 +584,9 @@ LoadDLLfunc (if_nametoindex, 4, iphlpapi) LoadDLLfuncEx2 (DiscardVirtualMemory, 8, kernel32, 1, 127) LoadDLLfunc (GetCurrentProcessorNumberEx, 4, kernel32) LoadDLLfuncEx (GetLogicalProcessorInformationEx, 12, kernel32, 1) +LoadDLLfuncEx (GetProcessGroupAffinity, 12, kernel32, 1) LoadDLLfunc (GetSystemTimePreciseAsFileTime, 4, kernel32) +LoadDLLfuncEx (GetThreadGroupAffinity, 8, kernel32, 1) LoadDLLfuncEx (PrefetchVirtualMemory, 16, kernel32, 1) LoadDLLfunc (SetThreadGroupAffinity, 12, kernel32) From 5317e3f4eca4e70acc26da3bb01f41298d035a7f Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 18 Dec 2019 10:47:43 +0100 Subject: [PATCH 120/520] Cygwin: add 3.1.1 release text belatedly Signed-off-by: Corinna Vinschen --- winsup/cygwin/release/3.1.1 | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 winsup/cygwin/release/3.1.1 diff --git a/winsup/cygwin/release/3.1.1 b/winsup/cygwin/release/3.1.1 new file mode 100644 index 000000000..0bee64784 --- /dev/null +++ b/winsup/cygwin/release/3.1.1 @@ -0,0 +1,5 @@ +Bug Fixes +--------- + +- Fix 3.1.0 inability to run on Windows Vista/Server 2008. + Addresses: https://cygwin.com/ml/cygwin/2019-12/msg00139.html From 7fc78f07edc119c91b57e5ad225a75f9ac8081cd Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 18 Dec 2019 10:48:10 +0100 Subject: [PATCH 121/520] Cygwin: Bump DLL version to 3.1.2 Signed-off-by: Corinna Vinschen --- winsup/cygwin/include/cygwin/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index add224411..6c30fab03 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -11,7 +11,7 @@ details. */ changes to the DLL and is mainly informative in nature. */ #define CYGWIN_VERSION_DLL_MAJOR 3001 -#define CYGWIN_VERSION_DLL_MINOR 1 +#define CYGWIN_VERSION_DLL_MINOR 2 /* Major numbers before CYGWIN_VERSION_DLL_EPOCH are incompatible. */ From 91f1eab9a987011d84681f0842c4cad7478cd334 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Mon, 16 Dec 2019 19:28:59 +0000 Subject: [PATCH 122/520] doc: Untabify python scripts used for making man pages These scripts fail with a TabError exception if 'python' is python3, as mixing tabs and spaces in indentation is forbidden in python3. --- newlib/doc/chapter-texi2docbook.py | 34 +-- newlib/doc/makedocbook.py | 384 ++++++++++++++--------------- 2 files changed, 209 insertions(+), 209 deletions(-) diff --git a/newlib/doc/chapter-texi2docbook.py b/newlib/doc/chapter-texi2docbook.py index eb606dc68..e21489b9a 100755 --- a/newlib/doc/chapter-texi2docbook.py +++ b/newlib/doc/chapter-texi2docbook.py @@ -19,25 +19,25 @@ def main(): print ('') for l in sys.stdin.readlines(): - l = l.rstrip() + l = l.rstrip() - # transform @file{foo} to foo - l = re.sub("@file{(.*?)}", "\\1", l) + # transform @file{foo} to foo + l = re.sub("@file{(.*?)}", "\\1", l) - if l.startswith("@node"): - l = l.replace("@node", "", 1) - l = l.strip() - l = l.lower() - if first_node: - print ('' % l.replace(' ', '_')) - first_node = False - elif l.startswith("@chapter "): - l = l.replace("@chapter ", "", 1) - print ('%s' % l) - elif l.startswith("@include "): - l = l.replace("@include ", "", 1) - l = l.replace(".def", ".xml", 1) - print ('' % l.strip()) + if l.startswith("@node"): + l = l.replace("@node", "", 1) + l = l.strip() + l = l.lower() + if first_node: + print ('' % l.replace(' ', '_')) + first_node = False + elif l.startswith("@chapter "): + l = l.replace("@chapter ", "", 1) + print ('%s' % l) + elif l.startswith("@include "): + l = l.replace("@include ", "", 1) + l = l.replace(".def", ".xml", 1) + print ('' % l.strip()) print ('') diff --git a/newlib/doc/makedocbook.py b/newlib/doc/makedocbook.py index 97255345d..92d0f279d 100755 --- a/newlib/doc/makedocbook.py +++ b/newlib/doc/makedocbook.py @@ -35,11 +35,11 @@ verbose = 0 def dump(s, stage, threshold = 1): if verbose > threshold: - print('*' * 40, file=sys.stderr) - print(stage, file=sys.stderr) - print('*' * 40, file=sys.stderr) - print('%s' % s, file=sys.stderr) - print('*' * 40, file=sys.stderr) + print('*' * 40, file=sys.stderr) + print(stage, file=sys.stderr) + print('*' * 40, file=sys.stderr) + print('%s' % s, file=sys.stderr) + print('*' * 40, file=sys.stderr) # # Stage 1 @@ -48,7 +48,7 @@ def dump(s, stage, threshold = 1): def skip_whitespace_and_stars(i, src): while i < len(src) and (src[i].isspace() or (src[i] == '*' and src[i+1] != '/')): - i += 1 + i += 1 return i @@ -60,37 +60,37 @@ def comment_contents_generator(src): i = 0 while i < len(src) - 2: - if src[i] == '\n' and src[i+1] == '/' and src[i+2] == '*': - i = i + 3 + if src[i] == '\n' and src[i+1] == '/' and src[i+2] == '*': + i = i + 3 - i = skip_whitespace_and_stars(i, src) + i = skip_whitespace_and_stars(i, src) - if src[i] == '.': - i += 1 + if src[i] == '.': + i += 1 - while i < len(src): - if src[i] == '\n': - yield '\n' - i += 1 + while i < len(src): + if src[i] == '\n': + yield '\n' + i += 1 - # allow a single blank line - if i < len(src) and src[i] == '\n': - yield '\n' - i += 1 + # allow a single blank line + if i < len(src) and src[i] == '\n': + yield '\n' + i += 1 - i = skip_whitespace_and_stars(i, src) + i = skip_whitespace_and_stars(i, src) - elif src[i] == '*' and src[i+1] == '/': - i = i + 2 - # If we have just output \n\n, this adds another blank line. - # This is the only way a double blank line can occur. - yield '\nEND\n' - break - else: - yield src[i] - i += 1 - else: - i += 1 + elif src[i] == '*' and src[i+1] == '/': + i = i + 2 + # If we have just output \n\n, this adds another blank line. + # This is the only way a double blank line can occur. + yield '\nEND\n' + break + else: + yield src[i] + i += 1 + else: + i += 1 def remove_noncomments(src): src = '\n' + src @@ -107,7 +107,7 @@ def remove_noncomments(src): def iscommand(l): if re.match('^[A-Z_]{3,}\s*$', l): - return True + return True return False def command_block_generator(content): @@ -115,12 +115,12 @@ def command_block_generator(content): text = '' for l in content.splitlines(): - if iscommand(l): - yield (command, text) - command = l.rstrip() - text = '' - else: - text = text + l + '\n' + if iscommand(l): + yield (command, text) + command = l.rstrip() + text = '' + else: + text = text + l + '\n' yield (command, text) # Look for commands, which give instructions how to process the following input @@ -142,17 +142,17 @@ def process(content): # invoke each command on it's text def perform(processed): for i in processed: - c = i[0].rstrip() - t = i[1].strip() + '\n' + c = i[0].rstrip() + t = i[1].strip() + '\n' - if verbose: - print("performing command '%s'" % c, file=sys.stderr) + if verbose: + print("performing command '%s'" % c, file=sys.stderr) - if c in command_dispatch_dict: - command_dispatch_dict[c](c, t) - else: - print("command '%s' is not recognized" % c, file=sys.stderr) - # the text following an unrecognized command is discarded + if c in command_dispatch_dict: + command_dispatch_dict[c](c, t) + else: + print("command '%s' is not recognized" % c, file=sys.stderr) + # the text following an unrecognized command is discarded # FUNCTION (aka TYPEDEF) # @@ -162,33 +162,33 @@ def function(c, l): l = l.strip() if verbose: - print('FUNCTION %s' % l, file=sys.stderr) + print('FUNCTION %s' % l, file=sys.stderr) separator = '---' if ';' in l: - # fpclassify has an unusual format we also need to handle - spliton = ';' - l = l.splitlines()[0] + # fpclassify has an unusual format we also need to handle + spliton = ';' + l = l.splitlines()[0] elif len(l.splitlines()) > 1: - # a few pages like mktemp have two '---' lines - spliton = ';' - o = '' - for i in l.splitlines(): - if separator in i: - o += i + ';' - else: - o += i - l = o[:-1] + # a few pages like mktemp have two '---' lines + spliton = ';' + o = '' + for i in l.splitlines(): + if separator in i: + o += i + ';' + else: + o += i + l = o[:-1] else: - spliton = '\n' + spliton = '\n' namelist = [] descrlist = [] for a in l.split(spliton): - (n, d) = a.split(separator, 1) - namelist = namelist + n.split(',') - descrlist = descrlist + [d] + (n, d) = a.split(separator, 1) + namelist = namelist + n.split(',') + descrlist = descrlist + [d] # only copysign and log1p use <[ ]> markup in descr, # only gets() uses << >> markup @@ -201,17 +201,17 @@ def function(c, l): namelist = map(lambda v: v.strip().lstrip('<').rstrip('>'), namelist) if verbose: - print(namelist, file=sys.stderr) + print(namelist, file=sys.stderr) # additional alternate names may also appear in INDEX commands # create the root element if needed if rootelement is None: - rootelement = lxml.etree.Element('refentrycontainer') + rootelement = lxml.etree.Element('refentrycontainer') # FUNCTION implies starting a new refentry if refentry is not None: - print("multiple FUNCTIONs without NEWPAGE", file=sys.stderr) - exit(1) + print("multiple FUNCTIONs without NEWPAGE", file=sys.stderr) + exit(1) # create the refentry refentry = lxml.etree.SubElement(rootelement, 'refentry') @@ -232,8 +232,8 @@ def function(c, l): refdescriptor.text = namelist[0] # refname elements exist for all alternate names for n in namelist: - refname = lxml.etree.SubElement(refnamediv, 'refname') - refname.text = n + refname = lxml.etree.SubElement(refnamediv, 'refname') + refname.text = n refpurpose = lxml.etree.SubElement(refnamediv, 'refpurpose') refnamediv.replace(refpurpose, lxml.etree.fromstring('' + descr + '')) @@ -249,7 +249,7 @@ def index(c, l): l = l.strip() if verbose: - print('INDEX %s' % l, file=sys.stderr) + print('INDEX %s' % l, file=sys.stderr) # discard anything after the first word l = l.split()[0] @@ -269,13 +269,13 @@ def index(c, l): # as long as it doesn't already exist if not refnamediv.xpath(('refname[.="%s"]') % l): - refname = lxml.etree.SubElement(refnamediv, 'refname') - refname.text = l - if verbose > 1: - print('added refname %s' % l, file=sys.stderr) + refname = lxml.etree.SubElement(refnamediv, 'refname') + refname.text = l + if verbose > 1: + print('added refname %s' % l, file=sys.stderr) else: - if verbose > 1: - print('duplicate refname %s discarded' % l, file=sys.stderr) + if verbose > 1: + print('duplicate refname %s discarded' % l, file=sys.stderr) # to validate, it seems we need to maintain refnamediv elements in a certain order refnamediv[:] = sorted(refnamediv, key = lambda x: x.tag) @@ -293,28 +293,28 @@ def synopsis(c, t): s = '' for l in t.splitlines(): - if re.match('\s*(#|\[|struct)', l): - # preprocessor # directives, structs, comments in square brackets - funcsynopsisinfo = lxml.etree.SubElement(funcsynopsis, 'funcsynopsisinfo') - funcsynopsisinfo.text = l.strip() + '\n' - elif re.match('[Ll]ink with', l): - pass - else: - s = s + l + if re.match('\s*(#|\[|struct)', l): + # preprocessor # directives, structs, comments in square brackets + funcsynopsisinfo = lxml.etree.SubElement(funcsynopsis, 'funcsynopsisinfo') + funcsynopsisinfo.text = l.strip() + '\n' + elif re.match('[Ll]ink with', l): + pass + else: + s = s + l - # a prototype without a terminating ';' is an error - if s.endswith(')'): - print("'%s' missing terminating semicolon" % l, file=sys.stderr) - s = s + ';' - exit(1) + # a prototype without a terminating ';' is an error + if s.endswith(')'): + print("'%s' missing terminating semicolon" % l, file=sys.stderr) + s = s + ';' + exit(1) - if ';' in s: - synopsis_for_prototype(funcsynopsis, s) - s = '' + if ';' in s: + synopsis_for_prototype(funcsynopsis, s) + s = '' if s.strip(): - print("surplus synopsis '%s'" % s, file=sys.stderr) - exit(1) + print("surplus synopsis '%s'" % s, file=sys.stderr) + exit(1) def synopsis_for_prototype(funcsynopsis, s): s = s.strip() @@ -323,48 +323,48 @@ def synopsis_for_prototype(funcsynopsis, s): # bare prototype into it. Fortunately, since the parameter names are marked # up, we have enough information to do this. for fp in s.split(';'): - fp = fp.strip() - if fp: + fp = fp.strip() + if fp: - if verbose: - print("'%s'" % fp, file=sys.stderr) + if verbose: + print("'%s'" % fp, file=sys.stderr) - match = re.match(r'(.*?)([\w\d]*) ?\((.*)\)', fp) + match = re.match(r'(.*?)([\w\d]*) ?\((.*)\)', fp) - if verbose: - print(match.groups(), file=sys.stderr) + if verbose: + print(match.groups(), file=sys.stderr) - funcprototype = lxml.etree.SubElement(funcsynopsis, 'funcprototype') - funcdef = lxml.etree.SubElement(funcprototype, 'funcdef') - funcdef.text = match.group(1) - function = lxml.etree.SubElement(funcdef, 'function') - function.text = match.group(2) + funcprototype = lxml.etree.SubElement(funcsynopsis, 'funcprototype') + funcdef = lxml.etree.SubElement(funcprototype, 'funcdef') + funcdef.text = match.group(1) + function = lxml.etree.SubElement(funcdef, 'function') + function.text = match.group(2) - if match.group(3).strip() == 'void': - void = lxml.etree.SubElement(funcprototype, 'void') - else: - # Split parameters on ',' except if it is inside () - for p in re.split(',(?![^()]*\))', match.group(3)): - p = p.strip() + if match.group(3).strip() == 'void': + void = lxml.etree.SubElement(funcprototype, 'void') + else: + # Split parameters on ',' except if it is inside () + for p in re.split(',(?![^()]*\))', match.group(3)): + p = p.strip() - if verbose: - print(p, file=sys.stderr) + if verbose: + print(p, file=sys.stderr) - if p == '...': - varargs = lxml.etree.SubElement(funcprototype, 'varargs') - else: - paramdef = lxml.etree.SubElement(funcprototype, 'paramdef') - parameter = lxml.etree.SubElement(paramdef, 'parameter') + if p == '...': + varargs = lxml.etree.SubElement(funcprototype, 'varargs') + else: + paramdef = lxml.etree.SubElement(funcprototype, 'paramdef') + parameter = lxml.etree.SubElement(paramdef, 'parameter') - # <[ ]> enclose the parameter name - match2 = re.match('(.*)<\[(.*)\]>(.*)', p) + # <[ ]> enclose the parameter name + match2 = re.match('(.*)<\[(.*)\]>(.*)', p) - if verbose: - print(match2.groups(), file=sys.stderr) + if verbose: + print(match2.groups(), file=sys.stderr) - paramdef.text = match2.group(1) - parameter.text = match2.group(2) - parameter.tail = match2.group(3) + paramdef.text = match2.group(1) + parameter.text = match2.group(2) + parameter.tail = match2.group(3) # DESCRIPTION @@ -384,15 +384,15 @@ def refsect(t, s): title.text = t.title() if verbose: - print('%s has %d paragraphs' % (t, len(s.split('\n\n'))) , file=sys.stderr) + print('%s has %d paragraphs' % (t, len(s.split('\n\n'))) , file=sys.stderr) if verbose > 1: - dump(s, 'before lexing') + dump(s, 'before lexing') - # dump out lexer token sequence - lex.input(s) - for tok in lexer: - print(tok, file=sys.stderr) + # dump out lexer token sequence + lex.input(s) + for tok in lexer: + print(tok, file=sys.stderr) # parse the section text for makedoc markup and the few pieces of texinfo # markup we understand, and output an XML marked-up string @@ -421,25 +421,25 @@ def discarded(c, t): return command_dispatch_dict = { - 'FUNCTION' : function, - 'TYPEDEF' : function, # TYPEDEF is not currently used, but described in doc.str - 'INDEX' : index, - 'TRAD_SYNOPSIS' : discarded, # K&R-style synopsis, obsolete and discarded - 'ANSI_SYNOPSIS' : synopsis, - 'SYNOPSIS' : synopsis, - 'DESCRIPTION' : refsect, - 'RETURNS' : refsect, - 'ERRORS' : refsect, - 'PORTABILITY' : refsect, - 'BUGS' : refsect, - 'WARNINGS' : refsect, - 'SEEALSO' : seealso, - 'NOTES' : refsect, # NOTES is not described in doc.str, so is currently discarded by makedoc, but that doesn't seem right - 'QUICKREF' : discarded, # The intent of QUICKREF and MATHREF is not obvious, but they don't generate any output currently - 'MATHREF' : discarded, - 'START' : discarded, # a START command is inserted to contain the text before the first command - 'END' : discarded, # an END command is inserted merely to terminate the text for the last command in a comment block - 'NEWPAGE' : newpage, + 'FUNCTION' : function, + 'TYPEDEF' : function, # TYPEDEF is not currently used, but described in doc.str + 'INDEX' : index, + 'TRAD_SYNOPSIS' : discarded, # K&R-style synopsis, obsolete and discarded + 'ANSI_SYNOPSIS' : synopsis, + 'SYNOPSIS' : synopsis, + 'DESCRIPTION' : refsect, + 'RETURNS' : refsect, + 'ERRORS' : refsect, + 'PORTABILITY' : refsect, + 'BUGS' : refsect, + 'WARNINGS' : refsect, + 'SEEALSO' : seealso, + 'NOTES' : refsect, # NOTES is not described in doc.str, so is currently discarded by makedoc, but that doesn't seem right + 'QUICKREF' : discarded, # The intent of QUICKREF and MATHREF is not obvious, but they don't generate any output currently + 'MATHREF' : discarded, + 'START' : discarded, # a START command is inserted to contain the text before the first command + 'END' : discarded, # an END command is inserted merely to terminate the text for the last command in a comment block + 'NEWPAGE' : newpage, } # @@ -483,7 +483,7 @@ def line_markup_convert(p): s = s.replace('@*', '') if (verbose > 3) and (s != p): - print('%s-> line_markup_convert ->\n%s' % (p, s), file=sys.stderr) + print('%s-> line_markup_convert ->\n%s' % (p, s), file=sys.stderr) return s @@ -529,9 +529,9 @@ def t_TEXINFO(t): # if the line starts with a known texinfo command, change t.type to the # token for that command for k in texinfo_commands.keys(): - if t.value[1:].startswith(k): - t.type = texinfo_commands[k] - break + if t.value[1:].startswith(k): + t.type = texinfo_commands[k] + break return t @@ -575,10 +575,10 @@ def t_BLANKLINE(t): def t_eof(t): if hasattr(t.lexer,'at_eof'): - # remove eof flag ready for lexing next input - delattr(t.lexer,'at_eof') - t.lexer.lineno = 0 - return None + # remove eof flag ready for lexing next input + delattr(t.lexer,'at_eof') + t.lexer.lineno = 0 + return None t.type = 'EOF' t.lexer.at_eof = True; @@ -598,15 +598,15 @@ lexer = lex.lex() def parser_verbose(p): if verbose > 2: - print(p[0], file=sys.stderr) + print(p[0], file=sys.stderr) def p_input(p): '''input : paragraph | input paragraph''' if len(p) == 3: - p[0] = p[1] + '\n' + p[2] + p[0] = p[1] + '\n' + p[2] else: - p[0] = p[1] + p[0] = p[1] parser_verbose(p) # Strictly, text at top level should be paragraphs (i.e terminated by a @@ -621,9 +621,9 @@ def p_paragraph_content(p): '''paragraph_content : paragraph_line | paragraph_line paragraph_content''' if len(p) == 3: - p[0] = p[1] + p[2] + p[0] = p[1] + p[2] else: - p[0] = p[1] + p[0] = p[1] parser_verbose(p) def p_paragraph_line(p): @@ -649,9 +649,9 @@ def p_maybe_lines(p): '''maybe_lines : empty | paragraph maybe_lines''' if len(p) == 3: - p[0] = p[1] + p[2] + p[0] = p[1] + p[2] else: - p[0] = p[1] + p[0] = p[1] parser_verbose(p) def p_maybe_blankline(p): @@ -668,32 +668,32 @@ def p_courier(p): '''courier : COURIER | COURIER courier''' if len(p) == 3: - p[0] = p[1] + p[2] + p[0] = p[1] + p[2] else: - p[0] = p[1] + p[0] = p[1] parser_verbose(p) def p_bullet(p): '''bullet : ITEM maybe_lines | ITEM BLANKLINE maybe_lines''' if len(p) == 3: - # Glue any text in ITEM into the first para of maybe_lines - # (This is an unfortunate consequence of the line-based tokenization we do) - if p[2].startswith(''): - p[0] = '' + p[1] + p[2][len(''):] + '' - else: - p[0] = '' + p[1] + '' + p[2] + '' + # Glue any text in ITEM into the first para of maybe_lines + # (This is an unfortunate consequence of the line-based tokenization we do) + if p[2].startswith(''): + p[0] = '' + p[1] + p[2][len(''):] + '' + else: + p[0] = '' + p[1] + '' + p[2] + '' else: - p[0] = '' + p[1] + '' + p[3] + '' + p[0] = '' + p[1] + '' + p[3] + '' parser_verbose(p) def p_bullets(p): '''bullets : bullet | bullet bullets''' if len(p) == 3: - p[0] = p[1] + '\n' + p[2] + p[0] = p[1] + '\n' + p[2] else: - p[0] = p[1] + p[0] = p[1] parser_verbose(p) def p_bulletlist(p): @@ -705,18 +705,18 @@ def p_row(p): '''row : ITEM maybe_lines | ITEM BLANKLINE maybe_lines''' if len(p) == 3: - p[0] = '' + p[1] + '' + p[2] + '' + p[0] = '' + p[1] + '' + p[2] + '' else: - p[0] = '' + p[1] + '' + p[3] + '' + p[0] = '' + p[1] + '' + p[3] + '' parser_verbose(p) def p_rows(p): '''rows : row | row rows''' if len(p) == 3: - p[0] = p[1] + '\n' + p[2] + p[0] = p[1] + '\n' + p[2] else: - p[0] = p[1] + p[0] = p[1] parser_verbose(p) def p_table(p): @@ -756,9 +756,9 @@ def p_mct_columns(p): '''mct_columns : maybe_lines | maybe_lines MCT_COLUMN_SEPARATOR mct_columns''' if len(p) == 4: - p[0] = '' + p[1] + '' + p[3] + p[0] = '' + p[1] + '' + p[3] else: - p[0] = '' + p[1] + '' + p[0] = '' + p[1] + '' parser_verbose(p) def p_mct_row(p): @@ -770,9 +770,9 @@ def p_mct_rows(p): '''mct_rows : mct_row | mct_row mct_rows''' if len(p) == 3: - p[0] = p[1] + '\n' + p[2] + p[0] = p[1] + '\n' + p[2] else: - p[0] = p[1] + p[0] = p[1] parser_verbose(p) def p_mct_header(p): @@ -810,15 +810,15 @@ def main(file): s = lxml.etree.tostring(rootelement, pretty_print=True) if not s: - print('No output produced (perhaps the input has no makedoc markup?)', file=sys.stderr) - exit(1) + print('No output produced (perhaps the input has no makedoc markup?)', file=sys.stderr) + exit(1) print(s) # warn about texinfo commands which didn't get processed match = re.search('@[a-z*]+', s) if match: - print('texinfo command %s remains in output' % match.group(), file=sys.stderr) + print('texinfo command %s remains in output' % match.group(), file=sys.stderr) # # @@ -831,11 +831,11 @@ if __name__ == '__main__' : (opts, args) = options.parse_args() if opts.cache: - sys.exit() + sys.exit() verbose = opts.verbose if len(args) > 0: - main(open(args[0], 'rb')) + main(open(args[0], 'rb')) else: - main(sys.stdin) + main(sys.stdin) From fe512b2b12a2cea8393d14f038dc3914b1bf3f60 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 19 Dec 2019 01:07:33 +0900 Subject: [PATCH 123/520] Cygwin: pty: Fix a bug regarding ESC[?3h and ESC[?3l handling. - Midnight commander (mc) does not work after the commit 1626569222066ee601f6c41b29efcc95202674b7 as reported in https://www.cygwin.com/ml/cygwin/2019-12/msg00173.html. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 1d344c7fe..8c3a6e72e 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1262,16 +1262,19 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) while ((p0 = (char *) memmem (p0, nlen - (p0 - buf), "\033[?", 3))) { p0 += 3; - while (p0 < buf + nlen && *p0 != 'h' && *p0 != 'l') + bool exist_arg_3 = false; + while (p0 < buf + nlen && !isalpha (*p0)) { int arg = 0; while (p0 < buf + nlen && isdigit (*p0)) arg = arg * 10 + (*p0 ++) - '0'; if (arg == 3) - get_ttyp ()->need_redraw_screen = true; + exist_arg_3 = true; if (p0 < buf + nlen && *p0 == ';') p0 ++; } + if (p0 < buf + nlen && exist_arg_3 && (*p0 == 'h' || *p0 == 'l')) + get_ttyp ()->need_redraw_screen = true; p0 ++; if (p0 >= buf + nlen) break; From abcc586ffec05a7779f8474119407d050392ee18 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 18 Dec 2019 08:49:05 -0800 Subject: [PATCH 124/520] Fix fcvt to only show 'ndigit' past decimal Even if the number is really small and this means showing *no* digits. This makes newlib match glibc, and the fcvt posix man page. Signed-off-by: Keith Packard --- newlib/libc/stdlib/ecvtbuf.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/newlib/libc/stdlib/ecvtbuf.c b/newlib/libc/stdlib/ecvtbuf.c index e3d7b55d8..12e8c9a92 100644 --- a/newlib/libc/stdlib/ecvtbuf.c +++ b/newlib/libc/stdlib/ecvtbuf.c @@ -235,14 +235,7 @@ fcvtbuf (double invalue, save = fcvt_buf; - if (invalue < 1.0 && invalue > -1.0) - { - p = _dtoa_r (reent, invalue, 2, ndigit, decpt, sign, &end); - } - else - { - p = _dtoa_r (reent, invalue, 3, ndigit, decpt, sign, &end); - } + p = _dtoa_r (reent, invalue, 3, ndigit, decpt, sign, &end); /* Now copy */ From 11f99384d2971356bab2fcac7e29792250abea73 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 18 Dec 2019 08:49:06 -0800 Subject: [PATCH 125/520] Fix gcvt to always show 'ndigits' of precision Leading zeros after the decimal point should not count towards the 'ndigits' limit. This makes gcvt match glibc and the posix gcvt man page. Signed-off-by: Keith Packard --- newlib/libc/stdlib/ecvtbuf.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/newlib/libc/stdlib/ecvtbuf.c b/newlib/libc/stdlib/ecvtbuf.c index 12e8c9a92..228362e07 100644 --- a/newlib/libc/stdlib/ecvtbuf.c +++ b/newlib/libc/stdlib/ecvtbuf.c @@ -349,15 +349,10 @@ _gcvt (struct _reent *ptr, char *end; char *p; - if (invalue < 1.0) - { - /* what we want is ndigits after the point */ - p = _dtoa_r (ptr, invalue, 3, ndigit, &decpt, &sign, &end); - } - else - { - p = _dtoa_r (ptr, invalue, 2, ndigit, &decpt, &sign, &end); - } + /* We always want ndigits of precision, even if that means printing + * a bunch of leading zeros for numbers < 1.0 + */ + p = _dtoa_r (ptr, invalue, 2, ndigit, &decpt, &sign, &end); if (decpt == 9999) { @@ -383,11 +378,12 @@ _gcvt (struct _reent *ptr, if (buf == save) *buf++ = '0'; *buf++ = '.'; - while (decpt < 0 && ndigit > 0) + + /* Leading zeros don't count towards 'ndigit' */ + while (decpt < 0) { *buf++ = '0'; decpt++; - ndigit--; } /* Print rest of stuff */ From 76dcfd0c4d31ef2658564ba2fac8b1852704c45a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 17 Dec 2019 22:00:49 -0800 Subject: [PATCH 126/520] Don't display trailing '.' in _dcvt In the two helper functions that _dcvt calls for 'f' and 'e' mode, if there are no digits to display after the decimal point, don't add one. Signed-off-by: Keith Packard --- newlib/libc/stdlib/ecvtbuf.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/newlib/libc/stdlib/ecvtbuf.c b/newlib/libc/stdlib/ecvtbuf.c index 228362e07..0cb11f889 100644 --- a/newlib/libc/stdlib/ecvtbuf.c +++ b/newlib/libc/stdlib/ecvtbuf.c @@ -93,7 +93,8 @@ print_f (struct _reent *ptr, { if (p == start) *buf++ = '0'; - *buf++ = '.'; + if (decpt < 0 && ndigit > 0) + *buf++ = '.'; while (decpt < 0 && ndigit > 0) { *buf++ = '0'; @@ -148,11 +149,15 @@ print_e (struct _reent *ptr, } *buf++ = *p++; - if (dot || ndigit != 0) - *buf++ = '.'; + if (ndigit > 0) + dot = 1; while (*p && ndigit > 0) { + if (dot) { + *buf++ = '.'; + dot = 0; + } *buf++ = *p++; ndigit--; } @@ -168,6 +173,10 @@ print_e (struct _reent *ptr, { while (ndigit > 0) { + if (dot) { + *buf++ = '.'; + dot = 0; + } *buf++ = '0'; ndigit--; } From 27202a1b143d19ceadfac2584f208392e4e0859a Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 19 Dec 2019 20:03:30 +0900 Subject: [PATCH 127/520] Cygwin: pty: Fix ESC[?3h and ESC[?3l handling again. - Even with commit fe512b2b12a2cea8393d14f038dc3914b1bf3f60, pty still has a problem in ESC[?3h and ESC[?3l handling if invalid sequence such as ESC[?$ is sent. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 8c3a6e72e..f10f0fc61 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1263,7 +1263,7 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) { p0 += 3; bool exist_arg_3 = false; - while (p0 < buf + nlen && !isalpha (*p0)) + while (p0 < buf + nlen && (isdigit (*p0) || *p0 == ';')) { int arg = 0; while (p0 < buf + nlen && isdigit (*p0)) From b481c11e5a7eb409c76f56873d6378e7ff1e3e05 Mon Sep 17 00:00:00 2001 From: Anthony Green Date: Fri, 20 Dec 2019 09:00:26 -0500 Subject: [PATCH 128/520] Optimize setjmp/longjmp for moxie. We don't need to save/restore every register -- just those we don't expect to be trashed by function calls. --- newlib/libc/include/machine/setjmp.h | 2 +- newlib/libc/machine/moxie/setjmp.S | 124 ++++++++------------------- 2 files changed, 39 insertions(+), 87 deletions(-) diff --git a/newlib/libc/include/machine/setjmp.h b/newlib/libc/include/machine/setjmp.h index 78a81b5d9..55152b0d7 100644 --- a/newlib/libc/include/machine/setjmp.h +++ b/newlib/libc/include/machine/setjmp.h @@ -238,7 +238,7 @@ _BEGIN_STD_C #endif #ifdef __moxie__ -#define _JBLEN 19 +#define _JBLEN 10 #endif #ifdef __CRX__ diff --git a/newlib/libc/machine/moxie/setjmp.S b/newlib/libc/machine/moxie/setjmp.S index ed261d54d..014368d64 100644 --- a/newlib/libc/machine/moxie/setjmp.S +++ b/newlib/libc/machine/moxie/setjmp.S @@ -14,53 +14,34 @@ # setjmp/longjmp for moxie. The jmpbuf looks like this: # # Register jmpbuf offset -# $r0 0x00 -# $r1 0x04 -# $r2 0x08 -# $r3 0x0c -# $r4 0x10 -# $r5 0x14 -# $r6 0x18 -# $r7 0x1c -# $r8 0x20 -# $r9 0x24 -# $r10 0x28 -# $r11 0x2c -# $r12 0x30 -# $r13 0x34 -# $fp 0x38 -# $sp 0x3c -# stack frame fp 0x40 -# stack frame ra 0x44 -# stack frame sc 0x48 +# $r6 0x00 +# $r7 0x04 +# $r8 0x08 +# $r9 0x0c +# $r10 0x10 +# $fp 0x14 +# $sp 0x18 +# stack frame fp 0x1c +# stack frame ra 0x20 +# stack frame sc 0x25 .text .global setjmp .type setjmp,@function setjmp: - st.l ($r0), $r0 - sto.l 0x04($r0), $r1 - sto.l 0x08($r0), $r2 - sto.l 0x0c($r0), $r3 - sto.l 0x10($r0), $r4 - sto.l 0x14($r0), $r5 - sto.l 0x18($r0), $r6 - sto.l 0x1c($r0), $r7 - sto.l 0x20($r0), $r8 - sto.l 0x24($r0), $r9 - sto.l 0x28($r0), $r10 - sto.l 0x2c($r0), $r11 - sto.l 0x30($r0), $r12 - sto.l 0x34($r0), $r13 - sto.l 0x38($r0), $sp - sto.l 0x3c($r0), $fp - ldo.l $r1, 0x0($fp) - sto.l 0x40($r0), $r1 + st.l ($r0), $r6 + sto.l 0x04($r0), $r7 + sto.l 0x08($r0), $r8 + sto.l 0x0c($r0), $r9 + sto.l 0x10($r0), $r10 + sto.l 0x14($r0), $sp + sto.l 0x18($r0), $fp + ldo.l $r1, 0x00($fp) + sto.l 0x1c($r0), $r1 ldo.l $r1, 0x04($fp) - sto.l 0x44($r0), $r1 + sto.l 0x20($r0), $r1 ldo.l $r1, 0x08($fp) - sto.l 0x48($r0), $r1 - ldo.l $r1, 0x04($r0) + sto.l 0x24($r0), $r1 xor $r0, $r0 ret .Lend1: @@ -69,56 +50,27 @@ setjmp: .global longjmp .type longjmp,@function longjmp: - ldi.l $r2, 0x00 - cmp $r1, $r2 - beq .Lreturn1 + ldo.l $r6, 0x00($r0) + ldo.l $r7, 0x04($r0) + ldo.l $r8, 0x08($r0) + ldo.l $r9, 0x0c($r0) + ldo.l $r10, 0x10($r0) + ldo.l $sp, 0x14($r0) + ldo.l $fp, 0x18($r0) + ldo.l $r2, 0x1c($r0) + sto.l 0x0($fp), $r2 + ldo.l $r2, 0x20($r0) + sto.l 0x4($fp), $r2 + ldo.l $r2, 0x24($r0) + sto.l 0x8($fp), $r2 ldo.l $r2, 0x08($r0) - ldo.l $r3, 0x0c($r0) - ldo.l $r4, 0x10($r0) - ldo.l $r5, 0x14($r0) - ldo.l $r6, 0x18($r0) - ldo.l $r7, 0x1c($r0) - ldo.l $r8, 0x20($r0) - ldo.l $r9, 0x24($r0) - ldo.l $r10, 0x28($r0) - ldo.l $r11, 0x2c($r0) - ldo.l $r12, 0x30($r0) - ldo.l $r13, 0x34($r0) - ldo.l $sp, 0x38($r0) - ldo.l $fp, 0x3c($r0) - ldo.l $r1, 0x40($r0) - sto.l 0x0($fp), $r1 - ldo.l $r1, 0x44($r0) - sto.l 0x4($fp), $r1 - ldo.l $r1, 0x48($r0) - sto.l 0x8($fp), $r1 - ldo.l $r1, 0x04($r0) mov $r0, $r1 + xor $r2, $r2 + cmp $r0, $r2 + beq .Lreturn1 ret .Lreturn1: - ldo.l $r1, 0x04($r0) - ldo.l $r2, 0x08($r0) - ldo.l $r3, 0x0c($r0) - ldo.l $r4, 0x10($r0) - ldo.l $r5, 0x14($r0) - ldo.l $r6, 0x18($r0) - ldo.l $r7, 0x1c($r0) - ldo.l $r8, 0x20($r0) - ldo.l $r9, 0x24($r0) - ldo.l $r10, 0x28($r0) - ldo.l $r11, 0x2c($r0) - ldo.l $r12, 0x30($r0) - ldo.l $r13, 0x34($r0) - ldo.l $sp, 0x38($r0) - ldo.l $fp, 0x3c($r0) - ldo.l $r1, 0x40($r0) - sto.l 0x0($fp), $r1 - ldo.l $r1, 0x44($r0) - sto.l 0x4($fp), $r1 - ldo.l $r1, 0x48($r0) - sto.l 0x8($fp), $r1 - ldo.l $r1, 0x04($r0) - ldi.l $r0, 0x01 + inc $r0, 1 ret .Lend2: .size longjmp,.Lend2-longjmp From b42d5651504bc08e3637f5b8a5916602855052f7 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sat, 21 Dec 2019 11:44:08 +0100 Subject: [PATCH 129/520] Cygwin: add 3.1.2 release text Signed-off-by: Corinna Vinschen --- winsup/cygwin/release/3.1.2 | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 winsup/cygwin/release/3.1.2 diff --git a/winsup/cygwin/release/3.1.2 b/winsup/cygwin/release/3.1.2 new file mode 100644 index 000000000..5c84eb372 --- /dev/null +++ b/winsup/cygwin/release/3.1.2 @@ -0,0 +1,7 @@ +Bug Fixes +--------- + +- Fix an infinite loop in the pseudo console code. + Addresses: https://www.cygwin.com/ml/cygwin/2019-12/msg00173.html. + +- Bordercase formatting fixes in fcvt and gcvt. From 3bc79b275ef2ac0a2bb6805183e62baa29b6a1a2 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sat, 21 Dec 2019 17:53:52 -0500 Subject: [PATCH 130/520] Cygwin: FIFO: use FILE_PIPE_REJECT_REMOTE_CLIENTS flag Add that flag to the pipe type argument when creating the Windows named pipe. And add a definition of that flag to ntdll.h (copied from /usr/include/w32api/ddk/ntifs.h). --- winsup/cygwin/fhandler_fifo.cc | 3 ++- winsup/cygwin/ntdll.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 92797ce60..fd8223000 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -184,7 +184,8 @@ fhandler_fifo::create_pipe_instance (bool first) timeout.QuadPart = -500000; status = NtCreateNamedPipeFile (&ph, access, &attr, &io, sharing, first ? FILE_CREATE : FILE_OPEN, 0, - FILE_PIPE_MESSAGE_TYPE, + FILE_PIPE_MESSAGE_TYPE + | FILE_PIPE_REJECT_REMOTE_CLIENTS, FILE_PIPE_MESSAGE_MODE, nonblocking, max_instances, DEFAULT_PIPEBUFSIZE, DEFAULT_PIPEBUFSIZE, diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h index e19cc8ab5..1c07d0255 100644 --- a/winsup/cygwin/ntdll.h +++ b/winsup/cygwin/ntdll.h @@ -557,7 +557,8 @@ enum enum { FILE_PIPE_BYTE_STREAM_TYPE = 0, - FILE_PIPE_MESSAGE_TYPE = 1 + FILE_PIPE_MESSAGE_TYPE = 1, + FILE_PIPE_REJECT_REMOTE_CLIENTS = 2 }; typedef struct _FILE_PIPE_PEEK_BUFFER { From 7685c4dd6c77a4177dfbbf91ac255053171cc41f Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Wed, 18 Dec 2019 14:03:42 +0000 Subject: [PATCH 131/520] doc: add more details about adding documentation to HOWTO Add a little more detail to the checklist for adding documentation Also update the list of supported sections --- newlib/HOWTO | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/newlib/HOWTO b/newlib/HOWTO index bb49e79dd..3a214edf4 100644 --- a/newlib/HOWTO +++ b/newlib/HOWTO @@ -49,7 +49,8 @@ For an example of this kind of usage, see libm/common/s_logb.c. If writing a new function that requires documentation, the required sections are FUNCTION, INDEX, SYNOPSIS, DESCRIPTION, RETURNS, -and PORTABILITY. BUGS and SEEALSO should be added as appropriate. +and PORTABILITY. BUGS, NOTES, SEEALSO and WARNINGS should be added as +appropriate. Source files which contain documentation are processed into ".def" files with the extracted information. These .def files are noted in the @@ -64,7 +65,8 @@ In summary, to add new documentation: 1. Add properly-formatted comments to source file (e.g. src.c); 2. add "chewout" file to CHEWOUT_FILES list in Makefile.am (e.g. src.def), re-generate Makefile.in; -3. add file to something.tex; +3. @include that .def file in the appropriate .tex file, add texinfo menu + entries that reference the @node(s) in that .def file; 4. make ChangeLog entry and generate patch. EL/IX (ELIX_LEVEL_n, ELIX_n_SOURCES) From 1afb22a12083e9dcfaa2a010c14f3b36ee27d27b Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 2 Jan 2020 14:56:24 -0500 Subject: [PATCH 132/520] Bump up release to 3.2.0 for yearly snapshot --- newlib/NEWS | 17 +++++++++++++ newlib/README | 22 ++++++++--------- newlib/acinclude.m4 | 2 +- newlib/configure | 24 +++++++++---------- newlib/doc/configure | 20 ++++++++-------- newlib/iconvdata/configure | 20 ++++++++-------- newlib/libc/configure | 20 ++++++++-------- newlib/libc/machine/a29k/configure | 20 ++++++++-------- newlib/libc/machine/aarch64/configure | 20 ++++++++-------- newlib/libc/machine/amdgcn/configure | 20 ++++++++-------- newlib/libc/machine/arc/configure | 20 ++++++++-------- newlib/libc/machine/arm/configure | 20 ++++++++-------- newlib/libc/machine/bfin/configure | 20 ++++++++-------- newlib/libc/machine/configure | 20 ++++++++-------- newlib/libc/machine/cr16/configure | 20 ++++++++-------- newlib/libc/machine/cris/configure | 20 ++++++++-------- newlib/libc/machine/crx/configure | 20 ++++++++-------- newlib/libc/machine/d10v/configure | 20 ++++++++-------- newlib/libc/machine/d30v/configure | 20 ++++++++-------- newlib/libc/machine/epiphany/configure | 20 ++++++++-------- newlib/libc/machine/fr30/configure | 20 ++++++++-------- newlib/libc/machine/frv/configure | 20 ++++++++-------- newlib/libc/machine/ft32/configure | 20 ++++++++-------- newlib/libc/machine/h8300/configure | 20 ++++++++-------- newlib/libc/machine/h8500/configure | 20 ++++++++-------- newlib/libc/machine/hppa/configure | 20 ++++++++-------- newlib/libc/machine/i386/configure | 20 ++++++++-------- newlib/libc/machine/i960/configure | 20 ++++++++-------- newlib/libc/machine/iq2000/configure | 20 ++++++++-------- newlib/libc/machine/lm32/configure | 20 ++++++++-------- newlib/libc/machine/m32c/configure | 20 ++++++++-------- newlib/libc/machine/m32r/configure | 20 ++++++++-------- newlib/libc/machine/m68hc11/configure | 20 ++++++++-------- newlib/libc/machine/m68k/configure | 20 ++++++++-------- newlib/libc/machine/m88k/configure | 20 ++++++++-------- newlib/libc/machine/mep/configure | 20 ++++++++-------- newlib/libc/machine/microblaze/configure | 20 ++++++++-------- newlib/libc/machine/mips/configure | 20 ++++++++-------- newlib/libc/machine/mn10200/configure | 20 ++++++++-------- newlib/libc/machine/mn10300/configure | 20 ++++++++-------- newlib/libc/machine/moxie/configure | 20 ++++++++-------- newlib/libc/machine/msp430/configure | 20 ++++++++-------- newlib/libc/machine/mt/configure | 20 ++++++++-------- newlib/libc/machine/nds32/configure | 20 ++++++++-------- newlib/libc/machine/necv70/configure | 20 ++++++++-------- newlib/libc/machine/nios2/configure | 20 ++++++++-------- newlib/libc/machine/nvptx/configure | 20 ++++++++-------- newlib/libc/machine/or1k/configure | 20 ++++++++-------- newlib/libc/machine/powerpc/configure | 20 ++++++++-------- newlib/libc/machine/pru/configure | 20 ++++++++-------- newlib/libc/machine/riscv/configure | 20 ++++++++-------- newlib/libc/machine/rl78/configure | 20 ++++++++-------- newlib/libc/machine/rx/configure | 20 ++++++++-------- newlib/libc/machine/sh/configure | 20 ++++++++-------- newlib/libc/machine/sparc/configure | 20 ++++++++-------- newlib/libc/machine/spu/configure | 20 ++++++++-------- newlib/libc/machine/tic4x/configure | 20 ++++++++-------- newlib/libc/machine/tic6x/configure | 20 ++++++++-------- newlib/libc/machine/tic80/configure | 20 ++++++++-------- newlib/libc/machine/v850/configure | 20 ++++++++-------- newlib/libc/machine/visium/configure | 20 ++++++++-------- newlib/libc/machine/w65/configure | 20 ++++++++-------- newlib/libc/machine/x86_64/configure | 20 ++++++++-------- newlib/libc/machine/xc16x/configure | 20 ++++++++-------- newlib/libc/machine/xscale/configure | 20 ++++++++-------- newlib/libc/machine/xstormy16/configure | 20 ++++++++-------- newlib/libc/machine/z8k/configure | 20 ++++++++-------- newlib/libc/sys/a29khif/configure | 20 ++++++++-------- newlib/libc/sys/amdgcn/configure | 20 ++++++++-------- newlib/libc/sys/arm/configure | 20 ++++++++-------- newlib/libc/sys/configure | 20 ++++++++-------- newlib/libc/sys/d10v/configure | 20 ++++++++-------- newlib/libc/sys/decstation/configure | 20 ++++++++-------- newlib/libc/sys/epiphany/configure | 20 ++++++++-------- newlib/libc/sys/h8300hms/configure | 20 ++++++++-------- newlib/libc/sys/h8500hms/configure | 20 ++++++++-------- newlib/libc/sys/linux/configure | 20 ++++++++-------- newlib/libc/sys/linux/linuxthreads/configure | 20 ++++++++-------- .../sys/linux/linuxthreads/machine/configure | 20 ++++++++-------- .../linux/linuxthreads/machine/i386/configure | 20 ++++++++-------- newlib/libc/sys/linux/machine/configure | 20 ++++++++-------- newlib/libc/sys/linux/machine/i386/configure | 20 ++++++++-------- newlib/libc/sys/m88kbug/configure | 20 ++++++++-------- newlib/libc/sys/mmixware/configure | 20 ++++++++-------- newlib/libc/sys/netware/configure | 20 ++++++++-------- newlib/libc/sys/or1k/configure | 20 ++++++++-------- newlib/libc/sys/phoenix/configure | 20 ++++++++-------- newlib/libc/sys/rdos/configure | 20 ++++++++-------- newlib/libc/sys/rtems/configure | 20 ++++++++-------- newlib/libc/sys/sh/configure | 20 ++++++++-------- newlib/libc/sys/sparc64/configure | 20 ++++++++-------- newlib/libc/sys/sun4/configure | 20 ++++++++-------- newlib/libc/sys/sysmec/configure | 20 ++++++++-------- newlib/libc/sys/sysnec810/configure | 20 ++++++++-------- newlib/libc/sys/sysnecv850/configure | 20 ++++++++-------- newlib/libc/sys/sysvi386/configure | 20 ++++++++-------- newlib/libc/sys/sysvnecv70/configure | 20 ++++++++-------- newlib/libc/sys/tic80/configure | 20 ++++++++-------- newlib/libc/sys/tirtos/configure | 20 ++++++++-------- newlib/libc/sys/w65/configure | 20 ++++++++-------- newlib/libc/sys/z8ksim/configure | 20 ++++++++-------- newlib/libm/configure | 20 ++++++++-------- newlib/libm/machine/aarch64/configure | 20 ++++++++-------- newlib/libm/machine/arm/configure | 20 ++++++++-------- newlib/libm/machine/configure | 20 ++++++++-------- newlib/libm/machine/i386/configure | 20 ++++++++-------- newlib/libm/machine/nds32/configure | 20 ++++++++-------- newlib/libm/machine/pru/configure | 20 ++++++++-------- newlib/libm/machine/riscv/configure | 20 ++++++++-------- newlib/libm/machine/spu/configure | 20 ++++++++-------- newlib/libm/machine/x86_64/configure | 20 ++++++++-------- 111 files changed, 1111 insertions(+), 1094 deletions(-) diff --git a/newlib/NEWS b/newlib/NEWS index 90169cd9c..c1f611bac 100644 --- a/newlib/NEWS +++ b/newlib/NEWS @@ -1,3 +1,20 @@ +*** Major changes in newlib version 3.2.0: + +- memmem performance improvement +- nanf() and HUGE_VALF now used in libm float routines to reduce size +- new reduced "tiny" code size printf and puts support +- errno setting enhanced in libm routines +- new --enable-newlib-reent-check-verify configure option to verify reent memory +- support added +- and synced with FreeBSD +- timeval macros moved to +- newlib wide char conversion functions updated to Unicode 11.0 +- new msp430-elfbare target support +- AMD GCN port +- PRU port +- nbdm port +- various standard improvements + *** Major changes in newlib version 3.1.0: - global stdio streams support added for reent small diff --git a/newlib/README b/newlib/README index e793d57ce..748f5493c 100644 --- a/newlib/README +++ b/newlib/README @@ -1,11 +1,11 @@ - README for newlib-3.0.0 release + README for newlib-3.2.0 release (mostly cribbed from the README in the gdb-4.13 release) This is `newlib', a simple ANSI C library, math library, and collection of board support packages. -Prior to the 3.0.0 release, newlib supported both ANSI and K&R-style -compilers. As of 3.0.0, K&R is no longer supported. +Prior to the 3.2.0 release, newlib supported both ANSI and K&R-style +compilers. As of 3.2.0, K&R is no longer supported. The newlib and libgloss subdirectories are a collection of software from several sources, each with their own copyright and license. See the file @@ -20,8 +20,8 @@ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Unpacking and Installation -- quick overview ========================== -When you unpack the newlib-3.0.0.tar.gz file, you'll find a directory -called `newlib-3.0.0', which contains: +When you unpack the newlib-3.2.0.tar.gz file, you'll find a directory +called `newlib-3.2.0', which contains: COPYING config/ install-sh* mpw-configure COPYING.LIB config-ml.in libgloss/ mpw-install @@ -97,13 +97,13 @@ directory. If the path to `configure' would be the same as the argument to `--srcdir', you can leave out the `--srcdir' option; it will be assumed.) - For example, with version 3.0.0, you can build NEWLIB in a separate + For example, with version 3.2.0, you can build NEWLIB in a separate directory for a Sun 4 cross m68k-aout environment like this: - cd newlib-3.0.0 + cd newlib-3.2.0 mkdir ../newlib-m68k-aout cd ../newlib-m68k-aout - ../newlib-3.0.0/configure --host=sun4 --target=m68k-aout + ../newlib-3.2.0/configure --host=sun4 --target=m68k-aout make When `configure' builds a configuration using a remote source @@ -119,8 +119,8 @@ called `configure' (or one of its subdirectories). The `Makefile' that `configure' generates in each source directory also runs recursively. If you type `make' in a source directory such -as `newlib-3.0.0' (or in a separate configured directory configured with -`--srcdir=PATH/newlib-3.0.0'), you will build all the required libraries. +as `newlib-3.2.0' (or in a separate configured directory configured with +`--srcdir=PATH/newlib-3.2.0'), you will build all the required libraries. When you have multiple hosts or targets configured in separate directories, you can run `make' on them in parallel (for example, if @@ -604,7 +604,7 @@ Reporting Bugs The correct address for reporting bugs found in NEWLIB is "newlib@sourceware.org". Please email all bug reports to that -address. Please include the NEWLIB version number (e.g., newlib-3.0.0), +address. Please include the NEWLIB version number (e.g., newlib-3.2.0), and how you configured it (e.g., "sun4 host and m68k-aout target"). Since NEWLIB supports many different configurations, it is important that you be precise about this. diff --git a/newlib/acinclude.m4 b/newlib/acinclude.m4 index ed5944648..650ac8b89 100644 --- a/newlib/acinclude.m4 +++ b/newlib/acinclude.m4 @@ -2,7 +2,7 @@ dnl This provides configure definitions used by all the newlib dnl configure.in files. AC_DEFUN([DEF_NEWLIB_MAJOR_VERSION],m4_define([NEWLIB_MAJOR_VERSION],[3])) -AC_DEFUN([DEF_NEWLIB_MINOR_VERSION],m4_define([NEWLIB_MINOR_VERSION],[1])) +AC_DEFUN([DEF_NEWLIB_MINOR_VERSION],m4_define([NEWLIB_MINOR_VERSION],[2])) AC_DEFUN([DEF_NEWLIB_PATCHLEVEL_VERSION],m4_define([NEWLIB_PATCHLEVEL_VERSION],[0])) AC_DEFUN([DEF_NEWLIB_VERSION],m4_define([NEWLIB_VERSION],[NEWLIB_MAJOR_VERSION.NEWLIB_MINOR_VERSION.NEWLIB_PATCHLEVEL_VERSION])) diff --git a/newlib/configure b/newlib/configure index 55c664206..108fc4e1b 100755 --- a/newlib/configure +++ b/newlib/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1380,7 +1380,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1450,7 +1450,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1586,7 +1586,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1864,7 +1864,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -3235,7 +3235,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -12444,13 +12444,13 @@ _ACEOF fi -$as_echo "#define _NEWLIB_VERSION \"3.1.0\"" >>confdefs.h +$as_echo "#define _NEWLIB_VERSION \"3.2.0\"" >>confdefs.h $as_echo "#define __NEWLIB__ 3" >>confdefs.h -$as_echo "#define __NEWLIB_MINOR__ 1" >>confdefs.h +$as_echo "#define __NEWLIB_MINOR__ 2" >>confdefs.h $as_echo "#define __NEWLIB_PATCHLEVEL__ 0" >>confdefs.h @@ -13383,7 +13383,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13449,7 +13449,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/doc/configure b/newlib/doc/configure index dbd706d7e..838f4c482 100755 --- a/newlib/doc/configure +++ b/newlib/doc/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1242,7 +1242,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1312,7 +1312,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1404,7 +1404,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1459,7 +1459,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2543,7 +2543,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4063,7 +4063,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4120,7 +4120,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/iconvdata/configure b/newlib/iconvdata/configure index cfac61373..eb3998dea 100755 --- a/newlib/iconvdata/configure +++ b/newlib/iconvdata/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1323,7 +1323,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1393,7 +1393,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1505,7 +1505,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1783,7 +1783,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2867,7 +2867,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -12396,7 +12396,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12453,7 +12453,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/configure b/newlib/libc/configure index 0dc213e86..c64165e29 100755 --- a/newlib/libc/configure +++ b/newlib/libc/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1371,7 +1371,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1441,7 +1441,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1557,7 +1557,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1835,7 +1835,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2982,7 +2982,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -12795,7 +12795,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12852,7 +12852,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/a29k/configure b/newlib/libc/machine/a29k/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libc/machine/a29k/configure +++ b/newlib/libc/machine/a29k/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/aarch64/configure b/newlib/libc/machine/aarch64/configure index 35078c605..a3b88723c 100755 --- a/newlib/libc/machine/aarch64/configure +++ b/newlib/libc/machine/aarch64/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/amdgcn/configure b/newlib/libc/machine/amdgcn/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libc/machine/amdgcn/configure +++ b/newlib/libc/machine/amdgcn/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/arc/configure b/newlib/libc/machine/arc/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libc/machine/arc/configure +++ b/newlib/libc/machine/arc/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/arm/configure b/newlib/libc/machine/arm/configure index e09e452da..69cbccd09 100755 --- a/newlib/libc/machine/arm/configure +++ b/newlib/libc/machine/arm/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1241,7 +1241,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1311,7 +1311,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1403,7 +1403,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1458,7 +1458,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2542,7 +2542,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4028,7 +4028,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4085,7 +4085,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/bfin/configure b/newlib/libc/machine/bfin/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libc/machine/bfin/configure +++ b/newlib/libc/machine/bfin/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/configure b/newlib/libc/machine/configure index 51963a8d8..1ae827816 100755 --- a/newlib/libc/machine/configure +++ b/newlib/libc/machine/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1384,7 +1384,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1454,7 +1454,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1566,7 +1566,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1844,7 +1844,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2928,7 +2928,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -12593,7 +12593,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12650,7 +12650,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/cr16/configure b/newlib/libc/machine/cr16/configure index 24feba10f..7c9724c54 100644 --- a/newlib/libc/machine/cr16/configure +++ b/newlib/libc/machine/cr16/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/cris/configure b/newlib/libc/machine/cris/configure index 714396acf..33b232b86 100755 --- a/newlib/libc/machine/cris/configure +++ b/newlib/libc/machine/cris/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/crx/configure b/newlib/libc/machine/crx/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libc/machine/crx/configure +++ b/newlib/libc/machine/crx/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/d10v/configure b/newlib/libc/machine/d10v/configure index 35078c605..a3b88723c 100755 --- a/newlib/libc/machine/d10v/configure +++ b/newlib/libc/machine/d10v/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/d30v/configure b/newlib/libc/machine/d30v/configure index 35078c605..a3b88723c 100755 --- a/newlib/libc/machine/d30v/configure +++ b/newlib/libc/machine/d30v/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/epiphany/configure b/newlib/libc/machine/epiphany/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libc/machine/epiphany/configure +++ b/newlib/libc/machine/epiphany/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/fr30/configure b/newlib/libc/machine/fr30/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libc/machine/fr30/configure +++ b/newlib/libc/machine/fr30/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/frv/configure b/newlib/libc/machine/frv/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libc/machine/frv/configure +++ b/newlib/libc/machine/frv/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/ft32/configure b/newlib/libc/machine/ft32/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libc/machine/ft32/configure +++ b/newlib/libc/machine/ft32/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/h8300/configure b/newlib/libc/machine/h8300/configure index 23fa94a9e..8cb8966a4 100755 --- a/newlib/libc/machine/h8300/configure +++ b/newlib/libc/machine/h8300/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/h8500/configure b/newlib/libc/machine/h8500/configure index 7106b2aca..4c746e1d4 100755 --- a/newlib/libc/machine/h8500/configure +++ b/newlib/libc/machine/h8500/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/hppa/configure b/newlib/libc/machine/hppa/configure index aea4a2920..858819676 100755 --- a/newlib/libc/machine/hppa/configure +++ b/newlib/libc/machine/hppa/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/i386/configure b/newlib/libc/machine/i386/configure index 34a14f79e..1b1b48a63 100755 --- a/newlib/libc/machine/i386/configure +++ b/newlib/libc/machine/i386/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1325,7 +1325,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1395,7 +1395,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1507,7 +1507,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1785,7 +1785,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2869,7 +2869,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -12411,7 +12411,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12468,7 +12468,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/i960/configure b/newlib/libc/machine/i960/configure index 6bbe3d5c8..dce3c4cc3 100755 --- a/newlib/libc/machine/i960/configure +++ b/newlib/libc/machine/i960/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/iq2000/configure b/newlib/libc/machine/iq2000/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libc/machine/iq2000/configure +++ b/newlib/libc/machine/iq2000/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/lm32/configure b/newlib/libc/machine/lm32/configure index 35078c605..a3b88723c 100755 --- a/newlib/libc/machine/lm32/configure +++ b/newlib/libc/machine/lm32/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/m32c/configure b/newlib/libc/machine/m32c/configure index 35078c605..a3b88723c 100755 --- a/newlib/libc/machine/m32c/configure +++ b/newlib/libc/machine/m32c/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/m32r/configure b/newlib/libc/machine/m32r/configure index 35078c605..a3b88723c 100755 --- a/newlib/libc/machine/m32r/configure +++ b/newlib/libc/machine/m32r/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/m68hc11/configure b/newlib/libc/machine/m68hc11/configure index 35078c605..a3b88723c 100755 --- a/newlib/libc/machine/m68hc11/configure +++ b/newlib/libc/machine/m68hc11/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/m68k/configure b/newlib/libc/machine/m68k/configure index 35078c605..a3b88723c 100755 --- a/newlib/libc/machine/m68k/configure +++ b/newlib/libc/machine/m68k/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/m88k/configure b/newlib/libc/machine/m88k/configure index 35078c605..a3b88723c 100755 --- a/newlib/libc/machine/m88k/configure +++ b/newlib/libc/machine/m88k/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/mep/configure b/newlib/libc/machine/mep/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libc/machine/mep/configure +++ b/newlib/libc/machine/mep/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/microblaze/configure b/newlib/libc/machine/microblaze/configure index 0968417d5..f7c7ce211 100644 --- a/newlib/libc/machine/microblaze/configure +++ b/newlib/libc/machine/microblaze/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/mips/configure b/newlib/libc/machine/mips/configure index 35078c605..a3b88723c 100755 --- a/newlib/libc/machine/mips/configure +++ b/newlib/libc/machine/mips/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/mn10200/configure b/newlib/libc/machine/mn10200/configure index 35078c605..a3b88723c 100755 --- a/newlib/libc/machine/mn10200/configure +++ b/newlib/libc/machine/mn10200/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/mn10300/configure b/newlib/libc/machine/mn10300/configure index aea4a2920..858819676 100755 --- a/newlib/libc/machine/mn10300/configure +++ b/newlib/libc/machine/mn10300/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/moxie/configure b/newlib/libc/machine/moxie/configure index 24feba10f..7c9724c54 100644 --- a/newlib/libc/machine/moxie/configure +++ b/newlib/libc/machine/moxie/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/msp430/configure b/newlib/libc/machine/msp430/configure index 9d5cd33a6..d2c0de64e 100755 --- a/newlib/libc/machine/msp430/configure +++ b/newlib/libc/machine/msp430/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1243,7 +1243,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1313,7 +1313,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1406,7 +1406,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1461,7 +1461,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2565,7 +2565,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4053,7 +4053,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4110,7 +4110,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/mt/configure b/newlib/libc/machine/mt/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libc/machine/mt/configure +++ b/newlib/libc/machine/mt/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/nds32/configure b/newlib/libc/machine/nds32/configure index 67aec061c..c295e1ecf 100755 --- a/newlib/libc/machine/nds32/configure +++ b/newlib/libc/machine/nds32/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1254,7 +1254,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1324,7 +1324,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1423,7 +1423,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1478,7 +1478,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2562,7 +2562,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -5087,7 +5087,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5144,7 +5144,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/necv70/configure b/newlib/libc/machine/necv70/configure index 70be4266b..a9cb3e7cf 100755 --- a/newlib/libc/machine/necv70/configure +++ b/newlib/libc/machine/necv70/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/nios2/configure b/newlib/libc/machine/nios2/configure index e6fb5c02f..a80f5e6ce 100755 --- a/newlib/libc/machine/nios2/configure +++ b/newlib/libc/machine/nios2/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/nvptx/configure b/newlib/libc/machine/nvptx/configure index 24feba10f..7c9724c54 100644 --- a/newlib/libc/machine/nvptx/configure +++ b/newlib/libc/machine/nvptx/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/or1k/configure b/newlib/libc/machine/or1k/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libc/machine/or1k/configure +++ b/newlib/libc/machine/or1k/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/powerpc/configure b/newlib/libc/machine/powerpc/configure index d9185ea1e..38ca6a9c5 100755 --- a/newlib/libc/machine/powerpc/configure +++ b/newlib/libc/machine/powerpc/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1241,7 +1241,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1311,7 +1311,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1403,7 +1403,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1458,7 +1458,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2542,7 +2542,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4037,7 +4037,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4094,7 +4094,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/pru/configure b/newlib/libc/machine/pru/configure index e6fb5c02f..a80f5e6ce 100755 --- a/newlib/libc/machine/pru/configure +++ b/newlib/libc/machine/pru/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/riscv/configure b/newlib/libc/machine/riscv/configure index 3b9f2df40..dbbd82c88 100755 --- a/newlib/libc/machine/riscv/configure +++ b/newlib/libc/machine/riscv/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/rl78/configure b/newlib/libc/machine/rl78/configure index 35078c605..a3b88723c 100755 --- a/newlib/libc/machine/rl78/configure +++ b/newlib/libc/machine/rl78/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/rx/configure b/newlib/libc/machine/rx/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libc/machine/rx/configure +++ b/newlib/libc/machine/rx/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/sh/configure b/newlib/libc/machine/sh/configure index 7722e18cd..233bea7e7 100755 --- a/newlib/libc/machine/sh/configure +++ b/newlib/libc/machine/sh/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -557,8 +557,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1259,7 +1259,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1329,7 +1329,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1429,7 +1429,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1521,7 +1521,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2607,7 +2607,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -5394,7 +5394,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5451,7 +5451,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/sparc/configure b/newlib/libc/machine/sparc/configure index 466049551..0793a40ff 100755 --- a/newlib/libc/machine/sparc/configure +++ b/newlib/libc/machine/sparc/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/spu/configure b/newlib/libc/machine/spu/configure index 906f1773e..e3ed55b0e 100644 --- a/newlib/libc/machine/spu/configure +++ b/newlib/libc/machine/spu/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1242,7 +1242,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1312,7 +1312,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1404,7 +1404,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1459,7 +1459,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2543,7 +2543,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4059,7 +4059,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4116,7 +4116,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/tic4x/configure b/newlib/libc/machine/tic4x/configure index 35078c605..a3b88723c 100755 --- a/newlib/libc/machine/tic4x/configure +++ b/newlib/libc/machine/tic4x/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/tic6x/configure b/newlib/libc/machine/tic6x/configure index 35078c605..a3b88723c 100755 --- a/newlib/libc/machine/tic6x/configure +++ b/newlib/libc/machine/tic6x/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/tic80/configure b/newlib/libc/machine/tic80/configure index 35078c605..a3b88723c 100755 --- a/newlib/libc/machine/tic80/configure +++ b/newlib/libc/machine/tic80/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/v850/configure b/newlib/libc/machine/v850/configure index 35078c605..a3b88723c 100755 --- a/newlib/libc/machine/v850/configure +++ b/newlib/libc/machine/v850/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/visium/configure b/newlib/libc/machine/visium/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libc/machine/visium/configure +++ b/newlib/libc/machine/visium/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/w65/configure b/newlib/libc/machine/w65/configure index 7106b2aca..4c746e1d4 100755 --- a/newlib/libc/machine/w65/configure +++ b/newlib/libc/machine/w65/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/x86_64/configure b/newlib/libc/machine/x86_64/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libc/machine/x86_64/configure +++ b/newlib/libc/machine/x86_64/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/xc16x/configure b/newlib/libc/machine/xc16x/configure index 35078c605..a3b88723c 100644 --- a/newlib/libc/machine/xc16x/configure +++ b/newlib/libc/machine/xc16x/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/xscale/configure b/newlib/libc/machine/xscale/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libc/machine/xscale/configure +++ b/newlib/libc/machine/xscale/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/xstormy16/configure b/newlib/libc/machine/xstormy16/configure index 35078c605..a3b88723c 100755 --- a/newlib/libc/machine/xstormy16/configure +++ b/newlib/libc/machine/xstormy16/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/z8k/configure b/newlib/libc/machine/z8k/configure index 18f4c511b..4b4824887 100755 --- a/newlib/libc/machine/z8k/configure +++ b/newlib/libc/machine/z8k/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/a29khif/configure b/newlib/libc/sys/a29khif/configure index 9d5027e32..0aff8de51 100755 --- a/newlib/libc/sys/a29khif/configure +++ b/newlib/libc/sys/a29khif/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/amdgcn/configure b/newlib/libc/sys/amdgcn/configure index f3de7073d..21ce09f98 100755 --- a/newlib/libc/sys/amdgcn/configure +++ b/newlib/libc/sys/amdgcn/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/arm/configure b/newlib/libc/sys/arm/configure index 3fb1e9af1..6ed794a5b 100755 --- a/newlib/libc/sys/arm/configure +++ b/newlib/libc/sys/arm/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/configure b/newlib/libc/sys/configure index 153dd25b2..622ca9c2c 100755 --- a/newlib/libc/sys/configure +++ b/newlib/libc/sys/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1355,7 +1355,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1425,7 +1425,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1537,7 +1537,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1815,7 +1815,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2899,7 +2899,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -12510,7 +12510,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12567,7 +12567,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/d10v/configure b/newlib/libc/sys/d10v/configure index cf83e91e0..26eb44cc5 100755 --- a/newlib/libc/sys/d10v/configure +++ b/newlib/libc/sys/d10v/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/decstation/configure b/newlib/libc/sys/decstation/configure index eb614d13a..6f8e735b4 100755 --- a/newlib/libc/sys/decstation/configure +++ b/newlib/libc/sys/decstation/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/epiphany/configure b/newlib/libc/sys/epiphany/configure index a01e71f44..eb675efc7 100755 --- a/newlib/libc/sys/epiphany/configure +++ b/newlib/libc/sys/epiphany/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/h8300hms/configure b/newlib/libc/sys/h8300hms/configure index f984fc57e..43b5fee94 100755 --- a/newlib/libc/sys/h8300hms/configure +++ b/newlib/libc/sys/h8300hms/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/h8500hms/configure b/newlib/libc/sys/h8500hms/configure index 8aa1c5356..c7a27ecd1 100755 --- a/newlib/libc/sys/h8500hms/configure +++ b/newlib/libc/sys/h8500hms/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/linux/configure b/newlib/libc/sys/linux/configure index 2ac723028..d99fac137 100755 --- a/newlib/libc/sys/linux/configure +++ b/newlib/libc/sys/linux/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1329,7 +1329,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1399,7 +1399,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1511,7 +1511,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1789,7 +1789,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2873,7 +2873,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -12477,7 +12477,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12534,7 +12534,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/linux/linuxthreads/configure b/newlib/libc/sys/linux/linuxthreads/configure index ca62ff10e..429614bd7 100755 --- a/newlib/libc/sys/linux/linuxthreads/configure +++ b/newlib/libc/sys/linux/linuxthreads/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1327,7 +1327,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1397,7 +1397,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1509,7 +1509,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1787,7 +1787,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2871,7 +2871,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -12454,7 +12454,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12511,7 +12511,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/linux/linuxthreads/machine/configure b/newlib/libc/sys/linux/linuxthreads/machine/configure index dea024c08..718580393 100755 --- a/newlib/libc/sys/linux/linuxthreads/machine/configure +++ b/newlib/libc/sys/linux/linuxthreads/machine/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1327,7 +1327,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1397,7 +1397,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1509,7 +1509,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1787,7 +1787,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2871,7 +2871,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -12422,7 +12422,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12479,7 +12479,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/configure b/newlib/libc/sys/linux/linuxthreads/machine/i386/configure index 35a8c8118..d6d6abee6 100755 --- a/newlib/libc/sys/linux/linuxthreads/machine/i386/configure +++ b/newlib/libc/sys/linux/linuxthreads/machine/i386/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1323,7 +1323,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1393,7 +1393,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1505,7 +1505,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1783,7 +1783,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2867,7 +2867,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -12438,7 +12438,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12495,7 +12495,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/linux/machine/configure b/newlib/libc/sys/linux/machine/configure index 359b7a33a..9e01b9221 100755 --- a/newlib/libc/sys/linux/machine/configure +++ b/newlib/libc/sys/linux/machine/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1328,7 +1328,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1398,7 +1398,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1510,7 +1510,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1788,7 +1788,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2872,7 +2872,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -12429,7 +12429,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12486,7 +12486,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/linux/machine/i386/configure b/newlib/libc/sys/linux/machine/i386/configure index 48ebb68a0..c68286471 100755 --- a/newlib/libc/sys/linux/machine/i386/configure +++ b/newlib/libc/sys/linux/machine/i386/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1323,7 +1323,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1393,7 +1393,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1505,7 +1505,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1783,7 +1783,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2867,7 +2867,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -12438,7 +12438,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12495,7 +12495,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/m88kbug/configure b/newlib/libc/sys/m88kbug/configure index 35d89395b..7e8bf568f 100755 --- a/newlib/libc/sys/m88kbug/configure +++ b/newlib/libc/sys/m88kbug/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/mmixware/configure b/newlib/libc/sys/mmixware/configure index 86caf6e57..2bae9dc3d 100755 --- a/newlib/libc/sys/mmixware/configure +++ b/newlib/libc/sys/mmixware/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/netware/configure b/newlib/libc/sys/netware/configure index c299e44a2..fdcc8ee21 100755 --- a/newlib/libc/sys/netware/configure +++ b/newlib/libc/sys/netware/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/or1k/configure b/newlib/libc/sys/or1k/configure index 8d854f9b7..fc992aa41 100755 --- a/newlib/libc/sys/or1k/configure +++ b/newlib/libc/sys/or1k/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/phoenix/configure b/newlib/libc/sys/phoenix/configure index 55a2e8bea..a3172c39c 100644 --- a/newlib/libc/sys/phoenix/configure +++ b/newlib/libc/sys/phoenix/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1243,7 +1243,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1313,7 +1313,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1405,7 +1405,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1460,7 +1460,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2544,7 +2544,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4036,7 +4036,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4093,7 +4093,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/rdos/configure b/newlib/libc/sys/rdos/configure index f3de7073d..21ce09f98 100755 --- a/newlib/libc/sys/rdos/configure +++ b/newlib/libc/sys/rdos/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/rtems/configure b/newlib/libc/sys/rtems/configure index 8142f78bc..b324bc5b3 100755 --- a/newlib/libc/sys/rtems/configure +++ b/newlib/libc/sys/rtems/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/sh/configure b/newlib/libc/sys/sh/configure index cf83e91e0..26eb44cc5 100755 --- a/newlib/libc/sys/sh/configure +++ b/newlib/libc/sys/sh/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/sparc64/configure b/newlib/libc/sys/sparc64/configure index 52751ecde..1c166c02c 100755 --- a/newlib/libc/sys/sparc64/configure +++ b/newlib/libc/sys/sparc64/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/sun4/configure b/newlib/libc/sys/sun4/configure index 093c968c2..2b170362a 100755 --- a/newlib/libc/sys/sun4/configure +++ b/newlib/libc/sys/sun4/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/sysmec/configure b/newlib/libc/sys/sysmec/configure index f984fc57e..43b5fee94 100755 --- a/newlib/libc/sys/sysmec/configure +++ b/newlib/libc/sys/sysmec/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/sysnec810/configure b/newlib/libc/sys/sysnec810/configure index a64780588..bf82100e6 100755 --- a/newlib/libc/sys/sysnec810/configure +++ b/newlib/libc/sys/sysnec810/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/sysnecv850/configure b/newlib/libc/sys/sysnecv850/configure index f984fc57e..43b5fee94 100755 --- a/newlib/libc/sys/sysnecv850/configure +++ b/newlib/libc/sys/sysnecv850/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/sysvi386/configure b/newlib/libc/sys/sysvi386/configure index c5d532e87..e42e6a337 100755 --- a/newlib/libc/sys/sysvi386/configure +++ b/newlib/libc/sys/sysvi386/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/sysvnecv70/configure b/newlib/libc/sys/sysvnecv70/configure index 10614e9fa..648354a2c 100755 --- a/newlib/libc/sys/sysvnecv70/configure +++ b/newlib/libc/sys/sysvnecv70/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/tic80/configure b/newlib/libc/sys/tic80/configure index 86caf6e57..2bae9dc3d 100755 --- a/newlib/libc/sys/tic80/configure +++ b/newlib/libc/sys/tic80/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/tirtos/configure b/newlib/libc/sys/tirtos/configure index ef219e061..1761d4230 100755 --- a/newlib/libc/sys/tirtos/configure +++ b/newlib/libc/sys/tirtos/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/w65/configure b/newlib/libc/sys/w65/configure index 110ee4624..aed6d3ce9 100755 --- a/newlib/libc/sys/w65/configure +++ b/newlib/libc/sys/w65/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/z8ksim/configure b/newlib/libc/sys/z8ksim/configure index 64ea62907..69fd8f6f6 100755 --- a/newlib/libc/sys/z8ksim/configure +++ b/newlib/libc/sys/z8ksim/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/configure b/newlib/libm/configure index 309a6683f..297ed5ea6 100755 --- a/newlib/libm/configure +++ b/newlib/libm/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1331,7 +1331,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1401,7 +1401,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1514,7 +1514,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1792,7 +1792,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2931,7 +2931,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -12484,7 +12484,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12541,7 +12541,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/machine/aarch64/configure b/newlib/libm/machine/aarch64/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libm/machine/aarch64/configure +++ b/newlib/libm/machine/aarch64/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/machine/arm/configure b/newlib/libm/machine/arm/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libm/machine/arm/configure +++ b/newlib/libm/machine/arm/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/machine/configure b/newlib/libm/machine/configure index 81553d408..bd7037587 100755 --- a/newlib/libm/machine/configure +++ b/newlib/libm/machine/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1335,7 +1335,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1405,7 +1405,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1517,7 +1517,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1795,7 +1795,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2879,7 +2879,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -12453,7 +12453,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12510,7 +12510,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/machine/i386/configure b/newlib/libm/machine/i386/configure index f2625be55..309398980 100755 --- a/newlib/libm/machine/i386/configure +++ b/newlib/libm/machine/i386/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1323,7 +1323,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1393,7 +1393,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1505,7 +1505,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1783,7 +1783,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2867,7 +2867,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -12396,7 +12396,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12453,7 +12453,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/machine/nds32/configure b/newlib/libm/machine/nds32/configure index a63428eb5..fc31f3da7 100644 --- a/newlib/libm/machine/nds32/configure +++ b/newlib/libm/machine/nds32/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1256,7 +1256,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1326,7 +1326,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1425,7 +1425,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1480,7 +1480,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2564,7 +2564,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -5122,7 +5122,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5179,7 +5179,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/machine/pru/configure b/newlib/libm/machine/pru/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libm/machine/pru/configure +++ b/newlib/libm/machine/pru/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/machine/riscv/configure b/newlib/libm/machine/riscv/configure index 24feba10f..7c9724c54 100755 --- a/newlib/libm/machine/riscv/configure +++ b/newlib/libm/machine/riscv/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/machine/spu/configure b/newlib/libm/machine/spu/configure index 24feba10f..7c9724c54 100644 --- a/newlib/libm/machine/spu/configure +++ b/newlib/libm/machine/spu/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/machine/x86_64/configure b/newlib/libm/machine/x86_64/configure index 2872be24f..87fda5795 100755 --- a/newlib/libm/machine/x86_64/configure +++ b/newlib/libm/machine/x86_64/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.1.0. +# Generated by GNU Autoconf 2.68 for newlib 3.2.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.1.0' -PACKAGE_STRING='newlib 3.1.0' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='newlib 3.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1323,7 +1323,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.1.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1393,7 +1393,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.1.0:";; + short | recursive ) echo "Configuration of newlib 3.2.0:";; esac cat <<\_ACEOF @@ -1505,7 +1505,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.1.0 +newlib configure 3.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1783,7 +1783,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.1.0, which was +It was created by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2867,7 +2867,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.1.0' + VERSION='3.2.0' # Some tools Automake needs. @@ -12396,7 +12396,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.1.0, which was +This file was extended by newlib $as_me 3.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12453,7 +12453,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.1.0 +newlib config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" From 1fdf871c9d32fdf4c4aca31be8d40bef5747eaae Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 9 Jan 2020 15:18:14 -0500 Subject: [PATCH 133/520] Prevent more NULL ptr accesses due to Balloc out of memory - fix gdtoa-gethex.c, ldtoa.c, and strtodg.c to use eBalloc --- newlib/libc/stdlib/gdtoa-gethex.c | 4 ++-- newlib/libc/stdlib/ldtoa.c | 2 +- newlib/libc/stdlib/strtodg.c | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/newlib/libc/stdlib/gdtoa-gethex.c b/newlib/libc/stdlib/gdtoa-gethex.c index e0c2fff5e..1d3da2889 100644 --- a/newlib/libc/stdlib/gdtoa-gethex.c +++ b/newlib/libc/stdlib/gdtoa-gethex.c @@ -129,7 +129,7 @@ increment (struct _reent *ptr, #endif { if (b->_wds >= b->_maxwds) { - b1 = Balloc(ptr, b->_k+1); + b1 = eBalloc(ptr, b->_k+1); Bcopy(b1, b); Bfree(ptr, b); b = b1; @@ -219,7 +219,7 @@ gethex (struct _reent *ptr, const char **sp, const FPI *fpi, n = s1 - s0 - 1; for(k = 0; n > 7; n >>= 1) k++; - b = Balloc(ptr, k); + b = eBalloc(ptr, k); x = b->_x; n = 0; L = 0; diff --git a/newlib/libc/stdlib/ldtoa.c b/newlib/libc/stdlib/ldtoa.c index 751386233..1cc97151a 100644 --- a/newlib/libc/stdlib/ldtoa.c +++ b/newlib/libc/stdlib/ldtoa.c @@ -2923,7 +2923,7 @@ stripspaces: for (_REENT_MP_RESULT_K (ptr) = 0; sizeof (_Bigint) - sizeof (__ULong) + j <= i; j <<= 1) _REENT_MP_RESULT_K (ptr)++; - _REENT_MP_RESULT (ptr) = Balloc (ptr, _REENT_MP_RESULT_K (ptr)); + _REENT_MP_RESULT (ptr) = eBalloc (ptr, _REENT_MP_RESULT_K (ptr)); /* Copy from internal temporary buffer to permanent buffer. */ outstr = (char *) _REENT_MP_RESULT (ptr); diff --git a/newlib/libc/stdlib/strtodg.c b/newlib/libc/stdlib/strtodg.c index 743f60be5..0b5af99fe 100644 --- a/newlib/libc/stdlib/strtodg.c +++ b/newlib/libc/stdlib/strtodg.c @@ -63,7 +63,7 @@ sum (struct _reent *p, _Bigint *a, _Bigint *b) if (a->_wds < b->_wds) { c = b; b = a; a = c; } - c = Balloc(p, a->_k); + c = eBalloc(p, a->_k); c->_wds = a->_wds; carry = 0; xa = a->_x; @@ -103,7 +103,7 @@ sum (struct _reent *p, _Bigint *a, _Bigint *b) #endif if (carry) { if (c->_wds == c->_maxwds) { - b = Balloc(p, c->_k + 1); + b = eBalloc(p, c->_k + 1); Bcopy(b, c); Bfree(p, c); c = b; @@ -190,7 +190,7 @@ increment (struct _reent *p, _Bigint *b) #endif { if (b->_wds >= b->_maxwds) { - b1 = Balloc(p,b->_k+1); + b1 = eBalloc(p,b->_k+1); Bcopy(b1,b); Bfree(p,b); b = b1; @@ -253,7 +253,7 @@ set_ones (struct _reent *p, _Bigint *b, int n) k = (n + ((1 << kshift) - 1)) >> kshift; if (b->_k < k) { Bfree(p,b); - b = Balloc(p,k); + b = eBalloc(p,k); } k = n >> kshift; if (n &= kmask) @@ -792,9 +792,9 @@ _strtodg_l (struct _reent *p, const char *s00, char **se, FPI *fpi, Long *exp, bd0 = s2b(p, s0, nd0, nd, y); for(;;) { - bd = Balloc(p,bd0->_k); + bd = eBalloc(p,bd0->_k); Bcopy(bd, bd0); - bb = Balloc(p,rvb->_k); + bb = eBalloc(p,rvb->_k); Bcopy(bb, rvb); bbbits = rvbits - bb0; bbe = rve + bb0; From 7b6414d459bb66affe077a062b88ca1e1e392fc4 Mon Sep 17 00:00:00 2001 From: Mark Geisert Date: Sun, 22 Dec 2019 22:45:54 -0800 Subject: [PATCH 134/520] Cygwin: Add missing Linux #define of CPU_SETSIZE Though our implementation of cpu sets doesn't need it, software from Linux environments expects this definition to be present. It's documented on the Linux CPU_SET(3) man page but was left out due to oversight. Addresses https://cygwin.com/ml/cygwin/2019-12/msg00248.html --- winsup/cygwin/include/sys/cpuset.h | 1 + winsup/cygwin/release/3.1.3 | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 winsup/cygwin/release/3.1.3 diff --git a/winsup/cygwin/include/sys/cpuset.h b/winsup/cygwin/include/sys/cpuset.h index 1adf48d54..572565165 100644 --- a/winsup/cygwin/include/sys/cpuset.h +++ b/winsup/cygwin/include/sys/cpuset.h @@ -89,6 +89,7 @@ int __sched_getaffinity_sys (pid_t, size_t, cpu_set_t *); #define CPU_XOR(dst, src1, src2) CPU_XOR_S(sizeof (cpu_set_t), dst, src1, src2) #define CPU_EQUAL(src1, src2) CPU_EQUAL_S(sizeof (cpu_set_t), src1, src2) +#define CPU_SETSIZE __CPU_SETSIZE #endif /* __GNU_VISIBLE */ #ifdef __cplusplus diff --git a/winsup/cygwin/release/3.1.3 b/winsup/cygwin/release/3.1.3 new file mode 100644 index 000000000..d698b444d --- /dev/null +++ b/winsup/cygwin/release/3.1.3 @@ -0,0 +1,5 @@ +Bug Fixes +--------- + +- Define CPU_SETSIZE, as on Linux. + Addresses: https://cygwin.com/ml/cygwin/2019-12/msg00248.html From 4ddf5903fd24feaa6f75ffb12f9cafdd266b386a Mon Sep 17 00:00:00 2001 From: Arseniy Lartsev Date: Tue, 7 Jan 2020 16:34:39 +0100 Subject: [PATCH 135/520] Fixed crash on wine by adding NULL check after memchr This is not a joke, there are vendors out there who build software for cygwin only. Besides, this NULL check is good to have anyway. --- winsup/cygwin/path.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index b5efd61b2..c8e73c64c 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -4307,6 +4307,8 @@ find_fast_cwd_pointer () const uint8_t *use_cwd = rcall + 5 + offset; /* Find first `push %edi' instruction. */ const uint8_t *pushedi = (const uint8_t *) memchr (use_cwd, 0x57, 32); + if (!pushedi) + return NULL; /* ...which should be followed by `mov crit-sect-addr,%edi' then `push %edi', or by just a single `push crit-sect-addr'. */ const uint8_t *movedi = pushedi + 1; From fd03749b9c255d6f78d71c65fb4f49d8f766a629 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 1 Jan 2020 15:49:41 +0900 Subject: [PATCH 136/520] Cygwin: pty: Remove destructor for fhandler_pty_master class. - The destructor for fhandler_pty_master class does not seem to be necessary anymore. Therefore, it has been removed. --- winsup/cygwin/fhandler.h | 1 - winsup/cygwin/fhandler_tty.cc | 9 --------- 2 files changed, 10 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 3954c37d1..4a71c1628 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -2218,7 +2218,6 @@ public: HANDLE get_echo_handle () const { return echo_r; } /* Constructor */ fhandler_pty_master (int); - ~fhandler_pty_master (); DWORD pty_master_thread (); DWORD pty_master_fwd_thread (); diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index f10f0fc61..a235ea708 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -2126,15 +2126,6 @@ fhandler_pty_master::fhandler_pty_master (int unit) set_name ("/dev/ptmx"); } -fhandler_pty_master::~fhandler_pty_master () -{ - /* Without this wait, helper process for pseudo console - sometimes remains running after the pty session is - closed. The reason is not clear. */ - if (to_master && from_master) - Sleep (20); -} - int fhandler_pty_master::open (int flags, mode_t) { From b3e78186d107c3cf6cabad4fc18ee829f2b279f4 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 1 Jan 2020 15:50:36 +0900 Subject: [PATCH 137/520] Cygwin: pty: Revise the code for setting code page of pseudo console. - Fix the problem which overrides the code page setting, reported in https://www.cygwin.com/ml/cygwin/2019-12/msg00292.html. --- winsup/cygwin/fhandler_tty.cc | 52 +++++++++++++++++------------------ winsup/cygwin/release/3.1.3 | 3 ++ 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index a235ea708..0837b63e1 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -2629,39 +2629,36 @@ fhandler_pty_slave::setup_locale (void) if (lcid == 0 || lcid == (LCID) -1) code_page = 20127; /* ASCII */ else if (!GetLocaleInfo (lcid, - LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER, + LOCALE_IDEFAULTCODEPAGE | LOCALE_RETURN_NUMBER, (char *) &code_page, sizeof (code_page))) code_page = 20127; /* ASCII */ SetConsoleCP (code_page); SetConsoleOutputCP (code_page); - if (get_ttyp ()->term_code_page == 0) + /* Set terminal code page from locale */ + /* This code is borrowed from mintty: charset.c */ + get_ttyp ()->term_code_page = 20127; /* Default ASCII */ + char charset_u[ENCODING_LEN + 1] = {0, }; + for (int i=0; charset[i] && iterm_code_page = 20127; /* Default ASCII */ - char charset_u[ENCODING_LEN + 1] = {0, }; - for (int i=0; charset[i] && iterm_code_page = 28590 + iso; - } - else if (sscanf (charset_u, "CP%u", &cp) == 1) - get_ttyp ()->term_code_page = cp; - else - for (int i=0; cs_names[i].cp; i++) - if (strcasecmp (charset_u, cs_names[i].name) == 0) - { - get_ttyp ()->term_code_page = cs_names[i].cp; - break; - } + if (iso && iso <= 16 && iso !=12) + get_ttyp ()->term_code_page = 28590 + iso; } + else if (sscanf (charset_u, "CP%u", &cp) == 1) + get_ttyp ()->term_code_page = cp; + else + for (int i=0; cs_names[i].cp; i++) + if (strcasecmp (charset_u, cs_names[i].name) == 0) + { + get_ttyp ()->term_code_page = cs_names[i].cp; + break; + } } void @@ -2792,7 +2789,8 @@ fhandler_pty_slave::fixup_after_exec () } /* Set locale */ - setup_locale (); + if (get_ttyp ()->term_code_page == 0) + setup_locale (); #if USE_API_HOOK /* Hook Console API */ diff --git a/winsup/cygwin/release/3.1.3 b/winsup/cygwin/release/3.1.3 index d698b444d..0fcdccabb 100644 --- a/winsup/cygwin/release/3.1.3 +++ b/winsup/cygwin/release/3.1.3 @@ -3,3 +3,6 @@ Bug Fixes - Define CPU_SETSIZE, as on Linux. Addresses: https://cygwin.com/ml/cygwin/2019-12/msg00248.html + +- Fix the problem which overrides the code page setting. + Addresses: https://www.cygwin.com/ml/cygwin/2019-12/msg00292.html From a6e87f589ae113cc3f947eca7db8c6d8c795e3c2 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sun, 5 Jan 2020 22:25:55 +0900 Subject: [PATCH 138/520] Cygwin: console: Make suspending process work properly. - After commit f4b47827cf87f055687a0c52a3485d42b3e2b941, suspending process by Ctrl-Z does not work in console and results in hang up. This patch fixes the issue. --- winsup/cygwin/fhandler_console.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index b3095bbe3..b286c6c10 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -850,7 +850,9 @@ fhandler_console::process_input_message (void) if (toadd) { ssize_t ret; + release_input_mutex (); line_edit_status res = line_edit (toadd, nread, *ti, &ret); + acquire_input_mutex (INFINITE); if (res == line_edit_signalled) { stat = input_signalled; From a1c7e920845ab21185f18950be3d84f4312222de Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Mon, 6 Jan 2020 23:38:34 +0900 Subject: [PATCH 139/520] Cygwin: select: Speed up select() call for pty, pipe and fifo. - The slowing down issue of X11 forwarding using ssh -Y, reported in https://www.cygwin.com/ml/cygwin/2019-12/msg00295.html, is due to the change of select() code for pty in the commit 915fcd0ae8d83546ce135131cd25bf6795d97966. cygthread::detach() takes at most about 10msec because Sleep() is used in the thread. For this issue, this patch uses cygwait() instead of Sleep() and introduces an event to abort the wait. For not only pty, but pipe and fifo also have the same problem potentially, so this patch applies same strategy to them as well. --- winsup/cygwin/select.cc | 15 ++++++++++++--- winsup/cygwin/select.h | 1 + 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index e7014422b..b3aedf20f 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -744,7 +744,7 @@ thread_pipe (void *arg) } if (!looping) break; - Sleep (sleep_time >> 3); + cygwait (pi->bye, sleep_time >> 3); if (sleep_time < 80) ++sleep_time; if (pi->stop_thread) @@ -763,6 +763,7 @@ start_thread_pipe (select_record *me, select_stuff *stuff) { pi->start = &stuff->start; pi->stop_thread = false; + pi->bye = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL); pi->thread = new cygthread (thread_pipe, pi, "pipesel"); me->h = *pi->thread; if (!me->h) @@ -780,8 +781,10 @@ pipe_cleanup (select_record *, select_stuff *stuff) if (pi->thread) { pi->stop_thread = true; + SetEvent (pi->bye); pi->thread->detach (); } + CloseHandle (pi->bye); delete pi; stuff->device_specific_pipe = NULL; } @@ -924,7 +927,7 @@ thread_fifo (void *arg) } if (!looping) break; - Sleep (sleep_time >> 3); + cygwait (pi->bye, sleep_time >> 3); if (sleep_time < 80) ++sleep_time; if (pi->stop_thread) @@ -943,6 +946,7 @@ start_thread_fifo (select_record *me, select_stuff *stuff) { pi->start = &stuff->start; pi->stop_thread = false; + pi->bye = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL); pi->thread = new cygthread (thread_fifo, pi, "fifosel"); me->h = *pi->thread; if (!me->h) @@ -960,8 +964,10 @@ fifo_cleanup (select_record *, select_stuff *stuff) if (pi->thread) { pi->stop_thread = true; + SetEvent (pi->bye); pi->thread->detach (); } + CloseHandle (pi->bye); delete pi; stuff->device_specific_fifo = NULL; } @@ -1279,7 +1285,7 @@ thread_pty_slave (void *arg) } if (!looping) break; - Sleep (sleep_time >> 3); + cygwait (pi->bye, sleep_time >> 3); if (sleep_time < 80) ++sleep_time; if (pi->stop_thread) @@ -1303,6 +1309,7 @@ pty_slave_startup (select_record *me, select_stuff *stuff) { pi->start = &stuff->start; pi->stop_thread = false; + pi->bye = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL); pi->thread = new cygthread (thread_pty_slave, pi, "ptyssel"); me->h = *pi->thread; if (!me->h) @@ -1325,8 +1332,10 @@ pty_slave_cleanup (select_record *me, select_stuff *stuff) if (pi->thread) { pi->stop_thread = true; + SetEvent (pi->bye); pi->thread->detach (); } + CloseHandle (pi->bye); delete pi; stuff->device_specific_ptys = NULL; } diff --git a/winsup/cygwin/select.h b/winsup/cygwin/select.h index ae98c658d..98fde3a89 100644 --- a/winsup/cygwin/select.h +++ b/winsup/cygwin/select.h @@ -44,6 +44,7 @@ struct select_info { cygthread *thread; bool stop_thread; + HANDLE bye; select_record *start; select_info (): thread (NULL), stop_thread (0), start (NULL) {} }; From bb7741acf800819a27c4edacddd231c6748fa1c9 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Tue, 14 Jan 2020 13:10:54 +0900 Subject: [PATCH 140/520] Cygwin: pty: Fix the issue regarding open and close multiple PTYs. - If two PTYs are opened in the same process and the first one is closed, the helper process for the first PTY remains running. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 0837b63e1..84900fee8 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -2224,8 +2224,7 @@ fhandler_pty_master::close () termios_printf ("CloseHandle (output_mutex<%p>), %E", output_mutex); if (!NT_SUCCESS (status)) debug_printf ("NtQueryObject: %y", status); - else if (obi.HandleCount == (get_pseudo_console () ? 2 : 1)) - /* Helper process has inherited one. */ + else if (obi.HandleCount == 1) { termios_printf ("Closing last master of pty%d", get_minor ()); /* Close Pseudo Console */ @@ -3167,14 +3166,14 @@ fhandler_pty_master::setup_pseudoconsole () get_ttyp ()->attach_pcon_in_fork = true; SIZE_T bytesRequired; - InitializeProcThreadAttributeList (NULL, 1, 0, &bytesRequired); + InitializeProcThreadAttributeList (NULL, 2, 0, &bytesRequired); STARTUPINFOEXW si_helper; ZeroMemory (&si_helper, sizeof (si_helper)); si_helper.StartupInfo.cb = sizeof (STARTUPINFOEXW); si_helper.lpAttributeList = (PPROC_THREAD_ATTRIBUTE_LIST) HeapAlloc (GetProcessHeap (), 0, bytesRequired); InitializeProcThreadAttributeList (si_helper.lpAttributeList, - 1, 0, &bytesRequired); + 2, 0, &bytesRequired); UpdateProcThreadAttribute (si_helper.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE, @@ -3186,6 +3185,14 @@ fhandler_pty_master::setup_pseudoconsole () /* Create a pipe for receiving pseudo console handles */ HANDLE hr, hw; CreatePipe (&hr, &hw, &sec_none, 0); + /* Inherit only handles which are needed by helper. */ + HANDLE handles_to_inherit[] = {hello, goodbye, hw}; + UpdateProcThreadAttribute (si_helper.lpAttributeList, + 0, + PROC_THREAD_ATTRIBUTE_HANDLE_LIST, + handles_to_inherit, + sizeof (handles_to_inherit), + NULL, NULL); /* Create helper process */ WCHAR cmd[MAX_PATH]; path_conv helper ("/bin/cygwin-console-helper.exe"); From bb30582a99e2303512432cee32b3a47b383be0c4 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Tue, 14 Jan 2020 11:50:04 +0900 Subject: [PATCH 141/520] Cygwin: pty: Add missing CloseHandle() calls. - PTY code which support pseudo console has a problem that causes handle leaks. Four of these are bug in pty code, and the other one seems to be a bug of Windows10. ClosePseudoConsole() fails to close one internal handle. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 16 ++++++++++++++-- winsup/cygwin/ntdll.h | 13 +++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 84900fee8..410e23716 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -2233,11 +2233,21 @@ fhandler_pty_master::close () /* Terminate helper process */ SetEvent (get_ttyp ()->h_helper_goodbye); WaitForSingleObject (get_ttyp ()->h_helper_process, INFINITE); + CloseHandle (get_ttyp ()->h_helper_goodbye); + CloseHandle (get_ttyp ()->h_helper_process); /* FIXME: Pseudo console can be accessed via its handle only in the process which created it. What else can we do? */ if (master_pid_tmp == myself->pid) - /* Release pseudo console */ - ClosePseudoConsole (get_pseudo_console ()); + { + /* ClosePseudoConsole() seems to have a bug that one + internal handle remains opened. This causes handle leak. + This is a workaround for this problem. */ + HPCON_INTERNAL *hp = (HPCON_INTERNAL *) get_pseudo_console (); + HANDLE tmp = hp->hConHostProcess; + /* Release pseudo console */ + ClosePseudoConsole (get_pseudo_console ()); + CloseHandle (tmp); + } get_ttyp ()->switch_to_pcon_in = false; get_ttyp ()->switch_to_pcon_out = false; } @@ -3208,6 +3218,8 @@ fhandler_pty_master::setup_pseudoconsole () TRUE, EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, &si_helper.StartupInfo, &pi_helper); WaitForSingleObject (hello, INFINITE); + CloseHandle (hello); + CloseHandle (pi_helper.hThread); /* Retrieve pseudo console handles */ DWORD rLen; char buf[64]; diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h index 1c07d0255..8a08111db 100644 --- a/winsup/cygwin/ntdll.h +++ b/winsup/cygwin/ntdll.h @@ -1763,4 +1763,17 @@ extern "C" return status; } } + +/* This is for pseudo console workaround. ClosePseudoConsole() + seems to have a bug that one internal handle remains opend. + This causes handle leak. To close this handle, it is needed + to access internal of HPCON. HPCON_INTERNAL is defined for + this purpose. The structure of internal of HPCON is not + documented. Refer to: https://github.com/Biswa96/XConPty */ +typedef struct _HPCON_INTERNAL +{ + HANDLE hWritePipe; + HANDLE hConDrvReference; + HANDLE hConHostProcess; +} HPCON_INTERNAL; #endif From d7478090d684ad92773330f1abdff660b537da49 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Tue, 14 Jan 2020 11:09:42 +0900 Subject: [PATCH 142/520] Cygwin: console: Disable xterm mode for non cygwin process only. - Special function keys such as arrow keys or function keys do not work in ConEmu with cygwin-connector after commit 6a06c6bc8f8492ea09aa3ae180fe94e4ac265611. This patch fixes the issue. --- winsup/cygwin/fhandler_console.cc | 19 ------------------- winsup/cygwin/fhandler_tty.cc | 10 ---------- winsup/cygwin/spawn.cc | 21 ++++++++++++++++++++- winsup/cygwin/winlean.h | 12 ++++++++++++ 4 files changed, 32 insertions(+), 30 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index b286c6c10..d9766915f 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -33,17 +33,6 @@ details. */ #include "child_info.h" #include "cygwait.h" -/* Not yet defined in Mingw-w64 */ -#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING -#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004 -#endif /* ENABLE_VIRTUAL_TERMINAL_PROCESSING */ -#ifndef DISABLE_NEWLINE_AUTO_RETURN -#define DISABLE_NEWLINE_AUTO_RETURN 0x0008 -#endif /* DISABLE_NEWLINE_AUTO_RETURN */ -#ifndef ENABLE_VIRTUAL_TERMINAL_INPUT -#define ENABLE_VIRTUAL_TERMINAL_INPUT 0x0200 -#endif /* ENABLE_VIRTUAL_TERMINAL_INPUT */ - /* Don't make this bigger than NT_MAX_PATH as long as the temporary buffer is allocated using tmp_pathbuf!!! */ #define CONVERT_LIMIT NT_MAX_PATH @@ -2975,14 +2964,6 @@ fhandler_console::fixup_after_fork_exec (bool execing) { set_unit (); setup_io_mutex (); - if (wincap.has_con_24bit_colors () && !con_is_legacy) - { - DWORD dwMode; - /* Disable xterm compatible mode in input */ - GetConsoleMode (get_handle (), &dwMode); - dwMode &= ~ENABLE_VIRTUAL_TERMINAL_INPUT; - SetConsoleMode (get_handle (), dwMode); - } } // #define WINSTA_ACCESS (WINSTA_READATTRIBUTES | STANDARD_RIGHTS_READ | STANDARD_RIGHTS_WRITE | WINSTA_CREATEDESKTOP | WINSTA_EXITWINDOWS) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 410e23716..042ffd19c 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -31,19 +31,9 @@ details. */ #define ALWAYS_USE_PCON false #define USE_API_HOOK true -/* Not yet defined in Mingw-w64 */ -#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING -#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004 -#endif /* ENABLE_VIRTUAL_TERMINAL_PROCESSING */ -#ifndef DISABLE_NEWLINE_AUTO_RETURN -#define DISABLE_NEWLINE_AUTO_RETURN 0x0008 -#endif /* DISABLE_NEWLINE_AUTO_RETURN */ #ifndef PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE #define PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE 0x00020016 #endif /* PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE */ -#ifndef ENABLE_VIRTUAL_TERMINAL_INPUT -#define ENABLE_VIRTUAL_TERMINAL_INPUT 0x0200 -#endif /* ENABLE_VIRTUAL_TERMINAL_INPUT */ extern "C" int sscanf (const char *, const char *, ...); extern "C" int ttyname_r (int, char*, size_t); diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index cea79e326..6a5034219 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -610,7 +610,26 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, } } else if (fh && fh->get_major () == DEV_CONS_MAJOR) - attach_to_console = true; + { + attach_to_console = true; + if (wincap.has_con_24bit_colors () && !iscygwin ()) + { + DWORD dwMode; + if (fd == 0) + { + /* Disable xterm compatible mode in input */ + GetConsoleMode (fh->get_handle (), &dwMode); + dwMode &= ~ENABLE_VIRTUAL_TERMINAL_INPUT; + SetConsoleMode (fh->get_handle (), dwMode); + } + else + { + GetConsoleMode (fh->get_output_handle (), &dwMode); + dwMode &= ~ENABLE_VIRTUAL_TERMINAL_PROCESSING; + SetConsoleMode (fh->get_output_handle (), dwMode); + } + } + } } /* Set up needed handles for stdio */ diff --git a/winsup/cygwin/winlean.h b/winsup/cygwin/winlean.h index deb79bef8..3d79a92e4 100644 --- a/winsup/cygwin/winlean.h +++ b/winsup/cygwin/winlean.h @@ -93,4 +93,16 @@ details. */ use this function. Use GetSystemWindowsDirectoryW. */ #define GetWindowsDirectoryW dont_use_GetWindowsDirectory #define GetWindowsDirectoryA dont_use_GetWindowsDirectory + +/* For console with xterm compatible mode */ +/* Not yet defined in Mingw-w64 */ +#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING +#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004 +#endif /* ENABLE_VIRTUAL_TERMINAL_PROCESSING */ +#ifndef ENABLE_VIRTUAL_TERMINAL_INPUT +#define ENABLE_VIRTUAL_TERMINAL_INPUT 0x0200 +#endif /* ENABLE_VIRTUAL_TERMINAL_INPUT */ +#ifndef DISABLE_NEWLINE_AUTO_RETURN +#define DISABLE_NEWLINE_AUTO_RETURN 0x0008 +#endif /* DISABLE_NEWLINE_AUTO_RETURN */ #endif /*_WINLEAN_H*/ From f03806b68a556323f858f816e391fadb01b287bb Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Tue, 14 Jan 2020 10:53:59 +0900 Subject: [PATCH 143/520] Cygwin: console: Add workaround for broken CSI3J in Win10 1809. - In Win10 1809, the cursor position sometimes goes out of screen by clear command in console. This seems to be caused by escape sequence CSI3J (ESC[3J). This happens only for 1809. This patch is a workaround for the issue. --- winsup/cygwin/fhandler_console.cc | 12 +++++++++ winsup/cygwin/wincap.cc | 41 ++++++++++++++++++++++++++++++- winsup/cygwin/wincap.h | 2 ++ 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index d9766915f..337331be2 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1658,6 +1658,18 @@ bool fhandler_console::write_console (PWCHAR buf, DWORD len, DWORD& done) if (wincap.has_con_24bit_colors () && !con_is_legacy && memmem (buf, len*sizeof (WCHAR), L"\033[?1049", 7*sizeof (WCHAR))) need_fix_tab_position = true; + /* Workaround for broken CSI3J (ESC[3J) support in xterm compatible mode. */ + if (wincap.has_con_24bit_colors () && !con_is_legacy && + wincap.has_con_broken_csi3j ()) + { + WCHAR *p = buf; + while ((p = (WCHAR *) memmem (p, (len - (p - buf))*sizeof (WCHAR), + L"\033[3J", 4*sizeof (WCHAR)))) + { + memmove (p, p+4, (len - (p+4 - buf))*sizeof (WCHAR)); + len -= 4; + } + } if (con.iso_2022_G1 ? con.vt100_graphics_mode_G1 diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index 5c6e6428e..a52262b89 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -42,6 +42,7 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = { has_posix_rename_semantics:false, no_msv1_0_s4u_logon_in_wow64:true, has_con_24bit_colors:false, + has_con_broken_csi3j:false, }, }; @@ -69,6 +70,7 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = { has_posix_rename_semantics:false, no_msv1_0_s4u_logon_in_wow64:true, has_con_24bit_colors:false, + has_con_broken_csi3j:false, }, }; @@ -96,6 +98,7 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = { has_posix_rename_semantics:false, no_msv1_0_s4u_logon_in_wow64:false, has_con_24bit_colors:false, + has_con_broken_csi3j:false, }, }; @@ -123,6 +126,7 @@ wincaps wincap_8_1 __attribute__((section (".cygwin_dll_common"), shared)) = { has_posix_rename_semantics:false, no_msv1_0_s4u_logon_in_wow64:false, has_con_24bit_colors:false, + has_con_broken_csi3j:false, }, }; @@ -150,6 +154,7 @@ wincaps wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared)) has_posix_rename_semantics:false, no_msv1_0_s4u_logon_in_wow64:false, has_con_24bit_colors:false, + has_con_broken_csi3j:false, }, }; @@ -177,6 +182,7 @@ wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) = has_posix_rename_semantics:false, no_msv1_0_s4u_logon_in_wow64:false, has_con_24bit_colors:true, + has_con_broken_csi3j:false, }, }; @@ -204,6 +210,7 @@ wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) = has_posix_rename_semantics:false, no_msv1_0_s4u_logon_in_wow64:false, has_con_24bit_colors:true, + has_con_broken_csi3j:false, }, }; @@ -231,6 +238,7 @@ wincaps wincap_10_1803 __attribute__((section (".cygwin_dll_common"), shared)) = has_posix_rename_semantics:false, no_msv1_0_s4u_logon_in_wow64:false, has_con_24bit_colors:true, + has_con_broken_csi3j:false, }, }; @@ -258,6 +266,35 @@ wincaps wincap_10_1809 __attribute__((section (".cygwin_dll_common"), shared)) = has_posix_rename_semantics:true, no_msv1_0_s4u_logon_in_wow64:false, has_con_24bit_colors:true, + has_con_broken_csi3j:true, + }, +}; + +wincaps wincap_10_1903 __attribute__((section (".cygwin_dll_common"), shared)) = { + def_guard_pages:2, + mmap_storage_high:0x700000000000LL, + { + is_server:false, + needs_count_in_si_lpres2:false, + needs_query_information:false, + has_gaa_largeaddress_bug:false, + has_broken_alloc_console:true, + has_console_logon_sid:true, + has_precise_system_time:true, + has_microsoft_accounts:true, + has_processor_groups:true, + has_broken_prefetchvm:false, + has_new_pebteb_region:true, + has_broken_whoami:false, + has_unprivileged_createsymlink:true, + has_unbiased_interrupt_time:true, + has_precise_interrupt_time:true, + has_posix_unlink_semantics:true, + has_case_sensitive_dirs:true, + has_posix_rename_semantics:true, + no_msv1_0_s4u_logon_in_wow64:false, + has_con_24bit_colors:true, + has_con_broken_csi3j:false, }, }; @@ -301,7 +338,9 @@ wincapc::init () break; case 10: default: - if (likely (version.dwBuildNumber >= 17763)) + if (likely (version.dwBuildNumber >= 18362)) + caps = &wincap_10_1903; + else if (version.dwBuildNumber >= 17763) caps = &wincap_10_1809; else if (version.dwBuildNumber >= 17134) caps = &wincap_10_1803; diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h index ba01a1565..11902d976 100644 --- a/winsup/cygwin/wincap.h +++ b/winsup/cygwin/wincap.h @@ -36,6 +36,7 @@ struct wincaps unsigned has_posix_rename_semantics : 1; unsigned no_msv1_0_s4u_logon_in_wow64 : 1; unsigned has_con_24bit_colors : 1; + unsigned has_con_broken_csi3j : 1; }; }; @@ -95,6 +96,7 @@ public: bool IMPLEMENT (has_posix_rename_semantics) bool IMPLEMENT (no_msv1_0_s4u_logon_in_wow64) bool IMPLEMENT (has_con_24bit_colors) + bool IMPLEMENT (has_con_broken_csi3j) void disable_case_sensitive_dirs () { From 783eaa888feaf4f76df3d3449e29aa20aa78c802 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 2 Jan 2020 22:17:16 +0900 Subject: [PATCH 144/520] Cygwin: console: Add code to restore console mode on close. - The console with 24bit color support has a problem that console mode is changed if cygwin process is executed in cmd.exe which started in cygwin shell. For example, cursor keys become not working if bash -> cmd -> true are executed in this order. This patch fixes the issue. --- winsup/cygwin/fhandler_console.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 337331be2..b3f2cb65a 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -53,6 +53,9 @@ fhandler_console::console_state NO_COPY *fhandler_console::shared_console_info; bool NO_COPY fhandler_console::invisible_console; +static DWORD orig_conin_mode = (DWORD) -1; +static DWORD orig_conout_mode = (DWORD) -1; + static void beep () { @@ -1010,6 +1013,11 @@ fhandler_console::open (int flags, mode_t) get_ttyp ()->rstcons (false); set_open_status (); + if (orig_conin_mode == (DWORD) -1) + GetConsoleMode (get_handle (), &orig_conin_mode); + if (orig_conout_mode == (DWORD) -1) + GetConsoleMode (get_output_handle (), &orig_conout_mode); + if (getpid () == con.owner && wincap.has_con_24bit_colors ()) { DWORD dwMode; @@ -1079,6 +1087,19 @@ fhandler_console::close () SetConsoleMode (get_output_handle (), dwMode); } + /* Restore console mode if this is the last closure. */ + OBJECT_BASIC_INFORMATION obi; + NTSTATUS status; + status = NtQueryObject (get_handle (), ObjectBasicInformation, + &obi, sizeof obi, NULL); + if (NT_SUCCESS (status) && obi.HandleCount == 1) + { + if (orig_conin_mode != (DWORD) -1) + SetConsoleMode (get_handle (), orig_conin_mode); + if (orig_conout_mode != (DWORD) -1) + SetConsoleMode (get_handle (), orig_conout_mode); + } + CloseHandle (get_handle ()); CloseHandle (get_output_handle ()); From 2f415d5efae5a47906f0fdf5080c407b56b5ce20 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Fri, 10 Jan 2020 20:46:26 +0900 Subject: [PATCH 145/520] Cygwin: pty: Disable FreeConsole() on close for non cygwin process. - After commit e1a0775dc0545b5f9c81b09a327fc110c538b7b4, the problem reported in https://www.cygwin.com/ml/cygwin/2020-01/msg00093.html occurs. For Gnu scren and tmux, calling FreeConsole() on pty close is necessary. However, if FreeConsole() is called, cygwin setup with '-h' option does not work. Therefore, the commit e1a0775dc0545b5f9c81b09a327fc110c538b7b4 delayed closing pty. This is the cause of the problem above. Now, instead of delaying pty close, FreeConsole() is not called if the process is non cygwin processes such as cygwin setup. --- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_tty.cc | 13 +++++++++++-- winsup/cygwin/spawn.cc | 6 ++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 4a71c1628..c0d56b4da 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -2200,6 +2200,7 @@ class fhandler_pty_slave: public fhandler_pty_common return get_ttyp ()->ti.c_lflag & ICANON; } void setup_locale (void); + void set_freeconsole_on_close (bool val); }; #define __ptsname(buf, unit) __small_sprintf ((buf), "/dev/pty%d", (unit)) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 042ffd19c..983e058dc 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -66,6 +66,7 @@ struct pipe_reply { static int pcon_attached_to = -1; static bool isHybrid; static bool do_not_reset_switch_to_pcon; +static bool freeconsole_on_close = true; #if USE_API_HOOK static void @@ -725,7 +726,8 @@ fhandler_pty_slave::~fhandler_pty_slave () if (used == 0) { init_console_handler (false); - FreeConsole (); + if (freeconsole_on_close) + FreeConsole (); } } } @@ -2660,6 +2662,12 @@ fhandler_pty_slave::setup_locale (void) } } +void +fhandler_pty_slave::set_freeconsole_on_close (bool val) +{ + freeconsole_on_close = val; +} + void fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) { @@ -2783,7 +2791,8 @@ fhandler_pty_slave::fixup_after_exec () if (used == 1 /* About to close this tty */) { init_console_handler (false); - FreeConsole (); + if (freeconsole_on_close) + FreeConsole (); } } diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 6a5034219..08d52bb28 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -607,6 +607,8 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, attach_to_console = true; } ptys->fixup_after_attach (!iscygwin (), fd); + if (mode == _P_OVERLAY) + ptys->set_freeconsole_on_close (iscygwin ()); } } else if (fh && fh->get_major () == DEV_CONS_MAJOR) @@ -809,6 +811,8 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, NtClose (old_winpid_hdl); real_path.get_wide_win32_path (myself->progname); // FIXME: race? sigproc_printf ("new process name %W", myself->progname); + if (!iscygwin ()) + close_all_files (); } else { @@ -907,8 +911,6 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, wait_for_myself (); } myself.exit (EXITCODE_NOSET); - if (!iscygwin ()) - close_all_files (); break; case _P_WAIT: case _P_SYSTEM: From 50e2a63b04bdd018484605fbb954fd1bd5147fa0 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Fri, 10 Jan 2020 20:47:12 +0900 Subject: [PATCH 146/520] Cygwin: pty: Set console code page only if pseudo console is enabled. - Input UTF-8 chars are garbled in ConEmu with cygwin connector if the environment does not support pseudo console. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 983e058dc..fff5bebe3 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -2626,15 +2626,18 @@ fhandler_pty_slave::setup_locale (void) LCID lcid = get_langinfo (locale, charset); /* Set console code page form locale */ - UINT code_page; - if (lcid == 0 || lcid == (LCID) -1) - code_page = 20127; /* ASCII */ - else if (!GetLocaleInfo (lcid, - LOCALE_IDEFAULTCODEPAGE | LOCALE_RETURN_NUMBER, - (char *) &code_page, sizeof (code_page))) - code_page = 20127; /* ASCII */ - SetConsoleCP (code_page); - SetConsoleOutputCP (code_page); + if (get_pseudo_console ()) + { + UINT code_page; + if (lcid == 0 || lcid == (LCID) -1) + code_page = 20127; /* ASCII */ + else if (!GetLocaleInfo (lcid, + LOCALE_IDEFAULTCODEPAGE | LOCALE_RETURN_NUMBER, + (char *) &code_page, sizeof (code_page))) + code_page = 20127; /* ASCII */ + SetConsoleCP (code_page); + SetConsoleOutputCP (code_page); + } /* Set terminal code page from locale */ /* This code is borrowed from mintty: charset.c */ From 7e6c96d6e1485b52b4243d0cd9699f2063645660 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 16 Jan 2020 20:04:47 +0900 Subject: [PATCH 147/520] Cygwin: pty: Fix state mismatch caused in octave gui. - In octave gui, sometimes state mismatch between real pty state and state variable occurs. For example, this occurs when 'ls' command is executed in octave gui. This patch fixes the issue. --- winsup/cygwin/spawn.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 08d52bb28..f7c6dd590 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -947,6 +947,15 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, { FreeConsole (); AttachConsole (pid_restore); + cygheap_fdenum cfd (false); + int fd; + while ((fd = cfd.next ()) >= 0) + if (cfd->get_major () == DEV_PTYS_MAJOR) + { + fhandler_pty_slave *ptys = + (fhandler_pty_slave *) (fhandler_base *) cfd; + ptys->fixup_after_attach (false, fd); + } } return (int) res; From 85aff2830a68ce79a280e5ea31fcf01342d61986 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Wed, 15 Jan 2020 10:49:21 -0500 Subject: [PATCH 148/520] Cygwin: normalize_win32_path: allow drive without trailing backslash Commit 283cb372, "Cygwin: normalize_win32_path: improve error checking", required a prefix '\\?\' or '\??\' in the source path to be followed by 'UNC\' or 'X:\', where X is a drive letter. That was too restrictive, since it disallowed the paths '\\?\X: and '\??\X:'. This caused problems when a user tried to use the root of a drive as the Cygwin installation root, as reported here: https://cygwin.com/ml/cygwin/2020-01/msg00111.html Modify the requirement so that '\??\X:' and '\\?\X:' are now allowed as source paths, without a trailing backslash. --- winsup/cygwin/path.cc | 2 +- winsup/cygwin/release/3.1.3 | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index c8e73c64c..a00270210 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1411,7 +1411,7 @@ normalize_win32_path (const char *src, char *dst, char *&tail) && src[2] == '?' && isdirsep (src[3])) { src += 4; - if (isdrive (src) && isdirsep (src[2])) + if (isdrive (src) && (isdirsep (src[2]) || !src[2])) beg_src_slash = false; else if (!strncmp (src, "UNC", 3) && isdirsep (src[3])) /* native UNC path */ diff --git a/winsup/cygwin/release/3.1.3 b/winsup/cygwin/release/3.1.3 index 0fcdccabb..489741136 100644 --- a/winsup/cygwin/release/3.1.3 +++ b/winsup/cygwin/release/3.1.3 @@ -6,3 +6,7 @@ Bug Fixes - Fix the problem which overrides the code page setting. Addresses: https://www.cygwin.com/ml/cygwin/2019-12/msg00292.html + +- Fix a regression that prevents the root of a drive from being the + Cygwin installation root. + Addresses: https://cygwin.com/ml/cygwin/2020-01/msg00111.html From 35a1a6dbdf03df1e33bae51f679820a3a868d0c0 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Fri, 27 Dec 2019 11:43:58 -0500 Subject: [PATCH 149/520] Cygwin: allow opening a symlink with O_PATH | O_NOFOLLOW Up to now, opening a symlink with O_NOFOLLOW fails with ELOOP. Following Linux, allow this to succeed if O_PATH is also specified. --- winsup/cygwin/syscalls.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 20126ce10..038a316db 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1470,7 +1470,7 @@ open (const char *unix_path, int flags, ...) if (!(fh = build_fh_name (unix_path, opt, stat_suffixes))) __leave; /* errno already set */ - if ((flags & O_NOFOLLOW) && fh->issymlink ()) + if ((flags & O_NOFOLLOW) && fh->issymlink () && !(flags & O_PATH)) { set_errno (ELOOP); __leave; From 6cc05784e16af56750417b73d778efb09c3b122e Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Fri, 27 Dec 2019 17:17:35 -0500 Subject: [PATCH 150/520] Cygwin: readlinkat: allow pathname to be empty Following Linux, allow the pathname argument to be an empty string, provided the dirfd argument refers to a symlink opened with O_PATH | O_NOFOLLOW. The readlinkat call then operates on that symlink. --- winsup/cygwin/syscalls.cc | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 038a316db..282d9e0ee 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -4979,8 +4979,23 @@ readlinkat (int dirfd, const char *__restrict pathname, char *__restrict buf, __try { char *path = tp.c_get (); - if (gen_full_path_at (path, dirfd, pathname)) - __leave; + int res = gen_full_path_at (path, dirfd, pathname); + if (res) + { + if (errno != ENOENT) + __leave; + /* pathname is an empty string. This is OK if dirfd refers + to a symlink that was opened with O_PATH | O_NOFOLLOW. + In this case, readlinkat operates on the symlink. */ + cygheap_fdget cfd (dirfd); + if (cfd < 0) + __leave; + if (!(cfd->issymlink () + && cfd->get_flags () & O_PATH + && cfd->get_flags () & O_NOFOLLOW)) + __leave; + strcpy (path, cfd->get_name ()); + } return readlink (path, buf, bufsize); } __except (EFAULT) {} From 352dbd304be48cd47de4f588031b98b8e0202f33 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Fri, 27 Dec 2019 17:38:32 -0500 Subject: [PATCH 151/520] Cygwin: fstatat, fchownat: support the AT_EMPTY_PATH flag Following Linux, allow the pathname argument to be an empty string if the AT_EMPTY_PATH flag is specified. In this case the dirfd argument can refer to any type of file, not just a directory, and the call operates on that file. In particular, dirfd can refer to a symlink that was opened with O_PATH | O_NOFOLLOW. --- winsup/cygwin/syscalls.cc | 47 ++++++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 282d9e0ee..4956b6ff5 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -4785,14 +4785,36 @@ fchownat (int dirfd, const char *pathname, uid_t uid, gid_t gid, int flags) tmp_pathbuf tp; __try { - if (flags & ~AT_SYMLINK_NOFOLLOW) + if (flags & ~(AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH)) { set_errno (EINVAL); __leave; } char *path = tp.c_get (); - if (gen_full_path_at (path, dirfd, pathname)) - __leave; + int res = gen_full_path_at (path, dirfd, pathname); + if (res) + { + if (!(errno == ENOENT && (flags & AT_EMPTY_PATH))) + __leave; + /* pathname is an empty string. Operate on dirfd. */ + if (dirfd == AT_FDCWD) + { + cwdstuff::cwd_lock.acquire (); + strcpy (path, cygheap->cwd.get_posix ()); + cwdstuff::cwd_lock.release (); + } + else + { + cygheap_fdget cfd (dirfd); + if (cfd < 0) + __leave; + strcpy (path, cfd->get_name ()); + /* If dirfd refers to a symlink (which was necessarily + opened with O_PATH | O_NOFOLLOW), we must operate + directly on that symlink.. */ + flags = AT_SYMLINK_NOFOLLOW; + } + } return chown_worker (path, (flags & AT_SYMLINK_NOFOLLOW) ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW, uid, gid); } @@ -4808,14 +4830,27 @@ fstatat (int dirfd, const char *__restrict pathname, struct stat *__restrict st, tmp_pathbuf tp; __try { - if (flags & ~AT_SYMLINK_NOFOLLOW) + if (flags & ~(AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH)) { set_errno (EINVAL); __leave; } char *path = tp.c_get (); - if (gen_full_path_at (path, dirfd, pathname)) - __leave; + int res = gen_full_path_at (path, dirfd, pathname); + if (res) + { + if (!(errno == ENOENT && (flags & AT_EMPTY_PATH))) + __leave; + /* pathname is an empty string. Operate on dirfd. */ + if (dirfd == AT_FDCWD) + { + cwdstuff::cwd_lock.acquire (); + strcpy (path, cygheap->cwd.get_posix ()); + cwdstuff::cwd_lock.release (); + } + else + return fstat (dirfd, st); + } path_conv pc (path, ((flags & AT_SYMLINK_NOFOLLOW) ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW) | PC_POSIX | PC_KEEP_HANDLE, stat_suffixes); From 4261a8f5cac478ee299f0feb3ae478dbf287427e Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Fri, 17 Jan 2020 10:52:54 -0500 Subject: [PATCH 152/520] Cygwin: document recent changes --- winsup/cygwin/release/3.1.3 | 19 ++++++++++++++++--- winsup/doc/new-features.xml | 15 +++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/release/3.1.3 b/winsup/cygwin/release/3.1.3 index 489741136..425d8bb2d 100644 --- a/winsup/cygwin/release/3.1.3 +++ b/winsup/cygwin/release/3.1.3 @@ -1,5 +1,18 @@ -Bug Fixes ---------- +What changed: +------------- + +- Allow symlinks to be opened with O_PATH | O_NOFOLLOW. + +- Allow the pathname argument to readlinkat(2) to be an empty string, + provided the dirfd argument refers to a symlink opened with + O_PATH | O_NOFOLLOW. The readlinkat call then operates on that + symlink. + +- Support the Linux-specific AT_EMPTY_PATH flag for fchownat(2) and + fstatat(2). + +Bug Fixes: +---------- - Define CPU_SETSIZE, as on Linux. Addresses: https://cygwin.com/ml/cygwin/2019-12/msg00248.html @@ -7,6 +20,6 @@ Bug Fixes - Fix the problem which overrides the code page setting. Addresses: https://www.cygwin.com/ml/cygwin/2019-12/msg00292.html -- Fix a regression that prevents the root of a drive from being the +- Fix a regression that prevented the root of a drive from being the Cygwin installation root. Addresses: https://cygwin.com/ml/cygwin/2020-01/msg00111.html diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml index 65bdc17ab..967c64ac5 100644 --- a/winsup/doc/new-features.xml +++ b/winsup/doc/new-features.xml @@ -54,6 +54,21 @@ Allow times(2) to have a NULL argument, as on Linux. Improve /proc/cpuinfo output and align more closely with Linux. + +Allow symlinks to be opened with O_PATH | O_NOFOLLOW. + + + +Allow the pathname argument to readlinkat(2) to be an empty string, +provided the dirfd argument refers to a symlink opened with O_PATH | +O_NOFOLLOW. The readlinkat call then operates on that symlink. + + + +Support the Linux-specific AT_EMPTY_PATH flag for fchownat(2) and +fstatat(2). + + From 954504ea1424069c7c8d34fe771a505df8b8e3e1 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 20 Jan 2020 22:46:34 -0800 Subject: [PATCH 153/520] riscv: Use current pseudo-instructions to access the FCSR register Use fscsr and frcsr to store and read the FCSR register instead of fssr and frsr. Signed-off-by: Keith Packard --- newlib/libc/machine/riscv/ieeefp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newlib/libc/machine/riscv/ieeefp.c b/newlib/libc/machine/riscv/ieeefp.c index 9094cc651..68ace0b09 100644 --- a/newlib/libc/machine/riscv/ieeefp.c +++ b/newlib/libc/machine/riscv/ieeefp.c @@ -15,14 +15,14 @@ static void fssr(unsigned value) { - asm volatile ("fssr %0" :: "r"(value)); + asm volatile ("fscsr %0" :: "r"(value)); } static unsigned frsr() { unsigned value; - asm volatile ("frsr %0" : "=r" (value)); + asm volatile ("frcsr %0" : "=r" (value)); return value; } From 8e74c7119fb7f95662bb4986570a98496f259400 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 20 Jan 2020 22:46:35 -0800 Subject: [PATCH 154/520] riscv: Add 'break' statements to fpsetround switch This makes the fpsetround function actually do something rather than just return -1 due to the default 'fall-through' behavior of the switch statement. Signed-off-by: Keith Packard --- newlib/libc/machine/riscv/ieeefp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/newlib/libc/machine/riscv/ieeefp.c b/newlib/libc/machine/riscv/ieeefp.c index 68ace0b09..c45832280 100644 --- a/newlib/libc/machine/riscv/ieeefp.c +++ b/newlib/libc/machine/riscv/ieeefp.c @@ -84,10 +84,10 @@ fpsetround(fp_rnd rnd_dir) unsigned new_rm; switch (rnd_dir) { - case FP_RN: new_rm = 0; - case FP_RZ: new_rm = 1; - case FP_RM: new_rm = 2; - case FP_RP: new_rm = 3; + case FP_RN: new_rm = 0; break; + case FP_RZ: new_rm = 1; break; + case FP_RM: new_rm = 2; break; + case FP_RP: new_rm = 3; break; default: return -1; } fssr (new_rm << 5 | fsr & 0x1f); From 5377a847764461493c620644f6530892344d1cdd Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 20 Jan 2020 22:46:36 -0800 Subject: [PATCH 155/520] riscv: Map between ieeefp.h exception bits and RISC-V FCSR bits If we had architecture-specific exception bits, we could just set them to match the processor, but instead ieeefp.h is shared by all targets so we need to map between the public values and the register contents. Signed-off-by: Keith Packard --- newlib/libc/machine/riscv/ieeefp.c | 40 +++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/newlib/libc/machine/riscv/ieeefp.c b/newlib/libc/machine/riscv/ieeefp.c index c45832280..60ecacfc2 100644 --- a/newlib/libc/machine/riscv/ieeefp.c +++ b/newlib/libc/machine/riscv/ieeefp.c @@ -40,6 +40,40 @@ frm_fp_rnd (unsigned frm) } } +static fp_except +frm_fp_except (unsigned except) +{ + fp_except fp = 0; + if (except & (1 << 0)) + fp |= FP_X_IMP; + if (except & (1 << 1)) + fp |= FP_X_UFL; + if (except & (1 << 2)) + fp |= FP_X_OFL; + if (except & (1 << 3)) + fp |= FP_X_DX; + if (except & (1 << 4)) + fp |= FP_X_INV; + return fp; +} + +static unsigned +frm_except(fp_except fp) +{ + unsigned except = 0; + if (fp & FP_X_IMP) + except |= (1 << 0); + if (fp & FP_X_UFL) + except |= (1 << 1); + if (fp & FP_X_OFL) + except |= (1 << 2); + if (fp & FP_X_DX) + except |= (1 << 3); + if (fp & FP_X_INV) + except |= (1 << 4); + return except; +} + #endif /* __riscv_flen */ fp_except @@ -63,7 +97,7 @@ fp_except fpgetsticky(void) { #ifdef __riscv_flen - return frsr () & 0x1f; + return frm_fp_except(frsr ()); #else return 0; #endif /* __riscv_flen */ @@ -102,8 +136,8 @@ fpsetsticky(fp_except sticky) { #ifdef __riscv_flen unsigned fsr = frsr (); - fssr (sticky & 0x1f | fsr & ~0x1f); - return fsr & 0x1f; + fssr (frm_except(sticky) | (fsr & ~0x1f)); + return frm_fp_except(fsr); #else return -1; #endif /* __riscv_flen */ From 6cc299f0e20e4b76f7dbab5ea8c296ffa4859b62 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Tue, 21 Jan 2020 11:22:02 +0900 Subject: [PATCH 156/520] Cygwin: pty: Revise code waiting for forwarding by master_fwd_thread. - Though this rarely happens, sometimes the first printing of non- cygwin process does not displayed correctly. To fix this issue, the code for waiting for forwarding by master_fwd_thread is revised. --- winsup/cygwin/fhandler_tty.cc | 15 +++++++++++---- winsup/cygwin/tty.cc | 1 + winsup/cygwin/tty.h | 1 + 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index fff5bebe3..8ed1f8a0b 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -648,7 +648,7 @@ fhandler_pty_master::process_slave_output (char *buf, size_t len, int pktmode_on /* If echo pipe has data (something has been typed or pasted), prefer it over slave output. */ if (echo_cnt > 0) - { + { if (!ReadFile (echo_r, outbuf, rlen, &n, NULL)) { termios_printf ("ReadFile on echo pipe failed, %E"); @@ -1109,7 +1109,7 @@ skip_console_setting: } else if ((fd == 1 || fd == 2) && !get_ttyp ()->switch_to_pcon_out) { - Sleep (20); + cygwait (get_ttyp ()->fwd_done, INFINITE); if (get_ttyp ()->pcon_pid == 0 || kill (get_ttyp ()->pcon_pid, 0) != 0) get_ttyp ()->pcon_pid = myself->pid; @@ -1151,7 +1151,8 @@ fhandler_pty_slave::reset_switch_to_pcon (void) SetConsoleMode (get_handle (), mode & ~ENABLE_ECHO_INPUT); } if (get_ttyp ()->switch_to_pcon_out) - Sleep (20); /* Wait for pty_master_fwd_thread() */ + /* Wait for pty_master_fwd_thread() */ + cygwait (get_ttyp ()->fwd_done, INFINITE); get_ttyp ()->pcon_pid = 0; get_ttyp ()->switch_to_pcon_in = false; get_ttyp ()->switch_to_pcon_out = false; @@ -2202,6 +2203,8 @@ fhandler_pty_master::close () } release_output_mutex (); master_fwd_thread->terminate_thread (); + CloseHandle (get_ttyp ()->fwd_done); + get_ttyp ()->fwd_done = NULL; } } @@ -2718,7 +2721,7 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) DWORD mode = ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT; SetConsoleMode (get_output_handle (), mode); if (!get_ttyp ()->switch_to_pcon_out) - Sleep (20); + cygwait (get_ttyp ()->fwd_done, INFINITE); if (get_ttyp ()->pcon_pid == 0 || kill (get_ttyp ()->pcon_pid, 0) != 0) get_ttyp ()->pcon_pid = myself->pid; @@ -3000,11 +3003,14 @@ fhandler_pty_master::pty_master_fwd_thread () termios_printf ("Started."); for (;;) { + if (::bytes_available (rlen, from_slave) && rlen == 0) + SetEvent (get_ttyp ()->fwd_done); if (!ReadFile (from_slave, outbuf, sizeof outbuf, &rlen, NULL)) { termios_printf ("ReadFile for forwarding failed, %E"); break; } + ResetEvent (get_ttyp ()->fwd_done); ssize_t wlen = rlen; char *ptr = outbuf; if (get_pseudo_console ()) @@ -3365,6 +3371,7 @@ fhandler_pty_master::setup () errstr = "pty master forwarding thread"; goto err; } + get_ttyp ()->fwd_done = CreateEvent (&sec_none, true, false, NULL); setup_pseudoconsole (); diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index 695ce91f1..ef9bbc1ff 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -245,6 +245,7 @@ tty::init () num_pcon_attached_slaves = 0; term_code_page = 0; need_redraw_screen = false; + fwd_done = NULL; } HANDLE diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h index cd4c0ed44..b291fd3c1 100644 --- a/winsup/cygwin/tty.h +++ b/winsup/cygwin/tty.h @@ -106,6 +106,7 @@ private: int num_pcon_attached_slaves; UINT term_code_page; bool need_redraw_screen; + HANDLE fwd_done; public: HANDLE from_master () const { return _from_master; } From f5da56ab5c033d4e061b653d2592a8a65fb4bed7 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 21 Jan 2020 14:54:49 -0500 Subject: [PATCH 157/520] Default newlib_reent_check_verify to yes in configure.host --- newlib/configure.host | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/newlib/configure.host b/newlib/configure.host index 43beb829a..406dac861 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -77,7 +77,7 @@ default_newlib_io_long_double=no default_newlib_io_pos_args=no default_newlib_atexit_dynamic_alloc=yes default_newlib_nano_malloc=no -default_newlib_reent_check_verify=no +default_newlib_reent_check_verify=yes aext=a oext=o lpfx="lib_a-" @@ -970,8 +970,8 @@ fi # Enable _REENT_CHECK macro memory allocation verification. if [ "x${newlib_reent_check_verify}" = "x" ]; then - if [ ${default_newlib_reent_check_verify} = "yes" ]; then - newlib_reent_check_verify="yes"; + if [ ${default_newlib_reent_check_verify} = "no" ]; then + newlib_reent_check_verify="no"; fi fi From 8b39f7406c7b819bc45a83e9c94531221a6b3b34 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 21 Jan 2020 15:12:34 -0500 Subject: [PATCH 158/520] Change the reent verify check option to document disabling it - also change the handling of default_newlib_reent_check_verify to be the same as other default variables in configure.host - regenerate newlib/configure --- newlib/configure | 2 +- newlib/configure.host | 4 ++-- newlib/configure.in | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/newlib/configure b/newlib/configure index 108fc4e1b..ea98e04f0 100755 --- a/newlib/configure +++ b/newlib/configure @@ -1464,7 +1464,7 @@ Optional Features: --enable-newlib-io-long-long enable long long type support in IO functions like printf/scanf --enable-newlib-io-long-double enable long double type support in IO functions printf/scanf --enable-newlib-mb enable multibyte support - --enable-newlib-reent-check-verify enable checking of _REENT_CHECK memory allocation + --disable-newlib-reent-check-verify disable checking of _REENT_CHECK memory allocation --enable-newlib-iconv-encodings enable specific comma-separated list of bidirectional iconv encodings to be built-in --enable-newlib-iconv-from-encodings enable specific comma-separated list of \"from\" iconv encodings to be built-in --enable-newlib-iconv-to-encodings enable specific comma-separated list of \"to\" iconv encodings to be built-in diff --git a/newlib/configure.host b/newlib/configure.host index 406dac861..a84c0c80a 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -970,8 +970,8 @@ fi # Enable _REENT_CHECK macro memory allocation verification. if [ "x${newlib_reent_check_verify}" = "x" ]; then - if [ ${default_newlib_reent_check_verify} = "no" ]; then - newlib_reent_check_verify="no"; + if [ ${default_newlib_reent_check_verify} = "yes" ]; then + newlib_reent_check_verify="yes"; fi fi diff --git a/newlib/configure.in b/newlib/configure.in index ec5039d2b..67597bb48 100644 --- a/newlib/configure.in +++ b/newlib/configure.in @@ -67,9 +67,9 @@ AC_ARG_ENABLE(newlib-mb, esac], [newlib_mb=])dnl dnl Enable verification of successful memory allocation for _REENT_CHECK family of macros -dnl Support --enable-newlib-reent-check-verify +dnl Support --disable-newlib-reent-check-verify AC_ARG_ENABLE(newlib-reent-check-verify, -[ --enable-newlib-reent-check-verify enable checking of _REENT_CHECK memory allocation], +[ --disable-newlib-reent-check-verify disable checking of _REENT_CHECK memory allocation], [case "${enableval}" in yes) newlib_reent_check_verify=yes;; no) newlib_reent_check_verify=no ;; From 4e78f8ea163fec468072e8fe1f498b9abaaf838f Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 21 Jan 2020 15:17:43 -0500 Subject: [PATCH 159/520] Bump up newlib release to 3.3.0 --- newlib/acinclude.m4 | 2 +- newlib/configure | 24 +++++++++---------- newlib/doc/configure | 20 ++++++++-------- newlib/iconvdata/configure | 20 ++++++++-------- newlib/libc/configure | 20 ++++++++-------- newlib/libc/machine/a29k/configure | 20 ++++++++-------- newlib/libc/machine/aarch64/configure | 20 ++++++++-------- newlib/libc/machine/amdgcn/configure | 20 ++++++++-------- newlib/libc/machine/arc/configure | 20 ++++++++-------- newlib/libc/machine/arm/configure | 20 ++++++++-------- newlib/libc/machine/bfin/configure | 20 ++++++++-------- newlib/libc/machine/configure | 20 ++++++++-------- newlib/libc/machine/cr16/configure | 20 ++++++++-------- newlib/libc/machine/cris/configure | 20 ++++++++-------- newlib/libc/machine/crx/configure | 20 ++++++++-------- newlib/libc/machine/d10v/configure | 20 ++++++++-------- newlib/libc/machine/d30v/configure | 20 ++++++++-------- newlib/libc/machine/epiphany/configure | 20 ++++++++-------- newlib/libc/machine/fr30/configure | 20 ++++++++-------- newlib/libc/machine/frv/configure | 20 ++++++++-------- newlib/libc/machine/ft32/configure | 20 ++++++++-------- newlib/libc/machine/h8300/configure | 20 ++++++++-------- newlib/libc/machine/h8500/configure | 20 ++++++++-------- newlib/libc/machine/hppa/configure | 20 ++++++++-------- newlib/libc/machine/i386/configure | 20 ++++++++-------- newlib/libc/machine/i960/configure | 20 ++++++++-------- newlib/libc/machine/iq2000/configure | 20 ++++++++-------- newlib/libc/machine/lm32/configure | 20 ++++++++-------- newlib/libc/machine/m32c/configure | 20 ++++++++-------- newlib/libc/machine/m32r/configure | 20 ++++++++-------- newlib/libc/machine/m68hc11/configure | 20 ++++++++-------- newlib/libc/machine/m68k/configure | 20 ++++++++-------- newlib/libc/machine/m88k/configure | 20 ++++++++-------- newlib/libc/machine/mep/configure | 20 ++++++++-------- newlib/libc/machine/microblaze/configure | 20 ++++++++-------- newlib/libc/machine/mips/configure | 20 ++++++++-------- newlib/libc/machine/mn10200/configure | 20 ++++++++-------- newlib/libc/machine/mn10300/configure | 20 ++++++++-------- newlib/libc/machine/moxie/configure | 20 ++++++++-------- newlib/libc/machine/msp430/configure | 20 ++++++++-------- newlib/libc/machine/mt/configure | 20 ++++++++-------- newlib/libc/machine/nds32/configure | 20 ++++++++-------- newlib/libc/machine/necv70/configure | 20 ++++++++-------- newlib/libc/machine/nios2/configure | 20 ++++++++-------- newlib/libc/machine/nvptx/configure | 20 ++++++++-------- newlib/libc/machine/or1k/configure | 20 ++++++++-------- newlib/libc/machine/powerpc/configure | 20 ++++++++-------- newlib/libc/machine/pru/configure | 20 ++++++++-------- newlib/libc/machine/riscv/configure | 20 ++++++++-------- newlib/libc/machine/rl78/configure | 20 ++++++++-------- newlib/libc/machine/rx/configure | 20 ++++++++-------- newlib/libc/machine/sh/configure | 20 ++++++++-------- newlib/libc/machine/sparc/configure | 20 ++++++++-------- newlib/libc/machine/spu/configure | 20 ++++++++-------- newlib/libc/machine/tic4x/configure | 20 ++++++++-------- newlib/libc/machine/tic6x/configure | 20 ++++++++-------- newlib/libc/machine/tic80/configure | 20 ++++++++-------- newlib/libc/machine/v850/configure | 20 ++++++++-------- newlib/libc/machine/visium/configure | 20 ++++++++-------- newlib/libc/machine/w65/configure | 20 ++++++++-------- newlib/libc/machine/x86_64/configure | 20 ++++++++-------- newlib/libc/machine/xc16x/configure | 20 ++++++++-------- newlib/libc/machine/xscale/configure | 20 ++++++++-------- newlib/libc/machine/xstormy16/configure | 20 ++++++++-------- newlib/libc/machine/z8k/configure | 20 ++++++++-------- newlib/libc/sys/a29khif/configure | 20 ++++++++-------- newlib/libc/sys/amdgcn/configure | 20 ++++++++-------- newlib/libc/sys/arm/configure | 20 ++++++++-------- newlib/libc/sys/configure | 20 ++++++++-------- newlib/libc/sys/d10v/configure | 20 ++++++++-------- newlib/libc/sys/decstation/configure | 20 ++++++++-------- newlib/libc/sys/epiphany/configure | 20 ++++++++-------- newlib/libc/sys/h8300hms/configure | 20 ++++++++-------- newlib/libc/sys/h8500hms/configure | 20 ++++++++-------- newlib/libc/sys/linux/configure | 20 ++++++++-------- newlib/libc/sys/linux/linuxthreads/configure | 20 ++++++++-------- .../sys/linux/linuxthreads/machine/configure | 20 ++++++++-------- .../linux/linuxthreads/machine/i386/configure | 20 ++++++++-------- newlib/libc/sys/linux/machine/configure | 20 ++++++++-------- newlib/libc/sys/linux/machine/i386/configure | 20 ++++++++-------- newlib/libc/sys/m88kbug/configure | 20 ++++++++-------- newlib/libc/sys/mmixware/configure | 20 ++++++++-------- newlib/libc/sys/netware/configure | 20 ++++++++-------- newlib/libc/sys/or1k/configure | 20 ++++++++-------- newlib/libc/sys/phoenix/configure | 20 ++++++++-------- newlib/libc/sys/rdos/configure | 20 ++++++++-------- newlib/libc/sys/rtems/configure | 20 ++++++++-------- newlib/libc/sys/sh/configure | 20 ++++++++-------- newlib/libc/sys/sparc64/configure | 20 ++++++++-------- newlib/libc/sys/sun4/configure | 20 ++++++++-------- newlib/libc/sys/sysmec/configure | 20 ++++++++-------- newlib/libc/sys/sysnec810/configure | 20 ++++++++-------- newlib/libc/sys/sysnecv850/configure | 20 ++++++++-------- newlib/libc/sys/sysvi386/configure | 20 ++++++++-------- newlib/libc/sys/sysvnecv70/configure | 20 ++++++++-------- newlib/libc/sys/tic80/configure | 20 ++++++++-------- newlib/libc/sys/tirtos/configure | 20 ++++++++-------- newlib/libc/sys/w65/configure | 20 ++++++++-------- newlib/libc/sys/z8ksim/configure | 20 ++++++++-------- newlib/libm/configure | 20 ++++++++-------- newlib/libm/machine/aarch64/configure | 20 ++++++++-------- newlib/libm/machine/arm/configure | 20 ++++++++-------- newlib/libm/machine/configure | 20 ++++++++-------- newlib/libm/machine/i386/configure | 20 ++++++++-------- newlib/libm/machine/nds32/configure | 20 ++++++++-------- newlib/libm/machine/pru/configure | 20 ++++++++-------- newlib/libm/machine/riscv/configure | 20 ++++++++-------- newlib/libm/machine/spu/configure | 20 ++++++++-------- newlib/libm/machine/x86_64/configure | 20 ++++++++-------- 109 files changed, 1083 insertions(+), 1083 deletions(-) diff --git a/newlib/acinclude.m4 b/newlib/acinclude.m4 index 650ac8b89..f464dc5ea 100644 --- a/newlib/acinclude.m4 +++ b/newlib/acinclude.m4 @@ -2,7 +2,7 @@ dnl This provides configure definitions used by all the newlib dnl configure.in files. AC_DEFUN([DEF_NEWLIB_MAJOR_VERSION],m4_define([NEWLIB_MAJOR_VERSION],[3])) -AC_DEFUN([DEF_NEWLIB_MINOR_VERSION],m4_define([NEWLIB_MINOR_VERSION],[2])) +AC_DEFUN([DEF_NEWLIB_MINOR_VERSION],m4_define([NEWLIB_MINOR_VERSION],[3])) AC_DEFUN([DEF_NEWLIB_PATCHLEVEL_VERSION],m4_define([NEWLIB_PATCHLEVEL_VERSION],[0])) AC_DEFUN([DEF_NEWLIB_VERSION],m4_define([NEWLIB_VERSION],[NEWLIB_MAJOR_VERSION.NEWLIB_MINOR_VERSION.NEWLIB_PATCHLEVEL_VERSION])) diff --git a/newlib/configure b/newlib/configure index ea98e04f0..d6c3372d8 100755 --- a/newlib/configure +++ b/newlib/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1380,7 +1380,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1450,7 +1450,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1586,7 +1586,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1864,7 +1864,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -3235,7 +3235,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -12444,13 +12444,13 @@ _ACEOF fi -$as_echo "#define _NEWLIB_VERSION \"3.2.0\"" >>confdefs.h +$as_echo "#define _NEWLIB_VERSION \"3.3.0\"" >>confdefs.h $as_echo "#define __NEWLIB__ 3" >>confdefs.h -$as_echo "#define __NEWLIB_MINOR__ 2" >>confdefs.h +$as_echo "#define __NEWLIB_MINOR__ 3" >>confdefs.h $as_echo "#define __NEWLIB_PATCHLEVEL__ 0" >>confdefs.h @@ -13383,7 +13383,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13449,7 +13449,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/doc/configure b/newlib/doc/configure index 838f4c482..766427f07 100755 --- a/newlib/doc/configure +++ b/newlib/doc/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1242,7 +1242,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1312,7 +1312,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1404,7 +1404,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1459,7 +1459,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2543,7 +2543,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4063,7 +4063,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4120,7 +4120,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/iconvdata/configure b/newlib/iconvdata/configure index eb3998dea..98306eca7 100755 --- a/newlib/iconvdata/configure +++ b/newlib/iconvdata/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1323,7 +1323,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1393,7 +1393,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1505,7 +1505,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1783,7 +1783,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2867,7 +2867,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -12396,7 +12396,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12453,7 +12453,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/configure b/newlib/libc/configure index c64165e29..bb98d8439 100755 --- a/newlib/libc/configure +++ b/newlib/libc/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1371,7 +1371,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1441,7 +1441,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1557,7 +1557,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1835,7 +1835,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2982,7 +2982,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -12795,7 +12795,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12852,7 +12852,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/a29k/configure b/newlib/libc/machine/a29k/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libc/machine/a29k/configure +++ b/newlib/libc/machine/a29k/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/aarch64/configure b/newlib/libc/machine/aarch64/configure index a3b88723c..de70ed6f6 100755 --- a/newlib/libc/machine/aarch64/configure +++ b/newlib/libc/machine/aarch64/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/amdgcn/configure b/newlib/libc/machine/amdgcn/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libc/machine/amdgcn/configure +++ b/newlib/libc/machine/amdgcn/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/arc/configure b/newlib/libc/machine/arc/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libc/machine/arc/configure +++ b/newlib/libc/machine/arc/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/arm/configure b/newlib/libc/machine/arm/configure index 69cbccd09..412990e5e 100755 --- a/newlib/libc/machine/arm/configure +++ b/newlib/libc/machine/arm/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1241,7 +1241,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1311,7 +1311,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1403,7 +1403,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1458,7 +1458,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2542,7 +2542,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4028,7 +4028,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4085,7 +4085,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/bfin/configure b/newlib/libc/machine/bfin/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libc/machine/bfin/configure +++ b/newlib/libc/machine/bfin/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/configure b/newlib/libc/machine/configure index 1ae827816..ab977a0f2 100755 --- a/newlib/libc/machine/configure +++ b/newlib/libc/machine/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1384,7 +1384,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1454,7 +1454,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1566,7 +1566,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1844,7 +1844,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2928,7 +2928,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -12593,7 +12593,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12650,7 +12650,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/cr16/configure b/newlib/libc/machine/cr16/configure index 7c9724c54..a8f343ac9 100644 --- a/newlib/libc/machine/cr16/configure +++ b/newlib/libc/machine/cr16/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/cris/configure b/newlib/libc/machine/cris/configure index 33b232b86..2b24576f4 100755 --- a/newlib/libc/machine/cris/configure +++ b/newlib/libc/machine/cris/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/crx/configure b/newlib/libc/machine/crx/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libc/machine/crx/configure +++ b/newlib/libc/machine/crx/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/d10v/configure b/newlib/libc/machine/d10v/configure index a3b88723c..de70ed6f6 100755 --- a/newlib/libc/machine/d10v/configure +++ b/newlib/libc/machine/d10v/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/d30v/configure b/newlib/libc/machine/d30v/configure index a3b88723c..de70ed6f6 100755 --- a/newlib/libc/machine/d30v/configure +++ b/newlib/libc/machine/d30v/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/epiphany/configure b/newlib/libc/machine/epiphany/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libc/machine/epiphany/configure +++ b/newlib/libc/machine/epiphany/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/fr30/configure b/newlib/libc/machine/fr30/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libc/machine/fr30/configure +++ b/newlib/libc/machine/fr30/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/frv/configure b/newlib/libc/machine/frv/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libc/machine/frv/configure +++ b/newlib/libc/machine/frv/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/ft32/configure b/newlib/libc/machine/ft32/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libc/machine/ft32/configure +++ b/newlib/libc/machine/ft32/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/h8300/configure b/newlib/libc/machine/h8300/configure index 8cb8966a4..4a3d107d1 100755 --- a/newlib/libc/machine/h8300/configure +++ b/newlib/libc/machine/h8300/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/h8500/configure b/newlib/libc/machine/h8500/configure index 4c746e1d4..c7defa5ee 100755 --- a/newlib/libc/machine/h8500/configure +++ b/newlib/libc/machine/h8500/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/hppa/configure b/newlib/libc/machine/hppa/configure index 858819676..05576a405 100755 --- a/newlib/libc/machine/hppa/configure +++ b/newlib/libc/machine/hppa/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/i386/configure b/newlib/libc/machine/i386/configure index 1b1b48a63..0add9710e 100755 --- a/newlib/libc/machine/i386/configure +++ b/newlib/libc/machine/i386/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1325,7 +1325,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1395,7 +1395,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1507,7 +1507,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1785,7 +1785,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2869,7 +2869,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -12411,7 +12411,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12468,7 +12468,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/i960/configure b/newlib/libc/machine/i960/configure index dce3c4cc3..4d297b03e 100755 --- a/newlib/libc/machine/i960/configure +++ b/newlib/libc/machine/i960/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/iq2000/configure b/newlib/libc/machine/iq2000/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libc/machine/iq2000/configure +++ b/newlib/libc/machine/iq2000/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/lm32/configure b/newlib/libc/machine/lm32/configure index a3b88723c..de70ed6f6 100755 --- a/newlib/libc/machine/lm32/configure +++ b/newlib/libc/machine/lm32/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/m32c/configure b/newlib/libc/machine/m32c/configure index a3b88723c..de70ed6f6 100755 --- a/newlib/libc/machine/m32c/configure +++ b/newlib/libc/machine/m32c/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/m32r/configure b/newlib/libc/machine/m32r/configure index a3b88723c..de70ed6f6 100755 --- a/newlib/libc/machine/m32r/configure +++ b/newlib/libc/machine/m32r/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/m68hc11/configure b/newlib/libc/machine/m68hc11/configure index a3b88723c..de70ed6f6 100755 --- a/newlib/libc/machine/m68hc11/configure +++ b/newlib/libc/machine/m68hc11/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/m68k/configure b/newlib/libc/machine/m68k/configure index a3b88723c..de70ed6f6 100755 --- a/newlib/libc/machine/m68k/configure +++ b/newlib/libc/machine/m68k/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/m88k/configure b/newlib/libc/machine/m88k/configure index a3b88723c..de70ed6f6 100755 --- a/newlib/libc/machine/m88k/configure +++ b/newlib/libc/machine/m88k/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/mep/configure b/newlib/libc/machine/mep/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libc/machine/mep/configure +++ b/newlib/libc/machine/mep/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/microblaze/configure b/newlib/libc/machine/microblaze/configure index f7c7ce211..d454eb15d 100644 --- a/newlib/libc/machine/microblaze/configure +++ b/newlib/libc/machine/microblaze/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/mips/configure b/newlib/libc/machine/mips/configure index a3b88723c..de70ed6f6 100755 --- a/newlib/libc/machine/mips/configure +++ b/newlib/libc/machine/mips/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/mn10200/configure b/newlib/libc/machine/mn10200/configure index a3b88723c..de70ed6f6 100755 --- a/newlib/libc/machine/mn10200/configure +++ b/newlib/libc/machine/mn10200/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/mn10300/configure b/newlib/libc/machine/mn10300/configure index 858819676..05576a405 100755 --- a/newlib/libc/machine/mn10300/configure +++ b/newlib/libc/machine/mn10300/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/moxie/configure b/newlib/libc/machine/moxie/configure index 7c9724c54..a8f343ac9 100644 --- a/newlib/libc/machine/moxie/configure +++ b/newlib/libc/machine/moxie/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/msp430/configure b/newlib/libc/machine/msp430/configure index d2c0de64e..b0abe8152 100755 --- a/newlib/libc/machine/msp430/configure +++ b/newlib/libc/machine/msp430/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1243,7 +1243,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1313,7 +1313,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1406,7 +1406,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1461,7 +1461,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2565,7 +2565,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4053,7 +4053,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4110,7 +4110,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/mt/configure b/newlib/libc/machine/mt/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libc/machine/mt/configure +++ b/newlib/libc/machine/mt/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/nds32/configure b/newlib/libc/machine/nds32/configure index c295e1ecf..13bd08db7 100755 --- a/newlib/libc/machine/nds32/configure +++ b/newlib/libc/machine/nds32/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1254,7 +1254,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1324,7 +1324,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1423,7 +1423,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1478,7 +1478,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2562,7 +2562,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -5087,7 +5087,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5144,7 +5144,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/necv70/configure b/newlib/libc/machine/necv70/configure index a9cb3e7cf..fe6221446 100755 --- a/newlib/libc/machine/necv70/configure +++ b/newlib/libc/machine/necv70/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/nios2/configure b/newlib/libc/machine/nios2/configure index a80f5e6ce..84532408c 100755 --- a/newlib/libc/machine/nios2/configure +++ b/newlib/libc/machine/nios2/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/nvptx/configure b/newlib/libc/machine/nvptx/configure index 7c9724c54..a8f343ac9 100644 --- a/newlib/libc/machine/nvptx/configure +++ b/newlib/libc/machine/nvptx/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/or1k/configure b/newlib/libc/machine/or1k/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libc/machine/or1k/configure +++ b/newlib/libc/machine/or1k/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/powerpc/configure b/newlib/libc/machine/powerpc/configure index 38ca6a9c5..dd70b06ea 100755 --- a/newlib/libc/machine/powerpc/configure +++ b/newlib/libc/machine/powerpc/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1241,7 +1241,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1311,7 +1311,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1403,7 +1403,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1458,7 +1458,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2542,7 +2542,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4037,7 +4037,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4094,7 +4094,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/pru/configure b/newlib/libc/machine/pru/configure index a80f5e6ce..84532408c 100755 --- a/newlib/libc/machine/pru/configure +++ b/newlib/libc/machine/pru/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/riscv/configure b/newlib/libc/machine/riscv/configure index dbbd82c88..c7c193f57 100755 --- a/newlib/libc/machine/riscv/configure +++ b/newlib/libc/machine/riscv/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/rl78/configure b/newlib/libc/machine/rl78/configure index a3b88723c..de70ed6f6 100755 --- a/newlib/libc/machine/rl78/configure +++ b/newlib/libc/machine/rl78/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/rx/configure b/newlib/libc/machine/rx/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libc/machine/rx/configure +++ b/newlib/libc/machine/rx/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/sh/configure b/newlib/libc/machine/sh/configure index 233bea7e7..162c1a029 100755 --- a/newlib/libc/machine/sh/configure +++ b/newlib/libc/machine/sh/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -557,8 +557,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1259,7 +1259,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1329,7 +1329,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1429,7 +1429,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1521,7 +1521,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2607,7 +2607,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -5394,7 +5394,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5451,7 +5451,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/sparc/configure b/newlib/libc/machine/sparc/configure index 0793a40ff..7d0c50464 100755 --- a/newlib/libc/machine/sparc/configure +++ b/newlib/libc/machine/sparc/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/spu/configure b/newlib/libc/machine/spu/configure index e3ed55b0e..908f7e070 100644 --- a/newlib/libc/machine/spu/configure +++ b/newlib/libc/machine/spu/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1242,7 +1242,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1312,7 +1312,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1404,7 +1404,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1459,7 +1459,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2543,7 +2543,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4059,7 +4059,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4116,7 +4116,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/tic4x/configure b/newlib/libc/machine/tic4x/configure index a3b88723c..de70ed6f6 100755 --- a/newlib/libc/machine/tic4x/configure +++ b/newlib/libc/machine/tic4x/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/tic6x/configure b/newlib/libc/machine/tic6x/configure index a3b88723c..de70ed6f6 100755 --- a/newlib/libc/machine/tic6x/configure +++ b/newlib/libc/machine/tic6x/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/tic80/configure b/newlib/libc/machine/tic80/configure index a3b88723c..de70ed6f6 100755 --- a/newlib/libc/machine/tic80/configure +++ b/newlib/libc/machine/tic80/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/v850/configure b/newlib/libc/machine/v850/configure index a3b88723c..de70ed6f6 100755 --- a/newlib/libc/machine/v850/configure +++ b/newlib/libc/machine/v850/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/visium/configure b/newlib/libc/machine/visium/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libc/machine/visium/configure +++ b/newlib/libc/machine/visium/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/w65/configure b/newlib/libc/machine/w65/configure index 4c746e1d4..c7defa5ee 100755 --- a/newlib/libc/machine/w65/configure +++ b/newlib/libc/machine/w65/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/x86_64/configure b/newlib/libc/machine/x86_64/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libc/machine/x86_64/configure +++ b/newlib/libc/machine/x86_64/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/xc16x/configure b/newlib/libc/machine/xc16x/configure index a3b88723c..de70ed6f6 100644 --- a/newlib/libc/machine/xc16x/configure +++ b/newlib/libc/machine/xc16x/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/xscale/configure b/newlib/libc/machine/xscale/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libc/machine/xscale/configure +++ b/newlib/libc/machine/xscale/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/xstormy16/configure b/newlib/libc/machine/xstormy16/configure index a3b88723c..de70ed6f6 100755 --- a/newlib/libc/machine/xstormy16/configure +++ b/newlib/libc/machine/xstormy16/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/machine/z8k/configure b/newlib/libc/machine/z8k/configure index 4b4824887..79dc13401 100755 --- a/newlib/libc/machine/z8k/configure +++ b/newlib/libc/machine/z8k/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/a29khif/configure b/newlib/libc/sys/a29khif/configure index 0aff8de51..5ac3b714e 100755 --- a/newlib/libc/sys/a29khif/configure +++ b/newlib/libc/sys/a29khif/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/amdgcn/configure b/newlib/libc/sys/amdgcn/configure index 21ce09f98..3a5b721bd 100755 --- a/newlib/libc/sys/amdgcn/configure +++ b/newlib/libc/sys/amdgcn/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/arm/configure b/newlib/libc/sys/arm/configure index 6ed794a5b..93dbbde4c 100755 --- a/newlib/libc/sys/arm/configure +++ b/newlib/libc/sys/arm/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/configure b/newlib/libc/sys/configure index 622ca9c2c..461c1a133 100755 --- a/newlib/libc/sys/configure +++ b/newlib/libc/sys/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1355,7 +1355,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1425,7 +1425,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1537,7 +1537,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1815,7 +1815,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2899,7 +2899,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -12510,7 +12510,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12567,7 +12567,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/d10v/configure b/newlib/libc/sys/d10v/configure index 26eb44cc5..01c8dd99f 100755 --- a/newlib/libc/sys/d10v/configure +++ b/newlib/libc/sys/d10v/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/decstation/configure b/newlib/libc/sys/decstation/configure index 6f8e735b4..4ed8defab 100755 --- a/newlib/libc/sys/decstation/configure +++ b/newlib/libc/sys/decstation/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/epiphany/configure b/newlib/libc/sys/epiphany/configure index eb675efc7..61a213e7c 100755 --- a/newlib/libc/sys/epiphany/configure +++ b/newlib/libc/sys/epiphany/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/h8300hms/configure b/newlib/libc/sys/h8300hms/configure index 43b5fee94..c89168038 100755 --- a/newlib/libc/sys/h8300hms/configure +++ b/newlib/libc/sys/h8300hms/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/h8500hms/configure b/newlib/libc/sys/h8500hms/configure index c7a27ecd1..29f5ff09a 100755 --- a/newlib/libc/sys/h8500hms/configure +++ b/newlib/libc/sys/h8500hms/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/linux/configure b/newlib/libc/sys/linux/configure index d99fac137..dd3b899ba 100755 --- a/newlib/libc/sys/linux/configure +++ b/newlib/libc/sys/linux/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1329,7 +1329,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1399,7 +1399,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1511,7 +1511,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1789,7 +1789,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2873,7 +2873,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -12477,7 +12477,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12534,7 +12534,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/linux/linuxthreads/configure b/newlib/libc/sys/linux/linuxthreads/configure index 429614bd7..19ea794d2 100755 --- a/newlib/libc/sys/linux/linuxthreads/configure +++ b/newlib/libc/sys/linux/linuxthreads/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1327,7 +1327,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1397,7 +1397,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1509,7 +1509,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1787,7 +1787,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2871,7 +2871,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -12454,7 +12454,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12511,7 +12511,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/linux/linuxthreads/machine/configure b/newlib/libc/sys/linux/linuxthreads/machine/configure index 718580393..93cffde00 100755 --- a/newlib/libc/sys/linux/linuxthreads/machine/configure +++ b/newlib/libc/sys/linux/linuxthreads/machine/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1327,7 +1327,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1397,7 +1397,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1509,7 +1509,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1787,7 +1787,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2871,7 +2871,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -12422,7 +12422,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12479,7 +12479,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/configure b/newlib/libc/sys/linux/linuxthreads/machine/i386/configure index d6d6abee6..7386be06d 100755 --- a/newlib/libc/sys/linux/linuxthreads/machine/i386/configure +++ b/newlib/libc/sys/linux/linuxthreads/machine/i386/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1323,7 +1323,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1393,7 +1393,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1505,7 +1505,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1783,7 +1783,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2867,7 +2867,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -12438,7 +12438,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12495,7 +12495,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/linux/machine/configure b/newlib/libc/sys/linux/machine/configure index 9e01b9221..3b2b75d17 100755 --- a/newlib/libc/sys/linux/machine/configure +++ b/newlib/libc/sys/linux/machine/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1328,7 +1328,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1398,7 +1398,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1510,7 +1510,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1788,7 +1788,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2872,7 +2872,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -12429,7 +12429,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12486,7 +12486,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/linux/machine/i386/configure b/newlib/libc/sys/linux/machine/i386/configure index c68286471..0b0a73074 100755 --- a/newlib/libc/sys/linux/machine/i386/configure +++ b/newlib/libc/sys/linux/machine/i386/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1323,7 +1323,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1393,7 +1393,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1505,7 +1505,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1783,7 +1783,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2867,7 +2867,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -12438,7 +12438,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12495,7 +12495,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/m88kbug/configure b/newlib/libc/sys/m88kbug/configure index 7e8bf568f..518536d07 100755 --- a/newlib/libc/sys/m88kbug/configure +++ b/newlib/libc/sys/m88kbug/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/mmixware/configure b/newlib/libc/sys/mmixware/configure index 2bae9dc3d..0830b1ae5 100755 --- a/newlib/libc/sys/mmixware/configure +++ b/newlib/libc/sys/mmixware/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/netware/configure b/newlib/libc/sys/netware/configure index fdcc8ee21..5c3b8e0a4 100755 --- a/newlib/libc/sys/netware/configure +++ b/newlib/libc/sys/netware/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/or1k/configure b/newlib/libc/sys/or1k/configure index fc992aa41..a856397ab 100755 --- a/newlib/libc/sys/or1k/configure +++ b/newlib/libc/sys/or1k/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/phoenix/configure b/newlib/libc/sys/phoenix/configure index a3172c39c..8c1af5d89 100644 --- a/newlib/libc/sys/phoenix/configure +++ b/newlib/libc/sys/phoenix/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1243,7 +1243,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1313,7 +1313,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1405,7 +1405,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1460,7 +1460,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2544,7 +2544,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4036,7 +4036,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4093,7 +4093,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/rdos/configure b/newlib/libc/sys/rdos/configure index 21ce09f98..3a5b721bd 100755 --- a/newlib/libc/sys/rdos/configure +++ b/newlib/libc/sys/rdos/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/rtems/configure b/newlib/libc/sys/rtems/configure index b324bc5b3..2b92f4fa7 100755 --- a/newlib/libc/sys/rtems/configure +++ b/newlib/libc/sys/rtems/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/sh/configure b/newlib/libc/sys/sh/configure index 26eb44cc5..01c8dd99f 100755 --- a/newlib/libc/sys/sh/configure +++ b/newlib/libc/sys/sh/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/sparc64/configure b/newlib/libc/sys/sparc64/configure index 1c166c02c..6ffb86765 100755 --- a/newlib/libc/sys/sparc64/configure +++ b/newlib/libc/sys/sparc64/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/sun4/configure b/newlib/libc/sys/sun4/configure index 2b170362a..765ce9e59 100755 --- a/newlib/libc/sys/sun4/configure +++ b/newlib/libc/sys/sun4/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/sysmec/configure b/newlib/libc/sys/sysmec/configure index 43b5fee94..c89168038 100755 --- a/newlib/libc/sys/sysmec/configure +++ b/newlib/libc/sys/sysmec/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/sysnec810/configure b/newlib/libc/sys/sysnec810/configure index bf82100e6..b9fb8e8f2 100755 --- a/newlib/libc/sys/sysnec810/configure +++ b/newlib/libc/sys/sysnec810/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/sysnecv850/configure b/newlib/libc/sys/sysnecv850/configure index 43b5fee94..c89168038 100755 --- a/newlib/libc/sys/sysnecv850/configure +++ b/newlib/libc/sys/sysnecv850/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/sysvi386/configure b/newlib/libc/sys/sysvi386/configure index e42e6a337..55fb1c089 100755 --- a/newlib/libc/sys/sysvi386/configure +++ b/newlib/libc/sys/sysvi386/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/sysvnecv70/configure b/newlib/libc/sys/sysvnecv70/configure index 648354a2c..2eeb1f41c 100755 --- a/newlib/libc/sys/sysvnecv70/configure +++ b/newlib/libc/sys/sysvnecv70/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/tic80/configure b/newlib/libc/sys/tic80/configure index 2bae9dc3d..0830b1ae5 100755 --- a/newlib/libc/sys/tic80/configure +++ b/newlib/libc/sys/tic80/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/tirtos/configure b/newlib/libc/sys/tirtos/configure index 1761d4230..e825e86b3 100755 --- a/newlib/libc/sys/tirtos/configure +++ b/newlib/libc/sys/tirtos/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/w65/configure b/newlib/libc/sys/w65/configure index aed6d3ce9..2402888df 100755 --- a/newlib/libc/sys/w65/configure +++ b/newlib/libc/sys/w65/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libc/sys/z8ksim/configure b/newlib/libc/sys/z8ksim/configure index 69fd8f6f6..3e6c96c97 100755 --- a/newlib/libc/sys/z8ksim/configure +++ b/newlib/libc/sys/z8ksim/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/configure b/newlib/libm/configure index 297ed5ea6..87b04df4d 100755 --- a/newlib/libm/configure +++ b/newlib/libm/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1331,7 +1331,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1401,7 +1401,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1514,7 +1514,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1792,7 +1792,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2931,7 +2931,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -12484,7 +12484,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12541,7 +12541,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/machine/aarch64/configure b/newlib/libm/machine/aarch64/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libm/machine/aarch64/configure +++ b/newlib/libm/machine/aarch64/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/machine/arm/configure b/newlib/libm/machine/arm/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libm/machine/arm/configure +++ b/newlib/libm/machine/arm/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/machine/configure b/newlib/libm/machine/configure index bd7037587..1578d31f2 100755 --- a/newlib/libm/machine/configure +++ b/newlib/libm/machine/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1335,7 +1335,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1405,7 +1405,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1517,7 +1517,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1795,7 +1795,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2879,7 +2879,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -12453,7 +12453,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12510,7 +12510,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/machine/i386/configure b/newlib/libm/machine/i386/configure index 309398980..48a6c0fb1 100755 --- a/newlib/libm/machine/i386/configure +++ b/newlib/libm/machine/i386/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1323,7 +1323,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1393,7 +1393,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1505,7 +1505,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1783,7 +1783,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2867,7 +2867,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -12396,7 +12396,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12453,7 +12453,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/machine/nds32/configure b/newlib/libm/machine/nds32/configure index fc31f3da7..c2fe0bc77 100644 --- a/newlib/libm/machine/nds32/configure +++ b/newlib/libm/machine/nds32/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1256,7 +1256,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1326,7 +1326,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1425,7 +1425,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1480,7 +1480,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2564,7 +2564,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -5122,7 +5122,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5179,7 +5179,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/machine/pru/configure b/newlib/libm/machine/pru/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libm/machine/pru/configure +++ b/newlib/libm/machine/pru/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/machine/riscv/configure b/newlib/libm/machine/riscv/configure index 7c9724c54..a8f343ac9 100755 --- a/newlib/libm/machine/riscv/configure +++ b/newlib/libm/machine/riscv/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/machine/spu/configure b/newlib/libm/machine/spu/configure index 7c9724c54..a8f343ac9 100644 --- a/newlib/libm/machine/spu/configure +++ b/newlib/libm/machine/spu/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -556,8 +556,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1310,7 +1310,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1402,7 +1402,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2541,7 +2541,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4082,7 +4082,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/newlib/libm/machine/x86_64/configure b/newlib/libm/machine/x86_64/configure index 87fda5795..324916eb6 100755 --- a/newlib/libm/machine/x86_64/configure +++ b/newlib/libm/machine/x86_64/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for newlib 3.2.0. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='newlib' PACKAGE_TARNAME='newlib' -PACKAGE_VERSION='3.2.0' -PACKAGE_STRING='newlib 3.2.0' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1323,7 +1323,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures newlib 3.2.0 to adapt to many kinds of systems. +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1393,7 +1393,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of newlib 3.2.0:";; + short | recursive ) echo "Configuration of newlib 3.3.0:";; esac cat <<\_ACEOF @@ -1505,7 +1505,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -newlib configure 3.2.0 +newlib configure 3.3.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1783,7 +1783,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by newlib $as_me 3.2.0, which was +It was created by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2867,7 +2867,7 @@ fi # Define the identity of the package. PACKAGE='newlib' - VERSION='3.2.0' + VERSION='3.3.0' # Some tools Automake needs. @@ -12396,7 +12396,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by newlib $as_me 3.2.0, which was +This file was extended by newlib $as_me 3.3.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12453,7 +12453,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -newlib config.status 3.2.0 +newlib config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" From da4ee7d60b9ff0bcdc081609a4467adb428d58e6 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Tue, 21 Jan 2020 23:41:44 +0900 Subject: [PATCH 160/520] Cygwin: pty: Fix reopening slave in push_to_pcon_screenbuffer(). - For programs compiled with -mwindows option, reopening slave is needed in push_to_pcon_screenbuffer(), however, it was not at appropriate place. This causes the problem reported in https://www.cygwin.com/ml/cygwin/2020-01/msg00161.html. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 8ed1f8a0b..50f03781c 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1273,9 +1273,21 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) break; } + int retry_count; + retry_count = 0; DWORD dwMode, flags; flags = ENABLE_VIRTUAL_TERMINAL_PROCESSING; - GetConsoleMode (get_output_handle (), &dwMode); + while (!GetConsoleMode (get_output_handle (), &dwMode)) + { + termios_printf ("GetConsoleMode failed, %E"); + /* Re-open handles */ + this->close (); + this->open (0, 0); + /* Fix pseudo console window size */ + this->ioctl (TIOCSWINSZ, &get_ttyp ()->winsize); + if (++retry_count > 3) + goto cleanup; + } if (!(get_ttyp ()->ti.c_oflag & OPOST) || !(get_ttyp ()->ti.c_oflag & ONLCR)) flags |= DISABLE_NEWLINE_AUTO_RETURN; @@ -1284,8 +1296,6 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) p = buf; DWORD wLen, written; written = 0; - int retry_count; - retry_count = 0; BOOL (WINAPI *WriteFunc) (HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED); WriteFunc = WriteFile_Orig ? WriteFile_Orig : WriteFile; @@ -1294,16 +1304,13 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) if (!WriteFunc (get_output_handle (), p, nlen - written, &wLen, NULL)) { termios_printf ("WriteFile failed, %E"); - this->open (0, 0); /* Re-open handles */ - /* Fix pseudo console window size */ - struct winsize win; - this->ioctl (TIOCGWINSZ, &win); - this->ioctl (TIOCSWINSZ, &win); - if (++retry_count > 3) - break; + break; + } + else + { + written += wLen; + p += wLen; } - written += wLen; - p += wLen; } /* Detach from pseudo console and resume. */ flags = ENABLE_VIRTUAL_TERMINAL_PROCESSING; From cdf5db22f17b6f8e274168e3ff549f67d662bfb1 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Tue, 21 Jan 2020 22:25:13 +0900 Subject: [PATCH 161/520] Cygwin: pty: Introduce disable_pcon in environment CYGWIN. - For programs which does not work properly with pseudo console, disable_pcon in environment CYGWIN is introduced. If disable_pcon is set, pseudo console support is disabled. --- winsup/cygwin/environ.cc | 1 + winsup/cygwin/fhandler_tty.cc | 2 ++ winsup/cygwin/globals.cc | 1 + winsup/doc/cygwinenv.xml | 6 ++++++ 4 files changed, 10 insertions(+) diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index 8c5ce64e1..7eb4780a8 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -120,6 +120,7 @@ static struct parse_thing {"reset_com", {&reset_com}, setbool, NULL, {{false}, {true}}}, {"wincmdln", {&wincmdln}, setbool, NULL, {{false}, {true}}}, {"winsymlinks", {func: set_winsymlinks}, isfunc, NULL, {{0}, {0}}}, + {"disable_pcon", {&disable_pcon}, setbool, NULL, {{false}, {true}}}, {NULL, {0}, setdword, 0, {{0}, {0}}} }; diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 50f03781c..1710f2520 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -3145,6 +3145,8 @@ is_running_as_service (void) bool fhandler_pty_master::setup_pseudoconsole () { + if (disable_pcon) + return false; /* If the legacy console mode is enabled, pseudo console seems not to work as expected. To determine console mode, registry key ForceV2 in HKEY_CURRENT_USER\Console is checked. */ diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc index ebe8b569f..a9648fe6a 100644 --- a/winsup/cygwin/globals.cc +++ b/winsup/cygwin/globals.cc @@ -71,6 +71,7 @@ bool pipe_byte; bool reset_com; bool wincmdln; winsym_t allow_winsymlinks = WSYM_sysfile; +bool disable_pcon; bool NO_COPY in_forkee; diff --git a/winsup/doc/cygwinenv.xml b/winsup/doc/cygwinenv.xml index 6f67cb95d..67592cb7e 100644 --- a/winsup/doc/cygwinenv.xml +++ b/winsup/doc/cygwinenv.xml @@ -99,6 +99,12 @@ system call will immediately fail. . + +disable_pcon - if set, pseudo console support in +pty will be disabled. This is for programs which do not work properly +under pty with pseudo console enabled. Defaults to not set. + + From 6d79e0a58866548f435527798fbd4a6849d05bc7 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 22 Jan 2020 11:05:51 +0100 Subject: [PATCH 162/520] add pseudo console fixes to release text Signed-off-by: Corinna Vinschen --- winsup/cygwin/release/3.1.3 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/release/3.1.3 b/winsup/cygwin/release/3.1.3 index 425d8bb2d..f8752ad56 100644 --- a/winsup/cygwin/release/3.1.3 +++ b/winsup/cygwin/release/3.1.3 @@ -17,9 +17,15 @@ Bug Fixes: - Define CPU_SETSIZE, as on Linux. Addresses: https://cygwin.com/ml/cygwin/2019-12/msg00248.html -- Fix the problem which overrides the code page setting. - Addresses: https://www.cygwin.com/ml/cygwin/2019-12/msg00292.html - - Fix a regression that prevented the root of a drive from being the Cygwin installation root. Addresses: https://cygwin.com/ml/cygwin/2020-01/msg00111.html + +- Many fixes in new pseudo console support. + Addresses (among others): + https://cygwin.com/ml/cygwin/2019-12/msg00173.html + https://cygwin.com/ml/cygwin/2019-12/msg00292.html + https://cygwin.com/ml/cygwin/2019-12/msg00295.html + https://cygwin.com/ml/cygwin/2020-01/msg00093.html + https://cygwin.com/ml/cygwin/2020-01/msg00147.html + https://cygwin.com/ml/cygwin/2020-01/msg00161.html From 5fdcb8fc135a14846cc37d30cb11d1590e5113b8 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 23 Jan 2020 20:34:25 +0900 Subject: [PATCH 163/520] Cygwin: pty: Remove close() call just before reopening slave. - After commit da4ee7d60b9ff0bcdc081609a4467adb428d58e6, the issue reported in https://www.cygwin.com/ml/cygwin/2020-01/msg00209.html occurs. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 1710f2520..4977a8bd5 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1281,7 +1281,6 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) { termios_printf ("GetConsoleMode failed, %E"); /* Re-open handles */ - this->close (); this->open (0, 0); /* Fix pseudo console window size */ this->ioctl (TIOCSWINSZ, &get_ttyp ()->winsize); From 8f502bd33159cfe0f138a31442998a77602c8a9a Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Thu, 23 Jan 2020 02:06:27 -0700 Subject: [PATCH 164/520] fhandler_proc.cc:format_proc_cpuinfo add rdpru flag rdpru flag is cpuid xfn 80000008 ebx bit 4 added in linux 5.5; see AMD64 Architecture Programmer's Manual Volume 3: General-Purpose and System Instructions https://www.amd.com/system/files/TechDocs/24594.pdf#page=329 and elsewhere in that document --- winsup/cygwin/fhandler_proc.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 8c331f5f4..78a69703d 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -1255,6 +1255,7 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features1, 0, "clzero"); /* clzero instruction */ ftcprint (features1, 1, "irperf"); /* instr retired count */ ftcprint (features1, 2, "xsaveerptr"); /* save/rest FP err ptrs */ + ftcprint (features1, 4, "rdpru"); /* user level rd proc reg */ /* ftcprint (features1, 6, "mba"); */ /* memory BW alloc */ ftcprint (features1, 9, "wbnoinvd"); /* wbnoinvd instruction */ /* ftcprint (features1, 12, "ibpb" ); */ /* ind br pred barrier */ From 71091d165fe62f258a6dc9c61eba9f05d04acc69 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 24 Jan 2020 10:17:31 +0100 Subject: [PATCH 165/520] Cygwin: Bump DLL version to 3.1.3 Signed-off-by: Corinna Vinschen --- winsup/cygwin/include/cygwin/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 6c30fab03..7041e9abb 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -11,7 +11,7 @@ details. */ changes to the DLL and is mainly informative in nature. */ #define CYGWIN_VERSION_DLL_MAJOR 3001 -#define CYGWIN_VERSION_DLL_MINOR 2 +#define CYGWIN_VERSION_DLL_MINOR 3 /* Major numbers before CYGWIN_VERSION_DLL_EPOCH are incompatible. */ From d880e97ec95ac3b15be972a99da2a5e97ef63ee6 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Thu, 23 Jan 2020 16:31:04 +0000 Subject: [PATCH 166/520] Cygwin: device_access_denied: return false if O_PATH is set If O_PATH is set in the flags argument of fhandler_base::device_access_denied, return false. No read/write/execute access should be required in this case. Previously, the call to device_access_denied in open(2) would lead to an attempt to open the file with read access even if the O_PATH flag was set. --- winsup/cygwin/fhandler.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index b0c9c50c3..aeee8fe4d 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -335,6 +335,9 @@ fhandler_base::device_access_denied (int flags) { int mode = 0; + if (flags & O_PATH) + return false; + if (flags & O_RDWR) mode |= R_OK | W_OK; if (flags & (O_WRONLY | O_APPEND)) From 5fb3790422495ba55390bbac32b60bcea908ef70 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Thu, 23 Jan 2020 16:31:04 +0000 Subject: [PATCH 167/520] Cygwin: re-implement fhandler_fifo::open with O_PATH If the O_PATH flag is set, fhandler_fifo::open now simply calls fhandler_base::open_fs. The previous attempt to handle O_PATH in commit aa55d22c, "Cygwin: honor the O_PATH flag when opening a FIFO", fixed a hang but otherwise didn't do anything useful. --- winsup/cygwin/fhandler_fifo.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index fd8223000..8cbab353c 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -453,17 +453,13 @@ fhandler_fifo::open (int flags, mode_t) } res; if (flags & O_PATH) - { - query_open (query_read_attributes); - nohandle (true); - } + return open_fs (flags); /* Determine what we're doing with this fhandler: reading, writing, both */ switch (flags & O_ACCMODE) { case O_RDONLY: - if (!query_open ()) - reader = true; + reader = true; break; case O_WRONLY: writer = true; @@ -585,8 +581,6 @@ fhandler_fifo::open (int flags, mode_t) } } } - if (query_open ()) - res = success; out: if (res == error_set_errno) __seterrno (); From 7d68ffadd3fbc9b8dcd189d4a20c12a9cd1ed743 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Thu, 23 Jan 2020 16:31:05 +0000 Subject: [PATCH 168/520] Cygwin: FIFO: tweak fcntl and dup when O_PATH is set fhandler_fifo::fcntl and fhandler_fifo::dup now call the corresponding fhandler_base methods if the FIFO was opened with the O_PATH flag. --- winsup/cygwin/fhandler_fifo.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 8cbab353c..a338f12cc 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -997,7 +997,7 @@ fhandler_fifo::close () int fhandler_fifo::fcntl (int cmd, intptr_t arg) { - if (cmd != F_SETFL || nohandle ()) + if (cmd != F_SETFL || nohandle () || (get_flags () & O_PATH)) return fhandler_base::fcntl (cmd, arg); const bool was_nonblocking = is_nonblocking (); @@ -1014,6 +1014,9 @@ fhandler_fifo::dup (fhandler_base *child, int flags) int ret = -1; fhandler_fifo *fhf = NULL; + if (get_flags () & O_PATH) + return fhandler_base::dup (child, flags); + if (fhandler_base::dup (child, flags)) goto out; From 5ba41ad6e9f1ac3326706523fc827ac3e54466f3 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Mon, 27 Jan 2020 21:14:32 +0900 Subject: [PATCH 169/520] Cygwin: console: Share readahead buffer within the same process. - The cause of the problem reported in https://www.cygwin.com/ml/cygwin/2020-01/msg00220.html is that the chars input before dup() cannot be read from the new file descriptor. This is because the readahead buffer (rabuf) in the console is newly created by dup(), and does not inherit from the parent. This patch fixes the issue. --- winsup/cygwin/fhandler.cc | 56 +++++++++++++++---------------- winsup/cygwin/fhandler.h | 33 +++++++++++++----- winsup/cygwin/fhandler_console.cc | 39 ++++++++++++++++++++- winsup/cygwin/fhandler_termios.cc | 33 +++++++++--------- winsup/cygwin/fhandler_tty.cc | 2 +- 5 files changed, 109 insertions(+), 54 deletions(-) diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index aeee8fe4d..4210510be 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -44,11 +44,11 @@ void fhandler_base::reset (const fhandler_base *from) { pc << from->pc; - rabuf = NULL; - ralen = 0; - raixget = 0; - raixput = 0; - rabuflen = 0; + ra.rabuf = NULL; + ra.ralen = 0; + ra.raixget = 0; + ra.raixput = 0; + ra.rabuflen = 0; _refcnt = 0; } @@ -66,15 +66,15 @@ int fhandler_base::put_readahead (char value) { char *newrabuf; - if (raixput < rabuflen) + if (raixput () < rabuflen ()) /* Nothing to do */; - else if ((newrabuf = (char *) realloc (rabuf, rabuflen += 32))) - rabuf = newrabuf; + else if ((newrabuf = (char *) realloc (rabuf (), rabuflen () += 32))) + rabuf () = newrabuf; else return 0; - rabuf[raixput++] = value; - ralen++; + rabuf ()[raixput ()++] = value; + ralen ()++; return 1; } @@ -82,11 +82,11 @@ int fhandler_base::get_readahead () { int chret = -1; - if (raixget < ralen) - chret = ((unsigned char) rabuf[raixget++]) & 0xff; + if (raixget () < ralen ()) + chret = ((unsigned char) rabuf ()[raixget ()++]) & 0xff; /* FIXME - not thread safe */ - if (raixget >= ralen) - raixget = raixput = ralen = 0; + if (raixget () >= ralen ()) + raixget () = raixput () = ralen () = 0; return chret; } @@ -94,10 +94,10 @@ int fhandler_base::peek_readahead (int queryput) { int chret = -1; - if (!queryput && raixget < ralen) - chret = ((unsigned char) rabuf[raixget]) & 0xff; - else if (queryput && raixput > 0) - chret = ((unsigned char) rabuf[raixput - 1]) & 0xff; + if (!queryput && raixget () < ralen ()) + chret = ((unsigned char) rabuf ()[raixget ()]) & 0xff; + else if (queryput && raixput () > 0) + chret = ((unsigned char) rabuf ()[raixput () - 1]) & 0xff; return chret; } @@ -105,7 +105,7 @@ void fhandler_base::set_readahead_valid (int val, int ch) { if (!val) - ralen = raixget = raixput = 0; + ralen () = raixget () = raixput () = 0; if (ch != -1) put_readahead (ch); } @@ -1092,7 +1092,7 @@ fhandler_base::lseek (off_t offset, int whence) if (whence != SEEK_CUR || offset != 0) { if (whence == SEEK_CUR) - offset -= ralen - raixget; + offset -= ralen () - raixget (); set_readahead_valid (0); } @@ -1142,7 +1142,7 @@ fhandler_base::lseek (off_t offset, int whence) readahead that we have to take into account when calculating the actual position for the application. */ if (whence == SEEK_CUR) - res -= ralen - raixget; + res -= ralen () - raixget (); return res; } @@ -1565,23 +1565,23 @@ fhandler_base::fhandler_base () : ino (0), _refcnt (0), openflags (0), - rabuf (NULL), - ralen (0), - raixget (0), - raixput (0), - rabuflen (0), unique_id (0), archetype (NULL), usecount (0) { + ra.rabuf = NULL; + ra.ralen = 0; + ra.raixget = 0; + ra.raixput = 0; + ra.rabuflen = 0; isclosed (false); } /* Normal I/O destructor */ fhandler_base::~fhandler_base () { - if (rabuf) - free (rabuf); + if (ra.rabuf) + free (ra.rabuf); } /**********************************************************************/ diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index c0d56b4da..b4a5638fe 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -202,16 +202,21 @@ class fhandler_base ino_t ino; /* file ID or hashed filename, depends on FS. */ LONG _refcnt; + public: + struct rabuf_t + { + char *rabuf; /* used for crlf conversion in text files */ + size_t ralen; + size_t raixget; + size_t raixput; + size_t rabuflen; + }; protected: /* File open flags from open () and fcntl () calls */ int openflags; - char *rabuf; /* used for crlf conversion in text files */ - size_t ralen; - size_t raixget; - size_t raixput; - size_t rabuflen; + struct rabuf_t ra; /* Used for advisory file locking. See flock.cc. */ int64_t unique_id; @@ -315,7 +320,13 @@ class fhandler_base ReleaseSemaphore (read_state, n, NULL); } - bool get_readahead_valid () { return raixget < ralen; } + virtual char *&rabuf () { return ra.rabuf; }; + virtual size_t &ralen () { return ra.ralen; }; + virtual size_t &raixget () { return ra.raixget; }; + virtual size_t &raixput () { return ra.raixput; }; + virtual size_t &rabuflen () { return ra.rabuflen; }; + + bool get_readahead_valid () { return raixget () < ralen (); } int puts_readahead (const char *s, size_t len = (size_t) -1); int put_readahead (char value); @@ -464,8 +475,8 @@ public: virtual bg_check_types bg_check (int, bool = false) {return bg_ok;} virtual void clear_readahead () { - raixput = raixget = ralen = rabuflen = 0; - rabuf = NULL; + raixput () = raixget () = ralen () = rabuflen () = 0; + rabuf () = NULL; } void operator delete (void *p) {cfree (p);} virtual void set_eof () {} @@ -2051,6 +2062,12 @@ private: DWORD __acquire_output_mutex (const char *fn, int ln, DWORD ms); void __release_output_mutex (const char *fn, int ln); + char *&rabuf (); + size_t &ralen (); + size_t &raixget (); + size_t &raixput (); + size_t &rabuflen (); + friend tty_min * tty_list::get_cttyp (); }; diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index b3f2cb65a..f88d24701 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -56,6 +56,10 @@ bool NO_COPY fhandler_console::invisible_console; static DWORD orig_conin_mode = (DWORD) -1; static DWORD orig_conout_mode = (DWORD) -1; +/* con_ra is shared in the same process. + Only one console can exist in a process, therefore, static is suitable. */ +static struct fhandler_base::rabuf_t con_ra; + static void beep () { @@ -214,6 +218,36 @@ fhandler_console::setup () } } +char *& +fhandler_console::rabuf () +{ + return con_ra.rabuf; +} + +size_t & +fhandler_console::ralen () +{ + return con_ra.ralen; +} + +size_t & +fhandler_console::raixget () +{ + return con_ra.raixget; +} + +size_t & +fhandler_console::raixput () +{ + return con_ra.raixput; +} + +size_t & +fhandler_console::rabuflen () +{ + return con_ra.rabuflen; +} + /* Return the tty structure associated with a given tty number. If the tty number is < 0, just return a dummy record. */ tty_min * @@ -454,7 +488,7 @@ fhandler_console::read (void *pv, size_t& buflen) copied_chars += get_readahead_into_buffer (buf + copied_chars, buflen); - if (!ralen) + if (!con_ra.ralen) input_ready = false; release_input_mutex (); @@ -1103,6 +1137,9 @@ fhandler_console::close () CloseHandle (get_handle ()); CloseHandle (get_output_handle ()); + if (con_ra.rabuf) + free (con_ra.rabuf); + /* If already attached to pseudo console, don't call free_console () */ cygheap_fdenum cfd (false); while (cfd.next () >= 0) diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index 5b0ba5603..d96b669bd 100644 --- a/winsup/cygwin/fhandler_termios.cc +++ b/winsup/cygwin/fhandler_termios.cc @@ -265,25 +265,26 @@ fhandler_termios::bg_check (int sig, bool dontsignal) int fhandler_termios::eat_readahead (int n) { - int oralen = ralen; + int oralen = ralen (); if (n < 0) - n = ralen; - if (n > 0 && ralen > 0) + n = ralen (); + if (n > 0 && ralen () > 0) { - if ((int) (ralen -= n) < 0) - ralen = 0; + if ((int) (ralen () -= n) < 0) + ralen () = 0; /* If IUTF8 is set, the terminal is in UTF-8 mode. If so, we erase a complete UTF-8 multibyte sequence on VERASE/VWERASE. Otherwise, if we only erase a single byte, invalid unicode chars are left in the input. */ if (tc ()->ti.c_iflag & IUTF8) - while (ralen > 0 && ((unsigned char) rabuf[ralen] & 0xc0) == 0x80) - --ralen; + while (ralen () > 0 && + ((unsigned char) rabuf ()[ralen ()] & 0xc0) == 0x80) + --ralen (); - if (raixget >= ralen) - raixget = raixput = ralen = 0; - else if (raixput > ralen) - raixput = ralen; + if (raixget () >= ralen ()) + raixget () = raixput () = ralen () = 0; + else if (raixput () > ralen ()) + raixput () = ralen (); } return oralen; @@ -411,7 +412,7 @@ fhandler_termios::line_edit (const char *rptr, size_t nread, termios& ti, if (ti.c_lflag & ECHO) { doecho ("\n\r", 2); - doecho (rabuf, ralen); + doecho (rabuf (), ralen ()); } continue; } @@ -438,13 +439,13 @@ fhandler_termios::line_edit (const char *rptr, size_t nread, termios& ti, doecho (&c, 1); /* Write in chunks of 32 bytes to reduce the number of WriteFile calls in non-canonical mode. */ - if ((!iscanon && ralen >= 32) || input_done) + if ((!iscanon && ralen () >= 32) || input_done) { int status = accept_input (); if (status != 1) { ret = status ? line_edit_error : line_edit_pipe_full; - nread += ralen; + nread += ralen (); break; } ret = line_edit_input_done; @@ -453,14 +454,14 @@ fhandler_termios::line_edit (const char *rptr, size_t nread, termios& ti, } /* If we didn't write all bytes in non-canonical mode, write them now. */ - if (!iscanon && ralen > 0 + if (!iscanon && ralen () > 0 && (ret == line_edit_ok || ret == line_edit_input_done)) { int status = accept_input (); if (status != 1) { ret = status ? line_edit_error : line_edit_pipe_full; - nread += ralen; + nread += ralen (); } else ret = line_edit_input_done; diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 4977a8bd5..870fcebbc 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -525,7 +525,7 @@ fhandler_pty_master::accept_input () } else { - char *p = rabuf; + char *p = rabuf (); DWORD rc; DWORD written = 0; From e38f2dc9b93fd237bd72c1b35b9dbfc8b0f18663 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Mon, 27 Jan 2020 20:22:24 +0900 Subject: [PATCH 170/520] Cygwin: pty: Revise code waiting for forwarding again. - After commit 6cc299f0e20e4b76f7dbab5ea8c296ffa4859b62, outputs of cygwin programs which call both printf() and WriteConsole() are frequently distorted. This patch fixes the issue. --- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_tty.cc | 37 +++++++++++++++++++++++++++++------ winsup/cygwin/tty.cc | 1 + winsup/cygwin/tty.h | 1 + 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index b4a5638fe..5d0c579f8 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -2218,6 +2218,7 @@ class fhandler_pty_slave: public fhandler_pty_common } void setup_locale (void); void set_freeconsole_on_close (bool val); + void wait_pcon_fwd (void); }; #define __ptsname(buf, unit) __small_sprintf ((buf), "/dev/pty%d", (unit)) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 870fcebbc..c1c0fb812 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1109,7 +1109,7 @@ skip_console_setting: } else if ((fd == 1 || fd == 2) && !get_ttyp ()->switch_to_pcon_out) { - cygwait (get_ttyp ()->fwd_done, INFINITE); + wait_pcon_fwd (); if (get_ttyp ()->pcon_pid == 0 || kill (get_ttyp ()->pcon_pid, 0) != 0) get_ttyp ()->pcon_pid = myself->pid; @@ -1152,7 +1152,7 @@ fhandler_pty_slave::reset_switch_to_pcon (void) } if (get_ttyp ()->switch_to_pcon_out) /* Wait for pty_master_fwd_thread() */ - cygwait (get_ttyp ()->fwd_done, INFINITE); + wait_pcon_fwd (); get_ttyp ()->pcon_pid = 0; get_ttyp ()->switch_to_pcon_in = false; get_ttyp ()->switch_to_pcon_out = false; @@ -2680,6 +2680,16 @@ fhandler_pty_slave::set_freeconsole_on_close (bool val) freeconsole_on_close = val; } +void +fhandler_pty_slave::wait_pcon_fwd (void) +{ + acquire_output_mutex (INFINITE); + get_ttyp ()->pcon_last_time = GetTickCount (); + ResetEvent (get_ttyp ()->fwd_done); + release_output_mutex (); + cygwait (get_ttyp ()->fwd_done, INFINITE); +} + void fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) { @@ -2727,7 +2737,7 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) DWORD mode = ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT; SetConsoleMode (get_output_handle (), mode); if (!get_ttyp ()->switch_to_pcon_out) - cygwait (get_ttyp ()->fwd_done, INFINITE); + wait_pcon_fwd (); if (get_ttyp ()->pcon_pid == 0 || kill (get_ttyp ()->pcon_pid, 0) != 0) get_ttyp ()->pcon_pid = myself->pid; @@ -3009,14 +3019,29 @@ fhandler_pty_master::pty_master_fwd_thread () termios_printf ("Started."); for (;;) { - if (::bytes_available (rlen, from_slave) && rlen == 0) - SetEvent (get_ttyp ()->fwd_done); + if (get_pseudo_console ()) + { + /* The forwarding in pseudo console sometimes stops for + 16-32 msec even if it already has data to transfer. + If the time without transfer exceeds 32 msec, the + forwarding is supposed to be finished. */ + const int sleep_in_pcon = 16; + const int time_to_wait = sleep_in_pcon * 2 + 1/* margine */; + get_ttyp ()->pcon_last_time = GetTickCount (); + while (::bytes_available (rlen, from_slave) && rlen == 0) + { + acquire_output_mutex (INFINITE); + if (GetTickCount () - get_ttyp ()->pcon_last_time > time_to_wait) + SetEvent (get_ttyp ()->fwd_done); + release_output_mutex (); + Sleep (1); + } + } if (!ReadFile (from_slave, outbuf, sizeof outbuf, &rlen, NULL)) { termios_printf ("ReadFile for forwarding failed, %E"); break; } - ResetEvent (get_ttyp ()->fwd_done); ssize_t wlen = rlen; char *ptr = outbuf; if (get_pseudo_console ()) diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index ef9bbc1ff..a3d4a0fc8 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -246,6 +246,7 @@ tty::init () term_code_page = 0; need_redraw_screen = false; fwd_done = NULL; + pcon_last_time = 0; } HANDLE diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h index b291fd3c1..755897d7d 100644 --- a/winsup/cygwin/tty.h +++ b/winsup/cygwin/tty.h @@ -107,6 +107,7 @@ private: UINT term_code_page; bool need_redraw_screen; HANDLE fwd_done; + DWORD pcon_last_time; public: HANDLE from_master () const { return _from_master; } From 464db253c46c49802a73d2d15113b88dd282a370 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 28 Jan 2020 15:33:05 +0100 Subject: [PATCH 171/520] Cygwin: move chmod_device declaration to winsup.h Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler.cc | 1 - winsup/cygwin/fhandler_disk_file.cc | 1 - winsup/cygwin/winsup.h | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 4210510be..d754077b1 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -1754,7 +1754,6 @@ fhandler_base::closedir (DIR *) int fhandler_base::fchmod (mode_t mode) { - extern int chmod_device (path_conv& pc, mode_t mode); if (pc.is_fs_special ()) return chmod_device (pc, mode); /* By default, just succeeds. */ diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 32381a0b0..197f04f58 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -698,7 +698,6 @@ out: int __reg1 fhandler_disk_file::fchmod (mode_t mode) { - extern int chmod_device (path_conv& pc, mode_t mode); int ret = -1; int oret = 0; NTSTATUS status; diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h index de9bfacda..887d54fa6 100644 --- a/winsup/cygwin/winsup.h +++ b/winsup/cygwin/winsup.h @@ -178,6 +178,7 @@ extern struct per_process_cxx_malloc default_cygwin_cxx_malloc; /* various events */ void events_init (); +int chmod_device (class path_conv& pc, mode_t mode); void __stdcall close_all_files (bool = false); /* debug_on_trap support. see exceptions.cc:try_to_debug() */ From cf6c439b6dcfebe44878ec4a8cae6293ff6563f7 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 28 Jan 2020 15:33:53 +0100 Subject: [PATCH 172/520] Cygwin: drop __stdcall from close_all_files Signed-off-by: Corinna Vinschen --- winsup/cygwin/syscalls.cc | 2 +- winsup/cygwin/winsup.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 4956b6ff5..a6386dd9c 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -81,7 +81,7 @@ static int __stdcall mknod_worker (const char *, mode_t, mode_t, _major_t, but never call close. This function is called by _exit to ensure we don't leave any such files lying around. */ -void __stdcall +void close_all_files (bool norelease) { cygheap->fdtab.lock (); diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h index 887d54fa6..2916728b6 100644 --- a/winsup/cygwin/winsup.h +++ b/winsup/cygwin/winsup.h @@ -179,7 +179,7 @@ extern struct per_process_cxx_malloc default_cygwin_cxx_malloc; void events_init (); int chmod_device (class path_conv& pc, mode_t mode); -void __stdcall close_all_files (bool = false); +void close_all_files (bool = false); /* debug_on_trap support. see exceptions.cc:try_to_debug() */ extern "C" void error_start_init (const char*); From 2caaa810a39075cbf0eb857459a2eef95bf4463f Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 28 Jan 2020 16:10:13 +0100 Subject: [PATCH 173/520] Cygwin: add short comments to path_conv options Signed-off-by: Corinna Vinschen --- winsup/cygwin/path.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index e76157bd4..72f4bda43 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -44,20 +44,21 @@ extern suffix_info stat_suffixes[]; below path_types. Ever. */ enum pathconv_arg { - PC_SYM_FOLLOW = _BIT ( 0), - PC_SYM_NOFOLLOW = _BIT ( 1), - PC_SYM_NOFOLLOW_REP = _BIT ( 2), - PC_SYM_CONTENTS = _BIT ( 3), - PC_NOFULL = _BIT ( 4), - PC_NULLEMPTY = _BIT ( 5), - PC_NONULLEMPTY = _BIT ( 6), - PC_POSIX = _BIT ( 7), - PC_NOWARN = _BIT ( 8), + PC_SYM_FOLLOW = _BIT ( 0), /* follow symlinks */ + PC_SYM_NOFOLLOW = _BIT ( 1), /* don't follow symlinks (but honor + trailing slashes) */ + PC_SYM_NOFOLLOW_REP = _BIT ( 2), /* don't follow dir reparse point */ + PC_SYM_CONTENTS = _BIT ( 3), /* don't follow, return content only */ + PC_NOFULL = _BIT ( 4), /* keep relative path */ + PC_NULLEMPTY = _BIT ( 5), /* empty path is no error */ + PC_NONULLEMPTY = _BIT ( 6), /* override PC_NULLEMPTY default */ + PC_POSIX = _BIT ( 7), /* return normalized posix path */ + PC_NOWARN = _BIT ( 8), /* don't emit ms-dos path warning */ PC_OPEN = _BIT ( 9), /* use open semantics */ PC_CTTY = _BIT (10), /* could later be used as ctty */ - PC_SYM_NOFOLLOW_PROCFD = _BIT (11), - PC_KEEP_HANDLE = _BIT (12), - PC_NO_ACCESS_CHECK = _BIT (13), + PC_SYM_NOFOLLOW_PROCFD = _BIT (11), /* allow /proc/PID/fd redirection */ + PC_KEEP_HANDLE = _BIT (12), /* keep handle for later stat calls */ + PC_NO_ACCESS_CHECK = _BIT (13), /* helper flag for error check */ PC_DONT_USE = _BIT (31) /* conversion to signed happens. */ }; From 26425142ce9e8981e9f97e7d50e632c4f9ee9a03 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 28 Jan 2020 17:40:40 +0100 Subject: [PATCH 174/520] Cygwin: path_conv: add PC_SYM_NOFOLLOW_DIR flag Usually a trailing slash requires to follow an existing symlink, even with PC_SYM_NOFOLLOW. The reason is that "foo/" is equivalent to "foo/." so the symlink is in fact not the last path component, "." is. This is default for almost all scenarios. PC_SYM_NOFOLLOW_DIR now allows the caller to request not to follow the symlink even if a trailing slash is given. This can be used in callers to perform certain functions Linux-compatible. Signed-off-by: Corinna Vinschen --- winsup/cygwin/path.cc | 27 ++++++++++++++++++++------- winsup/cygwin/path.h | 1 + 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index a00270210..5ebbddf3a 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1022,20 +1022,33 @@ path_conv::check (const char *src, unsigned opt, these operations again on the newly derived path. */ else if (symlen > 0) { - if (component == 0 && !need_directory + if (component == 0 && (!(opt & PC_SYM_FOLLOW) || (is_known_reparse_point () && (opt & PC_SYM_NOFOLLOW_REP)))) { - /* last component of path is a symlink. */ - set_symlink (symlen); - if (opt & PC_SYM_CONTENTS) + /* Usually a trailing slash requires to follow a symlink, + even with PC_SYM_NOFOLLOW. The reason is that "foo/" + is equivalent to "foo/." so the symlink is in fact not + the last path component. + + PC_SYM_NOFOLLOW_DIR is used to indicate that the + last path component is the target symlink and the + trailing slash is supposed to be ignored. */ + if (!need_directory || (opt & PC_SYM_NOFOLLOW_DIR)) { - strcpy (THIS_path, sym.contents); + /* last component of path is a symlink. */ + set_symlink (symlen); + /* make sure not to set errno to ENOTDIR. */ + need_directory = 0; + if (opt & PC_SYM_CONTENTS) + { + strcpy (THIS_path, sym.contents); + goto out; + } + add_ext = true; goto out; } - add_ext = true; - goto out; } /* Following a symlink we can't trust the collected filesystem information any longer. */ diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index 72f4bda43..7b89b03a7 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -59,6 +59,7 @@ enum pathconv_arg PC_SYM_NOFOLLOW_PROCFD = _BIT (11), /* allow /proc/PID/fd redirection */ PC_KEEP_HANDLE = _BIT (12), /* keep handle for later stat calls */ PC_NO_ACCESS_CHECK = _BIT (13), /* helper flag for error check */ + PC_SYM_NOFOLLOW_DIR = _BIT (14), /* don't follow a trailing slash */ PC_DONT_USE = _BIT (31) /* conversion to signed happens. */ }; From 4bfa93f1a00a09e4fb3bccea334ba22e4c05c3d6 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 28 Jan 2020 17:57:50 +0100 Subject: [PATCH 175/520] Cygwin: symlink/mknod: fix ACL handling mknod32 actually creates a path_conv, just to call mknod_worker with a win32 path. This doesn't only require to create path_conv twice, it also breaks permissions on filesystems supporting ACLs. Fix this by passing the path_conv created in the caller down to symlink_worker. Also, while at it, simplify the handling of trailing slashes and move it out of symlink_worker. Especially use the new PC_SYM_NOFOLLOW_DIR flag to avoid fiddeling with creating a new path copy without the trailing slash. Signed-off-by: Corinna Vinschen --- winsup/cygwin/path.cc | 69 +++++++++++++++++++-------------------- winsup/cygwin/path.h | 2 +- winsup/cygwin/syscalls.cc | 41 ++++++++++++----------- 3 files changed, 57 insertions(+), 55 deletions(-) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 5ebbddf3a..142a73979 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1674,7 +1674,34 @@ conv_path_list (const char *src, char *dst, size_t size, extern "C" int symlink (const char *oldpath, const char *newpath) { - return symlink_worker (oldpath, newpath, false); + path_conv win32_newpath; + + __try + { + if (!*oldpath || !*newpath) + { + set_errno (ENOENT); + __leave; + } + + /* Trailing dirsep is a no-no, only errno differs. */ + bool has_trailing_dirsep = isdirsep (newpath[strlen (newpath) - 1]); + win32_newpath.check (newpath, + PC_SYM_NOFOLLOW | PC_SYM_NOFOLLOW_DIR | PC_POSIX, + stat_suffixes); + + if (win32_newpath.error || has_trailing_dirsep) + { + set_errno (win32_newpath.error ?: + win32_newpath.exists () ? EEXIST : ENOENT); + __leave; + } + + return symlink_worker (oldpath, win32_newpath, false); + } + __except (EFAULT) {} + __endtry + return -1; } static int @@ -1846,15 +1873,12 @@ symlink_native (const char *oldpath, path_conv &win32_newpath) } int -symlink_worker (const char *oldpath, const char *newpath, bool isdevice) +symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice) { int res = -1; size_t len; - path_conv win32_newpath; char *buf, *cp; tmp_pathbuf tp; - unsigned check_opt; - bool has_trailing_dirsep = false; winsym_t wsym_type; /* POSIX says that empty 'newpath' is invalid input while empty @@ -1862,31 +1886,12 @@ symlink_worker (const char *oldpath, const char *newpath, bool isdevice) symlink contents point to existing filesystem object */ __try { - if (!*oldpath || !*newpath) - { - set_errno (ENOENT); - __leave; - } - if (strlen (oldpath) > SYMLINK_MAX) { set_errno (ENAMETOOLONG); __leave; } - /* Trailing dirsep is a no-no. */ - len = strlen (newpath); - has_trailing_dirsep = isdirsep (newpath[len - 1]); - if (has_trailing_dirsep) - { - newpath = strdup (newpath); - ((char *) newpath)[len - 1] = '\0'; - } - - check_opt = PC_SYM_NOFOLLOW | PC_POSIX | (isdevice ? PC_NOWARN : 0); - /* We need the normalized full path below. */ - win32_newpath.check (newpath, check_opt, stat_suffixes); - /* Default symlink type is determined by global allow_winsymlinks variable. Device files are always shortcuts. */ wsym_type = isdevice ? WSYM_lnk : allow_winsymlinks; @@ -1910,8 +1915,9 @@ symlink_worker (const char *oldpath, const char *newpath, bool isdevice) && (isdevice || !win32_newpath.fs_is_nfs ())) { char *newplnk = tp.c_get (); - stpcpy (stpcpy (newplnk, newpath), ".lnk"); - win32_newpath.check (newplnk, check_opt); + stpcpy (stpcpy (newplnk, win32_newpath.get_posix ()), ".lnk"); + win32_newpath.check (newplnk, PC_SYM_NOFOLLOW | PC_POSIX + | (isdevice ? PC_NOWARN : 0)); } if (win32_newpath.error) @@ -1929,11 +1935,6 @@ symlink_worker (const char *oldpath, const char *newpath, bool isdevice) set_errno (EEXIST); __leave; } - if (has_trailing_dirsep && !win32_newpath.exists ()) - { - set_errno (ENOENT); - __leave; - } /* Handle NFS and native symlinks in their own functions. */ switch (wsym_type) @@ -2189,9 +2190,7 @@ symlink_worker (const char *oldpath, const char *newpath, bool isdevice) __except (EFAULT) {} __endtry syscall_printf ("%d = symlink_worker(%s, %s, %d)", - res, oldpath, newpath, isdevice); - if (has_trailing_dirsep) - free ((void *) newpath); + res, oldpath, win32_newpath.get_posix (), isdevice); return res; } @@ -3389,7 +3388,7 @@ chdir (const char *in_dir) syscall_printf ("dir '%s'", in_dir); /* Convert path. PC_NONULLEMPTY ensures that we don't check for - NULL/empty/invalid again. */ + NULL/empty/invalid again. */ path_conv path (in_dir, PC_SYM_FOLLOW | PC_POSIX | PC_NONULLEMPTY); if (path.error) { diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index 7b89b03a7..a7debc108 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -447,4 +447,4 @@ int normalize_win32_path (const char *, char *, char *&); int normalize_posix_path (const char *, char *, char *&); PUNICODE_STRING __reg3 get_nt_native_path (const char *, UNICODE_STRING&, bool); -int __reg3 symlink_worker (const char *, const char *, bool); +int __reg3 symlink_worker (const char *, path_conv &, bool); diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index a6386dd9c..885ca375a 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -73,8 +73,7 @@ details. */ #undef _lseek64 #undef _fstat64 -static int __stdcall mknod_worker (const char *, mode_t, mode_t, _major_t, - _minor_t); +static int mknod_worker (path_conv &, mode_t, _major_t, _minor_t); /* Close all files and process any queued deletions. Lots of unix style applications will open a tmp file, unlink it, @@ -1773,15 +1772,16 @@ umask (mode_t mask) return oldmask; } +#define FILTERED_MODE(m) ((m) & (S_ISUID | S_ISGID | S_ISVTX \ + | S_IRWXU | S_IRWXG | S_IRWXO)) + int chmod_device (path_conv& pc, mode_t mode) { - return mknod_worker (pc.get_win32 (), pc.dev.mode () & S_IFMT, mode, pc.dev.get_major (), pc.dev.get_minor ()); + return mknod_worker (pc, (pc.dev.mode () & S_IFMT) | FILTERED_MODE (mode), + pc.dev.get_major (), pc.dev.get_minor ()); } -#define FILTERED_MODE(m) ((m) & (S_ISUID | S_ISGID | S_ISVTX \ - | S_IRWXU | S_IRWXG | S_IRWXO)) - /* chmod: POSIX 5.6.4.1 */ extern "C" int chmod (const char *path, mode_t mode) @@ -3364,14 +3364,12 @@ ptsname_r (int fd, char *buf, size_t buflen) return cfd->ptsname_r (buf, buflen); } -static int __stdcall -mknod_worker (const char *path, mode_t type, mode_t mode, _major_t major, - _minor_t minor) +static int +mknod_worker (path_conv &pc, mode_t mode, _major_t major, _minor_t minor) { char buf[sizeof (":\\00000000:00000000:00000000") + PATH_MAX]; - sprintf (buf, ":\\%x:%x:%x", major, minor, - type | (mode & (S_IRWXU | S_IRWXG | S_IRWXO))); - return symlink_worker (buf, path, true); + sprintf (buf, ":\\%x:%x:%x", major, minor, mode); + return symlink_worker (buf, pc, true); } extern "C" int @@ -3388,12 +3386,17 @@ mknod32 (const char *path, mode_t mode, dev_t dev) if (strlen (path) >= PATH_MAX) __leave; - path_conv w32path (path, PC_SYM_NOFOLLOW); - if (w32path.exists ()) - { - set_errno (EEXIST); - __leave; - } + /* Trailing dirsep is a no-no, only errno differs. */ + bool has_trailing_dirsep = isdirsep (path[strlen (path) - 1]); + + path_conv w32path (path, PC_SYM_NOFOLLOW | PC_SYM_NOFOLLOW_DIR + | PC_POSIX, stat_suffixes); + + if (w32path.exists () || has_trailing_dirsep) + { + set_errno (w32path.exists () ? EEXIST : ENOENT); + __leave; + } mode_t type = mode & S_IFMT; _major_t major = _major (dev); @@ -3424,7 +3427,7 @@ mknod32 (const char *path, mode_t mode, dev_t dev) __leave; } - return mknod_worker (w32path.get_win32 (), type, mode, major, minor); + return mknod_worker (w32path, mode, major, minor); } __except (EFAULT) __endtry From 74e6e881433c45e758582adfdcb4be20ad5b52a9 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Fri, 24 Jan 2020 14:54:47 -0500 Subject: [PATCH 176/520] Cygwin: fhandler_base::fstat_fs: accomodate the O_PATH flag Treat a special file opened with O_PATH the same as a regular file, i.e., use its handle to get the stat information. Before this change, fstat_fs opened the file a second time, with the wrong flags and without closing the existing handle. A side effect was to change the openflags of the file, possibly causing further system calls to fail. Currently this change only affects FIFOs, but it will affect AF_LOCAL/AF_UNIX sockets too once they support O_PATH. --- winsup/cygwin/fhandler_disk_file.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 197f04f58..d9213d741 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -359,7 +359,7 @@ fhandler_base::fstat_fs (struct stat *buf) if (get_stat_handle ()) { - if (!nohandle () && !is_fs_special ()) + if (!nohandle () && (!is_fs_special () || get_flags () & O_PATH)) res = pc.fs_is_nfs () ? fstat_by_nfs_ea (buf) : fstat_by_handle (buf); if (res) res = fstat_by_name (buf); From 68b7a457f7331ed852380cd7afd0e17dffdc726e Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Fri, 24 Jan 2020 16:02:57 -0500 Subject: [PATCH 177/520] Cygwin: fhandler_disk_file::fstatvfs: refactor Define a new method fhandler_base::fstatvfs_by_handle, extracted from fhandler_disk_file::fstatvfs, which gets the statvfs information when a handle is available. This will be used in future commits for special files that have been opened with O_PATH. --- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_disk_file.cc | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 5d0c579f8..80a78d14c 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -392,6 +392,7 @@ private: int __reg2 fstat_by_name (struct stat *buf); public: virtual int __reg2 fstatvfs (struct statvfs *buf); + int __reg2 fstatvfs_by_handle (HANDLE h, struct statvfs *buf); int __reg2 utimens_fs (const struct timespec *); virtual int __reg1 fchmod (mode_t mode); virtual int __reg2 fchown (uid_t uid, gid_t gid); diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index d9213d741..19a1c5ac1 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -600,9 +600,7 @@ int __reg2 fhandler_disk_file::fstatvfs (struct statvfs *sfs) { int ret = -1, opened = 0; - NTSTATUS status; IO_STATUS_BLOCK io; - FILE_FS_FULL_SIZE_INFORMATION full_fsi; /* We must not use the stat handle here, even if it exists. The handle has been opened with FILE_OPEN_REPARSE_POINT, thus, in case of a volume mount point, it points to the FS of the mount point, rather than to the @@ -630,6 +628,22 @@ fhandler_disk_file::fstatvfs (struct statvfs *sfs) } } + ret = fstatvfs_by_handle (fh, sfs); +out: + if (opened) + NtClose (fh); + syscall_printf ("%d = fstatvfs(%s, %p)", ret, get_name (), sfs); + return ret; +} + +int __reg2 +fhandler_base::fstatvfs_by_handle (HANDLE fh, struct statvfs *sfs) +{ + int ret = -1; + NTSTATUS status; + IO_STATUS_BLOCK io; + FILE_FS_FULL_SIZE_INFORMATION full_fsi; + sfs->f_files = ULONG_MAX; sfs->f_ffree = ULONG_MAX; sfs->f_favail = ULONG_MAX; @@ -688,10 +702,6 @@ fhandler_disk_file::fstatvfs (struct statvfs *sfs) debug_printf ("%y = NtQueryVolumeInformationFile" "(%S, FileFsFullSizeInformation)", status, pc.get_nt_native_path ()); -out: - if (opened) - NtClose (fh); - syscall_printf ("%d = fstatvfs(%s, %p)", ret, get_name (), sfs); return ret; } From 13d75fce48436e4f15bf97b4d2145078888994b0 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Fri, 24 Jan 2020 15:09:03 -0500 Subject: [PATCH 178/520] Cygwin: FIFO: fstatvfs: use our handle if O_PATH is set If O_PATH is set, then the fhandler_fifo object has a handle that can be used for getting the statvfs information. Use it by calling fhandler_base::fstatvfs_by_handle. Before this change, fhandler_disk_file::fstatfvs was called on a new fhandler_disk_file object, which would then have to be opened. --- winsup/cygwin/fhandler_fifo.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index a338f12cc..ef568f6fe 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -906,6 +906,14 @@ errout: int __reg2 fhandler_fifo::fstatvfs (struct statvfs *sfs) { + if (get_flags () & O_PATH) + /* We already have a handle. */ + { + HANDLE h = get_handle (); + if (h) + return fstatvfs_by_handle (h, sfs); + } + fhandler_disk_file fh (pc); fh.get_device () = FH_FS; return fh.fstatvfs (sfs); From 13bfb3c63f35d875c1771daea6de4be0176e3b13 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 28 Jan 2020 21:59:22 +0100 Subject: [PATCH 179/520] Cygwin: remove CYGWIN=dos_file_warning option This option has been disabled long ago and nobody missed it. Removing drops a bit of unneeded code Signed-off-by: Corinna Vinschen --- winsup/cygwin/environ.cc | 1 - winsup/cygwin/external.cc | 5 +--- winsup/cygwin/fhandler_disk_file.cc | 2 +- winsup/cygwin/globals.cc | 1 - winsup/cygwin/path.cc | 36 ++++------------------------- winsup/cygwin/path.h | 1 - winsup/cygwin/pinfo.cc | 4 ++-- winsup/cygwin/quotactl.cc | 2 +- winsup/doc/cygwinenv.xml | 11 ++++----- 9 files changed, 14 insertions(+), 49 deletions(-) diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index 7eb4780a8..3a03657db 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -111,7 +111,6 @@ static struct parse_thing } values[2]; } known[] NO_COPY = { - {"dosfilewarning", {&dos_file_warning}, setbool, NULL, {{false}, {true}}}, {"error_start", {func: error_start_init}, isfunc, NULL, {{0}, {0}}}, {"export", {&export_settings}, setbool, NULL, {{false}, {true}}}, {"glob", {func: glob_init}, isfunc, NULL, {{0}, {s: "normal"}}}, diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc index 94431bb52..14a1dfb73 100644 --- a/winsup/cygwin/external.cc +++ b/winsup/cygwin/external.cc @@ -452,10 +452,7 @@ cygwin_internal (cygwin_getinfo_types t, ...) res = CYGTLS_PADSIZE; break; case CW_SET_DOS_FILE_WARNING: - { - dos_file_warning = va_arg (arg, int); - res = 0; - } + res = 0; break; case CW_SET_PRIV_KEY: { diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 19a1c5ac1..be45ad77a 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -2062,7 +2062,7 @@ readdir_get_ino (const char *path, bool dot_dot) strcpy (c, ".."); path = fname; } - path_conv pc (path, PC_SYM_NOFOLLOW | PC_POSIX | PC_NOWARN | PC_KEEP_HANDLE); + path_conv pc (path, PC_SYM_NOFOLLOW | PC_POSIX | PC_KEEP_HANDLE); if (pc.isspecial ()) { if (!stat_worker (pc, &st)) diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc index a9648fe6a..942bd1c83 100644 --- a/winsup/cygwin/globals.cc +++ b/winsup/cygwin/globals.cc @@ -65,7 +65,6 @@ int NO_COPY dynamically_loaded; /* Some CYGWIN environment variable variables. */ bool allow_glob = true; -bool dos_file_warning; bool ignore_case_with_glob; bool pipe_byte; bool reset_com; diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 142a73979..4da888426 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -532,31 +532,6 @@ path_conv::get_wide_win32_path (PWCHAR wc) return wc; } -static void -warn_msdos (const char *src) -{ - if (user_shared->warned_msdos || !cygwin_finished_initializing) - return; - tmp_pathbuf tp; - char *posix_path = tp.c_get (); - small_printf ("Cygwin WARNING:\n"); - if (cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_RELATIVE, src, - posix_path, NT_MAX_PATH)) - small_printf ( -" MS-DOS style path detected: %ls\n POSIX equivalent preferred.\n", - src); - else - small_printf ( -" MS-DOS style path detected: %ls\n" -" Preferred POSIX equivalent is: %ls\n", - src, posix_path); - small_printf ( -" CYGWIN environment variable option \"nodosfilewarning\" turns off this\n" -" warning. Consult the user's guide for more details about POSIX paths:\n" -" http://cygwin.com/cygwin-ug-net/using.html#using-pathnames\n"); - user_shared->warned_msdos = true; -} - static DWORD getfileattr (const char *path, bool caseinsensitive) /* path has to be always absolute. */ { @@ -1253,8 +1228,6 @@ path_conv::check (const char *src, unsigned opt, if (tail < path_end && tail > path_copy + 1) *tail = '/'; set_posix (path_copy); - if (is_msdos && dos_file_warning && !(opt & PC_NOWARN)) - warn_msdos (src); } #if 0 @@ -1916,8 +1889,7 @@ symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice) { char *newplnk = tp.c_get (); stpcpy (stpcpy (newplnk, win32_newpath.get_posix ()), ".lnk"); - win32_newpath.check (newplnk, PC_SYM_NOFOLLOW | PC_POSIX - | (isdevice ? PC_NOWARN : 0)); + win32_newpath.check (newplnk, PC_SYM_NOFOLLOW | PC_POSIX); } if (win32_newpath.error) @@ -3492,7 +3464,7 @@ cygwin_conv_path (cygwin_conv_path_t what, const void *from, void *to, { p.check ((const char *) from, PC_POSIX | PC_SYM_FOLLOW | PC_SYM_NOFOLLOW_REP - | PC_NO_ACCESS_CHECK | PC_NOWARN + | PC_NO_ACCESS_CHECK | ((how & CCP_RELATIVE) ? PC_NOFULL : 0), stat_suffixes); if (p.error) { @@ -3537,7 +3509,7 @@ cygwin_conv_path (cygwin_conv_path_t what, const void *from, void *to, case CCP_POSIX_TO_WIN_W: p.check ((const char *) from, PC_POSIX | PC_SYM_FOLLOW | PC_SYM_NOFOLLOW_REP - | PC_NO_ACCESS_CHECK | PC_NOWARN + | PC_NO_ACCESS_CHECK | ((how & CCP_RELATIVE) ? PC_NOFULL : 0), stat_suffixes); if (p.error) { @@ -3550,7 +3522,7 @@ cygwin_conv_path (cygwin_conv_path_t what, const void *from, void *to, { /* Recreate as absolute path. */ p.check ((const char *) from, PC_POSIX | PC_SYM_FOLLOW - | PC_NO_ACCESS_CHECK | PC_NOWARN); + | PC_NO_ACCESS_CHECK); if (p.error) { set_errno (p.error); diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index a7debc108..b94f13df8 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -53,7 +53,6 @@ enum pathconv_arg PC_NULLEMPTY = _BIT ( 5), /* empty path is no error */ PC_NONULLEMPTY = _BIT ( 6), /* override PC_NULLEMPTY default */ PC_POSIX = _BIT ( 7), /* return normalized posix path */ - PC_NOWARN = _BIT ( 8), /* don't emit ms-dos path warning */ PC_OPEN = _BIT ( 9), /* use open semantics */ PC_CTTY = _BIT (10), /* could later be used as ctty */ PC_SYM_NOFOLLOW_PROCFD = _BIT (11), /* allow /proc/PID/fd redirection */ diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 800adbff1..06a2eeed4 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -120,12 +120,12 @@ pinfo::status_exit (DWORD x) { path_conv pc; if (!procinfo) - pc.check ("/dev/null", PC_NOWARN | PC_POSIX); + pc.check ("/dev/null", PC_POSIX); else { UNICODE_STRING uc; RtlInitUnicodeString(&uc, procinfo->progname); - pc.check (&uc, PC_NOWARN | PC_POSIX); + pc.check (&uc, PC_POSIX); } small_printf ("%s: error while loading shared libraries: %s: cannot " "open shared object file: No such file or directory\n", diff --git a/winsup/cygwin/quotactl.cc b/winsup/cygwin/quotactl.cc index e69acfbb6..53513aea5 100644 --- a/winsup/cygwin/quotactl.cc +++ b/winsup/cygwin/quotactl.cc @@ -89,7 +89,7 @@ quotactl (int cmd, const char *special, int id, caddr_t addr) return -1; } /* Check path */ - pc.check (special, PC_SYM_FOLLOW | PC_NOWARN, stat_suffixes); + pc.check (special, PC_SYM_FOLLOW, stat_suffixes); if (pc.error) { set_errno (pc.error); diff --git a/winsup/doc/cygwinenv.xml b/winsup/doc/cygwinenv.xml index 67592cb7e..f549fee0d 100644 --- a/winsup/doc/cygwinenv.xml +++ b/winsup/doc/cygwinenv.xml @@ -15,12 +15,6 @@ by prefixing with no. - -(no)dosfilewarning - If set, Cygwin will warn the -first time a user uses an "MS-DOS" style path name rather than a POSIX-style -path name. Defaults to off. - - (no)export - If set, the final values of these settings are re-exported to the environment as CYGWIN again. @@ -131,6 +125,11 @@ explicitly in the open(2) call. option has been reported in years. + +(no)dosfilewarning - This option had been disabled for +quite some time and nobody missed it. + + check_case - This option has been removed in favor of real case sensitivity and the per-mount option "posix=[0|1]". For more From f36262d56ac78f04de147746ce4a85c6155e4a23 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 29 Jan 2020 15:14:05 +0100 Subject: [PATCH 180/520] Cygwin: stat: fix st_mode of fifos Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_disk_file.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index be45ad77a..f362e31e3 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -480,7 +480,7 @@ fhandler_base::fstat_helper (struct stat *buf) { /* If read-only attribute is set, modify ntsec return value */ if (::has_attribute (attributes, FILE_ATTRIBUTE_READONLY) - && !pc.isdir () && !pc.issymlink ()) + && !pc.isdir () && !pc.issymlink () && !pc.is_fs_special ()) buf->st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH); if (buf->st_mode & S_IFMT) @@ -490,7 +490,7 @@ fhandler_base::fstat_helper (struct stat *buf) else { buf->st_dev = buf->st_rdev = dev (); - buf->st_mode = dev ().mode (); + buf->st_mode |= dev ().mode () & S_IFMT; buf->st_size = 0; } } From 2607f00423ead393f24b81b9fe5a39a37e036af8 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 29 Jan 2020 18:47:33 +0100 Subject: [PATCH 181/520] Revert "newlib: fix fseek optimization with SEEK_CUR" This reverts commit 59362c80e3a02c011fd0ef3d7f07a20098d2a9d5. This breaks gnulib's autoconf test for POSIX compatibility of fflush/fseek. After fflush/fseek, ftello and lseek are out of sync, with lseek having the wrong offset. This breaks backward compatibility with Cygwin applications. Signed-off-by: Corinna Vinschen --- newlib/libc/stdio/fseeko.c | 31 +++++++++++++++++++++++++------ newlib/libc/stdio64/fseeko64.c | 31 +++++++++++++++++++++++++------ 2 files changed, 50 insertions(+), 12 deletions(-) diff --git a/newlib/libc/stdio/fseeko.c b/newlib/libc/stdio/fseeko.c index bbf1af43e..3e0f9e90b 100644 --- a/newlib/libc/stdio/fseeko.c +++ b/newlib/libc/stdio/fseeko.c @@ -141,12 +141,31 @@ _fseeko_r (struct _reent *ptr, switch (whence) { case SEEK_CUR: - curoff = _ftello_r(ptr, fp); - if (curoff == -1L) - { - _newlib_flockfile_exit (fp); - return EOF; - } + /* + * In order to seek relative to the current stream offset, + * we have to first find the current stream offset a la + * ftell (see ftell for details). + */ + _fflush_r (ptr, fp); /* may adjust seek offset on append stream */ + if (fp->_flags & __SOFF) + curoff = fp->_offset; + else + { + curoff = seekfn (ptr, fp->_cookie, (_fpos_t) 0, SEEK_CUR); + if (curoff == -1L) + { + _newlib_flockfile_exit (fp); + return EOF; + } + } + if (fp->_flags & __SRD) + { + curoff -= fp->_r; + if (HASUB (fp)) + curoff -= fp->_ur; + } + else if (fp->_flags & __SWR && fp->_p != NULL) + curoff += fp->_p - fp->_bf._base; offset += curoff; whence = SEEK_SET; diff --git a/newlib/libc/stdio64/fseeko64.c b/newlib/libc/stdio64/fseeko64.c index f38005570..0672086a3 100644 --- a/newlib/libc/stdio64/fseeko64.c +++ b/newlib/libc/stdio64/fseeko64.c @@ -142,12 +142,31 @@ _fseeko64_r (struct _reent *ptr, switch (whence) { case SEEK_CUR: - curoff = _ftello64_r(ptr, fp); - if (curoff == -1L) - { - _newlib_flockfile_exit (fp); - return EOF; - } + /* + * In order to seek relative to the current stream offset, + * we have to first find the current stream offset a la + * ftell (see ftell for details). + */ + _fflush_r (ptr, fp); /* may adjust seek offset on append stream */ + if (fp->_flags & __SOFF) + curoff = fp->_offset; + else + { + curoff = seekfn (ptr, fp->_cookie, (_fpos64_t) 0, SEEK_CUR); + if (curoff == -1L) + { + _newlib_flockfile_exit(fp); + return EOF; + } + } + if (fp->_flags & __SRD) + { + curoff -= fp->_r; + if (HASUB (fp)) + curoff -= fp->_ur; + } + else if (fp->_flags & __SWR && fp->_p != NULL) + curoff += fp->_p - fp->_bf._base; offset += curoff; whence = SEEK_SET; From 9042d0ce65533a26fc3264206db5828d5692332c Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 28 Jan 2020 10:54:53 -0800 Subject: [PATCH 182/520] Use remove-advertising-clause script to edit BSD licenses This edits licenses held by Berkeley and NetBSD, both of which have removed the advertising requirement from their licenses. Signed-off-by: Keith Packard --- libgloss/i386/cygmon-gmon.c | 6 +----- libgloss/m32r/Makefile.in | 2 +- libgloss/nds32/Makefile.in | 2 +- libgloss/sparc/libsys/Makefile.in | 2 +- libgloss/sparc/libsys/configure.in | 2 +- libgloss/sparc_leon/asm-leon/leonbare_kernel_queue.h | 6 +----- libgloss/sparc_leon/asm-leon/queue.h | 6 +----- mkdep | 2 +- newlib/libc/ctype/ctype_.c | 6 +----- newlib/libc/include/ar.h | 6 +----- newlib/libc/include/grp.h | 6 +----- newlib/libc/include/pwd.h | 6 +----- newlib/libc/include/stdio.h | 2 +- newlib/libc/include/sys/syslimits.h | 6 +----- newlib/libc/include/unctrl.h | 6 +----- newlib/libc/machine/hppa/DEFS.h | 2 +- newlib/libc/machine/powerpc/vfprintf.c | 6 +----- newlib/libc/machine/powerpc/vfscanf.c | 2 +- newlib/libc/machine/sparc/setjmp.S | 6 +----- newlib/libc/misc/unctrl.c | 6 +----- newlib/libc/posix/cclass.h | 6 +----- newlib/libc/posix/closedir.c | 6 +----- newlib/libc/posix/cname.h | 6 +----- newlib/libc/posix/fnmatch.3 | 6 +----- newlib/libc/posix/glob.3 | 6 +----- newlib/libc/posix/opendir.c | 6 +----- newlib/libc/posix/readdir.c | 6 +----- newlib/libc/posix/readdir_r.c | 6 +----- newlib/libc/posix/regex.3 | 6 +----- newlib/libc/posix/regex2.h | 6 +----- newlib/libc/posix/rewinddir.c | 6 +----- newlib/libc/posix/seekdir.c | 6 +----- newlib/libc/posix/telldir.c | 6 +----- newlib/libc/posix/utils.h | 6 +----- newlib/libc/search/db_local.h | 6 +----- newlib/libc/search/extern.h | 6 +----- newlib/libc/search/hash.c | 6 +----- newlib/libc/search/hash.h | 6 +----- newlib/libc/search/hash_bigkey.c | 6 +----- newlib/libc/search/hash_buf.c | 6 +----- newlib/libc/search/hash_func.c | 6 +----- newlib/libc/search/hash_log2.c | 6 +----- newlib/libc/search/hash_page.c | 6 +----- newlib/libc/search/page.h | 6 +----- newlib/libc/stdio/asiprintf.c | 2 +- newlib/libc/stdio/asprintf.c | 2 +- newlib/libc/stdio/clearerr.c | 2 +- newlib/libc/stdio/fclose.c | 2 +- newlib/libc/stdio/fcloseall.c | 2 +- newlib/libc/stdio/fdopen.c | 2 +- newlib/libc/stdio/feof.c | 2 +- newlib/libc/stdio/ferror.c | 2 +- newlib/libc/stdio/fflush.c | 2 +- newlib/libc/stdio/fgetc.c | 2 +- newlib/libc/stdio/fgetpos.c | 2 +- newlib/libc/stdio/fgets.c | 2 +- newlib/libc/stdio/fileno.c | 2 +- newlib/libc/stdio/findfp.c | 2 +- newlib/libc/stdio/fiprintf.c | 2 +- newlib/libc/stdio/fiscanf.c | 2 +- newlib/libc/stdio/flags.c | 2 +- newlib/libc/stdio/floatio.h | 2 +- newlib/libc/stdio/fopen.c | 2 +- newlib/libc/stdio/fprintf.c | 2 +- newlib/libc/stdio/fputc.c | 2 +- newlib/libc/stdio/fputs.c | 2 +- newlib/libc/stdio/fread.c | 2 +- newlib/libc/stdio/freopen.c | 2 +- newlib/libc/stdio/fscanf.c | 2 +- newlib/libc/stdio/fseek.c | 2 +- newlib/libc/stdio/fseeko.c | 2 +- newlib/libc/stdio/fsetpos.c | 2 +- newlib/libc/stdio/ftell.c | 2 +- newlib/libc/stdio/ftello.c | 2 +- newlib/libc/stdio/fvwrite.c | 2 +- newlib/libc/stdio/fvwrite.h | 2 +- newlib/libc/stdio/fwalk.c | 2 +- newlib/libc/stdio/fwprintf.c | 2 +- newlib/libc/stdio/fwrite.c | 2 +- newlib/libc/stdio/fwscanf.c | 2 +- newlib/libc/stdio/getc.c | 2 +- newlib/libc/stdio/getc_u.c | 2 +- newlib/libc/stdio/getchar.c | 2 +- newlib/libc/stdio/getchar_u.c | 2 +- newlib/libc/stdio/gets.c | 2 +- newlib/libc/stdio/getw.c | 2 +- newlib/libc/stdio/iprintf.c | 2 +- newlib/libc/stdio/iscanf.c | 2 +- newlib/libc/stdio/local.h | 2 +- newlib/libc/stdio/makebuf.c | 2 +- newlib/libc/stdio/mktemp.c | 5 ++--- newlib/libc/stdio/nano-vfscanf.c | 2 +- newlib/libc/stdio/nano-vfscanf_float.c | 2 +- newlib/libc/stdio/nano-vfscanf_local.h | 2 +- newlib/libc/stdio/perror.c | 2 +- newlib/libc/stdio/printf.c | 2 +- newlib/libc/stdio/putc.c | 2 +- newlib/libc/stdio/putc_u.c | 2 +- newlib/libc/stdio/putchar.c | 2 +- newlib/libc/stdio/putchar_u.c | 2 +- newlib/libc/stdio/puts.c | 2 +- newlib/libc/stdio/putw.c | 2 +- newlib/libc/stdio/refill.c | 2 +- newlib/libc/stdio/remove.c | 2 +- newlib/libc/stdio/rename.c | 2 +- newlib/libc/stdio/rewind.c | 2 +- newlib/libc/stdio/rget.c | 2 +- newlib/libc/stdio/scanf.c | 2 +- newlib/libc/stdio/sccl.c | 2 +- newlib/libc/stdio/setbuf.c | 2 +- newlib/libc/stdio/setbuffer.c | 2 +- newlib/libc/stdio/setlinebuf.c | 2 +- newlib/libc/stdio/setvbuf.c | 2 +- newlib/libc/stdio/siprintf.c | 2 +- newlib/libc/stdio/siscanf.c | 2 +- newlib/libc/stdio/sniprintf.c | 2 +- newlib/libc/stdio/snprintf.c | 2 +- newlib/libc/stdio/sprintf.c | 2 +- newlib/libc/stdio/sscanf.c | 2 +- newlib/libc/stdio/stdio.c | 2 +- newlib/libc/stdio/swprintf.c | 2 +- newlib/libc/stdio/swscanf.c | 2 +- newlib/libc/stdio/ungetc.c | 2 +- newlib/libc/stdio/vasiprintf.c | 2 +- newlib/libc/stdio/vasprintf.c | 2 +- newlib/libc/stdio/vfprintf.c | 6 +----- newlib/libc/stdio/vfscanf.c | 2 +- newlib/libc/stdio/vfwscanf.c | 2 +- newlib/libc/stdio/viprintf.c | 2 +- newlib/libc/stdio/viscanf.c | 2 +- newlib/libc/stdio/vprintf.c | 2 +- newlib/libc/stdio/vscanf.c | 2 +- newlib/libc/stdio/vsiprintf.c | 2 +- newlib/libc/stdio/vsiscanf.c | 2 +- newlib/libc/stdio/vsniprintf.c | 2 +- newlib/libc/stdio/vsnprintf.c | 2 +- newlib/libc/stdio/vsprintf.c | 2 +- newlib/libc/stdio/vsscanf.c | 2 +- newlib/libc/stdio/vswprintf.c | 2 +- newlib/libc/stdio/vswscanf.c | 2 +- newlib/libc/stdio/vwprintf.c | 2 +- newlib/libc/stdio/vwscanf.c | 2 +- newlib/libc/stdio/wbuf.c | 2 +- newlib/libc/stdio/wprintf.c | 2 +- newlib/libc/stdio/wscanf.c | 2 +- newlib/libc/stdio/wsetup.c | 2 +- newlib/libc/stdio64/fopen64.c | 2 +- newlib/libc/stdio64/freopen64.c | 2 +- newlib/libc/stdio64/fseeko64.c | 2 +- newlib/libc/stdio64/ftello64.c | 2 +- newlib/libc/stdio64/stdio64.c | 2 +- newlib/libc/stdlib/atoll.c | 6 +----- newlib/libc/stdlib/div.c | 6 +----- newlib/libc/stdlib/getenv.c | 5 ++--- newlib/libc/stdlib/getenv_r.c | 5 ++--- newlib/libc/stdlib/getsubopt.3 | 6 +----- newlib/libc/stdlib/getsubopt.c | 6 +----- newlib/libc/stdlib/ldiv.c | 6 +----- newlib/libc/stdlib/putenv.c | 5 ++--- newlib/libc/stdlib/putenv_r.c | 5 ++--- newlib/libc/stdlib/setenv.c | 5 ++--- newlib/libc/stdlib/setenv_r.c | 5 ++--- newlib/libc/stdlib/strtol.c | 6 +----- newlib/libc/stdlib/strtoll.c | 6 +----- newlib/libc/stdlib/strtoul.c | 6 +----- newlib/libc/stdlib/strtoull.c | 6 +----- newlib/libc/stdlib/wcstol.c | 6 +----- newlib/libc/stdlib/wcstoll.c | 6 +----- newlib/libc/stdlib/wcstoul.c | 6 +----- newlib/libc/stdlib/wcstoull.c | 6 +----- newlib/libc/sys/linux/include/arpa/ftp.h | 6 +----- newlib/libc/sys/linux/include/arpa/inet.h | 6 +----- newlib/libc/sys/linux/include/arpa/nameser.h | 6 +----- newlib/libc/sys/linux/include/arpa/nameser_compat.h | 6 +----- newlib/libc/sys/linux/include/arpa/telnet.h | 6 +----- newlib/libc/sys/linux/include/arpa/tftp.h | 6 +----- newlib/libc/sys/linux/include/fnmatch.h | 6 +----- newlib/libc/sys/linux/include/glob.h | 6 +----- newlib/libc/sys/linux/include/net/bpf.h | 6 +----- newlib/libc/sys/linux/include/net/bpf_compat.h | 6 +----- newlib/libc/sys/linux/include/net/bpfdesc.h | 6 +----- newlib/libc/sys/linux/include/net/fddi.h | 6 +----- newlib/libc/sys/linux/include/net/if.h | 6 +----- newlib/libc/sys/linux/include/net/if_arc.h | 6 +----- newlib/libc/sys/linux/include/net/if_arp.h | 6 +----- newlib/libc/sys/linux/include/net/if_dl.h | 6 +----- newlib/libc/sys/linux/include/net/if_llc.h | 6 +----- newlib/libc/sys/linux/include/net/if_slvar.h | 6 +----- newlib/libc/sys/linux/include/net/if_types.h | 6 +----- newlib/libc/sys/linux/include/net/if_var.h | 6 +----- newlib/libc/sys/linux/include/net/netisr.h | 6 +----- newlib/libc/sys/linux/include/net/radix.h | 6 +----- newlib/libc/sys/linux/include/net/raw_cb.h | 6 +----- newlib/libc/sys/linux/include/net/route.h | 6 +----- newlib/libc/sys/linux/include/net/slcompress.h | 6 +----- newlib/libc/sys/linux/include/net/slip.h | 6 +----- newlib/libc/sys/linux/include/netdb.h | 6 +----- newlib/libc/sys/linux/include/netinet/icmp6.h | 6 +----- newlib/libc/sys/linux/include/netinet/icmp_var.h | 6 +----- newlib/libc/sys/linux/include/netinet/if_ether.h | 6 +----- newlib/libc/sys/linux/include/netinet/igmp.h | 6 +----- newlib/libc/sys/linux/include/netinet/igmp_var.h | 6 +----- newlib/libc/sys/linux/include/netinet/in.h | 6 +----- newlib/libc/sys/linux/include/netinet/in_pcb.h | 6 +----- newlib/libc/sys/linux/include/netinet/in_systm.h | 6 +----- newlib/libc/sys/linux/include/netinet/in_var.h | 6 +----- newlib/libc/sys/linux/include/netinet/ip.h | 6 +----- newlib/libc/sys/linux/include/netinet/ip6.h | 6 +----- newlib/libc/sys/linux/include/netinet/ip_icmp.h | 6 +----- newlib/libc/sys/linux/include/netinet/ip_mroute.h | 6 +----- newlib/libc/sys/linux/include/netinet/ip_var.h | 6 +----- newlib/libc/sys/linux/include/netinet/ipprotosw.h | 6 +----- newlib/libc/sys/linux/include/netinet/tcp.h | 6 +----- newlib/libc/sys/linux/include/netinet/tcp_debug.h | 6 +----- newlib/libc/sys/linux/include/netinet/tcp_fsm.h | 6 +----- newlib/libc/sys/linux/include/netinet/tcp_seq.h | 6 +----- newlib/libc/sys/linux/include/netinet/tcp_timer.h | 6 +----- newlib/libc/sys/linux/include/netinet/tcp_var.h | 6 +----- newlib/libc/sys/linux/include/netinet/tcpip.h | 6 +----- newlib/libc/sys/linux/include/netinet/udp.h | 6 +----- newlib/libc/sys/linux/include/netinet/udp_var.h | 6 +----- newlib/libc/sys/linux/include/netinet6/in6.h | 6 +----- newlib/libc/sys/linux/include/netinet6/in6_pcb.h | 6 +----- newlib/libc/sys/linux/include/netinet6/in6_var.h | 6 +----- newlib/libc/sys/linux/include/netinet6/ip6_var.h | 6 +----- newlib/libc/sys/linux/include/netinet6/ip6protosw.h | 6 +----- newlib/libc/sys/linux/include/netinet6/tcp6_var.h | 6 +----- newlib/libc/sys/linux/include/netinet6/udp6_var.h | 6 +----- newlib/libc/sys/linux/include/netns/idp.h | 6 +----- newlib/libc/sys/linux/include/netns/idp_var.h | 6 +----- newlib/libc/sys/linux/include/netns/ns.h | 6 +----- newlib/libc/sys/linux/include/netns/ns_error.h | 6 +----- newlib/libc/sys/linux/include/netns/ns_if.h | 6 +----- newlib/libc/sys/linux/include/netns/ns_pcb.h | 6 +----- newlib/libc/sys/linux/include/netns/sp.h | 6 +----- newlib/libc/sys/linux/include/netns/spidp.h | 6 +----- newlib/libc/sys/linux/include/netns/spp_debug.h | 6 +----- newlib/libc/sys/linux/include/netns/spp_timer.h | 6 +----- newlib/libc/sys/linux/include/netns/spp_var.h | 6 +----- newlib/libc/sys/linux/include/regex.h | 6 +----- newlib/libc/sys/linux/include/resolv.h | 6 +----- newlib/libc/sys/linux/include/rune.h | 6 +----- newlib/libc/sys/linux/include/runetype.h | 6 +----- newlib/libc/sys/linux/machine/i386/include/endian.h | 6 +----- newlib/libc/sys/linux/machine/i386/include/param.h | 6 +----- newlib/libc/sys/linux/net/inet_addr.c | 6 +----- newlib/libc/sys/linux/net/recv.c | 6 +----- newlib/libc/sys/linux/net/send.c | 6 +----- newlib/libc/sys/linux/readdir64.c | 6 +----- newlib/libc/sys/linux/scandir64.c | 6 +----- newlib/libc/sys/linux/sys/ioccom.h | 6 +----- newlib/libc/sys/linux/sys/param.h | 6 +----- newlib/libc/sys/linux/sys/socket.h | 6 +----- newlib/libc/sys/linux/sys/sockio.h | 6 +----- newlib/libc/sys/linux/sys/time.h | 6 +----- newlib/libc/sys/linux/sys/types.h | 6 +----- newlib/libc/sys/phoenix/include/arpa/telnet.h | 6 +----- newlib/libc/sys/phoenix/include/net/if.h | 6 +----- newlib/libc/sys/phoenix/include/net/if_arp.h | 6 +----- newlib/libc/sys/phoenix/include/netdb.h | 6 +----- newlib/libc/sys/phoenix/include/netinet/in.h | 6 +----- newlib/libc/sys/phoenix/include/netinet/in_systm.h | 6 +----- newlib/libc/sys/phoenix/include/netinet/ip.h | 6 +----- newlib/libc/sys/phoenix/include/netinet6/in6.h | 6 +----- newlib/libc/sys/phoenix/net/inet_addr.c | 6 +----- newlib/libc/sys/phoenix/net/inet_aton.c | 6 +----- newlib/libc/sys/rtems/include/sys/syslimits.h | 6 +----- newlib/libc/sys/sparc64/closedir.c | 6 +----- newlib/libc/sys/sparc64/opendir.c | 6 +----- newlib/libc/sys/sparc64/readdir.c | 6 +----- newlib/libc/sys/sparc64/rewinddir.c | 6 +----- newlib/libc/sys/sparc64/scandir.c | 6 +----- newlib/libc/sys/sparc64/seekdir.c | 6 +----- newlib/libc/sys/sparc64/telldir.c | 6 +----- newlib/libc/sys/sysvi386/closedir.c | 6 +----- newlib/libc/sys/sysvi386/crt0.c | 6 +----- newlib/libc/sys/sysvi386/opendir.c | 6 +----- newlib/libc/sys/sysvi386/readdir.c | 6 +----- newlib/libc/sys/sysvi386/rewinddir.c | 6 +----- newlib/libc/sys/sysvi386/scandir.c | 6 +----- newlib/libc/sys/sysvi386/seekdir.c | 6 +----- newlib/libc/sys/sysvi386/telldir.c | 6 +----- winsup/cygwin/include/arpa/ftp.h | 6 +----- winsup/cygwin/include/arpa/nameser.h | 6 +----- winsup/cygwin/include/arpa/nameser_compat.h | 6 +----- winsup/cygwin/include/arpa/telnet.h | 6 +----- winsup/cygwin/include/fnmatch.h | 6 +----- winsup/cygwin/include/fts.h | 6 +----- winsup/cygwin/include/getopt.h | 6 +----- winsup/cygwin/include/glob.h | 6 +----- winsup/cygwin/include/netdb.h | 6 +----- winsup/cygwin/include/netinet/ip.h | 6 +----- winsup/cygwin/include/netinet/tcp.h | 6 +----- winsup/cygwin/include/netinet/udp.h | 6 +----- winsup/cygwin/include/resolv.h | 6 +----- winsup/cygwin/include/sysexits.h | 6 +----- winsup/cygwin/strsep.cc | 6 +----- winsup/testsuite/winsup.api/msgtest.c | 6 +----- winsup/testsuite/winsup.api/semtest.c | 6 +----- winsup/testsuite/winsup.api/shmtest.c | 6 +----- 300 files changed, 307 insertions(+), 1034 deletions(-) diff --git a/libgloss/i386/cygmon-gmon.c b/libgloss/i386/cygmon-gmon.c index 480b2ec99..3c15b70d3 100644 --- a/libgloss/i386/cygmon-gmon.c +++ b/libgloss/i386/cygmon-gmon.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/libgloss/m32r/Makefile.in b/libgloss/m32r/Makefile.in index 12a1be60e..0b8b19368 100644 --- a/libgloss/m32r/Makefile.in +++ b/libgloss/m32r/Makefile.in @@ -5,7 +5,7 @@ # Redistribution and use in source and binary forms are permitted # provided that the above copyright notice and this paragraph are # duplicated in all such forms and that any documentation, -# advertising materials, and other materials related to such +# and/or other materials related to such # distribution and use acknowledge that the software was developed # at Cygnus Support, Inc. Cygnus Support, Inc. may not be used to # endorse or promote products derived from this software without diff --git a/libgloss/nds32/Makefile.in b/libgloss/nds32/Makefile.in index 99ccae814..326009c00 100644 --- a/libgloss/nds32/Makefile.in +++ b/libgloss/nds32/Makefile.in @@ -5,7 +5,7 @@ # Redistribution and use in source and binary forms are permitted # provided that the above copyright notice and this paragraph are # duplicated in all such forms and that any documentation, -# advertising materials, and other materials related to such +# and/or other materials related to such # distribution and use acknowledge that the software was developed # at Cygnus Support, Inc. Cygnus Support, Inc. may not be used to # endorse or promote products derived from this software without diff --git a/libgloss/sparc/libsys/Makefile.in b/libgloss/sparc/libsys/Makefile.in index b4c4be695..b732137c5 100644 --- a/libgloss/sparc/libsys/Makefile.in +++ b/libgloss/sparc/libsys/Makefile.in @@ -5,7 +5,7 @@ # Redistribution and use in source and binary forms are permitted # provided that the above copyright notice and this paragraph are # duplicated in all such forms and that any documentation, -# advertising materials, and other materials related to such +# and/or other materials related to such # distribution and use acknowledge that the software was developed # at Cygnus Support, Inc. Cygnus Support, Inc. may not be used to # endorse or promote products derived from this software without diff --git a/libgloss/sparc/libsys/configure.in b/libgloss/sparc/libsys/configure.in index 4d8a5fad6..1e0652927 100644 --- a/libgloss/sparc/libsys/configure.in +++ b/libgloss/sparc/libsys/configure.in @@ -5,7 +5,7 @@ # Redistribution and use in source and binary forms are permitted # provided that the above copyright notice and this paragraph are # duplicated in all such forms and that any documentation, -# advertising materials, and other materials related to such +# and/or other materials related to such # distribution and use acknowledge that the software was developed # at Cygnus Support, Inc. Cygnus Support, Inc. may not be used to # endorse or promote products derived from this software without diff --git a/libgloss/sparc_leon/asm-leon/leonbare_kernel_queue.h b/libgloss/sparc_leon/asm-leon/leonbare_kernel_queue.h index a51df105b..f01d59aa7 100644 --- a/libgloss/sparc_leon/asm-leon/leonbare_kernel_queue.h +++ b/libgloss/sparc_leon/asm-leon/leonbare_kernel_queue.h @@ -26,11 +26,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/libgloss/sparc_leon/asm-leon/queue.h b/libgloss/sparc_leon/asm-leon/queue.h index 621bc3016..384a027a7 100644 --- a/libgloss/sparc_leon/asm-leon/queue.h +++ b/libgloss/sparc_leon/asm-leon/queue.h @@ -26,11 +26,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/mkdep b/mkdep index 3c5b508f1..78c229c14 100755 --- a/mkdep +++ b/mkdep @@ -6,7 +6,7 @@ # Redistribution and use in source and binary forms are permitted # provided that the above copyright notice and this paragraph are # duplicated in all such forms and that any documentation, -# advertising materials, and other materials related to such +# and/or other materials related to such # distribution and use acknowledge that the software was developed # by the University of California, Berkeley. The name of the # University may not be used to endorse or promote products derived diff --git a/newlib/libc/ctype/ctype_.c b/newlib/libc/ctype/ctype_.c index 28727e8a8..32ce4f318 100644 --- a/newlib/libc/ctype/ctype_.c +++ b/newlib/libc/ctype/ctype_.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/include/ar.h b/newlib/libc/include/ar.h index ac2e4ca92..4c05813c3 100644 --- a/newlib/libc/include/ar.h +++ b/newlib/libc/include/ar.h @@ -20,11 +20,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/include/grp.h b/newlib/libc/include/grp.h index 6a265643a..7296e7a1e 100644 --- a/newlib/libc/include/grp.h +++ b/newlib/libc/include/grp.h @@ -17,11 +17,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/include/pwd.h b/newlib/libc/include/pwd.h index f37d289f9..baae88410 100644 --- a/newlib/libc/include/pwd.h +++ b/newlib/libc/include/pwd.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h index 164d95bca..ab18806e3 100644 --- a/newlib/libc/include/stdio.h +++ b/newlib/libc/include/stdio.h @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/include/sys/syslimits.h b/newlib/libc/include/sys/syslimits.h index ba9dbd667..c872d2018 100644 --- a/newlib/libc/include/sys/syslimits.h +++ b/newlib/libc/include/sys/syslimits.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/include/unctrl.h b/newlib/libc/include/unctrl.h index 010812ff3..3363328ef 100644 --- a/newlib/libc/include/unctrl.h +++ b/newlib/libc/include/unctrl.h @@ -11,11 +11,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/machine/hppa/DEFS.h b/newlib/libc/machine/hppa/DEFS.h index a8b19b5b4..12fcd8e0e 100644 --- a/newlib/libc/machine/hppa/DEFS.h +++ b/newlib/libc/machine/hppa/DEFS.h @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/machine/powerpc/vfprintf.c b/newlib/libc/machine/powerpc/vfprintf.c index 1244f39f1..a8af4c370 100644 --- a/newlib/libc/machine/powerpc/vfprintf.c +++ b/newlib/libc/machine/powerpc/vfprintf.c @@ -65,11 +65,7 @@ Supporting OS subroutines required: <>, <>, <>, * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/machine/powerpc/vfscanf.c b/newlib/libc/machine/powerpc/vfscanf.c index 111fe5f9e..ccd290f99 100644 --- a/newlib/libc/machine/powerpc/vfscanf.c +++ b/newlib/libc/machine/powerpc/vfscanf.c @@ -58,7 +58,7 @@ Supporting OS subroutines required: * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/machine/sparc/setjmp.S b/newlib/libc/machine/sparc/setjmp.S index 8df0a6e40..613df2ba2 100644 --- a/newlib/libc/machine/sparc/setjmp.S +++ b/newlib/libc/machine/sparc/setjmp.S @@ -22,11 +22,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/misc/unctrl.c b/newlib/libc/misc/unctrl.c index 8bca2a2a5..cd2d937d9 100644 --- a/newlib/libc/misc/unctrl.c +++ b/newlib/libc/misc/unctrl.c @@ -42,11 +42,7 @@ No supporting OS subroutines are required. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/posix/cclass.h b/newlib/libc/posix/cclass.h index 956a655fa..08343d476 100644 --- a/newlib/libc/posix/cclass.h +++ b/newlib/libc/posix/cclass.h @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/posix/closedir.c b/newlib/libc/posix/closedir.c index 032636d09..c19e21f05 100644 --- a/newlib/libc/posix/closedir.c +++ b/newlib/libc/posix/closedir.c @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/posix/cname.h b/newlib/libc/posix/cname.h index 4f0d583d2..efb177c20 100644 --- a/newlib/libc/posix/cname.h +++ b/newlib/libc/posix/cname.h @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/posix/fnmatch.3 b/newlib/libc/posix/fnmatch.3 index 9c3fda5f9..aec25ea26 100644 --- a/newlib/libc/posix/fnmatch.3 +++ b/newlib/libc/posix/fnmatch.3 @@ -11,11 +11,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" diff --git a/newlib/libc/posix/glob.3 b/newlib/libc/posix/glob.3 index aa509a363..d90a1b5c9 100644 --- a/newlib/libc/posix/glob.3 +++ b/newlib/libc/posix/glob.3 @@ -11,11 +11,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" diff --git a/newlib/libc/posix/opendir.c b/newlib/libc/posix/opendir.c index 2cf1ba541..4dbad1afb 100644 --- a/newlib/libc/posix/opendir.c +++ b/newlib/libc/posix/opendir.c @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/posix/readdir.c b/newlib/libc/posix/readdir.c index 40608f93c..fef83c1db 100644 --- a/newlib/libc/posix/readdir.c +++ b/newlib/libc/posix/readdir.c @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/posix/readdir_r.c b/newlib/libc/posix/readdir_r.c index 8f4a98293..ac55cc8ef 100644 --- a/newlib/libc/posix/readdir_r.c +++ b/newlib/libc/posix/readdir_r.c @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/posix/regex.3 b/newlib/libc/posix/regex.3 index d0b45a8e7..d9bf9018a 100644 --- a/newlib/libc/posix/regex.3 +++ b/newlib/libc/posix/regex.3 @@ -13,11 +13,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" diff --git a/newlib/libc/posix/regex2.h b/newlib/libc/posix/regex2.h index 303b7f7b3..595bd899b 100644 --- a/newlib/libc/posix/regex2.h +++ b/newlib/libc/posix/regex2.h @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/posix/rewinddir.c b/newlib/libc/posix/rewinddir.c index 930b79afc..da5e0de25 100644 --- a/newlib/libc/posix/rewinddir.c +++ b/newlib/libc/posix/rewinddir.c @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/posix/seekdir.c b/newlib/libc/posix/seekdir.c index 6ffeb1415..cb47bb14a 100644 --- a/newlib/libc/posix/seekdir.c +++ b/newlib/libc/posix/seekdir.c @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/posix/telldir.c b/newlib/libc/posix/telldir.c index af86d8d4f..beac537d9 100644 --- a/newlib/libc/posix/telldir.c +++ b/newlib/libc/posix/telldir.c @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/posix/utils.h b/newlib/libc/posix/utils.h index 5439b6cd4..e4499b377 100644 --- a/newlib/libc/posix/utils.h +++ b/newlib/libc/posix/utils.h @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/search/db_local.h b/newlib/libc/search/db_local.h index ec621fabf..ba8286657 100644 --- a/newlib/libc/search/db_local.h +++ b/newlib/libc/search/db_local.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/search/extern.h b/newlib/libc/search/extern.h index 666a6e5bf..58a2a0404 100644 --- a/newlib/libc/search/extern.h +++ b/newlib/libc/search/extern.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/search/hash.c b/newlib/libc/search/hash.c index 60fbeb0fd..33ff275d9 100644 --- a/newlib/libc/search/hash.c +++ b/newlib/libc/search/hash.c @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/search/hash.h b/newlib/libc/search/hash.h index 1b094d613..5f6459212 100644 --- a/newlib/libc/search/hash.h +++ b/newlib/libc/search/hash.h @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/search/hash_bigkey.c b/newlib/libc/search/hash_bigkey.c index 8ff52b383..e110e4694 100644 --- a/newlib/libc/search/hash_bigkey.c +++ b/newlib/libc/search/hash_bigkey.c @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/search/hash_buf.c b/newlib/libc/search/hash_buf.c index 81475e9f7..2b921681a 100644 --- a/newlib/libc/search/hash_buf.c +++ b/newlib/libc/search/hash_buf.c @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/search/hash_func.c b/newlib/libc/search/hash_func.c index 355f0b592..30263d0f6 100644 --- a/newlib/libc/search/hash_func.c +++ b/newlib/libc/search/hash_func.c @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/search/hash_log2.c b/newlib/libc/search/hash_log2.c index 9414f26c2..622c22847 100644 --- a/newlib/libc/search/hash_log2.c +++ b/newlib/libc/search/hash_log2.c @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/search/hash_page.c b/newlib/libc/search/hash_page.c index 7ca304d38..9d15b0cb7 100644 --- a/newlib/libc/search/hash_page.c +++ b/newlib/libc/search/hash_page.c @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/search/page.h b/newlib/libc/search/page.h index 9ecabdacd..f9afc70f7 100644 --- a/newlib/libc/search/page.h +++ b/newlib/libc/search/page.h @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/stdio/asiprintf.c b/newlib/libc/stdio/asiprintf.c index ce6d0a972..af25e9a57 100644 --- a/newlib/libc/stdio/asiprintf.c +++ b/newlib/libc/stdio/asiprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/asprintf.c b/newlib/libc/stdio/asprintf.c index 25696c575..542e70e4c 100644 --- a/newlib/libc/stdio/asprintf.c +++ b/newlib/libc/stdio/asprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/clearerr.c b/newlib/libc/stdio/clearerr.c index be83d6dd9..ff08a8b4e 100644 --- a/newlib/libc/stdio/clearerr.c +++ b/newlib/libc/stdio/clearerr.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fclose.c b/newlib/libc/stdio/fclose.c index 1c36057a7..983ae2cc4 100644 --- a/newlib/libc/stdio/fclose.c +++ b/newlib/libc/stdio/fclose.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fcloseall.c b/newlib/libc/stdio/fcloseall.c index 2e78b4b3c..014c451cd 100644 --- a/newlib/libc/stdio/fcloseall.c +++ b/newlib/libc/stdio/fcloseall.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fdopen.c b/newlib/libc/stdio/fdopen.c index 854c0183d..ef942c284 100644 --- a/newlib/libc/stdio/fdopen.c +++ b/newlib/libc/stdio/fdopen.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/feof.c b/newlib/libc/stdio/feof.c index 879417936..674986b2f 100644 --- a/newlib/libc/stdio/feof.c +++ b/newlib/libc/stdio/feof.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/ferror.c b/newlib/libc/stdio/ferror.c index 3bff52045..dc4d83004 100644 --- a/newlib/libc/stdio/ferror.c +++ b/newlib/libc/stdio/ferror.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fflush.c b/newlib/libc/stdio/fflush.c index e958af9fc..f2d0d9bbb 100644 --- a/newlib/libc/stdio/fflush.c +++ b/newlib/libc/stdio/fflush.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fgetc.c b/newlib/libc/stdio/fgetc.c index 7d0d4842c..21a6a9da5 100644 --- a/newlib/libc/stdio/fgetc.c +++ b/newlib/libc/stdio/fgetc.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fgetpos.c b/newlib/libc/stdio/fgetpos.c index b4f681281..ba92730a3 100644 --- a/newlib/libc/stdio/fgetpos.c +++ b/newlib/libc/stdio/fgetpos.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fgets.c b/newlib/libc/stdio/fgets.c index 7adfb2179..96a44a765 100644 --- a/newlib/libc/stdio/fgets.c +++ b/newlib/libc/stdio/fgets.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fileno.c b/newlib/libc/stdio/fileno.c index ceb83f834..10fc6e283 100644 --- a/newlib/libc/stdio/fileno.c +++ b/newlib/libc/stdio/fileno.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c index 7119c051b..896be99e9 100644 --- a/newlib/libc/stdio/findfp.c +++ b/newlib/libc/stdio/findfp.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fiprintf.c b/newlib/libc/stdio/fiprintf.c index ff0946287..8829eb891 100644 --- a/newlib/libc/stdio/fiprintf.c +++ b/newlib/libc/stdio/fiprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fiscanf.c b/newlib/libc/stdio/fiscanf.c index ea93f7542..a1c8361a9 100644 --- a/newlib/libc/stdio/fiscanf.c +++ b/newlib/libc/stdio/fiscanf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/flags.c b/newlib/libc/stdio/flags.c index 1aa86d36e..f0a94bcf5 100644 --- a/newlib/libc/stdio/flags.c +++ b/newlib/libc/stdio/flags.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/floatio.h b/newlib/libc/stdio/floatio.h index 496721b88..4bddcb760 100644 --- a/newlib/libc/stdio/floatio.h +++ b/newlib/libc/stdio/floatio.h @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fopen.c b/newlib/libc/stdio/fopen.c index 022992b8d..1ac551fed 100644 --- a/newlib/libc/stdio/fopen.c +++ b/newlib/libc/stdio/fopen.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fprintf.c b/newlib/libc/stdio/fprintf.c index efb97ad20..b6c0ea8c0 100644 --- a/newlib/libc/stdio/fprintf.c +++ b/newlib/libc/stdio/fprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fputc.c b/newlib/libc/stdio/fputc.c index 1385cadea..5dfa9c06e 100644 --- a/newlib/libc/stdio/fputc.c +++ b/newlib/libc/stdio/fputc.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fputs.c b/newlib/libc/stdio/fputs.c index 7a1eadb12..4e9cb7547 100644 --- a/newlib/libc/stdio/fputs.c +++ b/newlib/libc/stdio/fputs.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fread.c b/newlib/libc/stdio/fread.c index b358d2b4a..df8321461 100644 --- a/newlib/libc/stdio/fread.c +++ b/newlib/libc/stdio/fread.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/freopen.c b/newlib/libc/stdio/freopen.c index 0af1c1ecd..29ba5b7ff 100644 --- a/newlib/libc/stdio/freopen.c +++ b/newlib/libc/stdio/freopen.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fscanf.c b/newlib/libc/stdio/fscanf.c index af01eedbe..40964d2c2 100644 --- a/newlib/libc/stdio/fscanf.c +++ b/newlib/libc/stdio/fscanf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fseek.c b/newlib/libc/stdio/fseek.c index 9b3ea986c..e9278af8d 100644 --- a/newlib/libc/stdio/fseek.c +++ b/newlib/libc/stdio/fseek.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fseeko.c b/newlib/libc/stdio/fseeko.c index 3e0f9e90b..13df28bfc 100644 --- a/newlib/libc/stdio/fseeko.c +++ b/newlib/libc/stdio/fseeko.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fsetpos.c b/newlib/libc/stdio/fsetpos.c index b5334e251..6258600d4 100644 --- a/newlib/libc/stdio/fsetpos.c +++ b/newlib/libc/stdio/fsetpos.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/ftell.c b/newlib/libc/stdio/ftell.c index e4a246199..c540c430f 100644 --- a/newlib/libc/stdio/ftell.c +++ b/newlib/libc/stdio/ftell.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/ftello.c b/newlib/libc/stdio/ftello.c index d083b9359..3df200cea 100644 --- a/newlib/libc/stdio/ftello.c +++ b/newlib/libc/stdio/ftello.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fvwrite.c b/newlib/libc/stdio/fvwrite.c index 3e3a0c6a2..587ffacd7 100644 --- a/newlib/libc/stdio/fvwrite.c +++ b/newlib/libc/stdio/fvwrite.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fvwrite.h b/newlib/libc/stdio/fvwrite.h index 139d83737..767174b6c 100644 --- a/newlib/libc/stdio/fvwrite.h +++ b/newlib/libc/stdio/fvwrite.h @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fwalk.c b/newlib/libc/stdio/fwalk.c index b4b285a64..8040d5718 100644 --- a/newlib/libc/stdio/fwalk.c +++ b/newlib/libc/stdio/fwalk.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fwprintf.c b/newlib/libc/stdio/fwprintf.c index d4047dcc4..e57866420 100644 --- a/newlib/libc/stdio/fwprintf.c +++ b/newlib/libc/stdio/fwprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fwrite.c b/newlib/libc/stdio/fwrite.c index aa14421db..d499f6f59 100644 --- a/newlib/libc/stdio/fwrite.c +++ b/newlib/libc/stdio/fwrite.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/fwscanf.c b/newlib/libc/stdio/fwscanf.c index 1b86a3472..59a96dd9f 100644 --- a/newlib/libc/stdio/fwscanf.c +++ b/newlib/libc/stdio/fwscanf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/getc.c b/newlib/libc/stdio/getc.c index 3c62f0bd9..c8781320e 100644 --- a/newlib/libc/stdio/getc.c +++ b/newlib/libc/stdio/getc.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/getc_u.c b/newlib/libc/stdio/getc_u.c index fb37ba4b1..8bbbb4e75 100644 --- a/newlib/libc/stdio/getc_u.c +++ b/newlib/libc/stdio/getc_u.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/getchar.c b/newlib/libc/stdio/getchar.c index 7e0b74848..e6b18f047 100644 --- a/newlib/libc/stdio/getchar.c +++ b/newlib/libc/stdio/getchar.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/getchar_u.c b/newlib/libc/stdio/getchar_u.c index e45176dfa..f4ba0f96b 100644 --- a/newlib/libc/stdio/getchar_u.c +++ b/newlib/libc/stdio/getchar_u.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/gets.c b/newlib/libc/stdio/gets.c index a510ec0f0..82bfc5709 100644 --- a/newlib/libc/stdio/gets.c +++ b/newlib/libc/stdio/gets.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/getw.c b/newlib/libc/stdio/getw.c index a1b72e482..38ef77831 100644 --- a/newlib/libc/stdio/getw.c +++ b/newlib/libc/stdio/getw.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/iprintf.c b/newlib/libc/stdio/iprintf.c index 507d15415..7e32eda80 100644 --- a/newlib/libc/stdio/iprintf.c +++ b/newlib/libc/stdio/iprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/iscanf.c b/newlib/libc/stdio/iscanf.c index 980dabd29..35c389980 100644 --- a/newlib/libc/stdio/iscanf.c +++ b/newlib/libc/stdio/iscanf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h index 53694aa1c..84ff40b49 100644 --- a/newlib/libc/stdio/local.h +++ b/newlib/libc/stdio/local.h @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/makebuf.c b/newlib/libc/stdio/makebuf.c index f2da70ad6..0030812c1 100644 --- a/newlib/libc/stdio/makebuf.c +++ b/newlib/libc/stdio/makebuf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/mktemp.c b/newlib/libc/stdio/mktemp.c index 9b85eb93e..3514818a6 100644 --- a/newlib/libc/stdio/mktemp.c +++ b/newlib/libc/stdio/mktemp.c @@ -7,9 +7,8 @@ * notice and comment, and (2) distributions including binaries display * the following acknowledgement: ``This product includes software * developed by the University of California, Berkeley and its contributors'' - * in the documentation or other materials provided with the distribution - * and in all advertising materials mentioning features or use of this - * software. Neither the name of the University nor the names of its + * in the documentation or other materials provided with the distribution. + * Neither the name of the University nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR diff --git a/newlib/libc/stdio/nano-vfscanf.c b/newlib/libc/stdio/nano-vfscanf.c index 97810b739..57d25b82a 100644 --- a/newlib/libc/stdio/nano-vfscanf.c +++ b/newlib/libc/stdio/nano-vfscanf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/nano-vfscanf_float.c b/newlib/libc/stdio/nano-vfscanf_float.c index 5df9f227c..056046f5b 100644 --- a/newlib/libc/stdio/nano-vfscanf_float.c +++ b/newlib/libc/stdio/nano-vfscanf_float.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/nano-vfscanf_local.h b/newlib/libc/stdio/nano-vfscanf_local.h index 7fbd964ed..d696ec0cc 100644 --- a/newlib/libc/stdio/nano-vfscanf_local.h +++ b/newlib/libc/stdio/nano-vfscanf_local.h @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/perror.c b/newlib/libc/stdio/perror.c index 68d78c227..eda7e993b 100644 --- a/newlib/libc/stdio/perror.c +++ b/newlib/libc/stdio/perror.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/printf.c b/newlib/libc/stdio/printf.c index a9ba6118e..3a0716418 100644 --- a/newlib/libc/stdio/printf.c +++ b/newlib/libc/stdio/printf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/putc.c b/newlib/libc/stdio/putc.c index d4adc5a50..6a410e216 100644 --- a/newlib/libc/stdio/putc.c +++ b/newlib/libc/stdio/putc.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/putc_u.c b/newlib/libc/stdio/putc_u.c index de4ac2833..3bb53e5ce 100644 --- a/newlib/libc/stdio/putc_u.c +++ b/newlib/libc/stdio/putc_u.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/putchar.c b/newlib/libc/stdio/putchar.c index c52d38799..6e1b1f12c 100644 --- a/newlib/libc/stdio/putchar.c +++ b/newlib/libc/stdio/putchar.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/putchar_u.c b/newlib/libc/stdio/putchar_u.c index 8f16bfbc6..029243542 100644 --- a/newlib/libc/stdio/putchar_u.c +++ b/newlib/libc/stdio/putchar_u.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/puts.c b/newlib/libc/stdio/puts.c index f612ece6d..d4d7b7ffb 100644 --- a/newlib/libc/stdio/puts.c +++ b/newlib/libc/stdio/puts.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/putw.c b/newlib/libc/stdio/putw.c index a7907bef7..bec9aa2c6 100644 --- a/newlib/libc/stdio/putw.c +++ b/newlib/libc/stdio/putw.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/refill.c b/newlib/libc/stdio/refill.c index 87a715b84..ccedc7af7 100644 --- a/newlib/libc/stdio/refill.c +++ b/newlib/libc/stdio/refill.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/remove.c b/newlib/libc/stdio/remove.c index a10582832..d8dfdbd82 100644 --- a/newlib/libc/stdio/remove.c +++ b/newlib/libc/stdio/remove.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/rename.c b/newlib/libc/stdio/rename.c index b3c745a10..16ef3e351 100644 --- a/newlib/libc/stdio/rename.c +++ b/newlib/libc/stdio/rename.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/rewind.c b/newlib/libc/stdio/rewind.c index a65847d5e..aafac0c2a 100644 --- a/newlib/libc/stdio/rewind.c +++ b/newlib/libc/stdio/rewind.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/rget.c b/newlib/libc/stdio/rget.c index 656e5661b..a9a0d2f2f 100644 --- a/newlib/libc/stdio/rget.c +++ b/newlib/libc/stdio/rget.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/scanf.c b/newlib/libc/stdio/scanf.c index 898c6e7af..a9d23b988 100644 --- a/newlib/libc/stdio/scanf.c +++ b/newlib/libc/stdio/scanf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/sccl.c b/newlib/libc/stdio/sccl.c index c1bf2b189..dd705e410 100644 --- a/newlib/libc/stdio/sccl.c +++ b/newlib/libc/stdio/sccl.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/setbuf.c b/newlib/libc/stdio/setbuf.c index f5471866d..92739ee15 100644 --- a/newlib/libc/stdio/setbuf.c +++ b/newlib/libc/stdio/setbuf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/setbuffer.c b/newlib/libc/stdio/setbuffer.c index 35d17da3b..de0a480c5 100644 --- a/newlib/libc/stdio/setbuffer.c +++ b/newlib/libc/stdio/setbuffer.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/setlinebuf.c b/newlib/libc/stdio/setlinebuf.c index d623b3014..70c48ad31 100644 --- a/newlib/libc/stdio/setlinebuf.c +++ b/newlib/libc/stdio/setlinebuf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/setvbuf.c b/newlib/libc/stdio/setvbuf.c index 63c9970e4..f9eeefd1c 100644 --- a/newlib/libc/stdio/setvbuf.c +++ b/newlib/libc/stdio/setvbuf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/siprintf.c b/newlib/libc/stdio/siprintf.c index be000f629..bd29edd88 100644 --- a/newlib/libc/stdio/siprintf.c +++ b/newlib/libc/stdio/siprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/siscanf.c b/newlib/libc/stdio/siscanf.c index 355d2662a..b88b81088 100644 --- a/newlib/libc/stdio/siscanf.c +++ b/newlib/libc/stdio/siscanf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/sniprintf.c b/newlib/libc/stdio/sniprintf.c index 840c564dc..375a3971f 100644 --- a/newlib/libc/stdio/sniprintf.c +++ b/newlib/libc/stdio/sniprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/snprintf.c b/newlib/libc/stdio/snprintf.c index 809b52b51..50d7ddd11 100644 --- a/newlib/libc/stdio/snprintf.c +++ b/newlib/libc/stdio/snprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/sprintf.c b/newlib/libc/stdio/sprintf.c index 096ca216a..be66ec6f5 100644 --- a/newlib/libc/stdio/sprintf.c +++ b/newlib/libc/stdio/sprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/sscanf.c b/newlib/libc/stdio/sscanf.c index 99054e245..9c50361bc 100644 --- a/newlib/libc/stdio/sscanf.c +++ b/newlib/libc/stdio/sscanf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/stdio.c b/newlib/libc/stdio/stdio.c index a72fb74d0..6347949db 100644 --- a/newlib/libc/stdio/stdio.c +++ b/newlib/libc/stdio/stdio.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/swprintf.c b/newlib/libc/stdio/swprintf.c index fa3b43e7a..ec7e089ca 100644 --- a/newlib/libc/stdio/swprintf.c +++ b/newlib/libc/stdio/swprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/swscanf.c b/newlib/libc/stdio/swscanf.c index c8ae05b42..5514e68c0 100644 --- a/newlib/libc/stdio/swscanf.c +++ b/newlib/libc/stdio/swscanf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/ungetc.c b/newlib/libc/stdio/ungetc.c index 444577585..533c28eac 100644 --- a/newlib/libc/stdio/ungetc.c +++ b/newlib/libc/stdio/ungetc.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/vasiprintf.c b/newlib/libc/stdio/vasiprintf.c index c7c5e35e4..1deb2dbcf 100644 --- a/newlib/libc/stdio/vasiprintf.c +++ b/newlib/libc/stdio/vasiprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/vasprintf.c b/newlib/libc/stdio/vasprintf.c index 8fe635462..d7ec9c840 100644 --- a/newlib/libc/stdio/vasprintf.c +++ b/newlib/libc/stdio/vasprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c index c4bf2dbe3..1aaf05aa4 100644 --- a/newlib/libc/stdio/vfprintf.c +++ b/newlib/libc/stdio/vfprintf.c @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c index 9c38eebf4..994cee7fc 100644 --- a/newlib/libc/stdio/vfscanf.c +++ b/newlib/libc/stdio/vfscanf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/vfwscanf.c b/newlib/libc/stdio/vfwscanf.c index ffb6cc85b..f00d41a09 100644 --- a/newlib/libc/stdio/vfwscanf.c +++ b/newlib/libc/stdio/vfwscanf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/viprintf.c b/newlib/libc/stdio/viprintf.c index a59bc9c19..12b7b10e9 100644 --- a/newlib/libc/stdio/viprintf.c +++ b/newlib/libc/stdio/viprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/viscanf.c b/newlib/libc/stdio/viscanf.c index c19d1b16a..6cc16cdac 100644 --- a/newlib/libc/stdio/viscanf.c +++ b/newlib/libc/stdio/viscanf.c @@ -7,7 +7,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/vprintf.c b/newlib/libc/stdio/vprintf.c index b195a1ecf..8e13cbb8a 100644 --- a/newlib/libc/stdio/vprintf.c +++ b/newlib/libc/stdio/vprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/vscanf.c b/newlib/libc/stdio/vscanf.c index 567f5cb3e..9e123572b 100644 --- a/newlib/libc/stdio/vscanf.c +++ b/newlib/libc/stdio/vscanf.c @@ -7,7 +7,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/vsiprintf.c b/newlib/libc/stdio/vsiprintf.c index 74eae0253..8128cb772 100644 --- a/newlib/libc/stdio/vsiprintf.c +++ b/newlib/libc/stdio/vsiprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/vsiscanf.c b/newlib/libc/stdio/vsiscanf.c index b21dcb1a2..d7135ef71 100644 --- a/newlib/libc/stdio/vsiscanf.c +++ b/newlib/libc/stdio/vsiscanf.c @@ -7,7 +7,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/vsniprintf.c b/newlib/libc/stdio/vsniprintf.c index 6036c8cb8..a8b272e2f 100644 --- a/newlib/libc/stdio/vsniprintf.c +++ b/newlib/libc/stdio/vsniprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/vsnprintf.c b/newlib/libc/stdio/vsnprintf.c index bcaffa30f..5c617a8a3 100644 --- a/newlib/libc/stdio/vsnprintf.c +++ b/newlib/libc/stdio/vsnprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/vsprintf.c b/newlib/libc/stdio/vsprintf.c index 823cacb56..4d51fd0dc 100644 --- a/newlib/libc/stdio/vsprintf.c +++ b/newlib/libc/stdio/vsprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/vsscanf.c b/newlib/libc/stdio/vsscanf.c index f4e096b50..e9e84088f 100644 --- a/newlib/libc/stdio/vsscanf.c +++ b/newlib/libc/stdio/vsscanf.c @@ -7,7 +7,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/vswprintf.c b/newlib/libc/stdio/vswprintf.c index 5297a27cf..89795ed8d 100644 --- a/newlib/libc/stdio/vswprintf.c +++ b/newlib/libc/stdio/vswprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/vswscanf.c b/newlib/libc/stdio/vswscanf.c index 7687001ab..13b61f4a3 100644 --- a/newlib/libc/stdio/vswscanf.c +++ b/newlib/libc/stdio/vswscanf.c @@ -7,7 +7,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/vwprintf.c b/newlib/libc/stdio/vwprintf.c index d1b7d4cd0..358d87690 100644 --- a/newlib/libc/stdio/vwprintf.c +++ b/newlib/libc/stdio/vwprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/vwscanf.c b/newlib/libc/stdio/vwscanf.c index 1f33db6af..c994bad45 100644 --- a/newlib/libc/stdio/vwscanf.c +++ b/newlib/libc/stdio/vwscanf.c @@ -7,7 +7,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/wbuf.c b/newlib/libc/stdio/wbuf.c index 034d8ebcc..247490303 100644 --- a/newlib/libc/stdio/wbuf.c +++ b/newlib/libc/stdio/wbuf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/wprintf.c b/newlib/libc/stdio/wprintf.c index 176b16a20..32be6f12b 100644 --- a/newlib/libc/stdio/wprintf.c +++ b/newlib/libc/stdio/wprintf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/wscanf.c b/newlib/libc/stdio/wscanf.c index 5a7c35a08..4de79222a 100644 --- a/newlib/libc/stdio/wscanf.c +++ b/newlib/libc/stdio/wscanf.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio/wsetup.c b/newlib/libc/stdio/wsetup.c index 5a4fc0ace..6a820f1c0 100644 --- a/newlib/libc/stdio/wsetup.c +++ b/newlib/libc/stdio/wsetup.c @@ -7,7 +7,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio64/fopen64.c b/newlib/libc/stdio64/fopen64.c index 8c8df9141..75d2c2c41 100644 --- a/newlib/libc/stdio64/fopen64.c +++ b/newlib/libc/stdio64/fopen64.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio64/freopen64.c b/newlib/libc/stdio64/freopen64.c index 17942b74a..e6ba64f7d 100644 --- a/newlib/libc/stdio64/freopen64.c +++ b/newlib/libc/stdio64/freopen64.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio64/fseeko64.c b/newlib/libc/stdio64/fseeko64.c index 0672086a3..3087bef9e 100644 --- a/newlib/libc/stdio64/fseeko64.c +++ b/newlib/libc/stdio64/fseeko64.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio64/ftello64.c b/newlib/libc/stdio64/ftello64.c index 7221d5eaf..6fb76c3ef 100644 --- a/newlib/libc/stdio64/ftello64.c +++ b/newlib/libc/stdio64/ftello64.c @@ -5,7 +5,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdio64/stdio64.c b/newlib/libc/stdio64/stdio64.c index 8e5efc8b0..95cb25288 100644 --- a/newlib/libc/stdio64/stdio64.c +++ b/newlib/libc/stdio64/stdio64.c @@ -7,7 +7,7 @@ * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such + * and/or other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived diff --git a/newlib/libc/stdlib/atoll.c b/newlib/libc/stdlib/atoll.c index a8c56fe16..11edeae49 100644 --- a/newlib/libc/stdlib/atoll.c +++ b/newlib/libc/stdlib/atoll.c @@ -43,11 +43,7 @@ No supporting OS subroutines are required. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/stdlib/div.c b/newlib/libc/stdlib/div.c index 20ad7b865..4868c6d47 100644 --- a/newlib/libc/stdlib/div.c +++ b/newlib/libc/stdlib/div.c @@ -56,11 +56,7 @@ No supporting OS subroutines are required. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/stdlib/getenv.c b/newlib/libc/stdlib/getenv.c index 107376bcd..9ccb90383 100644 --- a/newlib/libc/stdlib/getenv.c +++ b/newlib/libc/stdlib/getenv.c @@ -37,9 +37,8 @@ variables vary from one system to another. * notice and comment, and (2) distributions including binaries display * the following acknowledgement: ``This product includes software * developed by the University of California, Berkeley and its contributors'' - * in the documentation or other materials provided with the distribution - * and in all advertising materials mentioning features or use of this - * software. Neither the name of the University nor the names of its + * in the documentation or other materials provided with the distribution. + * Neither the name of the University nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR diff --git a/newlib/libc/stdlib/getenv_r.c b/newlib/libc/stdlib/getenv_r.c index aac11367c..6e51800ec 100644 --- a/newlib/libc/stdlib/getenv_r.c +++ b/newlib/libc/stdlib/getenv_r.c @@ -42,9 +42,8 @@ permit '=' to be in identifiers. * notice and comment, and (2) distributions including binaries display * the following acknowledgement: ``This product includes software * developed by the University of California, Berkeley and its contributors'' - * in the documentation or other materials provided with the distribution - * and in all advertising materials mentioning features or use of this - * software. Neither the name of the University nor the names of its + * in the documentation or other materials provided with the distribution. + * Neither the name of the University nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR diff --git a/newlib/libc/stdlib/getsubopt.3 b/newlib/libc/stdlib/getsubopt.3 index 83c5f7c6b..cf33d2571 100644 --- a/newlib/libc/stdlib/getsubopt.3 +++ b/newlib/libc/stdlib/getsubopt.3 @@ -9,11 +9,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" diff --git a/newlib/libc/stdlib/getsubopt.c b/newlib/libc/stdlib/getsubopt.c index 250e73d2c..298624d35 100644 --- a/newlib/libc/stdlib/getsubopt.c +++ b/newlib/libc/stdlib/getsubopt.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/stdlib/ldiv.c b/newlib/libc/stdlib/ldiv.c index 294cc8602..39bb36e11 100644 --- a/newlib/libc/stdlib/ldiv.c +++ b/newlib/libc/stdlib/ldiv.c @@ -57,11 +57,7 @@ No supporting OS subroutines are required. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/stdlib/putenv.c b/newlib/libc/stdlib/putenv.c index 7a8d7f7d3..10b0657aa 100644 --- a/newlib/libc/stdlib/putenv.c +++ b/newlib/libc/stdlib/putenv.c @@ -7,9 +7,8 @@ * notice and comment, and (2) distributions including binaries display * the following acknowledgement: ``This product includes software * developed by the University of California, Berkeley and its contributors'' - * in the documentation or other materials provided with the distribution - * and in all advertising materials mentioning features or use of this - * software. Neither the name of the University nor the names of its + * in the documentation or other materials provided with the distribution. + * Neither the name of the University nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR diff --git a/newlib/libc/stdlib/putenv_r.c b/newlib/libc/stdlib/putenv_r.c index 8c23a823d..459348bb4 100644 --- a/newlib/libc/stdlib/putenv_r.c +++ b/newlib/libc/stdlib/putenv_r.c @@ -11,9 +11,8 @@ * notice and comment, and (2) distributions including binaries display * the following acknowledgement: ``This product includes software * developed by the University of California, Berkeley and its contributors'' - * in the documentation or other materials provided with the distribution - * and in all advertising materials mentioning features or use of this - * software. Neither the name of the University nor the names of its + * in the documentation or other materials provided with the distribution. + * Neither the name of the University nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR diff --git a/newlib/libc/stdlib/setenv.c b/newlib/libc/stdlib/setenv.c index b0c1585d4..d8f5bfe1f 100644 --- a/newlib/libc/stdlib/setenv.c +++ b/newlib/libc/stdlib/setenv.c @@ -7,9 +7,8 @@ * notice and comment, and (2) distributions including binaries display * the following acknowledgement: ``This product includes software * developed by the University of California, Berkeley and its contributors'' - * in the documentation or other materials provided with the distribution - * and in all advertising materials mentioning features or use of this - * software. Neither the name of the University nor the names of its + * in the documentation or other materials provided with the distribution. + * Neither the name of the University nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR diff --git a/newlib/libc/stdlib/setenv_r.c b/newlib/libc/stdlib/setenv_r.c index f1f885789..84d87a6ed 100644 --- a/newlib/libc/stdlib/setenv_r.c +++ b/newlib/libc/stdlib/setenv_r.c @@ -11,9 +11,8 @@ * notice and comment, and (2) distributions including binaries display * the following acknowledgement: ``This product includes software * developed by the University of California, Berkeley and its contributors'' - * in the documentation or other materials provided with the distribution - * and in all advertising materials mentioning features or use of this - * software. Neither the name of the University nor the names of its + * in the documentation or other materials provided with the distribution. + * Neither the name of the University nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR diff --git a/newlib/libc/stdlib/strtol.c b/newlib/libc/stdlib/strtol.c index 897890fe0..6383c27e8 100644 --- a/newlib/libc/stdlib/strtol.c +++ b/newlib/libc/stdlib/strtol.c @@ -97,11 +97,7 @@ No supporting OS subroutines are required. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/stdlib/strtoll.c b/newlib/libc/stdlib/strtoll.c index 295886e8f..9aa2c747b 100644 --- a/newlib/libc/stdlib/strtoll.c +++ b/newlib/libc/stdlib/strtoll.c @@ -99,11 +99,7 @@ No supporting OS subroutines are required. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/stdlib/strtoul.c b/newlib/libc/stdlib/strtoul.c index f2fba37f2..4191e43ec 100644 --- a/newlib/libc/stdlib/strtoul.c +++ b/newlib/libc/stdlib/strtoul.c @@ -97,11 +97,7 @@ PORTABILITY * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/stdlib/strtoull.c b/newlib/libc/stdlib/strtoull.c index ce4de6e7e..10018ca0d 100644 --- a/newlib/libc/stdlib/strtoull.c +++ b/newlib/libc/stdlib/strtoull.c @@ -95,11 +95,7 @@ PORTABILITY * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/stdlib/wcstol.c b/newlib/libc/stdlib/wcstol.c index 023a9c45e..8b6de3873 100644 --- a/newlib/libc/stdlib/wcstol.c +++ b/newlib/libc/stdlib/wcstol.c @@ -98,11 +98,7 @@ No supporting OS subroutines are required. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/stdlib/wcstoll.c b/newlib/libc/stdlib/wcstoll.c index 5fe0b2976..c0e5dc747 100644 --- a/newlib/libc/stdlib/wcstoll.c +++ b/newlib/libc/stdlib/wcstoll.c @@ -98,11 +98,7 @@ No supporting OS subroutines are required. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/stdlib/wcstoul.c b/newlib/libc/stdlib/wcstoul.c index 8e2796587..fe3c87867 100644 --- a/newlib/libc/stdlib/wcstoul.c +++ b/newlib/libc/stdlib/wcstoul.c @@ -98,11 +98,7 @@ PORTABILITY * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/stdlib/wcstoull.c b/newlib/libc/stdlib/wcstoull.c index 5a37473e0..5ac325790 100644 --- a/newlib/libc/stdlib/wcstoull.c +++ b/newlib/libc/stdlib/wcstoull.c @@ -104,11 +104,7 @@ PORTABILITY * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/arpa/ftp.h b/newlib/libc/sys/linux/include/arpa/ftp.h index 9a3648854..8a18f2a28 100644 --- a/newlib/libc/sys/linux/include/arpa/ftp.h +++ b/newlib/libc/sys/linux/include/arpa/ftp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/arpa/inet.h b/newlib/libc/sys/linux/include/arpa/inet.h index 82bcf356d..889884b49 100644 --- a/newlib/libc/sys/linux/include/arpa/inet.h +++ b/newlib/libc/sys/linux/include/arpa/inet.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/arpa/nameser.h b/newlib/libc/sys/linux/include/arpa/nameser.h index 6209afdf7..6aee56542 100644 --- a/newlib/libc/sys/linux/include/arpa/nameser.h +++ b/newlib/libc/sys/linux/include/arpa/nameser.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/arpa/nameser_compat.h b/newlib/libc/sys/linux/include/arpa/nameser_compat.h index bbdea8979..ed82aa85a 100644 --- a/newlib/libc/sys/linux/include/arpa/nameser_compat.h +++ b/newlib/libc/sys/linux/include/arpa/nameser_compat.h @@ -9,11 +9,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/arpa/telnet.h b/newlib/libc/sys/linux/include/arpa/telnet.h index 70e7ea822..8ac0a7693 100644 --- a/newlib/libc/sys/linux/include/arpa/telnet.h +++ b/newlib/libc/sys/linux/include/arpa/telnet.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/arpa/tftp.h b/newlib/libc/sys/linux/include/arpa/tftp.h index 1de4dd48a..91f3b63cb 100644 --- a/newlib/libc/sys/linux/include/arpa/tftp.h +++ b/newlib/libc/sys/linux/include/arpa/tftp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/fnmatch.h b/newlib/libc/sys/linux/include/fnmatch.h index c038bf77f..cc33822e9 100644 --- a/newlib/libc/sys/linux/include/fnmatch.h +++ b/newlib/libc/sys/linux/include/fnmatch.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/glob.h b/newlib/libc/sys/linux/include/glob.h index 6e038476d..f6721b589 100644 --- a/newlib/libc/sys/linux/include/glob.h +++ b/newlib/libc/sys/linux/include/glob.h @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/net/bpf.h b/newlib/libc/sys/linux/include/net/bpf.h index 1f4a8be2b..83f8a8e6a 100644 --- a/newlib/libc/sys/linux/include/net/bpf.h +++ b/newlib/libc/sys/linux/include/net/bpf.h @@ -15,11 +15,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/net/bpf_compat.h b/newlib/libc/sys/linux/include/net/bpf_compat.h index 31cd06904..11d60d957 100644 --- a/newlib/libc/sys/linux/include/net/bpf_compat.h +++ b/newlib/libc/sys/linux/include/net/bpf_compat.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/net/bpfdesc.h b/newlib/libc/sys/linux/include/net/bpfdesc.h index ec0c8fc95..fe135357e 100644 --- a/newlib/libc/sys/linux/include/net/bpfdesc.h +++ b/newlib/libc/sys/linux/include/net/bpfdesc.h @@ -15,11 +15,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/net/fddi.h b/newlib/libc/sys/linux/include/net/fddi.h index e9a3b55fa..483b4be80 100644 --- a/newlib/libc/sys/linux/include/net/fddi.h +++ b/newlib/libc/sys/linux/include/net/fddi.h @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/net/if.h b/newlib/libc/sys/linux/include/net/if.h index 5671b11f4..062f3fec7 100644 --- a/newlib/libc/sys/linux/include/net/if.h +++ b/newlib/libc/sys/linux/include/net/if.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/net/if_arc.h b/newlib/libc/sys/linux/include/net/if_arc.h index 03db7f54a..37c10ae5a 100644 --- a/newlib/libc/sys/linux/include/net/if_arc.h +++ b/newlib/libc/sys/linux/include/net/if_arc.h @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/net/if_arp.h b/newlib/libc/sys/linux/include/net/if_arp.h index bdcacbc4d..52f718c05 100644 --- a/newlib/libc/sys/linux/include/net/if_arp.h +++ b/newlib/libc/sys/linux/include/net/if_arp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/net/if_dl.h b/newlib/libc/sys/linux/include/net/if_dl.h index 2c1467196..09757cb07 100644 --- a/newlib/libc/sys/linux/include/net/if_dl.h +++ b/newlib/libc/sys/linux/include/net/if_dl.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/net/if_llc.h b/newlib/libc/sys/linux/include/net/if_llc.h index ec2b75b31..cc3961948 100644 --- a/newlib/libc/sys/linux/include/net/if_llc.h +++ b/newlib/libc/sys/linux/include/net/if_llc.h @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/net/if_slvar.h b/newlib/libc/sys/linux/include/net/if_slvar.h index 5f7008909..fcc75bc4d 100644 --- a/newlib/libc/sys/linux/include/net/if_slvar.h +++ b/newlib/libc/sys/linux/include/net/if_slvar.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/net/if_types.h b/newlib/libc/sys/linux/include/net/if_types.h index e24d18875..b1439d594 100644 --- a/newlib/libc/sys/linux/include/net/if_types.h +++ b/newlib/libc/sys/linux/include/net/if_types.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/net/if_var.h b/newlib/libc/sys/linux/include/net/if_var.h index cc53626ba..511ffc038 100644 --- a/newlib/libc/sys/linux/include/net/if_var.h +++ b/newlib/libc/sys/linux/include/net/if_var.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/net/netisr.h b/newlib/libc/sys/linux/include/net/netisr.h index 717e77bf2..7bb13926b 100644 --- a/newlib/libc/sys/linux/include/net/netisr.h +++ b/newlib/libc/sys/linux/include/net/netisr.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/net/radix.h b/newlib/libc/sys/linux/include/net/radix.h index 7f1984e96..ede486506 100644 --- a/newlib/libc/sys/linux/include/net/radix.h +++ b/newlib/libc/sys/linux/include/net/radix.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/net/raw_cb.h b/newlib/libc/sys/linux/include/net/raw_cb.h index d17712d30..2e751f18c 100644 --- a/newlib/libc/sys/linux/include/net/raw_cb.h +++ b/newlib/libc/sys/linux/include/net/raw_cb.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/net/route.h b/newlib/libc/sys/linux/include/net/route.h index c60bf3537..3993f45d2 100644 --- a/newlib/libc/sys/linux/include/net/route.h +++ b/newlib/libc/sys/linux/include/net/route.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/net/slcompress.h b/newlib/libc/sys/linux/include/net/slcompress.h index a054246bc..a98e01455 100644 --- a/newlib/libc/sys/linux/include/net/slcompress.h +++ b/newlib/libc/sys/linux/include/net/slcompress.h @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/net/slip.h b/newlib/libc/sys/linux/include/net/slip.h index 595b935a1..27984d3bf 100644 --- a/newlib/libc/sys/linux/include/net/slip.h +++ b/newlib/libc/sys/linux/include/net/slip.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netdb.h b/newlib/libc/sys/linux/include/netdb.h index 7950298c5..ba8d50ef9 100644 --- a/newlib/libc/sys/linux/include/netdb.h +++ b/newlib/libc/sys/linux/include/netdb.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/icmp6.h b/newlib/libc/sys/linux/include/netinet/icmp6.h index 915efda64..fe9feab56 100644 --- a/newlib/libc/sys/linux/include/netinet/icmp6.h +++ b/newlib/libc/sys/linux/include/netinet/icmp6.h @@ -42,11 +42,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/icmp_var.h b/newlib/libc/sys/linux/include/netinet/icmp_var.h index 79ce146db..bf3274d3a 100644 --- a/newlib/libc/sys/linux/include/netinet/icmp_var.h +++ b/newlib/libc/sys/linux/include/netinet/icmp_var.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/if_ether.h b/newlib/libc/sys/linux/include/netinet/if_ether.h index 4bba84912..069da5279 100644 --- a/newlib/libc/sys/linux/include/netinet/if_ether.h +++ b/newlib/libc/sys/linux/include/netinet/if_ether.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/igmp.h b/newlib/libc/sys/linux/include/netinet/igmp.h index 448265abf..1a31bd0e7 100644 --- a/newlib/libc/sys/linux/include/netinet/igmp.h +++ b/newlib/libc/sys/linux/include/netinet/igmp.h @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/igmp_var.h b/newlib/libc/sys/linux/include/netinet/igmp_var.h index 1cb6570f8..0b4d21a1d 100644 --- a/newlib/libc/sys/linux/include/netinet/igmp_var.h +++ b/newlib/libc/sys/linux/include/netinet/igmp_var.h @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/in.h b/newlib/libc/sys/linux/include/netinet/in.h index 19bc3f1bc..3b63bb8a2 100644 --- a/newlib/libc/sys/linux/include/netinet/in.h +++ b/newlib/libc/sys/linux/include/netinet/in.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/in_pcb.h b/newlib/libc/sys/linux/include/netinet/in_pcb.h index 50ddd273c..b121bf045 100644 --- a/newlib/libc/sys/linux/include/netinet/in_pcb.h +++ b/newlib/libc/sys/linux/include/netinet/in_pcb.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/in_systm.h b/newlib/libc/sys/linux/include/netinet/in_systm.h index 62cea64f1..c08002c77 100644 --- a/newlib/libc/sys/linux/include/netinet/in_systm.h +++ b/newlib/libc/sys/linux/include/netinet/in_systm.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/in_var.h b/newlib/libc/sys/linux/include/netinet/in_var.h index ce97b5a11..2ab2f1cb5 100644 --- a/newlib/libc/sys/linux/include/netinet/in_var.h +++ b/newlib/libc/sys/linux/include/netinet/in_var.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/ip.h b/newlib/libc/sys/linux/include/netinet/ip.h index 2b2bcb831..21ecb4641 100644 --- a/newlib/libc/sys/linux/include/netinet/ip.h +++ b/newlib/libc/sys/linux/include/netinet/ip.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/ip6.h b/newlib/libc/sys/linux/include/netinet/ip6.h index 6c5cbe1d1..26a257b19 100644 --- a/newlib/libc/sys/linux/include/netinet/ip6.h +++ b/newlib/libc/sys/linux/include/netinet/ip6.h @@ -42,11 +42,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/ip_icmp.h b/newlib/libc/sys/linux/include/netinet/ip_icmp.h index 2574d07dc..e4e9a9232 100644 --- a/newlib/libc/sys/linux/include/netinet/ip_icmp.h +++ b/newlib/libc/sys/linux/include/netinet/ip_icmp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/ip_mroute.h b/newlib/libc/sys/linux/include/netinet/ip_mroute.h index 555ff4783..768a8eca3 100644 --- a/newlib/libc/sys/linux/include/netinet/ip_mroute.h +++ b/newlib/libc/sys/linux/include/netinet/ip_mroute.h @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/ip_var.h b/newlib/libc/sys/linux/include/netinet/ip_var.h index 8ee8602a8..01a8f708d 100644 --- a/newlib/libc/sys/linux/include/netinet/ip_var.h +++ b/newlib/libc/sys/linux/include/netinet/ip_var.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/ipprotosw.h b/newlib/libc/sys/linux/include/netinet/ipprotosw.h index 0367ca2ed..22dcabd23 100644 --- a/newlib/libc/sys/linux/include/netinet/ipprotosw.h +++ b/newlib/libc/sys/linux/include/netinet/ipprotosw.h @@ -39,11 +39,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/tcp.h b/newlib/libc/sys/linux/include/netinet/tcp.h index a6154e0ee..a0f9b6912 100644 --- a/newlib/libc/sys/linux/include/netinet/tcp.h +++ b/newlib/libc/sys/linux/include/netinet/tcp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/tcp_debug.h b/newlib/libc/sys/linux/include/netinet/tcp_debug.h index 3b27d09ac..c53132e89 100644 --- a/newlib/libc/sys/linux/include/netinet/tcp_debug.h +++ b/newlib/libc/sys/linux/include/netinet/tcp_debug.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/tcp_fsm.h b/newlib/libc/sys/linux/include/netinet/tcp_fsm.h index a45cbc76e..4b75cf60f 100644 --- a/newlib/libc/sys/linux/include/netinet/tcp_fsm.h +++ b/newlib/libc/sys/linux/include/netinet/tcp_fsm.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/tcp_seq.h b/newlib/libc/sys/linux/include/netinet/tcp_seq.h index bb15401ec..92dfb77ea 100644 --- a/newlib/libc/sys/linux/include/netinet/tcp_seq.h +++ b/newlib/libc/sys/linux/include/netinet/tcp_seq.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/tcp_timer.h b/newlib/libc/sys/linux/include/netinet/tcp_timer.h index 1af128148..8984446e0 100644 --- a/newlib/libc/sys/linux/include/netinet/tcp_timer.h +++ b/newlib/libc/sys/linux/include/netinet/tcp_timer.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/tcp_var.h b/newlib/libc/sys/linux/include/netinet/tcp_var.h index adb5208e9..d771238ac 100644 --- a/newlib/libc/sys/linux/include/netinet/tcp_var.h +++ b/newlib/libc/sys/linux/include/netinet/tcp_var.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/tcpip.h b/newlib/libc/sys/linux/include/netinet/tcpip.h index 53ecb8de0..2d8aec0e7 100644 --- a/newlib/libc/sys/linux/include/netinet/tcpip.h +++ b/newlib/libc/sys/linux/include/netinet/tcpip.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/udp.h b/newlib/libc/sys/linux/include/netinet/udp.h index 747e76436..ef99339c3 100644 --- a/newlib/libc/sys/linux/include/netinet/udp.h +++ b/newlib/libc/sys/linux/include/netinet/udp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet/udp_var.h b/newlib/libc/sys/linux/include/netinet/udp_var.h index fc00e6e63..006dddd72 100644 --- a/newlib/libc/sys/linux/include/netinet/udp_var.h +++ b/newlib/libc/sys/linux/include/netinet/udp_var.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet6/in6.h b/newlib/libc/sys/linux/include/netinet6/in6.h index e4d1c1cf2..ec6425989 100644 --- a/newlib/libc/sys/linux/include/netinet6/in6.h +++ b/newlib/libc/sys/linux/include/netinet6/in6.h @@ -42,11 +42,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet6/in6_pcb.h b/newlib/libc/sys/linux/include/netinet6/in6_pcb.h index c47c6c739..16b1febf4 100644 --- a/newlib/libc/sys/linux/include/netinet6/in6_pcb.h +++ b/newlib/libc/sys/linux/include/netinet6/in6_pcb.h @@ -43,11 +43,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet6/in6_var.h b/newlib/libc/sys/linux/include/netinet6/in6_var.h index 7ddfbdb7c..89420c9cb 100644 --- a/newlib/libc/sys/linux/include/netinet6/in6_var.h +++ b/newlib/libc/sys/linux/include/netinet6/in6_var.h @@ -42,11 +42,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet6/ip6_var.h b/newlib/libc/sys/linux/include/netinet6/ip6_var.h index d93ade77d..6a4a8ad1a 100644 --- a/newlib/libc/sys/linux/include/netinet6/ip6_var.h +++ b/newlib/libc/sys/linux/include/netinet6/ip6_var.h @@ -42,11 +42,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet6/ip6protosw.h b/newlib/libc/sys/linux/include/netinet6/ip6protosw.h index 98d3a1dd9..2bf9f4191 100644 --- a/newlib/libc/sys/linux/include/netinet6/ip6protosw.h +++ b/newlib/libc/sys/linux/include/netinet6/ip6protosw.h @@ -45,11 +45,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet6/tcp6_var.h b/newlib/libc/sys/linux/include/netinet6/tcp6_var.h index 62541ef00..877b7d69b 100644 --- a/newlib/libc/sys/linux/include/netinet6/tcp6_var.h +++ b/newlib/libc/sys/linux/include/netinet6/tcp6_var.h @@ -41,11 +41,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netinet6/udp6_var.h b/newlib/libc/sys/linux/include/netinet6/udp6_var.h index 222d6443a..53e1c7d7e 100644 --- a/newlib/libc/sys/linux/include/netinet6/udp6_var.h +++ b/newlib/libc/sys/linux/include/netinet6/udp6_var.h @@ -41,11 +41,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netns/idp.h b/newlib/libc/sys/linux/include/netns/idp.h index 05cd4252b..4a5d22a75 100644 --- a/newlib/libc/sys/linux/include/netns/idp.h +++ b/newlib/libc/sys/linux/include/netns/idp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netns/idp_var.h b/newlib/libc/sys/linux/include/netns/idp_var.h index aaeb1e028..152c1e001 100644 --- a/newlib/libc/sys/linux/include/netns/idp_var.h +++ b/newlib/libc/sys/linux/include/netns/idp_var.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netns/ns.h b/newlib/libc/sys/linux/include/netns/ns.h index 94c801713..f806194cc 100644 --- a/newlib/libc/sys/linux/include/netns/ns.h +++ b/newlib/libc/sys/linux/include/netns/ns.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netns/ns_error.h b/newlib/libc/sys/linux/include/netns/ns_error.h index ae4474722..4a54153b3 100644 --- a/newlib/libc/sys/linux/include/netns/ns_error.h +++ b/newlib/libc/sys/linux/include/netns/ns_error.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netns/ns_if.h b/newlib/libc/sys/linux/include/netns/ns_if.h index 4487b44f6..299a381c1 100644 --- a/newlib/libc/sys/linux/include/netns/ns_if.h +++ b/newlib/libc/sys/linux/include/netns/ns_if.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netns/ns_pcb.h b/newlib/libc/sys/linux/include/netns/ns_pcb.h index 359d839c0..674c2b6a1 100644 --- a/newlib/libc/sys/linux/include/netns/ns_pcb.h +++ b/newlib/libc/sys/linux/include/netns/ns_pcb.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netns/sp.h b/newlib/libc/sys/linux/include/netns/sp.h index 90f26c93d..8db22e16b 100644 --- a/newlib/libc/sys/linux/include/netns/sp.h +++ b/newlib/libc/sys/linux/include/netns/sp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netns/spidp.h b/newlib/libc/sys/linux/include/netns/spidp.h index 310a2b204..ce33ec141 100644 --- a/newlib/libc/sys/linux/include/netns/spidp.h +++ b/newlib/libc/sys/linux/include/netns/spidp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netns/spp_debug.h b/newlib/libc/sys/linux/include/netns/spp_debug.h index f85cc3901..ea8e19e86 100644 --- a/newlib/libc/sys/linux/include/netns/spp_debug.h +++ b/newlib/libc/sys/linux/include/netns/spp_debug.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netns/spp_timer.h b/newlib/libc/sys/linux/include/netns/spp_timer.h index e28ecad7f..51ac17f7c 100644 --- a/newlib/libc/sys/linux/include/netns/spp_timer.h +++ b/newlib/libc/sys/linux/include/netns/spp_timer.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/netns/spp_var.h b/newlib/libc/sys/linux/include/netns/spp_var.h index ed1ec050d..8f67918e2 100644 --- a/newlib/libc/sys/linux/include/netns/spp_var.h +++ b/newlib/libc/sys/linux/include/netns/spp_var.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/regex.h b/newlib/libc/sys/linux/include/regex.h index d71c0ceee..a96febeb9 100644 --- a/newlib/libc/sys/linux/include/regex.h +++ b/newlib/libc/sys/linux/include/regex.h @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/resolv.h b/newlib/libc/sys/linux/include/resolv.h index ef0cfefdb..8cd6d5d97 100644 --- a/newlib/libc/sys/linux/include/resolv.h +++ b/newlib/libc/sys/linux/include/resolv.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/rune.h b/newlib/libc/sys/linux/include/rune.h index d8aa03dda..a5cbc4efe 100644 --- a/newlib/libc/sys/linux/include/rune.h +++ b/newlib/libc/sys/linux/include/rune.h @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/include/runetype.h b/newlib/libc/sys/linux/include/runetype.h index a0a3a4316..6e7647965 100644 --- a/newlib/libc/sys/linux/include/runetype.h +++ b/newlib/libc/sys/linux/include/runetype.h @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/machine/i386/include/endian.h b/newlib/libc/sys/linux/machine/i386/include/endian.h index f5a8aafc7..661a2b12e 100644 --- a/newlib/libc/sys/linux/machine/i386/include/endian.h +++ b/newlib/libc/sys/linux/machine/i386/include/endian.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/machine/i386/include/param.h b/newlib/libc/sys/linux/machine/i386/include/param.h index 977a65711..528abb55c 100644 --- a/newlib/libc/sys/linux/machine/i386/include/param.h +++ b/newlib/libc/sys/linux/machine/i386/include/param.h @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/net/inet_addr.c b/newlib/libc/sys/linux/net/inet_addr.c index 874ca80e6..67b74a6b8 100644 --- a/newlib/libc/sys/linux/net/inet_addr.c +++ b/newlib/libc/sys/linux/net/inet_addr.c @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/net/recv.c b/newlib/libc/sys/linux/net/recv.c index 43e537bbb..fcfa5628f 100644 --- a/newlib/libc/sys/linux/net/recv.c +++ b/newlib/libc/sys/linux/net/recv.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/net/send.c b/newlib/libc/sys/linux/net/send.c index 658c92b71..982d0a102 100644 --- a/newlib/libc/sys/linux/net/send.c +++ b/newlib/libc/sys/linux/net/send.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/readdir64.c b/newlib/libc/sys/linux/readdir64.c index 78fe98e90..d89a7ae2d 100644 --- a/newlib/libc/sys/linux/readdir64.c +++ b/newlib/libc/sys/linux/readdir64.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/scandir64.c b/newlib/libc/sys/linux/scandir64.c index b21b42342..a5f69960d 100644 --- a/newlib/libc/sys/linux/scandir64.c +++ b/newlib/libc/sys/linux/scandir64.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/sys/ioccom.h b/newlib/libc/sys/linux/sys/ioccom.h index e656d5ef6..dd82a3a22 100644 --- a/newlib/libc/sys/linux/sys/ioccom.h +++ b/newlib/libc/sys/linux/sys/ioccom.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/sys/param.h b/newlib/libc/sys/linux/sys/param.h index de0b4f61c..a7b80cf0b 100644 --- a/newlib/libc/sys/linux/sys/param.h +++ b/newlib/libc/sys/linux/sys/param.h @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/sys/socket.h b/newlib/libc/sys/linux/sys/socket.h index 33097a5e8..fbce11fd8 100644 --- a/newlib/libc/sys/linux/sys/socket.h +++ b/newlib/libc/sys/linux/sys/socket.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/sys/sockio.h b/newlib/libc/sys/linux/sys/sockio.h index bdebfbebc..afea106b7 100644 --- a/newlib/libc/sys/linux/sys/sockio.h +++ b/newlib/libc/sys/linux/sys/sockio.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/sys/time.h b/newlib/libc/sys/linux/sys/time.h index ca462fa8d..0e68c1528 100644 --- a/newlib/libc/sys/linux/sys/time.h +++ b/newlib/libc/sys/linux/sys/time.h @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/linux/sys/types.h b/newlib/libc/sys/linux/sys/types.h index 20dab2f53..ef10ca433 100644 --- a/newlib/libc/sys/linux/sys/types.h +++ b/newlib/libc/sys/linux/sys/types.h @@ -19,11 +19,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/phoenix/include/arpa/telnet.h b/newlib/libc/sys/phoenix/include/arpa/telnet.h index 44ffe084d..a63968653 100644 --- a/newlib/libc/sys/phoenix/include/arpa/telnet.h +++ b/newlib/libc/sys/phoenix/include/arpa/telnet.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/phoenix/include/net/if.h b/newlib/libc/sys/phoenix/include/net/if.h index 516af21c4..42987b546 100644 --- a/newlib/libc/sys/phoenix/include/net/if.h +++ b/newlib/libc/sys/phoenix/include/net/if.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/phoenix/include/net/if_arp.h b/newlib/libc/sys/phoenix/include/net/if_arp.h index bdcacbc4d..52f718c05 100644 --- a/newlib/libc/sys/phoenix/include/net/if_arp.h +++ b/newlib/libc/sys/phoenix/include/net/if_arp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/phoenix/include/netdb.h b/newlib/libc/sys/phoenix/include/netdb.h index 39528841b..3d8b8c2b6 100644 --- a/newlib/libc/sys/phoenix/include/netdb.h +++ b/newlib/libc/sys/phoenix/include/netdb.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/phoenix/include/netinet/in.h b/newlib/libc/sys/phoenix/include/netinet/in.h index 9db5f611a..9f73f67fa 100644 --- a/newlib/libc/sys/phoenix/include/netinet/in.h +++ b/newlib/libc/sys/phoenix/include/netinet/in.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/phoenix/include/netinet/in_systm.h b/newlib/libc/sys/phoenix/include/netinet/in_systm.h index 35f2bdadf..c262a8913 100644 --- a/newlib/libc/sys/phoenix/include/netinet/in_systm.h +++ b/newlib/libc/sys/phoenix/include/netinet/in_systm.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/phoenix/include/netinet/ip.h b/newlib/libc/sys/phoenix/include/netinet/ip.h index 7ca1f2908..189172ec6 100644 --- a/newlib/libc/sys/phoenix/include/netinet/ip.h +++ b/newlib/libc/sys/phoenix/include/netinet/ip.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/phoenix/include/netinet6/in6.h b/newlib/libc/sys/phoenix/include/netinet6/in6.h index 956723b97..865f2341a 100644 --- a/newlib/libc/sys/phoenix/include/netinet6/in6.h +++ b/newlib/libc/sys/phoenix/include/netinet6/in6.h @@ -42,11 +42,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/phoenix/net/inet_addr.c b/newlib/libc/sys/phoenix/net/inet_addr.c index a95b6e21b..23b2cc2d4 100644 --- a/newlib/libc/sys/phoenix/net/inet_addr.c +++ b/newlib/libc/sys/phoenix/net/inet_addr.c @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/phoenix/net/inet_aton.c b/newlib/libc/sys/phoenix/net/inet_aton.c index 9013bcac5..aa6c1ded0 100644 --- a/newlib/libc/sys/phoenix/net/inet_aton.c +++ b/newlib/libc/sys/phoenix/net/inet_aton.c @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/rtems/include/sys/syslimits.h b/newlib/libc/sys/rtems/include/sys/syslimits.h index 2295afe34..99442121d 100644 --- a/newlib/libc/sys/rtems/include/sys/syslimits.h +++ b/newlib/libc/sys/rtems/include/sys/syslimits.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/sparc64/closedir.c b/newlib/libc/sys/sparc64/closedir.c index d87d81654..a5ad5edde 100644 --- a/newlib/libc/sys/sparc64/closedir.c +++ b/newlib/libc/sys/sparc64/closedir.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/sparc64/opendir.c b/newlib/libc/sys/sparc64/opendir.c index ce080e312..db2fffd4c 100644 --- a/newlib/libc/sys/sparc64/opendir.c +++ b/newlib/libc/sys/sparc64/opendir.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/sparc64/readdir.c b/newlib/libc/sys/sparc64/readdir.c index b3839870c..bce9d74ad 100644 --- a/newlib/libc/sys/sparc64/readdir.c +++ b/newlib/libc/sys/sparc64/readdir.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/sparc64/rewinddir.c b/newlib/libc/sys/sparc64/rewinddir.c index d52c013c4..16656ddee 100644 --- a/newlib/libc/sys/sparc64/rewinddir.c +++ b/newlib/libc/sys/sparc64/rewinddir.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/sparc64/scandir.c b/newlib/libc/sys/sparc64/scandir.c index bcfd525c4..f5fb55d5c 100644 --- a/newlib/libc/sys/sparc64/scandir.c +++ b/newlib/libc/sys/sparc64/scandir.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/sparc64/seekdir.c b/newlib/libc/sys/sparc64/seekdir.c index 50331402a..a3a62e182 100644 --- a/newlib/libc/sys/sparc64/seekdir.c +++ b/newlib/libc/sys/sparc64/seekdir.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/sparc64/telldir.c b/newlib/libc/sys/sparc64/telldir.c index 37d9de638..e8749503f 100644 --- a/newlib/libc/sys/sparc64/telldir.c +++ b/newlib/libc/sys/sparc64/telldir.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/sysvi386/closedir.c b/newlib/libc/sys/sysvi386/closedir.c index d87d81654..a5ad5edde 100644 --- a/newlib/libc/sys/sysvi386/closedir.c +++ b/newlib/libc/sys/sysvi386/closedir.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/sysvi386/crt0.c b/newlib/libc/sys/sysvi386/crt0.c index b41c00a3c..ed8ea38e3 100644 --- a/newlib/libc/sys/sysvi386/crt0.c +++ b/newlib/libc/sys/sysvi386/crt0.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/sysvi386/opendir.c b/newlib/libc/sys/sysvi386/opendir.c index ce080e312..db2fffd4c 100644 --- a/newlib/libc/sys/sysvi386/opendir.c +++ b/newlib/libc/sys/sysvi386/opendir.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/sysvi386/readdir.c b/newlib/libc/sys/sysvi386/readdir.c index 350fa664f..1a46f4881 100644 --- a/newlib/libc/sys/sysvi386/readdir.c +++ b/newlib/libc/sys/sysvi386/readdir.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/sysvi386/rewinddir.c b/newlib/libc/sys/sysvi386/rewinddir.c index d52c013c4..16656ddee 100644 --- a/newlib/libc/sys/sysvi386/rewinddir.c +++ b/newlib/libc/sys/sysvi386/rewinddir.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/sysvi386/scandir.c b/newlib/libc/sys/sysvi386/scandir.c index 6c4116c9c..b6ba1a906 100644 --- a/newlib/libc/sys/sysvi386/scandir.c +++ b/newlib/libc/sys/sysvi386/scandir.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/sysvi386/seekdir.c b/newlib/libc/sys/sysvi386/seekdir.c index 50331402a..a3a62e182 100644 --- a/newlib/libc/sys/sysvi386/seekdir.c +++ b/newlib/libc/sys/sysvi386/seekdir.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/newlib/libc/sys/sysvi386/telldir.c b/newlib/libc/sys/sysvi386/telldir.c index 37d9de638..e8749503f 100644 --- a/newlib/libc/sys/sysvi386/telldir.c +++ b/newlib/libc/sys/sysvi386/telldir.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/winsup/cygwin/include/arpa/ftp.h b/winsup/cygwin/include/arpa/ftp.h index 7d39a3e7a..41c7aaaac 100644 --- a/winsup/cygwin/include/arpa/ftp.h +++ b/winsup/cygwin/include/arpa/ftp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/winsup/cygwin/include/arpa/nameser.h b/winsup/cygwin/include/arpa/nameser.h index ddb32302b..d2ade358b 100644 --- a/winsup/cygwin/include/arpa/nameser.h +++ b/winsup/cygwin/include/arpa/nameser.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/winsup/cygwin/include/arpa/nameser_compat.h b/winsup/cygwin/include/arpa/nameser_compat.h index 9579913be..29d1006d9 100644 --- a/winsup/cygwin/include/arpa/nameser_compat.h +++ b/winsup/cygwin/include/arpa/nameser_compat.h @@ -9,11 +9,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/winsup/cygwin/include/arpa/telnet.h b/winsup/cygwin/include/arpa/telnet.h index 50874765c..28d064ad7 100644 --- a/winsup/cygwin/include/arpa/telnet.h +++ b/winsup/cygwin/include/arpa/telnet.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/winsup/cygwin/include/fnmatch.h b/winsup/cygwin/include/fnmatch.h index 556d3b1da..873ccedea 100644 --- a/winsup/cygwin/include/fnmatch.h +++ b/winsup/cygwin/include/fnmatch.h @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/winsup/cygwin/include/fts.h b/winsup/cygwin/include/fts.h index 57e9096b4..54e53d81e 100644 --- a/winsup/cygwin/include/fts.h +++ b/winsup/cygwin/include/fts.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/winsup/cygwin/include/getopt.h b/winsup/cygwin/include/getopt.h index 0c1c8c92a..19c347b91 100644 --- a/winsup/cygwin/include/getopt.h +++ b/winsup/cygwin/include/getopt.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/winsup/cygwin/include/glob.h b/winsup/cygwin/include/glob.h index 0376cc3fe..50cd57c0b 100644 --- a/winsup/cygwin/include/glob.h +++ b/winsup/cygwin/include/glob.h @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/winsup/cygwin/include/netdb.h b/winsup/cygwin/include/netdb.h index 30fb06334..150fa4e42 100644 --- a/winsup/cygwin/include/netdb.h +++ b/winsup/cygwin/include/netdb.h @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/winsup/cygwin/include/netinet/ip.h b/winsup/cygwin/include/netinet/ip.h index 1f6ebbe4a..5db1bd9ce 100644 --- a/winsup/cygwin/include/netinet/ip.h +++ b/winsup/cygwin/include/netinet/ip.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/winsup/cygwin/include/netinet/tcp.h b/winsup/cygwin/include/netinet/tcp.h index becbec54f..c9d534dda 100644 --- a/winsup/cygwin/include/netinet/tcp.h +++ b/winsup/cygwin/include/netinet/tcp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/winsup/cygwin/include/netinet/udp.h b/winsup/cygwin/include/netinet/udp.h index 21fbc01cd..6d8646e80 100644 --- a/winsup/cygwin/include/netinet/udp.h +++ b/winsup/cygwin/include/netinet/udp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/winsup/cygwin/include/resolv.h b/winsup/cygwin/include/resolv.h index 6cafcaaca..9809e862d 100644 --- a/winsup/cygwin/include/resolv.h +++ b/winsup/cygwin/include/resolv.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/winsup/cygwin/include/sysexits.h b/winsup/cygwin/include/sysexits.h index eba0b92dd..4455db620 100644 --- a/winsup/cygwin/include/sysexits.h +++ b/winsup/cygwin/include/sysexits.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/winsup/cygwin/strsep.cc b/winsup/cygwin/strsep.cc index f03df3d94..72edf59fe 100644 --- a/winsup/cygwin/strsep.cc +++ b/winsup/cygwin/strsep.cc @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/winsup/testsuite/winsup.api/msgtest.c b/winsup/testsuite/winsup.api/msgtest.c index e002a7fda..234aa40ea 100644 --- a/winsup/testsuite/winsup.api/msgtest.c +++ b/winsup/testsuite/winsup.api/msgtest.c @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its + * 3. Neither the name of The NetBSD Foundation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * diff --git a/winsup/testsuite/winsup.api/semtest.c b/winsup/testsuite/winsup.api/semtest.c index dfb8c08eb..b4a3fc252 100644 --- a/winsup/testsuite/winsup.api/semtest.c +++ b/winsup/testsuite/winsup.api/semtest.c @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its + * 3. Neither the name of The NetBSD Foundation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * diff --git a/winsup/testsuite/winsup.api/shmtest.c b/winsup/testsuite/winsup.api/shmtest.c index 54a2493a8..e0b7acf7d 100644 --- a/winsup/testsuite/winsup.api/shmtest.c +++ b/winsup/testsuite/winsup.api/shmtest.c @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its + * 3. Neither the name of The NetBSD Foundation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * From 3a2191653ac979f494aa2797942bd96414cedde8 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Thu, 23 Jan 2020 14:39:15 -0500 Subject: [PATCH 183/520] Cygwin: AF_LOCAL: allow opening with the O_PATH flag If that flag is not set, or if an attempt is made to open a different type of socket, the errno is now EOPNOTSUPP instead of ENXIO. This is consistent with POSIX, starting with the 2016 edition. Earlier editions were silent on this issue. Opening is done in a (new) fhandler_socket_local::open method by calling fhandler_base::open_fs. Also add a corresponding fhandler_socket_local::close method. --- winsup/cygwin/fhandler.h | 2 ++ winsup/cygwin/fhandler_socket_local.cc | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 80a78d14c..c54780ef6 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -834,6 +834,8 @@ class fhandler_socket_local: public fhandler_socket_wsock int getsockopt (int level, int optname, const void *optval, __socklen_t *optlen); + int open (int flags, mode_t mode = 0); + int close (); int __reg2 fstat (struct stat *buf); int __reg2 fstatvfs (struct statvfs *buf); int __reg1 fchmod (mode_t newmode); diff --git a/winsup/cygwin/fhandler_socket_local.cc b/winsup/cygwin/fhandler_socket_local.cc index f88ced22d..e7f4fe603 100644 --- a/winsup/cygwin/fhandler_socket_local.cc +++ b/winsup/cygwin/fhandler_socket_local.cc @@ -634,6 +634,26 @@ fhandler_socket_local::dup (fhandler_base *child, int flags) return fhandler_socket_wsock::dup (child, flags); } +int +fhandler_socket_local::open (int flags, mode_t mode) +{ + /* We don't support opening sockets unless O_PATH is specified. */ + if (flags & O_PATH) + return open_fs (flags, mode); + + set_errno (EOPNOTSUPP); + return 0; +} + +int +fhandler_socket_local::close () +{ + if (get_flags () & O_PATH) + return fhandler_base::close (); + else + return fhandler_socket_wsock::close (); +} + int __reg2 fhandler_socket_local::fstat (struct stat *buf) { From 141437d37440572b5452e941df3d4454f0c4378b Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Thu, 23 Jan 2020 15:11:15 -0500 Subject: [PATCH 184/520] Cygwin: AF_LOCAL: set appropriate errno on system calls If an AF_LOCAL socket is opened with O_PATH, all socket system calls that take a file descriptor argument fail on the resulting descriptor. Make sure that errno is set as on Linux for those calls that are implemented on Linux. In almost all cases it is ENOTSOCK. There are two exceptions: - sockatatmark(3); errno is EBADF. - bindresvport(3); errno is EAFNOSUPPORT if the second argument sin (of type struct sockaddr_in *) is non-NULL and satisfies sin->sin_family == AF_INET. Finally, there are two BSD socket system calls implemented on Cygwin but not Linux: getpeereid(3) and bindresvport_sa(3). Set errno to ENOTSOCK for these for consistency with the majority of the other calls. --- winsup/cygwin/net.cc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 437712c63..d9f51bf68 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -65,8 +65,11 @@ get (const int fd) fhandler_socket *const fh = cfd->is_socket (); - if (!fh) - set_errno (ENOTSOCK); + if (!fh || (fh->get_flags () & O_PATH)) + { + set_errno (ENOTSOCK); + return NULL; + } return fh; } @@ -641,9 +644,17 @@ extern "C" int sockatmark (int fd) { int ret; + cygheap_fdget cfd (fd); - fhandler_socket *fh = get (fd); - if (fh && fh->ioctl (SIOCATMARK, &ret) != -1) + if (cfd < 0) + return -1; + + fhandler_socket *const fh = cfd->is_socket (); + if (!fh) + set_errno (ENOTSOCK); + else if (fh->get_flags () & O_PATH) + set_errno (EBADF); + else if (fh->ioctl (SIOCATMARK, &ret) != -1) return ret; return -1; } From 23cb58af623c457639fdcf97c1990edda0508d5c Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sat, 25 Jan 2020 07:45:10 -0500 Subject: [PATCH 185/520] Cygwin: AF_LOCAL::fstatvfs: use our handle if O_PATH is set If O_PATH is set, then the fhandler_socket_local object has a handle that can be used for getting the statvfs information. Use it by calling fhandler_base::fstatvfs_by_handle. Without this change, fhandler_disk_file::fstatfvs would be called on a new fhandler_disk object, which would then have to be opened. --- winsup/cygwin/fhandler_socket_local.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/winsup/cygwin/fhandler_socket_local.cc b/winsup/cygwin/fhandler_socket_local.cc index e7f4fe603..76815a611 100644 --- a/winsup/cygwin/fhandler_socket_local.cc +++ b/winsup/cygwin/fhandler_socket_local.cc @@ -675,6 +675,13 @@ fhandler_socket_local::fstatvfs (struct statvfs *sfs) { if (get_sun_path () && get_sun_path ()[0] == '\0') return fhandler_socket_wsock::fstatvfs (sfs); + if (get_flags () & O_PATH) + /* We already have a handle. */ + { + HANDLE h = get_handle (); + if (h) + return fstatvfs_by_handle (h, sfs); + } fhandler_disk_file fh (pc); fh.get_device () = FH_FS; return fh.fstatvfs (sfs); From 477121317d01b37d0f6c84f7724487ecf8a9fbbe Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sat, 25 Jan 2020 13:08:00 -0500 Subject: [PATCH 186/520] Cygwin: AF_LOCAL: fix fcntl and dup if O_PATH is set Make fhandler_socket_local::dup and fhandler_socket_local::fcntl (a new method) call fhandler_base::dup and fhandler_base::fcntl if O_PATH is set. We're viewing the socket as a disk file here, but there's no need to implement the actions of fhandler_disk_file::dup and fhandler_disk_file::fcntl, which do nothing useful in this case beyond what the fhandler_base methods do. (The extra actions are only useful when I/O is going to be done on the file.) --- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_socket_local.cc | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index c54780ef6..1b477f633 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -836,6 +836,7 @@ class fhandler_socket_local: public fhandler_socket_wsock int open (int flags, mode_t mode = 0); int close (); + int fcntl (int cmd, intptr_t); int __reg2 fstat (struct stat *buf); int __reg2 fstatvfs (struct statvfs *buf); int __reg1 fchmod (mode_t newmode); diff --git a/winsup/cygwin/fhandler_socket_local.cc b/winsup/cygwin/fhandler_socket_local.cc index 76815a611..8bfba225a 100644 --- a/winsup/cygwin/fhandler_socket_local.cc +++ b/winsup/cygwin/fhandler_socket_local.cc @@ -628,6 +628,11 @@ fhandler_socket_local::af_local_set_secret (char *buf) int fhandler_socket_local::dup (fhandler_base *child, int flags) { + if (get_flags () & O_PATH) + /* We're viewing the socket as a disk file, but fhandler_base::dup + suffices here. */ + return fhandler_base::dup (child, flags); + fhandler_socket_local *fhs = (fhandler_socket_local *) child; fhs->set_sun_path (get_sun_path ()); fhs->set_peer_sun_path (get_peer_sun_path ()); @@ -654,6 +659,17 @@ fhandler_socket_local::close () return fhandler_socket_wsock::close (); } +int +fhandler_socket_local::fcntl (int cmd, intptr_t arg) +{ + if (get_flags () & O_PATH) + /* We're viewing the socket as a disk file, but + fhandler_base::fcntl suffices here. */ + return fhandler_base::fcntl (cmd, arg); + else + return fhandler_socket_wsock::fcntl (cmd, arg); +} + int __reg2 fhandler_socket_local::fstat (struct stat *buf) { From 1cc07f3a3ea162d5f39ffeea54a74147754d3649 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Wed, 29 Jan 2020 12:09:49 -0500 Subject: [PATCH 187/520] Cygwin: document recent changes --- winsup/cygwin/release/3.1.3 | 2 ++ winsup/doc/new-features.xml | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/winsup/cygwin/release/3.1.3 b/winsup/cygwin/release/3.1.3 index f8752ad56..06ed1eb57 100644 --- a/winsup/cygwin/release/3.1.3 +++ b/winsup/cygwin/release/3.1.3 @@ -11,6 +11,8 @@ What changed: - Support the Linux-specific AT_EMPTY_PATH flag for fchownat(2) and fstatat(2). +- Allow AF_LOCAL sockets to be opened with O_PATH. + Bug Fixes: ---------- diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml index 967c64ac5..78c7760cf 100644 --- a/winsup/doc/new-features.xml +++ b/winsup/doc/new-features.xml @@ -69,6 +69,12 @@ Support the Linux-specific AT_EMPTY_PATH flag for fchownat(2) and fstatat(2). + +Allow AF_LOCAL sockets to be opened with O_PATH. If that flag is not +set, or if an attempt is made to open a different type of socket, the +errno is now EOPNOTSUPP instead of ENXIO. + + From 8ef32f2dcfe48b540e64a4ec3ce0dcba5d3b70ce Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Wed, 29 Jan 2020 14:46:17 -0800 Subject: [PATCH 188/520] RISC-V: Use newlib nano specific libm. The libm gamma functions use the _gamma_signgam field of the reentrant structure, which changes offset with the --enable-newlib-reent-small configure option, which means we need to use a newlib nano specific version of libm in addition to libc in the nano.specs file. Reported by Keith Packard. There is a riscv-gnu-toolchain patch that goes along with this to create the new libm_nano.a file. Signed-off-by: Jim Wilson --- libgloss/riscv/nano.specs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgloss/riscv/nano.specs b/libgloss/riscv/nano.specs index 89fd23176..e12e31384 100644 --- a/libgloss/riscv/nano.specs +++ b/libgloss/riscv/nano.specs @@ -15,7 +15,7 @@ %(nano_link_gcc_c_sequence) --start-group %G %(nano_libc) %(nano_libgloss) --end-group *link: -%(nano_link) %:replace-outfile(-lc -lc_nano) %:replace-outfile(-lg -lg_nano) +%(nano_link) %:replace-outfile(-lc -lc_nano) %:replace-outfile(-lg -lg_nano) %:replace-outfile(-lm -lm_nano) *lib: %{!shared:%{g*:-lg_nano} %{!p:%{!pg:-lc_nano}}%{p:-lc_p}%{pg:-lc_p}} From 76dca77f049271e2529c25de8a396e65dbce615d Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Thu, 30 Jan 2020 10:08:21 -0500 Subject: [PATCH 189/520] Cygwin: fstat_helper: always use handle in call to get_file_attribute When fhandler_base::fstat_helper is called, the handle h returned by get_stat_handle() should be pc.handle() and should be safe to use for getting the file information. Previously, the call to get_file_attribute() for FIFOs set the first argument to NULL instead of h, thereby forcing the file to be opened for fetching the security descriptor in get_file_sd(). --- winsup/cygwin/fhandler_disk_file.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index f362e31e3..bc5967e18 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -394,12 +394,13 @@ fhandler_base::fstat_fs (struct stat *buf) return res; } +/* Called by fstat_by_handle and fstat_by_name. */ int __reg2 fhandler_base::fstat_helper (struct stat *buf) { IO_STATUS_BLOCK st; FILE_COMPRESSION_INFORMATION fci; - HANDLE h = get_stat_handle (); + HANDLE h = get_stat_handle (); /* Should always be pc.handle(). */ PFILE_ALL_INFORMATION pfai = pc.fai (); ULONG attributes = pc.file_attributes (); @@ -475,8 +476,8 @@ fhandler_base::fstat_helper (struct stat *buf) else if (pc.issocket ()) buf->st_mode = S_IFSOCK; - if (!get_file_attribute (is_fs_special () && !pc.issocket () ? NULL : h, pc, - &buf->st_mode, &buf->st_uid, &buf->st_gid)) + if (!get_file_attribute (h, pc, &buf->st_mode, &buf->st_uid, + &buf->st_gid)) { /* If read-only attribute is set, modify ntsec return value */ if (::has_attribute (attributes, FILE_ATTRIBUTE_READONLY) From 279f230620d784c7df91dc5242f76427e706ded7 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sat, 1 Feb 2020 16:36:31 -0500 Subject: [PATCH 190/520] Cygwin: fhandler_fifo.cc: add commentary --- winsup/cygwin/fhandler_fifo.cc | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index ef568f6fe..19cd0e507 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -22,6 +22,35 @@ #include "ntdll.h" #include "cygwait.h" +/* + Overview: + + Currently a FIFO can be opened once for reading and multiple + times for writing. Any attempt to open the FIFO a second time + for reading fails with EACCES (from STATUS_ACCESS_DENIED). + + When a FIFO is opened for reading, + fhandler_fifo::create_pipe_instance is called to create the first + instance of a Windows named pipe server (Windows terminology). A + "listen_client" thread is also started; it waits for pipe clients + (Windows terminology again) to connect. This happens every time + a process opens the FIFO for writing. + + The listen_client thread creates new instances of the pipe server + as needed, so that there is always an instance available for a + writer to connect to. + + The reader maintains a list of "fifo_client_handlers", one for + each pipe instance. A fifo_client_handler manages the connection + between the pipe instance and a writer connected to that pipe + instance. + + TODO: Allow a FIFO to be opened multiple times for reading. + Maybe this could be done by using shared memory, so that all + readers could have access to the same list of writers. +*/ + + /* This is only to be used for writers. When reading, STATUS_PIPE_EMPTY simply means there's no data to be read. */ #define STATUS_PIPE_IS_CLOSED(status) \ From ac1ccc29e1e2abb57cb956c2dfd2c4c34943cfdd Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sat, 1 Feb 2020 13:28:39 +0900 Subject: [PATCH 191/520] Cygwin: console: Revise color setting codes in legacy console mode. - With this patch, foreground color and background color are allowed to be set simultaneously by 24 bit color escape sequence such as ESC[38;2;0;0;255;48;2;128;128;0m in legacy console mode. --- winsup/cygwin/fhandler.h | 2 +- winsup/cygwin/fhandler_console.cc | 47 ++++++++++++++++++------------- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 1b477f633..9270c837c 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1832,7 +1832,7 @@ enum ansi_intensity #define gotrparen 9 #define eatpalette 10 #define endpalette 11 -#define MAXARGS 10 +#define MAXARGS 16 enum cltype { diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index f88d24701..38eed05f4 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1952,7 +1952,7 @@ fhandler_console::char_command (char c) switch (c) { case 'm': /* Set Graphics Rendition */ - for (int i = 0; i <= con.nargs; i++) + for (int i = 0; i < con.nargs; i++) switch (con.args[i]) { case 0: /* normal color */ @@ -2020,38 +2020,39 @@ fhandler_console::char_command (char c) con.fg = FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED; break; case 38: - if (con.nargs < 1) + if (con.nargs < i + 2) /* Sequence error (abort) */ break; - switch (con.args[1]) + switch (con.args[i + 1]) { case 2: - if (con.nargs != 4) + if (con.nargs < i + 5) /* Sequence error (abort) */ break; - r = con.args[2]; - g = con.args[3]; - b = con.args[4]; + r = con.args[i + 2]; + g = con.args[i + 3]; + b = con.args[i + 4]; r = r < (95 + 1) / 2 ? 0 : r > 255 ? 5 : (r - 55 + 20) / 40; g = g < (95 + 1) / 2 ? 0 : g > 255 ? 5 : (g - 55 + 20) / 40; b = b < (95 + 1) / 2 ? 0 : b > 255 ? 5 : (b - 55 + 20) / 40; con.fg = table256[16 + r*36 + g*6 + b]; + i += 4; break; case 5: - if (con.nargs != 2) + if (con.nargs < i + 3) /* Sequence error (abort) */ break; { - int idx = con.args[2]; + int idx = con.args[i + 2]; if (idx < 0) idx = 0; if (idx > 255) idx = 255; con.fg = table256[idx]; + i += 2; } break; } - i += con.nargs; break; case 39: con.fg = con.default_color & FOREGROUND_ATTR_MASK; @@ -2081,38 +2082,39 @@ fhandler_console::char_command (char c) con.bg = BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED; break; case 48: - if (con.nargs < 1) + if (con.nargs < i + 2) /* Sequence error (abort) */ break; - switch (con.args[1]) + switch (con.args[i + 1]) { case 2: - if (con.nargs != 4) + if (con.nargs < i + 5) /* Sequence error (abort) */ break; - r = con.args[2]; - g = con.args[3]; - b = con.args[4]; + r = con.args[i + 2]; + g = con.args[i + 3]; + b = con.args[i + 4]; r = r < (95 + 1) / 2 ? 0 : r > 255 ? 5 : (r - 55 + 20) / 40; g = g < (95 + 1) / 2 ? 0 : g > 255 ? 5 : (g - 55 + 20) / 40; b = b < (95 + 1) / 2 ? 0 : b > 255 ? 5 : (b - 55 + 20) / 40; con.bg = table256[16 + r*36 + g*6 + b] << 4; + i += 4; break; case 5: - if (con.nargs != 2) + if (con.nargs < i + 3) /* Sequence error (abort) */ break; { - int idx = con.args[2]; + int idx = con.args[i + 2]; if (idx < 0) idx = 0; if (idx > 255) idx = 255; con.bg = table256[idx] << 4; + i += 2; } break; } - i += con.nargs; break; case 49: con.bg = con.default_color & BACKGROUND_ATTR_MASK; @@ -2806,7 +2808,7 @@ fhandler_console::write (const void *vsrc, size_t len) { src++; con.nargs++; - if (con.nargs >= MAXARGS) + if (con.nargs > MAXARGS) con.nargs--; } else if (*src == ' ') @@ -2819,6 +2821,9 @@ fhandler_console::write (const void *vsrc, size_t len) con.state = gotcommand; break; case gotcommand: + con.nargs ++; + if (con.nargs > MAXARGS) + con.nargs--; char_command (*src++); con.state = normal; break; @@ -2871,6 +2876,8 @@ fhandler_console::write (const void *vsrc, size_t len) { con.state = gotarg1; con.nargs++; + if (con.nargs > MAXARGS) + con.nargs--; src++; } else if (isalpha (*src)) From 65ad1c0ab0a434fb52d23b96fb072634ac263471 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Tue, 4 Feb 2020 21:25:52 +0900 Subject: [PATCH 192/520] Cygwin: pty: Remove meaningless pointer increment. - Since commit 73742508fcd8e994450582c1b7296c709da66764, a pointer increment in master write code which has no effect was remaining. --- winsup/cygwin/fhandler_tty.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index c1c0fb812..1dd57b369 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -2338,7 +2338,7 @@ fhandler_pty_master::write (const void *ptr, size_t len) WriteFile (to_slave, "\003", 1, &n, 0); } - line_edit_status status = line_edit (p++, len, ti, &ret); + line_edit_status status = line_edit (p, len, ti, &ret); if (status > line_edit_signalled && status != line_edit_pipe_full) ret = -1; return ret; From cd78225a50205aa07d726b7310b333e9c07471bc Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Tue, 4 Feb 2020 21:34:13 -0700 Subject: [PATCH 193/520] libgloss: Fix lseek semihosting bug on nios2 and m68k When off_t is 32 bits, the value needs to be sign-extended to 64 bits before shifting right to extract the high-order word. Previously negative offsets were incorrectly encoded. Signed-off-by: Sandra Loosemore --- libgloss/m68k/io-lseek.c | 2 +- libgloss/nios2/io-lseek.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libgloss/m68k/io-lseek.c b/libgloss/m68k/io-lseek.c index 63ec56451..eaaf55746 100644 --- a/libgloss/m68k/io-lseek.c +++ b/libgloss/m68k/io-lseek.c @@ -38,7 +38,7 @@ off_t lseek (int fd, off_t offset, int whence) #if HOSTED gdb_parambuf_t parameters; parameters[0] = (uint32_t) fd; - parameters[1] = (uint32_t) ((offset >> 32) & 0xffffffff); + parameters[1] = (uint32_t) ((int64_t)offset >> 32); parameters[2] = (uint32_t) (offset & 0xffffffff); parameters[3] = __hosted_to_gdb_lseek_flags (whence); __hosted (HOSTED_LSEEK, parameters); diff --git a/libgloss/nios2/io-lseek.c b/libgloss/nios2/io-lseek.c index bfc23c1bc..d47fe0798 100644 --- a/libgloss/nios2/io-lseek.c +++ b/libgloss/nios2/io-lseek.c @@ -39,7 +39,7 @@ off_t lseek (int fd, off_t offset, int whence) #if HOSTED gdb_parambuf_t parameters; parameters[0] = (uint32_t) fd; - parameters[1] = (uint32_t) ((offset >> 32) & 0xffffffff); + parameters[1] = (uint32_t) ((int64_t)offset >> 32); parameters[2] = (uint32_t) (offset & 0xffffffff); parameters[3] = __hosted_to_gdb_lseek_flags (whence); __io_hosted (HOSTED_LSEEK, parameters); From 10058b98e74339e273ab94abc0da35da3fc9677a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 4 Feb 2020 22:48:18 -0800 Subject: [PATCH 194/520] Typo in license terms for newlib/libm/common/log2.c The closing quotes were in the wrong place Signed-off-by: Keith Packard --- newlib/libm/common/log2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libm/common/log2.c b/newlib/libm/common/log2.c index 2752f8ef4..e48c16cf8 100644 --- a/newlib/libm/common/log2.c +++ b/newlib/libm/common/log2.c @@ -15,7 +15,7 @@ products derived from this software without specific prior written permission. - THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS'' IS AND ANY EXPRESS OR IMPLIED + THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, From ff24ce91938ac7ad1f3321b16118222f90ef98c3 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 4 Feb 2020 22:48:19 -0800 Subject: [PATCH 195/520] Typo in license for newlib/libc/stdio/flags.c Fix spelling: MERCHANT I BILITY -> MERCHANT A BILITY Signed-off-by: Keith Packard --- newlib/libc/stdio/flags.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libc/stdio/flags.c b/newlib/libc/stdio/flags.c index f0a94bcf5..7bbd50181 100644 --- a/newlib/libc/stdio/flags.c +++ b/newlib/libc/stdio/flags.c @@ -12,7 +12,7 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ /* No user fns here. Pesch 15apr92 */ From 3a71c46380f2cad6a9cb9d182c117cb624214553 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 6 Feb 2020 19:48:17 +0900 Subject: [PATCH 196/520] Cygwin: pty: Use pinfo() rather than kill() with signal 0. - PTY code has a problem that tcsh is terminated if the following command is executed. true; chcp & This seems to be caused by invalid pointer access which occurs when the process exits during the kill() code is execuetd. This patch avoids the issue by not using kill(). --- winsup/cygwin/fhandler.h | 2 +- winsup/cygwin/fhandler_tty.cc | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 9270c837c..82527eca3 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -2211,7 +2211,7 @@ class fhandler_pty_slave: public fhandler_pty_common { if (!mask && get_ttyp ()->pcon_pid && get_ttyp ()->pcon_pid != myself->pid && - kill (get_ttyp ()->pcon_pid, 0) == 0) + !!pinfo (get_ttyp ()->pcon_pid)) return; get_ttyp ()->mask_switch_to_pcon_in = mask; } diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 1dd57b369..181bed5a9 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1103,7 +1103,7 @@ fhandler_pty_slave::set_switch_to_pcon (int fd_set) skip_console_setting: restore_reattach_pcon (); if (get_ttyp ()->pcon_pid == 0 || - kill (get_ttyp ()->pcon_pid, 0) != 0) + !pinfo (get_ttyp ()->pcon_pid)) get_ttyp ()->pcon_pid = myself->pid; get_ttyp ()->switch_to_pcon_in = true; } @@ -1111,7 +1111,7 @@ skip_console_setting: { wait_pcon_fwd (); if (get_ttyp ()->pcon_pid == 0 || - kill (get_ttyp ()->pcon_pid, 0) != 0) + !pinfo (get_ttyp ()->pcon_pid)) get_ttyp ()->pcon_pid = myself->pid; get_ttyp ()->switch_to_pcon_out = true; } @@ -1124,7 +1124,7 @@ fhandler_pty_slave::reset_switch_to_pcon (void) this->set_switch_to_pcon (fd); if (get_ttyp ()->pcon_pid && get_ttyp ()->pcon_pid != myself->pid && - kill (get_ttyp ()->pcon_pid, 0) == 0) + !!pinfo (get_ttyp ()->pcon_pid)) /* There is a process which is grabbing pseudo console. */ return; if (isHybrid) @@ -2728,7 +2728,7 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT; SetConsoleMode (get_handle (), mode); if (get_ttyp ()->pcon_pid == 0 || - kill (get_ttyp ()->pcon_pid, 0) != 0) + !pinfo (get_ttyp ()->pcon_pid)) get_ttyp ()->pcon_pid = myself->pid; get_ttyp ()->switch_to_pcon_in = true; } @@ -2739,7 +2739,7 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) if (!get_ttyp ()->switch_to_pcon_out) wait_pcon_fwd (); if (get_ttyp ()->pcon_pid == 0 || - kill (get_ttyp ()->pcon_pid, 0) != 0) + !pinfo (get_ttyp ()->pcon_pid)) get_ttyp ()->pcon_pid = myself->pid; get_ttyp ()->switch_to_pcon_out = true; From 2bae1591711f7694b8c79e00c172a0b873d82ff0 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sun, 9 Feb 2020 23:46:00 +0900 Subject: [PATCH 197/520] Cygwin: pty: Define mask_switch_to_pcon_in() in fhandler_tty.cc. - This patch moves the definition of mask_switch_to_pcon() from fhandler.h to fhandler_tty.cc. --- winsup/cygwin/fhandler.h | 9 +-------- winsup/cygwin/fhandler_tty.cc | 10 ++++++++++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 82527eca3..53b6c2c45 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -2207,14 +2207,7 @@ class fhandler_pty_slave: public fhandler_pty_common void set_switch_to_pcon (int fd); void reset_switch_to_pcon (void); void push_to_pcon_screenbuffer (const char *ptr, size_t len); - void mask_switch_to_pcon_in (bool mask) - { - if (!mask && get_ttyp ()->pcon_pid && - get_ttyp ()->pcon_pid != myself->pid && - !!pinfo (get_ttyp ()->pcon_pid)) - return; - get_ttyp ()->mask_switch_to_pcon_in = mask; - } + void mask_switch_to_pcon_in (bool mask); void fixup_after_attach (bool native_maybe, int fd); bool is_line_input (void) { diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 181bed5a9..a92bcfc40 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1395,6 +1395,16 @@ fhandler_pty_slave::write (const void *ptr, size_t len) return towrite; } +void +fhandler_pty_slave::mask_switch_to_pcon_in (bool mask) +{ + if (!mask && get_ttyp ()->pcon_pid && + get_ttyp ()->pcon_pid != myself->pid && + !!pinfo (get_ttyp ()->pcon_pid)) + return; + get_ttyp ()->mask_switch_to_pcon_in = mask; +} + bool fhandler_pty_common::to_be_read_from_pcon (void) { From b0474b704aa0b0924da9b28d6310ccc1a55de675 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sun, 9 Feb 2020 23:46:01 +0900 Subject: [PATCH 198/520] Cygwin: pty: Avoid screen distortion on slave read. - Echo back print is distorted when the cygwin program which calls Win32 console API directly calls slave read(). This patch fixes the issue. --- winsup/cygwin/fhandler.h | 3 ++- winsup/cygwin/fhandler_tty.cc | 51 ++++++++++++++++++++--------------- 2 files changed, 32 insertions(+), 22 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 53b6c2c45..a22f3a136 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -2206,7 +2206,7 @@ class fhandler_pty_slave: public fhandler_pty_common } void set_switch_to_pcon (int fd); void reset_switch_to_pcon (void); - void push_to_pcon_screenbuffer (const char *ptr, size_t len); + void push_to_pcon_screenbuffer (const char *ptr, size_t len, bool is_echo); void mask_switch_to_pcon_in (bool mask); void fixup_after_attach (bool native_maybe, int fd); bool is_line_input (void) @@ -2215,6 +2215,7 @@ class fhandler_pty_slave: public fhandler_pty_common } void setup_locale (void); void set_freeconsole_on_close (bool val); + void trigger_redraw_screen (void); void wait_pcon_fwd (void); }; diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index a92bcfc40..f88382752 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -80,7 +80,13 @@ set_switch_to_pcon (void) fhandler_base *fh = cfd; fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; if (ptys->get_pseudo_console ()) - ptys->set_switch_to_pcon (fd); + { + ptys->set_switch_to_pcon (fd); + ptys->trigger_redraw_screen (); + DWORD mode = + ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT; + SetConsoleMode (ptys->get_handle (), mode); + } } } @@ -1097,9 +1103,6 @@ fhandler_pty_slave::set_switch_to_pcon (int fd_set) if (!try_reattach_pcon ()) goto skip_console_setting; FlushConsoleInputBuffer (get_handle ()); - DWORD mode; - mode = ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT; - SetConsoleMode (get_handle (), mode); skip_console_setting: restore_reattach_pcon (); if (get_ttyp ()->pcon_pid == 0 || @@ -1160,7 +1163,8 @@ fhandler_pty_slave::reset_switch_to_pcon (void) } void -fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) +fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len, + bool is_echo) { bool attached = !!fhandler_console::get_console_process_id (get_helper_process_id (), true); @@ -1231,7 +1235,7 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) } if (!nlen) /* Nothing to be synchronized */ goto cleanup; - if (get_ttyp ()->switch_to_pcon_out) + if (get_ttyp ()->switch_to_pcon_out && !is_echo) goto cleanup; /* Remove ESC sequence which returns results to console input buffer. Without this, cursor position report @@ -1388,7 +1392,7 @@ fhandler_pty_slave::write (const void *ptr, size_t len) if (get_pseudo_console ()) { acquire_output_mutex (INFINITE); - push_to_pcon_screenbuffer ((char *)ptr, len); + push_to_pcon_screenbuffer ((char *)ptr, len, false); release_output_mutex (); } @@ -1716,7 +1720,9 @@ out: if (get_pseudo_console () && ptr0 && (get_ttyp ()->ti.c_lflag & ECHO)) { acquire_output_mutex (INFINITE); - push_to_pcon_screenbuffer (ptr0, len); + push_to_pcon_screenbuffer (ptr0, len, true); + if (get_ttyp ()->switch_to_pcon_out) + trigger_redraw_screen (); release_output_mutex (); } mask_switch_to_pcon_in (false); @@ -2700,6 +2706,21 @@ fhandler_pty_slave::wait_pcon_fwd (void) cygwait (get_ttyp ()->fwd_done, INFINITE); } +void +fhandler_pty_slave::trigger_redraw_screen (void) +{ + /* Forcibly redraw screen based on console screen buffer. */ + /* The following code triggers redrawing the screen. */ + CONSOLE_SCREEN_BUFFER_INFO sbi; + GetConsoleScreenBufferInfo (get_output_handle (), &sbi); + SMALL_RECT rect = {0, 0, + (SHORT) (sbi.dwSize.X -1), (SHORT) (sbi.dwSize.Y - 1)}; + COORD dest = {0, 0}; + CHAR_INFO fill = {' ', 0}; + ScrollConsoleScreenBuffer (get_output_handle (), &rect, NULL, dest, &fill); + get_ttyp ()->need_redraw_screen = false; +} + void fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) { @@ -2754,19 +2775,7 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) get_ttyp ()->switch_to_pcon_out = true; if (get_ttyp ()->need_redraw_screen) - { - /* Forcibly redraw screen based on console screen buffer. */ - /* The following code triggers redrawing the screen. */ - CONSOLE_SCREEN_BUFFER_INFO sbi; - GetConsoleScreenBufferInfo (get_output_handle (), &sbi); - SMALL_RECT rect = {0, 0, - (SHORT) (sbi.dwSize.X -1), (SHORT) (sbi.dwSize.Y - 1)}; - COORD dest = {0, 0}; - CHAR_INFO fill = {' ', 0}; - ScrollConsoleScreenBuffer (get_output_handle (), - &rect, NULL, dest, &fill); - get_ttyp ()->need_redraw_screen = false; - } + trigger_redraw_screen (); } init_console_handler (false); } From d5985cc45d90baa40685f6af1c1cd5eba1a342a6 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sun, 9 Feb 2020 23:46:02 +0900 Subject: [PATCH 199/520] Cygwin: pty: Remove debug codes and organize related codes. - Debug codes used in the early stage of pseudo console support are removed. (Regarding ALWAYS_USE_PCON and USE_API_HOOK) Along with this, the codes related to this change are organized. --- winsup/cygwin/fhandler_tty.cc | 81 ++++++++++------------------------- winsup/cygwin/select.cc | 23 ---------- 2 files changed, 23 insertions(+), 81 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index f88382752..36b3341b1 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -28,9 +28,6 @@ details. */ #include "tls_pbuf.h" #include "registry.h" -#define ALWAYS_USE_PCON false -#define USE_API_HOOK true - #ifndef PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE #define PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE 0x00020016 #endif /* PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE */ @@ -68,7 +65,6 @@ static bool isHybrid; static bool do_not_reset_switch_to_pcon; static bool freeconsole_on_close = true; -#if USE_API_HOOK static void set_switch_to_pcon (void) { @@ -364,12 +360,6 @@ CreateProcessW_Hooked set_ishybrid_and_switch_to_pcon (h); return CreateProcessW_Orig (n, c, pa, ta, inh, f, e, d, si, pi); } -#else /* USE_API_HOOK */ -#define WriteFile_Orig 0 -#define ReadFile_Orig 0 -#define PeekConsoleInputA_Orig 0 -void set_ishybrid_and_switch_to_pcon (HANDLE) {} -#endif /* USE_API_HOOK */ static char * convert_mb_str (UINT cp_to, size_t *len_to, @@ -1091,11 +1081,6 @@ fhandler_pty_slave::set_switch_to_pcon (int fd_set) { if (fd < 0) fd = fd_set; - if (!isHybrid) - { - reset_switch_to_pcon (); - return; - } if (fd == 0 && !get_ttyp ()->switch_to_pcon_in) { pid_restore = 0; @@ -1109,6 +1094,11 @@ skip_console_setting: !pinfo (get_ttyp ()->pcon_pid)) get_ttyp ()->pcon_pid = myself->pid; get_ttyp ()->switch_to_pcon_in = true; + if (isHybrid && !get_ttyp ()->switch_to_pcon_out) + { + wait_pcon_fwd (); + get_ttyp ()->switch_to_pcon_out = true; + } } else if ((fd == 1 || fd == 2) && !get_ttyp ()->switch_to_pcon_out) { @@ -1117,14 +1107,14 @@ skip_console_setting: !pinfo (get_ttyp ()->pcon_pid)) get_ttyp ()->pcon_pid = myself->pid; get_ttyp ()->switch_to_pcon_out = true; + if (isHybrid) + get_ttyp ()->switch_to_pcon_in = true; } } void fhandler_pty_slave::reset_switch_to_pcon (void) { - if (isHybrid) - this->set_switch_to_pcon (fd); if (get_ttyp ()->pcon_pid && get_ttyp ()->pcon_pid != myself->pid && !!pinfo (get_ttyp ()->pcon_pid)) @@ -1132,27 +1122,17 @@ fhandler_pty_slave::reset_switch_to_pcon (void) return; if (isHybrid) { - if (ALWAYS_USE_PCON) - { - DWORD mode; - GetConsoleMode (get_handle (), &mode); - mode |= ENABLE_ECHO_INPUT; - mode |= ENABLE_LINE_INPUT; - mode &= ~ENABLE_PROCESSED_INPUT; - SetConsoleMode (get_handle (), mode); - } - get_ttyp ()->pcon_pid = 0; + DWORD bytes_in_pipe; + WaitForSingleObject (input_mutex, INFINITE); + if (bytes_available (bytes_in_pipe) && !bytes_in_pipe) + ResetEvent (input_available_event); + FlushConsoleInputBuffer (get_handle ()); + ReleaseMutex (input_mutex); init_console_handler (true); return; } if (do_not_reset_switch_to_pcon) return; - if (get_ttyp ()->switch_to_pcon_in) - { - DWORD mode; - GetConsoleMode (get_handle (), &mode); - SetConsoleMode (get_handle (), mode & ~ENABLE_ECHO_INPUT); - } if (get_ttyp ()->switch_to_pcon_out) /* Wait for pty_master_fwd_thread() */ wait_pcon_fwd (); @@ -1413,7 +1393,7 @@ bool fhandler_pty_common::to_be_read_from_pcon (void) { return get_ttyp ()->switch_to_pcon_in && - (!get_ttyp ()->mask_switch_to_pcon_in || ALWAYS_USE_PCON); + !get_ttyp ()->mask_switch_to_pcon_in; } void __reg3 @@ -1441,8 +1421,8 @@ fhandler_pty_slave::read (void *ptr, size_t& len) if (ptr) /* Indicating not tcflush(). */ { - reset_switch_to_pcon (); mask_switch_to_pcon_in (true); + reset_switch_to_pcon (); } if (is_nonblocking () || !ptr) /* Indicating tcflush(). */ @@ -1562,7 +1542,7 @@ fhandler_pty_slave::read (void *ptr, size_t& len) flags &= ~ENABLE_ECHO_INPUT; if ((get_ttyp ()->ti.c_lflag & ISIG) && !(get_ttyp ()->ti.c_iflag & IGNBRK)) - flags |= ALWAYS_USE_PCON ? 0 : ENABLE_PROCESSED_INPUT; + flags |= ENABLE_PROCESSED_INPUT; if (dwMode != flags) SetConsoleMode (get_handle (), flags); /* Read get_handle() instad of get_handle_cyg() */ @@ -2325,13 +2305,11 @@ fhandler_pty_master::write (const void *ptr, size_t len) char *buf = convert_mb_str (CP_UTF8, &nlen, get_ttyp ()->term_code_page, (const char *) ptr, len); + WaitForSingleObject (input_mutex, INFINITE); + DWORD wLen; WriteFile (to_slave, buf, nlen, &wLen, NULL); - if (ALWAYS_USE_PCON && - (ti.c_lflag & ISIG) && memchr (p, ti.c_cc[VINTR], len)) - get_ttyp ()->kill_pgrp (SIGINT); - if (ti.c_lflag & ICANON) { if (memchr (buf, '\r', nlen)) @@ -2340,20 +2318,12 @@ fhandler_pty_master::write (const void *ptr, size_t len) else SetEvent (input_available_event); + ReleaseMutex (input_mutex); + mb_str_free (buf); return len; } - if (get_ttyp ()->switch_to_pcon_in && - (ti.c_lflag & ISIG) && - memchr (p, ti.c_cc[VINTR], len) && - get_ttyp ()->getpgid () == get_ttyp ()->pcon_pid) - { - DWORD n; - /* Send ^C to pseudo console as well */ - WriteFile (to_slave, "\003", 1, &n, 0); - } - line_edit_status status = line_edit (p, len, ti, &ret); if (status > line_edit_signalled && status != line_edit_pipe_full) ret = -1; @@ -2739,17 +2709,13 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) /* Clear screen to synchronize pseudo console screen buffer with real terminal. This is necessary because pseudo console screen buffer is empty at start. */ - if (get_ttyp ()->num_pcon_attached_slaves == 0 - && !ALWAYS_USE_PCON) + if (get_ttyp ()->num_pcon_attached_slaves == 0) /* Assume this is the first process using this pty slave. */ get_ttyp ()->need_redraw_screen = true; get_ttyp ()->num_pcon_attached_slaves ++; } - if (ALWAYS_USE_PCON && !isHybrid && pcon_attached_to == get_minor ()) - set_ishybrid_and_switch_to_pcon (get_output_handle ()); - if (pcon_attached_to == get_minor () && native_maybe) { if (fd == 0) @@ -2801,7 +2767,8 @@ fhandler_pty_slave::fixup_after_exec () /* Native windows program does not reset event on read. Therefore, reset here if no input is available. */ DWORD bytes_in_pipe; - if (bytes_available (bytes_in_pipe) && !bytes_in_pipe) + if (!to_be_read_from_pcon () && + bytes_available (bytes_in_pipe) && !bytes_in_pipe) ResetEvent (input_available_event); reset_switch_to_pcon (); @@ -2841,7 +2808,6 @@ fhandler_pty_slave::fixup_after_exec () if (get_ttyp ()->term_code_page == 0) setup_locale (); -#if USE_API_HOOK /* Hook Console API */ if (get_pseudo_console ()) { @@ -2875,7 +2841,6 @@ fhandler_pty_slave::fixup_after_exec () DO_HOOK (NULL, CreateProcessA); DO_HOOK (NULL, CreateProcessW); } -#endif /* USE_API_HOOK */ } /* This thread function handles the master control pipe. It waits for a diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index b3aedf20f..5048e549f 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -1211,29 +1211,6 @@ peek_pty_slave (select_record *s, bool from_select) goto out; } - if (ptys->to_be_read_from_pcon ()) - { - if (ptys->is_line_input ()) - { - INPUT_RECORD inp[INREC_SIZE]; - DWORD n; - PeekConsoleInput (ptys->get_handle (), inp, INREC_SIZE, &n); - bool end_of_line = false; - while (n-- > 0) - if (inp[n].EventType == KEY_EVENT && - inp[n].Event.KeyEvent.bKeyDown && - inp[n].Event.KeyEvent.uChar.AsciiChar == '\r') - end_of_line = true; - if (end_of_line) - { - gotone = s->read_ready = true; - goto out; - } - else - goto out; - } - } - if (IsEventSignalled (ptys->input_available_event)) { gotone = s->read_ready = true; From a4ca6c4861a4d7fa75b7e0a98dca0ad6bfda3390 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sun, 9 Feb 2020 23:46:03 +0900 Subject: [PATCH 200/520] Cygwin: pty: Add missing member initialization for struct pipe_reply. - For pseudo console support, struct pipe_reply was changed in the past, however, the initialization was not fixed. --- winsup/cygwin/fhandler_tty.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 36b3341b1..1c23c93e3 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -2878,7 +2878,7 @@ fhandler_pty_master::pty_master_thread () while (!exit && (ConnectNamedPipe (master_ctl, NULL) || GetLastError () == ERROR_PIPE_CONNECTED)) { - pipe_reply repl = { NULL, NULL, NULL, 0 }; + pipe_reply repl = { NULL, NULL, NULL, NULL, 0 }; bool deimp = false; NTSTATUS allow = STATUS_ACCESS_DENIED; ACCESS_MASK access = EVENT_MODIFY_STATE; From 29431fcb5b14d4c5ac3b3161a076eb1a208349d9 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sun, 9 Feb 2020 23:46:59 +0900 Subject: [PATCH 201/520] Cygwin: pty: Inherit typeahead data between two input pipes. - PTY has a problem that the key input, which is typed during windows native app is running, disappear when it returns to shell. (Problem 3 in https://cygwin.com/ml/cygwin/2020-02/msg00007.html) This is beacuse pty has two input pipes, one is for cygwin apps and the other one is for native windows apps. The key input during windows native program is running is sent to the second input pipe while cygwin shell reads input from the first input pipe. This patch realize transfering input data between these two pipes. --- winsup/cygwin/fhandler.h | 12 +- winsup/cygwin/fhandler_tty.cc | 404 ++++++++++++++++++++++++++-------- winsup/cygwin/select.cc | 2 + winsup/cygwin/tty.cc | 3 + winsup/cygwin/tty.h | 3 + 5 files changed, 331 insertions(+), 93 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index a22f3a136..993d7355a 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -326,7 +326,7 @@ class fhandler_base virtual size_t &raixput () { return ra.raixput; }; virtual size_t &rabuflen () { return ra.rabuflen; }; - bool get_readahead_valid () { return raixget () < ralen (); } + virtual bool get_readahead_valid () { return raixget () < ralen (); } int puts_readahead (const char *s, size_t len = (size_t) -1); int put_readahead (char value); @@ -335,7 +335,7 @@ class fhandler_base void set_readahead_valid (int val, int ch = -1); - int get_readahead_into_buffer (char *buf, size_t buflen); + virtual int get_readahead_into_buffer (char *buf, size_t buflen); bool has_acls () const { return pc.has_acls (); } @@ -1768,7 +1768,7 @@ class fhandler_termios: public fhandler_base int ioctl (int, void *); tty_min *_tc; tty *get_ttyp () {return (tty *) tc ();} - int eat_readahead (int n); + virtual int eat_readahead (int n); public: tty_min*& tc () {return _tc;} @@ -2168,6 +2168,9 @@ class fhandler_pty_slave: public fhandler_pty_common ssize_t __stdcall write (const void *ptr, size_t len); void __reg3 read (void *ptr, size_t& len); int init (HANDLE, DWORD, mode_t); + int eat_readahead (int n); + int get_readahead_into_buffer (char *buf, size_t buflen); + bool get_readahead_valid (void); int tcsetattr (int a, const struct termios *t); int tcgetattr (struct termios *t); @@ -2217,6 +2220,8 @@ class fhandler_pty_slave: public fhandler_pty_common void set_freeconsole_on_close (bool val); void trigger_redraw_screen (void); void wait_pcon_fwd (void); + void pull_pcon_input (void); + void update_pcon_input_state (bool need_lock); }; #define __ptsname(buf, unit) __small_sprintf ((buf), "/dev/pty%d", (unit)) @@ -2281,6 +2286,7 @@ public: } bool setup_pseudoconsole (void); + void transfer_input_to_pcon (void); }; class fhandler_dev_null: public fhandler_base diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 1c23c93e3..f2fd680ea 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -440,6 +440,10 @@ fhandler_pty_master::flush_to_slave () { if (get_readahead_valid () && !(get_ttyp ()->ti.c_lflag & ICANON)) accept_input (); + WaitForSingleObject (input_mutex, INFINITE); + if (!get_ttyp ()->pcon_in_empty && !(get_ttyp ()->ti.c_lflag & ICANON)) + SetEvent (input_available_event); + ReleaseMutex (input_mutex); } DWORD @@ -519,7 +523,7 @@ fhandler_pty_master::accept_input () termios_printf ("sending EOF to slave"); get_ttyp ()->read_retval = 0; } - else + else if (!to_be_read_from_pcon ()) { char *p = rabuf (); DWORD rc; @@ -986,7 +990,6 @@ fhandler_pty_slave::close () termios_printf ("CloseHandle (output_mutex<%p>), %E", output_mutex); if (pcon_attached_to == get_minor ()) get_ttyp ()->num_pcon_attached_slaves --; - get_ttyp ()->mask_switch_to_pcon_in = false; return 0; } @@ -1076,6 +1079,157 @@ fhandler_pty_slave::restore_reattach_pcon (void) pid_restore = 0; } +/* This function requests transfering the input data from the input + pipe for cygwin apps to the other input pipe for native apps. */ +void +fhandler_pty_slave::pull_pcon_input (void) +{ + get_ttyp ()->req_transfer_input_to_pcon = true; + while (get_ttyp ()->req_transfer_input_to_pcon) + Sleep (1); +} + +void +fhandler_pty_slave::update_pcon_input_state (bool need_lock) +{ + if (need_lock) + WaitForSingleObject (input_mutex, INFINITE); + /* Flush input buffer if it is requested by master. + This happens if ^C is pressed in pseudo console side. */ + if (get_ttyp ()->req_flush_pcon_input) + { + FlushConsoleInputBuffer (get_handle ()); + get_ttyp ()->req_flush_pcon_input = false; + } + /* Peek console input buffer and update state. */ + INPUT_RECORD inp[INREC_SIZE]; + DWORD n; + BOOL (WINAPI *PeekFunc) + (HANDLE, PINPUT_RECORD, DWORD, LPDWORD); + PeekFunc = + PeekConsoleInputA_Orig ? : PeekConsoleInput; + PeekFunc (get_handle (), inp, INREC_SIZE, &n); + bool saw_accept = false; + bool pipe_empty = true; + while (n-- > 0) + if (inp[n].EventType == KEY_EVENT && inp[n].Event.KeyEvent.bKeyDown && + inp[n].Event.KeyEvent.uChar.AsciiChar) + { + pipe_empty = false; + char c = inp[n].Event.KeyEvent.uChar.AsciiChar; + const char sigs[] = { + (char) get_ttyp ()->ti.c_cc[VINTR], + (char) get_ttyp ()->ti.c_cc[VQUIT], + (char) get_ttyp ()->ti.c_cc[VSUSP], + }; + const char eols[] = { + (char) get_ttyp ()->ti.c_cc[VEOF], + (char) get_ttyp ()->ti.c_cc[VEOL], + (char) get_ttyp ()->ti.c_cc[VEOL2], + '\n', + '\r' + }; + if (is_line_input () && memchr (eols, c, sizeof (eols))) + saw_accept = true; + if ((get_ttyp ()->ti.c_lflag & ISIG) && + memchr (sigs, c, sizeof (sigs))) + saw_accept = true; + } + get_ttyp ()->pcon_in_empty = pipe_empty && !(ralen () > raixget ()); + if (!get_readahead_valid () && + (pipe_empty || (is_line_input () && !saw_accept)) && + get_ttyp ()->read_retval == 1 && bytes_available (n) && n == 0) + ResetEvent (input_available_event); + if (need_lock) + ReleaseMutex (input_mutex); +} + +int +fhandler_pty_slave::eat_readahead (int n) +{ + int oralen = ralen () - raixget (); + if (n < 0) + n = ralen () - raixget (); + if (n > 0 && ralen () > raixget ()) + { + const char eols[] = { + (char) get_ttyp ()->ti.c_cc[VEOF], + (char) get_ttyp ()->ti.c_cc[VEOL], + (char) get_ttyp ()->ti.c_cc[VEOL2], + '\n' + }; + while (n > 0 && ralen () > raixget ()) + { + if (memchr (eols, rabuf ()[ralen ()-1], sizeof (eols))) + break; + -- n; + -- ralen (); + } + + /* If IUTF8 is set, the terminal is in UTF-8 mode. If so, we erase + a complete UTF-8 multibyte sequence on VERASE/VWERASE. Otherwise, + if we only erase a single byte, invalid unicode chars are left in + the input. */ + if (get_ttyp ()->ti.c_iflag & IUTF8) + while (ralen () > 0 && + ((unsigned char) rabuf ()[ralen ()] & 0xc0) == 0x80) + --ralen (); + + if (raixget () >= ralen ()) + raixget () = raixput () = ralen () = 0; + else if (raixput () > ralen ()) + raixput () = ralen (); + } + + return oralen; +} + +int +fhandler_pty_slave::get_readahead_into_buffer (char *buf, size_t buflen) +{ + int ch; + int copied_chars = 0; + + while (buflen) + if ((ch = get_readahead ()) < 0) + break; + else + { + const char eols[] = { + (char) get_ttyp ()->ti.c_cc[VEOF], + (char) get_ttyp ()->ti.c_cc[VEOL], + (char) get_ttyp ()->ti.c_cc[VEOL2], + '\n' + }; + buf[copied_chars++] = (unsigned char)(ch & 0xff); + buflen--; + if (is_line_input () && memchr (eols, ch & 0xff, sizeof (eols))) + break; + } + + return copied_chars; +} + +bool +fhandler_pty_slave::get_readahead_valid (void) +{ + if (is_line_input ()) + { + const char eols[] = { + (char) get_ttyp ()->ti.c_cc[VEOF], + (char) get_ttyp ()->ti.c_cc[VEOL], + (char) get_ttyp ()->ti.c_cc[VEOL2], + '\n' + }; + for (size_t i=raixget (); i raixget (); +} + void fhandler_pty_slave::set_switch_to_pcon (int fd_set) { @@ -1083,13 +1237,7 @@ fhandler_pty_slave::set_switch_to_pcon (int fd_set) fd = fd_set; if (fd == 0 && !get_ttyp ()->switch_to_pcon_in) { - pid_restore = 0; - if (pcon_attached_to != get_minor ()) - if (!try_reattach_pcon ()) - goto skip_console_setting; - FlushConsoleInputBuffer (get_handle ()); -skip_console_setting: - restore_reattach_pcon (); + pull_pcon_input (); if (get_ttyp ()->pcon_pid == 0 || !pinfo (get_ttyp ()->pcon_pid)) get_ttyp ()->pcon_pid = myself->pid; @@ -1121,16 +1269,7 @@ fhandler_pty_slave::reset_switch_to_pcon (void) /* There is a process which is grabbing pseudo console. */ return; if (isHybrid) - { - DWORD bytes_in_pipe; - WaitForSingleObject (input_mutex, INFINITE); - if (bytes_available (bytes_in_pipe) && !bytes_in_pipe) - ResetEvent (input_available_event); - FlushConsoleInputBuffer (get_handle ()); - ReleaseMutex (input_mutex); - init_console_handler (true); - return; - } + return; if (do_not_reset_switch_to_pcon) return; if (get_ttyp ()->switch_to_pcon_out) @@ -1333,6 +1472,14 @@ fhandler_pty_slave::write (const void *ptr, size_t len) if (!try_reattach_pcon ()) fallback = true; + if (get_ttyp ()->switch_to_pcon_out && !fallback && + (memmem (buf, nlen, "\033[6n", 4) || memmem (buf, nlen, "\033[0c", 4))) + { + get_ttyp ()->pcon_in_empty = false; + if (!is_line_input ()) + SetEvent (input_available_event); + } + DWORD dwMode, flags; flags = ENABLE_VIRTUAL_TERMINAL_PROCESSING; if (!(get_ttyp ()->ti.c_oflag & OPOST) || @@ -1382,18 +1529,14 @@ fhandler_pty_slave::write (const void *ptr, size_t len) void fhandler_pty_slave::mask_switch_to_pcon_in (bool mask) { - if (!mask && get_ttyp ()->pcon_pid && - get_ttyp ()->pcon_pid != myself->pid && - !!pinfo (get_ttyp ()->pcon_pid)) - return; get_ttyp ()->mask_switch_to_pcon_in = mask; } bool fhandler_pty_common::to_be_read_from_pcon (void) { - return get_ttyp ()->switch_to_pcon_in && - !get_ttyp ()->mask_switch_to_pcon_in; + return !get_ttyp ()->pcon_in_empty || + (get_ttyp ()->switch_to_pcon_in && !get_ttyp ()->mask_switch_to_pcon_in); } void __reg3 @@ -1424,6 +1567,8 @@ fhandler_pty_slave::read (void *ptr, size_t& len) mask_switch_to_pcon_in (true); reset_switch_to_pcon (); } + if (to_be_read_from_pcon ()) + update_pcon_input_state (true); if (is_nonblocking () || !ptr) /* Indicating tcflush(). */ time_to_wait = 0; @@ -1523,60 +1668,81 @@ fhandler_pty_slave::read (void *ptr, size_t& len) } goto out; } - if (to_be_read_from_pcon ()) + if (ptr && to_be_read_from_pcon ()) { - if (!try_reattach_pcon ()) + if (get_readahead_valid ()) { - restore_reattach_pcon (); - goto do_read_cyg; - } - - DWORD dwMode; - GetConsoleMode (get_handle (), &dwMode); - DWORD flags = ENABLE_VIRTUAL_TERMINAL_INPUT; - if (get_ttyp ()->ti.c_lflag & ECHO) - flags |= ENABLE_ECHO_INPUT; - if (get_ttyp ()->ti.c_lflag & ICANON) - flags |= ENABLE_LINE_INPUT; - if (flags & ENABLE_ECHO_INPUT && !(flags & ENABLE_LINE_INPUT)) - flags &= ~ENABLE_ECHO_INPUT; - if ((get_ttyp ()->ti.c_lflag & ISIG) && - !(get_ttyp ()->ti.c_iflag & IGNBRK)) - flags |= ENABLE_PROCESSED_INPUT; - if (dwMode != flags) - SetConsoleMode (get_handle (), flags); - /* Read get_handle() instad of get_handle_cyg() */ - BOOL (WINAPI *ReadFunc) - (HANDLE, LPVOID, DWORD, LPDWORD, LPOVERLAPPED); - ReadFunc = ReadFile_Orig ? ReadFile_Orig : ReadFile; - DWORD rlen; - if (!ReadFunc (get_handle (), ptr, len, &rlen, NULL)) - { - termios_printf ("read failed, %E"); ReleaseMutex (input_mutex); - set_errno (EIO); - totalread = -1; - goto out; + totalread = get_readahead_into_buffer ((char *) ptr, len); } - INPUT_RECORD inp[128]; - DWORD n; - BOOL (WINAPI *PeekFunc) - (HANDLE, PINPUT_RECORD, DWORD, LPDWORD); - PeekFunc = - PeekConsoleInputA_Orig ? PeekConsoleInputA_Orig : PeekConsoleInput; - PeekFunc (get_handle (), inp, 128, &n); - bool pipe_empty = true; - while (n-- > 0) - if (inp[n].EventType == KEY_EVENT && inp[n].Event.KeyEvent.bKeyDown) - pipe_empty = false; - if (pipe_empty) - ResetEvent (input_available_event); - ReleaseMutex (input_mutex); - len = rlen; + else + { + if (!try_reattach_pcon ()) + { + restore_reattach_pcon (); + goto do_read_cyg; + } - restore_reattach_pcon (); + DWORD dwMode; + GetConsoleMode (get_handle (), &dwMode); + DWORD flags = ENABLE_VIRTUAL_TERMINAL_INPUT; + if (dwMode != flags) + SetConsoleMode (get_handle (), flags); + /* Read get_handle() instad of get_handle_cyg() */ + BOOL (WINAPI *ReadFunc) + (HANDLE, LPVOID, DWORD, LPDWORD, LPVOID); + ReadFunc = ReadConsoleA_Orig ? ReadConsoleA_Orig : ReadConsoleA; + DWORD rlen; + readlen = MIN (len, sizeof (buf)); + if (!ReadFunc (get_handle (), buf, readlen, &rlen, NULL)) + { + termios_printf ("read failed, %E"); + SetConsoleMode (get_handle (), dwMode); + restore_reattach_pcon (); + ReleaseMutex (input_mutex); + set_errno (EIO); + totalread = -1; + goto out; + } + SetConsoleMode (get_handle (), dwMode); + restore_reattach_pcon (); + ReleaseMutex (input_mutex); + + ssize_t nlen; + char *nbuf = convert_mb_str (get_ttyp ()->term_code_page, + (size_t *) &nlen, GetConsoleCP (), buf, rlen); + + ssize_t ret; + line_edit_status res = + line_edit (nbuf, nlen, get_ttyp ()->ti, &ret); + + mb_str_free (nbuf); + + if (res == line_edit_input_done || res == line_edit_ok) + totalread = get_readahead_into_buffer ((char *) ptr, len); + else if (res > line_edit_signalled) + { + set_sig_errno (EINTR); + totalread = -1; + } + else + { + update_pcon_input_state (true); + continue; + } + } + + update_pcon_input_state (true); mask_switch_to_pcon_in (false); - return; + goto out; + } + if (!ptr && len == UINT_MAX && !get_ttyp ()->pcon_in_empty) + { + FlushConsoleInputBuffer (get_handle ()); + get_ttyp ()->pcon_in_empty = true; + DWORD n; + if (bytes_available (n) && n == 0) + ResetEvent (input_available_event); } do_read_cyg: @@ -1697,7 +1863,8 @@ out: termios_printf ("%d = read(%p, %lu)", totalread, ptr, len); len = (size_t) totalread; /* Push slave read as echo to pseudo console screen buffer. */ - if (get_pseudo_console () && ptr0 && (get_ttyp ()->ti.c_lflag & ECHO)) + if (get_pseudo_console () && ptr0 && totalread > 0 && + (get_ttyp ()->ti.c_lflag & ECHO)) { acquire_output_mutex (INFINITE); push_to_pcon_screenbuffer (ptr0, len, true); @@ -2307,19 +2474,41 @@ fhandler_pty_master::write (const void *ptr, size_t len) WaitForSingleObject (input_mutex, INFINITE); + if (memchr (buf, '\003', nlen)) /* ^C intr key in pcon */ + get_ttyp ()->req_flush_pcon_input = true; + DWORD wLen; WriteFile (to_slave, buf, nlen, &wLen, NULL); - - if (ti.c_lflag & ICANON) - { - if (memchr (buf, '\r', nlen)) - SetEvent (input_available_event); - } - else - SetEvent (input_available_event); + get_ttyp ()->pcon_in_empty = false; ReleaseMutex (input_mutex); + /* Use line_edit () in order to set input_available_event. */ + bool is_echo = tc ()->ti.c_lflag & ECHO; + if (!get_ttyp ()->mask_switch_to_pcon_in) + { + tc ()->ti.c_lflag &= ~ECHO; + ti.c_lflag &= ~ECHO; + } + ti.c_lflag &= ~ISIG; + line_edit (buf, nlen, ti, &ret); + if (is_echo) + tc ()->ti.c_lflag |= ECHO; + get_ttyp ()->read_retval = 1; + + const char sigs[] = { + (char) ti.c_cc[VINTR], + (char) ti.c_cc[VQUIT], + (char) ti.c_cc[VSUSP], + }; + if (tc ()->ti.c_lflag & ISIG) + for (size_t i=0; inum_pcon_attached_slaves ++; } +#if 0 /* This is for debug only. */ + isHybrid = true; + get_ttyp ()->switch_to_pcon_in = true; + get_ttyp ()->switch_to_pcon_out = true; +#endif + if (pcon_attached_to == get_minor () && native_maybe) { if (fd == 0) { - FlushConsoleInputBuffer (get_handle ()); + pull_pcon_input (); DWORD mode = ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT; SetConsoleMode (get_handle (), mode); @@ -2764,13 +2959,6 @@ fhandler_pty_slave::fixup_after_fork (HANDLE parent) void fhandler_pty_slave::fixup_after_exec () { - /* Native windows program does not reset event on read. - Therefore, reset here if no input is available. */ - DWORD bytes_in_pipe; - if (!to_be_read_from_pcon () && - bytes_available (bytes_in_pipe) && !bytes_in_pipe) - ResetEvent (input_available_event); - reset_switch_to_pcon (); if (!close_on_exec ()) @@ -2988,6 +3176,33 @@ reply: return 0; } +void +fhandler_pty_master::transfer_input_to_pcon (void) +{ + WaitForSingleObject (input_mutex, INFINITE); + DWORD n; + size_t transfered = 0; + while (::bytes_available (n, from_master_cyg) && n) + { + char buf[1024]; + ReadFile (from_master_cyg, buf, sizeof (buf), &n, 0); + char *p = buf; + while ((p = (char *) memchr (p, '\n', n - (p - buf)))) + *p = '\r'; + if (WriteFile (to_slave, buf, n, &n, 0)) + transfered += n; + } + DWORD bytes_left = eat_readahead (-1); + if (bytes_left) + { + if (WriteFile (to_slave, rabuf (), bytes_left, &n, NULL)) + transfered += n; + } + if (transfered) + get_ttyp ()->pcon_in_empty = false; + ReleaseMutex (input_mutex); +} + static DWORD WINAPI pty_master_thread (VOID *arg) { @@ -3018,6 +3233,15 @@ fhandler_pty_master::pty_master_fwd_thread () if (GetTickCount () - get_ttyp ()->pcon_last_time > time_to_wait) SetEvent (get_ttyp ()->fwd_done); release_output_mutex (); + /* Forcibly transfer input if it is requested by slave. + This happens when input data should be transfered + from the input pipe for cygwin apps to the input pipe + for native apps. */ + if (get_ttyp ()->req_transfer_input_to_pcon) + { + transfer_input_to_pcon (); + get_ttyp ()->req_transfer_input_to_pcon = false; + } Sleep (1); } } diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 5048e549f..b06441c77 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -1195,6 +1195,8 @@ peek_pty_slave (select_record *s, bool from_select) fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh; ptys->reset_switch_to_pcon (); + if (ptys->to_be_read_from_pcon ()) + ptys->update_pcon_input_state (true); if (s->read_selected) { diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index a3d4a0fc8..0663dc5ee 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -247,6 +247,9 @@ tty::init () need_redraw_screen = false; fwd_done = NULL; pcon_last_time = 0; + pcon_in_empty = true; + req_transfer_input_to_pcon = false; + req_flush_pcon_input = false; } HANDLE diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h index 755897d7d..a24afad06 100644 --- a/winsup/cygwin/tty.h +++ b/winsup/cygwin/tty.h @@ -108,6 +108,9 @@ private: bool need_redraw_screen; HANDLE fwd_done; DWORD pcon_last_time; + bool pcon_in_empty; + bool req_transfer_input_to_pcon; + bool req_flush_pcon_input; public: HANDLE from_master () const { return _from_master; } From 2de74af22be0ccf75f094caf48c8beb36a49d8c9 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sun, 9 Feb 2020 23:47:30 +0900 Subject: [PATCH 202/520] Cygwin: pty: Fix state mismatch caused in mintty. - PTY has a bug reported in: https://cygwin.com/ml/cygwin/2020-02/msg00067.html. This is the result of state mismatch between real pseudo console attaching state and state variable. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 16 ++++++++++++++-- winsup/cygwin/fork.cc | 2 ++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index f2fd680ea..260776a56 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -65,6 +65,12 @@ static bool isHybrid; static bool do_not_reset_switch_to_pcon; static bool freeconsole_on_close = true; +void +clear_pcon_attached_to (void) +{ + pcon_attached_to = -1; +} + static void set_switch_to_pcon (void) { @@ -727,7 +733,10 @@ fhandler_pty_slave::~fhandler_pty_slave () { init_console_handler (false); if (freeconsole_on_close) - FreeConsole (); + { + FreeConsole (); + pcon_attached_to = -1; + } } } } @@ -2988,7 +2997,10 @@ fhandler_pty_slave::fixup_after_exec () { init_console_handler (false); if (freeconsole_on_close) - FreeConsole (); + { + FreeConsole (); + pcon_attached_to = -1; + } } } diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index a8f0fb82a..691d08137 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -161,6 +161,8 @@ frok::child (volatile char * volatile here) } } } + extern void clear_pcon_attached_to (void); /* fhandler_tty.cc */ + clear_pcon_attached_to (); HANDLE& hParent = ch.parent; From 2379142bc5d345421acb9e3ac86abcad0d7bf71e Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Mon, 10 Feb 2020 20:42:45 +0900 Subject: [PATCH 203/520] Cygwin: pty: Prevent potential errno overwriting. - In push_to_pcon_screenbuffer(), open() and ioctl() are called. Since push_to_pcon_screenbuffer() is called in read() and write(), errno which is set in read() and write() code may be overwritten in open() or ioctl() call. This patch prevent this situation. --- winsup/cygwin/fhandler_tty.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 260776a56..cfd4b1c44 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1412,10 +1412,13 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len, while (!GetConsoleMode (get_output_handle (), &dwMode)) { termios_printf ("GetConsoleMode failed, %E"); + int errno_save = errno; /* Re-open handles */ this->open (0, 0); /* Fix pseudo console window size */ this->ioctl (TIOCSWINSZ, &get_ttyp ()->winsize); + if (errno != errno_save) + set_errno (errno_save); if (++retry_count > 3) goto cleanup; } From 9b51beeb2af79d2d492e59c853ebabd4560c225a Mon Sep 17 00:00:00 2001 From: Georg Sauthoff Date: Mon, 10 Feb 2020 21:19:58 +0100 Subject: [PATCH 204/520] Only pass the minimum number of syscall arguments Previously, __internal_syscall() compiled into asm-code that unconditionally sets the syscall argument registers a0 to a5. For example, the instruction sequence for a exit syscall looked like this: li a0, 1 # in ther caller of exit() # ... # in newlib: li a1, 0 # unused arguments li a2, 0 li a3, 0 li a4, 0 li a5, 0 li a7, 93 # exit syscall number (i.e. the binary contains then 5 superfluous instructions for this one argument syscall) This commit changes the RISC-V syscall code such that only the required syscall argument registers are set. GCC detects that argc is known at compile time and thus evaluates all the if-statements where argc is used at compile time (tested with -O2 and -Os). --- libgloss/riscv/internal_syscall.h | 43 ++++++++++++++++++++++--------- libgloss/riscv/sys_access.c | 2 +- libgloss/riscv/sys_close.c | 2 +- libgloss/riscv/sys_exit.c | 2 +- libgloss/riscv/sys_faccessat.c | 2 +- libgloss/riscv/sys_fstat.c | 2 +- libgloss/riscv/sys_fstatat.c | 2 +- libgloss/riscv/sys_gettimeofday.c | 2 +- libgloss/riscv/sys_link.c | 2 +- libgloss/riscv/sys_lseek.c | 2 +- libgloss/riscv/sys_lstat.c | 2 +- libgloss/riscv/sys_open.c | 2 +- libgloss/riscv/sys_openat.c | 2 +- libgloss/riscv/sys_read.c | 2 +- libgloss/riscv/sys_sbrk.c | 4 +-- libgloss/riscv/sys_stat.c | 2 +- libgloss/riscv/sys_unlink.c | 2 +- libgloss/riscv/sys_write.c | 2 +- 18 files changed, 49 insertions(+), 30 deletions(-) diff --git a/libgloss/riscv/internal_syscall.h b/libgloss/riscv/internal_syscall.h index e5d559496..1f1f42f5d 100644 --- a/libgloss/riscv/internal_syscall.h +++ b/libgloss/riscv/internal_syscall.h @@ -22,31 +22,50 @@ __syscall_error(long a0) } static inline long -__internal_syscall(long n, long _a0, long _a1, long _a2, long _a3, long _a4, long _a5) +__internal_syscall(long n, int argc, long _a0, long _a1, long _a2, long _a3, long _a4, long _a5) { - register long a0 asm("a0") = _a0; - register long a1 asm("a1") = _a1; - register long a2 asm("a2") = _a2; - register long a3 asm("a3") = _a3; - register long a4 asm("a4") = _a4; - register long a5 asm("a5") = _a5; - #ifdef __riscv_32e register long syscall_id asm("t0") = n; #else register long syscall_id asm("a7") = n; #endif - asm volatile ("scall" - : "+r"(a0) : "r"(a1), "r"(a2), "r"(a3), "r"(a4), "r"(a5), "r"(syscall_id)); + register long a0 asm("a0") = _a0; + if (argc < 2) { + asm volatile ("ecall" : "+r"(a0) : "r"(syscall_id)); + return a0; + } + register long a1 asm("a1") = _a1; + if (argc == 2) { + asm volatile ("ecall" : "+r"(a0) : "r"(a1), "r"(syscall_id)); + return a0; + } + register long a2 asm("a2") = _a2; + if (argc == 3) { + asm volatile ("ecall" : "+r"(a0) : "r"(a1), "r"(a2), "r"(syscall_id)); + return a0; + } + register long a3 asm("a3") = _a3; + if (argc == 4) { + asm volatile ("ecall" : "+r"(a0) : "r"(a1), "r"(a2), "r"(a3), "r"(syscall_id)); + return a0; + } + register long a4 asm("a4") = _a4; + if (argc == 5) { + asm volatile ("ecall" : "+r"(a0) : "r"(a1), "r"(a2), "r"(a3), "r"(a4), "r"(syscall_id)); + return a0; + } + register long a5 asm("a5") = _a5; + + asm volatile ("ecall" : "+r"(a0) : "r"(a1), "r"(a2), "r"(a3), "r"(a4), "r"(a5), "r"(syscall_id)); return a0; } static inline long -syscall_errno(long n, long _a0, long _a1, long _a2, long _a3, long _a4, long _a5) +syscall_errno(long n, int argc, long _a0, long _a1, long _a2, long _a3, long _a4, long _a5) { - long a0 = __internal_syscall (n, _a0, _a1, _a2, _a3, _a4, _a5); + long a0 = __internal_syscall (n, argc, _a0, _a1, _a2, _a3, _a4, _a5); if (a0 < 0) return __syscall_error (a0); diff --git a/libgloss/riscv/sys_access.c b/libgloss/riscv/sys_access.c index ef446d29b..45bedb3f6 100644 --- a/libgloss/riscv/sys_access.c +++ b/libgloss/riscv/sys_access.c @@ -5,5 +5,5 @@ int _access(const char *file, int mode) { - return syscall_errno (SYS_access, file, mode, 0, 0, 0, 0); + return syscall_errno (SYS_access, 2, file, mode, 0, 0, 0, 0); } diff --git a/libgloss/riscv/sys_close.c b/libgloss/riscv/sys_close.c index 80b10c66a..c1691d826 100644 --- a/libgloss/riscv/sys_close.c +++ b/libgloss/riscv/sys_close.c @@ -5,5 +5,5 @@ int _close(int file) { - return syscall_errno (SYS_close, file, 0, 0, 0, 0, 0); + return syscall_errno (SYS_close, 1, file, 0, 0, 0, 0, 0); } diff --git a/libgloss/riscv/sys_exit.c b/libgloss/riscv/sys_exit.c index 03e1c34e8..995dd6502 100644 --- a/libgloss/riscv/sys_exit.c +++ b/libgloss/riscv/sys_exit.c @@ -5,6 +5,6 @@ void _exit(int exit_status) { - syscall_errno (SYS_exit, exit_status, 0, 0, 0, 0, 0); + syscall_errno (SYS_exit, 1, exit_status, 0, 0, 0, 0, 0); while (1); } diff --git a/libgloss/riscv/sys_faccessat.c b/libgloss/riscv/sys_faccessat.c index e966a4a78..6418ef423 100644 --- a/libgloss/riscv/sys_faccessat.c +++ b/libgloss/riscv/sys_faccessat.c @@ -4,5 +4,5 @@ /* Permissions of a file (by name) in a given directory. */ int _faccessat(int dirfd, const char *file, int mode, int flags) { - return syscall_errno (SYS_faccessat, dirfd, file, mode, flags, 0, 0); + return syscall_errno (SYS_faccessat, 4, dirfd, file, mode, flags, 0, 0); } diff --git a/libgloss/riscv/sys_fstat.c b/libgloss/riscv/sys_fstat.c index 13a0bca2f..d97ba445e 100644 --- a/libgloss/riscv/sys_fstat.c +++ b/libgloss/riscv/sys_fstat.c @@ -9,7 +9,7 @@ int _fstat(int file, struct stat *st) { struct kernel_stat kst; - int rv = syscall_errno (SYS_fstat, file, &kst, 0, 0, 0, 0); + int rv = syscall_errno (SYS_fstat, 2, file, &kst, 0, 0, 0, 0); _conv_stat (st, &kst); return rv; } diff --git a/libgloss/riscv/sys_fstatat.c b/libgloss/riscv/sys_fstatat.c index 0e4ea42d0..bf0335513 100644 --- a/libgloss/riscv/sys_fstatat.c +++ b/libgloss/riscv/sys_fstatat.c @@ -8,7 +8,7 @@ int _fstatat(int dirfd, const char *file, struct stat *st, int flags) { struct kernel_stat kst; - int rv = syscall_errno (SYS_fstatat, dirfd, file, &kst, flags, 0, 0); + int rv = syscall_errno (SYS_fstatat, 4, dirfd, file, &kst, flags, 0, 0); _conv_stat (st, &kst); return rv; } diff --git a/libgloss/riscv/sys_gettimeofday.c b/libgloss/riscv/sys_gettimeofday.c index 457dcbcc7..daa14e475 100644 --- a/libgloss/riscv/sys_gettimeofday.c +++ b/libgloss/riscv/sys_gettimeofday.c @@ -6,5 +6,5 @@ int _gettimeofday(struct timeval *tp, void *tzp) { - return syscall_errno (SYS_gettimeofday, tp, 0, 0, 0, 0, 0); + return syscall_errno (SYS_gettimeofday, 1, tp, 0, 0, 0, 0, 0); } diff --git a/libgloss/riscv/sys_link.c b/libgloss/riscv/sys_link.c index eaeb22b25..83cd1b239 100644 --- a/libgloss/riscv/sys_link.c +++ b/libgloss/riscv/sys_link.c @@ -4,5 +4,5 @@ /* Establish a new name for an existing file. */ int _link(const char *old_name, const char *new_name) { - return syscall_errno (SYS_link, old_name, new_name, 0, 0, 0, 0); + return syscall_errno (SYS_link, 2, old_name, new_name, 0, 0, 0, 0); } diff --git a/libgloss/riscv/sys_lseek.c b/libgloss/riscv/sys_lseek.c index 7486a3a3e..8eb8b8131 100644 --- a/libgloss/riscv/sys_lseek.c +++ b/libgloss/riscv/sys_lseek.c @@ -6,5 +6,5 @@ off_t _lseek(int file, off_t ptr, int dir) { - return syscall_errno (SYS_lseek, file, ptr, dir, 0, 0, 0); + return syscall_errno (SYS_lseek, 3, file, ptr, dir, 0, 0, 0); } diff --git a/libgloss/riscv/sys_lstat.c b/libgloss/riscv/sys_lstat.c index 2eeabcce3..dd5dc5268 100644 --- a/libgloss/riscv/sys_lstat.c +++ b/libgloss/riscv/sys_lstat.c @@ -7,7 +7,7 @@ int _lstat(const char *file, struct stat *st) { struct kernel_stat kst; - int rv = syscall_errno (SYS_lstat, file, &kst, 0, 0, 0, 0); + int rv = syscall_errno (SYS_lstat, 2, file, &kst, 0, 0, 0, 0); _conv_stat (st, &kst); return rv; } diff --git a/libgloss/riscv/sys_open.c b/libgloss/riscv/sys_open.c index 4fd5d672f..eb1a99ba2 100644 --- a/libgloss/riscv/sys_open.c +++ b/libgloss/riscv/sys_open.c @@ -5,5 +5,5 @@ int _open(const char *name, int flags, int mode) { - return syscall_errno (SYS_open, name, flags, mode, 0, 0, 0); + return syscall_errno (SYS_open, 3, name, flags, mode, 0, 0, 0); } diff --git a/libgloss/riscv/sys_openat.c b/libgloss/riscv/sys_openat.c index cf429b7b2..652ab2ea7 100644 --- a/libgloss/riscv/sys_openat.c +++ b/libgloss/riscv/sys_openat.c @@ -4,5 +4,5 @@ /* Open file relative to given directory. */ int _openat(int dirfd, const char *name, int flags, int mode) { - return syscall_errno (SYS_openat, dirfd, name, flags, mode, 0, 0); + return syscall_errno (SYS_openat, 4, dirfd, name, flags, mode, 0, 0); } diff --git a/libgloss/riscv/sys_read.c b/libgloss/riscv/sys_read.c index 7367e2643..dd3bc339c 100644 --- a/libgloss/riscv/sys_read.c +++ b/libgloss/riscv/sys_read.c @@ -5,5 +5,5 @@ /* Read from a file. */ ssize_t _read(int file, void *ptr, size_t len) { - return syscall_errno (SYS_read, file, ptr, len, 0, 0, 0); + return syscall_errno (SYS_read, 3, file, ptr, len, 0, 0, 0); } diff --git a/libgloss/riscv/sys_sbrk.c b/libgloss/riscv/sys_sbrk.c index f91c2c506..086509efa 100644 --- a/libgloss/riscv/sys_sbrk.c +++ b/libgloss/riscv/sys_sbrk.c @@ -41,13 +41,13 @@ _sbrk(ptrdiff_t incr) if (heap_end == 0) { - long brk = __internal_syscall (SYS_brk, 0, 0, 0, 0, 0, 0); + long brk = __internal_syscall (SYS_brk, 1, 0, 0, 0, 0, 0, 0); if (brk == -1) return (void *)__syscall_error (-ENOMEM); heap_end = brk; } - if (__internal_syscall (SYS_brk, heap_end + incr, 0, 0, 0, 0, 0) != heap_end + incr) + if (__internal_syscall (SYS_brk, 1, heap_end + incr, 0, 0, 0, 0, 0) != heap_end + incr) return (void *)__syscall_error (-ENOMEM); heap_end += incr; diff --git a/libgloss/riscv/sys_stat.c b/libgloss/riscv/sys_stat.c index a193b10ad..1e03700df 100644 --- a/libgloss/riscv/sys_stat.c +++ b/libgloss/riscv/sys_stat.c @@ -8,7 +8,7 @@ int _stat(const char *file, struct stat *st) { struct kernel_stat kst; - int rv = syscall_errno (SYS_stat, file, &kst, 0, 0, 0, 0); + int rv = syscall_errno (SYS_stat, 2, file, &kst, 0, 0, 0, 0); _conv_stat (st, &kst); return rv; } diff --git a/libgloss/riscv/sys_unlink.c b/libgloss/riscv/sys_unlink.c index b55fe1ec2..1cf6bbe8b 100644 --- a/libgloss/riscv/sys_unlink.c +++ b/libgloss/riscv/sys_unlink.c @@ -5,5 +5,5 @@ int _unlink(const char *name) { - return syscall_errno (SYS_unlink, name, 0, 0, 0, 0, 0); + return syscall_errno (SYS_unlink, 1, name, 0, 0, 0, 0, 0); } diff --git a/libgloss/riscv/sys_write.c b/libgloss/riscv/sys_write.c index b972734e2..ce2edd36a 100644 --- a/libgloss/riscv/sys_write.c +++ b/libgloss/riscv/sys_write.c @@ -6,5 +6,5 @@ ssize_t _write(int file, const void *ptr, size_t len) { - return syscall_errno (SYS_write, file, ptr, len, 0, 0, 0); + return syscall_errno (SYS_write, 3, file, ptr, len, 0, 0, 0); } From 8cb20fa5d3d3b8ee4d61360390e5192c1eba0a1c Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Tue, 11 Feb 2020 02:45:14 +0900 Subject: [PATCH 205/520] Cygwin: pty: Add error handling in setup_pseudoconsole(). - In setup_pseudoconsole(), many error handling was omitted. This patch adds missing error handling. --- winsup/cygwin/fhandler_tty.cc | 179 +++++++++++++++++++++------------- 1 file changed, 111 insertions(+), 68 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index cfd4b1c44..153bdad79 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -3413,7 +3413,10 @@ fhandler_pty_master::setup_pseudoconsole () process in a pseudo console and get them from the helper. Slave process will attach to the pseudo console in the helper process using AttachConsole(). */ - COORD size = {80, 25}; + COORD size = { + (SHORT) get_ttyp ()->winsize.ws_col, + (SHORT) get_ttyp ()->winsize.ws_row + }; CreatePipe (&from_master, &to_slave, &sec_none, 0); SetLastError (ERROR_SUCCESS); HRESULT res = CreatePseudoConsole (size, from_master, to_master, @@ -3423,12 +3426,7 @@ fhandler_pty_master::setup_pseudoconsole () if (res != S_OK) system_printf ("CreatePseudoConsole() failed. %08x\n", GetLastError ()); - CloseHandle (from_master); - CloseHandle (to_slave); - from_master = from_master_cyg; - to_slave = NULL; - get_ttyp ()->h_pseudo_console = NULL; - return false; + goto fallback; } /* If master process is running as service, attaching to @@ -3439,69 +3437,82 @@ fhandler_pty_master::setup_pseudoconsole () if (is_running_as_service ()) get_ttyp ()->attach_pcon_in_fork = true; - SIZE_T bytesRequired; - InitializeProcThreadAttributeList (NULL, 2, 0, &bytesRequired); STARTUPINFOEXW si_helper; - ZeroMemory (&si_helper, sizeof (si_helper)); - si_helper.StartupInfo.cb = sizeof (STARTUPINFOEXW); - si_helper.lpAttributeList = (PPROC_THREAD_ATTRIBUTE_LIST) - HeapAlloc (GetProcessHeap (), 0, bytesRequired); - InitializeProcThreadAttributeList (si_helper.lpAttributeList, - 2, 0, &bytesRequired); - UpdateProcThreadAttribute (si_helper.lpAttributeList, - 0, - PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE, - get_ttyp ()->h_pseudo_console, - sizeof (get_ttyp ()->h_pseudo_console), - NULL, NULL); - HANDLE hello = CreateEvent (&sec_none, true, false, NULL); - HANDLE goodbye = CreateEvent (&sec_none, true, false, NULL); - /* Create a pipe for receiving pseudo console handles */ + HANDLE hello, goodbye; HANDLE hr, hw; - CreatePipe (&hr, &hw, &sec_none, 0); - /* Inherit only handles which are needed by helper. */ - HANDLE handles_to_inherit[] = {hello, goodbye, hw}; - UpdateProcThreadAttribute (si_helper.lpAttributeList, - 0, - PROC_THREAD_ATTRIBUTE_HANDLE_LIST, - handles_to_inherit, - sizeof (handles_to_inherit), - NULL, NULL); - /* Create helper process */ - WCHAR cmd[MAX_PATH]; - path_conv helper ("/bin/cygwin-console-helper.exe"); - size_t len = helper.get_wide_win32_path_len (); - helper.get_wide_win32_path (cmd); - __small_swprintf (cmd + len, L" %p %p %p", hello, goodbye, hw); - si_helper.StartupInfo.dwFlags = STARTF_USESTDHANDLES; - si_helper.StartupInfo.hStdInput = NULL; - si_helper.StartupInfo.hStdOutput = NULL; - si_helper.StartupInfo.hStdError = NULL; PROCESS_INFORMATION pi_helper; - CreateProcessW (NULL, cmd, &sec_none, &sec_none, - TRUE, EXTENDED_STARTUPINFO_PRESENT, - NULL, NULL, &si_helper.StartupInfo, &pi_helper); - WaitForSingleObject (hello, INFINITE); - CloseHandle (hello); - CloseHandle (pi_helper.hThread); - /* Retrieve pseudo console handles */ - DWORD rLen; - char buf[64]; - ReadFile (hr, buf, sizeof (buf), &rLen, NULL); - buf[rLen] = '\0'; HANDLE hpConIn, hpConOut; - sscanf (buf, "StdHandles=%p,%p", &hpConIn, &hpConOut); - DuplicateHandle (pi_helper.hProcess, hpConIn, - GetCurrentProcess (), &hpConIn, 0, - TRUE, DUPLICATE_SAME_ACCESS); - DuplicateHandle (pi_helper.hProcess, hpConOut, - GetCurrentProcess (), &hpConOut, 0, - TRUE, DUPLICATE_SAME_ACCESS); - CloseHandle (hr); - CloseHandle (hw); - /* Clean up */ - DeleteProcThreadAttributeList (si_helper.lpAttributeList); - HeapFree (GetProcessHeap (), 0, si_helper.lpAttributeList); + { + SIZE_T bytesRequired; + InitializeProcThreadAttributeList (NULL, 2, 0, &bytesRequired); + ZeroMemory (&si_helper, sizeof (si_helper)); + si_helper.StartupInfo.cb = sizeof (STARTUPINFOEXW); + si_helper.lpAttributeList = (PPROC_THREAD_ATTRIBUTE_LIST) + HeapAlloc (GetProcessHeap (), 0, bytesRequired); + if (si_helper.lpAttributeList == NULL) + goto cleanup_pseudo_console; + if (!InitializeProcThreadAttributeList (si_helper.lpAttributeList, + 2, 0, &bytesRequired)) + goto cleanup_heap; + if (!UpdateProcThreadAttribute (si_helper.lpAttributeList, + 0, + PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE, + get_ttyp ()->h_pseudo_console, + sizeof (get_ttyp ()->h_pseudo_console), + NULL, NULL)) + goto cleanup_heap; + /* Create events for start/stop helper process. */ + hello = CreateEvent (&sec_none, true, false, NULL); + goodbye = CreateEvent (&sec_none, true, false, NULL); + /* Create a pipe for receiving pseudo console handles */ + CreatePipe (&hr, &hw, &sec_none, 0); + /* Inherit only handles which are needed by helper. */ + HANDLE handles_to_inherit[] = {hello, goodbye, hw}; + if (!UpdateProcThreadAttribute (si_helper.lpAttributeList, + 0, + PROC_THREAD_ATTRIBUTE_HANDLE_LIST, + handles_to_inherit, + sizeof (handles_to_inherit), + NULL, NULL)) + goto cleanup_event_and_pipes; + /* Create helper process */ + WCHAR cmd[MAX_PATH]; + path_conv helper ("/bin/cygwin-console-helper.exe"); + size_t len = helper.get_wide_win32_path_len (); + helper.get_wide_win32_path (cmd); + __small_swprintf (cmd + len, L" %p %p %p", hello, goodbye, hw); + si_helper.StartupInfo.dwFlags = STARTF_USESTDHANDLES; + si_helper.StartupInfo.hStdInput = NULL; + si_helper.StartupInfo.hStdOutput = NULL; + si_helper.StartupInfo.hStdError = NULL; + if (!CreateProcessW (NULL, cmd, &sec_none, &sec_none, + TRUE, EXTENDED_STARTUPINFO_PRESENT, + NULL, NULL, &si_helper.StartupInfo, &pi_helper)) + goto cleanup_event_and_pipes; + WaitForSingleObject (hello, INFINITE); + CloseHandle (hello); + CloseHandle (pi_helper.hThread); + /* Retrieve pseudo console handles */ + DWORD rLen; + char buf[64]; + if (!ReadFile (hr, buf, sizeof (buf), &rLen, NULL)) + goto cleanup_helper_process; + buf[rLen] = '\0'; + sscanf (buf, "StdHandles=%p,%p", &hpConIn, &hpConOut); + if (!DuplicateHandle (pi_helper.hProcess, hpConIn, + GetCurrentProcess (), &hpConIn, 0, + TRUE, DUPLICATE_SAME_ACCESS)) + goto cleanup_helper_process; + if (!DuplicateHandle (pi_helper.hProcess, hpConOut, + GetCurrentProcess (), &hpConOut, 0, + TRUE, DUPLICATE_SAME_ACCESS)) + goto cleanup_pcon_in; + CloseHandle (hr); + CloseHandle (hw); + /* Clean up */ + DeleteProcThreadAttributeList (si_helper.lpAttributeList); + HeapFree (GetProcessHeap (), 0, si_helper.lpAttributeList); + } /* Setting information of stuffs regarding pseudo console */ get_ttyp ()->h_helper_goodbye = goodbye; get_ttyp ()->h_helper_process = pi_helper.hProcess; @@ -3510,7 +3521,38 @@ fhandler_pty_master::setup_pseudoconsole () CloseHandle (to_master); from_master = hpConIn; to_master = hpConOut; + ResizePseudoConsole (get_ttyp ()->h_pseudo_console, size); return true; + +cleanup_pcon_in: + CloseHandle (hpConIn); +cleanup_helper_process: + SetEvent (goodbye); + WaitForSingleObject (pi_helper.hProcess, INFINITE); + CloseHandle (pi_helper.hProcess); + goto skip_close_hello; +cleanup_event_and_pipes: + CloseHandle (hello); +skip_close_hello: + CloseHandle (goodbye); + CloseHandle (hr); + CloseHandle (hw); +cleanup_heap: + HeapFree (GetProcessHeap (), 0, si_helper.lpAttributeList); +cleanup_pseudo_console: + { + HPCON_INTERNAL *hp = (HPCON_INTERNAL *) get_ttyp ()->h_pseudo_console; + HANDLE tmp = hp->hConHostProcess; + ClosePseudoConsole (get_pseudo_console ()); + CloseHandle (tmp); + } +fallback: + CloseHandle (from_master); + CloseHandle (to_slave); + from_master = from_master_cyg; + to_slave = NULL; + get_ttyp ()->h_pseudo_console = NULL; + return false; } bool @@ -3629,14 +3671,15 @@ fhandler_pty_master::setup () } get_ttyp ()->fwd_done = CreateEvent (&sec_none, true, false, NULL); + t.winsize.ws_col = 80; + t.winsize.ws_row = 25; + setup_pseudoconsole (); t.set_from_master (from_master); t.set_from_master_cyg (from_master_cyg); t.set_to_master (to_master); t.set_to_master_cyg (to_master_cyg); - t.winsize.ws_col = 80; - t.winsize.ws_row = 25; t.master_pid = myself->pid; dev ().parse (DEV_PTYM_MAJOR, unit); From bb25dd1b0f39f343b764fd0db861cb9a30441407 Mon Sep 17 00:00:00 2001 From: Nicolas Brunie Date: Fri, 14 Feb 2020 10:12:25 +0100 Subject: [PATCH 206/520] pow: fix pow(-1.0, NaN) I think I may have encountered a bug in the implementation of pow: pow(-1.0, NaN) returns 1.0 when it should return NaN. Because ix is used to check input vs 1.0 rather than hx, -1.0 is mistaken for 1.0 --- newlib/libm/math/e_pow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libm/math/e_pow.c b/newlib/libm/math/e_pow.c index 6d2a501a1..5fd28e65f 100644 --- a/newlib/libm/math/e_pow.c +++ b/newlib/libm/math/e_pow.c @@ -122,7 +122,7 @@ ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/ /* x|y==NaN return NaN unless x==1 then return 1 */ if(ix > 0x7ff00000 || ((ix==0x7ff00000)&&(lx!=0)) || iy > 0x7ff00000 || ((iy==0x7ff00000)&&(ly!=0))) { - if(((ix-0x3ff00000)|lx)==0) return one; + if(((hx-0x3ff00000)|lx)==0) return one; else return nan(""); } From 774b8996d1f3e535e8267be4eb8e751d756c2cec Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Mon, 17 Feb 2020 19:29:07 +0900 Subject: [PATCH 207/520] Cygwin: console: Change timing of set/unset xterm compatible mode. - If two cygwin programs are executed simultaneousley with pipes in cmd.exe, xterm compatible mode is accidentally disabled by the process which ends first. After that, escape sequences are not handled correctly in the other app. This is the problem 2 reported in https://cygwin.com/ml/cygwin/2020-02/msg00116.html. This patch fixes the issue. This patch also fixes the problem 3. For these issues, the timing of setting and unsetting xterm compatible mode is changed. For read, xterm compatible mode is enabled only within read() or select() functions. For write, it is enabled every time write() is called, and restored on close(). --- winsup/cygwin/fhandler_console.cc | 101 +++++++++++++++--------------- winsup/cygwin/select.cc | 32 +++++++++- winsup/cygwin/spawn.cc | 23 +++---- 3 files changed, 89 insertions(+), 67 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 38eed05f4..2afb5c529 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -53,7 +53,6 @@ fhandler_console::console_state NO_COPY *fhandler_console::shared_console_info; bool NO_COPY fhandler_console::invisible_console; -static DWORD orig_conin_mode = (DWORD) -1; static DWORD orig_conout_mode = (DWORD) -1; /* con_ra is shared in the same process. @@ -361,6 +360,9 @@ fix_tab_position (HANDLE h, SHORT width) __small_sprintf (buf+strlen (buf), "\033[%d;%dH\033H", 1, col+1); /* Restore cursor position */ __small_sprintf (buf+strlen (buf), "\0338"); + DWORD dwMode; + GetConsoleMode (h, &dwMode); + SetConsoleMode (h, dwMode | ENABLE_VIRTUAL_TERMINAL_PROCESSING); DWORD dwLen; WriteConsole (h, buf, strlen (buf), &dwLen, 0); } @@ -425,12 +427,19 @@ fhandler_console::read (void *pv, size_t& buflen) set_input_state (); + DWORD dwMode; + GetConsoleMode (get_handle (), &dwMode); + /* if system has 24 bit color capability, use xterm compatible mode. */ + if (wincap.has_con_24bit_colors () && !con_is_legacy) + SetConsoleMode (get_handle (), dwMode | ENABLE_VIRTUAL_TERMINAL_INPUT); + while (!input_ready && !get_cons_readahead_valid ()) { int bgres; if ((bgres = bg_check (SIGTTIN)) <= bg_eof) { buflen = bgres; + SetConsoleMode (get_handle (), dwMode); /* Restore */ return; } @@ -448,6 +457,7 @@ fhandler_console::read (void *pv, size_t& buflen) case WAIT_TIMEOUT: set_sig_errno (EAGAIN); buflen = (size_t) -1; + SetConsoleMode (get_handle (), dwMode); /* Restore */ return; default: goto err; @@ -495,30 +505,24 @@ fhandler_console::read (void *pv, size_t& buflen) #undef buf buflen = copied_chars; + SetConsoleMode (get_handle (), dwMode); /* Restore */ return; err: __seterrno (); buflen = (size_t) -1; + SetConsoleMode (get_handle (), dwMode); /* Restore */ return; sig_exit: set_sig_errno (EINTR); buflen = (size_t) -1; + SetConsoleMode (get_handle (), dwMode); /* Restore */ } fhandler_console::input_states fhandler_console::process_input_message (void) { - if (wincap.has_con_24bit_colors () && !con_is_legacy) - { - DWORD dwMode; - /* Enable xterm compatible mode in input */ - GetConsoleMode (get_handle (), &dwMode); - dwMode |= ENABLE_VIRTUAL_TERMINAL_INPUT; - SetConsoleMode (get_handle (), dwMode); - } - char tmp[60]; if (!shared_console_info) @@ -1047,29 +1051,26 @@ fhandler_console::open (int flags, mode_t) get_ttyp ()->rstcons (false); set_open_status (); - if (orig_conin_mode == (DWORD) -1) - GetConsoleMode (get_handle (), &orig_conin_mode); if (orig_conout_mode == (DWORD) -1) GetConsoleMode (get_output_handle (), &orig_conout_mode); if (getpid () == con.owner && wincap.has_con_24bit_colors ()) { + bool is_legacy = false; DWORD dwMode; - /* Enable xterm compatible mode in output */ + /* Check xterm compatible mode in output */ GetConsoleMode (get_output_handle (), &dwMode); - dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; - if (!SetConsoleMode (get_output_handle (), dwMode)) - con.is_legacy = true; - else - con.is_legacy = false; - /* Enable xterm compatible mode in input */ - if (!con_is_legacy) - { - GetConsoleMode (get_handle (), &dwMode); - dwMode |= ENABLE_VIRTUAL_TERMINAL_INPUT; - if (!SetConsoleMode (get_handle (), dwMode)) - con.is_legacy = true; - } + if (!SetConsoleMode (get_output_handle (), + dwMode | ENABLE_VIRTUAL_TERMINAL_PROCESSING)) + is_legacy = true; + SetConsoleMode (get_output_handle (), dwMode); + /* Check xterm compatible mode in input */ + GetConsoleMode (get_handle (), &dwMode); + if (!SetConsoleMode (get_handle (), + dwMode | ENABLE_VIRTUAL_TERMINAL_INPUT)) + is_legacy = true; + SetConsoleMode (get_handle (), dwMode); + con.is_legacy = is_legacy; extern int sawTERM; if (con_is_legacy && !sawTERM) setenv ("TERM", "cygwin", 1); @@ -1102,19 +1103,12 @@ fhandler_console::close () { debug_printf ("closing: %p, %p", get_handle (), get_output_handle ()); - CloseHandle (input_mutex); - input_mutex = NULL; - CloseHandle (output_mutex); - output_mutex = NULL; + acquire_output_mutex (INFINITE); if (shared_console_info && getpid () == con.owner && wincap.has_con_24bit_colors () && !con_is_legacy) { DWORD dwMode; - /* Disable xterm compatible mode in input */ - GetConsoleMode (get_handle (), &dwMode); - dwMode &= ~ENABLE_VIRTUAL_TERMINAL_INPUT; - SetConsoleMode (get_handle (), dwMode); /* Disable xterm compatible mode in output */ GetConsoleMode (get_output_handle (), &dwMode); dwMode &= ~ENABLE_VIRTUAL_TERMINAL_PROCESSING; @@ -1127,12 +1121,15 @@ fhandler_console::close () status = NtQueryObject (get_handle (), ObjectBasicInformation, &obi, sizeof obi, NULL); if (NT_SUCCESS (status) && obi.HandleCount == 1) - { - if (orig_conin_mode != (DWORD) -1) - SetConsoleMode (get_handle (), orig_conin_mode); - if (orig_conout_mode != (DWORD) -1) - SetConsoleMode (get_handle (), orig_conout_mode); - } + if (orig_conout_mode != (DWORD) -1) + SetConsoleMode (get_handle (), orig_conout_mode); + + release_output_mutex (); + + CloseHandle (input_mutex); + input_mutex = NULL; + CloseHandle (output_mutex); + output_mutex = NULL; CloseHandle (get_handle ()); CloseHandle (get_output_handle ()); @@ -1270,13 +1267,6 @@ fhandler_console::output_tcsetattr (int, struct termios const *t) acquire_output_mutex (INFINITE); DWORD flags = ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT; - /* If system has 24 bit color capability, use xterm compatible mode. */ - if (wincap.has_con_24bit_colors () && !con_is_legacy) - { - flags |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; - if (!(t->c_oflag & OPOST) || !(t->c_oflag & ONLCR)) - flags |= DISABLE_NEWLINE_AUTO_RETURN; - } int res = SetConsoleMode (get_output_handle (), flags) ? 0 : -1; if (res) @@ -1338,9 +1328,6 @@ fhandler_console::input_tcsetattr (int, struct termios const *t) flags |= ENABLE_WINDOW_INPUT | ((wincap.has_con_24bit_colors () && !con_is_legacy) ? 0 : ENABLE_MOUSE_INPUT); - /* if system has 24 bit color capability, use xterm compatible mode. */ - if (wincap.has_con_24bit_colors () && !con_is_legacy) - flags |= ENABLE_VIRTUAL_TERMINAL_INPUT; int res; if (flags == oflags) @@ -2716,6 +2703,20 @@ fhandler_console::write (const void *vsrc, size_t len) push_process_state process_state (PID_TTYOU); acquire_output_mutex (INFINITE); + /* If system has 24 bit color capability, use xterm compatible mode. */ + if (wincap.has_con_24bit_colors () && !con_is_legacy) + { + DWORD dwMode; + GetConsoleMode (get_output_handle (), &dwMode); + dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; + if (!(get_ttyp ()->ti.c_oflag & OPOST) || + !(get_ttyp ()->ti.c_oflag & ONLCR)) + dwMode |= DISABLE_NEWLINE_AUTO_RETURN; + else + dwMode &= ~DISABLE_NEWLINE_AUTO_RETURN; + SetConsoleMode (get_output_handle (), dwMode); + } + /* Run and check for ansi sequences */ unsigned const char *src = (unsigned char *) vsrc; unsigned const char *end = src + len; diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index b06441c77..f3e3e4482 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -1075,19 +1075,49 @@ verify_console (select_record *me, fd_set *rfds, fd_set *wfds, return peek_console (me, true); } +static int +console_startup (select_record *me, select_stuff *stuff) +{ + select_record *s = stuff->start.next; + if (wincap.has_con_24bit_colors ()) + { + DWORD dwMode; + GetConsoleMode (s->h, &dwMode); + /* Enable xterm compatible mode in input */ + dwMode |= ENABLE_VIRTUAL_TERMINAL_INPUT; + SetConsoleMode (s->h, dwMode); + } + return 1; +} + +static void +console_cleanup (select_record *me, select_stuff *stuff) +{ + select_record *s = stuff->start.next; + if (wincap.has_con_24bit_colors ()) + { + DWORD dwMode; + GetConsoleMode (s->h, &dwMode); + /* Disable xterm compatible mode in input */ + dwMode &= ~ENABLE_VIRTUAL_TERMINAL_INPUT; + SetConsoleMode (s->h, dwMode); + } +} + select_record * fhandler_console::select_read (select_stuff *ss) { select_record *s = ss->start.next; if (!s->startup) { - s->startup = no_startup; + s->startup = console_startup; s->verify = verify_console; set_cursor_maybe (); } s->peek = peek_console; s->h = get_handle (); + s->cleanup = console_cleanup; s->read_selected = true; s->read_ready = input_ready || get_cons_readahead_valid (); return s; diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index f7c6dd590..772fe6dd6 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -615,22 +615,13 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, { attach_to_console = true; if (wincap.has_con_24bit_colors () && !iscygwin ()) - { - DWORD dwMode; - if (fd == 0) - { - /* Disable xterm compatible mode in input */ - GetConsoleMode (fh->get_handle (), &dwMode); - dwMode &= ~ENABLE_VIRTUAL_TERMINAL_INPUT; - SetConsoleMode (fh->get_handle (), dwMode); - } - else - { - GetConsoleMode (fh->get_output_handle (), &dwMode); - dwMode &= ~ENABLE_VIRTUAL_TERMINAL_PROCESSING; - SetConsoleMode (fh->get_output_handle (), dwMode); - } - } + if (fd == 1 || fd == 2) + { + DWORD dwMode; + GetConsoleMode (fh->get_output_handle (), &dwMode); + dwMode &= ~ENABLE_VIRTUAL_TERMINAL_PROCESSING; + SetConsoleMode (fh->get_output_handle (), dwMode); + } } } From 6afb1ba5044a309063065b82d08a22fbbc9ef5de Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 17 Feb 2020 13:56:44 +0100 Subject: [PATCH 208/520] Cygwin: Bump DLL version to 3.1.4 Signed-off-by: Corinna Vinschen --- winsup/cygwin/include/cygwin/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 7041e9abb..63a936da4 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -11,7 +11,7 @@ details. */ changes to the DLL and is mainly informative in nature. */ #define CYGWIN_VERSION_DLL_MAJOR 3001 -#define CYGWIN_VERSION_DLL_MINOR 3 +#define CYGWIN_VERSION_DLL_MINOR 4 /* Major numbers before CYGWIN_VERSION_DLL_EPOCH are incompatible. */ From c16e73043ee4249871bd2113dc71dac0b7c08c90 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Mon, 17 Feb 2020 21:46:27 +0900 Subject: [PATCH 209/520] Cygwin: console: Fix code for restoring console mode. - Commit 774b8996d1f3e535e8267be4eb8e751d756c2cec has a bug that restores console output mode into console input. This patch fixes the issue. --- winsup/cygwin/fhandler_console.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 2afb5c529..9bfee64d3 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1122,7 +1122,7 @@ fhandler_console::close () &obi, sizeof obi, NULL); if (NT_SUCCESS (status) && obi.HandleCount == 1) if (orig_conout_mode != (DWORD) -1) - SetConsoleMode (get_handle (), orig_conout_mode); + SetConsoleMode (get_output_handle (), orig_conout_mode); release_output_mutex (); From f3793803a7dcdaa8319a30bea26dd4f9c9507559 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 18 Feb 2020 11:19:23 +0100 Subject: [PATCH 210/520] Cygwin: move 3.1.3 to 3.1.4 release document Signed-off-by: Corinna Vinschen --- winsup/cygwin/release/3.1.3 | 34 +--------------------------------- winsup/cygwin/release/3.1.4 | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 33 deletions(-) create mode 100644 winsup/cygwin/release/3.1.4 diff --git a/winsup/cygwin/release/3.1.3 b/winsup/cygwin/release/3.1.3 index 06ed1eb57..6b8a59f28 100644 --- a/winsup/cygwin/release/3.1.3 +++ b/winsup/cygwin/release/3.1.3 @@ -1,33 +1 @@ -What changed: -------------- - -- Allow symlinks to be opened with O_PATH | O_NOFOLLOW. - -- Allow the pathname argument to readlinkat(2) to be an empty string, - provided the dirfd argument refers to a symlink opened with - O_PATH | O_NOFOLLOW. The readlinkat call then operates on that - symlink. - -- Support the Linux-specific AT_EMPTY_PATH flag for fchownat(2) and - fstatat(2). - -- Allow AF_LOCAL sockets to be opened with O_PATH. - -Bug Fixes: ----------- - -- Define CPU_SETSIZE, as on Linux. - Addresses: https://cygwin.com/ml/cygwin/2019-12/msg00248.html - -- Fix a regression that prevented the root of a drive from being the - Cygwin installation root. - Addresses: https://cygwin.com/ml/cygwin/2020-01/msg00111.html - -- Many fixes in new pseudo console support. - Addresses (among others): - https://cygwin.com/ml/cygwin/2019-12/msg00173.html - https://cygwin.com/ml/cygwin/2019-12/msg00292.html - https://cygwin.com/ml/cygwin/2019-12/msg00295.html - https://cygwin.com/ml/cygwin/2020-01/msg00093.html - https://cygwin.com/ml/cygwin/2020-01/msg00147.html - https://cygwin.com/ml/cygwin/2020-01/msg00161.html +This release has been skipped diff --git a/winsup/cygwin/release/3.1.4 b/winsup/cygwin/release/3.1.4 new file mode 100644 index 000000000..06ed1eb57 --- /dev/null +++ b/winsup/cygwin/release/3.1.4 @@ -0,0 +1,33 @@ +What changed: +------------- + +- Allow symlinks to be opened with O_PATH | O_NOFOLLOW. + +- Allow the pathname argument to readlinkat(2) to be an empty string, + provided the dirfd argument refers to a symlink opened with + O_PATH | O_NOFOLLOW. The readlinkat call then operates on that + symlink. + +- Support the Linux-specific AT_EMPTY_PATH flag for fchownat(2) and + fstatat(2). + +- Allow AF_LOCAL sockets to be opened with O_PATH. + +Bug Fixes: +---------- + +- Define CPU_SETSIZE, as on Linux. + Addresses: https://cygwin.com/ml/cygwin/2019-12/msg00248.html + +- Fix a regression that prevented the root of a drive from being the + Cygwin installation root. + Addresses: https://cygwin.com/ml/cygwin/2020-01/msg00111.html + +- Many fixes in new pseudo console support. + Addresses (among others): + https://cygwin.com/ml/cygwin/2019-12/msg00173.html + https://cygwin.com/ml/cygwin/2019-12/msg00292.html + https://cygwin.com/ml/cygwin/2019-12/msg00295.html + https://cygwin.com/ml/cygwin/2020-01/msg00093.html + https://cygwin.com/ml/cygwin/2020-01/msg00147.html + https://cygwin.com/ml/cygwin/2020-01/msg00161.html From 40245925ce9d6b9a9c4ed6140cea39d948d10898 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 18 Feb 2020 11:17:43 +0100 Subject: [PATCH 211/520] Cygwin: rename NSIG to _NSIG, change visibility of NSIG to MISC NSIG is a deprecated symbol only visible under MISC visibility. _NSIG is used widely instead, and on most systems NSIG is defined in terms of _NSIG. Follow suit: Change NSIG to _NSIG throughout and change visiblity of NSIG to be defined only in __MISC_VISIBLE case. Signed-off-by: Corinna Vinschen --- winsup/cygwin/exceptions.cc | 6 +++--- winsup/cygwin/include/cygwin/signal.h | 10 +++++++--- winsup/cygwin/release/3.1.4 | 4 ++++ winsup/cygwin/signal.cc | 14 +++++++------- winsup/cygwin/sigproc.cc | 8 ++++---- winsup/cygwin/sigproc.h | 22 +++++++++++----------- winsup/cygwin/strsig.cc | 2 +- 7 files changed, 37 insertions(+), 29 deletions(-) diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 3e7d7275c..b331dc8d1 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -1166,7 +1166,7 @@ extern "C" int sighold (int sig) { /* check that sig is in right range */ - if (sig < 0 || sig >= NSIG) + if (sig < 0 || sig >= _NSIG) { set_errno (EINVAL); syscall_printf ("signal %d out of range", sig); @@ -1182,7 +1182,7 @@ extern "C" int sigrelse (int sig) { /* check that sig is in right range */ - if (sig < 0 || sig >= NSIG) + if (sig < 0 || sig >= _NSIG) { set_errno (EINVAL); syscall_printf ("signal %d out of range", sig); @@ -1201,7 +1201,7 @@ sigset (int sig, _sig_func_ptr func) _sig_func_ptr prev; /* check that sig is in right range */ - if (sig < 0 || sig >= NSIG || sig == SIGKILL || sig == SIGSTOP) + if (sig < 0 || sig >= _NSIG || sig == SIGKILL || sig == SIGSTOP) { set_errno (EINVAL); syscall_printf ("SIG_ERR = sigset (%d, %p)", sig, func); diff --git a/winsup/cygwin/include/cygwin/signal.h b/winsup/cygwin/include/cygwin/signal.h index e659d7ae0..bc4ad1832 100644 --- a/winsup/cygwin/include/cygwin/signal.h +++ b/winsup/cygwin/include/cygwin/signal.h @@ -438,14 +438,18 @@ struct sigaction #define SIGUSR2 31 /* user defined signal 2 */ #if __WORDSIZE == 64 -#define NSIG 65 /* signal 0 implied */ +#define _NSIG 65 /* signal 0 implied */ #else -#define NSIG 33 /* signal 0 implied */ +#define _NSIG 33 /* signal 0 implied */ +#endif + +#if __MISC_VISIBLE +#define NSIG _NSIG #endif /* Real-Time signals per SUSv3. RT_SIGMAX is defined as 8 in limits.h */ #define SIGRTMIN 32 -#define SIGRTMAX (NSIG - 1) +#define SIGRTMAX (_NSIG - 1) #define SIG_HOLD ((_sig_func_ptr)2) /* Signal in signal mask */ diff --git a/winsup/cygwin/release/3.1.4 b/winsup/cygwin/release/3.1.4 index 06ed1eb57..1c4495445 100644 --- a/winsup/cygwin/release/3.1.4 +++ b/winsup/cygwin/release/3.1.4 @@ -13,6 +13,10 @@ What changed: - Allow AF_LOCAL sockets to be opened with O_PATH. +- : New macro _NSIG replacing NSIG. NSIG is now only + visible to MISC builds, as on Linux. + + Bug Fixes: ---------- diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc index 8ac59d4b9..bd1168e90 100644 --- a/winsup/cygwin/signal.cc +++ b/winsup/cygwin/signal.cc @@ -36,7 +36,7 @@ signal (int sig, _sig_func_ptr func) _sig_func_ptr prev; /* check that sig is in right range */ - if (sig <= 0 || sig >= NSIG || sig == SIGKILL || sig == SIGSTOP) + if (sig <= 0 || sig >= _NSIG || sig == SIGKILL || sig == SIGSTOP) { set_errno (EINVAL); syscall_printf ("SIG_ERR = signal (%d, %p)", sig, func); @@ -311,7 +311,7 @@ kill0 (pid_t pid, siginfo_t& si) { syscall_printf ("kill (%d, %d)", pid, si.si_signo); /* check that sig is in right range */ - if (si.si_signo < 0 || si.si_signo >= NSIG) + if (si.si_signo < 0 || si.si_signo >= _NSIG) { set_errno (EINVAL); syscall_printf ("signal %d out of range", si.si_signo); @@ -417,7 +417,7 @@ sigaction_worker (int sig, const struct sigaction *newact, { sig_dispatch_pending (); /* check that sig is in right range */ - if (sig <= 0 || sig >= NSIG) + if (sig <= 0 || sig >= _NSIG) set_errno (EINVAL); else { @@ -480,7 +480,7 @@ extern "C" int sigaddset (sigset_t *set, const int sig) { /* check that sig is in right range */ - if (sig <= 0 || sig >= NSIG) + if (sig <= 0 || sig >= _NSIG) { set_errno (EINVAL); syscall_printf ("SIG_ERR = sigaddset signal %d out of range", sig); @@ -495,7 +495,7 @@ extern "C" int sigdelset (sigset_t *set, const int sig) { /* check that sig is in right range */ - if (sig <= 0 || sig >= NSIG) + if (sig <= 0 || sig >= _NSIG) { set_errno (EINVAL); syscall_printf ("SIG_ERR = sigdelset signal %d out of range", sig); @@ -510,7 +510,7 @@ extern "C" int sigismember (const sigset_t *set, int sig) { /* check that sig is in right range */ - if (sig <= 0 || sig >= NSIG) + if (sig <= 0 || sig >= _NSIG) { set_errno (EINVAL); syscall_printf ("SIG_ERR = sigdelset signal %d out of range", sig); @@ -709,7 +709,7 @@ sigqueue (pid_t pid, int sig, const union sigval value) } if (sig == 0) return 0; - if (sig < 0 || sig >= NSIG) + if (sig < 0 || sig >= _NSIG) { set_errno (EINVAL); return -1; diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index aff1ed61b..7286e3238 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -71,7 +71,7 @@ static void WINAPI wait_sig (VOID *arg); class pending_signals { - sigpacket sigs[NSIG + 1]; + sigpacket sigs[_NSIG + 1]; sigpacket start; bool retry; @@ -91,7 +91,7 @@ void __stdcall sigalloc () { cygheap->sigs = global_sigs = - (struct sigaction *) ccalloc_abort (HEAP_SIGS, NSIG, sizeof (struct sigaction)); + (struct sigaction *) ccalloc_abort (HEAP_SIGS, _NSIG, sizeof (struct sigaction)); global_sigs[SIGSTOP].sa_flags = SA_RESTART | SA_NODEFER; } @@ -100,7 +100,7 @@ signal_fixup_after_exec () { global_sigs = cygheap->sigs; /* Set up child's signal handlers */ - for (int i = 0; i < NSIG; i++) + for (int i = 0; i < _NSIG; i++) { global_sigs[i].sa_mask = 0; if (global_sigs[i].sa_handler != SIG_IGN) @@ -449,7 +449,7 @@ sigproc_init () char char_sa_buf[1024]; PSECURITY_ATTRIBUTES sa = sec_user_nih ((PSECURITY_ATTRIBUTES) char_sa_buf, cygheap->user.sid()); DWORD err = fhandler_pipe::create (sa, &my_readsig, &my_sendsig, - NSIG * sizeof (sigpacket), "sigwait", + _NSIG * sizeof (sigpacket), "sigwait", PIPE_ADD_PID); if (err) { diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h index a6f1428ce..f8f92d350 100644 --- a/winsup/cygwin/sigproc.h +++ b/winsup/cygwin/sigproc.h @@ -10,19 +10,19 @@ details. */ #include #include "sync.h" -#ifdef NSIG +#ifdef _NSIG enum { - __SIGFLUSH = -(NSIG + 1), - __SIGSTRACE = -(NSIG + 2), - __SIGCOMMUNE = -(NSIG + 3), - __SIGPENDING = -(NSIG + 4), - __SIGDELETE = -(NSIG + 5), /* Not currently used */ - __SIGFLUSHFAST = -(NSIG + 6), - __SIGHOLD = -(NSIG + 7), - __SIGNOHOLD = -(NSIG + 8), - __SIGSETPGRP = -(NSIG + 9), - __SIGTHREADEXIT = -(NSIG + 10) + __SIGFLUSH = -(_NSIG + 1), + __SIGSTRACE = -(_NSIG + 2), + __SIGCOMMUNE = -(_NSIG + 3), + __SIGPENDING = -(_NSIG + 4), + __SIGDELETE = -(_NSIG + 5), /* Not currently used */ + __SIGFLUSHFAST = -(_NSIG + 6), + __SIGHOLD = -(_NSIG + 7), + __SIGNOHOLD = -(_NSIG + 8), + __SIGSETPGRP = -(_NSIG + 9), + __SIGTHREADEXIT = -(_NSIG + 10) }; #endif diff --git a/winsup/cygwin/strsig.cc b/winsup/cygwin/strsig.cc index 6c7bdd37c..03f959f88 100644 --- a/winsup/cygwin/strsig.cc +++ b/winsup/cygwin/strsig.cc @@ -174,7 +174,7 @@ psiginfo (const siginfo_t *info, const char *s) ADD (strsignal (info->si_signo)); - if (info->si_signo > 0 && info->si_signo < NSIG) + if (info->si_signo > 0 && info->si_signo < _NSIG) { switch (info->si_signo) { From c8204b106988fd089a6d568f540100a3b88b628c Mon Sep 17 00:00:00 2001 From: Thomas Wolff Date: Mon, 17 Feb 2020 00:00:00 +0100 Subject: [PATCH 212/520] Locale modifier "@cjksingle" to enforce single-width CJK width. This option follows a proposal in the Terminals Working Group Specifications (https://gitlab.freedesktop.org/terminal-wg/specifications/issues/9#note_406682). It makes locale width consistent with the corresponding mintty feature. --- newlib/libc/locale/locale.c | 13 +++++++++++-- newlib/libc/string/wcwidth.c | 8 ++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c index 4c343e462..7b1b0662c 100644 --- a/newlib/libc/locale/locale.c +++ b/newlib/libc/locale/locale.c @@ -85,6 +85,9 @@ it is 2 for <<"zh">> (Chinese), <<"ja">> (Japanese), and <<"ko">> (Korean), and 1 for everything else. Specifying <<"cjknarrow">> or <<"cjkwide">> forces a width of 1 or 2, respectively, independent of charset and language. +This implementation also supports the modifier <<"cjksingle">> +to enforce single-width character properties. + If you use <> as the <[locale]> argument, <> returns a pointer to the string representing the current locale. The acceptable values for <[category]> are defined in `<>' as macros @@ -480,6 +483,7 @@ __loadlocale (struct __locale_t *loc, int category, char *new_locale) int mbc_max; wctomb_p l_wctomb; mbtowc_p l_mbtowc; + int cjksingle = 0; int cjknarrow = 0; int cjkwide = 0; @@ -594,11 +598,13 @@ restart: } if (c && c[0] == '@') { - /* Modifier */ + /* Modifier "cjksingle" is recognized to enforce single-width mode. */ /* Modifiers "cjknarrow" or "cjkwide" are recognized to modify the behaviour of wcwidth() and wcswidth() for East Asian languages. For details see the comment at the end of this function. */ - if (!strcmp (c + 1, "cjknarrow")) + if (!strcmp (c + 1, "cjksingle")) + cjksingle = 1; + else if (!strcmp (c + 1, "cjknarrow")) cjknarrow = 1; else if (!strcmp (c + 1, "cjkwide")) cjkwide = 1; @@ -893,6 +899,7 @@ restart: loc->wctomb = l_wctomb; loc->mbtowc = l_mbtowc; __set_ctype (loc, charset); + /* Set CJK width mode (1: ambiguous-wide, 0: normal, -1: disabled). */ /* Determine the width for the "CJK Ambiguous Width" category of characters. This is used in wcwidth(). Assume single width for single-byte charsets, and double width for multi-byte charsets @@ -907,6 +914,8 @@ restart: || strncmp (locale, "ja", 2) == 0 || strncmp (locale, "ko", 2) == 0 || strncmp (locale, "zh", 2) == 0)); + if (cjksingle) + loc->cjk_lang = -1; /* Disable CJK dual-width */ #ifdef __HAVE_LOCALE_INFO__ ret = __ctype_load_locale (loc, locale, (void *) l_wctomb, charset, mbc_max); diff --git a/newlib/libc/string/wcwidth.c b/newlib/libc/string/wcwidth.c index 62e76edc3..8348eefe8 100644 --- a/newlib/libc/string/wcwidth.c +++ b/newlib/libc/string/wcwidth.c @@ -197,8 +197,11 @@ __wcwidth (const wint_t ucs) if (ucs >= 0xd800 && ucs <= 0xdfff) return -1; + /* check CJK width mode (1: ambiguous-wide, 0: normal, -1: disabled) */ + int cjk_lang = __locale_cjk_lang (); + /* binary search in table of ambiguous characters */ - if (__locale_cjk_lang () + if (cjk_lang > 0 && bisearch(ucs, ambiguous, sizeof(ambiguous) / sizeof(struct interval) - 1)) return 2; @@ -211,7 +214,8 @@ __wcwidth (const wint_t ucs) /* if we arrive here, ucs is not a combining or C0/C1 control character */ /* binary search in table of wide character codes */ - if (bisearch(ucs, wide, + if (cjk_lang >= 0 + && bisearch(ucs, wide, sizeof(wide) / sizeof(struct interval) - 1)) return 2; else From b7361d31fb8659aa6cea85d7eef22471727be26b Mon Sep 17 00:00:00 2001 From: Thomas Wolff Date: Mon, 17 Feb 2020 00:00:00 +0100 Subject: [PATCH 213/520] Cygwin: describe new locale modifier @cjksingle for user guide --- winsup/doc/setup-locale.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/winsup/doc/setup-locale.xml b/winsup/doc/setup-locale.xml index 4872ae202..4b9141e5c 100644 --- a/winsup/doc/setup-locale.xml +++ b/winsup/doc/setup-locale.xml @@ -179,6 +179,17 @@ response with this option; it forces wcwidth/wcswidth to return 2 for the ambiguous width characters. + +As an alternative preference, CJK single-width may be enforced. +This feature is a +proposal +in the Terminals Working Group Specifications. +The mintty terminal implements it as an option with proper glyph scaling. +The locale modifier "@cjksingle" supports consistent locale response +with this option; it forces wcwidth/wcswidth to account at most 1 for +all characters. + + From 592b03b3ba0d51b1d3edda6302f324ecd53c83eb Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 18 Feb 2020 11:32:47 +0100 Subject: [PATCH 214/520] Cygwin: add @cjksingle to release docs Signed-off-by: Corinna Vinschen --- winsup/cygwin/release/3.1.4 | 5 +++++ winsup/doc/new-features.xml | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/winsup/cygwin/release/3.1.4 b/winsup/cygwin/release/3.1.4 index 1c4495445..2d4487037 100644 --- a/winsup/cygwin/release/3.1.4 +++ b/winsup/cygwin/release/3.1.4 @@ -16,6 +16,11 @@ What changed: - : New macro _NSIG replacing NSIG. NSIG is now only visible to MISC builds, as on Linux. +- The new locale modifier @cjksingle allows enforcing of single-width + character property for usually double-widthed characters. This will + be supported by upcoming mintty releases. For the reasoning, see + https://gitlab.freedesktop.org/terminal-wg/specifications/issues/9. + Bug Fixes: ---------- diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml index 78c7760cf..9086302d3 100644 --- a/winsup/doc/new-features.xml +++ b/winsup/doc/new-features.xml @@ -75,6 +75,13 @@ set, or if an attempt is made to open a different type of socket, the errno is now EOPNOTSUPP instead of ENXIO. + +The new locale modifier @cjksingle allows enforcing of single-width +character property for usually double-widthed characters. This will +be supported by upcoming mintty releases. For the reasoning, see +https://gitlab.freedesktop.org/terminal-wg/specifications/issues/9. + + From 321d79abd3240008ae09e3021b312126058d9416 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Tue, 18 Feb 2020 13:05:07 +0900 Subject: [PATCH 215/520] Cygwin: console: Fix ioctl() FIONREAD. - ioctl() FIONREAD for console does not return correct value since commit cfb517f39a8bcf2d995a732d250563917600408a. This patch fixes the issue. --- winsup/cygwin/fhandler_console.cc | 37 +++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 9bfee64d3..ce19a81a3 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1230,10 +1230,39 @@ fhandler_console::ioctl (unsigned int cmd, void *arg) release_output_mutex (); return -1; } - while (n-- > 0) - if (inp[n].EventType == KEY_EVENT && inp[n].Event.KeyEvent.bKeyDown) - ++ret; - *(int *) arg = ret; + bool saw_eol = false; + for (DWORD i=0; iti.c_lflag & ICANON) && + len == 1 && CCEQ (get_ttyp ()->ti.c_cc[VEOF], mbs[0])) + { + saw_eol = true; + break; + } + ret += len; + const char eols[] = { + '\n', + '\r', + (char) get_ttyp ()->ti.c_cc[VEOL], + (char) get_ttyp ()->ti.c_cc[VEOL2] + }; + if ((get_ttyp ()->ti.c_lflag & ICANON) && + len == 1 && memchr (eols, mbs[0], sizeof (eols))) + { + saw_eol = true; + break; + } + } + if ((get_ttyp ()->ti.c_lflag & ICANON) && !saw_eol) + *(int *) arg = 0; + else + *(int *) arg = ret; release_output_mutex (); return 0; } From 81b34409985ce31415a1d994ef744e72cfb8c378 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Tue, 18 Feb 2020 18:12:54 +0900 Subject: [PATCH 216/520] Cygwin: console: Add guard for set/unset xterm compatible mode. - Setting / unsetting xterm compatible mode may cause race issue between multiple processes. This patch adds guard for that. --- winsup/cygwin/fhandler.h | 6 ++ winsup/cygwin/fhandler_console.cc | 125 +++++++++++++++++++++--------- winsup/cygwin/select.cc | 22 ++---- winsup/cygwin/spawn.cc | 8 +- 4 files changed, 103 insertions(+), 58 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 993d7355a..55f18aebd 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1911,6 +1911,8 @@ class dev_console bool raw_win32_keyboard_mode; char cons_rabuf[40]; // cannot get longer than char buf[40] in char_command char *cons_rapoi; + LONG xterm_mode_input; + LONG xterm_mode_output; inline UINT get_console_cp (); DWORD con_to_str (char *d, int dlen, WCHAR w); @@ -1983,6 +1985,7 @@ private: static bool create_invisible_console (HWINSTA); static bool create_invisible_console_workaround (); static console_state *open_shared_console (HWND, HANDLE&, bool&); + void fix_tab_position (void); public: static pid_t tc_getpgid () @@ -2072,6 +2075,9 @@ private: size_t &raixput (); size_t &rabuflen (); + void request_xterm_mode_input (bool); + void request_xterm_mode_output (bool); + friend tty_min * tty_list::get_cttyp (); }; diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index ce19a81a3..66e645aa1 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -53,8 +53,6 @@ fhandler_console::console_state NO_COPY *fhandler_console::shared_console_info; bool NO_COPY fhandler_console::invisible_console; -static DWORD orig_conout_mode = (DWORD) -1; - /* con_ra is shared in the same process. Only one console can exist in a process, therefore, static is suitable. */ static struct fhandler_base::rabuf_t con_ra; @@ -162,13 +160,17 @@ fhandler_console::set_unit () tty_min_state.setntty (DEV_CONS_MAJOR, console_unit (me)); devset = (fh_devices) shared_console_info->tty_min_state.getntty (); if (created) - con.owner = getpid (); + { + con.owner = myself->pid; + con.xterm_mode_input = 0; + con.xterm_mode_output = 0; + } } if (!created && shared_console_info) { pinfo p (con.owner); if (!p) - con.owner = getpid (); + con.owner = myself->pid; } dev ().parse (devset); @@ -247,6 +249,60 @@ fhandler_console::rabuflen () return con_ra.rabuflen; } +void +fhandler_console::request_xterm_mode_input (bool req) +{ + if (con_is_legacy) + return; + if (req) + { + if (InterlockedIncrement (&con.xterm_mode_input) == 1) + { + DWORD dwMode; + GetConsoleMode (get_handle (), &dwMode); + dwMode |= ENABLE_VIRTUAL_TERMINAL_INPUT; + SetConsoleMode (get_handle (), dwMode); + } + } + else + { + if (InterlockedDecrement (&con.xterm_mode_input) == 0) + { + DWORD dwMode; + GetConsoleMode (get_handle (), &dwMode); + dwMode &= ~ENABLE_VIRTUAL_TERMINAL_INPUT; + SetConsoleMode (get_handle (), dwMode); + } + } +} + +void +fhandler_console::request_xterm_mode_output (bool req) +{ + if (con_is_legacy) + return; + if (req) + { + if (InterlockedExchange (&con.xterm_mode_output, 1) == 0) + { + DWORD dwMode; + GetConsoleMode (get_output_handle (), &dwMode); + dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; + SetConsoleMode (get_output_handle (), dwMode); + } + } + else + { + if (InterlockedExchange (&con.xterm_mode_output, 0) == 1) + { + DWORD dwMode; + GetConsoleMode (get_output_handle (), &dwMode); + dwMode &= ~ENABLE_VIRTUAL_TERMINAL_PROCESSING; + SetConsoleMode (get_output_handle (), dwMode); + } + } +} + /* Return the tty structure associated with a given tty number. If the tty number is < 0, just return a dummy record. */ tty_min * @@ -347,8 +403,8 @@ fhandler_console::set_cursor_maybe () /* Workaround for a bug of windows xterm compatible mode. */ /* The horizontal tab positions are broken after resize. */ -static void -fix_tab_position (HANDLE h, SHORT width) +void +fhandler_console::fix_tab_position (void) { char buf[2048] = {0,}; /* Save cursor position */ @@ -356,15 +412,13 @@ fix_tab_position (HANDLE h, SHORT width) /* Clear all horizontal tabs */ __small_sprintf (buf+strlen (buf), "\033[3g"); /* Set horizontal tabs */ - for (int col=8; colkill_pgrp (SIGWINCH); return true; } @@ -427,11 +481,9 @@ fhandler_console::read (void *pv, size_t& buflen) set_input_state (); - DWORD dwMode; - GetConsoleMode (get_handle (), &dwMode); /* if system has 24 bit color capability, use xterm compatible mode. */ - if (wincap.has_con_24bit_colors () && !con_is_legacy) - SetConsoleMode (get_handle (), dwMode | ENABLE_VIRTUAL_TERMINAL_INPUT); + if (wincap.has_con_24bit_colors ()) + request_xterm_mode_input (true); while (!input_ready && !get_cons_readahead_valid ()) { @@ -439,7 +491,8 @@ fhandler_console::read (void *pv, size_t& buflen) if ((bgres = bg_check (SIGTTIN)) <= bg_eof) { buflen = bgres; - SetConsoleMode (get_handle (), dwMode); /* Restore */ + if (wincap.has_con_24bit_colors ()) + request_xterm_mode_input (false); return; } @@ -457,7 +510,8 @@ fhandler_console::read (void *pv, size_t& buflen) case WAIT_TIMEOUT: set_sig_errno (EAGAIN); buflen = (size_t) -1; - SetConsoleMode (get_handle (), dwMode); /* Restore */ + if (wincap.has_con_24bit_colors ()) + request_xterm_mode_input (false); return; default: goto err; @@ -505,19 +559,22 @@ fhandler_console::read (void *pv, size_t& buflen) #undef buf buflen = copied_chars; - SetConsoleMode (get_handle (), dwMode); /* Restore */ + if (wincap.has_con_24bit_colors ()) + request_xterm_mode_input (false); return; err: __seterrno (); buflen = (size_t) -1; - SetConsoleMode (get_handle (), dwMode); /* Restore */ + if (wincap.has_con_24bit_colors ()) + request_xterm_mode_input (false); return; sig_exit: set_sig_errno (EINTR); buflen = (size_t) -1; - SetConsoleMode (get_handle (), dwMode); /* Restore */ + if (wincap.has_con_24bit_colors ()) + request_xterm_mode_input (false); } fhandler_console::input_states @@ -1051,10 +1108,7 @@ fhandler_console::open (int flags, mode_t) get_ttyp ()->rstcons (false); set_open_status (); - if (orig_conout_mode == (DWORD) -1) - GetConsoleMode (get_output_handle (), &orig_conout_mode); - - if (getpid () == con.owner && wincap.has_con_24bit_colors ()) + if (myself->pid == con.owner && wincap.has_con_24bit_colors ()) { bool is_legacy = false; DWORD dwMode; @@ -1105,15 +1159,9 @@ fhandler_console::close () acquire_output_mutex (INFINITE); - if (shared_console_info && getpid () == con.owner && + if (shared_console_info && myself->pid == con.owner && wincap.has_con_24bit_colors () && !con_is_legacy) - { - DWORD dwMode; - /* Disable xterm compatible mode in output */ - GetConsoleMode (get_output_handle (), &dwMode); - dwMode &= ~ENABLE_VIRTUAL_TERMINAL_PROCESSING; - SetConsoleMode (get_output_handle (), dwMode); - } + request_xterm_mode_output (false); /* Restore console mode if this is the last closure. */ OBJECT_BASIC_INFORMATION obi; @@ -1121,8 +1169,8 @@ fhandler_console::close () status = NtQueryObject (get_handle (), ObjectBasicInformation, &obi, sizeof obi, NULL); if (NT_SUCCESS (status) && obi.HandleCount == 1) - if (orig_conout_mode != (DWORD) -1) - SetConsoleMode (get_output_handle (), orig_conout_mode); + if (wincap.has_con_24bit_colors ()) + request_xterm_mode_output (false); release_output_mutex (); @@ -1295,6 +1343,8 @@ fhandler_console::output_tcsetattr (int, struct termios const *t) /* All the output bits we can ignore */ acquire_output_mutex (INFINITE); + if (wincap.has_con_24bit_colors ()) + request_xterm_mode_output (false); DWORD flags = ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT; int res = SetConsoleMode (get_output_handle (), flags) ? 0 : -1; @@ -1765,7 +1815,7 @@ bool fhandler_console::write_console (PWCHAR buf, DWORD len, DWORD& done) } /* Call fix_tab_position() if screen has been alternated. */ if (need_fix_tab_position) - fix_tab_position (get_output_handle (), con.dwWinSize.X); + fix_tab_position (); return true; } @@ -2733,11 +2783,12 @@ fhandler_console::write (const void *vsrc, size_t len) acquire_output_mutex (INFINITE); /* If system has 24 bit color capability, use xterm compatible mode. */ + if (wincap.has_con_24bit_colors ()) + request_xterm_mode_output (true); if (wincap.has_con_24bit_colors () && !con_is_legacy) { DWORD dwMode; GetConsoleMode (get_output_handle (), &dwMode); - dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; if (!(get_ttyp ()->ti.c_oflag & OPOST) || !(get_ttyp ()->ti.c_oflag & ONLCR)) dwMode |= DISABLE_NEWLINE_AUTO_RETURN; diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index f3e3e4482..48a700132 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -1075,17 +1075,16 @@ verify_console (select_record *me, fd_set *rfds, fd_set *wfds, return peek_console (me, true); } +static void console_cleanup (select_record *, select_stuff *); + static int console_startup (select_record *me, select_stuff *stuff) { - select_record *s = stuff->start.next; + fhandler_console *fh = (fhandler_console *) me->fh; if (wincap.has_con_24bit_colors ()) { - DWORD dwMode; - GetConsoleMode (s->h, &dwMode); - /* Enable xterm compatible mode in input */ - dwMode |= ENABLE_VIRTUAL_TERMINAL_INPUT; - SetConsoleMode (s->h, dwMode); + fh->request_xterm_mode_input (true); + me->cleanup = console_cleanup; } return 1; } @@ -1093,15 +1092,9 @@ console_startup (select_record *me, select_stuff *stuff) static void console_cleanup (select_record *me, select_stuff *stuff) { - select_record *s = stuff->start.next; + fhandler_console *fh = (fhandler_console *) me->fh; if (wincap.has_con_24bit_colors ()) - { - DWORD dwMode; - GetConsoleMode (s->h, &dwMode); - /* Disable xterm compatible mode in input */ - dwMode &= ~ENABLE_VIRTUAL_TERMINAL_INPUT; - SetConsoleMode (s->h, dwMode); - } + fh->request_xterm_mode_input (false); } select_record * @@ -1117,7 +1110,6 @@ fhandler_console::select_read (select_stuff *ss) s->peek = peek_console; s->h = get_handle (); - s->cleanup = console_cleanup; s->read_selected = true; s->read_ready = input_ready || get_cons_readahead_valid (); return s; diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 772fe6dd6..3e8c8367a 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -614,14 +614,10 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, else if (fh && fh->get_major () == DEV_CONS_MAJOR) { attach_to_console = true; + fhandler_console *cons = (fhandler_console *) fh; if (wincap.has_con_24bit_colors () && !iscygwin ()) if (fd == 1 || fd == 2) - { - DWORD dwMode; - GetConsoleMode (fh->get_output_handle (), &dwMode); - dwMode &= ~ENABLE_VIRTUAL_TERMINAL_PROCESSING; - SetConsoleMode (fh->get_output_handle (), dwMode); - } + cons->request_xterm_mode_output (false); } } From ac36c2ec90f7c6d9d7f1c07005f97abd887cc8b0 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 19 Feb 2020 13:38:42 +0100 Subject: [PATCH 217/520] Bump DLL version to 3.1.5 Signed-off-by: Corinna Vinschen --- winsup/cygwin/include/cygwin/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 63a936da4..7e85cf1a0 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -11,7 +11,7 @@ details. */ changes to the DLL and is mainly informative in nature. */ #define CYGWIN_VERSION_DLL_MAJOR 3001 -#define CYGWIN_VERSION_DLL_MINOR 4 +#define CYGWIN_VERSION_DLL_MINOR 5 /* Major numbers before CYGWIN_VERSION_DLL_EPOCH are incompatible. */ From 7dac41db189986bea31e07f5593c4d9b186050b1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 19 Feb 2020 08:03:40 -0600 Subject: [PATCH 218/520] newlib/libc/include/devctl.h: Add extern "C" wrapper Adding this was necessary to allow posix_devctl() from C++. --- newlib/libc/include/devctl.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/newlib/libc/include/devctl.h b/newlib/libc/include/devctl.h index fd3409f89..889693e1d 100644 --- a/newlib/libc/include/devctl.h +++ b/newlib/libc/include/devctl.h @@ -35,6 +35,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + #if defined(__rtems__) /* * The FACE Technical Standard, Edition 3.0 and later require the @@ -67,4 +71,8 @@ int posix_devctl( ); #endif +#ifdef __cplusplus +} +#endif + #endif From c9f153580bfb4db4f9ef023b99360d7a746bd450 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 20 Feb 2020 14:48:03 +0100 Subject: [PATCH 219/520] Cygwin: console: ignore NUL byte on write in xterm emulation mode as well A NUL byte in the output stream got accidentally not handled as IGN char in xterm console mode. The internal mbtowc conversion doesn't handle embedded NUL values gracefully, it always stops converting at NUL bytes. This broke the output of strings with embedded NUL bytes. Fix this by always skipping IGN chars in the "normal char output loop" and make sure not to move the cursor one position to the right, as in legacy console mode. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_console.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 66e645aa1..c062fd7f7 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -2641,6 +2641,7 @@ fhandler_console::write_normal (const unsigned char *src, memset (&ps, 0, sizeof ps); while (found < end && found - src < CONVERT_LIMIT + && base_chars[*found] != IGN && ((wincap.has_con_24bit_colors () && !con_is_legacy) || base_chars[*found] == NOR) ) { @@ -2732,7 +2733,8 @@ do_print: cursor_rel (-1, 0); break; case IGN: - cursor_rel (1, 0); + if (!wincap.has_con_24bit_colors () || con_is_legacy) + cursor_rel (1, 0); break; case CR: cursor_get (&x, &y); From 4ec2e5e1c2d9bfdb742386a43a9d27aec4d74523 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 20 Feb 2020 14:57:26 +0100 Subject: [PATCH 220/520] Cygwin: fhandler_console.cc: fix minor style issues Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_console.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index c062fd7f7..f7044c8cc 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1774,8 +1774,8 @@ static const wchar_t __vt100_conv[31] = { 0x00B7, /* Middle Dot */ }; -inline -bool fhandler_console::write_console (PWCHAR buf, DWORD len, DWORD& done) +inline bool +fhandler_console::write_console (PWCHAR buf, DWORD len, DWORD& done) { bool need_fix_tab_position = false; /* Check if screen will be alternated. */ @@ -2643,7 +2643,7 @@ fhandler_console::write_normal (const unsigned char *src, && found - src < CONVERT_LIMIT && base_chars[*found] != IGN && ((wincap.has_con_24bit_colors () && !con_is_legacy) - || base_chars[*found] == NOR) ) + || base_chars[*found] == NOR)) { switch (ret = f_mbtowc (_REENT, NULL, (const char *) found, end - found, &ps)) From db33f3499cb1c74d56a521ea2d18084073b14840 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 21 Feb 2020 10:26:25 +0100 Subject: [PATCH 221/520] Cygwin: don't move cursor on NUL char at all Add a comment instead to explain that this behaviour contradicts the terminfo entry. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_console.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index f7044c8cc..42040a971 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -2733,8 +2733,9 @@ do_print: cursor_rel (-1, 0); break; case IGN: - if (!wincap.has_con_24bit_colors () || con_is_legacy) - cursor_rel (1, 0); + /* Up to release 3.1.3 we called cursor_rel (1, 0); to move the cursor + one step to the right. However, that neither matches the terminfo + for the cygwin terminal, nor the one for the xterm terminal. */ break; case CR: cursor_get (&x, &y); From bf33f72d437dc603f13e53946a626e7d3c7836af Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 21 Feb 2020 10:57:10 +0100 Subject: [PATCH 222/520] Cygwin: add release message for NUL character bugs Signed-off-by: Corinna Vinschen --- winsup/cygwin/release/3.1.5 | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 winsup/cygwin/release/3.1.5 diff --git a/winsup/cygwin/release/3.1.5 b/winsup/cygwin/release/3.1.5 new file mode 100644 index 000000000..796fd2126 --- /dev/null +++ b/winsup/cygwin/release/3.1.5 @@ -0,0 +1,7 @@ +Bug Fixes: +---------- + +- Fix accidental evaluation of NUL (\0) characters in xterm console output. + Don't move cursor to the right in case of a NUL character in the console + output stream, this is not backed by terminfo. + Addresses: https://cygwin.com/ml/cygwin/2020-02/msg00162.html From 86f9ce97bc4dd8dd14757157ae944c2c678d62a9 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Fri, 21 Feb 2020 14:28:08 -0700 Subject: [PATCH 223/520] fhandler_proc/cpuinfo: support fast short REP MOVSB Added in Linux 5.6: Check FSRM and use REP MOVSB for short copies on systems that have it. >From the Intel Optimization Reference Manual: 3.7.6.1 Fast Short REP MOVSB Beginning with processors based on Ice Lake Client microarchitecture, REP MOVSB performance is enhanced with string lengths up to 128 bytes. Support for fast-short REP MOVSB is indicated by the CPUID feature flag: CPUID [EAX=7H, ECX=0H).EDX.FAST_SHORT_REP_MOVSB[bit 4] = 1. There is no change in the REP STOS performance. --- winsup/cygwin/fhandler_proc.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 78a69703d..030ade68a 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -1346,6 +1346,7 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features1, 2, "avx512_4vnniw"); /* vec dot prod dw */ ftcprint (features1, 3, "avx512_4fmaps"); /* vec 4 FMA single */ + ftcprint (features1, 4, "fsrm"); /* fast short REP MOVSB */ ftcprint (features1, 8, "avx512_vp2intersect"); /* vec intcpt d/q */ ftcprint (features1, 10, "md_clear"); /* verw clear buf */ ftcprint (features1, 18, "pconfig"); /* platform config */ From 17528b9d2c3147f5de0f604fc2702b2e0010c533 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Tue, 25 Feb 2020 01:12:16 +0900 Subject: [PATCH 224/520] Cygwin: console: Fix segfault on shared_console_info access. - Accessing shared_console_info before initialization causes access violation because it is a NULL pointer. The cause of the problem reported in https://cygwin.com/ml/cygwin/2020-02/msg00197.html is this NULL pointer access in request_xterm_mode_output() when it is called from close(). This patch makes sure that shared_console_info is not NULL before calling request_xterm_mode_output(). --- winsup/cygwin/fhandler_console.cc | 23 +++++++++++------------ winsup/cygwin/release/3.1.5 | 4 ++++ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 42040a971..328424a7d 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1159,18 +1159,17 @@ fhandler_console::close () acquire_output_mutex (INFINITE); - if (shared_console_info && myself->pid == con.owner && - wincap.has_con_24bit_colors () && !con_is_legacy) - request_xterm_mode_output (false); - - /* Restore console mode if this is the last closure. */ - OBJECT_BASIC_INFORMATION obi; - NTSTATUS status; - status = NtQueryObject (get_handle (), ObjectBasicInformation, - &obi, sizeof obi, NULL); - if (NT_SUCCESS (status) && obi.HandleCount == 1) - if (wincap.has_con_24bit_colors ()) - request_xterm_mode_output (false); + if (shared_console_info && wincap.has_con_24bit_colors ()) + { + /* Restore console mode if this is the last closure. */ + OBJECT_BASIC_INFORMATION obi; + NTSTATUS status; + status = NtQueryObject (get_handle (), ObjectBasicInformation, + &obi, sizeof obi, NULL); + if ((NT_SUCCESS (status) && obi.HandleCount == 1) + || myself->pid == con.owner) + request_xterm_mode_output (false); + } release_output_mutex (); diff --git a/winsup/cygwin/release/3.1.5 b/winsup/cygwin/release/3.1.5 index 796fd2126..e34fdb88d 100644 --- a/winsup/cygwin/release/3.1.5 +++ b/winsup/cygwin/release/3.1.5 @@ -5,3 +5,7 @@ Bug Fixes: Don't move cursor to the right in case of a NUL character in the console output stream, this is not backed by terminfo. Addresses: https://cygwin.com/ml/cygwin/2020-02/msg00162.html + +- Fix a segfault when starting, e.g., mintty from a bash in a console + running xterm emulation. + Addresses: https://cygwin.com/ml/cygwin/2020-02/msg00197.html From fbaa096772f77be664864d80508906ad018cc23b Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 25 Feb 2020 07:38:33 -0600 Subject: [PATCH 225/520] x86_64/i386 fenv: Replace symlink with include fenv_stub.c Having symlinks for these files led to an issue reported to the RTEMS Project that showed up using some tar for native Windows to unpack the newlib sources. It creates symlinks in the tar file as copies of the files the symlinks point to. If the links appear in the tar file before the source exists, it cannot copy the file. The solution in this patch is to convert the files that are symbolic links into simple files which include the file they were linked to. This should be more portable and avoids the symbolinc link problem. --- newlib/libm/machine/i386/feclearexcept.c | 8 +++++++- newlib/libm/machine/i386/fegetenv.c | 8 +++++++- newlib/libm/machine/i386/fegetexceptflag.c | 8 +++++++- newlib/libm/machine/i386/fegetround.c | 8 +++++++- newlib/libm/machine/i386/feholdexcept.c | 8 +++++++- newlib/libm/machine/i386/fenv.c | 8 +++++++- newlib/libm/machine/i386/feraiseexcept.c | 8 +++++++- newlib/libm/machine/i386/fesetenv.c | 8 +++++++- newlib/libm/machine/i386/fesetexceptflag.c | 8 +++++++- newlib/libm/machine/i386/fesetround.c | 8 +++++++- newlib/libm/machine/i386/fetestexcept.c | 8 +++++++- newlib/libm/machine/i386/feupdateenv.c | 8 +++++++- newlib/libm/machine/x86_64/feclearexcept.c | 8 +++++++- newlib/libm/machine/x86_64/fegetenv.c | 8 +++++++- newlib/libm/machine/x86_64/fegetexceptflag.c | 8 +++++++- newlib/libm/machine/x86_64/fegetround.c | 8 +++++++- newlib/libm/machine/x86_64/feholdexcept.c | 8 +++++++- newlib/libm/machine/x86_64/feraiseexcept.c | 8 +++++++- newlib/libm/machine/x86_64/fesetenv.c | 8 +++++++- newlib/libm/machine/x86_64/fesetexceptflag.c | 8 +++++++- newlib/libm/machine/x86_64/fesetround.c | 8 +++++++- newlib/libm/machine/x86_64/fetestexcept.c | 8 +++++++- newlib/libm/machine/x86_64/feupdateenv.c | 8 +++++++- 23 files changed, 161 insertions(+), 23 deletions(-) mode change 120000 => 100644 newlib/libm/machine/i386/feclearexcept.c mode change 120000 => 100644 newlib/libm/machine/i386/fegetenv.c mode change 120000 => 100644 newlib/libm/machine/i386/fegetexceptflag.c mode change 120000 => 100644 newlib/libm/machine/i386/fegetround.c mode change 120000 => 100644 newlib/libm/machine/i386/feholdexcept.c mode change 120000 => 100644 newlib/libm/machine/i386/fenv.c mode change 120000 => 100644 newlib/libm/machine/i386/feraiseexcept.c mode change 120000 => 100644 newlib/libm/machine/i386/fesetenv.c mode change 120000 => 100644 newlib/libm/machine/i386/fesetexceptflag.c mode change 120000 => 100644 newlib/libm/machine/i386/fesetround.c mode change 120000 => 100644 newlib/libm/machine/i386/fetestexcept.c mode change 120000 => 100644 newlib/libm/machine/i386/feupdateenv.c mode change 120000 => 100644 newlib/libm/machine/x86_64/feclearexcept.c mode change 120000 => 100644 newlib/libm/machine/x86_64/fegetenv.c mode change 120000 => 100644 newlib/libm/machine/x86_64/fegetexceptflag.c mode change 120000 => 100644 newlib/libm/machine/x86_64/fegetround.c mode change 120000 => 100644 newlib/libm/machine/x86_64/feholdexcept.c mode change 120000 => 100644 newlib/libm/machine/x86_64/feraiseexcept.c mode change 120000 => 100644 newlib/libm/machine/x86_64/fesetenv.c mode change 120000 => 100644 newlib/libm/machine/x86_64/fesetexceptflag.c mode change 120000 => 100644 newlib/libm/machine/x86_64/fesetround.c mode change 120000 => 100644 newlib/libm/machine/x86_64/fetestexcept.c mode change 120000 => 100644 newlib/libm/machine/x86_64/feupdateenv.c diff --git a/newlib/libm/machine/i386/feclearexcept.c b/newlib/libm/machine/i386/feclearexcept.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/feclearexcept.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/feclearexcept.c b/newlib/libm/machine/i386/feclearexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/feclearexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/fegetenv.c b/newlib/libm/machine/i386/fegetenv.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/fegetenv.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fegetenv.c b/newlib/libm/machine/i386/fegetenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/fegetenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/fegetexceptflag.c b/newlib/libm/machine/i386/fegetexceptflag.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/fegetexceptflag.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fegetexceptflag.c b/newlib/libm/machine/i386/fegetexceptflag.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/fegetexceptflag.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/fegetround.c b/newlib/libm/machine/i386/fegetround.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/fegetround.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fegetround.c b/newlib/libm/machine/i386/fegetround.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/fegetround.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/feholdexcept.c b/newlib/libm/machine/i386/feholdexcept.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/feholdexcept.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/feholdexcept.c b/newlib/libm/machine/i386/feholdexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/feholdexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/fenv.c b/newlib/libm/machine/i386/fenv.c deleted file mode 120000 index 1d7c7a117..000000000 --- a/newlib/libm/machine/i386/fenv.c +++ /dev/null @@ -1 +0,0 @@ -../x86_64/fenv.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fenv.c b/newlib/libm/machine/i386/fenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/fenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/feraiseexcept.c b/newlib/libm/machine/i386/feraiseexcept.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/feraiseexcept.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/feraiseexcept.c b/newlib/libm/machine/i386/feraiseexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/feraiseexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/fesetenv.c b/newlib/libm/machine/i386/fesetenv.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/fesetenv.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fesetenv.c b/newlib/libm/machine/i386/fesetenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/fesetenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/fesetexceptflag.c b/newlib/libm/machine/i386/fesetexceptflag.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/fesetexceptflag.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fesetexceptflag.c b/newlib/libm/machine/i386/fesetexceptflag.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/fesetexceptflag.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/fesetround.c b/newlib/libm/machine/i386/fesetround.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/fesetround.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fesetround.c b/newlib/libm/machine/i386/fesetround.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/fesetround.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/fetestexcept.c b/newlib/libm/machine/i386/fetestexcept.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/fetestexcept.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fetestexcept.c b/newlib/libm/machine/i386/fetestexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/fetestexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/feupdateenv.c b/newlib/libm/machine/i386/feupdateenv.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/feupdateenv.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/feupdateenv.c b/newlib/libm/machine/i386/feupdateenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/feupdateenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/feclearexcept.c b/newlib/libm/machine/x86_64/feclearexcept.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/feclearexcept.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/feclearexcept.c b/newlib/libm/machine/x86_64/feclearexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/feclearexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/fegetenv.c b/newlib/libm/machine/x86_64/fegetenv.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/fegetenv.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fegetenv.c b/newlib/libm/machine/x86_64/fegetenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/fegetenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/fegetexceptflag.c b/newlib/libm/machine/x86_64/fegetexceptflag.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/fegetexceptflag.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fegetexceptflag.c b/newlib/libm/machine/x86_64/fegetexceptflag.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/fegetexceptflag.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/fegetround.c b/newlib/libm/machine/x86_64/fegetround.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/fegetround.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fegetround.c b/newlib/libm/machine/x86_64/fegetround.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/fegetround.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/feholdexcept.c b/newlib/libm/machine/x86_64/feholdexcept.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/feholdexcept.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/feholdexcept.c b/newlib/libm/machine/x86_64/feholdexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/feholdexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/feraiseexcept.c b/newlib/libm/machine/x86_64/feraiseexcept.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/feraiseexcept.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/feraiseexcept.c b/newlib/libm/machine/x86_64/feraiseexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/feraiseexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/fesetenv.c b/newlib/libm/machine/x86_64/fesetenv.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/fesetenv.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fesetenv.c b/newlib/libm/machine/x86_64/fesetenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/fesetenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/fesetexceptflag.c b/newlib/libm/machine/x86_64/fesetexceptflag.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/fesetexceptflag.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fesetexceptflag.c b/newlib/libm/machine/x86_64/fesetexceptflag.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/fesetexceptflag.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/fesetround.c b/newlib/libm/machine/x86_64/fesetround.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/fesetround.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fesetround.c b/newlib/libm/machine/x86_64/fesetround.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/fesetround.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/fetestexcept.c b/newlib/libm/machine/x86_64/fetestexcept.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/fetestexcept.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fetestexcept.c b/newlib/libm/machine/x86_64/fetestexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/fetestexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/feupdateenv.c b/newlib/libm/machine/x86_64/feupdateenv.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/feupdateenv.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/feupdateenv.c b/newlib/libm/machine/x86_64/feupdateenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/feupdateenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" From 4653cc92ed509b8f9b340b16920e8cb683c85f40 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Tue, 25 Feb 2020 16:44:16 -0700 Subject: [PATCH 226/520] cpuinfo:power management: add proc_feedback, acc_power linux 4.6 x86/cpu: Add advanced power management bits Bit 11 of CPUID 8000_0007 edx is processor feedback interface. Bit 12 of CPUID 8000_0007 edx is accumulated power. Print proper names in /proc/cpuinfo [missed enabling this 2016 change during previous major cpuinfo update as no power related changes were made to the Linux files since then] --- winsup/cygwin/fhandler_proc.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 030ade68a..605a8443f 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -1397,8 +1397,8 @@ format_proc_cpuinfo (void *, char *&destbuf) /* ftcprint (features1, 8, "invariant_tsc"); */ /* TSC invariant */ ftcprint (features1, 9, "cpb"); /* core performance boost */ ftcprint (features1, 10, "eff_freq_ro"); /* ro eff freq interface */ -/* ftcprint (features1, 11, "proc_feedback"); */ /* proc feedback if */ -/* ftcprint (features1, 12, "acc_power"); */ /* core power reporting */ + ftcprint (features1, 11, "proc_feedback");/* proc feedback if */ + ftcprint (features1, 12, "acc_power"); /* core power reporting */ /* ftcprint (features1, 13, "connstby"); */ /* connected standby */ /* ftcprint (features1, 14, "rapl"); */ /* running average power limit */ } From 28382c97a5d5fd7366adbf7ce9445b1b4beb02a9 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 26 Feb 2020 16:50:34 +0100 Subject: [PATCH 227/520] Cygwin: posix timers: fix uninitialized variable The variable returning the overrun count from the tracker object after disarming the overrun counter was not correctly initialized. For some reason this has only been noticed by gcc-9.2.0, not by the formerly used gcc-7.4.0. This problem should not have had any runtime impact. The method timer_tracker::disarm_overrun_event is supposed to be called in lock-step with timer_tracker::arm_overrun_event, which in turn results in the variable getting a valid value. Signed-off-by: Corinna Vinschen --- winsup/cygwin/posix_timer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/posix_timer.cc b/winsup/cygwin/posix_timer.cc index c0d548fe9..75cd4fa60 100644 --- a/winsup/cygwin/posix_timer.cc +++ b/winsup/cygwin/posix_timer.cc @@ -81,7 +81,7 @@ timer_tracker::arm_overrun_event (LONG64 exp_cnt) LONG timer_tracker::disarm_overrun_event () { - LONG ret; + LONG ret = 0; AcquireSRWLockExclusive (&srwlock); if (overrun_count != OVR_DISARMED) From 5f66c2c756c2b3b43e565e471c82ee4ed05a4adb Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 26 Feb 2020 17:02:01 +0100 Subject: [PATCH 228/520] Cygwin: Makefile.in: add -fno-builtin-execve CFLAG when building exec.o gcc-9.2.0 has an execve builtin which uses the nothrow attribute. This results in an error when aliasing execve to _execve for newlib: exec.cc:88:23: error: 'int _execve(const char*, char* const*, char* const*)' specifies less restrictive attribute than its target 'int execve(const char*, char* const*, char* const*)': 'nothrow' [-Werror=missing-attributes] 88 | EXPORT_ALIAS (execve, _execve) /* For newlib */ Add the -fno-builtin-execve CFLAGS when building exec.o to override the gcc builtin. Signed-off-by: Corinna Vinschen --- winsup/cygwin/Makefile.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index ca0633eb8..f273ba793 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in @@ -567,6 +567,8 @@ ifeq ($(target_cpu),i686) exceptions_CFLAGS:=-fno-omit-frame-pointer endif endif +# required since gcc 9.x +exec_CFLAGS:=-fno-builtin-execve fhandler_proc_CFLAGS+=-DUSERNAME="\"$(USER)\"" -DHOSTNAME="\"$(HOSTNAME)\"" fhandler_proc_CFLAGS+=-DGCC_VERSION="\"`$(CC) -v 2>&1 | tail -n 1`\"" From 0a37e9f0bc24c6d326816e6686c4eaa25b4fd83e Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 26 Feb 2020 20:52:55 +0100 Subject: [PATCH 229/520] Cygwin: cygserver: drop useless packed attribute ...from structs used for data exchange between clients and cygserver. All of the structs have the same size and member offsets, packed or unpacked. Keeping the packed attribute results in ominous warnings from gcc-9.2.0: cygserver.cc:259:10: warning: taking address of packed member of 'client_request_attach_tty::request_attach_tty' may result in an unaligned pointer value [-Waddress-of-packed-member] Signed-off-by: Corinna Vinschen --- winsup/cygwin/cygserver.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/winsup/cygwin/cygserver.h b/winsup/cygwin/cygserver.h index 9de8c4470..2788fa377 100644 --- a/winsup/cygwin/cygserver.h +++ b/winsup/cygwin/cygserver.h @@ -11,12 +11,6 @@ details. */ #ifndef _CYGSERVER_H_ #define _CYGSERVER_H_ -#ifdef __GNUC__ -#define CYGSERVER_PACKED __attribute__ ((packed)) -#else -#define CYGSERVER_PACKED -#endif - #define CYGWIN_SERVER_VERSION_MAJOR 1 #define CYGWIN_SERVER_VERSION_API 4 #define CYGWIN_SERVER_VERSION_MINOR 0 @@ -65,7 +59,7 @@ protected: header_t () {}; header_t (request_code_t, size_t); - } CYGSERVER_PACKED; + }; public: #ifndef __INSIDE_CYGWIN__ @@ -111,7 +105,7 @@ private: struct request_get_version { DWORD major, api, minor, patch; - } CYGSERVER_PACKED; + }; public: client_request_get_version (); @@ -156,7 +150,7 @@ private: { DWORD pid, master_pid; HANDLE from_master, to_master; - } CYGSERVER_PACKED; + }; public: #ifdef __INSIDE_CYGWIN__ From 09981903e6d3a42a23b13cfaed3c9b8b0f0e2f02 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 26 Feb 2020 21:08:51 +0100 Subject: [PATCH 230/520] Cygwin: ps: fix compiler warning in ttynam The helper function ttynam creates a tty name by using sprintf wrongly on a pretty short buffer. The foramt string only specifies a minimum field length, not a maximum field length, so gcc-9.2.0 complains: ps.cc:101:23: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=] Fix this thoroughly by specifying a maximum field width as well as by using snprintf with a fixed buffer length. Also, drop using a static buffer in favor of using a buffer in the caller. Signed-off-by: Corinna Vinschen --- winsup/utils/ps.cc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/winsup/utils/ps.cc b/winsup/utils/ps.cc index 2307f7955..731f72c18 100644 --- a/winsup/utils/ps.cc +++ b/winsup/utils/ps.cc @@ -88,17 +88,17 @@ to_time_t (FILETIME *ptr) } static const char * -ttynam (int ntty) +ttynam (int ntty, char buf[9]) { - static char buf[9]; char buf0[9]; + if (ntty < 0) strcpy (buf0, "?"); else if (ntty & 0xffff0000) - sprintf (buf0, "cons%d", ntty & 0xff); + snprintf (buf0, 9, "cons%d", ntty & 0xff); else - sprintf (buf0, "pty%d", ntty); - sprintf (buf, " %-7s", buf0); + snprintf (buf0, 9, "pty%d", ntty); + snprintf (buf, 9, " %-7.7s", buf0); return buf; } @@ -358,6 +358,7 @@ main (int argc, char *argv[]) } char uname[128]; + char ttyname[9]; if (fflag) { @@ -373,13 +374,13 @@ main (int argc, char *argv[]) } if (sflag) - printf (dfmt, p->pid, ttynam (p->ctty), start_time (p), pname); + printf (dfmt, p->pid, ttynam (p->ctty, ttyname), start_time (p), pname); else if (fflag) - printf (ffmt, uname, p->pid, p->ppid, ttynam (p->ctty), start_time (p), - pname); + printf (ffmt, uname, p->pid, p->ppid, ttynam (p->ctty, ttyname), + start_time (p), pname); else if (lflag) printf (lfmt, status, p->pid, p->ppid, p->pgid, - p->dwProcessId, ttynam (p->ctty), + p->dwProcessId, ttynam (p->ctty, ttyname), p->version >= EXTERNAL_PINFO_VERSION_32_BIT ? p->uid32 : p->uid, start_time (p), pname); From 7dfe04e93343418eace45ea84bf9f6d1258cb632 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 27 Feb 2020 00:32:59 +0900 Subject: [PATCH 231/520] Cygwin: console: Add workaround for broken IL/DL in xterm mode. - Cygwin console with xterm compatible mode causes problem reported in https://www.cygwin.com/ml/cygwin-patches/2020-q1/msg00212.html if background/foreground colors are set to gray/black respectively in Win10 1903/1909. This is caused by "CSI Ps L" (IL), "CSI Ps M" (DL) and "ESC M" (RI) control sequences which are broken. This patch adds a workaround for the issue. --- winsup/cygwin/fhandler_console.cc | 156 +++++++++++++++++++++++++++++- winsup/cygwin/wincap.cc | 10 ++ winsup/cygwin/wincap.h | 2 + 3 files changed, 166 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 328424a7d..3f756c515 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -57,6 +57,16 @@ bool NO_COPY fhandler_console::invisible_console; Only one console can exist in a process, therefore, static is suitable. */ static struct fhandler_base::rabuf_t con_ra; +/* Write pending buffer for ESC sequence handling + in xterm compatible mode */ +#define WPBUF_LEN 256 +static unsigned char wpbuf[WPBUF_LEN]; +static int wpixput; +#define wpbuf_put(x) \ + wpbuf[wpixput++] = x; \ + if (wpixput > WPBUF_LEN) \ + wpixput--; + static void beep () { @@ -2014,6 +2024,82 @@ fhandler_console::char_command (char c) char buf[40]; int r, g, b; + if (wincap.has_con_24bit_colors () && !con_is_legacy) + { + /* For xterm compatible mode */ + DWORD wn; + switch (c) + { + case 'r': /* DECSTBM */ + con.scroll_region.Top = con.args[0] ? con.args[0] - 1 : 0; + con.scroll_region.Bottom = con.args[1] ? con.args[1] - 1 : -1; + wpbuf_put (c); + /* Just send the sequence */ + WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + break; + case 'L': /* IL */ + if (wincap.has_con_broken_il_dl ()) + { + /* Use "CSI Ps T" instead */ + cursor_get (&x, &y); + __small_sprintf (buf, "\033[%d;%dr", + y + 1 - con.b.srWindow.Top, + srBottom + 1 - con.b.srWindow.Top); + WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0); + wpbuf_put ('T'); + WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + __small_sprintf (buf, "\033[%d;%dr", + srTop + 1 - con.b.srWindow.Top, + srBottom + 1 - con.b.srWindow.Top); + WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0); + __small_sprintf (buf, "\033[%d;%dH", + y + 1 - con.b.srWindow.Top, x + 1); + WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0); + } + else + { + wpbuf_put (c); + /* Just send the sequence */ + WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + } + break; + case 'M': /* DL */ + if (wincap.has_con_broken_il_dl ()) + { + /* Use "CSI Ps S" instead */ + cursor_get (&x, &y); + __small_sprintf (buf, "\033[%d;%dr", + y + 1 - con.b.srWindow.Top, + srBottom + 1 - con.b.srWindow.Top); + WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0); + wpbuf_put ('S'); + WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + __small_sprintf (buf, "\033[%d;%dr", + srTop + 1 - con.b.srWindow.Top, + srBottom + 1 - con.b.srWindow.Top); + WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0); + __small_sprintf (buf, "\033[%d;%dH", + y + 1 - con.b.srWindow.Top, x + 1); + WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0); + } + else + { + wpbuf_put (c); + /* Just send the sequence */ + WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + } + break; + default: + /* Other escape sequences */ + wpbuf_put (c); + /* Just send the sequence */ + WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + break; + } + return; + } + + /* For legacy cygwin treminal */ switch (c) { case 'm': /* Set Graphics Rendition */ @@ -2641,6 +2727,7 @@ fhandler_console::write_normal (const unsigned char *src, while (found < end && found - src < CONVERT_LIMIT && base_chars[*found] != IGN + && base_chars[*found] != ESC && ((wincap.has_con_24bit_colors () && !con_is_legacy) || base_chars[*found] == NOR)) { @@ -2712,6 +2799,7 @@ do_print: break; case ESC: con.state = gotesc; + wpbuf_put (*found); break; case DWN: cursor_get (&x, &y); @@ -2826,6 +2914,7 @@ fhandler_console::write (const void *vsrc, size_t len) case gotesc: if (*src == '[') /* CSI Control Sequence Introducer */ { + wpbuf_put (*src); con.state = gotsquare; memset (con.args, 0, sizeof con.args); con.nargs = 0; @@ -2833,18 +2922,55 @@ fhandler_console::write (const void *vsrc, size_t len) con.saw_greater_than_sign = false; con.saw_space = false; } + else if (wincap.has_con_24bit_colors () && !con_is_legacy + && wincap.has_con_broken_il_dl () && *src == 'M') + { /* Reverse Index (scroll down) */ + int x, y; + DWORD n; + cursor_get (&x, &y); + if (y == srTop) + { + /* Erase scroll down area */ + char buf[] = "\033[32768;1H\033[J\033[32768;32768"; + __small_sprintf (buf, "\033[%d;1H\033[J\033[%d;%dH", + srBottom - con.b.srWindow.Top + 1, + y + 1 - con.b.srWindow.Top, x + 1); + WriteConsoleA (get_output_handle (), + buf, strlen (buf), &n, 0); + /* Substitute "CSI Ps T" */ + wpbuf_put ('['); + wpbuf_put ('T'); + } + else + wpbuf_put (*src); + WriteConsoleA (get_output_handle (), wpbuf, wpixput, &n, 0); + con.state = normal; + wpixput = 0; + } + else if (wincap.has_con_24bit_colors () && !con_is_legacy) + { /* Only CSI is handled in xterm compatible mode. */ + wpbuf_put (*src); + /* Just send the sequence */ + DWORD n; + WriteConsoleA (get_output_handle (), wpbuf, wpixput, &n, 0); + con.state = normal; + wpixput = 0; + } else if (*src == ']') /* OSC Operating System Command */ { + wpbuf_put (*src); con.rarg = 0; con.my_title_buf[0] = '\0'; con.state = gotrsquare; } else if (*src == '(') /* Designate G0 character set */ { + wpbuf_put (*src); con.state = gotparen; } else if (*src == ')') /* Designate G1 character set */ { + wpbuf_put (*src); con.state = gotrparen; } else if (*src == 'M') /* Reverse Index (scroll down) */ @@ -2852,6 +2978,7 @@ fhandler_console::write (const void *vsrc, size_t len) con.fillin (get_output_handle ()); scroll_buffer_screen (0, 0, -1, -1, 0, 1); con.state = normal; + wpixput = 0; } else if (*src == 'c') /* RIS Full Reset */ { @@ -2862,22 +2989,29 @@ fhandler_console::write (const void *vsrc, size_t len) cursor_set (false, 0, 0); clear_screen (cl_buf_beg, cl_buf_beg, cl_buf_end, cl_buf_end); con.state = normal; + wpixput = 0; } else if (*src == '8') /* DECRC Restore cursor position */ { cursor_set (false, con.savex, con.savey); con.state = normal; + wpixput = 0; } else if (*src == '7') /* DECSC Save cursor position */ { cursor_get (&con.savex, &con.savey); con.state = normal; + wpixput = 0; } else if (*src == 'R') /* ? */ + { con.state = normal; + wpixput = 0; + } else { con.state = normal; + wpixput = 0; } src++; break; @@ -2885,10 +3019,12 @@ fhandler_console::write (const void *vsrc, size_t len) if (isdigit (*src)) { con.args[con.nargs] = con.args[con.nargs] * 10 + *src - '0'; + wpbuf_put (*src); src++; } else if (*src == ';') { + wpbuf_put (*src); src++; con.nargs++; if (con.nargs > MAXARGS) @@ -2896,6 +3032,7 @@ fhandler_console::write (const void *vsrc, size_t len) } else if (*src == ' ') { + wpbuf_put (*src); src++; con.saw_space = true; con.state = gotcommand; @@ -2909,6 +3046,7 @@ fhandler_console::write (const void *vsrc, size_t len) con.nargs--; char_command (*src++); con.state = normal; + wpixput = 0; break; case gotrsquare: if (isdigit (*src)) @@ -2919,6 +3057,7 @@ fhandler_console::write (const void *vsrc, size_t len) con.state = eatpalette; else con.state = eattitle; + wpbuf_put (*src); src++; break; case eattitle: @@ -2930,20 +3069,28 @@ fhandler_console::write (const void *vsrc, size_t len) if (*src == '\007' && con.state == gettitle) set_console_title (con.my_title_buf); con.state = normal; + wpixput = 0; } else if (n < TITLESIZE) { con.my_title_buf[n++] = *src; con.my_title_buf[n] = '\0'; + wpbuf_put (*src); } src++; break; } case eatpalette: if (*src == '\033') - con.state = endpalette; + { + wpbuf_put (*src); + con.state = endpalette; + } else if (*src == '\a') - con.state = normal; + { + con.state = normal; + wpixput = 0; + } src++; break; case endpalette: @@ -2952,12 +3099,14 @@ fhandler_console::write (const void *vsrc, size_t len) else /* Sequence error (abort) */ con.state = normal; + wpixput = 0; src++; break; case gotsquare: if (*src == ';') { con.state = gotarg1; + wpbuf_put (*src); con.nargs++; if (con.nargs > MAXARGS) con.nargs--; @@ -2971,6 +3120,7 @@ fhandler_console::write (const void *vsrc, size_t len) con.saw_question_mark = true; else if (*src == '>') con.saw_greater_than_sign = true; + wpbuf_put (*src); /* ignore any extra chars between [ and first arg or command */ src++; } @@ -2983,6 +3133,7 @@ fhandler_console::write (const void *vsrc, size_t len) else con.vt100_graphics_mode_G0 = false; con.state = normal; + wpixput = 0; src++; break; case gotrparen: /* Designate G1 Character Set (ISO 2022) */ @@ -2991,6 +3142,7 @@ fhandler_console::write (const void *vsrc, size_t len) else con.vt100_graphics_mode_G1 = false; con.state = normal; + wpixput = 0; src++; break; } diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index a52262b89..714a6d49f 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -43,6 +43,7 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = { no_msv1_0_s4u_logon_in_wow64:true, has_con_24bit_colors:false, has_con_broken_csi3j:false, + has_con_broken_il_dl:false, }, }; @@ -71,6 +72,7 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = { no_msv1_0_s4u_logon_in_wow64:true, has_con_24bit_colors:false, has_con_broken_csi3j:false, + has_con_broken_il_dl:false, }, }; @@ -99,6 +101,7 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = { no_msv1_0_s4u_logon_in_wow64:false, has_con_24bit_colors:false, has_con_broken_csi3j:false, + has_con_broken_il_dl:false, }, }; @@ -127,6 +130,7 @@ wincaps wincap_8_1 __attribute__((section (".cygwin_dll_common"), shared)) = { no_msv1_0_s4u_logon_in_wow64:false, has_con_24bit_colors:false, has_con_broken_csi3j:false, + has_con_broken_il_dl:false, }, }; @@ -155,6 +159,7 @@ wincaps wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared)) no_msv1_0_s4u_logon_in_wow64:false, has_con_24bit_colors:false, has_con_broken_csi3j:false, + has_con_broken_il_dl:false, }, }; @@ -183,6 +188,7 @@ wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) = no_msv1_0_s4u_logon_in_wow64:false, has_con_24bit_colors:true, has_con_broken_csi3j:false, + has_con_broken_il_dl:false, }, }; @@ -211,6 +217,7 @@ wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) = no_msv1_0_s4u_logon_in_wow64:false, has_con_24bit_colors:true, has_con_broken_csi3j:false, + has_con_broken_il_dl:false, }, }; @@ -239,6 +246,7 @@ wincaps wincap_10_1803 __attribute__((section (".cygwin_dll_common"), shared)) = no_msv1_0_s4u_logon_in_wow64:false, has_con_24bit_colors:true, has_con_broken_csi3j:false, + has_con_broken_il_dl:false, }, }; @@ -267,6 +275,7 @@ wincaps wincap_10_1809 __attribute__((section (".cygwin_dll_common"), shared)) = no_msv1_0_s4u_logon_in_wow64:false, has_con_24bit_colors:true, has_con_broken_csi3j:true, + has_con_broken_il_dl:false, }, }; @@ -295,6 +304,7 @@ wincaps wincap_10_1903 __attribute__((section (".cygwin_dll_common"), shared)) = no_msv1_0_s4u_logon_in_wow64:false, has_con_24bit_colors:true, has_con_broken_csi3j:false, + has_con_broken_il_dl:true, }, }; diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h index 11902d976..f85a88877 100644 --- a/winsup/cygwin/wincap.h +++ b/winsup/cygwin/wincap.h @@ -37,6 +37,7 @@ struct wincaps unsigned no_msv1_0_s4u_logon_in_wow64 : 1; unsigned has_con_24bit_colors : 1; unsigned has_con_broken_csi3j : 1; + unsigned has_con_broken_il_dl : 1; }; }; @@ -97,6 +98,7 @@ public: bool IMPLEMENT (no_msv1_0_s4u_logon_in_wow64) bool IMPLEMENT (has_con_24bit_colors) bool IMPLEMENT (has_con_broken_csi3j) + bool IMPLEMENT (has_con_broken_il_dl) void disable_case_sensitive_dirs () { From 3b42762e0b02ad53cc01dd752b94a044b7a42ebf Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 27 Feb 2020 00:33:00 +0900 Subject: [PATCH 232/520] Cygwin: console: Unify workaround code for CSI3J and CSI?1049h/l. - This patch unifies workaround code for CSI3J and CSI?1049h/l into the code handling other escape sequences in xterm mode. --- winsup/cygwin/fhandler_console.cc | 43 ++++++++++++++++--------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 3f756c515..fbeccffad 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1786,24 +1786,6 @@ static const wchar_t __vt100_conv[31] = { inline bool fhandler_console::write_console (PWCHAR buf, DWORD len, DWORD& done) { - bool need_fix_tab_position = false; - /* Check if screen will be alternated. */ - if (wincap.has_con_24bit_colors () && !con_is_legacy - && memmem (buf, len*sizeof (WCHAR), L"\033[?1049", 7*sizeof (WCHAR))) - need_fix_tab_position = true; - /* Workaround for broken CSI3J (ESC[3J) support in xterm compatible mode. */ - if (wincap.has_con_24bit_colors () && !con_is_legacy && - wincap.has_con_broken_csi3j ()) - { - WCHAR *p = buf; - while ((p = (WCHAR *) memmem (p, (len - (p - buf))*sizeof (WCHAR), - L"\033[3J", 4*sizeof (WCHAR)))) - { - memmove (p, p+4, (len - (p+4 - buf))*sizeof (WCHAR)); - len -= 4; - } - } - if (con.iso_2022_G1 ? con.vt100_graphics_mode_G1 : con.vt100_graphics_mode_G0) @@ -1822,9 +1804,6 @@ fhandler_console::write_console (PWCHAR buf, DWORD len, DWORD& done) len -= done; buf += done; } - /* Call fix_tab_position() if screen has been alternated. */ - if (need_fix_tab_position) - fix_tab_position (); return true; } @@ -2089,6 +2068,28 @@ fhandler_console::char_command (char c) WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); } break; + case 'J': /* ED */ + wpbuf_put (c); + /* Ignore CSI3J in Win10 1809 because it is broken. */ + if (con.args[0] != 3 || !wincap.has_con_broken_csi3j ()) + WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + break; + case 'h': /* DECSET */ + case 'l': /* DECRST */ + wpbuf_put (c); + /* Just send the sequence */ + WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + if (con.saw_question_mark) + { + bool need_fix_tab_position = false; + for (int i = 0; i < con.nargs; i++) + if (con.args[i] == 1049) + need_fix_tab_position = true; + /* Call fix_tab_position() if screen has been alternated. */ + if (need_fix_tab_position) + fix_tab_position (); + } + break; default: /* Other escape sequences */ wpbuf_put (c); From 0d7bbc0bc3da7d7c9e0a76243cbeaf458724d32d Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 27 Feb 2020 00:33:01 +0900 Subject: [PATCH 233/520] Cygwin: console: Add support for REP escape sequence to xterm mode. - In Win10 upto 1809, xterm compatible mode does not have REP escape sequence which terminfo declares. This patch adds support for "CSI Ps b" (REP). With this patch, bvi (binary editor) works normally in Win10 1809. Also, xterm compatible mode does not have "CSI Pm `" (HPA), "CSI Pm a" (HPR) and "CSI Ps e" (VPR). However, they do not appear to be declared by terminfo. Therefore, these have been pending. --- winsup/cygwin/fhandler_console.cc | 33 +++++++++++++++++++++++++++++++ winsup/cygwin/wincap.cc | 10 ++++++++++ winsup/cygwin/wincap.h | 2 ++ 3 files changed, 45 insertions(+) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index fbeccffad..f87d93269 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -62,6 +62,7 @@ static struct fhandler_base::rabuf_t con_ra; #define WPBUF_LEN 256 static unsigned char wpbuf[WPBUF_LEN]; static int wpixput; +static unsigned char last_char; #define wpbuf_put(x) \ wpbuf[wpixput++] = x; \ if (wpixput > WPBUF_LEN) \ @@ -2009,6 +2010,37 @@ fhandler_console::char_command (char c) DWORD wn; switch (c) { +#if 0 /* These sequences, which are supported by real xterm, are + not supported by xterm compatible mode. Therefore they + were implemented once. However, these are not declared + in terminfo of xterm-256color, therefore, do not appear + to be necessary. */ + case '`': /* HPA */ + if (con.args[0] == 0) + con.args[0] = 1; + cursor_get (&x, &y); + cursor_set (false, con.args[0]-1, y); + break; + case 'a': /* HPR */ + if (con.args[0] == 0) + con.args[0] = 1; + cursor_rel (con.args[0], 0); + break; + case 'e': /* VPR */ + if (con.args[0] == 0) + con.args[0] = 1; + cursor_rel (0, con.args[0]); + break; +#endif + case 'b': /* REP */ + wpbuf_put (c); + if (wincap.has_con_esc_rep ()) + /* Just send the sequence */ + WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + else if (last_char && last_char != '\n') + for (int i = 0; i < con.args[0]; i++) + WriteConsoleA (get_output_handle (), &last_char, 1, &wn, 0); + break; case 'r': /* DECSTBM */ con.scroll_region.Top = con.args[0] ? con.args[0] - 1 : 0; con.scroll_region.Bottom = con.args[1] ? con.args[1] - 1 : -1; @@ -2746,6 +2778,7 @@ fhandler_console::write_normal (const unsigned char *src, break; default: found += ret; + last_char = *(found - 1); break; } } diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index 714a6d49f..922705e65 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -44,6 +44,7 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = { has_con_24bit_colors:false, has_con_broken_csi3j:false, has_con_broken_il_dl:false, + has_con_esc_rep:false, }, }; @@ -73,6 +74,7 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = { has_con_24bit_colors:false, has_con_broken_csi3j:false, has_con_broken_il_dl:false, + has_con_esc_rep:false, }, }; @@ -102,6 +104,7 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = { has_con_24bit_colors:false, has_con_broken_csi3j:false, has_con_broken_il_dl:false, + has_con_esc_rep:false, }, }; @@ -131,6 +134,7 @@ wincaps wincap_8_1 __attribute__((section (".cygwin_dll_common"), shared)) = { has_con_24bit_colors:false, has_con_broken_csi3j:false, has_con_broken_il_dl:false, + has_con_esc_rep:false, }, }; @@ -160,6 +164,7 @@ wincaps wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared)) has_con_24bit_colors:false, has_con_broken_csi3j:false, has_con_broken_il_dl:false, + has_con_esc_rep:false, }, }; @@ -189,6 +194,7 @@ wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_24bit_colors:true, has_con_broken_csi3j:false, has_con_broken_il_dl:false, + has_con_esc_rep:false, }, }; @@ -218,6 +224,7 @@ wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_24bit_colors:true, has_con_broken_csi3j:false, has_con_broken_il_dl:false, + has_con_esc_rep:false, }, }; @@ -247,6 +254,7 @@ wincaps wincap_10_1803 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_24bit_colors:true, has_con_broken_csi3j:false, has_con_broken_il_dl:false, + has_con_esc_rep:false, }, }; @@ -276,6 +284,7 @@ wincaps wincap_10_1809 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_24bit_colors:true, has_con_broken_csi3j:true, has_con_broken_il_dl:false, + has_con_esc_rep:false, }, }; @@ -305,6 +314,7 @@ wincaps wincap_10_1903 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_24bit_colors:true, has_con_broken_csi3j:false, has_con_broken_il_dl:true, + has_con_esc_rep:true, }, }; diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h index f85a88877..6d7a1eae6 100644 --- a/winsup/cygwin/wincap.h +++ b/winsup/cygwin/wincap.h @@ -38,6 +38,7 @@ struct wincaps unsigned has_con_24bit_colors : 1; unsigned has_con_broken_csi3j : 1; unsigned has_con_broken_il_dl : 1; + unsigned has_con_esc_rep : 1; }; }; @@ -99,6 +100,7 @@ public: bool IMPLEMENT (has_con_24bit_colors) bool IMPLEMENT (has_con_broken_csi3j) bool IMPLEMENT (has_con_broken_il_dl) + bool IMPLEMENT (has_con_esc_rep) void disable_case_sensitive_dirs () { From c13cdfd00ed09d23e5cf1864033a1bfd54bc3aab Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 27 Feb 2020 00:33:02 +0900 Subject: [PATCH 234/520] Cygwin: console: Add emulation of CSI3J on Win10 1809. - This patch add emulation of CSI3J, which is broken in Win10 1809, rather than ignoring it as before. --- winsup/cygwin/fhandler_console.cc | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index f87d93269..4ab9bcab8 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -2102,8 +2102,23 @@ fhandler_console::char_command (char c) break; case 'J': /* ED */ wpbuf_put (c); - /* Ignore CSI3J in Win10 1809 because it is broken. */ - if (con.args[0] != 3 || !wincap.has_con_broken_csi3j ()) + if (con.args[0] == 3 && wincap.has_con_broken_csi3j ()) + { /* Workaround for broken CSI3J in Win10 1809 */ + CONSOLE_SCREEN_BUFFER_INFO sbi; + GetConsoleScreenBufferInfo (get_output_handle (), &sbi); + SMALL_RECT r = {0, sbi.srWindow.Top, + (SHORT) (sbi.dwSize.X - 1), (SHORT) (sbi.dwSize.Y - 1)}; + CHAR_INFO f = {' ', sbi.wAttributes}; + COORD d = {0, 0}; + ScrollConsoleScreenBufferA (get_output_handle (), + &r, NULL, d, &f); + SetConsoleCursorPosition (get_output_handle (), d); + d = sbi.dwCursorPosition; + d.Y -= sbi.srWindow.Top; + SetConsoleCursorPosition (get_output_handle (), d); + } + else + /* Just send the sequence */ WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); break; case 'h': /* DECSET */ From ba2f251d439294c7087f3a38a8d407c95cdc5c1e Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Wed, 26 Feb 2020 18:48:51 +0000 Subject: [PATCH 235/520] Cygwin: Update dumper for bfd API changes Update dumper for bfd API changes in binutils 2.34 libbfd doesn't guarantee API stability, so we've just been lucky this hasn't broken more often. See binutils commit fd361982. --- winsup/utils/dumper.cc | 30 ++++++++++++++++++++++-------- winsup/utils/parse_pe.cc | 4 ++++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc index f71bdda8b..226c2283d 100644 --- a/winsup/utils/dumper.cc +++ b/winsup/utils/dumper.cc @@ -39,6 +39,20 @@ #define NOTE_NAME_SIZE 16 +#ifdef bfd_get_section_size +/* for bfd < 2.34 */ +#define get_section_name(abfd, sect) bfd_get_section_name (abfd, sect) +#define get_section_size(sect) bfd_get_section_size(sect) +#define set_section_size(abfd, sect, size) bfd_set_section_size(abfd, sect, size) +#define set_section_flags(abfd, sect, flags) bfd_set_section_flags(abfd, sect, flags) +#else +/* otherwise bfd >= 2.34 */ +#define get_section_name(afbd, sect) bfd_section_name (sect) +#define get_section_size(sect) bfd_section_size(sect) +#define set_section_size(abfd, sect, size) bfd_set_section_size(sect, size) +#define set_section_flags(abfd, sect, flags) bfd_set_section_flags(sect, flags) +#endif + typedef struct _note_header { Elf_External_Note elf_note_header; @@ -131,7 +145,7 @@ dumper::sane () void print_section_name (bfd* abfd, asection* sect, PTR obj) { - deb_printf (" %s", bfd_get_section_name (abfd, sect)); + deb_printf (" %s", get_section_name (abfd, sect)); } void @@ -712,10 +726,10 @@ dumper::prepare_core_dump () if (p->type == pr_ent_module && status_section != NULL) { - if (!bfd_set_section_size (core_bfd, - status_section, - (bfd_get_section_size (status_section) - + sect_size))) + if (!set_section_size (core_bfd, + status_section, + (get_section_size (status_section) + + sect_size))) { bfd_perror ("resizing status section"); goto failed; @@ -738,8 +752,8 @@ dumper::prepare_core_dump () goto failed; } - if (!bfd_set_section_flags (core_bfd, new_section, sect_flags) || - !bfd_set_section_size (core_bfd, new_section, sect_size)) + if (!set_section_flags (core_bfd, new_section, sect_flags) || + !set_section_size (core_bfd, new_section, sect_size)) { bfd_perror ("setting section attributes"); goto failed; @@ -823,7 +837,7 @@ dumper::write_core_dump () deb_printf ("writing section type=%u base=%p size=%p flags=%08x\n", p->type, p->section->vma, - bfd_get_section_size (p->section), + get_section_size (p->section), p->section->flags); switch (p->type) diff --git a/winsup/utils/parse_pe.cc b/winsup/utils/parse_pe.cc index 2a388638c..90b5c0b0d 100644 --- a/winsup/utils/parse_pe.cc +++ b/winsup/utils/parse_pe.cc @@ -25,6 +25,10 @@ #include "dumper.h" +#ifndef bfd_get_section_size +#define bfd_get_section_size(sect) bfd_section_size(sect) +#endif + int exclusion::add (LPBYTE mem_base, SIZE_T mem_size) { From 92b8b300c26c20ea441f69b36da9a838aa85c2d8 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 28 Feb 2020 12:39:41 +0100 Subject: [PATCH 236/520] Cygwin: AF_UNIX: fix creating shared mem region in dup reopen_shmem is accidentally called on the parent fhandler rather than the child fhandler, and it's called too early. Make sure to call it on the child and only after its shmem_handle is valid. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_socket_unix.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/winsup/cygwin/fhandler_socket_unix.cc b/winsup/cygwin/fhandler_socket_unix.cc index eea7e76b3..824bcba2e 100644 --- a/winsup/cygwin/fhandler_socket_unix.cc +++ b/winsup/cygwin/fhandler_socket_unix.cc @@ -1201,12 +1201,6 @@ fhandler_socket_unix::dup (fhandler_base *child, int flags) return -1; } fhandler_socket_unix *fhs = (fhandler_socket_unix *) child; - if (reopen_shmem () < 0) - { - __seterrno (); - fhs->close (); - return -1; - } if (backing_file_handle && backing_file_handle != INVALID_HANDLE_VALUE && !DuplicateHandle (GetCurrentProcess (), backing_file_handle, GetCurrentProcess (), &fhs->backing_file_handle, @@ -1224,6 +1218,12 @@ fhandler_socket_unix::dup (fhandler_base *child, int flags) fhs->close (); return -1; } + if (fhs->reopen_shmem () < 0) + { + __seterrno (); + fhs->close (); + return -1; + } fhs->sun_path (sun_path ()); fhs->peer_sun_path (peer_sun_path ()); fhs->connect_wait_thr = NULL; From f5357141ade956d8057e76b0a5e58f5069a6d399 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 28 Feb 2020 12:40:49 +0100 Subject: [PATCH 237/520] Cygwin: AF_UNIX: use Nt functions within Nt functions Functionaly equivalent, but makes for cleaner code Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_socket_unix.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/fhandler_socket_unix.cc b/winsup/cygwin/fhandler_socket_unix.cc index 824bcba2e..760f210bf 100644 --- a/winsup/cygwin/fhandler_socket_unix.cc +++ b/winsup/cygwin/fhandler_socket_unix.cc @@ -1436,10 +1436,10 @@ fhandler_socket_unix::socketpair (int af, int type, int protocol, int flags, fh_open_pipe_failed: NtClose (pipe); create_pipe_failed: - NtUnmapViewOfSection (GetCurrentProcess (), fh->shmem); + NtUnmapViewOfSection (NtCurrentProcess (), fh->shmem); NtClose (fh->shmem_handle); fh_shmem_failed: - NtUnmapViewOfSection (GetCurrentProcess (), shmem); + NtUnmapViewOfSection (NtCurrentProcess (), shmem); NtClose (shmem_handle); return -1; } @@ -1814,7 +1814,7 @@ fhandler_socket_unix::close () NtClose (shm); param = InterlockedExchangePointer ((PVOID *) &shmem, NULL); if (param) - NtUnmapViewOfSection (GetCurrentProcess (), param); + NtUnmapViewOfSection (NtCurrentProcess (), param); return 0; } From a834dc1ba923d33a87f0dc3be0e23a9aa81603b8 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 28 Feb 2020 14:31:56 +0100 Subject: [PATCH 238/520] Cygwin: 32 bit: remove old code to 16 bit align stack Aligning the stack pointer using an asm statement isn't any longer supported. gcc-9.2.0 generates the following warning: init.cc:33:46: error: listing the stack pointer register '%esp' in a clobber list is deprecated [-Werror=deprecated] [...] init.cc:33:46: note: the value of the stack pointer after an 'asm' statement must be the same as it was before the statement Replace the asm expression with the gcc function attribute `force_align_arg_pointer'. This aligns the stack exactly as required. Signed-off-by: Corinna Vinschen --- winsup/cygwin/crt0.c | 14 +++----------- winsup/cygwin/init.cc | 13 +++---------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/winsup/cygwin/crt0.c b/winsup/cygwin/crt0.c index fee4b2e24..ec7959a0f 100644 --- a/winsup/cygwin/crt0.c +++ b/winsup/cygwin/crt0.c @@ -16,20 +16,12 @@ extern int main (int argc, char **argv); void cygwin_crt0 (int (*main) (int, char **)); +#ifdef __i386__ +__attribute__ ((force_align_arg_pointer)) +#endif void mainCRTStartup () { -#ifdef __i386__ -#if __GNUC_PREREQ(6,0) -#pragma GCC diagnostic ignored "-Wframe-address" -#endif - (void)__builtin_return_address(1); -#if __GNUC_PREREQ(6,0) -#pragma GCC diagnostic pop -#endif - asm volatile ("andl $-16,%%esp" ::: "%esp"); -#endif - cygwin_crt0 (main); /* These are never actually called. They are just here to force the inclusion diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc index 851a7ffed..7787b164c 100644 --- a/winsup/cygwin/init.cc +++ b/winsup/cygwin/init.cc @@ -19,19 +19,12 @@ unsigned threadfunc_ix[8]; static bool dll_finished_loading; #define OLDFUNC_OFFSET -1 +#ifdef __i386__ +__attribute__ ((force_align_arg_pointer)) +#endif static void WINAPI threadfunc_fe (VOID *arg) { -#ifdef __i386__ -#if __GNUC_PREREQ(6,0) -#pragma GCC diagnostic ignored "-Wframe-address" -#endif - (void)__builtin_return_address(1); -#if __GNUC_PREREQ(6,0) -#pragma GCC diagnostic pop -#endif - asm volatile ("andl $-16,%%esp" ::: "%esp"); -#endif _cygtls::call ((DWORD (*) (void *, void *)) TlsGetValue (_my_oldfunc), arg); } From 729cb70bcf232a1da956ec3725c1f76e28b3caa5 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 28 Feb 2020 13:21:05 +0100 Subject: [PATCH 239/520] Cygwin: AF_UNIX: rework fixup_after_exec fhandler_socket_unix::fixup_after_exec incorrectly calls fhandler_socket_unix::fixup_after_fork with a NULL parent process handle. Not only that calling DuplicateHandle with a NULL parent handle fails, but it's utterly wrong trying to duplicate the handles at all here. Rather just set some important values to NULL and reopen the shared memory region. Create a fixup_helper method to call common code from fixup_after_fork and fixup_after_exec. Add comments to other invocations of fixup_after_fork with NULL handle to mark them as correct this way. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_socket_inet.cc | 2 +- winsup/cygwin/fhandler_socket_unix.cc | 21 +++++++++++++-------- winsup/cygwin/fhandler_tty.cc | 2 +- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 55f18aebd..90805abb8 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1076,6 +1076,7 @@ class fhandler_socket_unix : public fhandler_socket void fixup_after_fork (HANDLE parent); void fixup_after_exec (); void set_close_on_exec (bool val); + void fixup_helper (); public: fhandler_socket_unix (); diff --git a/winsup/cygwin/fhandler_socket_inet.cc b/winsup/cygwin/fhandler_socket_inet.cc index 6f4383861..703781d17 100644 --- a/winsup/cygwin/fhandler_socket_inet.cc +++ b/winsup/cygwin/fhandler_socket_inet.cc @@ -534,7 +534,7 @@ void fhandler_socket_wsock::fixup_after_exec () { if (need_fixup_before () && !close_on_exec ()) - fixup_after_fork (NULL); + fixup_after_fork (NULL); /* No parent handle required. */ } int diff --git a/winsup/cygwin/fhandler_socket_unix.cc b/winsup/cygwin/fhandler_socket_unix.cc index 760f210bf..d7bb1090e 100644 --- a/winsup/cygwin/fhandler_socket_unix.cc +++ b/winsup/cygwin/fhandler_socket_unix.cc @@ -1149,6 +1149,16 @@ fhandler_socket_unix::set_cred () scred->gid = myself->gid; } +void +fhandler_socket_unix::fixup_helper () +{ + if (shmem_handle) + reopen_shmem (); + connect_wait_thr = NULL; + cwt_termination_evt = NULL; + cwt_param = NULL; +} + /* ========================== public methods ========================= */ void @@ -1158,20 +1168,15 @@ fhandler_socket_unix::fixup_after_fork (HANDLE parent) if (backing_file_handle && backing_file_handle != INVALID_HANDLE_VALUE) fork_fixup (parent, backing_file_handle, "backing_file_handle"); if (shmem_handle) - { - fork_fixup (parent, shmem_handle, "shmem_handle"); - reopen_shmem (); - } - connect_wait_thr = NULL; - cwt_termination_evt = NULL; - cwt_param = NULL; + fork_fixup (parent, shmem_handle, "shmem_handle"); + fixup_helper (); } void fhandler_socket_unix::fixup_after_exec () { if (!close_on_exec ()) - fixup_after_fork (NULL); + fixup_helper (); } void diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 153bdad79..b42e0aeb6 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -2974,7 +2974,7 @@ fhandler_pty_slave::fixup_after_exec () reset_switch_to_pcon (); if (!close_on_exec ()) - fixup_after_fork (NULL); + fixup_after_fork (NULL); /* No parent handle required. */ else if (get_pseudo_console ()) { int used = 0; From 002206dc7cac5f3cc4d1282439c7a0c619a37b7f Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Thu, 27 Feb 2020 11:33:50 +0900 Subject: [PATCH 240/520] Cygwin: console: Adjust the detailed behaviour of ESC sequences. - This patch makes some detailed behaviour of ESC sequences such as "CSI Ps L" (IL), "CSI Ps M" (DL) and "ESC M" (RI) in xterm mode match with real xterm. --- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_console.cc | 51 ++++++++++++++++++++++++++----- 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 90805abb8..adaf19203 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1862,6 +1862,7 @@ class dev_console bool saw_question_mark; bool saw_greater_than_sign; bool saw_space; + bool saw_exclamation_mark; bool vt100_graphics_mode_G0; bool vt100_graphics_mode_G1; bool iso_2022_G1; diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 4ab9bcab8..64e12b832 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -2053,6 +2053,19 @@ fhandler_console::char_command (char c) { /* Use "CSI Ps T" instead */ cursor_get (&x, &y); + if (y < srTop || y > srBottom) + break; + if (y == con.b.srWindow.Top + && srBottom == con.b.srWindow.Bottom) + { + /* Erase scroll down area */ + n = con.args[0] ? : 1; + __small_sprintf (buf, "\033[%d;1H\033[J\033[%d;%dH", + srBottom - (n-1) - con.b.srWindow.Top + 1, + y + 1 - con.b.srWindow.Top, x + 1); + WriteConsoleA (get_output_handle (), + buf, strlen (buf), &wn, 0); + } __small_sprintf (buf, "\033[%d;%dr", y + 1 - con.b.srWindow.Top, srBottom + 1 - con.b.srWindow.Top); @@ -2079,6 +2092,8 @@ fhandler_console::char_command (char c) { /* Use "CSI Ps S" instead */ cursor_get (&x, &y); + if (y < srTop || y > srBottom) + break; __small_sprintf (buf, "\033[%d;%dr", y + 1 - con.b.srWindow.Top, srBottom + 1 - con.b.srWindow.Top); @@ -2137,6 +2152,16 @@ fhandler_console::char_command (char c) fix_tab_position (); } break; + case 'p': + if (con.saw_exclamation_mark) /* DECSTR Soft reset */ + { + con.scroll_region.Top = 0; + con.scroll_region.Bottom = -1; + } + wpbuf_put (c); + /* Just send the sequence */ + WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + break; default: /* Other escape sequences */ wpbuf_put (c); @@ -2970,6 +2995,7 @@ fhandler_console::write (const void *vsrc, size_t len) con.saw_question_mark = false; con.saw_greater_than_sign = false; con.saw_space = false; + con.saw_exclamation_mark = false; } else if (wincap.has_con_24bit_colors () && !con_is_legacy && wincap.has_con_broken_il_dl () && *src == 'M') @@ -2979,13 +3005,17 @@ fhandler_console::write (const void *vsrc, size_t len) cursor_get (&x, &y); if (y == srTop) { - /* Erase scroll down area */ - char buf[] = "\033[32768;1H\033[J\033[32768;32768"; - __small_sprintf (buf, "\033[%d;1H\033[J\033[%d;%dH", - srBottom - con.b.srWindow.Top + 1, - y + 1 - con.b.srWindow.Top, x + 1); - WriteConsoleA (get_output_handle (), - buf, strlen (buf), &n, 0); + if (y == con.b.srWindow.Top + && srBottom == con.b.srWindow.Bottom) + { + /* Erase scroll down area */ + char buf[] = "\033[32768;1H\033[J\033[32768;32768"; + __small_sprintf (buf, "\033[%d;1H\033[J\033[%d;%dH", + srBottom - con.b.srWindow.Top + 1, + y + 1 - con.b.srWindow.Top, x + 1); + WriteConsoleA (get_output_handle (), + buf, strlen (buf), &n, 0); + } /* Substitute "CSI Ps T" */ wpbuf_put ('['); wpbuf_put ('T'); @@ -2998,6 +3028,11 @@ fhandler_console::write (const void *vsrc, size_t len) } else if (wincap.has_con_24bit_colors () && !con_is_legacy) { /* Only CSI is handled in xterm compatible mode. */ + if (*src == 'c') /* RIS Full reset */ + { + con.scroll_region.Top = 0; + con.scroll_region.Bottom = -1; + } wpbuf_put (*src); /* Just send the sequence */ DWORD n; @@ -3169,6 +3204,8 @@ fhandler_console::write (const void *vsrc, size_t len) con.saw_question_mark = true; else if (*src == '>') con.saw_greater_than_sign = true; + else if (*src == '!') + con.saw_exclamation_mark = true; wpbuf_put (*src); /* ignore any extra chars between [ and first arg or command */ src++; From f973a7d8bea03ad840bdcbc7eae032516e75174b Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Mon, 2 Mar 2020 13:33:11 +0000 Subject: [PATCH 241/520] arm: Finish moving newlib to unified syntax for Thumb1 Most code in newlib already uses unified syntax, but just a couple of laggards remain. This patch removes these and means the the entire code base has now been converted. --- libgloss/arm/linux-syscalls0.S | 11 +++++++++++ newlib/libc/machine/arm/setjmp.S | 15 ++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/libgloss/arm/linux-syscalls0.S b/libgloss/arm/linux-syscalls0.S index b16648fc3..17d246e1c 100644 --- a/libgloss/arm/linux-syscalls0.S +++ b/libgloss/arm/linux-syscalls0.S @@ -6,6 +6,8 @@ * is freely granted, provided that this notice is preserved. */ + .syntax unified + #include "linux-syscall.h" #if __thumb__ @@ -146,12 +148,21 @@ ALIAS(utime) ALIAS(vfork) ALIAS(wait4) +#if defined (__thumb__) && !defined (__thumb2__) +# define SOCKETCALL(name, NAME) \ + GLOBAL(name); \ + push { r0 - r3 }; \ + movs r0, #SYS_ ## NAME; \ + b _socketcall_tail; \ + SIZE(name) +#else # define SOCKETCALL(name, NAME) \ GLOBAL(name); \ push { r0 - r3 }; \ mov r0, #SYS_ ## NAME; \ b _socketcall_tail; \ SIZE(name) +#endif FUNC(_socketcall_tail) mov r1, sp diff --git a/newlib/libc/machine/arm/setjmp.S b/newlib/libc/machine/arm/setjmp.S index 1ba711d5e..21d6ff9e7 100644 --- a/newlib/libc/machine/arm/setjmp.S +++ b/newlib/libc/machine/arm/setjmp.S @@ -57,6 +57,8 @@ For Thumb-2 do everything in Thumb mode. */ + .syntax unified + #if __ARM_ARCH_ISA_THUMB == 1 && !__ARM_ARCH_ISA_ARM /* ARMv6-M-like has to be implemented in Thumb mode. */ @@ -74,11 +76,11 @@ SYM (setjmp): mov r5, sp mov r6, lr stmia r0!, {r1, r2, r3, r4, r5, r6} - sub r0, r0, #40 + subs r0, r0, #40 /* Restore callee-saved low regs. */ ldmia r0!, {r4, r5, r6, r7} /* Return zero. */ - mov r0, #0 + movs r0, #0 bx lr .thumb_func @@ -86,7 +88,7 @@ SYM (setjmp): TYPE (longjmp) SYM (longjmp): /* Restore High regs. */ - add r0, r0, #16 + adds r0, r0, #16 ldmia r0!, {r2, r3, r4, r5, r6} mov r8, r2 mov r9, r3 @@ -95,12 +97,12 @@ SYM (longjmp): mov sp, r6 ldmia r0!, {r3} /* lr */ /* Restore low regs. */ - sub r0, r0, #40 + subs r0, r0, #40 ldmia r0!, {r4, r5, r6, r7} /* Return the result argument, or 1 if it is zero. */ - mov r0, r1 + movs r0, r1 bne 1f - mov r0, #1 + movs r0, #1 1: bx r3 @@ -126,7 +128,6 @@ SYM (longjmp): #endif #if defined(__thumb2__) -.syntax unified .macro MODE .thumb .thumb_func From cef36220f247e02847ee4f39790b7debcc50a36b Mon Sep 17 00:00:00 2001 From: Fabian Schriever Date: Mon, 2 Mar 2020 15:40:23 +0100 Subject: [PATCH 242/520] Fix error in powf for (-1.0, NaN) input Prevent confusion between -1.0 and 1.0 in powf. The corresponding similar error was previously fixed for pow (see commit bb25dd1b) --- newlib/libm/math/ef_pow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libm/math/ef_pow.c b/newlib/libm/math/ef_pow.c index 524e3f9b0..d9e85a95e 100644 --- a/newlib/libm/math/ef_pow.c +++ b/newlib/libm/math/ef_pow.c @@ -79,7 +79,7 @@ ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/ /* x|y==NaN return NaN unless x==1 then return 1 */ if(FLT_UWORD_IS_NAN(ix) || FLT_UWORD_IS_NAN(iy)) { - if(ix==0x3f800000) return one; + if(hx==0x3f800000) return one; else return nanf(""); } From 1b7fcf22bea529fba920310dcd2db144bb24ccc6 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 2 Mar 2020 17:02:51 +0100 Subject: [PATCH 243/520] Cygwin: ioctl: TIOCINQ: always return number of chars in the inbound queue So far ioctl(TIOCINQ) could end up returning -1 with errno set to EINVAL if a non-zero device error mask has been returned by ClearCommError. This doesn't reflect Linux behaviour, which always returns the number of chars in the inbound queue, independent of any I/O error condition. EINVAL was a pretty weird error code to use in this scenario, too. Fix this by dropping all checking for device errors in the TIOCINQ case. Just return the number of chars in the inbound queue. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_serial.cc | 9 +-------- winsup/cygwin/release/3.1.5 | 3 +++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc index 615b2513f..69e5768f6 100644 --- a/winsup/cygwin/fhandler_serial.cc +++ b/winsup/cygwin/fhandler_serial.cc @@ -519,14 +519,7 @@ fhandler_serial::ioctl (unsigned int cmd, void *buf) } break; case TIOCINQ: - if (ev & CE_FRAME || ev & CE_IOE || ev & CE_OVERRUN || ev & CE_RXOVER - || ev & CE_RXPARITY) - { - set_errno (EINVAL); /* FIXME: Use correct errno */ - res = -1; - } - else - ipbuf = st.cbInQue; + ipbuf = st.cbInQue; break; case TIOCGWINSZ: ((struct winsize *) buf)->ws_row = 0; diff --git a/winsup/cygwin/release/3.1.5 b/winsup/cygwin/release/3.1.5 index e34fdb88d..e567ecb32 100644 --- a/winsup/cygwin/release/3.1.5 +++ b/winsup/cygwin/release/3.1.5 @@ -9,3 +9,6 @@ Bug Fixes: - Fix a segfault when starting, e.g., mintty from a bash in a console running xterm emulation. Addresses: https://cygwin.com/ml/cygwin/2020-02/msg00197.html + +- Fix TIOCINQ to always return number of inbound chars if available. + Addresses: https://cygwin.com/ml/cygwin/2020-02/msg00258.html From 7f5051d76662838103666492a33505e0801c1ee7 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Mon, 2 Mar 2020 10:12:54 +0900 Subject: [PATCH 244/520] Cygwin: console: Revise the code to fix tab position. - This patch fixes the issue that the cursor position is broken if window size is changed while executing vim, less etc. --- winsup/cygwin/fhandler_console.cc | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 64e12b832..7c97a7868 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -417,19 +417,10 @@ fhandler_console::set_cursor_maybe () void fhandler_console::fix_tab_position (void) { - char buf[2048] = {0,}; - /* Save cursor position */ - __small_sprintf (buf+strlen (buf), "\0337"); - /* Clear all horizontal tabs */ - __small_sprintf (buf+strlen (buf), "\033[3g"); - /* Set horizontal tabs */ - for (int col=8; col Date: Mon, 2 Mar 2020 10:12:55 +0900 Subject: [PATCH 245/520] Cygwin: console: Fix setting/unsetting xterm mode for input. - This patch fixes the issue that xterm compatible mode for input is not correctly set/unset in some situation such as: 1) cat is stopped by ctrl-c. 2) The window size is changed in less. In case 1), request_xterm_mode_input(true) is called in read(), however, cat is stopped without request_xterm_mode_input(false). In case 2), less uses longjmp in signal handler, therefore, corresponding request_xterm_mode_input(false) is not called if the SIGWINCH signal is sent within read(). With this patch, InterlockedExchange() is used instead of InterlockedIncrement/ Decrement(). --- winsup/cygwin/fhandler_console.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 7c97a7868..9c5b80181 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -267,7 +267,7 @@ fhandler_console::request_xterm_mode_input (bool req) return; if (req) { - if (InterlockedIncrement (&con.xterm_mode_input) == 1) + if (InterlockedExchange (&con.xterm_mode_input, 1) == 0) { DWORD dwMode; GetConsoleMode (get_handle (), &dwMode); @@ -277,7 +277,7 @@ fhandler_console::request_xterm_mode_input (bool req) } else { - if (InterlockedDecrement (&con.xterm_mode_input) == 0) + if (InterlockedExchange (&con.xterm_mode_input, 0) == 1) { DWORD dwMode; GetConsoleMode (get_handle (), &dwMode); @@ -1171,6 +1171,7 @@ fhandler_console::close () if ((NT_SUCCESS (status) && obi.HandleCount == 1) || myself->pid == con.owner) request_xterm_mode_output (false); + request_xterm_mode_input (false); } release_output_mutex (); From 750cd6e5b2bb4ab74de7d2f9e0afb6dd0c005cf1 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Mon, 2 Mar 2020 10:12:56 +0900 Subject: [PATCH 246/520] Cygwin: console: Prevent buffer overrun. - This patch prevent potential buffer overrun in the code handling escape sequences. --- winsup/cygwin/fhandler_console.cc | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 9c5b80181..8b4687724 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -3094,7 +3094,8 @@ fhandler_console::write (const void *vsrc, size_t len) case gotarg1: if (isdigit (*src)) { - con.args[con.nargs] = con.args[con.nargs] * 10 + *src - '0'; + if (con.nargs < MAXARGS) + con.args[con.nargs] = con.args[con.nargs] * 10 + *src - '0'; wpbuf_put (*src); src++; } @@ -3102,9 +3103,8 @@ fhandler_console::write (const void *vsrc, size_t len) { wpbuf_put (*src); src++; - con.nargs++; - if (con.nargs > MAXARGS) - con.nargs--; + if (con.nargs < MAXARGS) + con.nargs++; } else if (*src == ' ') { @@ -3117,9 +3117,8 @@ fhandler_console::write (const void *vsrc, size_t len) con.state = gotcommand; break; case gotcommand: - con.nargs ++; - if (con.nargs > MAXARGS) - con.nargs--; + if (con.nargs < MAXARGS) + con.nargs++; char_command (*src++); con.state = normal; wpixput = 0; @@ -3183,9 +3182,8 @@ fhandler_console::write (const void *vsrc, size_t len) { con.state = gotarg1; wpbuf_put (*src); - con.nargs++; - if (con.nargs > MAXARGS) - con.nargs--; + if (con.nargs < MAXARGS) + con.nargs++; src++; } else if (isalpha (*src)) From b4bc238311ca66ce34de5bec2f8219e881cedfd0 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Mon, 2 Mar 2020 10:12:57 +0900 Subject: [PATCH 247/520] Cygwin: console: Add a workaround for "ESC 7" and "ESC 8". - In xterm compatible mode, "ESC 7" and "ESC 8" do not work properly in the senario: 1) Execute /bin/ls /bin to fill screen. 2) Sned CSI?1049h to alternate screen. 3) Reduce window size. 4) Send CSI?1049l to resume screen. 5) Send "ESC 7" and "ESC 8". After sending "ESC 8", the cursor goes to incorrect position. This patch adds a workaround for this issue. --- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_console.cc | 53 +++++++++++++++++++++++-------- 2 files changed, 41 insertions(+), 13 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index adaf19203..463bb83ab 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1869,6 +1869,7 @@ class dev_console bool alternate_charset_active; bool metabit; char backspace_keycode; + bool screen_alternated; /* For xterm compatible mode only */ char my_title_buf [TITLESIZE + 1]; diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 8b4687724..dffee240a 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -207,6 +207,8 @@ fhandler_console::setup () con.dwLastCursorPosition.Y = -1; con.dwLastMousePosition.X = -1; con.dwLastMousePosition.Y = -1; + con.savex = con.savey = -1; + con.screen_alternated = false; con.dwLastButtonState = 0; /* none pressed */ con.last_button_code = 3; /* released */ con.underline_color = FOREGROUND_GREEN | FOREGROUND_BLUE; @@ -2130,6 +2132,10 @@ fhandler_console::char_command (char c) break; case 'h': /* DECSET */ case 'l': /* DECRST */ + if (c == 'h') + con.screen_alternated = true; + else + con.screen_alternated = false; wpbuf_put (c); /* Just send the sequence */ WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); @@ -2989,6 +2995,36 @@ fhandler_console::write (const void *vsrc, size_t len) con.saw_space = false; con.saw_exclamation_mark = false; } + else if (*src == '8') /* DECRC Restore cursor position */ + { + if (con.screen_alternated) + { + /* For xterm mode only */ + DWORD n; + /* Just send the sequence */ + wpbuf_put (*src); + WriteConsoleA (get_output_handle (), wpbuf, wpixput, &n, 0); + } + else if (con.savex >= 0 && con.savey >= 0) + cursor_set (false, con.savex, con.savey); + con.state = normal; + wpixput = 0; + } + else if (*src == '7') /* DECSC Save cursor position */ + { + if (con.screen_alternated) + { + /* For xterm mode only */ + DWORD n; + /* Just send the sequence */ + wpbuf_put (*src); + WriteConsoleA (get_output_handle (), wpbuf, wpixput, &n, 0); + } + else + cursor_get (&con.savex, &con.savey); + con.state = normal; + wpixput = 0; + } else if (wincap.has_con_24bit_colors () && !con_is_legacy && wincap.has_con_broken_il_dl () && *src == 'M') { /* Reverse Index (scroll down) */ @@ -3019,12 +3055,15 @@ fhandler_console::write (const void *vsrc, size_t len) wpixput = 0; } else if (wincap.has_con_24bit_colors () && !con_is_legacy) - { /* Only CSI is handled in xterm compatible mode. */ + { if (*src == 'c') /* RIS Full reset */ { con.scroll_region.Top = 0; con.scroll_region.Bottom = -1; } + /* ESC sequences below (e.g. OSC, etc) are left to xterm + emulation in xterm compatible mode, therefore, are not + handled and just sent them. */ wpbuf_put (*src); /* Just send the sequence */ DWORD n; @@ -3067,18 +3106,6 @@ fhandler_console::write (const void *vsrc, size_t len) con.state = normal; wpixput = 0; } - else if (*src == '8') /* DECRC Restore cursor position */ - { - cursor_set (false, con.savex, con.savey); - con.state = normal; - wpixput = 0; - } - else if (*src == '7') /* DECSC Save cursor position */ - { - cursor_get (&con.savex, &con.savey); - con.state = normal; - wpixput = 0; - } else if (*src == 'R') /* ? */ { con.state = normal; From ecf27dd2e0ed1dff4dc919a7c805e951913d953f Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 2 Mar 2020 20:30:09 +0100 Subject: [PATCH 248/520] Cygwin: console: convert wpbuf_put to inline function fix potential buffer overrun while at it Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_console.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index dffee240a..c5f269168 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -63,10 +63,13 @@ static struct fhandler_base::rabuf_t con_ra; static unsigned char wpbuf[WPBUF_LEN]; static int wpixput; static unsigned char last_char; -#define wpbuf_put(x) \ - wpbuf[wpixput++] = x; \ - if (wpixput > WPBUF_LEN) \ - wpixput--; + +static inline void +wpbuf_put (unsigned char x) +{ + if (wpixput < WPBUF_LEN) + wpbuf[wpixput++] = x; +} static void beep () From d4bcecb3e91f73091195adbfdcb0d4287cdf1753 Mon Sep 17 00:00:00 2001 From: Fabian Schriever Date: Tue, 3 Mar 2020 14:49:06 +0100 Subject: [PATCH 249/520] Fix error in float trig. function range reduction The single-precision trigonometric functions show rather high errors in specific ranges starting at about 30000 radians. For example the sinf procedure produces an error of 7626.55 ULP with the input 5.195880078125e+04 (0x474AF6CD) (compared with MPFR in 128bit precision). For the test we used 100k values evenly spaced in the range of [30k, 70k]. The issues are periodic at higher ranges. This error was introduced when the double precision range reduction was first converted to float. The shift by 8 bits always returns 0 as iq is never higher than 255. The fix reduces the error of the example above to 0.45 ULP, highest error within the test set fell to 1.31 ULP, which is not perfect, but still a significant improvement. Testing other previously erroneous ranges no longer show particularly large accuracy errors. --- newlib/libm/math/kf_rem_pio2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libm/math/kf_rem_pio2.c b/newlib/libm/math/kf_rem_pio2.c index 1573ca9f6..3ca7cc20d 100644 --- a/newlib/libm/math/kf_rem_pio2.c +++ b/newlib/libm/math/kf_rem_pio2.c @@ -101,7 +101,7 @@ recompute: iq[jz-1] -= i<<(8-q0); ih = iq[jz-1]>>(7-q0); } - else if(q0==0) ih = iq[jz-1]>>8; + else if(q0==0) ih = iq[jz-1]>>7; else if(z>=(float)0.5) ih=2; if(ih>0) { /* q > 0.5 */ From b0f78f15b7ed5da4f062ed9e925b97f9e6ad2dc1 Mon Sep 17 00:00:00 2001 From: Hans-Bernhard Broeker Date: Sun, 8 Mar 2020 21:41:13 +0100 Subject: [PATCH 250/520] Collect handling of wpixput and wpbuf into a helper class. Replace direct access to a pair of co-dependent variables by calls to methods of a class that encapsulates their relation. Also replace C #define by C++ class constant. --- winsup/cygwin/fhandler_console.cc | 141 ++++++++++++++++-------------- 1 file changed, 76 insertions(+), 65 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index c5f269168..a86e0be84 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -59,17 +59,28 @@ static struct fhandler_base::rabuf_t con_ra; /* Write pending buffer for ESC sequence handling in xterm compatible mode */ -#define WPBUF_LEN 256 -static unsigned char wpbuf[WPBUF_LEN]; -static int wpixput; static unsigned char last_char; -static inline void -wpbuf_put (unsigned char x) +/* simple helper class to accumulate output in a buffer + and send that to the console on request: */ +static class write_pending_buffer { - if (wpixput < WPBUF_LEN) - wpbuf[wpixput++] = x; -} +private: + static const size_t WPBUF_LEN = 256u; + unsigned char buf[WPBUF_LEN]; + size_t ixput; +public: + inline void put (unsigned char x) + { + if (ixput < WPBUF_LEN) + buf[ixput++] = x; + } + inline void empty () { ixput = 0u; } + inline void send (HANDLE &handle, DWORD *wn = NULL) + { + WriteConsoleA (handle, buf, ixput, wn, 0); + } +} wpbuf; static void beep () @@ -2030,10 +2041,10 @@ fhandler_console::char_command (char c) break; #endif case 'b': /* REP */ - wpbuf_put (c); + wpbuf.put (c); if (wincap.has_con_esc_rep ()) /* Just send the sequence */ - WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + wpbuf.send (get_output_handle (), &wn); else if (last_char && last_char != '\n') for (int i = 0; i < con.args[0]; i++) WriteConsoleA (get_output_handle (), &last_char, 1, &wn, 0); @@ -2041,9 +2052,9 @@ fhandler_console::char_command (char c) case 'r': /* DECSTBM */ con.scroll_region.Top = con.args[0] ? con.args[0] - 1 : 0; con.scroll_region.Bottom = con.args[1] ? con.args[1] - 1 : -1; - wpbuf_put (c); + wpbuf.put (c); /* Just send the sequence */ - WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + wpbuf.send (get_output_handle (), &wn); break; case 'L': /* IL */ if (wincap.has_con_broken_il_dl ()) @@ -2067,8 +2078,8 @@ fhandler_console::char_command (char c) y + 1 - con.b.srWindow.Top, srBottom + 1 - con.b.srWindow.Top); WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0); - wpbuf_put ('T'); - WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + wpbuf.put ('T'); + wpbuf.send (get_output_handle (), &wn); __small_sprintf (buf, "\033[%d;%dr", srTop + 1 - con.b.srWindow.Top, srBottom + 1 - con.b.srWindow.Top); @@ -2079,9 +2090,9 @@ fhandler_console::char_command (char c) } else { - wpbuf_put (c); + wpbuf.put (c); /* Just send the sequence */ - WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + wpbuf.send (get_output_handle (), &wn); } break; case 'M': /* DL */ @@ -2095,8 +2106,8 @@ fhandler_console::char_command (char c) y + 1 - con.b.srWindow.Top, srBottom + 1 - con.b.srWindow.Top); WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0); - wpbuf_put ('S'); - WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + wpbuf.put ('S'); + wpbuf.send (get_output_handle (), &wn); __small_sprintf (buf, "\033[%d;%dr", srTop + 1 - con.b.srWindow.Top, srBottom + 1 - con.b.srWindow.Top); @@ -2107,13 +2118,13 @@ fhandler_console::char_command (char c) } else { - wpbuf_put (c); + wpbuf.put (c); /* Just send the sequence */ - WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + wpbuf.send (get_output_handle (), &wn); } break; case 'J': /* ED */ - wpbuf_put (c); + wpbuf.put (c); if (con.args[0] == 3 && wincap.has_con_broken_csi3j ()) { /* Workaround for broken CSI3J in Win10 1809 */ CONSOLE_SCREEN_BUFFER_INFO sbi; @@ -2131,7 +2142,7 @@ fhandler_console::char_command (char c) } else /* Just send the sequence */ - WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + wpbuf.send (get_output_handle (), &wn); break; case 'h': /* DECSET */ case 'l': /* DECRST */ @@ -2139,9 +2150,9 @@ fhandler_console::char_command (char c) con.screen_alternated = true; else con.screen_alternated = false; - wpbuf_put (c); + wpbuf.put (c); /* Just send the sequence */ - WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + wpbuf.send (get_output_handle (), &wn); if (con.saw_question_mark) { bool need_fix_tab_position = false; @@ -2159,15 +2170,15 @@ fhandler_console::char_command (char c) con.scroll_region.Top = 0; con.scroll_region.Bottom = -1; } - wpbuf_put (c); + wpbuf.put (c); /* Just send the sequence */ - WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + wpbuf.send (get_output_handle (), &wn); break; default: /* Other escape sequences */ - wpbuf_put (c); + wpbuf.put (c); /* Just send the sequence */ - WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0); + wpbuf.send (get_output_handle (), &wn); break; } return; @@ -2874,7 +2885,7 @@ do_print: break; case ESC: con.state = gotesc; - wpbuf_put (*found); + wpbuf.put (*found); break; case DWN: cursor_get (&x, &y); @@ -2989,7 +3000,7 @@ fhandler_console::write (const void *vsrc, size_t len) case gotesc: if (*src == '[') /* CSI Control Sequence Introducer */ { - wpbuf_put (*src); + wpbuf.put (*src); con.state = gotsquare; memset (con.args, 0, sizeof con.args); con.nargs = 0; @@ -3005,13 +3016,13 @@ fhandler_console::write (const void *vsrc, size_t len) /* For xterm mode only */ DWORD n; /* Just send the sequence */ - wpbuf_put (*src); - WriteConsoleA (get_output_handle (), wpbuf, wpixput, &n, 0); + wpbuf.put (*src); + wpbuf.send (get_output_handle (), &n); } else if (con.savex >= 0 && con.savey >= 0) cursor_set (false, con.savex, con.savey); con.state = normal; - wpixput = 0; + wpbuf.empty(); } else if (*src == '7') /* DECSC Save cursor position */ { @@ -3020,13 +3031,13 @@ fhandler_console::write (const void *vsrc, size_t len) /* For xterm mode only */ DWORD n; /* Just send the sequence */ - wpbuf_put (*src); - WriteConsoleA (get_output_handle (), wpbuf, wpixput, &n, 0); + wpbuf.put (*src); + wpbuf.send (get_output_handle (), &n); } else cursor_get (&con.savex, &con.savey); con.state = normal; - wpixput = 0; + wpbuf.empty(); } else if (wincap.has_con_24bit_colors () && !con_is_legacy && wincap.has_con_broken_il_dl () && *src == 'M') @@ -3048,14 +3059,14 @@ fhandler_console::write (const void *vsrc, size_t len) buf, strlen (buf), &n, 0); } /* Substitute "CSI Ps T" */ - wpbuf_put ('['); - wpbuf_put ('T'); + wpbuf.put ('['); + wpbuf.put ('T'); } else - wpbuf_put (*src); - WriteConsoleA (get_output_handle (), wpbuf, wpixput, &n, 0); + wpbuf.put (*src); + wpbuf.send (get_output_handle (), &n); con.state = normal; - wpixput = 0; + wpbuf.empty(); } else if (wincap.has_con_24bit_colors () && !con_is_legacy) { @@ -3067,28 +3078,28 @@ fhandler_console::write (const void *vsrc, size_t len) /* ESC sequences below (e.g. OSC, etc) are left to xterm emulation in xterm compatible mode, therefore, are not handled and just sent them. */ - wpbuf_put (*src); + wpbuf.put (*src); /* Just send the sequence */ DWORD n; - WriteConsoleA (get_output_handle (), wpbuf, wpixput, &n, 0); + wpbuf.send (get_output_handle (), &n); con.state = normal; - wpixput = 0; + wpbuf.empty(); } else if (*src == ']') /* OSC Operating System Command */ { - wpbuf_put (*src); + wpbuf.put (*src); con.rarg = 0; con.my_title_buf[0] = '\0'; con.state = gotrsquare; } else if (*src == '(') /* Designate G0 character set */ { - wpbuf_put (*src); + wpbuf.put (*src); con.state = gotparen; } else if (*src == ')') /* Designate G1 character set */ { - wpbuf_put (*src); + wpbuf.put (*src); con.state = gotrparen; } else if (*src == 'M') /* Reverse Index (scroll down) */ @@ -3096,7 +3107,7 @@ fhandler_console::write (const void *vsrc, size_t len) con.fillin (get_output_handle ()); scroll_buffer_screen (0, 0, -1, -1, 0, 1); con.state = normal; - wpixput = 0; + wpbuf.empty(); } else if (*src == 'c') /* RIS Full Reset */ { @@ -3107,17 +3118,17 @@ fhandler_console::write (const void *vsrc, size_t len) cursor_set (false, 0, 0); clear_screen (cl_buf_beg, cl_buf_beg, cl_buf_end, cl_buf_end); con.state = normal; - wpixput = 0; + wpbuf.empty(); } else if (*src == 'R') /* ? */ { con.state = normal; - wpixput = 0; + wpbuf.empty(); } else { con.state = normal; - wpixput = 0; + wpbuf.empty(); } src++; break; @@ -3126,19 +3137,19 @@ fhandler_console::write (const void *vsrc, size_t len) { if (con.nargs < MAXARGS) con.args[con.nargs] = con.args[con.nargs] * 10 + *src - '0'; - wpbuf_put (*src); + wpbuf.put (*src); src++; } else if (*src == ';') { - wpbuf_put (*src); + wpbuf.put (*src); src++; if (con.nargs < MAXARGS) con.nargs++; } else if (*src == ' ') { - wpbuf_put (*src); + wpbuf.put (*src); src++; con.saw_space = true; con.state = gotcommand; @@ -3151,7 +3162,7 @@ fhandler_console::write (const void *vsrc, size_t len) con.nargs++; char_command (*src++); con.state = normal; - wpixput = 0; + wpbuf.empty(); break; case gotrsquare: if (isdigit (*src)) @@ -3162,7 +3173,7 @@ fhandler_console::write (const void *vsrc, size_t len) con.state = eatpalette; else con.state = eattitle; - wpbuf_put (*src); + wpbuf.put (*src); src++; break; case eattitle: @@ -3174,13 +3185,13 @@ fhandler_console::write (const void *vsrc, size_t len) if (*src == '\007' && con.state == gettitle) set_console_title (con.my_title_buf); con.state = normal; - wpixput = 0; + wpbuf.empty(); } else if (n < TITLESIZE) { con.my_title_buf[n++] = *src; con.my_title_buf[n] = '\0'; - wpbuf_put (*src); + wpbuf.put (*src); } src++; break; @@ -3188,13 +3199,13 @@ fhandler_console::write (const void *vsrc, size_t len) case eatpalette: if (*src == '\033') { - wpbuf_put (*src); + wpbuf.put (*src); con.state = endpalette; } else if (*src == '\a') { con.state = normal; - wpixput = 0; + wpbuf.empty(); } src++; break; @@ -3204,14 +3215,14 @@ fhandler_console::write (const void *vsrc, size_t len) else /* Sequence error (abort) */ con.state = normal; - wpixput = 0; + wpbuf.empty(); src++; break; case gotsquare: if (*src == ';') { con.state = gotarg1; - wpbuf_put (*src); + wpbuf.put (*src); if (con.nargs < MAXARGS) con.nargs++; src++; @@ -3226,7 +3237,7 @@ fhandler_console::write (const void *vsrc, size_t len) con.saw_greater_than_sign = true; else if (*src == '!') con.saw_exclamation_mark = true; - wpbuf_put (*src); + wpbuf.put (*src); /* ignore any extra chars between [ and first arg or command */ src++; } @@ -3239,7 +3250,7 @@ fhandler_console::write (const void *vsrc, size_t len) else con.vt100_graphics_mode_G0 = false; con.state = normal; - wpixput = 0; + wpbuf.empty(); src++; break; case gotrparen: /* Designate G1 Character Set (ISO 2022) */ @@ -3248,7 +3259,7 @@ fhandler_console::write (const void *vsrc, size_t len) else con.vt100_graphics_mode_G1 = false; con.state = normal; - wpixput = 0; + wpbuf.empty(); src++; break; } From bf0cb64d905d23b1f9241d3e789a06427514cacb Mon Sep 17 00:00:00 2001 From: Hans-Bernhard Broeker Date: Sun, 8 Mar 2020 21:41:14 +0100 Subject: [PATCH 251/520] Do not bother passing optional argument to WriteConsoleA. Passing a pointer to a local variable to WriteConsoleA is not actually needed if we're not going to do anything with what WriteConsoleA would put in there. For the wpbuf class the pointer argument was made optional, so it can be just left out; other call places now pass a NULL pointer instead. The local variables `wn' and `n' are no unused, so they go away. --- winsup/cygwin/fhandler_console.cc | 51 ++++++++++++++----------------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index a86e0be84..2c0b31c48 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -2015,7 +2015,6 @@ fhandler_console::char_command (char c) if (wincap.has_con_24bit_colors () && !con_is_legacy) { /* For xterm compatible mode */ - DWORD wn; switch (c) { #if 0 /* These sequences, which are supported by real xterm, are @@ -2044,17 +2043,17 @@ fhandler_console::char_command (char c) wpbuf.put (c); if (wincap.has_con_esc_rep ()) /* Just send the sequence */ - wpbuf.send (get_output_handle (), &wn); + wpbuf.send (get_output_handle ()); else if (last_char && last_char != '\n') for (int i = 0; i < con.args[0]; i++) - WriteConsoleA (get_output_handle (), &last_char, 1, &wn, 0); + WriteConsoleA (get_output_handle (), &last_char, 1, 0, 0); break; case 'r': /* DECSTBM */ con.scroll_region.Top = con.args[0] ? con.args[0] - 1 : 0; con.scroll_region.Bottom = con.args[1] ? con.args[1] - 1 : -1; wpbuf.put (c); /* Just send the sequence */ - wpbuf.send (get_output_handle (), &wn); + wpbuf.send (get_output_handle ()); break; case 'L': /* IL */ if (wincap.has_con_broken_il_dl ()) @@ -2072,27 +2071,27 @@ fhandler_console::char_command (char c) srBottom - (n-1) - con.b.srWindow.Top + 1, y + 1 - con.b.srWindow.Top, x + 1); WriteConsoleA (get_output_handle (), - buf, strlen (buf), &wn, 0); + buf, strlen (buf), 0, 0); } __small_sprintf (buf, "\033[%d;%dr", y + 1 - con.b.srWindow.Top, srBottom + 1 - con.b.srWindow.Top); - WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0); + WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0); wpbuf.put ('T'); - wpbuf.send (get_output_handle (), &wn); + wpbuf.send (get_output_handle ()); __small_sprintf (buf, "\033[%d;%dr", srTop + 1 - con.b.srWindow.Top, srBottom + 1 - con.b.srWindow.Top); - WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0); + WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0); __small_sprintf (buf, "\033[%d;%dH", y + 1 - con.b.srWindow.Top, x + 1); - WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0); + WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0); } else { wpbuf.put (c); /* Just send the sequence */ - wpbuf.send (get_output_handle (), &wn); + wpbuf.send (get_output_handle ()); } break; case 'M': /* DL */ @@ -2105,22 +2104,22 @@ fhandler_console::char_command (char c) __small_sprintf (buf, "\033[%d;%dr", y + 1 - con.b.srWindow.Top, srBottom + 1 - con.b.srWindow.Top); - WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0); + WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0); wpbuf.put ('S'); - wpbuf.send (get_output_handle (), &wn); + wpbuf.send (get_output_handle ()); __small_sprintf (buf, "\033[%d;%dr", srTop + 1 - con.b.srWindow.Top, srBottom + 1 - con.b.srWindow.Top); - WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0); + WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0); __small_sprintf (buf, "\033[%d;%dH", y + 1 - con.b.srWindow.Top, x + 1); - WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0); + WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0); } else { wpbuf.put (c); /* Just send the sequence */ - wpbuf.send (get_output_handle (), &wn); + wpbuf.send (get_output_handle ()); } break; case 'J': /* ED */ @@ -2142,7 +2141,7 @@ fhandler_console::char_command (char c) } else /* Just send the sequence */ - wpbuf.send (get_output_handle (), &wn); + wpbuf.send (get_output_handle ()); break; case 'h': /* DECSET */ case 'l': /* DECRST */ @@ -2152,7 +2151,7 @@ fhandler_console::char_command (char c) con.screen_alternated = false; wpbuf.put (c); /* Just send the sequence */ - wpbuf.send (get_output_handle (), &wn); + wpbuf.send (get_output_handle ()); if (con.saw_question_mark) { bool need_fix_tab_position = false; @@ -2172,13 +2171,13 @@ fhandler_console::char_command (char c) } wpbuf.put (c); /* Just send the sequence */ - wpbuf.send (get_output_handle (), &wn); + wpbuf.send (get_output_handle ()); break; default: /* Other escape sequences */ wpbuf.put (c); /* Just send the sequence */ - wpbuf.send (get_output_handle (), &wn); + wpbuf.send (get_output_handle ()); break; } return; @@ -3014,10 +3013,9 @@ fhandler_console::write (const void *vsrc, size_t len) if (con.screen_alternated) { /* For xterm mode only */ - DWORD n; /* Just send the sequence */ wpbuf.put (*src); - wpbuf.send (get_output_handle (), &n); + wpbuf.send (get_output_handle ()); } else if (con.savex >= 0 && con.savey >= 0) cursor_set (false, con.savex, con.savey); @@ -3029,10 +3027,9 @@ fhandler_console::write (const void *vsrc, size_t len) if (con.screen_alternated) { /* For xterm mode only */ - DWORD n; /* Just send the sequence */ wpbuf.put (*src); - wpbuf.send (get_output_handle (), &n); + wpbuf.send (get_output_handle ()); } else cursor_get (&con.savex, &con.savey); @@ -3043,7 +3040,6 @@ fhandler_console::write (const void *vsrc, size_t len) && wincap.has_con_broken_il_dl () && *src == 'M') { /* Reverse Index (scroll down) */ int x, y; - DWORD n; cursor_get (&x, &y); if (y == srTop) { @@ -3056,7 +3052,7 @@ fhandler_console::write (const void *vsrc, size_t len) srBottom - con.b.srWindow.Top + 1, y + 1 - con.b.srWindow.Top, x + 1); WriteConsoleA (get_output_handle (), - buf, strlen (buf), &n, 0); + buf, strlen (buf), 0, 0); } /* Substitute "CSI Ps T" */ wpbuf.put ('['); @@ -3064,7 +3060,7 @@ fhandler_console::write (const void *vsrc, size_t len) } else wpbuf.put (*src); - wpbuf.send (get_output_handle (), &n); + wpbuf.send (get_output_handle ()); con.state = normal; wpbuf.empty(); } @@ -3080,8 +3076,7 @@ fhandler_console::write (const void *vsrc, size_t len) handled and just sent them. */ wpbuf.put (*src); /* Just send the sequence */ - DWORD n; - wpbuf.send (get_output_handle (), &n); + wpbuf.send (get_output_handle ()); con.state = normal; wpbuf.empty(); } From 3e7fff6b49fbdc1ab5022b145268622d8e5dedd3 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Mon, 9 Mar 2020 10:38:36 +0900 Subject: [PATCH 252/520] Cygwin: console: Fix behaviour of "ESC 8" after reset. - This patch matches the behaviour of "ESC 8" (DECRC) to the real xterm after full reset (RIS), soft reset (DECSTR) and "CSI 3 J". --- winsup/cygwin/fhandler_console.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 2c0b31c48..3930c6068 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -2124,6 +2124,11 @@ fhandler_console::char_command (char c) break; case 'J': /* ED */ wpbuf.put (c); + if (con.args[0] == 3 && con.savey >= 0) + { + con.fillin (get_output_handle ()); + con.savey -= con.b.srWindow.Top; + } if (con.args[0] == 3 && wincap.has_con_broken_csi3j ()) { /* Workaround for broken CSI3J in Win10 1809 */ CONSOLE_SCREEN_BUFFER_INFO sbi; @@ -2168,6 +2173,7 @@ fhandler_console::char_command (char c) { con.scroll_region.Top = 0; con.scroll_region.Bottom = -1; + con.savex = con.savey = -1; } wpbuf.put (c); /* Just send the sequence */ @@ -3070,6 +3076,7 @@ fhandler_console::write (const void *vsrc, size_t len) { con.scroll_region.Top = 0; con.scroll_region.Bottom = -1; + con.savex = con.savey = -1; } /* ESC sequences below (e.g. OSC, etc) are left to xterm emulation in xterm compatible mode, therefore, are not From a8a40ee5750cb8a4280379a38c1ed490262481c4 Mon Sep 17 00:00:00 2001 From: Fabian Schriever Date: Fri, 6 Mar 2020 15:46:33 +0100 Subject: [PATCH 253/520] Fix error in exp in magnitude [2e-32,2e-28] While testing the exp function we noticed some errors at the specified magnitude. Within this range the exp function returns the input value +1 as an output. We chose to run a test of 1m exponentially spaced values in the ranges [-2^-27,-2^-32] and [2^-32,2^-27] which showed 7603 and 3912 results with an error of >=0.5 ULP (compared with MPFR in 128 bit) with the highest being 0.56 ULP and 0.53 ULP. It's easy to fix by changing the magnitude at which the input value +1 is returned from <2^-28 to <2^-32 and using the polynomial instead. This reduces the number of results with an error of >=0.5 ULP to 485 and 479 in above tests, all of which are exactly 0.5 ULP. As we were already checking on exp we also took a look at expf. For expf the magnitude where the input value +1 is returned can be increased from <2^-28 to <2^-23 without accuracy loss for a slight performance improvement. To ensure this was the correct value we tested all values in the ranges [-2^-17,-2^-28] and [2^-28,2^-17] (~92.3m values each). --- newlib/libm/math/e_exp.c | 2 +- newlib/libm/math/ef_exp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/newlib/libm/math/e_exp.c b/newlib/libm/math/e_exp.c index 81ea64dfb..d23b1162b 100644 --- a/newlib/libm/math/e_exp.c +++ b/newlib/libm/math/e_exp.c @@ -142,7 +142,7 @@ P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */ } x = hi - lo; } - else if(hx < 0x3e300000) { /* when |x|<2**-28 */ + else if(hx < 0x3df00000) { /* when |x|<2**-32 */ if(huge+x>one) return one+x;/* trigger inexact */ } diff --git a/newlib/libm/math/ef_exp.c b/newlib/libm/math/ef_exp.c index e817370ac..fb3e2ffe6 100644 --- a/newlib/libm/math/ef_exp.c +++ b/newlib/libm/math/ef_exp.c @@ -77,7 +77,7 @@ P5 = 4.1381369442e-08; /* 0x3331bb4c */ } x = hi - lo; } - else if(hx < 0x31800000) { /* when |x|<2**-28 */ + else if(hx < 0x34000000) { /* when |x|<2**-23 */ if(huge+x>one) return one+x;/* trigger inexact */ } From 18b4e0e5187f7e2076661e53747977f21dabedff Mon Sep 17 00:00:00 2001 From: Fabian Schriever Date: Tue, 10 Mar 2020 11:24:12 +0100 Subject: [PATCH 254/520] Fix error in fdim/f for infinities The comparison c == FP_INFINITE causes the function to return +inf as it expects x = +inf to always be larger than y. This shortcut causes several issues as it also returns +inf for the following cases: - fdim(+inf, +inf), expected (as per C99): +0.0 - fdim(-inf, any non NaN), expected: +0.0 I don't see a reason to keep the comparison as all the infinity cases return the correct result using just the ternary operation. --- newlib/libm/common/s_fdim.c | 5 +---- newlib/libm/common/sf_fdim.c | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/newlib/libm/common/s_fdim.c b/newlib/libm/common/s_fdim.c index 73a027953..61a4908f3 100644 --- a/newlib/libm/common/s_fdim.c +++ b/newlib/libm/common/s_fdim.c @@ -49,11 +49,8 @@ ANSI C, POSIX. double y; #endif { - int c = __fpclassifyd(x); - if (c == FP_NAN) return(x); + if (__fpclassifyd(x) == FP_NAN) return(x); if (__fpclassifyd(y) == FP_NAN) return(y); - if (c == FP_INFINITE) - return HUGE_VAL; return x > y ? x - y : 0.0; } diff --git a/newlib/libm/common/sf_fdim.c b/newlib/libm/common/sf_fdim.c index fe349098b..8fee57002 100644 --- a/newlib/libm/common/sf_fdim.c +++ b/newlib/libm/common/sf_fdim.c @@ -14,11 +14,8 @@ float y; #endif { - int c = __fpclassifyf(x); - if (c == FP_NAN) return(x); + if (__fpclassifyf(x) == FP_NAN) return(x); if (__fpclassifyf(y) == FP_NAN) return(y); - if (c == FP_INFINITE) - return HUGE_VALF; return x > y ? x - y : 0.0; } From 91a8d0c90767f82202e08ba7e3fd6b4e1419ec00 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 10 Mar 2020 10:03:44 -0500 Subject: [PATCH 255/520] i386/fenv.c: Include fenv.c implementation shared with x86_64, not stub --- newlib/libm/machine/i386/fenv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libm/machine/i386/fenv.c b/newlib/libm/machine/i386/fenv.c index 8cbee7771..1a97f5617 100644 --- a/newlib/libm/machine/i386/fenv.c +++ b/newlib/libm/machine/i386/fenv.c @@ -4,4 +4,4 @@ * (c) Copyright 2019 Joel Sherrill */ -#include "../../fenv/fenv_stub.c" +#include "../x86_64/fenv.c" From c56f53a2a04577f6e84ac96477fc8dc804d544ef Mon Sep 17 00:00:00 2001 From: Fabian Schriever Date: Wed, 11 Mar 2020 10:58:05 +0100 Subject: [PATCH 256/520] Fix truncf for sNaN input Make line 47 in sf_trunc.c reachable. While converting the double precision function trunc to the single precision version truncf an error was introduced into the special case. This special case is meant to catch both NaNs and infinities, however qNaNs and infinities work just fine with the simple return of x (line 51). The only error occurs for sNaNs where the same sNaN is returned and no invalid exception is raised. --- newlib/libm/common/sf_trunc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libm/common/sf_trunc.c b/newlib/libm/common/sf_trunc.c index 74ea933ce..8eb0554d8 100644 --- a/newlib/libm/common/sf_trunc.c +++ b/newlib/libm/common/sf_trunc.c @@ -42,7 +42,7 @@ } else { - if (exponent_less_127 == 255) + if (exponent_less_127 == 128) /* x is NaN or infinite. */ return x + x; From 256bc8bde00071b42dad4caf23ddda037d34c5fd Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 11 Mar 2020 13:44:05 +0100 Subject: [PATCH 257/520] Cygwin: fix formatting: replace TAB char with \t in string constant Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_proc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 605a8443f..d42a91317 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -809,7 +809,7 @@ format_proc_cpuinfo (void *, char *&destbuf) "cpu MHz\t\t: %d.000\n", family, model, - in_buf.s + strspn (in_buf.s, " "), + in_buf.s + strspn (in_buf.s, " \t"), stepping, microcode, cpu_mhz); From d2ef2331f9ec4cc6510cab5cd540bb3c3c863ca8 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 11 Mar 2020 13:23:55 +0100 Subject: [PATCH 258/520] Cygwin: fix formatting: drop spaces leading tabs Signed-off-by: Corinna Vinschen --- winsup/cygwin/autoload.cc | 2 +- winsup/cygwin/cygserver_pwdgrp.h | 2 +- winsup/cygwin/dir.cc | 2 +- winsup/cygwin/dtable.cc | 2 +- winsup/cygwin/external.cc | 2 +- winsup/cygwin/fhandler.h | 2 +- winsup/cygwin/fhandler_disk_file.cc | 2 +- winsup/cygwin/fhandler_floppy.cc | 6 +-- winsup/cygwin/fhandler_proc.cc | 2 +- winsup/cygwin/fhandler_process.cc | 2 +- winsup/cygwin/fhandler_termios.cc | 2 +- winsup/cygwin/flock.cc | 6 +-- winsup/cygwin/grp.cc | 4 +- winsup/cygwin/hookapi.cc | 6 +-- winsup/cygwin/include/a.out.h | 2 +- winsup/cygwin/include/cygwin/in6.h | 6 +-- winsup/cygwin/include/cygwin/mtio.h | 66 +++++++++++++-------------- winsup/cygwin/include/cygwin/signal.h | 8 ++-- winsup/cygwin/include/cygwin/socket.h | 2 +- winsup/cygwin/include/netinet/ip6.h | 2 +- winsup/cygwin/include/resolv.h | 2 +- winsup/cygwin/libc/base64.c | 2 +- winsup/cygwin/libc/getopt.c | 2 +- winsup/cygwin/libc/rcmd.cc | 4 +- winsup/cygwin/libc/strfmon.c | 8 ++-- winsup/cygwin/libc/strptime.cc | 6 +-- winsup/cygwin/localtime.cc | 2 +- winsup/cygwin/malloc_wrapper.cc | 2 +- winsup/cygwin/math/atanhl.c | 2 +- winsup/cygwin/math/cephes_emath.h | 12 ++--- winsup/cygwin/math/exp2.S | 18 ++++---- winsup/cygwin/math/exp2l.S | 18 ++++---- winsup/cygwin/math/ldexpl.c | 2 +- winsup/cygwin/math/remquol.S | 2 +- winsup/cygwin/miscfuncs.cc | 4 +- winsup/cygwin/net.cc | 8 ++-- winsup/cygwin/nlsfuncs.cc | 6 +-- winsup/cygwin/ntdll.h | 2 +- winsup/cygwin/passwd.cc | 2 +- winsup/cygwin/path.cc | 12 ++--- winsup/cygwin/pwdgrp.h | 4 +- winsup/cygwin/quotactl.cc | 6 +-- winsup/cygwin/regex/cname.h | 2 +- winsup/cygwin/regex/regcomp.c | 2 +- winsup/cygwin/regex/regex2.h | 12 ++--- winsup/cygwin/security.cc | 2 +- winsup/cygwin/times.cc | 2 +- 47 files changed, 137 insertions(+), 137 deletions(-) diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc index 454bf514c..8f2fcc1cd 100644 --- a/winsup/cygwin/autoload.cc +++ b/winsup/cygwin/autoload.cc @@ -219,7 +219,7 @@ dll_func_load: \n\ jmp noload # Issue an error or return \n\ gotit: \n\ addq $40,%rsp # Revert stack \n\ - pop %r10 # Pointer to 'return address' \n\ + pop %r10 # Pointer to 'return address' \n\ movq %rax,12(%r10) # Move absolute address to address slot \n\ subq $25,%r10 # Point to jmp \n\ pop %rcx # Restore arg registers \n\ diff --git a/winsup/cygwin/cygserver_pwdgrp.h b/winsup/cygwin/cygserver_pwdgrp.h index fb22858dc..98f1fed40 100644 --- a/winsup/cygwin/cygserver_pwdgrp.h +++ b/winsup/cygwin/cygserver_pwdgrp.h @@ -29,7 +29,7 @@ private: fetch_user_arg_type_t type; union { - BYTE sid[40]; + BYTE sid[40]; char name[UNLEN + 1]; uint32_t id; } arg; diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc index 3429fe022..f912a9e47 100644 --- a/winsup/cygwin/dir.cc +++ b/winsup/cygwin/dir.cc @@ -140,7 +140,7 @@ readdir_worker (DIR *dir, dirent *de) if (is_dot_dot && !(dir->__flags & dirent_isroot)) de->d_ino = readdir_get_ino (((fhandler_base *) - dir->__fh)->get_name (), + dir->__fh)->get_name (), true); else { diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 4652de929..e9e005b08 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -401,7 +401,7 @@ dtable::init_std_file_from_handle (int fd, HANDLE handle) int openflags = O_BINARY; /* Console windows are no kernel objects up to Windows 7/2008R2, so the - access mask returned by NtQueryInformationFile is meaningless. CMD + access mask returned by NtQueryInformationFile is meaningless. CMD always hands down stdin handles as R/O handles, but our tty slave sides are R/W. */ if (fh->is_tty ()) diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc index 14a1dfb73..ee8a0f83f 100644 --- a/winsup/cygwin/external.cc +++ b/winsup/cygwin/external.cc @@ -545,7 +545,7 @@ cygwin_internal (cygwin_getinfo_types t, ...) break; case CW_ALLOC_DRIVE_MAP: - { + { dos_drive_mappings *ddm = new dos_drive_mappings (); res = (uintptr_t) ddm; } diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 463bb83ab..fd65370df 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -167,7 +167,7 @@ class fhandler_base struct status_flags { unsigned rbinary : 1; /* binary read mode */ - unsigned rbinset : 1; /* binary read mode explicitly set */ + unsigned rbinset : 1; /* binary read mode explicitly set */ unsigned wbinary : 1; /* binary write mode */ unsigned wbinset : 1; /* binary write mode explicitly set */ unsigned nohandle : 1; /* No handle associated with fhandler. */ diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index bc5967e18..f84012d42 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -827,7 +827,7 @@ fhandler_disk_file::fchmod (mode_t mode) HANDLE fh; if (NT_SUCCESS (NtOpenFile (&fh, FILE_WRITE_ATTRIBUTES, - pc.init_reopen_attr (attr, get_handle ()), + pc.init_reopen_attr (attr, get_handle ()), &io, FILE_SHARE_VALID_FLAGS, FILE_OPEN_FOR_BACKUP_INTENT))) { diff --git a/winsup/cygwin/fhandler_floppy.cc b/winsup/cygwin/fhandler_floppy.cc index 43139ac2c..8fb18723f 100644 --- a/winsup/cygwin/fhandler_floppy.cc +++ b/winsup/cygwin/fhandler_floppy.cc @@ -546,11 +546,11 @@ fhandler_dev_floppy::raw_write (const void *ptr, size_t len) DWORD cplen, written; /* First check if we have an active read buffer. If so, try to fit in - the start of the input buffer and write out the entire result. + the start of the input buffer and write out the entire result. This also covers the situation after lseek since lseek fills the read buffer in case we seek to an address which is not sector aligned. */ if (devbufend && devbufstart < devbufend) - { + { off_t current_pos = get_current_position (); cplen = MIN (len, devbufend - devbufstart); memcpy (devbuf + devbufstart, p, cplen); @@ -657,7 +657,7 @@ fhandler_dev_floppy::lseek (off_t offset, int whence) off_t exact_pos = current_pos - (devbufend - devbufstart); /* Shortcut when used to get current position. */ if (offset == 0) - return exact_pos; + return exact_pos; offset += exact_pos; whence = SEEK_SET; } diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index d42a91317..03ec621f4 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -74,7 +74,7 @@ static const virt_tab_t proc_tab[] = { { _VN ("sysvipc"), FH_PROCSYSVIPC, virt_directory, NULL }, { _VN ("uptime"), FH_PROC, virt_file, format_proc_uptime }, { _VN ("version"), FH_PROC, virt_file, format_proc_version }, - { NULL, 0, FH_NADA, virt_none, NULL } + { NULL, 0, FH_NADA, virt_none, NULL } }; #define PROC_DIR_COUNT 4 diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index 6fc3476b2..e746b5b5c 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -1401,7 +1401,7 @@ get_process_state (DWORD dwProcessId) n <<= 1; PSYSTEM_PROCESS_INFORMATION new_p = (PSYSTEM_PROCESS_INFORMATION) realloc (p, n); if (!new_p) - goto out; + goto out; p = new_p; } if (!NT_SUCCESS (status)) diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index d96b669bd..b6759b0a7 100644 --- a/winsup/cygwin/fhandler_termios.cc +++ b/winsup/cygwin/fhandler_termios.cc @@ -438,7 +438,7 @@ fhandler_termios::line_edit (const char *rptr, size_t nread, termios& ti, if (ti.c_lflag & ECHO) doecho (&c, 1); /* Write in chunks of 32 bytes to reduce the number of WriteFile calls - in non-canonical mode. */ + in non-canonical mode. */ if ((!iscanon && ralen () >= 32) || input_done) { int status = accept_input (); diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc index 74374d727..ecd2293fa 100644 --- a/winsup/cygwin/flock.cc +++ b/winsup/cygwin/flock.cc @@ -801,7 +801,7 @@ lockf_t::create_lock_obj () pinfo p (myself->ppid); if (!p) /* No access or not a Cygwin parent. */ - return; + return; parent_proc = OpenProcess (PROCESS_DUP_HANDLE | PROCESS_CREATE_THREAD @@ -1025,7 +1025,7 @@ fhandler_base::lock (int a_op, struct flock *fl) case SEEK_END: if (get_device () != FH_FS) - start = 0; + start = 0; else { NTSTATUS status; @@ -2015,7 +2015,7 @@ fhandler_disk_file::mand_lock (int a_op, struct flock *fl) if (CancelSynchronousIo (thr->thread_handle ())) thr->detach (); else - thr->terminate_thread (); + thr->terminate_thread (); if (NT_SUCCESS (lp.status)) NtUnlockFile (get_handle (), &io, &offset, &length, 0); /* Per SUSv4: If a signal is received while fcntl is waiting, diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index a126bffe1..ab19a1776 100644 --- a/winsup/cygwin/grp.cc +++ b/winsup/cygwin/grp.cc @@ -153,13 +153,13 @@ internal_getgrfull (fetch_acc_t &full_acc, cyg_ldap *pldap) internal_getgrsid_cachedonly. */ if (cygheap->pg.nss_cygserver_caching () && (ret = cygheap->pg.grp_cache.cygserver.add_group_from_cygserver - (full_acc.sid))) + (full_acc.sid))) return ret; if (cygheap->pg.nss_grp_files ()) { cygheap->pg.grp_cache.file.check_file (); if ((ret = cygheap->pg.grp_cache.file.add_group_from_file - (full_acc.sid))) + (full_acc.sid))) return ret; } if (cygheap->pg.nss_grp_db ()) diff --git a/winsup/cygwin/hookapi.cc b/winsup/cygwin/hookapi.cc index dcd9b1df8..1eb5fdea2 100644 --- a/winsup/cygwin/hookapi.cc +++ b/winsup/cygwin/hookapi.cc @@ -42,9 +42,9 @@ PEHeaderFromHModule (HMODULE hModule, bool &is_64bit) if (pNTHeader->Signature != IMAGE_NT_SIGNATURE) pNTHeader = NULL; else if (pNTHeader->FileHeader.Machine == IMAGE_FILE_MACHINE_AMD64) - is_64bit = true; + is_64bit = true; else if (pNTHeader->FileHeader.Machine == IMAGE_FILE_MACHINE_I386) - is_64bit = false; + is_64bit = false; else pNTHeader = NULL; } @@ -402,7 +402,7 @@ hook_or_detect_cygwin (const char *name, const void *fn, WORD& subsys, HANDLE h) { if (!ascii_strcasematch (rva (PSTR, map ?: (char *) hm, pd->Name - delta), "cygwin1.dll")) - continue; + continue; if (!fn) { /* Just checking if executable used cygwin1.dll. */ diff --git a/winsup/cygwin/include/a.out.h b/winsup/cygwin/include/a.out.h index 59fdd3dfb..87053668c 100644 --- a/winsup/cygwin/include/a.out.h +++ b/winsup/cygwin/include/a.out.h @@ -138,7 +138,7 @@ struct external_scnhdr { */ struct external_lineno { union { - uint32_t l_symndx; /* function name symbol index, iff l_lnno 0 */ + uint32_t l_symndx; /* function name symbol index, iff l_lnno 0 */ uint32_t l_paddr; /* (physical) address of line number */ } l_addr; uint16_t l_lnno; /* line number */ diff --git a/winsup/cygwin/include/cygwin/in6.h b/winsup/cygwin/include/cygwin/in6.h index fb787c0ea..2fd6315fb 100644 --- a/winsup/cygwin/include/cygwin/in6.h +++ b/winsup/cygwin/include/cygwin/in6.h @@ -74,9 +74,9 @@ struct in6_addr { union { - uint8_t __s6_addr[16]; - uint16_t __s6_addr16[8]; - uint32_t __s6_addr32[4]; + uint8_t __s6_addr[16]; + uint16_t __s6_addr16[8]; + uint32_t __s6_addr32[4]; } __u6; #define s6_addr __u6.__s6_addr #define s6_addr16 __u6.__s6_addr16 diff --git a/winsup/cygwin/include/cygwin/mtio.h b/winsup/cygwin/include/cygwin/mtio.h index f298a91a7..3c3f20ecd 100644 --- a/winsup/cygwin/include/cygwin/mtio.h +++ b/winsup/cygwin/include/cygwin/mtio.h @@ -220,39 +220,39 @@ struct mtpos { #define MT_ISSCSI2 0x72 /* Generic ANSI SCSI-2 tape unit */ /* More constants for mt_type. These are the codes used by Windows >= 5.1 */ -#define MT_ISDDS_4mm 0x20 -#define MT_ISMiniQic 0x21 -#define MT_ISTravan 0x22 -#define MT_ISQIC 0x23 -#define MT_ISMP_8mm 0x24 -#define MT_ISAME_8mm 0x25 -#define MT_ISAIT1_8mm 0x26 -#define MT_ISDLT 0x27 -#define MT_ISNCTP 0x28 -#define MT_ISIBM_3480 0x29 -#define MT_ISIBM_3490E 0x2a -#define MT_ISIBM_Magstar_3590 0x2b -#define MT_ISIBM_Magstar_MP 0x2c -#define MT_ISSTK_DATA_D3 0x2d -#define MT_ISSONY_DTF 0x2e -#define MT_ISDV_6mm 0x2f -#define MT_ISDMI 0x30 -#define MT_ISSONY_D2 0x31 -#define MT_ISCLEANER_CARTRIDGE 0x32 -#define MT_ISAVATAR_F2 0x4f -#define MT_ISMP2_8mm 0x50 -#define MT_ISDST_S 0x51 -#define MT_ISDST_M 0x52 -#define MT_ISDST_L 0x53 -#define MT_ISVXATape_1 0x54 -#define MT_ISVXATape_2 0x55 -#define MT_ISSTK_9840 0x56 -#define MT_ISLTO_Ultrium 0x57 -#define MT_ISLTO_Accelis 0x58 -#define MT_ISAIT_8mm 0x5a -#define MT_ISADR_1 0x5b -#define MT_ISADR_2 0x5c -#define MT_ISSTK_9940 0x5d +#define MT_ISDDS_4mm 0x20 +#define MT_ISMiniQic 0x21 +#define MT_ISTravan 0x22 +#define MT_ISQIC 0x23 +#define MT_ISMP_8mm 0x24 +#define MT_ISAME_8mm 0x25 +#define MT_ISAIT1_8mm 0x26 +#define MT_ISDLT 0x27 +#define MT_ISNCTP 0x28 +#define MT_ISIBM_3480 0x29 +#define MT_ISIBM_3490E 0x2a +#define MT_ISIBM_Magstar_3590 0x2b +#define MT_ISIBM_Magstar_MP 0x2c +#define MT_ISSTK_DATA_D3 0x2d +#define MT_ISSONY_DTF 0x2e +#define MT_ISDV_6mm 0x2f +#define MT_ISDMI 0x30 +#define MT_ISSONY_D2 0x31 +#define MT_ISCLEANER_CARTRIDGE 0x32 +#define MT_ISAVATAR_F2 0x4f +#define MT_ISMP2_8mm 0x50 +#define MT_ISDST_S 0x51 +#define MT_ISDST_M 0x52 +#define MT_ISDST_L 0x53 +#define MT_ISVXATape_1 0x54 +#define MT_ISVXATape_2 0x55 +#define MT_ISSTK_9840 0x56 +#define MT_ISLTO_Ultrium 0x57 +#define MT_ISLTO_Accelis 0x58 +#define MT_ISAIT_8mm 0x5a +#define MT_ISADR_1 0x5b +#define MT_ISADR_2 0x5c +#define MT_ISSTK_9940 0x5d struct mt_tape_info { long t_type; /* device type id (mt_type) */ diff --git a/winsup/cygwin/include/cygwin/signal.h b/winsup/cygwin/include/cygwin/signal.h index bc4ad1832..ebb9ae329 100644 --- a/winsup/cygwin/include/cygwin/signal.h +++ b/winsup/cygwin/include/cygwin/signal.h @@ -362,7 +362,7 @@ struct sigaction { __extension__ union { - _sig_func_ptr sa_handler; /* SIG_DFL, SIG_IGN, or pointer to a function */ + _sig_func_ptr sa_handler; /* SIG_DFL, SIG_IGN, or pointer to a function */ #if __POSIX_VISIBLE >= 199309 void (*sa_sigaction) ( int, siginfo_t *, void * ); #endif @@ -371,12 +371,12 @@ struct sigaction int sa_flags; }; -#define SA_NOCLDSTOP 1 /* Do not generate SIGCHLD when children +#define SA_NOCLDSTOP 1 /* Do not generate SIGCHLD when children stop */ -#define SA_SIGINFO 2 /* Invoke the signal catching function +#define SA_SIGINFO 2 /* Invoke the signal catching function with three arguments instead of one */ -#define SA_RESTART 0x10000000 /* Restart syscall on signal return */ +#define SA_RESTART 0x10000000 /* Restart syscall on signal return */ #define SA_ONSTACK 0x20000000 /* Call signal handler on alternate signal stack provided by sigaltstack(2). */ diff --git a/winsup/cygwin/include/cygwin/socket.h b/winsup/cygwin/include/cygwin/socket.h index cdfa4b933..721dafcfa 100644 --- a/winsup/cygwin/include/cygwin/socket.h +++ b/winsup/cygwin/include/cygwin/socket.h @@ -114,7 +114,7 @@ struct OLD_msghdr struct iovec * msg_iov; /* Data blocks */ int msg_iovlen; /* Number of blocks */ void * msg_accrights; /* Per protocol magic */ - /* (eg BSD descriptor passing) */ + /* (eg BSD descriptor passing) */ int msg_accrightslen; /* Length of rights list */ }; #endif diff --git a/winsup/cygwin/include/netinet/ip6.h b/winsup/cygwin/include/netinet/ip6.h index 3f4cad092..f35ac748a 100644 --- a/winsup/cygwin/include/netinet/ip6.h +++ b/winsup/cygwin/include/netinet/ip6.h @@ -147,7 +147,7 @@ struct ip6_dest { #define IP6OPT_RTALERT_LEN 4 #define IP6OPT_RTALERT_MLD 0 /* Datagram contains an MLD message */ #define IP6OPT_RTALERT_RSVP 1 /* Datagram contains an RSVP message */ -#define IP6OPT_RTALERT_ACTNET 2 /* contains an Active Networks msg */ +#define IP6OPT_RTALERT_ACTNET 2 /* contains an Active Networks msg */ #define IP6OPT_MINLEN 2 #define IP6OPT_EID 0x8a /* 10 0 01010 */ diff --git a/winsup/cygwin/include/resolv.h b/winsup/cygwin/include/resolv.h index 9809e862d..0a102b7ef 100644 --- a/winsup/cygwin/include/resolv.h +++ b/winsup/cygwin/include/resolv.h @@ -151,7 +151,7 @@ struct res_sym { struct __res_state_ext; struct __res_state { - int retrans; /* retransmition time interval */ + int retrans; /* retransmition time interval */ int retry; /* number of times to retransmit */ u_long options; /* option flags - see below. */ int nscount; /* number of name servers */ diff --git a/winsup/cygwin/libc/base64.c b/winsup/cygwin/libc/base64.c index a067fe2eb..5ecf3296b 100644 --- a/winsup/cygwin/libc/base64.c +++ b/winsup/cygwin/libc/base64.c @@ -212,7 +212,7 @@ b64_pton(char const *src, unsigned char *target, size_t targsize) break; pos = strchr(Base64, ch); - if (pos == 0) /* A non-base64 character. */ + if (pos == 0) /* A non-base64 character. */ return (-1); switch (state) { diff --git a/winsup/cygwin/libc/getopt.c b/winsup/cygwin/libc/getopt.c index bc35f96d4..c9d709fbe 100644 --- a/winsup/cygwin/libc/getopt.c +++ b/winsup/cygwin/libc/getopt.c @@ -75,7 +75,7 @@ char *optarg; /* argument associated with option */ /* return values */ #define BADCH (int)'?' #define BADARG ((*options == ':') ? (int)':' : (int)'?') -#define INORDER (int)1 +#define INORDER (int)1 #ifdef __CYGWIN__ static char EMSG[] = ""; diff --git a/winsup/cygwin/libc/rcmd.cc b/winsup/cygwin/libc/rcmd.cc index 0e6efa47a..6d087d777 100644 --- a/winsup/cygwin/libc/rcmd.cc +++ b/winsup/cygwin/libc/rcmd.cc @@ -97,7 +97,7 @@ extern "C" { int cygwin_getaddrinfo (const char *, const char *, const struct addrinfo *, struct addrinfo **); int cygwin_getnameinfo (const struct sockaddr *, socklen_t, char *, size_t, - char *, size_t, int); + char *, size_t, int); struct servent *cygwin_getservbyname (const char *, const char *); int cygwin_listen (int, int); int cygwin_rresvport_af(int *alport, int family); @@ -693,7 +693,7 @@ __ivaliduser_sa(FILE *hostf, const struct sockaddr *raddr, socklen_t salen, else /* match a user by direct specification */ userok = !(strcmp(ruser, user+1)); break; - case '-': /* if we matched a hostname, */ + case '-': /* if we matched a hostname, */ if (hostok) { /* check for user field rejections */ if (!*(user+1)) return(-1); diff --git a/winsup/cygwin/libc/strfmon.c b/winsup/cygwin/libc/strfmon.c index f824fceb2..4dc6afa97 100644 --- a/winsup/cygwin/libc/strfmon.c +++ b/winsup/cygwin/libc/strfmon.c @@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$"); /* internal macros */ #define PRINT(CH) do { \ - if (dst >= s + maxsize) \ + if (dst >= s + maxsize) \ goto e2big_error; \ *dst++ = CH; \ } while (0) @@ -111,9 +111,9 @@ static ssize_t vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, const char * __restrict format, va_list ap) { - char *dst; /* output destination pointer */ - const char *fmt; /* current format poistion pointer */ - struct lconv *lc; /* pointer to lconv structure */ + char *dst; /* output destination pointer */ + const char *fmt; /* current format poistion pointer */ + struct lconv *lc; /* pointer to lconv structure */ char *asciivalue; /* formatted double pointer */ int flags; /* formatting options */ diff --git a/winsup/cygwin/libc/strptime.cc b/winsup/cygwin/libc/strptime.cc index 4cd9256bc..cbb3e0ce9 100644 --- a/winsup/cygwin/libc/strptime.cc +++ b/winsup/cygwin/libc/strptime.cc @@ -703,8 +703,8 @@ literal: const unsigned char *ep; ep = find_string(bp, &i, - (const char * const *)tzname, - NULL, 2, locale); + (const char * const *)tzname, + NULL, 2, locale); if (ep != NULL) { tm->tm_isdst = i; #ifdef TM_GMTOFF @@ -750,7 +750,7 @@ literal: /* Check if year falls into the era. If not, it's an invalid combination of era and offset. */ if (era->start.tm_year > tm->tm_year - || era->end.tm_year < tm->tm_year) + || era->end.tm_year < tm->tm_year) return NULL; tm->tm_year -= TM_YEAR_BASE; } diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc index 2d10508d1..010376637 100644 --- a/winsup/cygwin/localtime.cc +++ b/winsup/cygwin/localtime.cc @@ -1340,7 +1340,7 @@ tzparse(timezone_t sp, const char *name, const int lastditch) for (year = EPOCH_YEAR; sp->timecnt + 2 <= TZ_MAX_TIMES; ++year) { - time_t newfirst; + time_t newfirst; starttime = transtime(janfirst, year, &start, stdoffset); diff --git a/winsup/cygwin/malloc_wrapper.cc b/winsup/cygwin/malloc_wrapper.cc index 5d917cabc..3b245800a 100644 --- a/winsup/cygwin/malloc_wrapper.cc +++ b/winsup/cygwin/malloc_wrapper.cc @@ -74,7 +74,7 @@ realloc (void *p, size_t size) __malloc_unlock (); } malloc_printf ("(%p, %ld) = %p, called by %p", p, size, res, - caller_return_address ()); + caller_return_address ()); return res; } diff --git a/winsup/cygwin/math/atanhl.c b/winsup/cygwin/math/atanhl.c index 59eb1bd91..a9b8e24b9 100644 --- a/winsup/cygwin/math/atanhl.c +++ b/winsup/cygwin/math/atanhl.c @@ -26,7 +26,7 @@ long double atanhl (long double x) } /* Rearrange formula to avoid precision loss for small x. atanh(x) = 0.5 * log ((1.0 + x)/(1.0 - x)) - = 0.5 * log1p ((1.0 + x)/(1.0 - x) - 1.0) + = 0.5 * log1p ((1.0 + x)/(1.0 - x) - 1.0) = 0.5 * log1p ((1.0 + x - 1.0 + x) /(1.0 - x)) = 0.5 * log1p ((2.0 * x ) / (1.0 - x)) */ z = 0.5L * __fast_log1pl ((z + z) / (1.0L - z)); diff --git a/winsup/cygwin/math/cephes_emath.h b/winsup/cygwin/math/cephes_emath.h index b92d710f6..740356b71 100644 --- a/winsup/cygwin/math/cephes_emath.h +++ b/winsup/cygwin/math/cephes_emath.h @@ -30,7 +30,7 @@ * Author: S. L. Moshier. * * 6 Oct 02 Modified for MinGW by inlining utility routines, - * removing global variables, and splitting out strtold + * removing global variables, and splitting out strtold * from _IO_ldtoa and _IO_ldtostr. * * Danny Smith @@ -81,8 +81,8 @@ * __ediv( a, b, c ) c = b / a * __efloor( a, b ) truncate to integer, toward -infinity * __efrexp( a, exp, s ) extract exponent and significand - * __eifrac( e, &l, frac ) e to long integer and e type fraction - * __euifrac( e, &l, frac ) e to unsigned long integer and e type fraction + * __eifrac( e, &l, frac ) e to long integer and e type fraction + * __euifrac( e, &l, frac ) e to unsigned long integer and e type fraction * __einfin( e ) set e to infinity, leaving its sign alone * __eldexp( a, n, b ) multiply by 2**n * __emov( a, b ) b = a @@ -97,10 +97,10 @@ * __etoe24( e, &f ) convert e type to IEEE single precision * __etoe53( e, &d ) convert e type to IEEE double precision * __etoe64( e, &d ) convert e type to IEEE long double precision - * __eisneg( e ) 1 if sign bit of e != 0, else 0 - * __eisinf( e ) 1 if e has maximum exponent (non-IEEE) + * __eisneg( e ) 1 if sign bit of e != 0, else 0 + * __eisinf( e ) 1 if e has maximum exponent (non-IEEE) * or is infinite (IEEE) - * __eisnan( e ) 1 if e is a NaN + * __eisnan( e ) 1 if e is a NaN * __esqrt( a, b ) b = square root of a * * diff --git a/winsup/cygwin/math/exp2.S b/winsup/cygwin/math/exp2.S index 37d4a2b89..8a868bfe2 100644 --- a/winsup/cygwin/math/exp2.S +++ b/winsup/cygwin/math/exp2.S @@ -26,15 +26,15 @@ __MINGW_USYMBOL(exp2): cmpb $0x05, %dh je 1f /* Is +-Inf, jump. */ fld %st - subq $8, %rsp /* int(x) */ - fnstcw 4(%rsp) - movzwl 4(%rsp), %eax - orb $12, %ah - movw %ax, (%rsp) - fldcw (%rsp) - frndint - fldcw 4(%rsp) - addq $8, %rsp + subq $8, %rsp /* int(x) */ + fnstcw 4(%rsp) + movzwl 4(%rsp), %eax + orb $12, %ah + movw %ax, (%rsp) + fldcw (%rsp) + frndint + fldcw 4(%rsp) + addq $8, %rsp fsubr %st,%st(1) /* fract(x) */ fxch f2xm1 /* 2^(fract(x)) - 1 */ diff --git a/winsup/cygwin/math/exp2l.S b/winsup/cygwin/math/exp2l.S index 2e58c37b8..b08d8e40a 100644 --- a/winsup/cygwin/math/exp2l.S +++ b/winsup/cygwin/math/exp2l.S @@ -24,15 +24,15 @@ __MINGW_USYMBOL(exp2l): cmpb $0x05, %dh je 1f /* Is +-Inf, jump. */ fld %st - subq $8, %rsp /* int(x) */ - fnstcw 4(%rsp) - movzwl 4(%rsp), %eax - orb $12, %ah - movw %ax, (%rsp) - fldcw (%rsp) - frndint - fldcw 4(%rsp) - addq $8, %rsp + subq $8, %rsp /* int(x) */ + fnstcw 4(%rsp) + movzwl 4(%rsp), %eax + orb $12, %ah + movw %ax, (%rsp) + fldcw (%rsp) + frndint + fldcw 4(%rsp) + addq $8, %rsp fsubr %st,%st(1) /* fract(x) */ fxch f2xm1 /* 2^(fract(x)) - 1 */ diff --git a/winsup/cygwin/math/ldexpl.c b/winsup/cygwin/math/ldexpl.c index fde31a23c..2438617c3 100644 --- a/winsup/cygwin/math/ldexpl.c +++ b/winsup/cygwin/math/ldexpl.c @@ -13,7 +13,7 @@ long double ldexpl(long double x, int expn) return x; __asm__ __volatile__ ("fscale" - : "=t" (res) + : "=t" (res) : "0" (x), "u" ((long double) expn)); if (!isfinite (res) || res == 0.0L) diff --git a/winsup/cygwin/math/remquol.S b/winsup/cygwin/math/remquol.S index 42cc2a78d..3dd678b79 100644 --- a/winsup/cygwin/math/remquol.S +++ b/winsup/cygwin/math/remquol.S @@ -15,7 +15,7 @@ .globl __MINGW_USYMBOL(remquol) __MINGW_USYMBOL(remquol): #ifdef __x86_64__ - pushq %rcx + pushq %rcx fldt (%r8) fldt (%rdx) 1: fprem1 diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc index 0bbf4975d..5eff17df6 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc @@ -442,9 +442,9 @@ pthread_wrapper (PVOID arg) movq 16(%%rbx), %%rcx # Load stackaddr into rcx \n\ movq 24(%%rbx), %%rsp # Load stackbase into rsp \n\ subq %[CYGTLS], %%rsp # Subtract CYGTLS_PADSIZE \n\ - # (here we are 16 bytes aligned)\n\ + # (here we are 16 bytes aligned)\n\ subq $32, %%rsp # Subtract another 32 bytes \n\ - # (shadow space for arg regs) \n\ + # (shadow space for arg regs) \n\ xorq %%rbp, %%rbp # Set rbp to 0 \n\ # We moved to the new stack. \n\ # Now it's safe to release the OS stack. \n\ diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index d9f51bf68..0636df39c 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -1718,13 +1718,13 @@ gen_old_if_name (char *name, PIP_ADAPTER_ADDRESSES pap, DWORD idx) prefix = "ppp"; break; case IF_TYPE_SOFTWARE_LOOPBACK: - prefix = "lo"; + prefix = "lo"; break; case IF_TYPE_ATM: - prefix = "atm"; + prefix = "atm"; break; case IF_TYPE_IEEE80211: - prefix = "wlan"; + prefix = "wlan"; break; case IF_TYPE_SLIP: case IF_TYPE_RS232: @@ -1732,7 +1732,7 @@ gen_old_if_name (char *name, PIP_ADAPTER_ADDRESSES pap, DWORD idx) prefix = "slp"; break; case IF_TYPE_TUNNEL: - prefix = "tun"; + prefix = "tun"; break; default: prefix = "eth"; diff --git a/winsup/cygwin/nlsfuncs.cc b/winsup/cygwin/nlsfuncs.cc index 455afb417..0099a967f 100644 --- a/winsup/cygwin/nlsfuncs.cc +++ b/winsup/cygwin/nlsfuncs.cc @@ -1420,7 +1420,7 @@ __set_charset_from_locale (const char *locale, char *charset) break; case 1258: default: - if (lcid == 0x3c09 /* en_HK (English/Hong Kong) */ + if (lcid == 0x3c09 /* en_HK (English/Hong Kong) */ || lcid == 0x200c /* fr_RE (French/Réunion) */ || lcid == 0x240c /* fr_CD (French/Congo) */ || lcid == 0x280c /* fr_SN (French/Senegal) */ @@ -1431,9 +1431,9 @@ __set_charset_from_locale (const char *locale, char *charset) || lcid == 0x3c0c /* fr_HT (French/Haiti) */ || lcid == 0x0477 /* so_SO (Somali/Somali) */ || lcid == 0x0430) /* st_ZA (Sotho/South Africa) */ - cs = "ISO-8859-1"; + cs = "ISO-8859-1"; else if (lcid == 0x818) /* ro_MD (Romanian/Moldovia) */ - cs = "ISO-8859-2"; + cs = "ISO-8859-2"; else if (lcid == 0x043a) /* mt_MT (Maltese/Malta) */ cs = "ISO-8859-3"; else if (lcid == 0x0481) /* mi_NZ (Maori/New Zealand) */ diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h index 8a08111db..af1ed5f8d 100644 --- a/winsup/cygwin/ntdll.h +++ b/winsup/cygwin/ntdll.h @@ -1470,7 +1470,7 @@ extern "C" NTSTATUS NTAPI NtQueryInformationToken (HANDLE, TOKEN_INFORMATION_CLASS, PVOID, ULONG, PULONG); NTSTATUS NTAPI NtQueryObject (HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, - PULONG); + PULONG); NTSTATUS NTAPI NtQueryQuotaInformationFile (HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, BOOLEAN, PVOID, ULONG, PSID, BOOLEAN); diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc index e58f80e91..66d8685d7 100644 --- a/winsup/cygwin/passwd.cc +++ b/winsup/cygwin/passwd.cc @@ -444,7 +444,7 @@ pg_ent::endent (bool _group) if (state == from_file) free (buf); else if (state == from_local || state == from_sam) - NetApiBufferFree (buf); + NetApiBufferFree (buf); buf = NULL; } if (!pg.curr_lines) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 4da888426..2c37780de 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -308,7 +308,7 @@ normalize_posix_path (const char *src, char *dst, char *&tail) if (check_parent) { if (tail > dst_start) /* Don't check for / or // dir. */ - { + { *tail = 0; debug_printf ("checking %s before '..'", dst); /* In conjunction with native and NFS symlinks, @@ -2311,7 +2311,7 @@ symlink_info::check_sysfile (HANDLE h) if (status != STATUS_END_OF_FILE) set_error (EIO); } - else if (*(PWCHAR) srcbuf == 0xfeff /* BOM */ + else if (*(PWCHAR) srcbuf == 0xfeff /* BOM */ || interix_symlink) { /* Add trailing 0 to Interix symlink target. Skip BOM in Cygwin @@ -2383,7 +2383,7 @@ check_reparse_point_target (HANDLE h, bool remote, PREPARSE_DATA_BUFFER rp, if (status == STATUS_PENDING) { while (io.Status == (NTSTATUS) 0xffffffff) - Sleep (1L); + Sleep (1L); status = io.Status; } if (!NT_SUCCESS (status)) @@ -3890,7 +3890,7 @@ cygwin_conv_path_list (cygwin_conv_path_t what, const void *from, void *to, ret = conv_path_list ((const char *) from, (char *) to, size, what); /* Free winp buffer in case of CCP_WIN_W_TO_POSIX. */ if (winp) - free (winp); + free (winp); /* Convert to WCHAR in case of CCP_POSIX_TO_WIN_W. */ if (orig_to) sys_mbstowcs ((wchar_t *) orig_to, size / sizeof (WCHAR), @@ -4202,7 +4202,7 @@ find_fast_cwd_pointer () if (lock) { /* The lock instruction tweaks the LockCount member, which is not at - the start of the PRTL_CRITICAL_SECTION structure. So we have to + the start of the PRTL_CRITICAL_SECTION structure. So we have to subtract the offset of LockCount to get the real address. */ PRTL_CRITICAL_SECTION lockaddr = (PRTL_CRITICAL_SECTION) (lock + 9 + peek32 (lock + 4) @@ -4300,7 +4300,7 @@ find_fast_cwd_pointer () if (movedi[0] == 0x8b && movedi[1] == 0xff) /* mov %edi,%edi -> W8 */ { /* Windows 8 does not call RtlEnterCriticalSection. The code manipulates - the FastPebLock manually, probably because RtlEnterCriticalSection has + the FastPebLock manually, probably because RtlEnterCriticalSection has been converted to an inline function. Next we search for a `mov some address,%eax'. This address points diff --git a/winsup/cygwin/pwdgrp.h b/winsup/cygwin/pwdgrp.h index f9ce95460..8f3ef3adb 100644 --- a/winsup/cygwin/pwdgrp.h +++ b/winsup/cygwin/pwdgrp.h @@ -132,7 +132,7 @@ public: struct passwd *add_user_from_windows (cygpsid &sid, cyg_ldap *pldap = NULL) { return (struct passwd *) add_account_from_windows (sid, pldap); } struct passwd *add_user_from_windows (const char *name, - cyg_ldap* pldap = NULL) + cyg_ldap* pldap = NULL) { return (struct passwd *) add_account_from_windows (name, pldap); } struct passwd *add_user_from_windows (uint32_t id, cyg_ldap *pldap = NULL) { return (struct passwd *) add_account_from_windows (id, pldap); } @@ -163,7 +163,7 @@ public: struct group *add_group_from_windows (uint32_t id, cyg_ldap *pldap = NULL) { return (struct group *) add_account_from_windows (id, pldap); } struct group *add_group_from_windows (fetch_acc_t &full_acc, - cyg_ldap *pldap = NULL); + cyg_ldap *pldap = NULL); struct group *find_group (cygpsid &sid); struct group *find_group (const char *name); struct group *find_group (gid_t gid); diff --git a/winsup/cygwin/quotactl.cc b/winsup/cygwin/quotactl.cc index 53513aea5..da16ba0b4 100644 --- a/winsup/cygwin/quotactl.cc +++ b/winsup/cygwin/quotactl.cc @@ -123,7 +123,7 @@ quotactl (int cmd, const char *special, int id, caddr_t addr) case Q_SYNC: /* No sync, just report success. */ status = STATUS_SUCCESS; - break; + break; case Q_QUOTAON: case Q_QUOTAOFF: /* Ignore filename in addr. */ @@ -141,7 +141,7 @@ quotactl (int cmd, const char *special, int id, caddr_t addr) FileFsControlInformation); break; case Q_GETFMT: - __try + __try { uint32_t *retval = (uint32_t *) addr; @@ -176,7 +176,7 @@ quotactl (int cmd, const char *special, int id, caddr_t addr) case Q_SETINFO: /* No settings possible, just report success. */ status = STATUS_SUCCESS; - break; + break; case Q_GETQUOTA: /* Windows feature: Default limits. Get or set them with id == -1. */ if (id == -1) diff --git a/winsup/cygwin/regex/cname.h b/winsup/cygwin/regex/cname.h index 4ad1ea93b..c5c33f02c 100644 --- a/winsup/cygwin/regex/cname.h +++ b/winsup/cygwin/regex/cname.h @@ -108,7 +108,7 @@ static struct cname { {"four", '4'}, {"five", '5'}, {"six", '6'}, - {"seven", '7'}, + {"seven", '7'}, {"eight", '8'}, {"nine", '9'}, {"colon", ':'}, diff --git a/winsup/cygwin/regex/regcomp.c b/winsup/cygwin/regex/regcomp.c index 180f599cd..e99ee8cb4 100644 --- a/winsup/cygwin/regex/regcomp.c +++ b/winsup/cygwin/regex/regcomp.c @@ -1842,7 +1842,7 @@ computematchjumps(struct parse *p, struct re_guts *g) suffix++; } if (suffix < g->mlen) - ssuffix = pmatches[ssuffix]; + ssuffix = pmatches[ssuffix]; } free(pmatches); diff --git a/winsup/cygwin/regex/regex2.h b/winsup/cygwin/regex/regex2.h index 53f687bf6..b9a35a45f 100644 --- a/winsup/cygwin/regex/regex2.h +++ b/winsup/cygwin/regex/regex2.h @@ -38,14 +38,14 @@ * First, the stuff that ends up in the outside-world include file = typedef off_t regoff_t; = typedef struct { - = int re_magic; - = size_t re_nsub; // number of parenthesized subexpressions - = const char *re_endp; // end pointer for REG_PEND - = struct re_guts *re_g; // none of your business :-) + = int re_magic; + = size_t re_nsub; // number of parenthesized subexpressions + = const char *re_endp; // end pointer for REG_PEND + = struct re_guts *re_g; // none of your business :-) = } regex_t; = typedef struct { - = regoff_t rm_so; // start of match - = regoff_t rm_eo; // end of match + = regoff_t rm_so; // start of match + = regoff_t rm_eo; // end of match = } regmatch_t; */ /* diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index 819e43d86..468b05164 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -410,7 +410,7 @@ create_object_sd_from_attribute (uid_t uid, gid_t gid, mode_t attribute, security_descriptor &sd) { return set_posix_access (attribute, uid, gid, NULL, 0, sd, false) - ? 0 : -1; + ? 0 : -1; } int diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc index 909cae1f1..f9de35c52 100644 --- a/winsup/cygwin/times.cc +++ b/winsup/cygwin/times.cc @@ -30,7 +30,7 @@ static inline void __attribute__ ((always_inline)) get_system_time (PLARGE_INTEGER systime) { wincap.has_precise_system_time () - ? GetSystemTimePreciseAsFileTime ((LPFILETIME) systime) + ? GetSystemTimePreciseAsFileTime ((LPFILETIME) systime) : GetSystemTimeAsFileTime ((LPFILETIME) systime); } From 3bb346d5937079c3dcbc75d113f81d1f80ee28ef Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 11 Mar 2020 13:28:27 +0100 Subject: [PATCH 259/520] Cygwin: fix formatting: collapse whitespace-only lines Signed-off-by: Corinna Vinschen --- winsup/cygwin/cygheap.cc | 2 +- winsup/cygwin/dcrt0.cc | 4 ++-- winsup/cygwin/exceptions.cc | 2 +- winsup/cygwin/external.cc | 2 +- winsup/cygwin/fcntl.cc | 2 +- winsup/cygwin/fhandler_floppy.cc | 2 +- winsup/cygwin/fhandler_netdrive.cc | 2 +- winsup/cygwin/fhandler_socket_inet.cc | 2 +- winsup/cygwin/include/fcntl.h | 2 +- winsup/cygwin/include/process.h | 2 +- winsup/cygwin/libc/base64.c | 6 +++--- winsup/cygwin/math/pow.def.h | 2 +- winsup/cygwin/math/powi.def.h | 2 +- winsup/cygwin/math/remquol.S | 2 +- winsup/cygwin/miscfuncs.h | 2 +- winsup/cygwin/net.cc | 2 +- winsup/cygwin/ntea.cc | 4 ++-- winsup/cygwin/path.cc | 2 +- winsup/cygwin/quotactl.cc | 2 +- winsup/cygwin/security.h | 2 +- winsup/cygwin/select.cc | 2 +- winsup/cygwin/winlean.h | 2 +- 22 files changed, 26 insertions(+), 26 deletions(-) diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index eb60cf279..3a32c352d 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -626,7 +626,7 @@ init_cygheap::add_tls (_cygtls *t) still utilizes the thread's _cygtls area, things go awry. The following methods take this into account: - + - The thread mutex is generally only locked under tls_sentry locking. - remove_tls, called from _cygtls::remove, locks the mutex before removing the threadlist entry and _cygtls::remove then unlocks and diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 86ab72564..5d8b4b74e 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -1220,7 +1220,7 @@ do_exit (int status) a reproducible value which could also be easily evaluated in cygwin_atexit. However, when building C++ applications with -fuse-cxa-atexit, G++ creates calls to __cxa_atexit using the *address* of __dso_handle as DSO handle. - + So what we do here is this: A call to __cxa_atexit from the application actually calls cygwin__cxa_atexit. From dso_handle (which is either &__dso_handle, or __dso_handle == ImageBase or NULL) we fetch the dll @@ -1265,7 +1265,7 @@ cygwin_atexit (void (*fn) (void)) Workaround: If dlls.find fails, try to find the dll entry of the DLL containing fn. If that works, proceed by calling __cxa_atexit, otherwise call atexit. - + This *should* be sufficiently safe. Ultimately, new applications will use the statically linked atexit function though, as outlined above. */ if (!d) diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index b331dc8d1..eed338263 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -1455,7 +1455,7 @@ sigpacket::process () tls = NULL; } } - + /* !tls means no threads available to catch a signal. */ if (!tls) { diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc index ee8a0f83f..74413a88a 100644 --- a/winsup/cygwin/external.cc +++ b/winsup/cygwin/external.cc @@ -656,7 +656,7 @@ cygwin_internal (cygwin_getinfo_types t, ...) "sshd", username_buffer, sizeof username_buffer); - + If this call succeeds, sshd expects the correct Cygwin username of the unprivileged sshd account in username_buffer. diff --git a/winsup/cygwin/fcntl.cc b/winsup/cygwin/fcntl.cc index 04eeaeb3b..9ef7e521f 100644 --- a/winsup/cygwin/fcntl.cc +++ b/winsup/cygwin/fcntl.cc @@ -43,7 +43,7 @@ fcntl64 (int fd, int cmd, ...) case which is covered here by always reading the arg with sizeof (intptr_t) == sizeof (long) == sizeof (void*) which matches all targets. - + However, the POSIX standard defines all numerical args as type int. If we take that literally, we had a (small) problem on 64 bit, since sizeof (void*) != sizeof (int). If we would like to follow POSIX more diff --git a/winsup/cygwin/fhandler_floppy.cc b/winsup/cygwin/fhandler_floppy.cc index 8fb18723f..33c1750f9 100644 --- a/winsup/cygwin/fhandler_floppy.cc +++ b/winsup/cygwin/fhandler_floppy.cc @@ -621,7 +621,7 @@ fhandler_dev_floppy::raw_write (const void *ptr, size_t len) } return bytes_written; } - + /* In O_DIRECT case, just write. */ if (write_file (p, len, &bytes_written, &ret)) return bytes_written; diff --git a/winsup/cygwin/fhandler_netdrive.cc b/winsup/cygwin/fhandler_netdrive.cc index 129d9dd86..b924b1876 100644 --- a/winsup/cygwin/fhandler_netdrive.cc +++ b/winsup/cygwin/fhandler_netdrive.cc @@ -246,7 +246,7 @@ fhandler_netdrive::readdir (DIR *dir, dirent *de) if (strlen (get_name ()) == 2) { UNICODE_STRING ss, ds; - + tp.u_get (&ds); RtlInitUnicodeString (&ss, bs); RtlDowncaseUnicodeString (&ds, &ss, FALSE); diff --git a/winsup/cygwin/fhandler_socket_inet.cc b/winsup/cygwin/fhandler_socket_inet.cc index 703781d17..348a494f3 100644 --- a/winsup/cygwin/fhandler_socket_inet.cc +++ b/winsup/cygwin/fhandler_socket_inet.cc @@ -341,7 +341,7 @@ fhandler_socket_wsock::evaluate_events (const long event_mask, long &events, socket. We're trying to workaround this problem here by taking the connect errorcode from the event and write it back into the SO_ERROR socket option. - + CV 2014-06-16: Call WSASetLastError *after* setsockopt since, apparently, setsockopt sets the last WSA error code to 0 on success. */ diff --git a/winsup/cygwin/include/fcntl.h b/winsup/cygwin/include/fcntl.h index 22adacaf2..ed396eab6 100644 --- a/winsup/cygwin/include/fcntl.h +++ b/winsup/cygwin/include/fcntl.h @@ -19,7 +19,7 @@ details. */ processes interact. If you have the requirement to interact with native Windows applications which use Windows mandatory file locking, your have to use mandatory locking as well. The command - + fcntl (fd, F_LCK_MANDATORY, 1) switches subsequent F_GETLK, F_SETLK, F_SETLKW calls to mandatory locking diff --git a/winsup/cygwin/include/process.h b/winsup/cygwin/include/process.h index 0436102b5..09814bb5c 100644 --- a/winsup/cygwin/include/process.h +++ b/winsup/cygwin/include/process.h @@ -1,6 +1,6 @@ /* cygwin/process.h. Define spawn family of functions as provided by Cygwin. The original file of this name is a MS/DOS invention. - + This file is part of Cygwin. This software is a copyrighted work licensed under the terms of the diff --git a/winsup/cygwin/libc/base64.c b/winsup/cygwin/libc/base64.c index 5ecf3296b..7c4046bc0 100644 --- a/winsup/cygwin/libc/base64.c +++ b/winsup/cygwin/libc/base64.c @@ -114,7 +114,7 @@ static const char Pad64 = '='; Since all base64 input is an integral number of octets, only the ------------------------------------------------- following cases can arise: - + (1) the final quantum of encoding input is an integral multiple of 24 bits; here, the final unit of encoded output will be an integral multiple of 4 characters @@ -158,14 +158,14 @@ b64_ntop(unsigned char const *src, size_t srclength, char *target, target[datalength++] = Base64[output[2]]; target[datalength++] = Base64[output[3]]; } - + /* Now we worry about padding. */ if (0 != srclength) { /* Get what's left. */ input[0] = input[1] = input[2] = '\0'; for (i = 0; i < srclength; i++) input[i] = *src++; - + output[0] = input[0] >> 2; output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); diff --git a/winsup/cygwin/math/pow.def.h b/winsup/cygwin/math/pow.def.h index b004c0991..409ad4ea8 100644 --- a/winsup/cygwin/math/pow.def.h +++ b/winsup/cygwin/math/pow.def.h @@ -62,7 +62,7 @@ pow (+/-inf, y) is +/-inf with no exception for finite y > 0 an odd integer pow (+/-inf, y) is +inf with no exception for finite y > 0 and not an odd integer pow (x, y) signals the invalid operation exception for finite x < 0 and finite non-integer y. - + For x /= 0: lim y->oo (1/x)^y results as: for |x| < 1 that sgn(x)*0 and for |x| > 0 that sgn(x)*Infinity */ diff --git a/winsup/cygwin/math/powi.def.h b/winsup/cygwin/math/powi.def.h index e3840e757..2f74f4f0c 100644 --- a/winsup/cygwin/math/powi.def.h +++ b/winsup/cygwin/math/powi.def.h @@ -57,7 +57,7 @@ powi (+/-inf, y) is +/-inf with no exception for finite y > 0 an odd integer powi (+/-inf, y) is +inf with no exception for finite y > 0 and not an odd integer powi (x, y) signals the invalid operation exception for finite x < 0 and finite non-integer y. - + For x /= 0: lim y->oo (1/x)^y results as: for |x| < 1 that sgn(x)*0 and for |x| > 0 that sgn(x)*Infinity */ diff --git a/winsup/cygwin/math/remquol.S b/winsup/cygwin/math/remquol.S index 3dd678b79..bdc587648 100644 --- a/winsup/cygwin/math/remquol.S +++ b/winsup/cygwin/math/remquol.S @@ -70,6 +70,6 @@ __MINGW_USYMBOL(remquol): jz 1f negl %eax 1: movl %eax, (%ecx) - + ret #endif diff --git a/winsup/cygwin/miscfuncs.h b/winsup/cygwin/miscfuncs.h index d1e519fa6..1ff7ee0d3 100644 --- a/winsup/cygwin/miscfuncs.h +++ b/winsup/cygwin/miscfuncs.h @@ -79,7 +79,7 @@ extern "C" void yield (); #define import_address(x) __import_address ((void *)(x)) void * __reg1 __import_address (void *); - + #define caller_return_address() \ __caller_return_address (__builtin_return_address (0)) void * __reg1 __caller_return_address (void *); diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 0636df39c..6ae1e167b 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -2857,7 +2857,7 @@ ga_dup (struct addrinfoW *ai, bool v4mapped, int idn_flags, int &err) } wcstombs (nai->ai_canonname, canonname, len + 1); } - + nai->ai_addrlen = v4mapped ? sizeof (struct sockaddr_in6) : ai->ai_addrlen; if ((nai->ai_addr = (struct sockaddr *) malloc (v4mapped ? sizeof (struct sockaddr_in6) diff --git a/winsup/cygwin/ntea.cc b/winsup/cygwin/ntea.cc index 59a0081e1..683e2dd79 100644 --- a/winsup/cygwin/ntea.cc +++ b/winsup/cygwin/ntea.cc @@ -26,10 +26,10 @@ details. */ with STATUS_INVALID_PARAMETER if the handle points to a file on a remote share, at least on Windows 7 and later. In theory the buffer should have a size of - + sizeof (FILE_FULL_EA_INFORMATION) + MAX_EA_NAME_LEN + MAX_EA_VALUE_LEN - + (65804 bytes), but we're opting for simplicity here, and a 64K buffer has the advantage that we can use a tmp_pathbuf buffer, rather than having to alloca 64K from stack. */ diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 2c37780de..bda3ca1b5 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -2627,7 +2627,7 @@ suffix_scan::has (const char *in_path, const suffix_info *in_suffixes) /* Avoid attaching suffixes if the resulting filename would be invalid. For performance reasons we don't check the length of a suffix, since we know that all suffixes are 4 chars in length. - + FIXME: This is not really correct. A fully functional test should work on wide character paths. This would probably also speed up symlink_info::check. */ diff --git a/winsup/cygwin/quotactl.cc b/winsup/cygwin/quotactl.cc index da16ba0b4..6b4289716 100644 --- a/winsup/cygwin/quotactl.cc +++ b/winsup/cygwin/quotactl.cc @@ -108,7 +108,7 @@ quotactl (int cmd, const char *special, int id, caddr_t addr) pc.get_object_attr (attr, sec_none_nih); /* For the following functions to work, we must attach the virtual path to the quota file to the device path. - + FIXME: Note that this is NTFS-specific. Adding ReFS in another step. */ tp.u_get (&path); RtlCopyUnicodeString (&path, attr.ObjectName); diff --git a/winsup/cygwin/security.h b/winsup/cygwin/security.h index 483a527e7..ba787fcf9 100644 --- a/winsup/cygwin/security.h +++ b/winsup/cygwin/security.h @@ -36,7 +36,7 @@ bool check_token_membership (PSID); SIDs of the form S-1-22-x-y, with x == 1 for users and x == 2 for groups, and y == UNIX uid/gid. NFS returns no SIDs at all, but the plain UNIX uid/gid values. - + UNIX uid/gid values are mapped to Cygwin uid/gid values 0xff000000 + unix uid/gid. This *might* collide with a posix_offset of some trusted domain, but it's *very* unlikely. Define the mapping as macro. */ diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 48a700132..3965cfbb4 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -289,7 +289,7 @@ select_record::dump_select_record () read_ready, write_ready, except_ready); select_printf ("read_selected %d, write_selected %d, except_selected %d, except_on_write %d", read_selected, write_selected, except_selected, except_on_write); - + select_printf ("startup %p, peek %p, verify %p cleanup %p, next %p", startup, peek, verify, cleanup, next); } diff --git a/winsup/cygwin/winlean.h b/winsup/cygwin/winlean.h index 3d79a92e4..1332cb7aa 100644 --- a/winsup/cygwin/winlean.h +++ b/winsup/cygwin/winlean.h @@ -77,7 +77,7 @@ details. */ /* So-called "Microsoft Account" SIDs (S-1-11-...) have a netbios domain name "MicrosoftAccounts". The new "Application Container SIDs" (S-1-15-...) have a netbios domain name "APPLICATION PACKAGE AUTHORITY" - + The problem is, DNLEN is 15, but these domain names have a length of 16 resp. 29 chars :-P So we override DNLEN here to be 31, so that calls to LookupAccountSid/Name don't fail if the buffer is based on DNLEN. From b74bc88385a52e87d16f71d75a12f784ce1fce6d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 11 Mar 2020 13:36:41 +0100 Subject: [PATCH 260/520] Cygwin: fix formatting: drop trailing whitespace Signed-off-by: Corinna Vinschen --- winsup/cygwin/aio.cc | 2 +- winsup/cygwin/exceptions.cc | 2 +- winsup/cygwin/fhandler.h | 4 ++-- winsup/cygwin/fhandler_disk_file.cc | 4 ++-- winsup/cygwin/fhandler_floppy.cc | 2 +- winsup/cygwin/fhandler_socket_inet.cc | 4 ++-- winsup/cygwin/fhandler_virtual.h | 2 +- winsup/cygwin/grp.cc | 2 +- winsup/cygwin/include/cygwin/acl.h | 2 +- winsup/cygwin/include/cygwin/signal.h | 2 +- winsup/cygwin/include/machine/_arc4random.h | 2 +- winsup/cygwin/ldap.h | 2 +- winsup/cygwin/libc/base64.c | 2 +- winsup/cygwin/libc/strfmon.c | 4 ++-- winsup/cygwin/math/acosh.def.h | 2 +- winsup/cygwin/math/acoshl.c | 2 +- winsup/cygwin/math/asinhl.c | 2 +- winsup/cygwin/math/atanhl.c | 2 +- winsup/cygwin/math/cabs.def.h | 2 +- winsup/cygwin/math/cabsl.c | 2 +- winsup/cygwin/math/cacos.def.h | 2 +- winsup/cygwin/math/cacosh.def.h | 2 +- winsup/cygwin/math/cacosl.c | 2 +- winsup/cygwin/math/carg.def.h | 2 +- winsup/cygwin/math/cargl.c | 2 +- winsup/cygwin/math/casin.def.h | 2 +- winsup/cygwin/math/casinh.def.h | 2 +- winsup/cygwin/math/casinl.c | 2 +- winsup/cygwin/math/catan.def.h | 2 +- winsup/cygwin/math/catanh.def.h | 2 +- winsup/cygwin/math/catanl.c | 2 +- winsup/cygwin/math/ccos.def.h | 2 +- winsup/cygwin/math/ccosh.def.h | 2 +- winsup/cygwin/math/ccosl.c | 2 +- winsup/cygwin/math/cephes_emath.c | 2 +- winsup/cygwin/math/cephes_emath.h | 10 +++++----- winsup/cygwin/math/cexp.def.h | 2 +- winsup/cygwin/math/cexpl.c | 2 +- winsup/cygwin/math/cimag.def.h | 2 +- winsup/cygwin/math/cimagl.c | 2 +- winsup/cygwin/math/clog.def.h | 2 +- winsup/cygwin/math/clog10.def.h | 2 +- winsup/cygwin/math/clog10l.c | 2 +- winsup/cygwin/math/clogl.c | 2 +- winsup/cygwin/math/complex_internal.h | 2 +- winsup/cygwin/math/conj.def.h | 2 +- winsup/cygwin/math/conjl.c | 2 +- winsup/cygwin/math/cos.def.h | 2 +- winsup/cygwin/math/cosl.c | 2 +- winsup/cygwin/math/cpow.def.h | 2 +- winsup/cygwin/math/cpowl.c | 2 +- winsup/cygwin/math/cproj.def.h | 2 +- winsup/cygwin/math/cprojl.c | 2 +- winsup/cygwin/math/creal.def.h | 2 +- winsup/cygwin/math/creall.c | 2 +- winsup/cygwin/math/csin.def.h | 2 +- winsup/cygwin/math/csinh.def.h | 2 +- winsup/cygwin/math/csinl.c | 2 +- winsup/cygwin/math/csqrt.def.h | 2 +- winsup/cygwin/math/csqrtl.c | 2 +- winsup/cygwin/math/ctan.def.h | 2 +- winsup/cygwin/math/ctanh.def.h | 2 +- winsup/cygwin/math/ctanl.c | 2 +- winsup/cygwin/math/erfl.c | 4 ++-- winsup/cygwin/math/exp.def.h | 2 +- winsup/cygwin/math/expl.c | 2 +- winsup/cygwin/math/expm1.def.h | 2 +- winsup/cygwin/math/expm1l.c | 2 +- winsup/cygwin/math/fastmath.h | 2 +- winsup/cygwin/math/frexpl.S | 2 +- winsup/cygwin/math/lgammal.c | 2 +- winsup/cygwin/math/llrint.c | 2 +- winsup/cygwin/math/llrintf.c | 2 +- winsup/cygwin/math/llrintl.c | 2 +- winsup/cygwin/math/log.def.h | 2 +- winsup/cygwin/math/logl.c | 2 +- winsup/cygwin/math/lrint.c | 2 +- winsup/cygwin/math/lrintf.c | 2 +- winsup/cygwin/math/lrintl.c | 2 +- winsup/cygwin/math/nextafterl.c | 4 ++-- winsup/cygwin/math/nexttoward.c | 4 ++-- winsup/cygwin/math/nexttowardf.c | 2 +- winsup/cygwin/math/pow.def.h | 4 ++-- winsup/cygwin/math/powi.def.h | 2 +- winsup/cygwin/math/powil.c | 2 +- winsup/cygwin/math/powl.c | 2 +- winsup/cygwin/math/remquol.S | 2 +- winsup/cygwin/math/sin.def.h | 2 +- winsup/cygwin/math/sinl.c | 2 +- winsup/cygwin/math/sqrt.def.h | 2 +- winsup/cygwin/math/sqrtl.c | 2 +- winsup/cygwin/miscfuncs.cc | 4 ++-- winsup/cygwin/net.cc | 10 +++++----- winsup/cygwin/ntea.cc | 2 +- winsup/cygwin/passwd.cc | 4 ++-- winsup/cygwin/quotactl.cc | 2 +- winsup/cygwin/sec_helper.cc | 2 +- winsup/cygwin/smallprint.cc | 2 +- winsup/cygwin/tls_pbuf.h | 2 +- 99 files changed, 117 insertions(+), 117 deletions(-) diff --git a/winsup/cygwin/aio.cc b/winsup/cygwin/aio.cc index f38ea4d11..619dbdcb7 100644 --- a/winsup/cygwin/aio.cc +++ b/winsup/cygwin/aio.cc @@ -37,7 +37,7 @@ static NO_COPY volatile LONG aioinitialized = 0; * on completion. Event arrival causes AIO context for the fd to be updated. * * A queued AIO is performed in a similar manner, but by an AIO worker thread - * rather than the calling app's thread. The queued flavor can also operate + * rather than the calling app's thread. The queued flavor can also operate * on sockets, pipes, non-binary files, mandatory-locked files, and files * that don't support pread|pwrite. Generally all these cases are handled as * synchronous read|write operations, but still don't delay the app because diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index eed338263..bccedfa5d 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -814,7 +814,7 @@ exception::handle (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in, /* POSIX requires that for SIGSEGV and SIGBUS, si_addr should be set to the address of faulting memory reference. For SIGILL and SIGFPE these should be the address of the faulting instruction. Other signals are apparently - undefined so we just set those to the faulting instruction too. */ + undefined so we just set those to the faulting instruction too. */ si.si_addr = (si.si_signo == SIGSEGV || si.si_signo == SIGBUS) ? (void *) e->ExceptionInformation[1] : (void *) in->_GR(ip); me.incyg++; diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index fd65370df..d3afd753a 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -605,7 +605,7 @@ class fhandler_socket: public fhandler_base int __reg3 facl (int, int, struct acl *); int __reg2 link (const char *); off_t lseek (off_t, int) - { + { set_errno (ESPIPE); return -1; } @@ -1709,7 +1709,7 @@ class fhandler_serial: public fhandler_base int tcsetattr (int a, const struct termios *t); int tcgetattr (struct termios *t); off_t lseek (off_t, int) - { + { set_errno (ESPIPE); return -1; } diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index f84012d42..43d81c10f 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -696,12 +696,12 @@ fhandler_base::fstatvfs_by_handle (HANDLE fh, struct statvfs *sfs) } else debug_printf ("%y = NtQueryVolumeInformationFile" - "(%S, FileFsSizeInformation)", + "(%S, FileFsSizeInformation)", status, pc.get_nt_native_path ()); } else debug_printf ("%y = NtQueryVolumeInformationFile" - "(%S, FileFsFullSizeInformation)", + "(%S, FileFsFullSizeInformation)", status, pc.get_nt_native_path ()); return ret; } diff --git a/winsup/cygwin/fhandler_floppy.cc b/winsup/cygwin/fhandler_floppy.cc index 33c1750f9..f2e15d703 100644 --- a/winsup/cygwin/fhandler_floppy.cc +++ b/winsup/cygwin/fhandler_floppy.cc @@ -74,7 +74,7 @@ fhandler_dev_floppy::get_drive_info (struct hd_geometry *geo) di = (DISK_GEOMETRY *) dbuf; } if (dix) /* Don't try IOCTL_DISK_GET_PARTITION_INFO_EX if - IOCTL_DISK_GET_DRIVE_GEOMETRY_EX didn't work. + IOCTL_DISK_GET_DRIVE_GEOMETRY_EX didn't work. Probably a floppy.*/ { if (!DeviceIoControl (get_handle (), diff --git a/winsup/cygwin/fhandler_socket_inet.cc b/winsup/cygwin/fhandler_socket_inet.cc index 348a494f3..18ee42260 100644 --- a/winsup/cygwin/fhandler_socket_inet.cc +++ b/winsup/cygwin/fhandler_socket_inet.cc @@ -291,7 +291,7 @@ fhandler_socket_wsock::evaluate_events (const long event_mask, long &events, { wsock_events->connect_errorcode = evts.iErrorCode[FD_CONNECT_BIT]; - /* Setting the connect_state and calling the AF_LOCAL handshake + /* Setting the connect_state and calling the AF_LOCAL handshake here allows to handle this stuff from a single point. This is independent of FD_CONNECT being requested. Consider a server calling connect(2) and then immediately poll(2) with @@ -301,7 +301,7 @@ fhandler_socket_wsock::evaluate_events (const long event_mask, long &events, Something weird occurs in Winsock: If you fork off and call recv/send on the duplicated, already connected socket, another FD_CONNECT event is generated in the child process. This - would trigger a call to af_local_connect which obviously fail. + would trigger a call to af_local_connect which obviously fail. Avoid this by calling set_connect_state only if connect_state is connect_pending. */ if (connect_state () == connect_pending) diff --git a/winsup/cygwin/fhandler_virtual.h b/winsup/cygwin/fhandler_virtual.h index cbd7a0d94..8af99a8a4 100644 --- a/winsup/cygwin/fhandler_virtual.h +++ b/winsup/cygwin/fhandler_virtual.h @@ -24,7 +24,7 @@ virt_ftype_to_dtype (virtual_ftype_t type) { unsigned char d_type; - switch (type) + switch (type) { case virt_directory: d_type = DT_DIR; diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index ab19a1776..5ec927fef 100644 --- a/winsup/cygwin/grp.cc +++ b/winsup/cygwin/grp.cc @@ -612,7 +612,7 @@ internal_getgroups (int gidsetsize, gid_t *grouplist, cyg_ldap *pldap) goto out; } } - else + else sidp_buf[scnt++] = sid; } /* If there are non-cached groups left, try to fetch them. */ diff --git a/winsup/cygwin/include/cygwin/acl.h b/winsup/cygwin/include/cygwin/acl.h index 885fffe62..7b803134a 100644 --- a/winsup/cygwin/include/cygwin/acl.h +++ b/winsup/cygwin/include/cygwin/acl.h @@ -25,7 +25,7 @@ extern "C" { /* Windows ACLs have a maximum size of 64K. Counting the most pessimistic way, the maximum number of ACEs is 3276. Technet claims "approximately 1820", - which uses the length of normal user and group SIDs for the computation. + which uses the length of normal user and group SIDs for the computation. We're now going with 2730, the number of aclent_t entries matching a 32K buffer. On one hand, there are only a limited number of SIDs shorter than the normal diff --git a/winsup/cygwin/include/cygwin/signal.h b/winsup/cygwin/include/cygwin/signal.h index ebb9ae329..7b17134f5 100644 --- a/winsup/cygwin/include/cygwin/signal.h +++ b/winsup/cygwin/include/cygwin/signal.h @@ -246,7 +246,7 @@ typedef struct signals */ /* Cygwin internal fields */ #ifdef __INSIDE_CYGWIN__ - __extension__ struct + __extension__ struct { __uint32_t __pad2[__SI_CYG_PAD]; /* Locate at end of struct */ void *si_cyg; /* pointer to block containing diff --git a/winsup/cygwin/include/machine/_arc4random.h b/winsup/cygwin/include/machine/_arc4random.h index 69a4ce657..2078c3597 100644 --- a/winsup/cygwin/include/machine/_arc4random.h +++ b/winsup/cygwin/include/machine/_arc4random.h @@ -25,4 +25,4 @@ extern int __isthreaded; __lock_release (_arc4random_mutex); \ } while (0) -#endif /* _MACHINE_ARC4RANDOM_H */ +#endif /* _MACHINE_ARC4RANDOM_H */ diff --git a/winsup/cygwin/ldap.h b/winsup/cygwin/ldap.h index d51f18cbb..224a67f05 100644 --- a/winsup/cygwin/ldap.h +++ b/winsup/cygwin/ldap.h @@ -35,7 +35,7 @@ class cyg_ldap { public: cyg_ldap () : lh (NULL), def_context (NULL), msg (NULL), entry (NULL), - val (NULL), isAD (false), srch_id (NULL), + val (NULL), isAD (false), srch_id (NULL), last_fetched_sid (NO_SID) {} ~cyg_ldap () { close (); } diff --git a/winsup/cygwin/libc/base64.c b/winsup/cygwin/libc/base64.c index 7c4046bc0..02cb46d41 100644 --- a/winsup/cygwin/libc/base64.c +++ b/winsup/cygwin/libc/base64.c @@ -112,7 +112,7 @@ static const char Pad64 = '='; end of the data is performed using the '=' character. Since all base64 input is an integral number of octets, only the - ------------------------------------------------- + ------------------------------------------------- following cases can arise: (1) the final quantum of encoding input is an integral diff --git a/winsup/cygwin/libc/strfmon.c b/winsup/cygwin/libc/strfmon.c index 4dc6afa97..ad8d74d98 100644 --- a/winsup/cygwin/libc/strfmon.c +++ b/winsup/cygwin/libc/strfmon.c @@ -305,9 +305,9 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, * * = 0 - parentheses enclose the quantity and the * $currency_symbol - * = 1 - the sign string precedes the quantity and the + * = 1 - the sign string precedes the quantity and the * $currency_symbol - * = 2 - the sign string succeeds the quantity and the + * = 2 - the sign string succeeds the quantity and the * $currency_symbol * = 3 - the sign string precedes the $currency_symbol * = 4 - the sign string succeeds the $currency_symbol diff --git a/winsup/cygwin/math/acosh.def.h b/winsup/cygwin/math/acosh.def.h index 870be3646..49de503f7 100644 --- a/winsup/cygwin/math/acosh.def.h +++ b/winsup/cygwin/math/acosh.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/acoshl.c b/winsup/cygwin/math/acoshl.c index 88f9f130e..c33db1517 100644 --- a/winsup/cygwin/math/acoshl.c +++ b/winsup/cygwin/math/acoshl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/asinhl.c b/winsup/cygwin/math/asinhl.c index bb2ca97b2..88930dd0c 100644 --- a/winsup/cygwin/math/asinhl.c +++ b/winsup/cygwin/math/asinhl.c @@ -23,7 +23,7 @@ long double asinhl(long double x) #endif /* Use log1p to avoid cancellation with small x. Put - x * x in denom, so overflow is harmless. + x * x in denom, so overflow is harmless. asinh(x) = log1p (x + sqrt (x * x + 1.0) - 1.0) = log1p (x + x * x / (sqrt (x * x + 1.0) + 1.0)) */ diff --git a/winsup/cygwin/math/atanhl.c b/winsup/cygwin/math/atanhl.c index a9b8e24b9..4b5d8d6ce 100644 --- a/winsup/cygwin/math/atanhl.c +++ b/winsup/cygwin/math/atanhl.c @@ -27,7 +27,7 @@ long double atanhl (long double x) /* Rearrange formula to avoid precision loss for small x. atanh(x) = 0.5 * log ((1.0 + x)/(1.0 - x)) = 0.5 * log1p ((1.0 + x)/(1.0 - x) - 1.0) - = 0.5 * log1p ((1.0 + x - 1.0 + x) /(1.0 - x)) + = 0.5 * log1p ((1.0 + x - 1.0 + x) /(1.0 - x)) = 0.5 * log1p ((2.0 * x ) / (1.0 - x)) */ z = 0.5L * __fast_log1pl ((z + z) / (1.0L - z)); return x >= 0 ? z : -z; diff --git a/winsup/cygwin/math/cabs.def.h b/winsup/cygwin/math/cabs.def.h index b3ea09764..20b788e95 100644 --- a/winsup/cygwin/math/cabs.def.h +++ b/winsup/cygwin/math/cabs.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/cabsl.c b/winsup/cygwin/math/cabsl.c index c750e877d..40b25e8af 100644 --- a/winsup/cygwin/math/cabsl.c +++ b/winsup/cygwin/math/cabsl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/cacos.def.h b/winsup/cygwin/math/cacos.def.h index 300faffac..957f20239 100644 --- a/winsup/cygwin/math/cacos.def.h +++ b/winsup/cygwin/math/cacos.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/cacosh.def.h b/winsup/cygwin/math/cacosh.def.h index f4ea2da07..5105b426e 100644 --- a/winsup/cygwin/math/cacosh.def.h +++ b/winsup/cygwin/math/cacosh.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/cacosl.c b/winsup/cygwin/math/cacosl.c index 7a8df652d..c1aeb11d2 100644 --- a/winsup/cygwin/math/cacosl.c +++ b/winsup/cygwin/math/cacosl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/carg.def.h b/winsup/cygwin/math/carg.def.h index 2ccf84189..d5f025f31 100644 --- a/winsup/cygwin/math/carg.def.h +++ b/winsup/cygwin/math/carg.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/cargl.c b/winsup/cygwin/math/cargl.c index e70f580ea..0a195455c 100644 --- a/winsup/cygwin/math/cargl.c +++ b/winsup/cygwin/math/cargl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/casin.def.h b/winsup/cygwin/math/casin.def.h index 808c1bef0..461edc1ac 100644 --- a/winsup/cygwin/math/casin.def.h +++ b/winsup/cygwin/math/casin.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/casinh.def.h b/winsup/cygwin/math/casinh.def.h index 050d885a0..0cf46980d 100644 --- a/winsup/cygwin/math/casinh.def.h +++ b/winsup/cygwin/math/casinh.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/casinl.c b/winsup/cygwin/math/casinl.c index 1d7e24785..24ebbf7af 100644 --- a/winsup/cygwin/math/casinl.c +++ b/winsup/cygwin/math/casinl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/catan.def.h b/winsup/cygwin/math/catan.def.h index 19db6b78b..6b3632320 100644 --- a/winsup/cygwin/math/catan.def.h +++ b/winsup/cygwin/math/catan.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/catanh.def.h b/winsup/cygwin/math/catanh.def.h index 68949d139..2f71098f1 100644 --- a/winsup/cygwin/math/catanh.def.h +++ b/winsup/cygwin/math/catanh.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/catanl.c b/winsup/cygwin/math/catanl.c index 9c1ccdfcb..60affd9b9 100644 --- a/winsup/cygwin/math/catanl.c +++ b/winsup/cygwin/math/catanl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/ccos.def.h b/winsup/cygwin/math/ccos.def.h index 2e7472cd9..abed13bfe 100644 --- a/winsup/cygwin/math/ccos.def.h +++ b/winsup/cygwin/math/ccos.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/ccosh.def.h b/winsup/cygwin/math/ccosh.def.h index c18d657bf..5a27ef483 100644 --- a/winsup/cygwin/math/ccosh.def.h +++ b/winsup/cygwin/math/ccosh.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/ccosl.c b/winsup/cygwin/math/ccosl.c index 594a4d1de..8c78e9f37 100644 --- a/winsup/cygwin/math/ccosl.c +++ b/winsup/cygwin/math/ccosl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/cephes_emath.c b/winsup/cygwin/math/cephes_emath.c index 8fb44346c..bb5fcae77 100644 --- a/winsup/cygwin/math/cephes_emath.c +++ b/winsup/cygwin/math/cephes_emath.c @@ -1280,4 +1280,4 @@ void __e64toe(short unsigned int *pe, short unsigned int *y) *q++ = *p++; } -#endif /* USE_LDTOA */ +#endif /* USE_LDTOA */ diff --git a/winsup/cygwin/math/cephes_emath.h b/winsup/cygwin/math/cephes_emath.h index 740356b71..25f6836e4 100644 --- a/winsup/cygwin/math/cephes_emath.h +++ b/winsup/cygwin/math/cephes_emath.h @@ -12,7 +12,7 @@ #define __restrict__ /* This file is extracted from S L Moshier's ioldoubl.c, - * modified for use in MinGW + * modified for use in MinGW * * Extended precision arithmetic functions for long double I/O. * This program has been placed in the public domain. @@ -32,9 +32,9 @@ * 6 Oct 02 Modified for MinGW by inlining utility routines, * removing global variables, and splitting out strtold * from _IO_ldtoa and _IO_ldtostr. - * + * * Danny Smith - * + * */ @@ -160,7 +160,7 @@ #undef alloca #define alloca __builtin_alloca -/* Don't build non-ANSI _IO_ldtoa. It is not thread safe. */ +/* Don't build non-ANSI _IO_ldtoa. It is not thread safe. */ #ifndef USE_LDTOA #define USE_LDTOA 0 #endif @@ -503,7 +503,7 @@ __eiiszero(const short unsigned int * ai) /* Return nonzero if internal format number is infinite. */ -static __inline__ int +static __inline__ int __eiisinf (const unsigned short *x) { #ifdef NANS diff --git a/winsup/cygwin/math/cexp.def.h b/winsup/cygwin/math/cexp.def.h index c0c97b70f..ff7eed128 100644 --- a/winsup/cygwin/math/cexp.def.h +++ b/winsup/cygwin/math/cexp.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/cexpl.c b/winsup/cygwin/math/cexpl.c index 9c33bc05c..062db3cd8 100644 --- a/winsup/cygwin/math/cexpl.c +++ b/winsup/cygwin/math/cexpl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/cimag.def.h b/winsup/cygwin/math/cimag.def.h index 0212d9390..ca80928d8 100644 --- a/winsup/cygwin/math/cimag.def.h +++ b/winsup/cygwin/math/cimag.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/cimagl.c b/winsup/cygwin/math/cimagl.c index 94835d745..c66d6af56 100644 --- a/winsup/cygwin/math/cimagl.c +++ b/winsup/cygwin/math/cimagl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/clog.def.h b/winsup/cygwin/math/clog.def.h index 604c3f321..633162fbe 100644 --- a/winsup/cygwin/math/clog.def.h +++ b/winsup/cygwin/math/clog.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/clog10.def.h b/winsup/cygwin/math/clog10.def.h index cdd4eb6b5..8f5b3b863 100644 --- a/winsup/cygwin/math/clog10.def.h +++ b/winsup/cygwin/math/clog10.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/clog10l.c b/winsup/cygwin/math/clog10l.c index 8baa2aafd..b1d2eff52 100644 --- a/winsup/cygwin/math/clog10l.c +++ b/winsup/cygwin/math/clog10l.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/clogl.c b/winsup/cygwin/math/clogl.c index 383fcfa0f..c323a6dd6 100644 --- a/winsup/cygwin/math/clogl.c +++ b/winsup/cygwin/math/clogl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/complex_internal.h b/winsup/cygwin/math/complex_internal.h index 83b17b0f5..e54e61d71 100644 --- a/winsup/cygwin/math/complex_internal.h +++ b/winsup/cygwin/math/complex_internal.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/conj.def.h b/winsup/cygwin/math/conj.def.h index 35fa8989d..0937adc80 100644 --- a/winsup/cygwin/math/conj.def.h +++ b/winsup/cygwin/math/conj.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/conjl.c b/winsup/cygwin/math/conjl.c index 52e32e65a..11ad73035 100644 --- a/winsup/cygwin/math/conjl.c +++ b/winsup/cygwin/math/conjl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/cos.def.h b/winsup/cygwin/math/cos.def.h index cbb226e49..d32d36ecc 100644 --- a/winsup/cygwin/math/cos.def.h +++ b/winsup/cygwin/math/cos.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/cosl.c b/winsup/cygwin/math/cosl.c index f798862d3..02f510c6f 100644 --- a/winsup/cygwin/math/cosl.c +++ b/winsup/cygwin/math/cosl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/cpow.def.h b/winsup/cygwin/math/cpow.def.h index 984224b96..69fe507f8 100644 --- a/winsup/cygwin/math/cpow.def.h +++ b/winsup/cygwin/math/cpow.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/cpowl.c b/winsup/cygwin/math/cpowl.c index 42edb7996..a5071e1b4 100644 --- a/winsup/cygwin/math/cpowl.c +++ b/winsup/cygwin/math/cpowl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/cproj.def.h b/winsup/cygwin/math/cproj.def.h index e15d779f7..1c6961971 100644 --- a/winsup/cygwin/math/cproj.def.h +++ b/winsup/cygwin/math/cproj.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/cprojl.c b/winsup/cygwin/math/cprojl.c index d48d10877..a83b48eda 100644 --- a/winsup/cygwin/math/cprojl.c +++ b/winsup/cygwin/math/cprojl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/creal.def.h b/winsup/cygwin/math/creal.def.h index 554c99d8c..867de9d75 100644 --- a/winsup/cygwin/math/creal.def.h +++ b/winsup/cygwin/math/creal.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/creall.c b/winsup/cygwin/math/creall.c index e46c8ea37..6887200df 100644 --- a/winsup/cygwin/math/creall.c +++ b/winsup/cygwin/math/creall.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/csin.def.h b/winsup/cygwin/math/csin.def.h index cf9cfe108..b23872df9 100644 --- a/winsup/cygwin/math/csin.def.h +++ b/winsup/cygwin/math/csin.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/csinh.def.h b/winsup/cygwin/math/csinh.def.h index 3e07d2bab..eb100b46c 100644 --- a/winsup/cygwin/math/csinh.def.h +++ b/winsup/cygwin/math/csinh.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/csinl.c b/winsup/cygwin/math/csinl.c index de04104c8..424b0d088 100644 --- a/winsup/cygwin/math/csinl.c +++ b/winsup/cygwin/math/csinl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/csqrt.def.h b/winsup/cygwin/math/csqrt.def.h index 714f303c1..6c38bc3e5 100644 --- a/winsup/cygwin/math/csqrt.def.h +++ b/winsup/cygwin/math/csqrt.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/csqrtl.c b/winsup/cygwin/math/csqrtl.c index 1993289b5..c656ac97b 100644 --- a/winsup/cygwin/math/csqrtl.c +++ b/winsup/cygwin/math/csqrtl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/ctan.def.h b/winsup/cygwin/math/ctan.def.h index 28df5f330..232f7b0ea 100644 --- a/winsup/cygwin/math/ctan.def.h +++ b/winsup/cygwin/math/ctan.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/ctanh.def.h b/winsup/cygwin/math/ctanh.def.h index 11a183648..7395eda8e 100644 --- a/winsup/cygwin/math/ctanh.def.h +++ b/winsup/cygwin/math/ctanh.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/ctanl.c b/winsup/cygwin/math/ctanl.c index eb7e37807..b06071b9c 100644 --- a/winsup/cygwin/math/ctanl.c +++ b/winsup/cygwin/math/ctanl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/erfl.c b/winsup/cygwin/math/erfl.c index bfd8d33d3..47ca14762 100644 --- a/winsup/cygwin/math/erfl.c +++ b/winsup/cygwin/math/erfl.c @@ -21,7 +21,7 @@ * * The integral is * - * x + * x * - * 2 | | 2 * erf(x) = -------- | exp( - t ) dt. @@ -64,7 +64,7 @@ * * 1 - erf(x) = * - * inf. + * inf. * - * 2 | | 2 * erfc(x) = -------- | exp( - t ) dt diff --git a/winsup/cygwin/math/exp.def.h b/winsup/cygwin/math/exp.def.h index 678e7c1ee..d4d4c04cf 100644 --- a/winsup/cygwin/math/exp.def.h +++ b/winsup/cygwin/math/exp.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/expl.c b/winsup/cygwin/math/expl.c index 7f4be6239..0740f87c1 100644 --- a/winsup/cygwin/math/expl.c +++ b/winsup/cygwin/math/expl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/expm1.def.h b/winsup/cygwin/math/expm1.def.h index 64fe42860..028211f91 100644 --- a/winsup/cygwin/math/expm1.def.h +++ b/winsup/cygwin/math/expm1.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/expm1l.c b/winsup/cygwin/math/expm1l.c index 625fbb1d7..66c7104a0 100644 --- a/winsup/cygwin/math/expm1l.c +++ b/winsup/cygwin/math/expm1l.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/fastmath.h b/winsup/cygwin/math/fastmath.h index a6bb467c2..eb1846cb3 100644 --- a/winsup/cygwin/math/fastmath.h +++ b/winsup/cygwin/math/fastmath.h @@ -14,7 +14,7 @@ are currently used in building libmingwex.a math components */ /* FIXME: We really should get rid of the code duplication using euther - C++ templates or tgmath-type macros. */ + C++ templates or tgmath-type macros. */ static __inline__ double __fast_sqrt (double x) { diff --git a/winsup/cygwin/math/frexpl.S b/winsup/cygwin/math/frexpl.S index f9fcc6be1..12782c29e 100644 --- a/winsup/cygwin/math/frexpl.S +++ b/winsup/cygwin/math/frexpl.S @@ -9,7 +9,7 @@ * frexpl(long double x, int* expnt) extracts the exponent from x. * It returns an integer power of two to expnt and the significand * between 0.5 and 1 to y. Thus x = y * 2**expn. - */ + */ #ifdef __x86_64__ .align 8 #else diff --git a/winsup/cygwin/math/lgammal.c b/winsup/cygwin/math/lgammal.c index 533ef7553..022a16acf 100644 --- a/winsup/cygwin/math/lgammal.c +++ b/winsup/cygwin/math/lgammal.c @@ -205,7 +205,7 @@ static const long double LS2PI = 0.91893853320467274178L; #endif /* defined(__arm__) || defined(_ARM_) */ /* Logarithm of gamma function */ -/* Reentrant version */ +/* Reentrant version */ long double __lgammal_r(long double x, int* sgngaml); long double __lgammal_r(long double x, int* sgngaml) diff --git a/winsup/cygwin/math/llrint.c b/winsup/cygwin/math/llrint.c index 1fc11e886..e797131e2 100644 --- a/winsup/cygwin/math/llrint.c +++ b/winsup/cygwin/math/llrint.c @@ -5,7 +5,7 @@ */ #include -long long llrint (double x) +long long llrint (double x) { long long retval = 0ll; #if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__) diff --git a/winsup/cygwin/math/llrintf.c b/winsup/cygwin/math/llrintf.c index aabd81f33..cc85bf3c3 100644 --- a/winsup/cygwin/math/llrintf.c +++ b/winsup/cygwin/math/llrintf.c @@ -5,7 +5,7 @@ */ #include -long long llrintf (float x) +long long llrintf (float x) { long long retval = 0ll; #if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__) diff --git a/winsup/cygwin/math/llrintl.c b/winsup/cygwin/math/llrintl.c index 59ace2dfe..5ef74a5aa 100644 --- a/winsup/cygwin/math/llrintl.c +++ b/winsup/cygwin/math/llrintl.c @@ -5,7 +5,7 @@ */ #include -long long llrintl (long double x) +long long llrintl (long double x) { long long retval = 0ll; #if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__) diff --git a/winsup/cygwin/math/log.def.h b/winsup/cygwin/math/log.def.h index b4121e929..fa55ef080 100644 --- a/winsup/cygwin/math/log.def.h +++ b/winsup/cygwin/math/log.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/logl.c b/winsup/cygwin/math/logl.c index a0fa386dc..75c3f5a4c 100644 --- a/winsup/cygwin/math/logl.c +++ b/winsup/cygwin/math/logl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/lrint.c b/winsup/cygwin/math/lrint.c index 0d3810732..28c2e150a 100644 --- a/winsup/cygwin/math/lrint.c +++ b/winsup/cygwin/math/lrint.c @@ -18,7 +18,7 @@ asm(".def __lrint_internal; .scl 2; .type 32; .endef\n" "\tbx lr"); #endif /* defined(__arm__) || defined(_ARM_) */ -long lrint (double x) +long lrint (double x) { long retval = 0L; #if defined (__x86_64__) && defined (__CYGWIN__) diff --git a/winsup/cygwin/math/lrintf.c b/winsup/cygwin/math/lrintf.c index 9a300e16f..f5c129578 100644 --- a/winsup/cygwin/math/lrintf.c +++ b/winsup/cygwin/math/lrintf.c @@ -18,7 +18,7 @@ asm(".def __lrintf_internal; .scl 2; .type 32; .endef\n" "\tbx lr"); #endif /* defined(__arm__) || defined(_ARM_) */ -long lrintf (float x) +long lrintf (float x) { long retval = 0l; #if defined (__x86_64__) && defined (__CYGWIN__) diff --git a/winsup/cygwin/math/lrintl.c b/winsup/cygwin/math/lrintl.c index c25df9226..42f2d3c66 100644 --- a/winsup/cygwin/math/lrintl.c +++ b/winsup/cygwin/math/lrintl.c @@ -5,7 +5,7 @@ */ #include -long lrintl (long double x) +long lrintl (long double x) { long retval = 0l; #if defined (__x86_64__) && defined (__CYGWIN__) diff --git a/winsup/cygwin/math/nextafterl.c b/winsup/cygwin/math/nextafterl.c index 5db3af74a..b1e479a95 100644 --- a/winsup/cygwin/math/nextafterl.c +++ b/winsup/cygwin/math/nextafterl.c @@ -23,7 +23,7 @@ nextafterl (long double x, long double y) unsigned long long mantissa; unsigned short expn; unsigned short pad; - } parts; + } parts; } u; /* The normal bit is explicit for long doubles, unlike @@ -58,7 +58,7 @@ nextafterl (long double x, long double y) } /* If we have updated the expn of a normal number, - or moved from denormal to normal, [re]set the normal bit. */ + or moved from denormal to normal, [re]set the normal bit. */ if (u.parts.expn & 0x7fff) u.parts.mantissa |= normal_bit; diff --git a/winsup/cygwin/math/nexttoward.c b/winsup/cygwin/math/nexttoward.c index 909f6ea2d..8b6a83cbd 100644 --- a/winsup/cygwin/math/nexttoward.c +++ b/winsup/cygwin/math/nexttoward.c @@ -30,7 +30,7 @@ nexttoward (double x, long double y) if (xx == y) /* nextafter (0.0, -O.0) should return -0.0. */ return y; - u.d = x; + u.d = x; if (x == 0.0) { u.ll = 1; @@ -38,7 +38,7 @@ nexttoward (double x, long double y) } /* Non-extended encodings are lexicographically ordered, - with implicit "normal" bit. */ + with implicit "normal" bit. */ if (((x > 0.0) ^ (y > xx)) == 0) u.ll++; else diff --git a/winsup/cygwin/math/nexttowardf.c b/winsup/cygwin/math/nexttowardf.c index 0a2f3bfb7..51abe0a29 100644 --- a/winsup/cygwin/math/nexttowardf.c +++ b/winsup/cygwin/math/nexttowardf.c @@ -29,7 +29,7 @@ nexttowardf (float x, long double y) if (xx == y ) /* nextafter (0.0, -O.0) should return -0.0. */ return y; - u.f = x; + u.f = x; if (x == 0.0F) { u.i = 1; diff --git a/winsup/cygwin/math/pow.def.h b/winsup/cygwin/math/pow.def.h index 409ad4ea8..c22064b58 100644 --- a/winsup/cygwin/math/pow.def.h +++ b/winsup/cygwin/math/pow.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, @@ -79,7 +79,7 @@ static __FLT_TYPE internal_modf (__FLT_TYPE value, __FLT_TYPE *iptr) { __FLT_TYPE int_part = (__FLT_TYPE) 0.0; - /* truncate */ + /* truncate */ /* truncate */ #ifdef __x86_64__ asm ("pushq %%rax\n\tsubq $8, %%rsp\n" diff --git a/winsup/cygwin/math/powi.def.h b/winsup/cygwin/math/powi.def.h index 2f74f4f0c..728a29b35 100644 --- a/winsup/cygwin/math/powi.def.h +++ b/winsup/cygwin/math/powi.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/powil.c b/winsup/cygwin/math/powil.c index d3e08e301..e0419fc14 100644 --- a/winsup/cygwin/math/powil.c +++ b/winsup/cygwin/math/powil.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/powl.c b/winsup/cygwin/math/powl.c index 686437069..bf71fb9bc 100644 --- a/winsup/cygwin/math/powl.c +++ b/winsup/cygwin/math/powl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/remquol.S b/winsup/cygwin/math/remquol.S index bdc587648..e16df8ad2 100644 --- a/winsup/cygwin/math/remquol.S +++ b/winsup/cygwin/math/remquol.S @@ -63,7 +63,7 @@ __MINGW_USYMBOL(remquol): leal (%ecx,%ecx,2),%ecx shrl %cl, %eax andl $7, %eax - movl 4 +12 +12(%esp), %ecx + movl 4 +12 +12(%esp), %ecx movl 4 +8(%esp), %edx xorl 4 +12 +8(%esp), %edx testl $0x8000, %edx diff --git a/winsup/cygwin/math/sin.def.h b/winsup/cygwin/math/sin.def.h index dfb1cb49f..c4f169ec7 100644 --- a/winsup/cygwin/math/sin.def.h +++ b/winsup/cygwin/math/sin.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/sinl.c b/winsup/cygwin/math/sinl.c index 0bbb71d37..eac317fbf 100644 --- a/winsup/cygwin/math/sinl.c +++ b/winsup/cygwin/math/sinl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/sqrt.def.h b/winsup/cygwin/math/sqrt.def.h index ee858a785..863c0286c 100644 --- a/winsup/cygwin/math/sqrt.def.h +++ b/winsup/cygwin/math/sqrt.def.h @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/math/sqrtl.c b/winsup/cygwin/math/sqrtl.c index ffd818591..a9c5bdda5 100644 --- a/winsup/cygwin/math/sqrtl.c +++ b/winsup/cygwin/math/sqrtl.c @@ -35,7 +35,7 @@ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc index 5eff17df6..1ed9684f1 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc @@ -80,7 +80,7 @@ check_iovec (const struct iovec *iov, int iovcnt, bool forwrite) return -1; } -/* Try hard to schedule another thread. +/* Try hard to schedule another thread. Remember not to call this in a lock condition or you'll potentially suffer starvation. */ void @@ -256,7 +256,7 @@ NT_readline::init (POBJECT_ATTRIBUTES attr, PCHAR in_buf, ULONG in_buflen) return true; } -PCHAR +PCHAR NT_readline::gets () { IO_STATUS_BLOCK io; diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 6ae1e167b..724e787fe 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -863,15 +863,15 @@ memcpy4to6 (char *dst, const u_int8_t *src) memcpy (dst + 12, src, NS_INADDRSZ); } -/* gethostby_specials: RFC 6761 - Handles numerical addresses and special names for gethostbyname2 */ +/* gethostby_specials: RFC 6761 + Handles numerical addresses and special names for gethostbyname2 */ static hostent * gethostby_specials (const char *name, const int af, const int addrsize_in, const int addrsize_out) { int namelen = strlen (name); /* Ignore a final '.' */ - if ((namelen == 0) || ((namelen -= (name[namelen - 1] == '.')) == 0)) + if ((namelen == 0) || ((namelen -= (name[namelen - 1] == '.')) == 0)) { set_errno (EINVAL); h_errno = NETDB_INTERNAL; @@ -919,7 +919,7 @@ gethostby_specials (const char *name, const int af, } } if (res != 1) - return NULL; + return NULL; int const alias_count = 0, address_count = 1; char * string_ptr; @@ -2975,7 +2975,7 @@ cygwin_getaddrinfo (const char *hostname, const char *servname, int ret = 0; /* Windows' getaddrinfo implementations lets all possible values - in ai_flags slip through and just ignores unknown values. So we + in ai_flags slip through and just ignores unknown values. So we check manually here. */ #define AI_IDN_MASK (AI_IDN | \ AI_CANONIDN | \ diff --git a/winsup/cygwin/ntea.cc b/winsup/cygwin/ntea.cc index 683e2dd79..8020dc9bd 100644 --- a/winsup/cygwin/ntea.cc +++ b/winsup/cygwin/ntea.cc @@ -21,7 +21,7 @@ details. */ #define MAX_EA_NAME_LEN 256 #define MAX_EA_VALUE_LEN 65536 -/* At least one maximum sized entry fits. +/* At least one maximum sized entry fits. CV 2014-04-04: NtQueryEaFile function chokes on buffers bigger than 64K with STATUS_INVALID_PARAMETER if the handle points to a file on a remote share, at least on Windows 7 and later. diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc index 66d8685d7..0be94bcb2 100644 --- a/winsup/cygwin/passwd.cc +++ b/winsup/cygwin/passwd.cc @@ -531,7 +531,7 @@ pg_ent::enumerate_builtin () arg.sid = &sid; char *line = pg.fetch_account_from_windows (arg); return pg.add_account_post_fetch (line, false); -} +} void * pg_ent::enumerate_sam () @@ -568,7 +568,7 @@ pg_ent::enumerate_sam () while (cnt < max) { cygsid sid (cygheap->dom.account_sid ()); - sid_sub_auth (sid, sid_sub_auth_count (sid)) = + sid_sub_auth (sid, sid_sub_auth_count (sid)) = group ? ((PGROUP_INFO_2) buf)[cnt].grpi2_group_id : ((PUSER_INFO_20) buf)[cnt].usri20_user_id; ++cnt; diff --git a/winsup/cygwin/quotactl.cc b/winsup/cygwin/quotactl.cc index 6b4289716..1e54a3a7a 100644 --- a/winsup/cygwin/quotactl.cc +++ b/winsup/cygwin/quotactl.cc @@ -106,7 +106,7 @@ quotactl (int cmd, const char *special, int id, caddr_t addr) return -1; } pc.get_object_attr (attr, sec_none_nih); - /* For the following functions to work, we must attach the virtual path to + /* For the following functions to work, we must attach the virtual path to the quota file to the device path. FIXME: Note that this is NTFS-specific. Adding ReFS in another step. */ diff --git a/winsup/cygwin/sec_helper.cc b/winsup/cygwin/sec_helper.cc index 373b1df02..86d2a7b3f 100644 --- a/winsup/cygwin/sec_helper.cc +++ b/winsup/cygwin/sec_helper.cc @@ -130,7 +130,7 @@ cygpsid::get_id (BOOL search_grp, int *type, cyg_ldap *pldap) if (pldap->open (cygheap->dom.get_rfc2307_domain ()) == NO_ERROR) map_gid = pldap->remap_gid (gid); - if (map_gid == ILLEGAL_GID) + if (map_gid == ILLEGAL_GID) map_gid = MAP_UNIX_TO_CYGWIN_ID (gid); cygheap->ugid_cache.add_gid (gid, map_gid); } diff --git a/winsup/cygwin/smallprint.cc b/winsup/cygwin/smallprint.cc index 9310b9313..3a693b5d1 100644 --- a/winsup/cygwin/smallprint.cc +++ b/winsup/cygwin/smallprint.cc @@ -678,7 +678,7 @@ gen_decimalLL: } } } - if (Rval < 0) + if (Rval < 0) { dst = wcpcpy (dst, L", errno "); dst = __wrn (dst, 10, false, get_errno (), 0, 0, LMASK); diff --git a/winsup/cygwin/tls_pbuf.h b/winsup/cygwin/tls_pbuf.h index 7a36e0f7d..f2cc3001c 100644 --- a/winsup/cygwin/tls_pbuf.h +++ b/winsup/cygwin/tls_pbuf.h @@ -4,7 +4,7 @@ This software is a copyrighted work licensed under the terms of the Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */ -#pragma once +#pragma once class tmp_pathbuf { From bd22d2f91e792e8b57c748da2204ef669a6a75ec Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 11 Mar 2020 17:40:03 +0100 Subject: [PATCH 261/520] Cygwin: belatedly add Hans-Bernhard to CONTRIBUTORS file Signed-off-by: Corinna Vinschen --- winsup/CONTRIBUTORS | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/CONTRIBUTORS b/winsup/CONTRIBUTORS index 53fd439c7..885d18468 100644 --- a/winsup/CONTRIBUTORS +++ b/winsup/CONTRIBUTORS @@ -40,6 +40,7 @@ Brian Inglis Brian.Inglis@SystematicSw.ab.ca Daniel Santos daniel.santos@pobox.com Sergejs Lukanihins slukanihin@gmail.com J.H. van de Water houder@xs4all.nl +Hans-Bernhard Bröker HBBroeker@t-online.de ========================================================================= From 57a80207ff5f7045a45668cee827ce7f6906ccc8 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 12 Mar 2020 16:07:01 +0100 Subject: [PATCH 262/520] Cygwin: serial: try fix o_nonblock --- winsup/cygwin/fhandler_serial.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc index 69e5768f6..f92fc7039 100644 --- a/winsup/cygwin/fhandler_serial.cc +++ b/winsup/cygwin/fhandler_serial.cc @@ -68,6 +68,16 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) goto err; else if (ev) termios_printf ("error detected %x", ev); + else if (is_nonblocking ()) + { + if (!st.cbInQue) + { + tot = -1; + set_errno (EAGAIN); + goto out; + } + inq = st.cbInQue; + } else if (st.cbInQue && !vtime_) inq = st.cbInQue; else if (!is_nonblocking () && !overlapped_armed) From 071b8e0cbd4be33449c12bb0d58f514ed8ef893c Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Fri, 13 Mar 2020 12:06:49 +0900 Subject: [PATCH 263/520] Cygwin: pty: Add FreeConsole to destructor of pty slave. - When pseudo console is closed, all the processes attched to the pseudo console are terminated. This causes the problem reported in https://sourceware.org/pipermail/cygwin/2020-March/244046.html. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index b42e0aeb6..b2e725d5d 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -706,8 +706,15 @@ fhandler_pty_slave::fhandler_pty_slave (int unit) fhandler_pty_slave::~fhandler_pty_slave () { if (!get_ttyp ()) - /* Why comes here? Who clears _tc? */ - return; + { + /* Why comes here? Who clears _tc? */ + if (freeconsole_on_close) + { + FreeConsole (); + pcon_attached_to = -1; + } + return; + } if (get_pseudo_console ()) { int used = 0; From b37a3388cca2df92c204ab8693b09966dca2dad4 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 13 Mar 2020 18:21:36 +0100 Subject: [PATCH 264/520] RTEMS: Include missing header and fix stub Signed-off-by: Sebastian Huber --- newlib/libc/sys/rtems/crt0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/newlib/libc/sys/rtems/crt0.c b/newlib/libc/sys/rtems/crt0.c index 28db7132a..6b8b5f98f 100644 --- a/newlib/libc/sys/rtems/crt0.c +++ b/newlib/libc/sys/rtems/crt0.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -194,7 +195,7 @@ RTEMS_STUB(void *, _malloc_r(struct _reent * r, size_t s), { return 0; }) RTEMS_STUB(void, _free_r(struct _reent *r, void *p), { }) /* stubs for functions required by libc/stdlib */ -RTEMS_STUB(void, __assert_func(const char *file, int line, const char *failedexpr), { }) +RTEMS_STUB(void, __assert_func(const char *file, int line, const char *func, const char *failedexpr), { }) #if defined(__arm__) RTEMS_STUB(void, __aeabi_read_tp(void), { }) From 7947581905637b837558ae9a2f1d35b8ab433e90 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 16 Mar 2020 10:20:16 +0100 Subject: [PATCH 265/520] Cygwin: serial: wait for CancelIo completion Per https://devblogs.microsoft.com/oldnewthing/20110202-00/?p=11613 GetOverlappedResult must be called blocking, waiting for the overlapped operation to complete. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_serial.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc index f92fc7039..f729765e0 100644 --- a/winsup/cygwin/fhandler_serial.cc +++ b/winsup/cygwin/fhandler_serial.cc @@ -135,7 +135,7 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) PurgeComm apparently discards in-flight bytes while CancelIo only stops the overlapped IO routine. */ CancelIo (get_handle ()); - if (GetOverlappedResult (get_handle (), &io_status, &n, FALSE)) + if (GetOverlappedResult (get_handle (), &io_status, &n, TRUE)) tot = n; else if (GetLastError () != ERROR_OPERATION_ABORTED) goto err; From 9e8da7bd2138aaefcb746be3bcce2787c75a5849 Mon Sep 17 00:00:00 2001 From: Fabian Schriever Date: Tue, 17 Mar 2020 15:48:44 +0100 Subject: [PATCH 266/520] Fix for k_tan.c specific inputs This fix for k_tan.c is a copy from fdlibm version 5.3 (see also http://www.netlib.org/fdlibm/readme), adjusted to use the macros available in newlib (SET_LOW_WORD). This fix reduces the ULP error of the value shown in the fdlibm readme (tan(1.7765241907548024E+269)) to 0.45 (thereby reducing the error by 1). This issue only happens for large numbers that get reduced by the range reduction to a value smaller in magnitude than 2^-28, that is also reduced an uneven number of times. This seems rather unlikely given that one ULP is (much) larger than 2^-28 for the values that may cause an issue. Although given the sheer number of values a double can represent, it is still possible that there are more affected values, finding them however will be quite hard, if not impossible. We also took a look at how another library (libm in FreeBSD) handles the issue: In FreeBSD the complete if branch which checks for values smaller than 2^-28 (or rather 2^-27, another change done by FreeBSD) is moved out of the kernel function and into the external function. This means that the value that gets checked for this condition is the unreduced value. Therefore the input value which caused a problem in the fdlibm/newlib kernel tan will run through the full polynomial, including the careful calculation of -1/(x+r). So the difference is really whether r or y is used. r = y + p with p being the result of the polynomial with 1/3*x^3 being the largest (and magnitude defining) value. With x being <2^-27 we therefore know that p is smaller than y (y has to be at least the size of the value of x last mantissa bit divided by 2, which is at least x*2^-51 for doubles) by enough to warrant saying that r ~ y. So we can conclude that the general implementation of this special case is the same, FreeBSD simply has a different philosophy on when to handle especially small numbers. --- newlib/libm/math/k_tan.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/newlib/libm/math/k_tan.c b/newlib/libm/math/k_tan.c index 9f5b30760..4be82d599 100644 --- a/newlib/libm/math/k_tan.c +++ b/newlib/libm/math/k_tan.c @@ -84,14 +84,27 @@ T[] = { __int32_t ix,hx; GET_HIGH_WORD(hx,x); ix = hx&0x7fffffff; /* high word of |x| */ - if(ix<0x3e300000) /* x < 2**-28 */ - {if((int)x==0) { /* generate inexact */ - __uint32_t low; - GET_LOW_WORD(low,x); - if(((ix|low)|(iy+1))==0) return one/fabs(x); - else return (iy==1)? x: -one/x; - } - } + if(ix<0x3e300000) { /* x < 2**-28 */ + if((int)x==0) { /* generate inexact */ + __uint32_t low; + GET_LOW_WORD(low,x); + if(((ix|low)|(iy+1))==0) return one/fabs(x); + else { + if(iy==1) + return x; + else { + double a, t; + z = w = x + y; + SET_LOW_WORD(z,0); + v = y - (z - x); + t = a = -one / w; + SET_LOW_WORD(t,0); + s = one + t * z; + return t + a * (s + t * v); + } + } + } + } if(ix>=0x3FE59428) { /* |x|>=0.6744 */ if(hx<0) {x = -x; y = -y;} z = pio4-x; From 4ad9ba42fc3dd116bad8b9cb89d434256d3431fb Mon Sep 17 00:00:00 2001 From: Fabian Schriever Date: Wed, 18 Mar 2020 14:18:20 +0100 Subject: [PATCH 267/520] Fix modf/f for NaN input For NaN input the modf/f procedures should return NaN instead of zero with the sign of the input. --- newlib/libm/common/s_modf.c | 1 + newlib/libm/common/sf_modf.c | 1 + 2 files changed, 2 insertions(+) diff --git a/newlib/libm/common/s_modf.c b/newlib/libm/common/s_modf.c index 8551a99e4..c948b8525 100644 --- a/newlib/libm/common/s_modf.c +++ b/newlib/libm/common/s_modf.c @@ -100,6 +100,7 @@ static double one = 1.0; } else if (j0>51) { /* no fraction part */ __uint32_t high; *iptr = x*one; + if (__fpclassifyd(x) == FP_NAN) return x+x; /* x is NaN, return NaN */ GET_HIGH_WORD(high,x); INSERT_WORDS(x,high&0x80000000,0); /* return +-0 */ return x; diff --git a/newlib/libm/common/sf_modf.c b/newlib/libm/common/sf_modf.c index 6c64e3fa0..ae970762b 100644 --- a/newlib/libm/common/sf_modf.c +++ b/newlib/libm/common/sf_modf.c @@ -52,6 +52,7 @@ static float one = 1.0; } else { /* no fraction part */ __uint32_t ix; *iptr = x*one; + if (__fpclassifyf(x) == FP_NAN) return x+x; /* x is NaN, return NaN */ GET_FLOAT_WORD(ix,x); SET_FLOAT_WORD(x,ix&0x80000000); /* return +-0 */ return x; From 6b0c1e7cc8e4b0568f00c8444fff8da67688add3 Mon Sep 17 00:00:00 2001 From: Fabian Schriever Date: Thu, 19 Mar 2020 16:34:08 +0100 Subject: [PATCH 268/520] Fix hypotf missing mask in hi+lo decomposition Add the missing mask for the decomposition of hi+lo which caused some errors of 1-2 ULP. This change is taken over from FreeBSD: https://github.com/freebsd/freebsd/commit/95436ce20dab5a34ba46373410b96411b1734578 Additionally I've removed some variable assignments which were never read before being overwritten again in the next 2 lines. --- newlib/libm/math/ef_hypot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newlib/libm/math/ef_hypot.c b/newlib/libm/math/ef_hypot.c index 9368eb41c..a70c92b88 100644 --- a/newlib/libm/math/ef_hypot.c +++ b/newlib/libm/math/ef_hypot.c @@ -29,7 +29,7 @@ ha &= 0x7fffffffL; GET_FLOAT_WORD(hb,y); hb &= 0x7fffffffL; - if(hb > ha) {a=y;b=x;j=ha; ha=hb;hb=j;} else {a=x;b=y;} + if(hb > ha) { j = ha; ha = hb; hb = j; } SET_FLOAT_WORD(a,ha); /* a <- |a| */ SET_FLOAT_WORD(b,hb); /* b <- |b| */ if((ha-hb)>0xf000000L) {return a+b;} /* x/y > 2**30 */ @@ -72,7 +72,7 @@ a = a+a; SET_FLOAT_WORD(y1,hb&0xfffff000L); y2 = b - y1; - SET_FLOAT_WORD(t1,ha+0x00800000L); + SET_FLOAT_WORD(t1,(ha+0x00800000L)&0xfffff000UL); t2 = a - t1; w = __ieee754_sqrtf(t1*y1-(w*(-w)-(t1*y2+t2*b))); } From 6c8392d651f4bbd9f7f8603e466ce4f91ca506c5 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Thu, 19 Mar 2020 13:54:10 +0000 Subject: [PATCH 269/520] Cygwin: Use a separate Start Menu folder for WoW64 installs This aligns the shortcuts to documentation with the setup changes in https://sourceware.org/pipermail/cygwin-apps/2020-March/039873.html v2: Create/remove the Start Menu directory as needed/possible Correctly use that directory when making shortcuts --- winsup/doc/etc.postinstall.cygwin-doc.sh | 12 ++++++------ winsup/doc/etc.preremove.cygwin-doc.sh | 5 ++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/winsup/doc/etc.postinstall.cygwin-doc.sh b/winsup/doc/etc.postinstall.cygwin-doc.sh index de7d9e0c3..97f88a16d 100755 --- a/winsup/doc/etc.postinstall.cygwin-doc.sh +++ b/winsup/doc/etc.postinstall.cygwin-doc.sh @@ -37,10 +37,11 @@ do done # Cygwin Start Menu directory -smpc_dir="$($cygp $CYGWINFORALL -P -U --)/Cygwin" +case $(uname -s) in *-WOW*) wow64=" (32-bit)" ;; esac +smpc_dir="$($cygp $CYGWINFORALL -P -U --)/Cygwin${wow64}" -# check Cygwin Start Menu directory exists -[ -d "$smpc_dir/" ] || exit 0 +# ensure Cygwin Start Menu directory exists +/usr/bin/mkdir -p "$smpc_dir" # check Cygwin Start Menu directory writable if [ ! -w "$smpc_dir/" ] @@ -52,7 +53,7 @@ fi # create User Guide and API PDF and HTML shortcuts while read target name desc do - [ -r "$target" ] && $mks $CYGWINFORALL -P -n "Cygwin/$name" -d "$desc" -- $target + [ -r "$target" ] && $mks $CYGWINFORALL -P -n "Cygwin${wow64}/$name" -d "$desc" -- $target done < Date: Tue, 17 Mar 2020 17:24:56 +0100 Subject: [PATCH 270/520] Cygwin: serial: select: simplify peek_serial - Don't use ev member for ClearCommError and WaitCommEvent. Both returned values are different (error value vs. event code). The values are not used elsewhere so it doesn't make sense to store them in the object. - Drop local variable ready which is used inconsequentially. - Since WFSO already waits 10 ms, don't wait again if no char is in the inbound queue. - Avoid else if chains. - Only print one line of debug output on error. - Drop overlapped_armed < 0 check. This value is only set in fhandler_serial::raw_read if VTIME > 0, and even then it's only set to be immediately reset to 0 before calling ReadFile. So overlapped_armed is never actually < 0 when calling select. - Fix a screwed up statement order. Signed-off-by: Corinna Vinschen --- winsup/cygwin/select.cc | 43 ++++++++++++++++++----------------------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 3965cfbb4..6ffc97b37 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -1440,23 +1440,23 @@ static int peek_serial (select_record *s, bool) { COMSTAT st; + DWORD event, io_err; fhandler_serial *fh = (fhandler_serial *) s->fh; - if (fh->get_readahead_valid () || fh->overlapped_armed < 0) + if (fh->get_readahead_valid ()) return s->read_ready = true; select_printf ("fh->overlapped_armed %d", fh->overlapped_armed); HANDLE h; set_handle_or_return_if_not_open (h, s); - int ready = 0; - if ((s->read_selected && s->read_ready) || (s->write_selected && s->write_ready)) + if ((s->read_selected && s->read_ready) + || (s->write_selected && s->write_ready)) { select_printf ("already ready"); - ready = 1; - goto out; + return true; } /* This is apparently necessary for the com0com driver. @@ -1471,59 +1471,54 @@ peek_serial (select_record *s, bool) ResetEvent (fh->io_status.hEvent); - if (!ClearCommError (h, &fh->ev, &st)) + if (!ClearCommError (h, &io_err, &st)) { - debug_printf ("ClearCommError"); + debug_printf ("ClearCommError %E"); goto err; } - else if (st.cbInQue) + if (st.cbInQue) return s->read_ready = true; - else if (WaitCommEvent (h, &fh->ev, &fh->io_status)) + if (WaitCommEvent (h, &event, &fh->io_status)) return s->read_ready = true; - else if (GetLastError () == ERROR_IO_PENDING) - fh->overlapped_armed = 1; - else + if (GetLastError () != ERROR_IO_PENDING) { - debug_printf ("WaitCommEvent"); + debug_printf ("WaitCommEvent %E"); goto err; } + fh->overlapped_armed = 1; } switch (WaitForSingleObject (fh->io_status.hEvent, 10L)) { case WAIT_OBJECT_0: - if (!ClearCommError (h, &fh->ev, &st)) + if (!ClearCommError (h, &io_err, &st)) { - debug_printf ("ClearCommError"); + debug_printf ("ClearCommError %E"); goto err; } - else if (!st.cbInQue) - Sleep (10L); - else + if (st.cbInQue) { - return s->read_ready = true; select_printf ("got something"); + return s->read_ready = true; } break; case WAIT_TIMEOUT: break; default: - debug_printf ("WaitForMultipleObjects"); + debug_printf ("WaitForMultipleObjects %E"); goto err; } -out: - return ready; + return 0; err: if (GetLastError () == ERROR_OPERATION_ABORTED) { select_printf ("operation aborted"); - return ready; + return 0; } s->set_select_errno (); - select_printf ("error %E"); return -1; } From 93b491c4f25a622d1676c3f69f33d047f463bc2b Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 17 Mar 2020 17:45:05 +0100 Subject: [PATCH 271/520] Cygwin: serial: read: revamp raw_read, change vmin_ and vtime_ to cc_t - Datatypes were incorrect, especially vmin_ and vtime_. Change them to cc_t, as in user space. - Error checking had a gap or two. Debug output used the wrong formatting. - Don't use ev member for ClearCommError and WaitCommEvent. Both returned values are different (error value vs. event code). The values are not used elsewhere so it doesn't make sense to store them in the object. Therefore, drop ev member. - Some variable names were not very helpful. Especially using n as lpNumberOfBytesTransferred from GetOverlappedResult and then actually printing it as if it makes sense was quite puzzeling. - Rework the loop and the definition of minchars so that it still makes sense when looping. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler.h | 5 +- winsup/cygwin/fhandler_serial.cc | 214 +++++++++++++++++-------------- 2 files changed, 121 insertions(+), 98 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index d3afd753a..64a052ce1 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1680,8 +1680,8 @@ class fhandler_cygdrive: public fhandler_disk_file class fhandler_serial: public fhandler_base { private: - size_t vmin_; /* from termios */ - unsigned int vtime_; /* from termios */ + cc_t vmin_; /* from termios */ + cc_t vtime_; /* from termios */ pid_t pgrp_; int rts; /* for Windows 9x purposes only */ int dtr; /* for Windows 9x purposes only */ @@ -1689,7 +1689,6 @@ class fhandler_serial: public fhandler_base public: int overlapped_armed; OVERLAPPED io_status; - DWORD ev; /* Constructor */ fhandler_serial (); diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc index f729765e0..7492470f5 100644 --- a/winsup/cygwin/fhandler_serial.cc +++ b/winsup/cygwin/fhandler_serial.cc @@ -41,12 +41,21 @@ fhandler_serial::overlapped_setup () void __reg3 fhandler_serial::raw_read (void *ptr, size_t& ulen) { - int tot; - DWORD n; + DWORD io_err, event; + COMSTAT st; + DWORD bytes_to_read, read_bytes, undefined; + ssize_t tot = 0; - size_t minchars = vmin_ ? MIN (vmin_, ulen) : ulen; + if (ulen > SSIZE_MAX) + ulen = SSIZE_MAX; + if (ulen == 0) + return; - debug_printf ("ulen %ld, vmin_ %ld, vtime_ %u, hEvent %p", + /* If VMIN > 0 in blocking mode, we have to read at least VMIN chars, + otherwise we're in polling mode and there's no minimum chars. */ + ssize_t minchars = (!is_nonblocking () && vmin_) ? MIN (vmin_, ulen) : 0; + + debug_printf ("ulen %ld, vmin_ %u, vtime_ %u, hEvent %p", ulen, vmin_, vtime_, io_status.hEvent); if (!overlapped_armed) { @@ -54,122 +63,137 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) ResetEvent (io_status.hEvent); } - for (n = 0, tot = 0; ulen; ulen -= n, ptr = (char *) ptr + n) + do { - COMSTAT st; - DWORD inq = vmin_ ? minchars : vtime_ ? ulen : 1; - - n = 0; - - if (vtime_) // non-interruptible -- have to use kernel timeouts - overlapped_armed = -1; - - if (!ClearCommError (get_handle (), &ev, &st)) + /* First check if chars are already in the inbound queue. */ + if (!ClearCommError (get_handle (), &io_err, &st)) goto err; - else if (ev) - termios_printf ("error detected %x", ev); - else if (is_nonblocking ()) + /* FIXME: In case of I/O error, do we really want to bail out or is it + better just trying to pull through? */ + if (io_err) { - if (!st.cbInQue) - { - tot = -1; - set_errno (EAGAIN); - goto out; - } - inq = st.cbInQue; + termios_printf ("error detected %x", io_err); + SetLastError (ERROR_IO_DEVICE); + goto err; } - else if (st.cbInQue && !vtime_) - inq = st.cbInQue; - else if (!is_nonblocking () && !overlapped_armed) + /* ReadFile only handles up to DWORD bytes. */ + bytes_to_read = MIN (ulen, UINT32_MAX); + if (is_nonblocking ()) { - if ((size_t) tot >= minchars) + /* In O_NONBLOCK mode we just care for the number of chars already + in the inbound queue. */ + if (!st.cbInQue) break; - else if (WaitCommEvent (get_handle (), &ev, &io_status)) + bytes_to_read = MIN (st.cbInQue, bytes_to_read); + } + else + { + /* If the number of chars in the inbound queue is sufficent + (minchars defines the minimum), set bytes_to_read accordingly + and don't wait. */ + if (st.cbInQue && st.cbInQue >= minchars) + bytes_to_read = MIN (st.cbInQue, bytes_to_read); + /* if vtime_ is set, use kernel timeouts, otherwise wait here. */ + else if (vtime_ == 0 && !overlapped_armed) { - debug_printf ("WaitCommEvent succeeded: ev %x", ev); - if (!ev) - continue; - } - else if (GetLastError () != ERROR_IO_PENDING) - goto err; - else - { - overlapped_armed = 1; - switch (cygwait (io_status.hEvent)) + if (WaitCommEvent (get_handle (), &event, &io_status)) { - case WAIT_OBJECT_0: - if (!GetOverlappedResult (get_handle (), &io_status, &n, - FALSE)) - goto err; - debug_printf ("n %u, ev %x", n, ev); - break; - case WAIT_SIGNALED: - tot = -1; - PurgeComm (get_handle (), PURGE_RXABORT); - overlapped_armed = 0; - set_sig_errno (EINTR); - goto out; - case WAIT_CANCELED: - PurgeComm (get_handle (), PURGE_RXABORT); - overlapped_armed = 0; - pthread::static_cancel_self (); - /*NOTREACHED*/ - default: - goto err; + debug_printf ("WaitCommEvent succeeded: event %x", event); + if (!event) + continue; } + else if (GetLastError () != ERROR_IO_PENDING) + goto err; + overlapped_armed = 1; + } + } + /* overlapped_armed may be set by select, so we have to make sure + to disarm even in O_NONBLOCK mode. */ + if (overlapped_armed) + { + switch (cygwait (io_status.hEvent, is_nonblocking () ? 0 : INFINITE)) + { + case WAIT_OBJECT_0: + if (!GetOverlappedResult (get_handle (), &io_status, + &undefined, TRUE)) + goto err; + debug_printf ("overlapped event %x", event); + break; + case WAIT_SIGNALED: + CancelIo (get_handle ()); + overlapped_armed = 0; + if (!GetOverlappedResult (get_handle (), &io_status, + &undefined, TRUE)) + goto err; + /* Only if no bytes read, return with EINTR. */ + if (!tot) + { + tot = -1; + set_sig_errno (EINTR); + } + goto out; + case WAIT_CANCELED: + CancelIo (get_handle ()); + overlapped_armed = 0; + GetOverlappedResult (get_handle (), &io_status, &undefined, + TRUE); + pthread::static_cancel_self (); + /*NOTREACHED*/ + default: + goto err; } } overlapped_armed = 0; ResetEvent (io_status.hEvent); - if (inq > ulen) - inq = ulen; - debug_printf ("inq %u", inq); - if (ReadFile (get_handle (), ptr, inq, &n, &io_status)) - /* Got something */; - else if (GetLastError () != ERROR_IO_PENDING) - goto err; - else if (is_nonblocking ()) + if (!ReadFile (get_handle (), ptr, bytes_to_read, &read_bytes, + &io_status)) { - /* Use CancelIo rather than PurgeComm (PURGE_RXABORT) since - PurgeComm apparently discards in-flight bytes while CancelIo - only stops the overlapped IO routine. */ - CancelIo (get_handle ()); - if (GetOverlappedResult (get_handle (), &io_status, &n, TRUE)) - tot = n; - else if (GetLastError () != ERROR_OPERATION_ABORTED) + if (GetLastError () != ERROR_IO_PENDING) + goto err; + if (is_nonblocking ()) + CancelIo (get_handle ()); + if (!GetOverlappedResult (get_handle (), &io_status, &read_bytes, + TRUE)) goto err; - if (tot == 0) - { - tot = -1; - set_errno (EAGAIN); - } - goto out; } - else if (!GetOverlappedResult (get_handle (), &io_status, &n, TRUE)) - goto err; - - tot += n; - debug_printf ("vtime_ %u, vmin_ %lu, n %u, tot %d", vtime_, vmin_, n, tot); - if (vtime_ || !vmin_ || !n) - break; + tot += read_bytes; + ptr = (void *) ((caddr_t) ptr + read_bytes); + ulen -= read_bytes; + minchars -= read_bytes; + debug_printf ("vtime_ %u, vmin_ %u, read_bytes %u, tot %D", + vtime_, vmin_, read_bytes, tot); continue; err: debug_printf ("err %E"); if (GetLastError () != ERROR_OPERATION_ABORTED) { - PurgeComm (get_handle (), PURGE_RXABORT); - tot = -1; - __seterrno (); + if (tot == 0) + { + tot = -1; + __seterrno (); + } + CancelIo (get_handle ()); + overlapped_armed = 0; + GetOverlappedResult (get_handle (), &io_status, &undefined, TRUE); break; } - - n = 0; } + /* ALL of these are required to loop: + + Still room in user space buffer + AND still a minchars requirement (implies blocking mode) + AND vtime_ is not set. */ + while (ulen > 0 && minchars > 0 && vtime_ == 0); out: - ulen = tot; + ulen = (size_t) tot; + if (is_nonblocking () && ulen == 0) + { + ulen = (size_t) -1; + set_errno (EAGAIN); + } } /* Cover function to WriteFile to provide Posix interface and semantics @@ -595,7 +619,7 @@ fhandler_serial::tcsetattr (int action, const struct termios *t) bool dropDTR = false; COMMTIMEOUTS to; DCB ostate, state; - unsigned int ovtime = vtime_, ovmin = vmin_; + cc_t ovtime = vtime_, ovmin = vmin_; int tmpDtr, tmpRts, res; res = tmpDtr = tmpRts = 0; @@ -902,7 +926,7 @@ fhandler_serial::tcsetattr (int action, const struct termios *t) vmin_ = t->c_cc[VMIN]; } - debug_printf ("vtime %d, vmin %ld", vtime_, vmin_); + debug_printf ("vtime %u, vmin %u", vtime_, vmin_); if (ovmin != vmin_ || ovtime != vtime_) { @@ -1136,7 +1160,7 @@ fhandler_serial::tcgetattr (struct termios *t) t->c_cc[VTIME] = vtime_ / 100; t->c_cc[VMIN] = vmin_; - debug_printf ("vmin_ %lu, vtime_ %u", vmin_, vtime_); + debug_printf ("vmin_ %u, vtime_ %u", vmin_, vtime_); return 0; } From 29295995909f0a56081a77e33fd95f34c4af9335 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 18 Mar 2020 21:14:06 +0100 Subject: [PATCH 272/520] Cygwin: serial: revamp overlapped IO in read and select Get rid of WaitCommEvent and using overlapped_armed to share the same overlapped operation between read and select. Rather, make sure to cancel the overlapped IO before leaving any of these functions. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler.h | 1 - winsup/cygwin/fhandler_serial.cc | 111 +++++++++------------ winsup/cygwin/select.cc | 163 +++++++------------------------ winsup/cygwin/select.h | 9 +- 4 files changed, 85 insertions(+), 199 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 64a052ce1..923313df4 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1687,7 +1687,6 @@ class fhandler_serial: public fhandler_base int dtr; /* for Windows 9x purposes only */ public: - int overlapped_armed; OVERLAPPED io_status; /* Constructor */ diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc index 7492470f5..72cb1678d 100644 --- a/winsup/cygwin/fhandler_serial.cc +++ b/winsup/cygwin/fhandler_serial.cc @@ -35,15 +35,14 @@ fhandler_serial::overlapped_setup () memset (&io_status, 0, sizeof (io_status)); io_status.hEvent = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL); ProtectHandle (io_status.hEvent); - overlapped_armed = 0; } void __reg3 fhandler_serial::raw_read (void *ptr, size_t& ulen) { - DWORD io_err, event; + DWORD io_err; COMSTAT st; - DWORD bytes_to_read, read_bytes, undefined; + DWORD bytes_to_read, read_bytes; ssize_t tot = 0; if (ulen > SSIZE_MAX) @@ -57,11 +56,6 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) debug_printf ("ulen %ld, vmin_ %u, vtime_ %u, hEvent %p", ulen, vmin_, vtime_, io_status.hEvent); - if (!overlapped_armed) - { - SetCommMask (get_handle (), EV_RXCHAR); - ResetEvent (io_status.hEvent); - } do { @@ -93,58 +87,8 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) and don't wait. */ if (st.cbInQue && st.cbInQue >= minchars) bytes_to_read = MIN (st.cbInQue, bytes_to_read); - /* if vtime_ is set, use kernel timeouts, otherwise wait here. */ - else if (vtime_ == 0 && !overlapped_armed) - { - if (WaitCommEvent (get_handle (), &event, &io_status)) - { - debug_printf ("WaitCommEvent succeeded: event %x", event); - if (!event) - continue; - } - else if (GetLastError () != ERROR_IO_PENDING) - goto err; - overlapped_armed = 1; - } - } - /* overlapped_armed may be set by select, so we have to make sure - to disarm even in O_NONBLOCK mode. */ - if (overlapped_armed) - { - switch (cygwait (io_status.hEvent, is_nonblocking () ? 0 : INFINITE)) - { - case WAIT_OBJECT_0: - if (!GetOverlappedResult (get_handle (), &io_status, - &undefined, TRUE)) - goto err; - debug_printf ("overlapped event %x", event); - break; - case WAIT_SIGNALED: - CancelIo (get_handle ()); - overlapped_armed = 0; - if (!GetOverlappedResult (get_handle (), &io_status, - &undefined, TRUE)) - goto err; - /* Only if no bytes read, return with EINTR. */ - if (!tot) - { - tot = -1; - set_sig_errno (EINTR); - } - goto out; - case WAIT_CANCELED: - CancelIo (get_handle ()); - overlapped_armed = 0; - GetOverlappedResult (get_handle (), &io_status, &undefined, - TRUE); - pthread::static_cancel_self (); - /*NOTREACHED*/ - default: - goto err; - } } - overlapped_armed = 0; ResetEvent (io_status.hEvent); if (!ReadFile (get_handle (), ptr, bytes_to_read, &read_bytes, &io_status)) @@ -152,10 +96,50 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) if (GetLastError () != ERROR_IO_PENDING) goto err; if (is_nonblocking ()) - CancelIo (get_handle ()); - if (!GetOverlappedResult (get_handle (), &io_status, &read_bytes, - TRUE)) - goto err; + { + CancelIo (get_handle ()); + if (!GetOverlappedResult (get_handle (), &io_status, &read_bytes, + TRUE)) + goto err; + } + else + { + switch (cygwait (io_status.hEvent)) + { + default: /* Handle an error case from cygwait basically like + a cancel condition and see if we got "something" */ + CancelIo (get_handle ()); + /*FALLTHRU*/ + case WAIT_OBJECT_0: + if (!GetOverlappedResult (get_handle (), &io_status, + &read_bytes, TRUE)) + goto err; + debug_printf ("got %u bytes from ReadFile", read_bytes); + break; + case WAIT_SIGNALED: + CancelIo (get_handle ()); + if (!GetOverlappedResult (get_handle (), &io_status, + &read_bytes, TRUE)) + goto err; + /* Only if no bytes read, return with EINTR. */ + if (!tot && !read_bytes) + { + tot = -1; + set_sig_errno (EINTR); + debug_printf ("signal received, set EINTR"); + } + else + debug_printf ("signal received but ignored"); + goto out; + case WAIT_CANCELED: + CancelIo (get_handle ()); + GetOverlappedResult (get_handle (), &io_status, &read_bytes, + TRUE); + debug_printf ("thread canceled"); + pthread::static_cancel_self (); + /*NOTREACHED*/ + } + } } tot += read_bytes; ptr = (void *) ((caddr_t) ptr + read_bytes); @@ -174,9 +158,6 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) tot = -1; __seterrno (); } - CancelIo (get_handle ()); - overlapped_armed = 0; - GetOverlappedResult (get_handle (), &io_status, &undefined, TRUE); break; } } diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 6ffc97b37..93820ae77 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -1434,22 +1434,15 @@ fhandler_dev_null::select_except (select_stuff *ss) return s; } -static int start_thread_serial (select_record *me, select_stuff *stuff); - static int peek_serial (select_record *s, bool) { + HANDLE h; COMSTAT st; - DWORD event, io_err; + DWORD io_err; fhandler_serial *fh = (fhandler_serial *) s->fh; - if (fh->get_readahead_valid ()) - return s->read_ready = true; - - select_printf ("fh->overlapped_armed %d", fh->overlapped_armed); - - HANDLE h; set_handle_or_return_if_not_open (h, s); if ((s->read_selected && s->read_ready) @@ -1459,55 +1452,16 @@ peek_serial (select_record *s, bool) return true; } - /* This is apparently necessary for the com0com driver. - See: http://cygwin.com/ml/cygwin/2009-01/msg00667.html */ - SetCommMask (h, 0); + if (fh->get_readahead_valid ()) + return s->read_ready = true; - SetCommMask (h, EV_RXCHAR); - - if (!fh->overlapped_armed) + if (!ClearCommError (h, &io_err, &st)) { - COMSTAT st; - - ResetEvent (fh->io_status.hEvent); - - if (!ClearCommError (h, &io_err, &st)) - { - debug_printf ("ClearCommError %E"); - goto err; - } - if (st.cbInQue) - return s->read_ready = true; - if (WaitCommEvent (h, &event, &fh->io_status)) - return s->read_ready = true; - if (GetLastError () != ERROR_IO_PENDING) - { - debug_printf ("WaitCommEvent %E"); - goto err; - } - fh->overlapped_armed = 1; - } - - switch (WaitForSingleObject (fh->io_status.hEvent, 10L)) - { - case WAIT_OBJECT_0: - if (!ClearCommError (h, &io_err, &st)) - { - debug_printf ("ClearCommError %E"); - goto err; - } - if (st.cbInQue) - { - select_printf ("got something"); - return s->read_ready = true; - } - break; - case WAIT_TIMEOUT: - break; - default: - debug_printf ("WaitForMultipleObjects %E"); + debug_printf ("ClearCommError %E"); goto err; } + if (st.cbInQue) + return s->read_ready = true; return 0; @@ -1515,84 +1469,49 @@ err: if (GetLastError () == ERROR_OPERATION_ABORTED) { select_printf ("operation aborted"); - return 0; + return false; } s->set_select_errno (); return -1; } -static DWORD WINAPI -thread_serial (void *arg) -{ - select_serial_info *si = (select_serial_info *) arg; - bool looping = true; - - while (looping) - for (select_record *s = si->start; (s = s->next); ) - if (s->startup != start_thread_serial) - continue; - else - { - if (peek_serial (s, true)) - looping = false; - if (si->stop_thread) - { - select_printf ("stopping"); - looping = false; - break; - } - } - - select_printf ("exiting"); - return 0; -} - -static int -start_thread_serial (select_record *me, select_stuff *stuff) -{ - if (stuff->device_specific_serial) - me->h = *((select_serial_info *) stuff->device_specific_serial)->thread; - else - { - select_serial_info *si = new select_serial_info; - si->start = &stuff->start; - si->stop_thread = false; - si->thread = new cygthread (thread_serial, si, "sersel"); - me->h = *si->thread; - stuff->device_specific_serial = si; - } - return 1; -} - static void -serial_cleanup (select_record *, select_stuff *stuff) +serial_read_cleanup (select_record *s, select_stuff *stuff) { - select_serial_info *si = (select_serial_info *) stuff->device_specific_serial; - if (!si) - return; - if (si->thread) + if (s->h) { - si->stop_thread = true; - si->thread->detach (); + fhandler_serial *fh = (fhandler_serial *) s->fh; + HANDLE h = fh->get_handle_cyg (); + DWORD undefined; + + if (h) + { + CancelIo (h); + GetOverlappedResult (h, &fh->io_status, &undefined, TRUE); + } } - delete si; - stuff->device_specific_serial = NULL; } select_record * fhandler_serial::select_read (select_stuff *ss) { + DWORD event; select_record *s = ss->start.next; - if (!s->startup) - { - s->startup = start_thread_serial; - s->verify = verify_ok; - s->cleanup = serial_cleanup; - } + + s->startup = no_startup; + s->verify = verify_ok; + s->cleanup = serial_read_cleanup; s->peek = peek_serial; s->read_selected = true; s->read_ready = false; + /* This is apparently necessary for the com0com driver. + See: http://cygwin.com/ml/cygwin/2009-01/msg00667.html */ + SetCommMask (get_handle_cyg (), 0); + SetCommMask (get_handle_cyg (), EV_RXCHAR); + if (!WaitCommEvent (get_handle_cyg (), &event, &io_status) + && GetLastError () == ERROR_IO_PENDING) + s->h = io_status.hEvent; return s; } @@ -1600,13 +1519,10 @@ select_record * fhandler_serial::select_write (select_stuff *ss) { select_record *s = ss->start.next; - if (!s->startup) - { - s->startup = no_startup; - s->verify = verify_ok; - } + + s->startup = no_startup; + s->verify = verify_ok; s->peek = peek_serial; - s->h = get_handle (); s->write_selected = true; s->write_ready = true; return s; @@ -1616,12 +1532,9 @@ select_record * fhandler_serial::select_except (select_stuff *ss) { select_record *s = ss->start.next; - if (!s->startup) - { - s->startup = no_startup; - s->verify = verify_ok; - } - s->h = NULL; + + s->startup = no_startup; + s->verify = verify_ok; s->peek = peek_serial; s->except_selected = false; // Can't do this s->except_ready = false; diff --git a/winsup/cygwin/select.h b/winsup/cygwin/select.h index 98fde3a89..886810a0b 100644 --- a/winsup/cygwin/select.h +++ b/winsup/cygwin/select.h @@ -67,11 +67,6 @@ struct select_socket_info: public select_info select_socket_info (): select_info (), num_w4 (0), ser_num (0), w4 (NULL) {} }; -struct select_serial_info: public select_info -{ - select_serial_info (): select_info () {} -}; - class select_stuff { public: @@ -92,7 +87,6 @@ public: select_pipe_info *device_specific_ptys; select_fifo_info *device_specific_fifo; select_socket_info *device_specific_socket; - select_serial_info *device_specific_serial; bool test_and_set (int, fd_set *, fd_set *, fd_set *); int poll (fd_set *, fd_set *, fd_set *); @@ -105,8 +99,7 @@ public: device_specific_pipe (NULL), device_specific_ptys (NULL), device_specific_fifo (NULL), - device_specific_socket (NULL), - device_specific_serial (NULL) + device_specific_socket (NULL) {} }; From e4f9fc92ac613f0ae6cf44de7fdd6229c50168e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85ke=20Rehnman?= Date: Fri, 20 Mar 2020 10:37:17 +0100 Subject: [PATCH 273/520] Cygwin: serial: select: fix previous revamp patch - We need a verify function. - The event object referenced in WaitCommEvent must not be a local var, move it into fhandler_serial. --- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/select.cc | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 923313df4..45e256e77 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1685,6 +1685,7 @@ class fhandler_serial: public fhandler_base pid_t pgrp_; int rts; /* for Windows 9x purposes only */ int dtr; /* for Windows 9x purposes only */ + DWORD event; /* for select */ public: OVERLAPPED io_status; diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 93820ae77..e11f5850a 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -1493,14 +1493,18 @@ serial_read_cleanup (select_record *s, select_stuff *stuff) } } +verify_serial (select_record *me, fd_set *rfds, fd_set *wfds, fd_set *efds) +{ + return peek_serial (me, true); +} + select_record * fhandler_serial::select_read (select_stuff *ss) { - DWORD event; select_record *s = ss->start.next; s->startup = no_startup; - s->verify = verify_ok; + s->verify = verify_serial; s->cleanup = serial_read_cleanup; s->peek = peek_serial; s->read_selected = true; @@ -1521,7 +1525,7 @@ fhandler_serial::select_write (select_stuff *ss) select_record *s = ss->start.next; s->startup = no_startup; - s->verify = verify_ok; + s->verify = verify_serial; s->peek = peek_serial; s->write_selected = true; s->write_ready = true; @@ -1534,7 +1538,7 @@ fhandler_serial::select_except (select_stuff *ss) select_record *s = ss->start.next; s->startup = no_startup; - s->verify = verify_ok; + s->verify = verify_serial; s->peek = peek_serial; s->except_selected = false; // Can't do this s->except_ready = false; From 72294cd21175c307a6552416b249fc8d66ee0bbc Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sat, 21 Mar 2020 10:36:11 +0100 Subject: [PATCH 274/520] Cygwin: serial: avoid overrun of vtime After changing the type of fhandler_serial::vtime_ to cc_t, vtime_ must be stored in 10s of seconds, not in milliseconds. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_serial.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc index 72cb1678d..66e80197b 100644 --- a/winsup/cygwin/fhandler_serial.cc +++ b/winsup/cygwin/fhandler_serial.cc @@ -903,7 +903,7 @@ fhandler_serial::tcsetattr (int action, const struct termios *t) } else { - vtime_ = t->c_cc[VTIME] * 100; + vtime_ = t->c_cc[VTIME]; vmin_ = t->c_cc[VMIN]; } @@ -925,13 +925,13 @@ fhandler_serial::tcsetattr (int action, const struct termios *t) { /* set timeoout constant appropriately and we will only try to read one character in ReadFile() */ - to.ReadTotalTimeoutConstant = vtime_; + to.ReadTotalTimeoutConstant = vtime_ * 100; to.ReadIntervalTimeout = to.ReadTotalTimeoutMultiplier = MAXDWORD; } else if ((vmin_ > 0) && (vtime_ > 0)) { /* time applies to the interval time for this case */ - to.ReadIntervalTimeout = vtime_; + to.ReadIntervalTimeout = vtime_ * 100; } else if ((vmin_ == 0) && (vtime_ == 0)) { @@ -1138,7 +1138,7 @@ fhandler_serial::tcgetattr (struct termios *t) if (!wbinary ()) t->c_oflag |= ONLCR; - t->c_cc[VTIME] = vtime_ / 100; + t->c_cc[VTIME] = vtime_; t->c_cc[VMIN] = vmin_; debug_printf ("vmin_ %u, vtime_ %u", vmin_, vtime_); From 912c90261559914d931f0764f836217d939b1112 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 23 Mar 2020 12:13:35 +0100 Subject: [PATCH 275/520] Cygwin: serial: tcsetattr: set timeouts unconditionally tcsetattr checks if the VTIME and VMIN values changed and only calls SetCommTimeouts if so. That's a problem if tcsetattr is supposed to set VTIME and VIMN to 0, because these are the start values anyway. But this requires to set ReadIntervalTimeout to MAXDWORD, which just doesn't happen. Fix this by dropping the over-optimization of checking the old values before calling SetCommTimeouts, Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_serial.cc | 79 +++++++++++++++----------------- 1 file changed, 38 insertions(+), 41 deletions(-) diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc index 66e80197b..c7c412e57 100644 --- a/winsup/cygwin/fhandler_serial.cc +++ b/winsup/cygwin/fhandler_serial.cc @@ -600,7 +600,6 @@ fhandler_serial::tcsetattr (int action, const struct termios *t) bool dropDTR = false; COMMTIMEOUTS to; DCB ostate, state; - cc_t ovtime = vtime_, ovmin = vmin_; int tmpDtr, tmpRts, res; res = tmpDtr = tmpRts = 0; @@ -909,49 +908,47 @@ fhandler_serial::tcsetattr (int action, const struct termios *t) debug_printf ("vtime %u, vmin %u", vtime_, vmin_); - if (ovmin != vmin_ || ovtime != vtime_) - { - memset (&to, 0, sizeof (to)); + memset (&to, 0, sizeof (to)); - if ((vmin_ > 0) && (vtime_ == 0)) - { - /* Returns immediately with whatever is in buffer on a ReadFile(); - or blocks if nothing found. We will keep calling ReadFile(); until - vmin_ characters are read */ - to.ReadIntervalTimeout = to.ReadTotalTimeoutMultiplier = MAXDWORD; - to.ReadTotalTimeoutConstant = MAXDWORD - 1; - } - else if ((vmin_ == 0) && (vtime_ > 0)) - { - /* set timeoout constant appropriately and we will only try to - read one character in ReadFile() */ - to.ReadTotalTimeoutConstant = vtime_ * 100; - to.ReadIntervalTimeout = to.ReadTotalTimeoutMultiplier = MAXDWORD; - } - else if ((vmin_ > 0) && (vtime_ > 0)) - { - /* time applies to the interval time for this case */ - to.ReadIntervalTimeout = vtime_ * 100; - } - else if ((vmin_ == 0) && (vtime_ == 0)) - { - /* returns immediately with whatever is in buffer as per - Time-Outs docs in Win32 SDK API docs */ - to.ReadIntervalTimeout = MAXDWORD; - } + if ((vmin_ > 0) && (vtime_ == 0)) + { + /* Returns immediately with whatever is in buffer on a ReadFile(); + or blocks if nothing found. We will keep calling ReadFile(); until + vmin_ characters are read */ + to.ReadIntervalTimeout = to.ReadTotalTimeoutMultiplier = MAXDWORD; + to.ReadTotalTimeoutConstant = MAXDWORD - 1; + } + else if ((vmin_ == 0) && (vtime_ > 0)) + { + /* set timeoout constant appropriately and we will only try to + read one character in ReadFile() */ + to.ReadTotalTimeoutConstant = vtime_ * 100; + to.ReadIntervalTimeout = to.ReadTotalTimeoutMultiplier = MAXDWORD; + } + else if ((vmin_ > 0) && (vtime_ > 0)) + { + /* time applies to the interval time for this case */ + to.ReadIntervalTimeout = vtime_ * 100; + } + else if ((vmin_ == 0) && (vtime_ == 0)) + { + /* returns immediately with whatever is in buffer as per + Time-Outs docs in Win32 SDK API docs */ + to.ReadIntervalTimeout = MAXDWORD; + } - debug_printf ("ReadTotalTimeoutConstant %u, ReadIntervalTimeout %u, ReadTotalTimeoutMultiplier %u", - to.ReadTotalTimeoutConstant, to.ReadIntervalTimeout, to.ReadTotalTimeoutMultiplier); + debug_printf ("ReadTotalTimeoutConstant %u, ReadIntervalTimeout %u, " + "ReadTotalTimeoutMultiplier %u", to.ReadTotalTimeoutConstant, + to.ReadIntervalTimeout, to.ReadTotalTimeoutMultiplier); - if (!SetCommTimeouts(get_handle (), &to)) - { - /* SetCommTimeouts() failed. Keep track of this so we - can set errno to EINVAL later and return failure */ - termios_printf ("SetCommTimeouts() failed, %E"); - __seterrno (); - res = -1; - } - } + if (!SetCommTimeouts(get_handle (), &to)) + { + /* SetCommTimeouts() failed. Keep track of this so we + can set errno to EINVAL later and return failure */ + termios_printf ("SetCommTimeouts() failed, %E"); + __seterrno (); + res = -1; + } return res; } From 3a74630f7542c12f58f1a23d696b6b5f647b70d4 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 23 Mar 2020 13:08:32 +0100 Subject: [PATCH 276/520] Cygwin: serial: select: fix WaitCommEvent request - make sure event object is reset - set read_ready to true if WaitCommEvent returns success - improve debugging Signed-off-by: Corinna Vinschen --- winsup/cygwin/select.cc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index e11f5850a..07e0d82fb 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -1457,7 +1457,7 @@ peek_serial (select_record *s, bool) if (!ClearCommError (h, &io_err, &st)) { - debug_printf ("ClearCommError %E"); + select_printf ("ClearCommError %E"); goto err; } if (st.cbInQue) @@ -1493,6 +1493,7 @@ serial_read_cleanup (select_record *s, select_stuff *stuff) } } +static int verify_serial (select_record *me, fd_set *rfds, fd_set *wfds, fd_set *efds) { return peek_serial (me, true); @@ -1513,9 +1514,16 @@ fhandler_serial::select_read (select_stuff *ss) See: http://cygwin.com/ml/cygwin/2009-01/msg00667.html */ SetCommMask (get_handle_cyg (), 0); SetCommMask (get_handle_cyg (), EV_RXCHAR); - if (!WaitCommEvent (get_handle_cyg (), &event, &io_status) - && GetLastError () == ERROR_IO_PENDING) - s->h = io_status.hEvent; + ResetEvent (io_status.hEvent); + if (!WaitCommEvent (get_handle_cyg (), &event, &io_status)) + { + if (GetLastError () == ERROR_IO_PENDING) + s->h = io_status.hEvent; + else + select_printf ("WaitCommEvent %E"); + } + else + s->read_ready = true; return s; } From a1f0585454ea60f9e10be1f0cdcc7c0c1ceb2d0e Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 23 Mar 2020 17:23:19 +0100 Subject: [PATCH 277/520] Cygwin: serial: select: call ClearCommError prior to calling WaitCommEvent This (hopefully) eliminates a race condition Signed-off-by: Corinna Vinschen --- winsup/cygwin/select.cc | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 07e0d82fb..b933a8ca9 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -1502,6 +1502,9 @@ verify_serial (select_record *me, fd_set *rfds, fd_set *wfds, fd_set *efds) select_record * fhandler_serial::select_read (select_stuff *ss) { + COMSTAT st; + DWORD io_err; + select_record *s = ss->start.next; s->startup = no_startup; @@ -1512,18 +1515,25 @@ fhandler_serial::select_read (select_stuff *ss) s->read_ready = false; /* This is apparently necessary for the com0com driver. See: http://cygwin.com/ml/cygwin/2009-01/msg00667.html */ + ResetEvent (io_status.hEvent); SetCommMask (get_handle_cyg (), 0); SetCommMask (get_handle_cyg (), EV_RXCHAR); - ResetEvent (io_status.hEvent); - if (!WaitCommEvent (get_handle_cyg (), &event, &io_status)) + if (ClearCommError (get_handle_cyg (), &io_err, &st) && st.cbInQue) { - if (GetLastError () == ERROR_IO_PENDING) - s->h = io_status.hEvent; - else - select_printf ("WaitCommEvent %E"); + s->read_ready = true; + return s; } - else - s->read_ready = true; + if (WaitCommEvent (get_handle_cyg (), &event, &io_status)) + { + s->read_ready = true; + return s; + } + if (GetLastError () == ERROR_IO_PENDING) + { + s->h = io_status.hEvent; + return s; + } + select_printf ("WaitCommEvent %E"); return s; } From 2a4b1de773e6159ea8197b6fc3f7e4845479b476 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 23 Mar 2020 21:06:00 +0100 Subject: [PATCH 278/520] Cygwin: serial: use per call OVERLAPPED structs Sharing the OVERLAPPED struct and event object in there between read and select calls in the fhandler might have been a nice optimization way back when, but it is a dangerous, not thread-safe approach. Fix this by creating per-fhandler, per-call OVERLAPPED structs and event objects on demand. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler.h | 8 ---- winsup/cygwin/fhandler_serial.cc | 70 +++++++------------------------- winsup/cygwin/select.cc | 38 +++++++++-------- winsup/cygwin/select.h | 21 +++++++++- 4 files changed, 56 insertions(+), 81 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 45e256e77..1c7336370 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1685,19 +1685,13 @@ class fhandler_serial: public fhandler_base pid_t pgrp_; int rts; /* for Windows 9x purposes only */ int dtr; /* for Windows 9x purposes only */ - DWORD event; /* for select */ public: - OVERLAPPED io_status; - /* Constructor */ fhandler_serial (); int open (int flags, mode_t mode); - int close (); int init (HANDLE h, DWORD a, mode_t flags); - void overlapped_setup (); - int dup (fhandler_base *child, int); void __reg3 raw_read (void *ptr, size_t& ulen); ssize_t __reg3 raw_write (const void *ptr, size_t ulen); int tcsendbreak (int); @@ -1714,8 +1708,6 @@ class fhandler_serial: public fhandler_base } int tcflush (int); bool is_tty () const { return true; } - void fixup_after_fork (HANDLE parent); - void fixup_after_exec (); /* We maintain a pgrp so that tcsetpgrp and tcgetpgrp work, but we don't use it for permissions checking. fhandler_pty_slave does diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc index c7c412e57..b6d1e4f4c 100644 --- a/winsup/cygwin/fhandler_serial.cc +++ b/winsup/cygwin/fhandler_serial.cc @@ -1,5 +1,6 @@ /* fhandler_serial.cc + This file is part of Cygwin. This software is a copyrighted work licensed under the terms of the @@ -29,17 +30,10 @@ fhandler_serial::fhandler_serial () need_fork_fixup (true); } -void -fhandler_serial::overlapped_setup () -{ - memset (&io_status, 0, sizeof (io_status)); - io_status.hEvent = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL); - ProtectHandle (io_status.hEvent); -} - void __reg3 fhandler_serial::raw_read (void *ptr, size_t& ulen) { + OVERLAPPED ov = { 0 }; DWORD io_err; COMSTAT st; DWORD bytes_to_read, read_bytes; @@ -54,8 +48,9 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) otherwise we're in polling mode and there's no minimum chars. */ ssize_t minchars = (!is_nonblocking () && vmin_) ? MIN (vmin_, ulen) : 0; - debug_printf ("ulen %ld, vmin_ %u, vtime_ %u, hEvent %p", - ulen, vmin_, vtime_, io_status.hEvent); + debug_printf ("ulen %ld, vmin_ %u, vtime_ %u", ulen, vmin_, vtime_); + + ov.hEvent = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL); do { @@ -89,37 +84,36 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) bytes_to_read = MIN (st.cbInQue, bytes_to_read); } - ResetEvent (io_status.hEvent); - if (!ReadFile (get_handle (), ptr, bytes_to_read, &read_bytes, - &io_status)) + ResetEvent (ov.hEvent); + if (!ReadFile (get_handle (), ptr, bytes_to_read, &read_bytes, &ov)) { if (GetLastError () != ERROR_IO_PENDING) goto err; if (is_nonblocking ()) { CancelIo (get_handle ()); - if (!GetOverlappedResult (get_handle (), &io_status, &read_bytes, + if (!GetOverlappedResult (get_handle (), &ov, &read_bytes, TRUE)) goto err; } else { - switch (cygwait (io_status.hEvent)) + switch (cygwait (ov.hEvent)) { default: /* Handle an error case from cygwait basically like a cancel condition and see if we got "something" */ CancelIo (get_handle ()); /*FALLTHRU*/ case WAIT_OBJECT_0: - if (!GetOverlappedResult (get_handle (), &io_status, - &read_bytes, TRUE)) + if (!GetOverlappedResult (get_handle (), &ov, &read_bytes, + TRUE)) goto err; debug_printf ("got %u bytes from ReadFile", read_bytes); break; case WAIT_SIGNALED: CancelIo (get_handle ()); - if (!GetOverlappedResult (get_handle (), &io_status, - &read_bytes, TRUE)) + if (!GetOverlappedResult (get_handle (), &ov, &read_bytes, + TRUE)) goto err; /* Only if no bytes read, return with EINTR. */ if (!tot && !read_bytes) @@ -133,8 +127,7 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) goto out; case WAIT_CANCELED: CancelIo (get_handle ()); - GetOverlappedResult (get_handle (), &io_status, &read_bytes, - TRUE); + GetOverlappedResult (get_handle (), &ov, &read_bytes, TRUE); debug_printf ("thread canceled"); pthread::static_cancel_self (); /*NOTREACHED*/ @@ -169,6 +162,7 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) while (ulen > 0 && minchars > 0 && vtime_ == 0); out: + CloseHandle (ov.hEvent); ulen = (size_t) tot; if (is_nonblocking () && ulen == 0) { @@ -266,8 +260,6 @@ fhandler_serial::open (int flags, mode_t mode) SetCommMask (get_handle (), EV_RXCHAR); - overlapped_setup (); - memset (&to, 0, sizeof (to)); SetCommTimeouts (get_handle (), &to); @@ -318,13 +310,6 @@ fhandler_serial::open (int flags, mode_t mode) return res; } -int -fhandler_serial::close () -{ - ForceCloseHandle (io_status.hEvent); - return fhandler_base::close (); -} - /* tcsendbreak: POSIX 7.2.2.1 */ /* Break for 250-500 milliseconds if duration == 0 */ /* Otherwise, units for duration are undefined */ @@ -1142,28 +1127,3 @@ fhandler_serial::tcgetattr (struct termios *t) return 0; } - -void -fhandler_serial::fixup_after_fork (HANDLE parent) -{ - if (close_on_exec ()) - fhandler_base::fixup_after_fork (parent); - overlapped_setup (); - debug_printf ("io_status.hEvent %p", io_status.hEvent); -} - -void -fhandler_serial::fixup_after_exec () -{ - if (!close_on_exec ()) - overlapped_setup (); - debug_printf ("io_status.hEvent %p, close_on_exec %d", io_status.hEvent, close_on_exec ()); -} - -int -fhandler_serial::dup (fhandler_base *child, int flags) -{ - fhandler_serial *fhc = (fhandler_serial *) child; - fhc->overlapped_setup (); - return fhandler_base::dup (child, flags); -} diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index b933a8ca9..b5d19cf31 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -1481,15 +1481,16 @@ serial_read_cleanup (select_record *s, select_stuff *stuff) { if (s->h) { - fhandler_serial *fh = (fhandler_serial *) s->fh; - HANDLE h = fh->get_handle_cyg (); + HANDLE h = ((fhandler_serial *) s->fh)->get_handle_cyg (); DWORD undefined; if (h) { CancelIo (h); - GetOverlappedResult (h, &fh->io_status, &undefined, TRUE); + GetOverlappedResult (h, &s->fh_data_serial->ov, &undefined, TRUE); } + CloseHandle (s->fh_data_serial->ov.hEvent); + delete s->fh_data_serial; } } @@ -1513,27 +1514,30 @@ fhandler_serial::select_read (select_stuff *ss) s->peek = peek_serial; s->read_selected = true; s->read_ready = false; + + s->fh_data_serial = new (fh_select_data_serial); + s->fh_data_serial->ov.hEvent = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL); + /* This is apparently necessary for the com0com driver. See: http://cygwin.com/ml/cygwin/2009-01/msg00667.html */ - ResetEvent (io_status.hEvent); SetCommMask (get_handle_cyg (), 0); SetCommMask (get_handle_cyg (), EV_RXCHAR); if (ClearCommError (get_handle_cyg (), &io_err, &st) && st.cbInQue) + s->read_ready = true; + else if (WaitCommEvent (get_handle_cyg (), &s->fh_data_serial->event, + &s->fh_data_serial->ov)) + s->read_ready = true; + else if (GetLastError () == ERROR_IO_PENDING) + s->h = s->fh_data_serial->ov.hEvent; + else + select_printf ("WaitCommEvent %E"); + + /* No overlapped operation? Destroy the helper struct */ + if (!s->h) { - s->read_ready = true; - return s; + CloseHandle (s->fh_data_serial->ov.hEvent); + delete s->fh_data_serial; } - if (WaitCommEvent (get_handle_cyg (), &event, &io_status)) - { - s->read_ready = true; - return s; - } - if (GetLastError () == ERROR_IO_PENDING) - { - s->h = io_status.hEvent; - return s; - } - select_printf ("WaitCommEvent %E"); return s; } diff --git a/winsup/cygwin/select.h b/winsup/cygwin/select.h index 886810a0b..083c3c4d3 100644 --- a/winsup/cygwin/select.h +++ b/winsup/cygwin/select.h @@ -9,6 +9,14 @@ details. */ #ifndef _SELECT_H_ #define _SELECT_H_ +struct fh_select_data_serial +{ + DWORD event; + OVERLAPPED ov; + + fh_select_data_serial () : event (0) { memset (&ov, 0, sizeof ov); } +}; + struct select_record { int fd; @@ -25,6 +33,13 @@ struct select_record int (*verify) (select_record *, fd_set *, fd_set *, fd_set *); void (*cleanup) (select_record *, class select_stuff *); struct select_record *next; + /* If an fhandler type needs per-fhandler, per-select data, this union + is the place to add it. First candidate: fhandler_serial. */ + union + { + fh_select_data_serial *fh_data_serial; + void *fh_data_union; /* type-agnostic placeholder for constructor */ + }; void set_select_errno () {__seterrno (); thread_errno = errno;} int saw_error () {return thread_errno;} select_record (int): next (NULL) {} @@ -34,7 +49,7 @@ struct select_record except_ready (false), read_selected (false), write_selected (false), except_selected (false), except_on_write (false), startup (NULL), peek (NULL), verify (NULL), cleanup (NULL), - next (NULL) {} + next (NULL), fh_data_union (NULL) {} #ifdef DEBUGGING void dump_select_record (); #endif @@ -83,6 +98,10 @@ public: bool always_ready, windows_used; select_record start; + /* If an fhandler type needs a singleton per-select datastructure for all + its objects in the descriptor lists, here's the place to be. This is + mainly used to maintain a single thread for all fhandlers of a single + type in the descriptor lists. */ select_pipe_info *device_specific_pipe; select_pipe_info *device_specific_ptys; select_fifo_info *device_specific_fifo; From 082f2513c721e942d0fd563c4dc9117eee3513ab Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 25 Mar 2020 12:21:59 +0100 Subject: [PATCH 279/520] Cygwin: serial: read: if VMIN > 0, wait for VMIN chars in inbound queue Per termios, read waits for MIN chars even if the number of requested bytes is less. This requires to add WaitCommEvent to wait non-busily for MIN chars prior to calling ReadFile, so, reintroduce it. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_serial.cc | 38 ++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc index b6d1e4f4c..1750a9f97 100644 --- a/winsup/cygwin/fhandler_serial.cc +++ b/winsup/cygwin/fhandler_serial.cc @@ -34,19 +34,20 @@ void __reg3 fhandler_serial::raw_read (void *ptr, size_t& ulen) { OVERLAPPED ov = { 0 }; - DWORD io_err; + DWORD io_err, event; COMSTAT st; DWORD bytes_to_read, read_bytes; ssize_t tot = 0; + bool wait_for_vmin, ret; if (ulen > SSIZE_MAX) ulen = SSIZE_MAX; if (ulen == 0) return; - /* If VMIN > 0 in blocking mode, we have to read at least VMIN chars, - otherwise we're in polling mode and there's no minimum chars. */ - ssize_t minchars = (!is_nonblocking () && vmin_) ? MIN (vmin_, ulen) : 0; + /* If VMIN > 0 in blocking mode, we have to wait for at least VMIN chars. + Otherwise we're in polling mode and there's no minimum chars. */ + ssize_t minchars = is_nonblocking () ? 0 : vmin_; debug_printf ("ulen %ld, vmin_ %u, vtime_ %u", ulen, vmin_, vtime_); @@ -54,6 +55,8 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) do { + wait_for_vmin = false; + /* First check if chars are already in the inbound queue. */ if (!ClearCommError (get_handle (), &io_err, &st)) goto err; @@ -82,14 +85,22 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) and don't wait. */ if (st.cbInQue && st.cbInQue >= minchars) bytes_to_read = MIN (st.cbInQue, bytes_to_read); + /* Otherwise, if VMIN > 0, VTIME == 0, we have to wait until + VMIN bytes are available in the inbound queue. */ + else if (minchars && !vtime_) + wait_for_vmin = true; } ResetEvent (ov.hEvent); - if (!ReadFile (get_handle (), ptr, bytes_to_read, &read_bytes, &ov)) + if (wait_for_vmin) + ret = WaitCommEvent (get_handle (), &event, &ov); + else + ret = ReadFile (get_handle (), ptr, bytes_to_read, &read_bytes, &ov); + if (!ret) { if (GetLastError () != ERROR_IO_PENDING) goto err; - if (is_nonblocking ()) + if (!wait_for_vmin && is_nonblocking ()) { CancelIo (get_handle ()); if (!GetOverlappedResult (get_handle (), &ov, &read_bytes, @@ -134,12 +145,15 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) } } } - tot += read_bytes; - ptr = (void *) ((caddr_t) ptr + read_bytes); - ulen -= read_bytes; - minchars -= read_bytes; - debug_printf ("vtime_ %u, vmin_ %u, read_bytes %u, tot %D", - vtime_, vmin_, read_bytes, tot); + if (!wait_for_vmin) + { + tot += read_bytes; + ptr = (void *) ((caddr_t) ptr + read_bytes); + ulen -= read_bytes; + minchars -= read_bytes; + debug_printf ("vtime_ %u, vmin_ %u, read_bytes %u, tot %D", + vtime_, vmin_, read_bytes, tot); + } continue; err: From 8ffe12b394e4ed593b38c991da6d094100c3b78d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 25 Mar 2020 12:25:06 +0100 Subject: [PATCH 280/520] fhandler_serial: fix comments Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_serial.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc index 1750a9f97..3fd8a974c 100644 --- a/winsup/cygwin/fhandler_serial.cc +++ b/winsup/cygwin/fhandler_serial.cc @@ -45,7 +45,7 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) if (ulen == 0) return; - /* If VMIN > 0 in blocking mode, we have to wait for at least VMIN chars. + /* If MIN > 0 in blocking mode, we have to wait for at least MIN chars. Otherwise we're in polling mode and there's no minimum chars. */ ssize_t minchars = is_nonblocking () ? 0 : vmin_; @@ -85,8 +85,8 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) and don't wait. */ if (st.cbInQue && st.cbInQue >= minchars) bytes_to_read = MIN (st.cbInQue, bytes_to_read); - /* Otherwise, if VMIN > 0, VTIME == 0, we have to wait until - VMIN bytes are available in the inbound queue. */ + /* Otherwise, if MIN > 0, TIME == 0, we have to wait until + MIN bytes are available in the inbound queue. */ else if (minchars && !vtime_) wait_for_vmin = true; } From 009c7a0553b6d59f0d5ed79210069a9c7c336184 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 25 Mar 2020 21:01:29 +0100 Subject: [PATCH 281/520] Revert "Cygwin: serial: read: if VMIN > 0, wait for VMIN chars in inbound queue" This reverts commit 082f2513c721e942d0fd563c4dc9117eee3513ab. Turns out, Linux as well as BSD really only wait for the smaller number, MIN or # of requested bytes. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_serial.cc | 38 ++++++++++---------------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc index 3fd8a974c..9446315e5 100644 --- a/winsup/cygwin/fhandler_serial.cc +++ b/winsup/cygwin/fhandler_serial.cc @@ -34,20 +34,19 @@ void __reg3 fhandler_serial::raw_read (void *ptr, size_t& ulen) { OVERLAPPED ov = { 0 }; - DWORD io_err, event; + DWORD io_err; COMSTAT st; DWORD bytes_to_read, read_bytes; ssize_t tot = 0; - bool wait_for_vmin, ret; if (ulen > SSIZE_MAX) ulen = SSIZE_MAX; if (ulen == 0) return; - /* If MIN > 0 in blocking mode, we have to wait for at least MIN chars. - Otherwise we're in polling mode and there's no minimum chars. */ - ssize_t minchars = is_nonblocking () ? 0 : vmin_; + /* If MIN > 0 in blocking mode, we have to read at least VMIN chars, + otherwise we're in polling mode and there's no minimum chars. */ + ssize_t minchars = (!is_nonblocking () && vmin_) ? MIN (vmin_, ulen) : 0; debug_printf ("ulen %ld, vmin_ %u, vtime_ %u", ulen, vmin_, vtime_); @@ -55,8 +54,6 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) do { - wait_for_vmin = false; - /* First check if chars are already in the inbound queue. */ if (!ClearCommError (get_handle (), &io_err, &st)) goto err; @@ -85,22 +82,14 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) and don't wait. */ if (st.cbInQue && st.cbInQue >= minchars) bytes_to_read = MIN (st.cbInQue, bytes_to_read); - /* Otherwise, if MIN > 0, TIME == 0, we have to wait until - MIN bytes are available in the inbound queue. */ - else if (minchars && !vtime_) - wait_for_vmin = true; } ResetEvent (ov.hEvent); - if (wait_for_vmin) - ret = WaitCommEvent (get_handle (), &event, &ov); - else - ret = ReadFile (get_handle (), ptr, bytes_to_read, &read_bytes, &ov); - if (!ret) + if (!ReadFile (get_handle (), ptr, bytes_to_read, &read_bytes, &ov)) { if (GetLastError () != ERROR_IO_PENDING) goto err; - if (!wait_for_vmin && is_nonblocking ()) + if (is_nonblocking ()) { CancelIo (get_handle ()); if (!GetOverlappedResult (get_handle (), &ov, &read_bytes, @@ -145,15 +134,12 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) } } } - if (!wait_for_vmin) - { - tot += read_bytes; - ptr = (void *) ((caddr_t) ptr + read_bytes); - ulen -= read_bytes; - minchars -= read_bytes; - debug_printf ("vtime_ %u, vmin_ %u, read_bytes %u, tot %D", - vtime_, vmin_, read_bytes, tot); - } + tot += read_bytes; + ptr = (void *) ((caddr_t) ptr + read_bytes); + ulen -= read_bytes; + minchars -= read_bytes; + debug_printf ("vtime_ %u, vmin_ %u, read_bytes %u, tot %D", + vtime_, vmin_, read_bytes, tot); continue; err: From 5e24839658f6576b68b26c977897b9ad3fc3c23f Mon Sep 17 00:00:00 2001 From: "Joseph S. Myers" Date: Wed, 25 Mar 2020 11:18:44 -0700 Subject: [PATCH 282/520] Fix spurious underflow exceptions for Bessel functions for double(from glibc bug 14155) This fix comes from glibc, from files which originated from the same place as the newlib files. Those files in glibc carry the same license as the newlib files. Bug 14155 is spurious underflow exceptions from Bessel functions for large arguments. (The correct results for large x are roughly constant * sin or cos (x + constant) / sqrt (x), so no underflow exceptions should occur based on the final result.) There are various places underflows may occur in the intermediate calculations that cause the failures listed in that bug. This patch fixes problems for the double version where underflows occur in calculating the intermediate functions P and Q (in particular, x**-12 gets computed while calculating Q). Appropriate approximations are used for P and Q for arguments at least 0x1p28 and above to avoid the underflows. For sufficiently large x - 0x1p129 and above - the code already has a cut-off to avoid calculating P and Q at all, which means the approximations -0.125 / x and 0.375 / x can't themselves cause underflows calculating Q. This cut-off is heuristically reasonable for the point beyond which Q can be neglected (based on expecting around 0x1p-64 to be the least absolute value of sin or cos for large arguments representable in double). The float versions use a cut-off 0x1p17, which is less heuristically justifiable but should still only affect values near zeroes of the Bessel functions where these implementations are intrinsically inaccurate anyway (bugs 14469-14472), and should serve to avoid underflows (the float underflow for jn in bug 14155 probably comes from the recurrence to compute jn). ldbl-96 uses 0x1p129, which may not really be enough heuristically (0x1p143 or so might be safer - 143 = 64 + 79, number of mantissa bits plus total number of significant bits in representation) but again should avoid underflows and only affect values where the code is substantially inaccurate anyway. ldbl-128 and ldbl-128ibm share a completely different implementation with no such cut-off, which I propose to fix separately. Signed-off-by: Keith Packard --- newlib/libm/math/e_j0.c | 6 ++++-- newlib/libm/math/e_j1.c | 6 ++++-- newlib/libm/math/ef_j0.c | 6 +++--- newlib/libm/math/ef_j1.c | 4 ++-- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/newlib/libm/math/e_j0.c b/newlib/libm/math/e_j0.c index 13773cbf9..d3af9d32c 100644 --- a/newlib/libm/math/e_j0.c +++ b/newlib/libm/math/e_j0.c @@ -338,7 +338,8 @@ static double pS2[5] = { __int32_t ix; GET_HIGH_WORD(ix,x); ix &= 0x7fffffff; - if(ix>=0x40200000) {p = pR8; q= pS8;} + if (ix>=0x41b00000) {return one;} + else if(ix>=0x40200000){p = pR8; q= pS8;} else if(ix>=0x40122E8B){p = pR5; q= pS5;} else if(ix>=0x4006DB6D){p = pR3; q= pS3;} else {p = pR2; q= pS2;} @@ -474,7 +475,8 @@ static double qS2[6] = { __int32_t ix; GET_HIGH_WORD(ix,x); ix &= 0x7fffffff; - if(ix>=0x40200000) {p = qR8; q= qS8;} + if (ix>=0x41b00000) {return -.125/x;} + else if(ix>=0x40200000){p = qR8; q= qS8;} else if(ix>=0x40122E8B){p = qR5; q= qS5;} else if(ix>=0x4006DB6D){p = qR3; q= qS3;} else {p = qR2; q= qS2;} diff --git a/newlib/libm/math/e_j1.c b/newlib/libm/math/e_j1.c index 098eb569e..72855e3fa 100644 --- a/newlib/libm/math/e_j1.c +++ b/newlib/libm/math/e_j1.c @@ -336,7 +336,8 @@ static double ps2[5] = { __int32_t ix; GET_HIGH_WORD(ix,x); ix &= 0x7fffffff; - if(ix>=0x40200000) {p = pr8; q= ps8;} + if (ix>=0x41b00000) {return one;} + else if(ix>=0x40200000){p = pr8; q= ps8;} else if(ix>=0x40122E8B){p = pr5; q= ps5;} else if(ix>=0x4006DB6D){p = pr3; q= ps3;} else {p = pr2; q= ps2;} @@ -473,7 +474,8 @@ static double qs2[6] = { __int32_t ix; GET_HIGH_WORD(ix,x); ix &= 0x7fffffff; - if(ix>=0x40200000) {p = qr8; q= qs8;} + if (ix>=0x41b00000) {return .375/x;} + else if(ix>=0x40200000){p = qr8; q= qs8;} else if(ix>=0x40122E8B){p = qr5; q= qs5;} else if(ix>=0x4006DB6D){p = qr3; q= qs3;} else {p = qr2; q= qs2;} diff --git a/newlib/libm/math/ef_j0.c b/newlib/libm/math/ef_j0.c index 866cfcf96..854801f1d 100644 --- a/newlib/libm/math/ef_j0.c +++ b/newlib/libm/math/ef_j0.c @@ -74,7 +74,7 @@ static float zero = 0.0; * j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x) * y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x) */ - if(ix>0x80000000) z = (invsqrtpi*cc)/__ieee754_sqrtf(x); + if(ix>0x5c000000) z = (invsqrtpi*cc)/__ieee754_sqrtf(x); else { u = pzerof(x); v = qzerof(x); z = invsqrtpi*(u*cc-v*ss)/__ieee754_sqrtf(x); @@ -156,14 +156,14 @@ v04 = 4.4111031494e-10; /* 0x2ff280c2 */ if ((s*c)0x80000000) z = (invsqrtpi*ss)/__ieee754_sqrtf(x); + if(ix>0x5c000000) z = (invsqrtpi*ss)/__ieee754_sqrtf(x); else { u = pzerof(x); v = qzerof(x); z = invsqrtpi*(u*ss+v*cc)/__ieee754_sqrtf(x); } return z; } - if(ix<=0x32000000) { /* x < 2**-27 */ + if(ix<=0x39800000) { /* x < 2**-27 */ return(u00 + tpi*__ieee754_logf(x)); } z = x*x; diff --git a/newlib/libm/math/ef_j1.c b/newlib/libm/math/ef_j1.c index 01bd24cf1..f4c9c9dd3 100644 --- a/newlib/libm/math/ef_j1.c +++ b/newlib/libm/math/ef_j1.c @@ -75,7 +75,7 @@ static float zero = 0.0; * j1(x) = 1/sqrt(pi) * (P(1,x)*cc - Q(1,x)*ss) / sqrt(x) * y1(x) = 1/sqrt(pi) * (P(1,x)*ss + Q(1,x)*cc) / sqrt(x) */ - if(ix>0x80000000) z = (invsqrtpi*cc)/__ieee754_sqrtf(y); + if(ix>0x5c000000) z = (invsqrtpi*cc)/__ieee754_sqrtf(y); else { u = ponef(y); v = qonef(y); z = invsqrtpi*(u*cc-v*ss)/__ieee754_sqrtf(y); @@ -153,7 +153,7 @@ static float V0[5] = { * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x)) * to compute the worse one. */ - if(ix>0x48000000) z = (invsqrtpi*ss)/__ieee754_sqrtf(x); + if(ix>0x5c000000) z = (invsqrtpi*ss)/__ieee754_sqrtf(x); else { u = ponef(x); v = qonef(x); z = invsqrtpi*(u*ss+v*cc)/__ieee754_sqrtf(x); From 61cd34c1bfab626c084fd4289657b8f1ac43a138 Mon Sep 17 00:00:00 2001 From: Keith Packard via Newlib Date: Wed, 25 Mar 2020 17:18:19 -0700 Subject: [PATCH 283/520] newlib/libm/common: Fix modf/modff returning snan Recent GCC appears to elide multiplication by 1, which causes snan parameters to be returned unchanged through *iptr. Use the existing conversion of snan to qnan to also set the correct result in *iptr instead. Signed-off-by: Keith Packard --- newlib/libm/common/s_modf.c | 10 ++-------- newlib/libm/common/sf_modf.c | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/newlib/libm/common/s_modf.c b/newlib/libm/common/s_modf.c index c948b8525..c826580b4 100644 --- a/newlib/libm/common/s_modf.c +++ b/newlib/libm/common/s_modf.c @@ -63,12 +63,6 @@ QUICKREF #ifndef _DOUBLE_IS_32BITS -#ifdef __STDC__ -static const double one = 1.0; -#else -static double one = 1.0; -#endif - #ifdef __STDC__ double modf(double x, double *iptr) #else @@ -99,8 +93,8 @@ static double one = 1.0; } } else if (j0>51) { /* no fraction part */ __uint32_t high; - *iptr = x*one; - if (__fpclassifyd(x) == FP_NAN) return x+x; /* x is NaN, return NaN */ + *iptr = x; + if (__fpclassifyd(x) == FP_NAN) return *iptr = x+x; /* x is NaN, return NaN */ GET_HIGH_WORD(high,x); INSERT_WORDS(x,high&0x80000000,0); /* return +-0 */ return x; diff --git a/newlib/libm/common/sf_modf.c b/newlib/libm/common/sf_modf.c index ae970762b..e241e4612 100644 --- a/newlib/libm/common/sf_modf.c +++ b/newlib/libm/common/sf_modf.c @@ -15,12 +15,6 @@ #include "fdlibm.h" -#ifdef __STDC__ -static const float one = 1.0; -#else -static float one = 1.0; -#endif - #ifdef __STDC__ float modff(float x, float *iptr) #else @@ -51,8 +45,8 @@ static float one = 1.0; } } else { /* no fraction part */ __uint32_t ix; - *iptr = x*one; - if (__fpclassifyf(x) == FP_NAN) return x+x; /* x is NaN, return NaN */ + *iptr = x; + if (__fpclassifyf(x) == FP_NAN) return *iptr = x+x; /* x is NaN, return NaN */ GET_FLOAT_WORD(ix,x); SET_FLOAT_WORD(x,ix&0x80000000); /* return +-0 */ return x; From 3439f3b0e998fd59f4ed277bb0c05bf24d7dc831 Mon Sep 17 00:00:00 2001 From: Keith Packard via Newlib Date: Wed, 25 Mar 2020 17:18:20 -0700 Subject: [PATCH 284/520] newlib/libm/common: Don't re-convert float to bits in modf/modff These functions shared a pattern of re-converting the argument to bits when returning +/-0. Skip that as the initial conversion still has the sign bit. Signed-off-by: Keith Packard --- newlib/libm/common/s_modf.c | 12 +++--------- newlib/libm/common/sf_modf.c | 8 ++------ 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/newlib/libm/common/s_modf.c b/newlib/libm/common/s_modf.c index c826580b4..e552a9460 100644 --- a/newlib/libm/common/s_modf.c +++ b/newlib/libm/common/s_modf.c @@ -81,10 +81,8 @@ QUICKREF } else { i = (0x000fffff)>>j0; if(((i0&i)|i1)==0) { /* x is integral */ - __uint32_t high; *iptr = x; - GET_HIGH_WORD(high,x); - INSERT_WORDS(x,high&0x80000000,0); /* return +-0 */ + INSERT_WORDS(x,i0&0x80000000,0); /* return +-0 */ return x; } else { INSERT_WORDS(*iptr,i0&(~i),0); @@ -92,19 +90,15 @@ QUICKREF } } } else if (j0>51) { /* no fraction part */ - __uint32_t high; *iptr = x; if (__fpclassifyd(x) == FP_NAN) return *iptr = x+x; /* x is NaN, return NaN */ - GET_HIGH_WORD(high,x); - INSERT_WORDS(x,high&0x80000000,0); /* return +-0 */ + INSERT_WORDS(x,i0&0x80000000,0); /* return +-0 */ return x; } else { /* fraction part in low x */ i = ((__uint32_t)(0xffffffff))>>(j0-20); if((i1&i)==0) { /* x is integral */ - __uint32_t high; *iptr = x; - GET_HIGH_WORD(high,x); - INSERT_WORDS(x,high&0x80000000,0); /* return +-0 */ + INSERT_WORDS(x,i0&0x80000000,0); /* return +-0 */ return x; } else { INSERT_WORDS(*iptr,i0,i1&(~i)); diff --git a/newlib/libm/common/sf_modf.c b/newlib/libm/common/sf_modf.c index e241e4612..2994378bb 100644 --- a/newlib/libm/common/sf_modf.c +++ b/newlib/libm/common/sf_modf.c @@ -33,10 +33,8 @@ } else { i = (0x007fffff)>>j0; if((i0&i)==0) { /* x is integral */ - __uint32_t ix; *iptr = x; - GET_FLOAT_WORD(ix,x); - SET_FLOAT_WORD(x,ix&0x80000000); /* return +-0 */ + SET_FLOAT_WORD(x,i0&0x80000000); /* return +-0 */ return x; } else { SET_FLOAT_WORD(*iptr,i0&(~i)); @@ -44,11 +42,9 @@ } } } else { /* no fraction part */ - __uint32_t ix; *iptr = x; if (__fpclassifyf(x) == FP_NAN) return *iptr = x+x; /* x is NaN, return NaN */ - GET_FLOAT_WORD(ix,x); - SET_FLOAT_WORD(x,ix&0x80000000); /* return +-0 */ + SET_FLOAT_WORD(x,i0&0x80000000); /* return +-0 */ return x; } } From 6295d759133c399f1d4fcd224fa4f1bd2794288b Mon Sep 17 00:00:00 2001 From: Keith Packard via Newlib Date: Wed, 25 Mar 2020 17:18:21 -0700 Subject: [PATCH 285/520] newlib/libm/math: Make pow/powf return qnan for snan arg The IEEE spec for pow only has special case for x**0 and 1**y when x/y are quiet NaN. For signaling NaN, the general case applies and these functions should signal the invalid exception and return a quiet NaN. Signed-off-by: Keith Packard --- newlib/libm/math/e_pow.c | 13 +++++++++---- newlib/libm/math/ef_pow.c | 10 +++++++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/newlib/libm/math/e_pow.c b/newlib/libm/math/e_pow.c index 5fd28e65f..4c450ec05 100644 --- a/newlib/libm/math/e_pow.c +++ b/newlib/libm/math/e_pow.c @@ -58,6 +58,8 @@ */ #include "fdlibm.h" +#include "math_config.h" + #if __OBSOLETE_MATH #ifndef _DOUBLE_IS_32BITS @@ -116,14 +118,17 @@ ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/ EXTRACT_WORDS(hy,ly,y); ix = hx&0x7fffffff; iy = hy&0x7fffffff; - /* y==zero: x**0 = 1 */ - if((iy|ly)==0) return one; + /* y==zero: x**0 = 1 unless x is snan */ + if((iy|ly)==0) { + if (issignaling_inline(x)) return x + y; + return one; + } /* x|y==NaN return NaN unless x==1 then return 1 */ if(ix > 0x7ff00000 || ((ix==0x7ff00000)&&(lx!=0)) || iy > 0x7ff00000 || ((iy==0x7ff00000)&&(ly!=0))) { - if(((hx-0x3ff00000)|lx)==0) return one; - else return nan(""); + if(((hx-0x3ff00000)|lx)==0 && !issignaling_inline(y)) return one; + else return x + y; } /* determine if y is an odd int when x < 0 diff --git a/newlib/libm/math/ef_pow.c b/newlib/libm/math/ef_pow.c index d9e85a95e..d4ea4c5e8 100644 --- a/newlib/libm/math/ef_pow.c +++ b/newlib/libm/math/ef_pow.c @@ -14,6 +14,7 @@ */ #include "fdlibm.h" +#include "math_config.h" #if __OBSOLETE_MATH #ifdef __v810__ @@ -74,13 +75,16 @@ ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/ ix = hx&0x7fffffff; iy = hy&0x7fffffff; /* y==zero: x**0 = 1 */ - if(FLT_UWORD_IS_ZERO(iy)) return one; + if(FLT_UWORD_IS_ZERO(iy)) { + if (issignalingf_inline(x)) return x + y; + return one; + } /* x|y==NaN return NaN unless x==1 then return 1 */ if(FLT_UWORD_IS_NAN(ix) || FLT_UWORD_IS_NAN(iy)) { - if(hx==0x3f800000) return one; - else return nanf(""); + if(hx==0x3f800000 && !issignalingf_inline(y)) return one; + else return x + y; } /* determine if y is an odd int when x < 0 From d2e0b65a7fdc78ed39a8d5338a36cb887805a601 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 26 Mar 2020 14:13:37 +0100 Subject: [PATCH 286/520] Cygwin: serial: fix GCC warning Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_serial.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc index 9446315e5..1aaeedf1f 100644 --- a/winsup/cygwin/fhandler_serial.cc +++ b/winsup/cygwin/fhandler_serial.cc @@ -80,7 +80,7 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen) /* If the number of chars in the inbound queue is sufficent (minchars defines the minimum), set bytes_to_read accordingly and don't wait. */ - if (st.cbInQue && st.cbInQue >= minchars) + if (st.cbInQue && (ssize_t) st.cbInQue >= minchars) bytes_to_read = MIN (st.cbInQue, bytes_to_read); } From 4a36897af392c3bc0805f4802246b5d098ed19b7 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 27 Mar 2020 12:12:31 +0100 Subject: [PATCH 287/520] Cygwin: symlinks: support WSL symlinks Treat WSL symlinks just like other symlinks. Convert absolute paths pointing to Windows drives via /mnt/ to Windows-style paths : Signed-off-by: Corinna Vinschen --- winsup/cygwin/path.cc | 73 +++++++++++++++++++++++++++++++++++++ winsup/cygwin/release/3.1.5 | 6 +++ winsup/doc/new-features.xml | 4 ++ 3 files changed, 83 insertions(+) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index bda3ca1b5..7fa2bc5b5 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -2360,6 +2360,29 @@ check_reparse_point_string (PUNICODE_STRING subst) return false; } +#ifndef IO_REPARSE_TAG_LX_SYMLINK +#define IO_REPARSE_TAG_LX_SYMLINK (0xa000001d) +#endif + +typedef struct _REPARSE_LX_SYMLINK_BUFFER +{ + DWORD ReparseTag; + WORD ReparseDataLength; + WORD Reserved; + struct { + DWORD FileType; /* Take member name with a grain of salt. Value is + apparently always 2 for symlinks. */ + char PathBuffer[1];/* POSIX path as given to symlink(2). + Path is not \0 terminated. + Length is ReparseDataLength - sizeof (FileType). + Always UTF-8. + Chars given in incompatible codesets, e. g. umlauts + in ISO-8859-x, are converted to the Unicode + REPLACEMENT CHARACTER 0xfffd == \xef\xbf\bd */ + } LxSymlinkReparseBuffer; +} REPARSE_LX_SYMLINK_BUFFER,*PREPARSE_LX_SYMLINK_BUFFER; + + /* Return values: <0: Negative errno. 0: No symlink. @@ -2434,6 +2457,56 @@ check_reparse_point_target (HANDLE h, bool remote, PREPARSE_DATA_BUFFER rp, if (check_reparse_point_string (psymbuf)) return PATH_SYMLINK | PATH_REP; } + else if (rp->ReparseTag == IO_REPARSE_TAG_LX_SYMLINK) + { + /* WSL symlink. Problem: We have to convert the path to UTF-16 for + the caller. Reparse points are 16K max. The buffer given to rp + is 32K. So there's enough trailing space in the buffer to convert + to UTF-16 and let psymbuf point to it. */ + PREPARSE_LX_SYMLINK_BUFFER rpl = (PREPARSE_LX_SYMLINK_BUFFER) rp; + char *path_buf = rpl->LxSymlinkReparseBuffer.PathBuffer; + DWORD path_len = rpl->ReparseDataLength - sizeof (DWORD); + PBYTE utf16_ptr; + PWCHAR utf16_buf; + int utf16_bufsize; + bool full_path = false; + const size_t drv_prefix_len = strlen ("/mnt"); + + /* Compute buffer for path converted to UTF-16. */ + utf16_ptr = (PBYTE) rpl + sizeof (REPARSE_LX_SYMLINK_BUFFER) + + rp->ReparseDataLength; + while ((intptr_t) utf16_ptr % sizeof (WCHAR)) + ++utf16_ptr; + utf16_buf = (PWCHAR) utf16_ptr; + utf16_bufsize = NT_MAX_PATH - (utf16_buf - (PWCHAR) rpl); + /* Check for abs path /mnt/x. Convert to x: after conversion to UTF-16. */ + if (path_len >= drv_prefix_len + 2 + && !strncmp (path_buf, "/mnt/", drv_prefix_len + 1) + && islower (path_buf[drv_prefix_len + 1]) + && (path_len == drv_prefix_len + 2 + || path_buf[drv_prefix_len + 2] == '/')) + { + /* Skip forward to the slash leading the drive letter. That leaves + room for adding the colon. */ + path_buf += drv_prefix_len; + path_len -= drv_prefix_len; + full_path = true; + } + utf16_bufsize = MultiByteToWideChar (CP_UTF8, 0, path_buf, path_len, + utf16_buf, utf16_bufsize); + if (utf16_bufsize) + { + if (full_path) + { + utf16_buf[0] = utf16_buf[1]; /* Move drive letter to front */ + utf16_buf[1] = L':'; /* Add colon */ + } + RtlInitCountedUnicodeString (psymbuf, utf16_buf, + utf16_bufsize * sizeof (WCHAR)); + return PATH_SYMLINK | PATH_REP; + } + return -EIO; + } #ifdef __WITH_AF_UNIX else if (rp->ReparseTag == IO_REPARSE_TAG_CYGUNIX) { diff --git a/winsup/cygwin/release/3.1.5 b/winsup/cygwin/release/3.1.5 index e567ecb32..6f16aad93 100644 --- a/winsup/cygwin/release/3.1.5 +++ b/winsup/cygwin/release/3.1.5 @@ -1,3 +1,9 @@ +What changed: +------------- + +- Support WSL symlinks. + + Bug Fixes: ---------- diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml index 9086302d3..a200300f2 100644 --- a/winsup/doc/new-features.xml +++ b/winsup/doc/new-features.xml @@ -82,6 +82,10 @@ be supported by upcoming mintty releases. For the reasoning, see https://gitlab.freedesktop.org/terminal-wg/specifications/issues/9. + +Support WSL symlinks. + + From 1171927f1a0073821d0b0266f9d8eff42742d1cf Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Wed, 1 Apr 2020 11:20:00 +0530 Subject: [PATCH 288/520] winsup/cygwin: remove defines added in mingw-w64 v7.0.0 Signed-off-by: Biswapriyo Nath --- winsup/cygwin/mmap.cc | 3 --- winsup/cygwin/uinfo.cc | 3 --- winsup/cygwin/winlean.h | 11 ----------- 3 files changed, 17 deletions(-) diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index d8ef037f0..662489c8c 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -1466,9 +1466,6 @@ munlock (const void *addr, size_t len) return ret; } -/* This is required until Mingw-w64 catches up with newer functions. */ -extern "C" WINAPI DWORD DiscardVirtualMemory (PVOID, SIZE_T); - extern "C" int posix_madvise (void *addr, size_t len, int advice) { diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index bfcce00da..2d5de359b 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -1912,9 +1912,6 @@ pwdgrp::construct_sid_from_name (cygsid &sid, wchar_t *name, wchar_t *sep) return false; } -/* CV 2018-08-28: SidTypeLogonSession is not yet defined in Mingw64. */ -#define SidTypeLogonSession 11 - char * pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap) { diff --git a/winsup/cygwin/winlean.h b/winsup/cygwin/winlean.h index 1332cb7aa..9b30b6557 100644 --- a/winsup/cygwin/winlean.h +++ b/winsup/cygwin/winlean.h @@ -94,15 +94,4 @@ details. */ #define GetWindowsDirectoryW dont_use_GetWindowsDirectory #define GetWindowsDirectoryA dont_use_GetWindowsDirectory -/* For console with xterm compatible mode */ -/* Not yet defined in Mingw-w64 */ -#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING -#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004 -#endif /* ENABLE_VIRTUAL_TERMINAL_PROCESSING */ -#ifndef ENABLE_VIRTUAL_TERMINAL_INPUT -#define ENABLE_VIRTUAL_TERMINAL_INPUT 0x0200 -#endif /* ENABLE_VIRTUAL_TERMINAL_INPUT */ -#ifndef DISABLE_NEWLINE_AUTO_RETURN -#define DISABLE_NEWLINE_AUTO_RETURN 0x0008 -#endif /* DISABLE_NEWLINE_AUTO_RETURN */ #endif /*_WINLEAN_H*/ From fb834beebe10c9dac33dacc657af29c4e136cd59 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 2 Apr 2020 22:25:55 +0200 Subject: [PATCH 289/520] Cygwin: symlinks: fix WSL symlinks pointing to /mnt Commit 4a36897af392 allowed to convert /mnt/ path prefixes to Cygwin cygdrive prefixes on the fly. However, the patch neglected WSL symlinks pointing to the /mnt directory. Rearrange path conversion so /mnt is converted to the cygdrive prefix path itself. Signed-off-by: Corinna Vinschen --- winsup/cygwin/path.cc | 50 ++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 7fa2bc5b5..7d9d61fcd 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -2466,32 +2466,52 @@ check_reparse_point_target (HANDLE h, bool remote, PREPARSE_DATA_BUFFER rp, PREPARSE_LX_SYMLINK_BUFFER rpl = (PREPARSE_LX_SYMLINK_BUFFER) rp; char *path_buf = rpl->LxSymlinkReparseBuffer.PathBuffer; DWORD path_len = rpl->ReparseDataLength - sizeof (DWORD); + bool full_path = false; + const size_t drv_prefix_len = strlen ("/mnt"); PBYTE utf16_ptr; PWCHAR utf16_buf; int utf16_bufsize; - bool full_path = false; - const size_t drv_prefix_len = strlen ("/mnt"); + /* 0-terminate path_buf for easier testing. */ + path_buf[path_len] = '\0'; + if (path_prefix_p ("/mnt", path_buf, drv_prefix_len, false)) + { + size_t len = strlen (path_buf); + + if (len <= drv_prefix_len + 1) + { + /* /mnt or /mnt/. Replace with cygdrive prefix. */ + stpcpy (path_buf, mount_table->cygdrive); + path_len = mount_table->cygdrive_len; + if (len == drv_prefix_len) + { + path_buf[mount_table->cygdrive_len - 1] = '\0'; + --path_len; + } + rp->ReparseDataLength = path_len + sizeof (DWORD); + } + else if (islower (path_buf[drv_prefix_len + 1]) + && (path_len == drv_prefix_len + 2 + || path_buf[drv_prefix_len + 2] == '/')) + { + /* Skip forward to the slash leading the drive letter. + That leaves room for adding the colon. */ + path_buf += drv_prefix_len; + path_len -= drv_prefix_len; + full_path = true; + } + } /* Compute buffer for path converted to UTF-16. */ utf16_ptr = (PBYTE) rpl + sizeof (REPARSE_LX_SYMLINK_BUFFER) + rp->ReparseDataLength; + /* Skip \0-termination added above. */ + ++utf16_ptr; + /* Make sure pointer is aligned */ while ((intptr_t) utf16_ptr % sizeof (WCHAR)) ++utf16_ptr; utf16_buf = (PWCHAR) utf16_ptr; utf16_bufsize = NT_MAX_PATH - (utf16_buf - (PWCHAR) rpl); - /* Check for abs path /mnt/x. Convert to x: after conversion to UTF-16. */ - if (path_len >= drv_prefix_len + 2 - && !strncmp (path_buf, "/mnt/", drv_prefix_len + 1) - && islower (path_buf[drv_prefix_len + 1]) - && (path_len == drv_prefix_len + 2 - || path_buf[drv_prefix_len + 2] == '/')) - { - /* Skip forward to the slash leading the drive letter. That leaves - room for adding the colon. */ - path_buf += drv_prefix_len; - path_len -= drv_prefix_len; - full_path = true; - } + /* Now convert path to UTF-16. */ utf16_bufsize = MultiByteToWideChar (CP_UTF8, 0, path_buf, path_len, utf16_buf, utf16_bufsize); if (utf16_bufsize) From 44da5e4b8c89bfcee79eb83fd3b7142720489940 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 3 Apr 2020 21:40:01 +0200 Subject: [PATCH 290/520] Cygwin: symlinks: create WSL symlinks on supporting filesystems WSL symlinks are reparse points containing a POSIX path in UTF-8. On filesystems supporting reparse points, use this symlink type. On other filesystems, or in case of error, fall back to the good old plain SYSTEM file. Signed-off-by: Corinna Vinschen --- winsup/cygwin/path.cc | 127 +++++++++++++++++++++++++++++------- winsup/cygwin/release/3.1.5 | 2 +- winsup/doc/new-features.xml | 2 +- 3 files changed, 105 insertions(+), 26 deletions(-) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 7d9d61fcd..e6dc03ffa 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1845,6 +1845,97 @@ symlink_native (const char *oldpath, path_conv &win32_newpath) return 0; } +#ifndef IO_REPARSE_TAG_LX_SYMLINK +#define IO_REPARSE_TAG_LX_SYMLINK (0xa000001d) +#endif + +typedef struct _REPARSE_LX_SYMLINK_BUFFER +{ + DWORD ReparseTag; + WORD ReparseDataLength; + WORD Reserved; + struct { + DWORD FileType; /* Take member name with a grain of salt. Value is + apparently always 2 for symlinks. */ + char PathBuffer[1];/* POSIX path as given to symlink(2). + Path is not \0 terminated. + Length is ReparseDataLength - sizeof (FileType). + Always UTF-8. + Chars given in incompatible codesets, e. g. umlauts + in ISO-8859-x, are converted to the Unicode + REPLACEMENT CHARACTER 0xfffd == \xef\xbf\bd */ + } LxSymlinkReparseBuffer; +} REPARSE_LX_SYMLINK_BUFFER,*PREPARSE_LX_SYMLINK_BUFFER; + +static int +symlink_wsl (const char *oldpath, path_conv &win32_newpath) +{ + tmp_pathbuf tp; + PREPARSE_LX_SYMLINK_BUFFER rpl = (PREPARSE_LX_SYMLINK_BUFFER) tp.c_get (); + char *path_buf = rpl->LxSymlinkReparseBuffer.PathBuffer; + const int max_pathlen = MAXIMUM_REPARSE_DATA_BUFFER_SIZE + - offsetof (REPARSE_LX_SYMLINK_BUFFER, + LxSymlinkReparseBuffer.PathBuffer); + PWCHAR utf16 = tp.w_get (); + NTSTATUS status; + IO_STATUS_BLOCK io; + OBJECT_ATTRIBUTES attr; + HANDLE fh; + int len; + + rpl->ReparseTag = IO_REPARSE_TAG_LX_SYMLINK; + rpl->Reserved = 0; + rpl->LxSymlinkReparseBuffer.FileType = 2; + /* Convert cygdrive prefix to "/mnt" for WSL compatibility. */ + if (path_prefix_p (mount_table->cygdrive, oldpath, + mount_table->cygdrive_len, false)) + stpcpy (stpcpy (path_buf, "/mnt"), + oldpath + mount_table->cygdrive_len - 1); + else + *stpncpy (path_buf, oldpath, max_pathlen) = '\0'; + /* Convert target path to UTF-16 and then back to UTF-8 to make sure the + WSL symlink is in UTF-8, independet of the current Cygwin codeset. */ + sys_mbstowcs (utf16, NT_MAX_PATH, path_buf); + len = WideCharToMultiByte (CP_UTF8, 0, utf16, -1, path_buf, max_pathlen, + NULL, NULL); + /* Length is omitting trailing \0. */ + rpl->ReparseDataLength = sizeof (DWORD) + len - 1; + /* Create reparse point. */ + status = NtCreateFile (&fh, DELETE | FILE_GENERIC_WRITE + | READ_CONTROL | WRITE_DAC, + win32_newpath.get_object_attr (attr, sec_none_nih), + &io, NULL, FILE_ATTRIBUTE_NORMAL, + FILE_SHARE_VALID_FLAGS, FILE_CREATE, + FILE_SYNCHRONOUS_IO_NONALERT + | FILE_NON_DIRECTORY_FILE + | FILE_OPEN_FOR_BACKUP_INTENT + | FILE_OPEN_REPARSE_POINT, + NULL, 0); + if (!NT_SUCCESS (status)) + { + SetLastError (RtlNtStatusToDosError (status)); + return -1; + } + set_created_file_access (fh, win32_newpath, S_IFLNK | STD_RBITS | STD_WBITS); + status = NtFsControlFile (fh, NULL, NULL, NULL, &io, FSCTL_SET_REPARSE_POINT, + (LPVOID) rpl, REPARSE_DATA_BUFFER_HEADER_SIZE + + rpl->ReparseDataLength, + NULL, 0); + if (!NT_SUCCESS (status)) + { + SetLastError (RtlNtStatusToDosError (status)); + FILE_DISPOSITION_INFORMATION fdi = { TRUE }; + status = NtSetInformationFile (fh, &io, &fdi, sizeof fdi, + FileDispositionInformation); + NtClose (fh); + if (!NT_SUCCESS (status)) + debug_printf ("Setting delete dispostion failed, status = %y", status); + return -1; + } + NtClose (fh); + return 0; +} + int symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice) { @@ -1908,7 +1999,7 @@ symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice) __leave; } - /* Handle NFS and native symlinks in their own functions. */ + /* Handle NFS, native symlinks and WSL symlinks in their own functions. */ switch (wsym_type) { case WSYM_nfs: @@ -1928,6 +2019,17 @@ symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice) } /* Otherwise, fall back to default symlink type. */ wsym_type = WSYM_sysfile; + /*FALLTHRU*/ + case WSYM_sysfile: + if (win32_newpath.fs_flags () & FILE_SUPPORTS_REPARSE_POINTS) + { + res = symlink_wsl (oldpath, win32_newpath); + if (!res) + __leave; + } + /* On FSes not supporting reparse points, or in case of an error + creating the WSL symlink, fall back to creating the plain old + SYSTEM file symlink. */ break; default: break; @@ -2360,29 +2462,6 @@ check_reparse_point_string (PUNICODE_STRING subst) return false; } -#ifndef IO_REPARSE_TAG_LX_SYMLINK -#define IO_REPARSE_TAG_LX_SYMLINK (0xa000001d) -#endif - -typedef struct _REPARSE_LX_SYMLINK_BUFFER -{ - DWORD ReparseTag; - WORD ReparseDataLength; - WORD Reserved; - struct { - DWORD FileType; /* Take member name with a grain of salt. Value is - apparently always 2 for symlinks. */ - char PathBuffer[1];/* POSIX path as given to symlink(2). - Path is not \0 terminated. - Length is ReparseDataLength - sizeof (FileType). - Always UTF-8. - Chars given in incompatible codesets, e. g. umlauts - in ISO-8859-x, are converted to the Unicode - REPLACEMENT CHARACTER 0xfffd == \xef\xbf\bd */ - } LxSymlinkReparseBuffer; -} REPARSE_LX_SYMLINK_BUFFER,*PREPARSE_LX_SYMLINK_BUFFER; - - /* Return values: <0: Negative errno. 0: No symlink. diff --git a/winsup/cygwin/release/3.1.5 b/winsup/cygwin/release/3.1.5 index 6f16aad93..c1d1cd89d 100644 --- a/winsup/cygwin/release/3.1.5 +++ b/winsup/cygwin/release/3.1.5 @@ -1,7 +1,7 @@ What changed: ------------- -- Support WSL symlinks. +- Support WSL symlinks. Create those by default now. Bug Fixes: diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml index a200300f2..60ae60de4 100644 --- a/winsup/doc/new-features.xml +++ b/winsup/doc/new-features.xml @@ -83,7 +83,7 @@ https://gitlab.freedesktop.org/terminal-wg/specifications/issues/9. -Support WSL symlinks. +Support WSL symlinks. Create those by default now. From 44fe41a766b1f4dbb6d2f16523aea3507d10b6ef Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 3 Apr 2020 21:44:00 +0200 Subject: [PATCH 291/520] Cygwin: docs: revamp docs explaining symlinks The descriptions of symlink handling are a bit dated, so revamp them and add the new WSL symlink type. Signed-off-by: Corinna Vinschen --- winsup/doc/faq-api.xml | 125 ++++++++++++++++++++++++++++-------- winsup/doc/faq-using.xml | 14 ++-- winsup/doc/pathnames.xml | 73 ++++++++++----------- winsup/doc/specialnames.xml | 3 +- 4 files changed, 142 insertions(+), 73 deletions(-) diff --git a/winsup/doc/faq-api.xml b/winsup/doc/faq-api.xml index a95dbdd31..313f15d37 100644 --- a/winsup/doc/faq-api.xml +++ b/winsup/doc/faq-api.xml @@ -180,37 +180,108 @@ expect. How do symbolic links work? -Cygwin knows of two ways to create symlinks. - -The default method generates link files with a magic header. When you -open a file or directory that is a link to somewhere else, it opens the file -or directory listed in the magic header. Because we don't want to have to -open every referenced file to check symlink status, Cygwin marks symlinks -with the system attribute. Files without the system attribute are not -checked. Because remote samba filesystems do not enable the system -attribute by default, symlinks do not work on network drives unless you -explicitly enable this attribute or use the second method to create symlinks. +Cygwin knows of five ways to create symlinks. This is really +complicated stuff since we started out way back when Windows didn't +know symlinks at all. The rest is history... -The second method is enabled if `winsymlinks' is set in the environment -variable CYGWIN. -Using this method, Cygwin generates symlinks by creating Windows shortcuts. -Cygwin created shortcuts have a special header (which is in that way never -created by Explorer) and the R/O attribute set. A DOS path is stored in -the shortcut as usual and the description entry is used to store the POSIX -path. While the POSIX path is stored as is, the DOS path has perhaps to be -rearranged to result in a valid path. This may result in a divergence -between the DOS and the POSIX path when symlinks are moved crossing mount -points. When a user changes the shortcut, this will be detected by Cygwin -and it will only use the DOS path then. While Cygwin shortcuts are shown -without the ".lnk" suffix in `ls' output, non-Cygwin shortcuts are shown -with the suffix. However, both are treated as symlinks. + + + +Starting with Cygwin 3.1.5 in 2020, symlinks are created by default as a +special reparse point type known as "WSL symlinks". These have been +introduced on Windows 10 with the advent of WSL, "Windows Subsystem for +Linux". WSL symlinks created by Cygwin are understood by WSL and vice +versa. They contain a normal POSIX path as used in the Cygwin and WSL +environments. Windows itself recognizes them as arbitrary reparse +points (CMD's "dir" command shows them as "[JUNCTION]") but it doesn't +know how to follow them to the target. Older Windows versions handle +these symlinks exactly the same way, so there's no point using different +symlink types on older Windows. These symlinks only work on filesystems +supporting reparse points, but fortunately there's another symlink type +Cygwin creates, right the next bullet point... + + + +The original default method creating symlinks in Cygwin since pre-2000 +generates symlinks as simple files with a magic header and the DOS +SYSTEM attribute set. When you open a file or directory through such a +symlink, Cygwin opens the file, checks the magic header, and if it's +correct, reads the target of the symlink from the remainder of the file. +Because we don't want having to open every referenced file to check +symlink status, Cygwin only opens files with DOS SYSTEM attribute set to +inspect them for being a Cygwin symlink. These symlinks also work +on filesystems not supporting reparse points, i. e., FAT/FAT32/ExFAT. + + + +A very special case are NFS filesystems, supported by Cygwin since 2008 +via the Microsoft NFS driver, unfortunately only available in Enterprise +versions of Windows. Filesystems shared via NFS usually support symlinks +all by themselves, and the Microsoft driver has special functionality to +support them. Cygwin utilizes this interface to create "real" symlinks +on filesystems mounted via NFS. + + + +Starting 2013, Cygwin also supports NTFS symlinks, introduced with +Windows Vista. These symlinks are reparse points containing a Windows +path. Creating them is enabled by setting 'winsymlinks:native' or +'winsymlinks:nativestrict' in the environment variable CYGWIN. The +upside of this symlink type is that the path is stored as Windows path +so they are understood by non-Cygwin Windows tools as well. The downsides +are: + + +The path is stored as Windows path, so the path has perhaps to be rearranged +to result in a valid path. This may result in a divergence from the original +POSIX path the user intended. + + +Creating NTFS symlinks require administrative privileges by default. You +have to make certain settings in the OS (depending on the Windows version) +to allow creating them as a non-privileged user. + + +NTFS symlinks have a type. They are either a "file" or a "directory", +depending on the target file type. This information is utilized especially +by Windows Explorer to show the correct file or directory icon in file +listings without having to check on the target file and to know what +actions are provided by clicking on the symlink. However, if a NTFS +symlink points to a file "foo", and "foo" is deleted and replaced by +a directory "foo", the symlink type of an NTFS symlink pointing to "foo" +is unchanged and subsequently Windows Explorer will misbehave. +Consequentially, creating dangling NTFS symlinks is a nuisance, since +the library does not know what type the still-to-be-created symlink +target will be. Cygwin will not create dangling NTFS symlinks, but +fallback to creating the default symlink type (winsymlinks:native) or +just fail (winsymlinks:nativestrict). + + + + + +Another method, available since 2001, is enabled if `winsymlinks' or +'winsymlinks:lnk' is set in the environment variable CYGWIN. Using this +method, Cygwin generates symlinks by creating Windows shortcuts . +Cygwin created shortcuts have a special header (which is never created +by Explorer that way) and the DOS READONLY attribute set. A Windows +path is stored in the shortcut as usual and the POSIX path is stored in +the remainder of the file. While the POSIX path is stored as is, the +Windows path has perhaps to be rearranged to result in a valid path. +This may result in a divergence between the Windows and the POSIX path +when symlinks are moved crossing mount points. When a user changes the +shortcut, this will be detected by Cygwin and it will only use the +Windows path then. While Cygwin shortcuts are shown without the ".lnk" +suffix in `ls' output, non-Cygwin shortcuts are shown with the suffix. -Both, types of symlinks can live peacefully together since Cygwin -treats both as symlinks regardless of the setting of `(no)winsymlinks' in -the environment variable CYGWIN. - +For enabling this or the preceeding symlink type, see + + + + + diff --git a/winsup/doc/faq-using.xml b/winsup/doc/faq-using.xml index 4fca00525..4c6d8c76d 100644 --- a/winsup/doc/faq-using.xml +++ b/winsup/doc/faq-using.xml @@ -853,7 +853,7 @@ because they do not always work on Samba drives. Also, mounts are faster to process because no disk access is required to resolve them. Note that non-cygwin applications will not observe Cygwin mounts (or -symlinks for that matter). For example, if you use WinZip to unpack the +most symlinks for that matter). For example, if you use WinZip to unpack the tar distribution of a Cygwin package, it may not get installed to the correct Cygwin path. So don't do this! @@ -967,10 +967,10 @@ set you're using in future. Why don't symlinks work on Samba-mounted filesystems? -Symlinks are marked with "system" file attribute. Samba does not -enable this attribute by default. To enable it, consult your Samba -documentation and then add these lines to your samba configuration -file: +Default symlinks on Samba are marked with DOS SYSTEM file +attribute. Samba does not enable this attribute by default. To enable +it, consult your Samba documentation and then add these lines to your +samba configuration file: map system = yes @@ -980,8 +980,10 @@ file: Note that the 0775 can be anything as long as the 0010 bit is set. Alternatively, use Windows shortcuts as symlinks. See the CYGWIN -environment variable option "winsymlinks" +environment variable option "winsymlinks:lnk" +Note that Samba does not support reparse points so some methods to +create symlinks are just not available. diff --git a/winsup/doc/pathnames.xml b/winsup/doc/pathnames.xml index 6f9fefa24..2966bdabf 100644 --- a/winsup/doc/pathnames.xml +++ b/winsup/doc/pathnames.xml @@ -377,51 +377,41 @@ like this: Symbolic links -Symbolic links are not present and supported on Windows until Windows -Vista/Server 2008, and then only on some filesystems. Since POSIX applications -are rightfully expecting to use symlinks and the -symlink(2) system call, Cygwin had to find a -workaround for this Windows flaw. +Symbolic links are supported by Windows only on NTFS and have +a lot of quirks making them (almost) unusable in a POSIX context. +POSIX applications are rightfully expecting to use symlinks and the +symlink(2) system call, so Cygwin has worked around +the Windows shortcomings. Cygwin creates symbolic links potentially in multiple different -ways: +ways. -The default symlinks are plain files containing a magic cookie -followed by the path to which the link points. They are marked with the -DOS SYSTEM attribute so that only files with that attribute have to be -read to determine whether or not the file is a symbolic link. +The default symlinks created by Cygwin are either special reparse +points shared with WSL on Windows 10, or plain files containing a magic +cookie followed by the path to which the link points. The reparse point +is used on NTFS, the plain file on almost any other filesystem. -Cygwin symbolic links are using UTF-16 to encode the filename of -the target file, to better support internationalization. Symlinks created by -old Cygwin releases can be read just fine. However, you could run into -problems with them if you're now using another character set than the one you -used when creating these symlinks -(see ). +Symlinks created by really old Cygwin releases (prior to +Cygwin 1.7.0) are usually readable. However, you could run into problems +if you're now using another character set than the one you used when +creating these symlinks (see ). -The shortcut style symlinks are Windows .lnk -shortcut files with a special header and the DOS READONLY attribute set. -This symlink type is created if the environment variable -CYGWIN (see ) -is set to contain the string winsymlinks or -winsymlinks:lnk. On the MVFS filesystem, which does -not support the DOS SYSTEM attribute, this is the one and only supported -symlink type, independently from the winsymlinks -setting. +On filesystems mounted via Microsoft's NFS client, Cygwin always +creates real NFS symlinks. -Native Windows symlinks are only created on Windows Vista/2008 and later, -and only on filesystems supporting reparse points. Due to to their weird -restrictions and behaviour, they are only created if the user -explicitely requests creating them. This is done by setting the -environment variable CYGWIN to contain the string -winsymlinks:native or +Native Windows symlinks are only created on filesystems supporting +reparse points. Due to their weird restrictions and behaviour, they are +only created if the user explicitely requests creating them. This is done +by setting the environment variable CYGWIN to contain +the string winsymlinks:native or winsymlinks:nativestrict. For the difference between these two settings, see . On AFS, native symlinks are the only supported type of symlink due to @@ -433,21 +423,28 @@ symlinks that lie in the target path. -On the NFS filesystem, Cygwin always creates real NFS symlinks. +Shortcut style symlinks are Windows .lnk +shortcut files with a special header and the DOS READONLY attribute set. +This symlink type is created if the environment variable +CYGWIN (see ) +is set to contain the string winsymlinks or +winsymlinks:lnk. On the MVFS filesystem, which does +not support the DOS SYSTEM attribute, this is the one and only supported +symlink type, independently from the winsymlinks +setting. -All of the above four symlink types are recognized and used as symlinks +All of the above symlink types are recognized and used as symlinks under all circumstances. However, if the default plain file symlink type is lacking its DOS SYSTEM bit, or if the shortcut file is lacking the DOS READONLY attribute, they are not recognized as symlink. -Apart from these four types, there's also a fifth type, which is -recognized as symlink but never generated by Cygwin, directory -junctions. This is an older reparse point type, supported by Windows -since Windows 2000. Filesystem junctions on the other hand are not -handled as symlinks, since otherwise they would not be recognized as +Apart from these types, there's also a Windows native type, +so called directory junctions. They are recognized as symlink but +never generated by Cygwin. Filesystem junctions on the other hand +are not handled as symlinks, otherwise they would not be recognized as filesystem borders by commands like find -xdev. diff --git a/winsup/doc/specialnames.xml b/winsup/doc/specialnames.xml index 1120f86b1..a1f7401e1 100644 --- a/winsup/doc/specialnames.xml +++ b/winsup/doc/specialnames.xml @@ -37,8 +37,7 @@ is allowed to be a Cygwin symlink either. However, native NTFS symlinks and reparse points are transparent when accessing the above files so all these files as well as -/etc itself may be NTFS symlinks or reparse -points. +/etc itself may be NTFS symlinks. Last but not least, make sure that these files are world-readable. Every process of any user account has to read these files potentially, From ece49e4090564e7ac7b936692e15a78e1a3cb39c Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sun, 5 Apr 2020 16:17:36 +0200 Subject: [PATCH 292/520] Cygwin: symlinks: Allow traversing WSL symlinks Unfortunately Windows doesn't understand WSL symlinks, despite being a really easy job. NT functions trying to access paths traversing WSL symlinks return the status code STATUS_IO_REPARSE_TAG_NOT_HANDLED. Handle this status code same as STATUS_OBJECT_PATH_NOT_FOUND in symlink_info::check to align behaviour to traversing paths with other non-NTFS type symlinks. Signed-off-by: Corinna Vinschen --- winsup/cygwin/path.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index e6dc03ffa..f2b5cdbf1 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -3115,6 +3115,11 @@ restart: /* One of the inner path components is invalid, or the path contains invalid characters. Bail out with ENOENT. + STATUS_IO_REPARSE_TAG_NOT_HANDLED is returned when trying to + traversing a WSL symlink. For all practical purposes it's + equivalent to traversing SYSTEM- or LNK-type symlink returning + STATUS_OBJECT_PATH_NOT_FOUND. + Note that additional STATUS_OBJECT_PATH_INVALID and STATUS_OBJECT_PATH_SYNTAX_BAD status codes exist. The first one is seemingly not generated by NtQueryInformationFile, the latter @@ -3123,6 +3128,7 @@ restart: error in get_nt_native_path. Both status codes are deliberately not tested here unless proved necessary. */ if (status == STATUS_OBJECT_PATH_NOT_FOUND + || status == STATUS_IO_REPARSE_TAG_NOT_HANDLED || status == STATUS_OBJECT_NAME_INVALID || status == STATUS_BAD_NETWORK_PATH || status == STATUS_BAD_NETWORK_NAME From aa4d9603069503207e399b6240d12b46a8df6414 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 7 Apr 2020 14:09:45 +0200 Subject: [PATCH 293/520] Cygwin: threads: use mmap area to fulfill requests for big stacks Otherwise big stacks have a higher probability to collide with randomized PEBs and TEBs after fork. Signed-off-by: Corinna Vinschen --- winsup/cygwin/miscfuncs.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc index 1ed9684f1..e1eb5e8e2 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc @@ -515,11 +515,13 @@ public: BOOL overflow = FALSE; PVOID real_stackaddr = NULL; - /* If an application requests a monster stack, we fulfill this request - from outside of our pool, top down. */ + /* If an application requests a monster stack, fulfill request + from mmap area. */ if (real_size > THREAD_STACK_MAX) - return VirtualAlloc (NULL, real_size, MEM_RESERVE | MEM_TOP_DOWN, - PAGE_READWRITE); + { + PVOID addr = mmap_alloc.alloc (NULL, real_size, false); + return VirtualAlloc (addr, real_size, MEM_RESERVE, PAGE_READWRITE); + } /* Simple round-robin. Keep looping until VirtualAlloc succeeded, or until we overflowed and hit the current address. */ for (UINT_PTR addr = current - real_size; From e8ae404440c7e8e2313b54c8de23831a12b87913 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 7 Apr 2020 13:43:17 +0200 Subject: [PATCH 294/520] Cygwin: threads: lower thread size from pool to 256 Megs Signed-off-by: Corinna Vinschen --- winsup/cygwin/miscfuncs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc index e1eb5e8e2..deb648eff 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc @@ -502,7 +502,7 @@ pthread_wrapper (PVOID arg) /* We provide the stacks always in 1 Megabyte slots */ #define THREAD_STACK_SLOT 0x100000L /* 1 Meg */ /* Maximum stack size returned from the pool. */ -#define THREAD_STACK_MAX 0x20000000L /* 512 Megs */ +#define THREAD_STACK_MAX 0x10000000L /* 256 Megs */ class thread_allocator { From ccb3a40dad106025a32259a369fa5a60f4587695 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 7 Apr 2020 17:40:38 +0200 Subject: [PATCH 295/520] Cygwin: threads: add missing include of mmap_alloc.h This is needed for using mmap_alloc.alloc() Signed-off-by: Corinna Vinschen --- winsup/cygwin/miscfuncs.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc index deb648eff..b4ab7cd7d 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc @@ -16,6 +16,7 @@ details. */ #include "fhandler.h" #include "exception.h" #include "tls_pbuf.h" +#include "mmap_alloc.h" int __reg2 check_invalid_virtual_addr (const void *s, unsigned sz) From e18f7f99cc63520eca72b990cb73952ed22208e6 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 7 Apr 2020 14:13:50 +0200 Subject: [PATCH 296/520] Cygwin: memory: declare extended memory API Windows 10 1803 introduced an extended memory API allowing to specify memory regions allocations are to be taken off. In preparation of using this API, define the struct MEM_EXTENDED_PARAMETER and friends. Declare and allow to autoload the functions VirtualAlloc2 and NtMapViewOfSectionEx. Introduce a wincap flag has_extended_mem_api. Signed-off-by: Corinna Vinschen --- winsup/cygwin/autoload.cc | 3 +++ winsup/cygwin/ntdll.h | 3 +++ winsup/cygwin/wincap.cc | 10 ++++++++ winsup/cygwin/wincap.h | 2 ++ winsup/cygwin/winlean.h | 51 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 69 insertions(+) diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc index 8f2fcc1cd..613a0199c 100644 --- a/winsup/cygwin/autoload.cc +++ b/winsup/cygwin/autoload.cc @@ -597,6 +597,9 @@ LoadDLLfunc (QueryInterruptTime, 4, KernelBase) LoadDLLfunc (QueryInterruptTimePrecise, 4, KernelBase) LoadDLLfunc (QueryUnbiasedInterruptTime, 4, KernelBase) LoadDLLfunc (QueryUnbiasedInterruptTimePrecise, 4, KernelBase) +LoadDLLfunc (VirtualAlloc2, 28, kernelbase) + +LoadDLLfunc (NtMapViewOfSectionEx, 36, ntdll) /* ldap functions are cdecl! */ #pragma push_macro ("mangle") diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h index af1ed5f8d..5c6552751 100644 --- a/winsup/cygwin/ntdll.h +++ b/winsup/cygwin/ntdll.h @@ -1427,6 +1427,9 @@ extern "C" NTSTATUS NTAPI NtMapViewOfSection (HANDLE, HANDLE, PVOID *, ULONG_PTR, SIZE_T, PLARGE_INTEGER, PSIZE_T, SECTION_INHERIT, ULONG, ULONG); + NTSTATUS NTAPI NtMapViewOfSectionEx (HANDLE, HANDLE, PVOID *, PLARGE_INTEGER, + PSIZE_T, ULONG, ULONG, + PMEM_EXTENDED_PARAMETER, ULONG); NTSTATUS NTAPI NtNotifyChangeDirectoryFile (HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID, PIO_STATUS_BLOCK, PFILE_NOTIFY_INFORMATION, ULONG, diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index 922705e65..4d136007f 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -45,6 +45,7 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = { has_con_broken_csi3j:false, has_con_broken_il_dl:false, has_con_esc_rep:false, + has_extended_mem_api:false, }, }; @@ -75,6 +76,7 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = { has_con_broken_csi3j:false, has_con_broken_il_dl:false, has_con_esc_rep:false, + has_extended_mem_api:false, }, }; @@ -105,6 +107,7 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = { has_con_broken_csi3j:false, has_con_broken_il_dl:false, has_con_esc_rep:false, + has_extended_mem_api:false, }, }; @@ -135,6 +138,7 @@ wincaps wincap_8_1 __attribute__((section (".cygwin_dll_common"), shared)) = { has_con_broken_csi3j:false, has_con_broken_il_dl:false, has_con_esc_rep:false, + has_extended_mem_api:false, }, }; @@ -165,6 +169,7 @@ wincaps wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared)) has_con_broken_csi3j:false, has_con_broken_il_dl:false, has_con_esc_rep:false, + has_extended_mem_api:false, }, }; @@ -195,6 +200,7 @@ wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_broken_csi3j:false, has_con_broken_il_dl:false, has_con_esc_rep:false, + has_extended_mem_api:false, }, }; @@ -225,6 +231,7 @@ wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_broken_csi3j:false, has_con_broken_il_dl:false, has_con_esc_rep:false, + has_extended_mem_api:false, }, }; @@ -255,6 +262,7 @@ wincaps wincap_10_1803 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_broken_csi3j:false, has_con_broken_il_dl:false, has_con_esc_rep:false, + has_extended_mem_api:true, }, }; @@ -285,6 +293,7 @@ wincaps wincap_10_1809 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_broken_csi3j:true, has_con_broken_il_dl:false, has_con_esc_rep:false, + has_extended_mem_api:true, }, }; @@ -315,6 +324,7 @@ wincaps wincap_10_1903 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_broken_csi3j:false, has_con_broken_il_dl:true, has_con_esc_rep:true, + has_extended_mem_api:true, }, }; diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h index 6d7a1eae6..cf13de535 100644 --- a/winsup/cygwin/wincap.h +++ b/winsup/cygwin/wincap.h @@ -39,6 +39,7 @@ struct wincaps unsigned has_con_broken_csi3j : 1; unsigned has_con_broken_il_dl : 1; unsigned has_con_esc_rep : 1; + unsigned has_extended_mem_api : 1; }; }; @@ -101,6 +102,7 @@ public: bool IMPLEMENT (has_con_broken_csi3j) bool IMPLEMENT (has_con_broken_il_dl) bool IMPLEMENT (has_con_esc_rep) + bool IMPLEMENT (has_extended_mem_api) void disable_case_sensitive_dirs () { diff --git a/winsup/cygwin/winlean.h b/winsup/cygwin/winlean.h index 9b30b6557..2ee4aaff4 100644 --- a/winsup/cygwin/winlean.h +++ b/winsup/cygwin/winlean.h @@ -94,4 +94,55 @@ details. */ #define GetWindowsDirectoryW dont_use_GetWindowsDirectory #define GetWindowsDirectoryA dont_use_GetWindowsDirectory + +#ifdef __cplusplus +extern "C" { +#endif + +/* Define extended memory API here as long as not available from mingw-w64. */ + +typedef struct _MEM_ADDRESS_REQUIREMENTS +{ + PVOID LowestStartingAddress; + PVOID HighestEndingAddress; + SIZE_T Alignment; +} MEM_ADDRESS_REQUIREMENTS, *PMEM_ADDRESS_REQUIREMENTS; + +typedef enum MEM_EXTENDED_PARAMETER_TYPE +{ + MemExtendedParameterInvalidType = 0, + MemExtendedParameterAddressRequirements, + MemExtendedParameterNumaNode, + MemExtendedParameterPartitionHandle, + MemExtendedParameterUserPhysicalHandle, + MemExtendedParameterAttributeFlags, + MemExtendedParameterMax +} MEM_EXTENDED_PARAMETER_TYPE, *PMEM_EXTENDED_PARAMETER_TYPE; + +#define MEM_EXTENDED_PARAMETER_TYPE_BITS 8 + +typedef struct DECLSPEC_ALIGN(8) MEM_EXTENDED_PARAMETER +{ + struct + { + DWORD64 Type : MEM_EXTENDED_PARAMETER_TYPE_BITS; + DWORD64 Reserved : 64 - MEM_EXTENDED_PARAMETER_TYPE_BITS; + }; + union + { + DWORD64 ULong64; + PVOID Pointer; + SIZE_T Size; + HANDLE Handle; + DWORD ULong; + }; +} MEM_EXTENDED_PARAMETER, *PMEM_EXTENDED_PARAMETER; + +PVOID VirtualAlloc2 (HANDLE, PVOID, SIZE_T, ULONG, ULONG, + PMEM_EXTENDED_PARAMETER, ULONG); + +#ifdef __cplusplus +} +#endif + #endif /*_WINLEAN_H*/ From 8d0a7701aa9e98bda511ba55f5f2dc210722d3e9 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 7 Apr 2020 14:16:09 +0200 Subject: [PATCH 297/520] Cygwin: mmap: use extended memory API if available So far Cygwin was jumping through hoops to restrict memory allocation to specific regions. With the advent of VirtualAlloc2 and MapViewOfFile3 (and it's NT counterpart NtMapViewOfSectionEx), we can skip searching for free space in the specific regions and just call these functions and let the OS do the job more efficiently and less racy. Use the new functions on W10 1803 and later in mmap. Signed-off-by: Corinna Vinschen --- winsup/cygwin/mmap.cc | 84 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 74 insertions(+), 10 deletions(-) diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index 662489c8c..feb9e5d0e 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -188,13 +188,12 @@ CreateMapping (HANDLE fhdl, size_t len, off_t off, DWORD openflags, static void * MapView (HANDLE h, void *addr, size_t len, DWORD openflags, - int prot, int flags, off_t off) + int prot, int flags, off_t off, bool from_fixup_after_fork) { NTSTATUS status; LARGE_INTEGER offset = { QuadPart:off }; DWORD protect = gen_create_protect (openflags, flags); void *base = addr; - SIZE_T commitsize = attached (prot) ? 0 : len; SIZE_T viewsize = len; #ifdef __x86_64__ /* AT_ROUND_TO_PAGE isn't supported on 64 bit systems. */ ULONG alloc_type = MEM_TOP_DOWN; @@ -203,12 +202,51 @@ MapView (HANDLE h, void *addr, size_t len, DWORD openflags, | MEM_TOP_DOWN; #endif +#ifdef __x86_64__ + /* Don't call NtMapViewOfSectionEx during fork. It requires autoloading + a function under loader lock (STATUS_DLL_INIT_FAILED). */ + if (!from_fixup_after_fork && wincap.has_extended_mem_api ()) + { + MEM_ADDRESS_REQUIREMENTS mmap_req = { + (PVOID) MMAP_STORAGE_LOW, + (PVOID) (MMAP_STORAGE_HIGH - 1), + 0 + }; + MEM_EXTENDED_PARAMETER mmap_ext = { + .Type = MemExtendedParameterAddressRequirements, + .Pointer = (PVOID) &mmap_req + }; + + alloc_type |= attached (prot) ? MEM_RESERVE : 0; + status = NtMapViewOfSectionEx (h, NtCurrentProcess (), &base, &offset, + &viewsize, alloc_type, protect, + addr ? NULL : &mmap_ext, addr ? 0 : 1); + if (!NT_SUCCESS (status) && addr && !fixed (flags)) + { + base = NULL; + status = NtMapViewOfSectionEx (h, NtCurrentProcess (), &base, + &offset, &viewsize, alloc_type, + protect, &mmap_ext, 1); + } + if (!NT_SUCCESS (status)) + { + base = NULL; + SetLastError (RtlNtStatusToDosError (status)); + } + debug_printf ("%p (status %p) = NtMapViewOfSectionEx (h:%p, addr:%p, " + "off:%Y, viewsize:%U, alloc_type:%y, protect:%y", + base, status, h, addr, off, viewsize, alloc_type, protect); + return base; + } +#endif + /* Try mapping using the given address first, even if it's NULL. If it failed, and addr was not NULL and flags is not MAP_FIXED, try again with NULL address. Note: Retrying the mapping might be unnecessary, now that mmap64 checks for a valid memory area first. */ + SIZE_T commitsize = attached (prot) ? 0 : len; status = NtMapViewOfSection (h, NtCurrentProcess (), &base, 0, commitsize, &offset, &viewsize, ViewShare, alloc_type, protect); @@ -1051,7 +1089,8 @@ go_ahead: } #ifdef __x86_64__ - addr = mmap_alloc.alloc (addr, orig_len ?: len, fixed (flags)); + if (!wincap.has_extended_mem_api ()) + addr = mmap_alloc.alloc (addr, orig_len ?: len, fixed (flags)); #else if (orig_len) { @@ -1637,9 +1676,33 @@ fhandler_dev_zero::mmap (caddr_t *addr, size_t len, int prot, DWORD protect = gen_protect (prot, flags); DWORD alloc_type = MEM_TOP_DOWN | MEM_RESERVE | (noreserve (flags) ? 0 : MEM_COMMIT); - base = VirtualAlloc (*addr, len, alloc_type, protect); - if (!base && addr && !fixed (flags)) - base = VirtualAlloc (NULL, len, alloc_type, protect); +#ifdef __x86_64__ + if (wincap.has_extended_mem_api ()) + { + MEM_ADDRESS_REQUIREMENTS mmap_req = { + (PVOID) MMAP_STORAGE_LOW, + (PVOID) (MMAP_STORAGE_HIGH - 1), + 0 + }; + MEM_EXTENDED_PARAMETER mmap_ext = { + .Type = MemExtendedParameterAddressRequirements, + .Pointer = (PVOID) &mmap_req + }; + + base = VirtualAlloc2 (GetCurrentProcess(), *addr, len, alloc_type, + protect, *addr ? NULL : &mmap_ext, + *addr ? 0 : 1); + if (!base && addr && !fixed (flags)) + base = VirtualAlloc2 (GetCurrentProcess(), NULL, len, alloc_type, + protect, &mmap_ext, 1); + } + else +#endif + { + base = VirtualAlloc (*addr, len, alloc_type, protect); + if (!base && addr && !fixed (flags)) + base = VirtualAlloc (NULL, len, alloc_type, protect); + } if (!base || (fixed (flags) && base != *addr)) { if (!base) @@ -1664,7 +1727,7 @@ fhandler_dev_zero::mmap (caddr_t *addr, size_t len, int prot, return INVALID_HANDLE_VALUE; } - base = MapView (h, *addr, len, get_access(), prot, flags, off); + base = MapView (h, *addr, len, get_access(), prot, flags, off, false); if (!base || (fixed (flags) && base != *addr)) { if (!base) @@ -1718,7 +1781,7 @@ fhandler_dev_zero::fixup_mmap_after_fork (HANDLE h, int prot, int flags, base = VirtualAlloc (address, size, alloc_type, PAGE_READWRITE); } else - base = MapView (h, address, size, get_access (), prot, flags, offset); + base = MapView (h, address, size, get_access (), prot, flags, offset, true); if (base != address) { MEMORY_BASIC_INFORMATION m; @@ -1744,7 +1807,7 @@ fhandler_disk_file::mmap (caddr_t *addr, size_t len, int prot, return INVALID_HANDLE_VALUE; } - void *base = MapView (h, *addr, len, get_access (), prot, flags, off); + void *base = MapView (h, *addr, len, get_access (), prot, flags, off, false); if (!base || (fixed (flags) && base != *addr)) { if (!base) @@ -1804,7 +1867,8 @@ fhandler_disk_file::fixup_mmap_after_fork (HANDLE h, int prot, int flags, void *address) { /* Re-create the map */ - void *base = MapView (h, address, size, get_access (), prot, flags, offset); + void *base = MapView (h, address, size, get_access (), prot, flags, + offset, true); if (base != address) { MEMORY_BASIC_INFORMATION m; From b8ecbaaac0f9ff9682a310cc78616d421470335e Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 7 Apr 2020 17:41:05 +0200 Subject: [PATCH 298/520] Cygwin: threads: use extended memory API if available So far Cygwin was jumping through hoops to restrict memory allocation to specific regions. With the advent of VirtualAlloc2 and MapViewOfFile3 (and it's NT counterpart NtMapViewOfSectionEx), we can skip searching for free space in the specific regions and just call these functions and let the OS do the job more efficiently and less racy. Use VirtualAlloc2 on W10 1803 and later in thread stack allocation. Signed-off-by: Corinna Vinschen --- winsup/cygwin/miscfuncs.cc | 51 +++++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc index b4ab7cd7d..cba2140b6 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc @@ -508,9 +508,45 @@ pthread_wrapper (PVOID arg) class thread_allocator { UINT_PTR current; -public: - thread_allocator () : current (THREAD_STORAGE_HIGH) {} - PVOID alloc (SIZE_T size) + PVOID (thread_allocator::*alloc_func) (SIZE_T); + PVOID _alloc (SIZE_T size) + { + MEM_ADDRESS_REQUIREMENTS thread_req = { + (PVOID) THREAD_STORAGE_LOW, + (PVOID) (THREAD_STORAGE_HIGH - 1), + THREAD_STACK_SLOT + }; + MEM_EXTENDED_PARAMETER thread_ext = { + .Type = MemExtendedParameterAddressRequirements, + .Pointer = (PVOID) &thread_req + }; + SIZE_T real_size = roundup2 (size, THREAD_STACK_SLOT); + PVOID real_stackaddr = NULL; + + if (real_size <= THREAD_STACK_MAX) + real_stackaddr = VirtualAlloc2 (GetCurrentProcess(), NULL, real_size, + MEM_RESERVE | MEM_TOP_DOWN, + PAGE_READWRITE, &thread_ext, 1); + /* If the thread area allocation failed, or if the application requests a + monster stack, fulfill request from mmap area. */ + if (!real_stackaddr) + { + MEM_ADDRESS_REQUIREMENTS mmap_req = { + (PVOID) MMAP_STORAGE_LOW, + (PVOID) (MMAP_STORAGE_HIGH - 1), + THREAD_STACK_SLOT + }; + MEM_EXTENDED_PARAMETER mmap_ext = { + .Type = MemExtendedParameterAddressRequirements, + .Pointer = (PVOID) &mmap_req + }; + real_stackaddr = VirtualAlloc2 (GetCurrentProcess(), NULL, real_size, + MEM_RESERVE | MEM_TOP_DOWN, + PAGE_READWRITE, &mmap_ext, 1); + } + return real_stackaddr; + } + PVOID _alloc_old (SIZE_T size) { SIZE_T real_size = roundup2 (size, THREAD_STACK_SLOT); BOOL overflow = FALSE; @@ -558,6 +594,15 @@ public: set_errno (EAGAIN); return real_stackaddr; } +public: + thread_allocator () : current (THREAD_STORAGE_HIGH) + { + alloc_func = wincap.has_extended_mem_api () ? &_alloc : &_alloc_old; + } + PVOID alloc (SIZE_T size) + { + return (this->*alloc_func) (size); + } }; thread_allocator thr_alloc NO_COPY; From 3fe9b02ccd6aeb684e39ca3fb9a6fd3ee5ede852 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 7 Apr 2020 14:17:04 +0200 Subject: [PATCH 299/520] Cygwin: mmap_alloc: fix comment to document using the extended memory API Signed-off-by: Corinna Vinschen --- winsup/cygwin/mmap_alloc.cc | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/winsup/cygwin/mmap_alloc.cc b/winsup/cygwin/mmap_alloc.cc index b42bc16e1..cd4d49bc9 100644 --- a/winsup/cygwin/mmap_alloc.cc +++ b/winsup/cygwin/mmap_alloc.cc @@ -4,17 +4,20 @@ #include "mmap_alloc.h" #include -/* FIXME? Unfortunately the OS doesn't support a top down allocation with - a ceiling value. The ZeroBits mechanism only works for - NtMapViewOfSection and it only evaluates the high bit of ZeroBits - on 64 bit, so it's pretty much useless for our purposes. +/* Starting with Windows 10 1803 we use VirtualAlloc2 and MapViewOfFile3 + (or rather NtMapViewOfSectionEx), rather than the below class. + + Up to Windows 10 1709, the OS doesn't support a top down allocation with + a ceiling value. The ZeroBits mechanism only works for NtMapViewOfSection + and it only evaluates the high bit of ZeroBits on 64 bit, so it's pretty + much useless for our purposes. + + If the below simple mechanism to perform top-down allocations turns out to + be too dumb, we need something else. One idea is to divide the space in + (3835) 4 Gig chunks and just store the available free space per slot. Then + we can go top down from slot to slot and only try slots which are supposed + to have enough space. Bookkeeping would be very simple and fast. */ - If the below simple mechanism to perform top-down allocations - turns out to be too dumb, we need something else. One idea is to - dived the space in (3835) 4 Gig chunks and simply store the - available free space per slot. Then we can go top down from slot - to slot and only try slots which are supposed to have enough space. - Bookkeeping would be very simple and fast. */ PVOID mmap_allocator::alloc (PVOID in_addr, SIZE_T in_size, bool fixed) { From 3d1360113d2d917124f9715baa9e2cfb6ad96915 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 7 Apr 2020 18:54:59 +0200 Subject: [PATCH 300/520] Cygwin: utils: override definition of PMEM_EXTENDED_PARAMETER PMEM_EXTENDED_PARAMETER is defined in the local winlean.h as long as mingw-w64 doesn't define it (in winnt.h). ntdll.h needs the definition for declaring NtMapViewOfSectionEx. cygpath.cc and ps.cc both include ntdll.h but not winlean.h, so they complain about the missing definition. Signed-off-by: Corinna Vinschen --- winsup/utils/cygpath.cc | 1 + winsup/utils/ps.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc index ccae98f77..bf77bb2a9 100644 --- a/winsup/utils/cygpath.cc +++ b/winsup/utils/cygpath.cc @@ -24,6 +24,7 @@ details. */ #define _WIN32_WINNT 0x0a00 #define WINVER 0x0a00 #define NOCOMATTRIBUTE +#define PMEM_EXTENDED_PARAMETER PVOID #include #include #include diff --git a/winsup/utils/ps.cc b/winsup/utils/ps.cc index 731f72c18..4d7a56d3d 100644 --- a/winsup/utils/ps.cc +++ b/winsup/utils/ps.cc @@ -6,6 +6,7 @@ This software is a copyrighted work licensed under the terms of the Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */ +#define PMEM_EXTENDED_PARAMETER PVOID #include #include #include From 073edd532910230b992fdd30edd726403aab3854 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Fri, 10 Apr 2020 22:35:28 -0600 Subject: [PATCH 301/520] proc_cpuinfo: Add PPIN support for AMD Newer AMD CPUs support a feature called protected processor identification number (PPIN). This feature can be detected via CPUID_Fn80000008_EBX[23]. --- winsup/cygwin/fhandler_proc.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 03ec621f4..f1bc1c740 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -1262,6 +1262,7 @@ format_proc_cpuinfo (void *, char *&destbuf) /* ftcprint (features1, 14, "ibrs" ); */ /* ind br restricted spec */ /* ftcprint (features1, 15, "stibp"); */ /* 1 thread ind br pred */ /* ftcprint (features1, 17, "stibp_always_on"); */ /* stibp always on */ + ftcprint (features1, 23, "amd_ppin"); /* protected proc id no */ /* ftcprint (features1, 24, "ssbd"); */ /* spec store byp dis */ ftcprint (features1, 25, "virt_ssbd"); /* vir spec store byp dis */ /* ftcprint (features1, 26, "ssb_no"); */ /* ssb fixed in hardware */ From 1fac24078a8c619d015a5e8d951c7d127f7c75f7 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 14 Apr 2020 13:26:37 +0200 Subject: [PATCH 302/520] Cygwin: faq: disable outdated "sshd in domain" faq Signed-off-by: Corinna Vinschen --- winsup/doc/faq-using.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/doc/faq-using.xml b/winsup/doc/faq-using.xml index 4c6d8c76d..c24ecf6c5 100644 --- a/winsup/doc/faq-using.xml +++ b/winsup/doc/faq-using.xml @@ -987,6 +987,7 @@ create symlinks are just not available. + Why does public key authentication with ssh fail after updating to Cygwin 1.7.34 or later? From 5951b3e600f32fd1d96b73f4ccf05d081a5d9428 Mon Sep 17 00:00:00 2001 From: David Macek via Cygwin-patches Date: Thu, 16 Apr 2020 23:09:07 +0200 Subject: [PATCH 303/520] cygheap_pwdgrp: Handle invalid db_* entries correctly If the first scheme in db_* was invalid, the code would think there were no schemes specified and replace the second scheme with NSS_SCHEME_DESC. Signed-off-by: David Macek --- winsup/cygwin/uinfo.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 2d5de359b..57d90189d 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -823,7 +823,10 @@ cygheap_pwdgrp::nss_init_line (const char *line) c, e - c); } else - debug_printf ("Invalid nsswitch.conf content: %s", line); + { + debug_printf ("Invalid nsswitch.conf content: %s", line); + --idx; + } c += strcspn (c, " \t"); c += strspn (c, " \t"); ++idx; From 6b97962073097adb7efe6ac04265df6a8596af21 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 21 Apr 2020 10:31:53 +0200 Subject: [PATCH 304/520] Cygwin: symlinks: fix WSL symlink creation if cygdrive prefix is / If the cygdrive prefix is /, then the following happens right now: $ ln -s /tmp/foo . $ ls -l foo lrwxrwxrwx 1 user group 12 Apr 15 23:44 foo -> /mnt/tmp/foo Fix this by skipping cygdrive prefix conversion to WSL drive prefix "/mnt", if the cygdrive prefix is just "/". There's no satisfying way to do the right thing all the time in this case anyway. For a description and the alternatives, see https://cygwin.com/pipermail/cygwin-developers/2020-April/011859.html Also, fix a typo in a comment. Signed-off-by: Corinna Vinschen --- winsup/cygwin/path.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index f2b5cdbf1..36aa8278f 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1886,15 +1886,17 @@ symlink_wsl (const char *oldpath, path_conv &win32_newpath) rpl->ReparseTag = IO_REPARSE_TAG_LX_SYMLINK; rpl->Reserved = 0; rpl->LxSymlinkReparseBuffer.FileType = 2; - /* Convert cygdrive prefix to "/mnt" for WSL compatibility. */ - if (path_prefix_p (mount_table->cygdrive, oldpath, - mount_table->cygdrive_len, false)) + /* Convert cygdrive prefix to "/mnt" for WSL compatibility, but only if + cygdrive prefix is not "/", otherwise suffer random "/mnt" symlinks... */ + if (mount_table->cygdrive_len > 1 + && path_prefix_p (mount_table->cygdrive, oldpath, + mount_table->cygdrive_len, false)) stpcpy (stpcpy (path_buf, "/mnt"), oldpath + mount_table->cygdrive_len - 1); else *stpncpy (path_buf, oldpath, max_pathlen) = '\0'; /* Convert target path to UTF-16 and then back to UTF-8 to make sure the - WSL symlink is in UTF-8, independet of the current Cygwin codeset. */ + WSL symlink is in UTF-8, independent of the current Cygwin codeset. */ sys_mbstowcs (utf16, NT_MAX_PATH, path_buf); len = WideCharToMultiByte (CP_UTF8, 0, utf16, -1, path_buf, max_pathlen, NULL, NULL); From f47347716ceb3149321f941411e3abaf1b12970f Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 21 Apr 2020 10:38:57 +0200 Subject: [PATCH 305/520] Cygwin: Add David Macek to CONTRIBUTORS Signed-off-by: Corinna Vinschen --- winsup/CONTRIBUTORS | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/CONTRIBUTORS b/winsup/CONTRIBUTORS index 885d18468..b288db28b 100644 --- a/winsup/CONTRIBUTORS +++ b/winsup/CONTRIBUTORS @@ -41,6 +41,7 @@ Daniel Santos daniel.santos@pobox.com Sergejs Lukanihins slukanihin@gmail.com J.H. van de Water houder@xs4all.nl Hans-Bernhard Bröker HBBroeker@t-online.de +David Macek david.macek.0@gmail.com ========================================================================= From d5add9ee5e5e6e5dca97bc6061f427407c006de0 Mon Sep 17 00:00:00 2001 From: David Macek via Cygwin-patches Date: Tue, 21 Apr 2020 20:31:09 +0200 Subject: [PATCH 306/520] Cygwin: accounts: Unify nsswitch.conf db_* defaults Signed-off-by: David Macek --- winsup/cygwin/uinfo.cc | 11 +---------- winsup/doc/ntsec.xml | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 57d90189d..2d5fc488b 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -626,15 +626,12 @@ cygheap_pwdgrp::init () grp_cache.cygserver.init_grp (); grp_cache.file.init_grp (); grp_cache.win.init_grp (); - /* Default settings: + /* Default settings (excluding fallbacks): passwd: files db group: files db db_prefix: auto DISABLED db_separator: + DISABLED - db_home: cygwin desc - db_shell: cygwin desc - db_gecos: cygwin desc db_enum: cache builtin */ pwd_src = (NSS_SRC_FILES | NSS_SRC_DB); @@ -831,12 +828,6 @@ cygheap_pwdgrp::nss_init_line (const char *line) c += strspn (c, " \t"); ++idx; } - /* If nothing has been set, revert to default. */ - if (scheme[0].method == NSS_SCHEME_FALLBACK) - { - scheme[0].method = NSS_SCHEME_CYGWIN; - scheme[1].method = NSS_SCHEME_DESC; - } } } break; diff --git a/winsup/doc/ntsec.xml b/winsup/doc/ntsec.xml index 528784568..a4c253098 100644 --- a/winsup/doc/ntsec.xml +++ b/winsup/doc/ntsec.xml @@ -1507,19 +1507,16 @@ of each schema when used with db_home: -As has been briefly mentioned before, the default setting for -db_home: is +db_home: defines no default schemata. If this setting is not +present in /etc/nsswitch.conf, the aforementioned fallback +takes over, which is equivalent to a /etc/nsswitch.conf +settting of db_home: /home/%U - -So by default, Cygwin just sets the home dir to -/home/$USERNAME. - - @@ -1590,8 +1587,10 @@ when used with db_shell: -As for db_home:, the default setting for -db_shell: is pretty much a constant +db_shell: defines no default schemata. If this setting is +not present in /etc/nsswitch.conf, the aforementioned +fallback takes over, which is equivalent to a +/etc/nsswitch.conf settting of @@ -1664,13 +1663,13 @@ The following list describes the meaning of each schema when used with Fallback If none of the schemes given for db_gecos: - define a non-empty pathname, nothing is added to + define a non-empty string, nothing is added to pw_gecos. -The default setting for db_gecos: is the empty string. +db_gecos: defines no default schemata. From 969c8392fe3122af31c288fb88e3ba1942f881d2 Mon Sep 17 00:00:00 2001 From: David Macek via Cygwin-patches Date: Mon, 20 Apr 2020 19:21:00 +0200 Subject: [PATCH 307/520] Cygwin: accounts: Don't keep old schemes when parsing nsswitch.conf The implicit assumption seemed to be that any subsequent occurence of the same setting in nsswitch.conf is supposed to rewrite the previous ones completely. This was not the case if the third or any further schema was previously defined and the last line defined less than that (but at least 2), for example: ``` db_home: windows cygwin /myhome/%U db_home: cygwin desc ``` Let's document this behavior as well. Signed-off-by: David Macek --- winsup/cygwin/uinfo.cc | 7 +++---- winsup/doc/ntsec.xml | 5 +++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 2d5fc488b..b733a6ee8 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -790,12 +790,12 @@ cygheap_pwdgrp::nss_init_line (const char *line) scheme = gecos_scheme; if (scheme) { - uint16_t idx = 0; + for (uint16_t idx = 0; idx < NSS_SCHEME_MAX; ++idx) + scheme[idx].method = NSS_SCHEME_FALLBACK; - scheme[0].method = scheme[1].method = NSS_SCHEME_FALLBACK; c = strchr (c, ':') + 1; c += strspn (c, " \t"); - while (*c && idx < NSS_SCHEME_MAX) + for (uint16_t idx = 0; *c && idx < NSS_SCHEME_MAX; ++idx) { if (NSS_CMP ("windows")) scheme[idx].method = NSS_SCHEME_WINDOWS; @@ -826,7 +826,6 @@ cygheap_pwdgrp::nss_init_line (const char *line) } c += strcspn (c, " \t"); c += strspn (c, " \t"); - ++idx; } } } diff --git a/winsup/doc/ntsec.xml b/winsup/doc/ntsec.xml index a4c253098..08a33bdc6 100644 --- a/winsup/doc/ntsec.xml +++ b/winsup/doc/ntsec.xml @@ -918,6 +918,11 @@ Apart from this restriction, the remainder of the line can have as many spaces and TABs as you like. + +When the same keyword occurs multiple times, the last one wins, as if the +previous ones were ignored. + + The <literal>passwd:</literal> and <literal>group:</literal> settings From 8a0bdd84b86e4c8c75a134fca05976e9494fef3f Mon Sep 17 00:00:00 2001 From: David Macek via Cygwin-patches Date: Mon, 20 Apr 2020 19:21:15 +0200 Subject: [PATCH 308/520] Cygwin: accounts: Report unrecognized db_* nsswitch.conf keywords Signed-off-by: David Macek --- winsup/cygwin/uinfo.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index b733a6ee8..e105248c2 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -828,6 +828,8 @@ cygheap_pwdgrp::nss_init_line (const char *line) c += strspn (c, " \t"); } } + else + debug_printf ("Invalid nsswitch.conf content: %s", line); } break; case '\0': From 5a7e130c31dfdf78f2e1b30dd6ec39a842be1336 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 24 Apr 2020 16:14:43 +0200 Subject: [PATCH 309/520] Cygwin: file I/O: make sure to treat write return value as ssize_t The return type of fhandler write methods is ssize_t. Don't use an int to store the return value, use ssize_t. Use ptrdiff_t for the buffer size. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index d754077b1..9d6271b3d 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -949,9 +949,9 @@ fhandler_base::write (const void *ptr, size_t len) } /* We've got a buffer-full, or we're out of data. Write it out */ - int nbytes; - int want = buf_ptr - buf; - if ((nbytes = raw_write (buf, want)) == want) + ssize_t nbytes; + ptrdiff_t want = buf_ptr - buf; + if ((nbytes = raw_write (buf, (size_t) want)) == want) { /* Keep track of how much written not counting additional \r's */ res = data - (char *)ptr; From b8349218955ffbb2b573a2de8efac61a800f4eb0 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 24 Apr 2020 16:19:09 +0200 Subject: [PATCH 310/520] Cygwin: raw disk I/O: Fix return value in error case The cast to generate the return value uses a DWORD variable as test and set value. The error case is the constant -1. Given the type of the other half of the conditioal expression, -1 is cast to DWORD as well. On 64 bit, this results in the error case returning a 32 bit -1 value which is equivalent to (ssize_t) 4294967295 rather than (ssize_t) -1. Add a fixing cast. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_floppy.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/fhandler_floppy.cc b/winsup/cygwin/fhandler_floppy.cc index f2e15d703..778d6ef98 100644 --- a/winsup/cygwin/fhandler_floppy.cc +++ b/winsup/cygwin/fhandler_floppy.cc @@ -619,12 +619,12 @@ fhandler_dev_floppy::raw_write (const void *ptr, size_t len) devbufend = bytes_per_sector; } } - return bytes_written; + return (ssize_t) bytes_written; } /* In O_DIRECT case, just write. */ if (write_file (p, len, &bytes_written, &ret)) - return bytes_written; + return (ssize_t) bytes_written; err: if (IS_EOM (ret)) @@ -635,7 +635,8 @@ err: } else if (!bytes_written) __seterrno (); - return bytes_written ?: -1; + /* Cast is required, otherwise the error return value is (DWORD)-1. */ + return (ssize_t) bytes_written ?: -1; } off_t From 39a1c3c96f0ac58f27a8db859228868342d05fed Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 24 Apr 2020 16:22:26 +0200 Subject: [PATCH 311/520] Cygwin: raw disk I/O: lock floppys as well The workaround to access the full disk required since Vista and described in http://support.microsoft.com/kb/942448 (NOT ACCESSIBLE at the time of writing this commit message) is required on floppy drives as well. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_floppy.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_floppy.cc b/winsup/cygwin/fhandler_floppy.cc index 778d6ef98..2768a9cbf 100644 --- a/winsup/cygwin/fhandler_floppy.cc +++ b/winsup/cygwin/fhandler_floppy.cc @@ -161,7 +161,8 @@ fhandler_dev_floppy::lock_partition (DWORD to_write) If there's some file handle open on one of the affected partitions, this fails, but that's how it works... The high partition major numbers don't have a partition 0. */ - if (get_major () >= DEV_SD_HIGHPART_START || get_minor () % 16 != 0) + if (get_major () == DEV_FLOPPY_MAJOR + || get_major () >= DEV_SD_HIGHPART_START || get_minor () % 16 != 0) { if (!DeviceIoControl (get_handle (), FSCTL_LOCK_VOLUME, NULL, 0, NULL, 0, &bytes_read, NULL)) @@ -302,7 +303,6 @@ fhandler_dev_floppy::write_file (const void *buf, DWORD to_write, See http://support.microsoft.com/kb/942448 for details. What we do here is to lock the affected partition(s) and retry. */ if (*err == ERROR_ACCESS_DENIED - && get_major () != DEV_FLOPPY_MAJOR && get_major () != DEV_CDROM_MAJOR && (get_flags () & O_ACCMODE) != O_RDONLY && lock_partition (to_write)) From d94763fc2e506d81793130569f166b1a14ac31f3 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 24 Apr 2020 16:39:37 +0200 Subject: [PATCH 312/520] Cygwin: add release message for fixed floppy bugs Signed-off-by: Corinna Vinschen --- winsup/cygwin/release/3.1.5 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/winsup/cygwin/release/3.1.5 b/winsup/cygwin/release/3.1.5 index c1d1cd89d..488a0e1a5 100644 --- a/winsup/cygwin/release/3.1.5 +++ b/winsup/cygwin/release/3.1.5 @@ -18,3 +18,7 @@ Bug Fixes: - Fix TIOCINQ to always return number of inbound chars if available. Addresses: https://cygwin.com/ml/cygwin/2020-02/msg00258.html + +- Fix error handling in raw disk writes and allow full disk writes + including necessary locking on floppies as well. + Addresses: https://cygwin.com/pipermail/cygwin/2020-April/244610.html From f2e06d8af5f390d81b64375a69ca834ca19d6029 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 27 Apr 2020 11:13:05 +0200 Subject: [PATCH 313/520] Cygwin: localtime.cc: reformat for easier patching Signed-off-by: Corinna Vinschen --- winsup/cygwin/localtime.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc index 010376637..40054e332 100644 --- a/winsup/cygwin/localtime.cc +++ b/winsup/cygwin/localtime.cc @@ -1,17 +1,17 @@ /* $NetBSD: localtime.c,v 1.72 2012/10/28 19:02:29 christos Exp $ */ -/* Don't reformat the code arbitrarily. - - It uses in wide parts the exact formatting as the upstream NetBSD - versions. The purpose is to simplify subsequent diffs to the NetBSD - version, should the need arise again at one point. */ - /* ** This file is in the public domain, so clarified as of ** 1996-06-05 by Arthur David Olson. */ /* Temporarily merged private.h and tzfile.h for ease of management - DJ */ +/* Don't reformat the code arbitrarily. + + It uses in wide parts the exact formatting as the upstream NetBSD + versions. The purpose is to simplify subsequent diffs to the NetBSD + version, should the need arise again at one point. */ + #include "winsup.h" #include "cygerrno.h" #include "sync.h" @@ -437,8 +437,6 @@ struct __state { struct lsinfo lsis[TZ_MAX_LEAPS]; }; -typedef struct __state *timezone_t; - struct rule { int r_type; /* type of rule--see below */ int r_day; /* day number of rule */ @@ -451,6 +449,10 @@ struct rule { #define DAY_OF_YEAR 1 /* n - day of year */ #define MONTH_NTH_DAY_OF_WEEK 2 /* Mm.n.d - month, week, day of week */ +#ifdef __CYGWIN__ +typedef struct __state *timezone_t; +#endif + typedef struct tm *(*subfun_t)(const timezone_t sp, const time_t *timep, long offset, struct tm *tmp); From 76d4d40b8b23d046473a5946cf6b83faa36ae7be Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 27 Apr 2020 11:21:00 +0200 Subject: [PATCH 314/520] localtime 1.73 --- winsup/cygwin/localtime.cc | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc index 40054e332..da446f101 100644 --- a/winsup/cygwin/localtime.cc +++ b/winsup/cygwin/localtime.cc @@ -1,4 +1,4 @@ -/* $NetBSD: localtime.c,v 1.72 2012/10/28 19:02:29 christos Exp $ */ +/* $NetBSD: localtime.c,v 1.73 2013/03/02 21:24:28 christos Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -607,8 +607,7 @@ settzname (void) for (i = 0; i < sp->typecnt; ++i) { const struct ttinfo * const ttisp = &sp->ttis[i]; - tzname[ttisp->tt_isdst] = - &sp->chars[ttisp->tt_abbrind]; + tzname[ttisp->tt_isdst] = &sp->chars[ttisp->tt_abbrind]; #ifdef USG_COMPAT if (ttisp->tt_isdst) daylight = 1; @@ -816,20 +815,31 @@ tzload(timezone_t sp, const char *name, const int doextend) ** signed time_t system but using a data file with ** unsigned values (or vice versa). */ - for (i = 0; i < sp->timecnt - 2; ++i) - if (sp->ats[i] > sp->ats[i + 1]) { - ++i; + for (i = 0; i < sp->timecnt; ++i) + if ((i < sp->timecnt - 1 && + sp->ats[i] > sp->ats[i + 1]) || + (i == sp->timecnt - 1 && !TYPE_SIGNED(time_t) && + sp->ats[i] > + ((stored == 4) ? INT32_MAX : INT64_MAX))) { if (TYPE_SIGNED(time_t)) { /* ** Ignore the end (easy). */ - sp->timecnt = i; + sp->timecnt = i + 1; } else { /* ** Ignore the beginning (harder). */ int j; + /* + ** Keep the record right before the + ** epoch boundary, + ** but tweak it so that it starts + ** right with the epoch + ** (thanks to Doug Bailey). + */ + sp->ats[i] = 0; for (j = 0; j + i < sp->timecnt; ++j) { sp->ats[j] = sp->ats[j + i]; sp->types[j] = sp->types[j + i]; From 3f0c2ac96e7c493bbfc2bc1b0c1274445b756a9d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 28 Apr 2020 20:50:57 +0200 Subject: [PATCH 315/520] localtime 1.74 --- winsup/cygwin/localtime.cc | 221 ++++++++++++++++++++++--------------- 1 file changed, 133 insertions(+), 88 deletions(-) diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc index da446f101..a2749654e 100644 --- a/winsup/cygwin/localtime.cc +++ b/winsup/cygwin/localtime.cc @@ -1,4 +1,4 @@ -/* $NetBSD: localtime.c,v 1.73 2013/03/02 21:24:28 christos Exp $ */ +/* $NetBSD: localtime.c,v 1.74 2013/07/17 20:13:04 christos Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -75,11 +75,11 @@ static char privatehid[] = "@(#)private.h 7.48"; /* Unlike 's isdigit, this also works if c < 0 | c > UCHAR_MAX. */ #define is_digit(c) ((unsigned)(c) - '0' <= 9) -#ifndef __pure +#ifndef ATTRIBUTE_PURE #if 2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__) -# define __pure __attribute__ ((__pure__)) +# define ATTRIBUTE_PURE __attribute__ ((__pure__)) #else -# define __pure /* empty */ +# define ATTRIBUTE_PURE /* empty */ #endif #endif @@ -401,7 +401,7 @@ static const char gmt[] = "GMT"; #endif /* !defined TZDEFDST */ struct ttinfo { /* time type information */ - long tt_gmtoff; /* UTC offset in seconds */ + int_fast32_t tt_gmtoff; /* UTC offset in seconds */ int tt_isdst; /* used to set tm_isdst */ int tt_abbrind; /* abbreviation list index */ int tt_ttisstd; /* TRUE if transition is std time */ @@ -410,7 +410,7 @@ struct ttinfo { /* time type information */ struct lsinfo { /* leap second information */ time_t ls_trans; /* transition time */ - long ls_corr; /* correction to apply */ + int_fast64_t ls_corr; /* correction to apply */ }; #define BIGGEST(a, b) (((a) > (b)) ? (a) : (b)) @@ -435,6 +435,7 @@ struct __state { char chars[/*CONSTCOND*/BIGGEST(BIGGEST(TZ_MAX_CHARS + 1, sizeof gmt), (2 * (MY_TZNAME_MAX + 1)))]; struct lsinfo lsis[TZ_MAX_LEAPS]; + int defaulttype; /* for early times or if no transitions */ }; struct rule { @@ -442,7 +443,7 @@ struct rule { int r_day; /* day number of rule */ int r_week; /* week number of rule */ int r_mon; /* month number of rule */ - long r_time; /* transition time of rule */ + int_fast32_t r_time; /* transition time of rule */ }; #define JULIAN_DAY 0 /* Jn - Julian day */ @@ -454,49 +455,50 @@ typedef struct __state *timezone_t; #endif typedef struct tm *(*subfun_t)(const timezone_t sp, const time_t *timep, - long offset, struct tm *tmp); + const int_fast32_t offset, struct tm *tmp); /* ** Prototypes for static functions. */ -static long detzcode(const char * codep); +static int_fast32_t detzcode(const char * codep); static time_t detzcode64(const char * codep); static int differ_by_repeat(time_t t1, time_t t0); -static const char * getzname(const char * strp) __pure; -static const char * getqzname(const char * strp, const int delim) __pure; +static const char * getzname(const char * strp) ATTRIBUTE_PURE; +static const char * getqzname(const char * strp, const int delim) ATTRIBUTE_PURE; static const char * getnum(const char * strp, int * nump, int min, int max); -static const char * getsecs(const char * strp, long * secsp); -static const char * getoffset(const char * strp, long * offsetp); +static const char * getsecs(const char * strp, int_fast32_t * secsp); +static const char * getoffset(const char * strp, int_fast32_t * offsetp); static const char * getrule(const char * strp, struct rule * rulep); static void gmtload(timezone_t sp); static struct tm * gmtsub(const timezone_t sp, const time_t *timep, - long offset, struct tm * tmp); + const int_fast32_t offset, struct tm * tmp); static struct tm * localsub(const timezone_t sp, const time_t *timep, - long offset, struct tm *tmp); + const int_fast32_t offset, struct tm *tmp); static int increment_overflow(int * number, int delta); -static int leaps_thru_end_of(int y) __pure; -static int long_increment_overflow(long * number, int delta); -static int long_normalize_overflow(long * tensptr, +static int leaps_thru_end_of(int y) ATTRIBUTE_PURE; +static int increment_overflow32(int_fast32_t * number, int delta); +static int normalize_overflow32(int_fast32_t * tensptr, int * unitsptr, int base); static int normalize_overflow(int * tensptr, int * unitsptr, int base); static void settzname(void); static time_t time1(const timezone_t sp, struct tm * const tmp, - subfun_t funcp, const long offset); + subfun_t funcp, const int_fast32_t offset); static time_t time2(const timezone_t sp, struct tm * const tmp, subfun_t funcp, - const long offset, int *const okayp); + const int_fast32_t offset, int *const okayp); static time_t time2sub(const timezone_t sp, struct tm * const tmp, - subfun_t funcp, const long offset, + subfun_t funcp, const int_fast32_t offset, int *const okayp, const int do_norm_secs); static struct tm * timesub(const timezone_t sp, const time_t * timep, - long offset, struct tm * tmp); + const int_fast32_t offset, struct tm * tmp); static int tmcomp(const struct tm * atmp, const struct tm * btmp); static time_t transtime(time_t janfirst, int year, - const struct rule * rulep, long offset) __pure; + const struct rule * rulep, + const int_fast32_t offset) ATTRIBUTE_PURE; static int typesequiv(const timezone_t sp, int a, int b); static int tzload(timezone_t sp, const char * name, int doextend); @@ -507,7 +509,7 @@ extern "C" void tzset_unlocked(void); #else static void tzset_unlocked(void); #endif -static long leapcorr(const timezone_t sp, time_t * timep); +static int_fast64_t leapcorr(const timezone_t sp, time_t * timep); static timezone_t lclptr; static timezone_t gmtptr; @@ -561,13 +563,13 @@ int daylight; time_t altzone = 0; #endif /* defined ALTZONE */ -static long +static int_fast32_t detzcode(const char *const codep) { - long result; + int_fast32_t result; int i; - result = (codep[0] & 0x80) ? ~0L : 0; + result = (codep[0] & 0x80) ? -1 : 0; for (i = 0; i < 4; ++i) result = (result << 8) | (codep[i] & 0xff); return result; @@ -915,6 +917,40 @@ tzload(timezone_t sp, const char *name, const int doextend) break; } } + /* + ** If type 0 is is unused in transitions, + ** it's the type to use for early times. + */ + for (i = 0; i < sp->typecnt; ++i) + if (sp->types[i] == 0) + break; + i = (i >= sp->typecnt) ? 0 : -1; + /* + ** Absent the above, + ** if there are transition times + ** and the first transition is to a daylight time + ** find the standard type less than and closest to + ** the type of the first transition. + */ + if (i < 0 && sp->timecnt > 0 && sp->ttis[sp->types[0]].tt_isdst) { + i = sp->types[0]; + while (--i >= 0) + if (!sp->ttis[i].tt_isdst) + break; + } + /* + ** If no result yet, find the first standard type. + ** If there is none, punt to type zero. + */ + if (i < 0) { + i = 0; + while (sp->ttis[i].tt_isdst) + if (++i >= sp->typecnt) { + i = 0; + break; + } + } + sp->defaulttype = i; free(up); /* ** Get latest zone offsets into tzinfo (for newlib). . . @@ -1045,7 +1081,7 @@ getnum(const char *strp, int *const nump, const int min, const int max) */ static const char * -getsecs(const char *strp, long *const secsp) +getsecs(const char *strp, int_fast32_t *const secsp) { int num; @@ -1058,7 +1094,7 @@ getsecs(const char *strp, long *const secsp) strp = getnum(strp, &num, 0, HOURSPERDAY * DAYSPERWEEK - 1); if (strp == NULL) return NULL; - *secsp = num * (long) SECSPERHOUR; + *secsp = num * (int_fast32_t) SECSPERHOUR; if (*strp == ':') { ++strp; strp = getnum(strp, &num, 0, MINSPERHOUR - 1); @@ -1085,7 +1121,7 @@ getsecs(const char *strp, long *const secsp) */ static const char * -getoffset(const char *strp, long *const offsetp) +getoffset(const char *strp, int_fast32_t *const offsetp) { int neg = 0; @@ -1163,7 +1199,7 @@ getrule(const char *strp, struct rule *const rulep) static time_t transtime(const time_t janfirst, const int year, const struct rule *const rulep, - const long offset) + const int_fast32_t offset) { int leapyear; time_t value; @@ -1256,14 +1292,14 @@ transtime(const time_t janfirst, const int year, const struct rule *const rulep, static int tzparse(timezone_t sp, const char *name, const int lastditch) { - const char * stdname; - const char * dstname; - size_t stdlen; - size_t dstlen; - long stdoffset; - long dstoffset; + const char * stdname; + const char * dstname; + size_t stdlen; + size_t dstlen; + int_fast32_t stdoffset; + int_fast32_t dstoffset; time_t * atp; - unsigned char * typep; + unsigned char * typep; char * cp; int load_result; @@ -1388,12 +1424,12 @@ tzparse(timezone_t sp, const char *name, const int lastditch) = -sp->ttis[0].tt_gmtoff; } } else { - long theirstdoffset; - long theirdstoffset; - long theiroffset; - int isdst; - int i; - int j; + int_fast32_t theirstdoffset; + int_fast32_t theirdstoffset; + int_fast32_t theiroffset; + int isdst; + int i; + int j; if (*name != '\0') return -1; @@ -1706,7 +1742,7 @@ tzset(void) /*ARGSUSED*/ static struct tm * -localsub(const timezone_t sp, const time_t * const timep, const long offset, +localsub(const timezone_t sp, const time_t * const timep, const int_fast32_t offset, struct tm *const tmp) { const struct ttinfo * ttisp; @@ -1755,12 +1791,7 @@ localsub(const timezone_t sp, const time_t * const timep, const long offset, return result; } if (sp->timecnt == 0 || t < sp->ats[0]) { - i = 0; - while (sp->ttis[i].tt_isdst) - if (++i >= sp->typecnt) { - i = 0; - break; - } + i = sp->defaulttype; } else { int lo = 1; int hi = sp->timecnt; @@ -1819,8 +1850,8 @@ localtime(const time_t *const timep) static NO_COPY muto gmt_guard; static struct tm * -gmtsub(const timezone_t sp, const time_t *const timep, const long offset, - struct tm *tmp) +gmtsub(const timezone_t sp, const time_t *const timep, + const int_fast32_t offset, struct tm *const tmp) { struct tm * result; @@ -1857,7 +1888,7 @@ gmtsub(const timezone_t sp, const time_t *const timep, const long offset, extern "C" struct tm * gmtime(const time_t *const timep) { - struct tm *tmp = gmtsub(NULL, timep, 0L, &tm); + struct tm *tmp = gmtsub(NULL, timep, 0, &tm); if (tmp == NULL) errno = EOVERFLOW; @@ -1872,7 +1903,7 @@ gmtime(const time_t *const timep) extern "C" struct tm * gmtime_r(const time_t *__restrict const timep, struct tm *__restrict tmp) { - tmp = gmtsub(NULL, timep, 0L, tmp); + tmp = gmtsub(NULL, timep, 0, tmp); if (tmp == NULL) errno = EOVERFLOW; @@ -1885,7 +1916,14 @@ gmtime_r(const time_t *__restrict const timep, struct tm *__restrict tmp) extern "C" struct tm * offtime(const time_t *const timep, long offset) { - struct tm *tmp = gmtsub(NULL, timep, offset, &tm); + struct tm *tmp; + + if ((offset > 0 && offset > INT_FAST32_MAX) || + (offset < 0 && offset > INT_FAST32_MIN)) { + errno = EOVERFLOW; + return NULL; + } + tmp = gmtsub(NULL, timep, (int_fast32_t)offset, &tm); if (tmp == NULL) errno = EOVERFLOW; @@ -1908,16 +1946,16 @@ leaps_thru_end_of(const int y) } static struct tm * -timesub(const timezone_t sp, const time_t *const timep, const long offset, - struct tm *const tmp) +timesub(const timezone_t sp, const time_t *const timep, + const int_fast32_t offset, struct tm *const tmp) { const struct lsinfo * lp; time_t tdays; int idays; /* unsigned would be so 2003 */ - long rem; + int_fast64_t rem; int y; const int * ip; - long corr; + int_fast64_t corr; int hit; int i; @@ -1946,7 +1984,7 @@ timesub(const timezone_t sp, const time_t *const timep, const long offset, } y = EPOCH_YEAR; tdays = (time_t)(*timep / SECSPERDAY); - rem = (long) (*timep - tdays * SECSPERDAY); + rem = (int_fast64_t) (*timep - tdays * SECSPERDAY); while (tdays < 0 || tdays >= year_lengths[isleap(y)]) { int newy; time_t tdelta; @@ -1969,11 +2007,12 @@ timesub(const timezone_t sp, const time_t *const timep, const long offset, y = newy; } { - long seconds; + int_fast32_t seconds; + const time_t half_second = 0.5; - seconds = tdays * SECSPERDAY + 0.5; + seconds = (int_fast32_t)(tdays * SECSPERDAY + half_second); tdays = (time_t)(seconds / SECSPERDAY); - rem += (long) (seconds - tdays * SECSPERDAY); + rem += (int_fast64_t)(seconds - tdays * SECSPERDAY); } /* ** Given the range, we can now fearlessly cast... @@ -2095,11 +2134,11 @@ increment_overflow(int *const ip, int j) } static int -long_increment_overflow(long *const lp, int m) +increment_overflow32(int_fast32_t *const lp, int const m) { - long l = *lp; + int_fast32_t l = *lp; - if ((l >= 0) ? (m > LONG_MAX - l) : (m < LONG_MIN - l)) + if ((l >= 0) ? (m > INT_FAST32_MAX - l) : (m < INT_FAST32_MIN - l)) return TRUE; *lp += m; return FALSE; @@ -2118,7 +2157,7 @@ normalize_overflow(int *const tensptr, int *const unitsptr, const int base) } static int -long_normalize_overflow(long *const tensptr, int *const unitsptr, +normalize_overflow32(int_fast32_t *const tensptr, int *const unitsptr, const int base) { int tensdelta; @@ -2127,7 +2166,7 @@ long_normalize_overflow(long *const tensptr, int *const unitsptr, (*unitsptr / base) : (-1 - (-1 - *unitsptr) / base); *unitsptr -= tensdelta * base; - return long_increment_overflow(tensptr, tensdelta); + return increment_overflow32(tensptr, tensdelta); } static int @@ -2146,21 +2185,21 @@ tmcomp(const struct tm *const atmp, const struct tm *const btmp) static time_t time2sub(const timezone_t sp, struct tm *const tmp, subfun_t funcp, - const long offset, int *const okayp, const int do_norm_secs) + const int_fast32_t offset, int *const okayp, const int do_norm_secs) { int dir; int i, j; int saved_seconds; - long li; + int_fast32_t li; time_t lo; time_t hi; #ifdef NO_ERROR_IN_DST_GAP time_t ilo; #endif - long y; - time_t newt; - time_t t; - struct tm yourtm, mytm; + int_fast32_t y; + time_t newt; + time_t t; + struct tm yourtm, mytm; *okayp = FALSE; yourtm = *tmp; @@ -2177,16 +2216,16 @@ again: if (normalize_overflow(&yourtm.tm_mday, &yourtm.tm_hour, HOURSPERDAY)) goto overflow; y = yourtm.tm_year; - if (long_normalize_overflow(&y, &yourtm.tm_mon, MONSPERYEAR)) + if (normalize_overflow32(&y, &yourtm.tm_mon, MONSPERYEAR)) goto overflow; /* ** Turn y into an actual year number for now. ** It is converted back to an offset from TM_YEAR_BASE later. */ - if (long_increment_overflow(&y, TM_YEAR_BASE)) + if (increment_overflow32(&y, TM_YEAR_BASE)) goto overflow; while (yourtm.tm_mday <= 0) { - if (long_increment_overflow(&y, -1)) + if (increment_overflow32(&y, -1)) goto overflow; li = y + (1 < yourtm.tm_mon); yourtm.tm_mday += year_lengths[isleap(li)]; @@ -2194,7 +2233,7 @@ again: while (yourtm.tm_mday > DAYSPERLYEAR) { li = y + (1 < yourtm.tm_mon); yourtm.tm_mday -= year_lengths[isleap(li)]; - if (long_increment_overflow(&y, 1)) + if (increment_overflow32(&y, 1)) goto overflow; } for ( ; ; ) { @@ -2204,11 +2243,11 @@ again: yourtm.tm_mday -= i; if (++yourtm.tm_mon >= MONSPERYEAR) { yourtm.tm_mon = 0; - if (long_increment_overflow(&y, 1)) + if (increment_overflow32(&y, 1)) goto overflow; } } - if (long_increment_overflow(&y, -TM_YEAR_BASE)) + if (increment_overflow32(&y, -TM_YEAR_BASE)) goto overflow; yourtm.tm_year = (int)y; if (yourtm.tm_year != y) @@ -2352,7 +2391,7 @@ invalid: static time_t time2(const timezone_t sp, struct tm *const tmp, subfun_t funcp, - const long offset, int *const okayp) + const int_fast32_t offset, int *const okayp) { time_t t; @@ -2367,7 +2406,7 @@ time2(const timezone_t sp, struct tm *const tmp, subfun_t funcp, static time_t time1(const timezone_t sp, struct tm *const tmp, subfun_t funcp, - const long offset) + const int_fast32_t offset) { time_t t; int samei, otheri; @@ -2468,18 +2507,23 @@ timegm(struct tm *const tmp) if (tmp != NULL) tmp->tm_isdst = 0; - t = time1(gmtptr, tmp, gmtsub, 0L); + t = time1(gmtptr, tmp, gmtsub, 0); return t; } extern "C" time_t -timeoff(struct tm *const tmp, const long offset) +timeoff(struct tm *const tmp, long offset) { time_t t; + if ((offset > 0 && offset > INT_FAST32_MAX) || + (offset < 0 && offset > INT_FAST32_MIN)) { + errno = EOVERFLOW; + return -1; + } if (tmp != NULL) tmp->tm_isdst = 0; - t = time1(gmtptr, tmp, gmtsub, offset); + t = time1(gmtptr, tmp, gmtsub, (int_fast32_t)offset); return t; } @@ -2492,7 +2536,8 @@ timeoff(struct tm *const tmp, const long offset) ** previous versions of the CMUCS runtime library. */ -extern "C" long +extern "C" +int_fast32_t gtime(struct tm *const tmp) { const time_t t = mktime(tmp); @@ -2518,7 +2563,7 @@ gtime(struct tm *const tmp) ** when exchanging timestamps with POSIX conforming systems. */ -static long +static int_fast64_t leapcorr(const timezone_t sp, time_t *timep) { struct lsinfo * lp; From 65bf580752db7ac01ecae19dc56aa26ea34f5e47 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 28 Apr 2020 20:56:16 +0200 Subject: [PATCH 316/520] localtime 1.75 --- winsup/cygwin/localtime.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc index a2749654e..3de1e2956 100644 --- a/winsup/cygwin/localtime.cc +++ b/winsup/cygwin/localtime.cc @@ -1,4 +1,4 @@ -/* $NetBSD: localtime.c,v 1.74 2013/07/17 20:13:04 christos Exp $ */ +/* $NetBSD: localtime.c,v 1.75 2013/07/17 23:09:26 christos Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -82,6 +82,11 @@ static char privatehid[] = "@(#)private.h 7.48"; # define ATTRIBUTE_PURE /* empty */ #endif #endif +#if 0 +static char elsieid[] = "@(#)localtime.cc 8.17"; +#else +__RCSID("$NetBSD: localtime.c,v 1.75 2013/07/17 23:09:26 christos Exp $"); +#endif /* ** Finally, some convenience items. @@ -1919,7 +1924,7 @@ offtime(const time_t *const timep, long offset) struct tm *tmp; if ((offset > 0 && offset > INT_FAST32_MAX) || - (offset < 0 && offset > INT_FAST32_MIN)) { + (offset < 0 && offset < INT_FAST32_MIN)) { errno = EOVERFLOW; return NULL; } @@ -2517,7 +2522,7 @@ timeoff(struct tm *const tmp, long offset) time_t t; if ((offset > 0 && offset > INT_FAST32_MAX) || - (offset < 0 && offset > INT_FAST32_MIN)) { + (offset < 0 && offset < INT_FAST32_MIN)) { errno = EOVERFLOW; return -1; } From 0f4bda879283eaf013f86dd80e5588721a811ea0 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 28 Apr 2020 20:57:34 +0200 Subject: [PATCH 317/520] localtime 1.76 --- winsup/cygwin/localtime.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc index 3de1e2956..2c8cee38d 100644 --- a/winsup/cygwin/localtime.cc +++ b/winsup/cygwin/localtime.cc @@ -482,12 +482,12 @@ static struct tm * gmtsub(const timezone_t sp, const time_t *timep, static struct tm * localsub(const timezone_t sp, const time_t *timep, const int_fast32_t offset, struct tm *tmp); static int increment_overflow(int * number, int delta); -static int leaps_thru_end_of(int y) ATTRIBUTE_PURE; static int increment_overflow32(int_fast32_t * number, int delta); -static int normalize_overflow32(int_fast32_t * tensptr, - int * unitsptr, int base); +static int leaps_thru_end_of(int y) ATTRIBUTE_PURE; static int normalize_overflow(int * tensptr, int * unitsptr, int base); +static int normalize_overflow32(int_fast32_t * tensptr, + int * unitsptr, int base); static void settzname(void); static time_t time1(const timezone_t sp, struct tm * const tmp, subfun_t funcp, const int_fast32_t offset); From b8aa5f7a0fe70a9a53fe4019227271a78758ae67 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 28 Apr 2020 20:58:29 +0200 Subject: [PATCH 318/520] localtime 1.77 --- winsup/cygwin/localtime.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc index 2c8cee38d..d3d629618 100644 --- a/winsup/cygwin/localtime.cc +++ b/winsup/cygwin/localtime.cc @@ -1,4 +1,4 @@ -/* $NetBSD: localtime.c,v 1.75 2013/07/17 23:09:26 christos Exp $ */ +/* $NetBSD: localtime.c,v 1.77 2013/07/30 15:30:37 joerg Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -85,7 +85,7 @@ static char privatehid[] = "@(#)private.h 7.48"; #if 0 static char elsieid[] = "@(#)localtime.cc 8.17"; #else -__RCSID("$NetBSD: localtime.c,v 1.75 2013/07/17 23:09:26 christos Exp $"); +__RCSID("$NetBSD: localtime.c,v 1.77 2013/07/30 15:30:37 joerg Exp $"); #endif /* @@ -2013,7 +2013,7 @@ timesub(const timezone_t sp, const time_t *const timep, } { int_fast32_t seconds; - const time_t half_second = 0.5; + const time_t half_second = (time_t)0.5; seconds = (int_fast32_t)(tdays * SECSPERDAY + half_second); tdays = (time_t)(seconds / SECSPERDAY); From 0a41de2725dbf2f325e55016d85d76560845ff8d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 28 Apr 2020 21:14:01 +0200 Subject: [PATCH 319/520] localtime 1.78 --- winsup/cygwin/localtime.cc | 132 +++++++++++++++++++------------------ 1 file changed, 68 insertions(+), 64 deletions(-) diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc index d3d629618..794c03e2d 100644 --- a/winsup/cygwin/localtime.cc +++ b/winsup/cygwin/localtime.cc @@ -1,4 +1,4 @@ -/* $NetBSD: localtime.c,v 1.77 2013/07/30 15:30:37 joerg Exp $ */ +/* $NetBSD: localtime.c,v 1.78 2013/09/20 19:06:54 christos Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -71,6 +71,11 @@ static char privatehid[] = "@(#)private.h 7.48"; #include "limits.h" /* for CHAR_BIT */ #include "stdlib.h" #include "unistd.h" /* for F_OK and R_OK */ +#if 0 +#include +#endif +#define time_t_min LONG_MIN +#define time_t_max LONG_MAX /* Unlike 's isdigit, this also works if c < 0 | c > UCHAR_MAX. */ #define is_digit(c) ((unsigned)(c) - '0' <= 9) @@ -85,7 +90,7 @@ static char privatehid[] = "@(#)private.h 7.48"; #if 0 static char elsieid[] = "@(#)localtime.cc 8.17"; #else -__RCSID("$NetBSD: localtime.c,v 1.77 2013/07/30 15:30:37 joerg Exp $"); +__RCSID("$NetBSD: localtime.c,v 1.78 2013/09/20 19:06:54 christos Exp $"); #endif /* @@ -406,11 +411,11 @@ static const char gmt[] = "GMT"; #endif /* !defined TZDEFDST */ struct ttinfo { /* time type information */ - int_fast32_t tt_gmtoff; /* UTC offset in seconds */ + int_fast32_t tt_gmtoff; /* UT offset in seconds */ int tt_isdst; /* used to set tm_isdst */ int tt_abbrind; /* abbreviation list index */ int tt_ttisstd; /* TRUE if transition is std time */ - int tt_ttisgmt; /* TRUE if transition is UTC */ + int tt_ttisgmt; /* TRUE if transition is UT */ }; struct lsinfo { /* leap second information */ @@ -642,9 +647,8 @@ settzname (void) static int differ_by_repeat(const time_t t1, const time_t t0) { - if (TYPE_INTEGRAL(time_t) && - TYPE_BIT(time_t) - TYPE_SIGNED(time_t) < SECSPERREPEAT_BITS) - return 0; + if (TYPE_BIT(time_t) - TYPE_SIGNED(time_t) < SECSPERREPEAT_BITS) + return 0; return (int_fast64_t)t1 - (int_fast64_t)t0 == SECSPERREPEAT; } @@ -864,11 +868,9 @@ tzload(timezone_t sp, const char *name, const int doextend) for (i = 0; i < nread; ++i) up->buf[i] = p[i]; /* - ** If this is a narrow integer time_t system, we're done. + ** If this is a narrow time_t system, we're done. */ - if (stored >= (int) sizeof(time_t) -/* CONSTCOND */ - && TYPE_INTEGRAL(time_t)) + if (stored >= (int) sizeof(time_t)) break; } if (doextend && nread > 2 && @@ -1191,14 +1193,14 @@ getrule(const char *strp, struct rule *const rulep) ** Time specified. */ ++strp; - strp = getsecs(strp, &rulep->r_time); + strp = getoffset(strp, &rulep->r_time); } else rulep->r_time = 2 * SECSPERHOUR; /* default = 2:00:00 */ return strp; } /* ** Given the Epoch-relative time of January 1, 00:00:00 UTC, in a year, the -** year, a rule, and the offset from UTC at the time that rule takes effect, +** year, a rule, and the offset from UT at the time that rule takes effect, ** calculate the Epoch-relative time that rule takes effect. */ @@ -1281,10 +1283,10 @@ transtime(const time_t janfirst, const int year, const struct rule *const rulep, } /* - ** "value" is the Epoch-relative time of 00:00:00 UTC on the day in + ** "value" is the Epoch-relative time of 00:00:00 UT on the day in ** question. To get the Epoch-relative time of the specified local ** time on that day, add the transition time and the current offset - ** from UTC. + ** from UT. */ return (time_t)(value + rulep->r_time + offset); } @@ -1361,8 +1363,9 @@ tzparse(timezone_t sp, const char *name, const int lastditch) if (*name == ',' || *name == ';') { struct rule start; struct rule end; - int year; - time_t janfirst; + int year; + int yearlim; + time_t janfirst; time_t starttime; time_t endtime; @@ -1390,33 +1393,39 @@ tzparse(timezone_t sp, const char *name, const int lastditch) typep = sp->types; janfirst = 0; sp->timecnt = 0; - for (year = EPOCH_YEAR; - sp->timecnt + 2 <= TZ_MAX_TIMES; - ++year) { - time_t newfirst; + yearlim = EPOCH_YEAR + YEARSPERREPEAT; + for (year = EPOCH_YEAR; year < yearlim; year++) { + int_fast32_t yearsecs; starttime = transtime(janfirst, year, &start, stdoffset); endtime = transtime(janfirst, year, &end, dstoffset); - if (starttime > endtime) { - *atp++ = endtime; - *typep++ = 1; /* DST ends */ - *atp++ = starttime; - *typep++ = 0; /* DST begins */ - } else { - *atp++ = starttime; - *typep++ = 0; /* DST begins */ - *atp++ = endtime; - *typep++ = 1; /* DST ends */ + yearsecs = (year_lengths[isleap(year)] + * SECSPERDAY); + if (starttime > endtime + || (starttime < endtime + && (endtime - starttime + < (yearsecs + + (stdoffset - dstoffset))))) { + if (&sp->ats[TZ_MAX_TIMES - 2] < atp) + break; + yearlim = year + YEARSPERREPEAT + 1; + if (starttime > endtime) { + *atp++ = endtime; + *typep++ = 1; /* DST ends */ + *atp++ = starttime; + *typep++ = 0; /* DST begins */ + } else { + *atp++ = starttime; + *typep++ = 0; /* DST begins */ + *atp++ = endtime; + *typep++ = 1; /* DST ends */ + } } - sp->timecnt += 2; - newfirst = janfirst; - newfirst += (time_t) - (year_lengths[isleap(year)] * SECSPERDAY); - if (newfirst <= janfirst) + if (time_t_max - janfirst < yearsecs) break; - janfirst = newfirst; + janfirst += yearsecs; } /* ** Get zone offsets into tzinfo (for newlib). . . @@ -1428,6 +1437,10 @@ tzparse(timezone_t sp, const char *name, const int lastditch) __gettzinfo ()->__tzrule[1].offset = -sp->ttis[0].tt_gmtoff; } + //_DIAGASSERT(__type_fit(int, atp - sp->ats)); + sp->timecnt = (int)(atp - sp->ats); + if (!sp->timecnt) + sp->typecnt = 1; /* Perpetual DST. */ } else { int_fast32_t theirstdoffset; int_fast32_t theirdstoffset; @@ -1759,22 +1772,14 @@ localsub(const timezone_t sp, const time_t * const timep, const int_fast32_t off (sp->goahead && t > sp->ats[sp->timecnt - 1])) { time_t newt = t; time_t seconds; - time_t tcycles; - int_fast64_t icycles; + time_t years; if (t < sp->ats[0]) seconds = sp->ats[0] - t; else seconds = t - sp->ats[sp->timecnt - 1]; --seconds; - tcycles = (time_t) - (seconds / YEARSPERREPEAT / AVGSECSPERYEAR); - ++tcycles; - icycles = tcycles; - if (tcycles - icycles >= 1 || icycles - tcycles >= 1) - return NULL; - seconds = (time_t) icycles; - seconds *= YEARSPERREPEAT; - seconds *= AVGSECSPERYEAR; + years = (time_t)((seconds / SECSPERREPEAT + 1) * YEARSPERREPEAT); + seconds = (time_t)(years * AVGSECSPERYEAR); if (t < sp->ats[0]) newt += seconds; else newt -= seconds; @@ -1787,8 +1792,8 @@ localsub(const timezone_t sp, const time_t * const timep, const int_fast32_t off newy = tmp->tm_year; if (t < sp->ats[0]) - newy -= (time_t)icycles * YEARSPERREPEAT; - else newy += (time_t)icycles * YEARSPERREPEAT; + newy -= years; + else newy += years; tmp->tm_year = (int)newy; if (tmp->tm_year != newy) return NULL; @@ -1873,7 +1878,7 @@ gmtsub(const timezone_t sp, const time_t *const timep, #ifdef TM_ZONE /* ** Could get fancy here and deliver something such as - ** "UTC+xxxx" or "UTC-xxxx" if offset is non-zero, + ** "UT+xxxx" or "UT-xxxx" if offset is non-zero, ** but this is no time for a treasure hunt. */ if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS) @@ -1997,9 +2002,10 @@ timesub(const timezone_t sp, const time_t *const timep, int leapdays; tdelta = tdays / DAYSPERLYEAR; - idelta = (int) tdelta; - if (tdelta - idelta >= 1 || idelta - tdelta >= 1) + if (! ((! TYPE_SIGNED(time_t) || INT_MIN <= tdelta) + && tdelta <= INT_MAX)) return NULL; + idelta = tdelta; if (idelta == 0) idelta = (tdays < 0) ? -1 : 1; newy = y; @@ -2013,9 +2019,8 @@ timesub(const timezone_t sp, const time_t *const timep, } { int_fast32_t seconds; - const time_t half_second = (time_t)0.5; - seconds = (int_fast32_t)(tdays * SECSPERDAY + half_second); + seconds = (int_fast32_t)(tdays * SECSPERDAY); tdays = (time_t)(seconds / SECSPERDAY); rem += (int_fast64_t)(seconds - tdays * SECSPERDAY); } @@ -2179,8 +2184,9 @@ tmcomp(const struct tm *const atmp, const struct tm *const btmp) { int result; - if ((result = (atmp->tm_year - btmp->tm_year)) == 0 && - (result = (atmp->tm_mon - btmp->tm_mon)) == 0 && + if (atmp->tm_year != btmp->tm_year) + return atmp->tm_year < btmp->tm_year ? -1 : 1; + if ((result = (atmp->tm_mon - btmp->tm_mon)) == 0 && (result = (atmp->tm_mday - btmp->tm_mday)) == 0 && (result = (atmp->tm_hour - btmp->tm_hour)) == 0 && (result = (atmp->tm_min - btmp->tm_min)) == 0) @@ -2283,7 +2289,6 @@ again: if (!TYPE_SIGNED(time_t)) { lo = 0; hi = lo - 1; - /* LINTED const not */ } else { lo = 1; for (i = 0; i < (int) TYPE_BIT(time_t) - 1; ++i) @@ -2309,14 +2314,14 @@ again: } else dir = tmcomp(&mytm, &yourtm); if (dir != 0) { if (t == lo) { - ++t; - if (t <= lo) + if (t == time_t_max) goto overflow; + ++t; ++lo; } else if (t == hi) { - --t; - if (t >= hi) + if (t == time_t_min) goto overflow; + --t; --hi; } #ifdef NO_ERROR_IN_DST_GAP @@ -2541,8 +2546,7 @@ timeoff(struct tm *const tmp, long offset) ** previous versions of the CMUCS runtime library. */ -extern "C" -int_fast32_t +extern "C" long gtime(struct tm *const tmp) { const time_t t = mktime(tmp); From a40701c7dc9970457a19728e371c71e7501057e7 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 28 Apr 2020 21:20:18 +0200 Subject: [PATCH 320/520] localtime 1.79 --- winsup/cygwin/localtime.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc index 794c03e2d..88290c663 100644 --- a/winsup/cygwin/localtime.cc +++ b/winsup/cygwin/localtime.cc @@ -1,4 +1,4 @@ -/* $NetBSD: localtime.c,v 1.78 2013/09/20 19:06:54 christos Exp $ */ +/* $NetBSD: localtime.c,v 1.79 2013/12/13 10:34:47 christos Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -90,7 +90,7 @@ static char privatehid[] = "@(#)private.h 7.48"; #if 0 static char elsieid[] = "@(#)localtime.cc 8.17"; #else -__RCSID("$NetBSD: localtime.c,v 1.78 2013/09/20 19:06:54 christos Exp $"); +__RCSID("$NetBSD: localtime.c,v 1.79 2013/12/13 10:34:47 christos Exp $"); #endif /* @@ -1425,7 +1425,7 @@ tzparse(timezone_t sp, const char *name, const int lastditch) } if (time_t_max - janfirst < yearsecs) break; - janfirst += yearsecs; + janfirst += (time_t)yearsecs; } /* ** Get zone offsets into tzinfo (for newlib). . . From 9e29639ca01208a4a8bac5b9d0f6491b34b1017e Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 28 Apr 2020 21:21:14 +0200 Subject: [PATCH 321/520] localtime 1.80 --- winsup/cygwin/localtime.cc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc index 88290c663..b0a1a4f2d 100644 --- a/winsup/cygwin/localtime.cc +++ b/winsup/cygwin/localtime.cc @@ -1,4 +1,4 @@ -/* $NetBSD: localtime.c,v 1.79 2013/12/13 10:34:47 christos Exp $ */ +/* $NetBSD: localtime.c,v 1.80 2013/12/13 10:37:24 christos Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -74,8 +74,6 @@ static char privatehid[] = "@(#)private.h 7.48"; #if 0 #include #endif -#define time_t_min LONG_MIN -#define time_t_max LONG_MAX /* Unlike 's isdigit, this also works if c < 0 | c > UCHAR_MAX. */ #define is_digit(c) ((unsigned)(c) - '0' <= 9) @@ -90,7 +88,7 @@ static char privatehid[] = "@(#)private.h 7.48"; #if 0 static char elsieid[] = "@(#)localtime.cc 8.17"; #else -__RCSID("$NetBSD: localtime.c,v 1.79 2013/12/13 10:34:47 christos Exp $"); +__RCSID("$NetBSD: localtime.c,v 1.80 2013/12/13 10:37:24 christos Exp $"); #endif /* @@ -361,6 +359,16 @@ struct tzhead { # define TM_ZONE __TM_ZONE #endif +/* The minimum and maximum finite time values. */ +static time_t const time_t_min = + (TYPE_SIGNED(time_t) + ? (time_t) -1 << (int)(CHAR_BIT * sizeof (time_t) - 1) + : 0); +static time_t const time_t_max = + (TYPE_SIGNED(time_t) + ? - (~ 0 < 0) - ((time_t) -1 << (int)(CHAR_BIT * sizeof (time_t) - 1)) + : -1); + /* ** SunOS 4.1.1 headers lack O_BINARY. */ From 3003c3dacd157c11f5e035bc18bdd30631800720 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 28 Apr 2020 21:26:45 +0200 Subject: [PATCH 322/520] localtime 1.81 --- winsup/cygwin/localtime.cc | 205 ++++++++++++++++++------------------- 1 file changed, 101 insertions(+), 104 deletions(-) diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc index b0a1a4f2d..7324fbd98 100644 --- a/winsup/cygwin/localtime.cc +++ b/winsup/cygwin/localtime.cc @@ -1,4 +1,4 @@ -/* $NetBSD: localtime.c,v 1.80 2013/12/13 10:37:24 christos Exp $ */ +/* $NetBSD: localtime.c,v 1.81 2013/12/26 18:34:28 christos Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -88,7 +88,7 @@ static char privatehid[] = "@(#)private.h 7.48"; #if 0 static char elsieid[] = "@(#)localtime.cc 8.17"; #else -__RCSID("$NetBSD: localtime.c,v 1.80 2013/12/13 10:37:24 christos Exp $"); +__RCSID("$NetBSD: localtime.c,v 1.81 2013/12/26 18:34:28 christos Exp $"); #endif /* @@ -480,7 +480,7 @@ typedef struct tm *(*subfun_t)(const timezone_t sp, const time_t *timep, */ static int_fast32_t detzcode(const char * codep); -static time_t detzcode64(const char * codep); +static int_fast64_t detzcode64(const char * codep); static int differ_by_repeat(time_t t1, time_t t0); static const char * getzname(const char * strp) ATTRIBUTE_PURE; static const char * getqzname(const char * strp, const int delim) ATTRIBUTE_PURE; @@ -496,6 +496,7 @@ static struct tm * localsub(const timezone_t sp, const time_t *timep, const int_fast32_t offset, struct tm *tmp); static int increment_overflow(int * number, int delta); static int increment_overflow32(int_fast32_t * number, int delta); +static int increment_overflow_time(time_t *t, int_fast32_t delta); static int leaps_thru_end_of(int y) ATTRIBUTE_PURE; static int normalize_overflow(int * tensptr, int * unitsptr, int base); @@ -514,9 +515,9 @@ static struct tm * timesub(const timezone_t sp, const time_t * timep, const int_fast32_t offset, struct tm * tmp); static int tmcomp(const struct tm * atmp, const struct tm * btmp); -static time_t transtime(time_t janfirst, int year, - const struct rule * rulep, - const int_fast32_t offset) ATTRIBUTE_PURE; +static int_fast32_t transtime(int year, const struct rule * rulep, + int_fast32_t offset) + ATTRIBUTE_PURE; static int typesequiv(const timezone_t sp, int a, int b); static int tzload(timezone_t sp, const char * name, int doextend); @@ -578,7 +579,7 @@ int daylight; #endif /* defined USG_COMPAT */ #ifdef ALTZONE -time_t altzone = 0; +long altzone = 0; #endif /* defined ALTZONE */ static int_fast32_t @@ -593,15 +594,15 @@ detzcode(const char *const codep) return result; } -static time_t +static int_fast64_t detzcode64(const char *const codep) { - time_t result; + int_fast64_t result; int i; - result = (time_t)((codep[0] & 0x80) ? (~(int_fast64_t) 0) : 0); + result = (codep[0] & 0x80) ? -1 : 0; for (i = 0; i < 8; ++i) - result = result * 256 + (codep[i] & 0xff); + result = (result << 8) | (codep[i] & 0xff); return result; } @@ -742,6 +743,7 @@ tzload(timezone_t sp, const char *name, const int doextend) for (stored = 4; stored <= 8; stored *= 2) { int ttisstdcnt; int ttisgmtcnt; + int timecnt; ttisstdcnt = (int) detzcode(up->tzhead.tzh_ttisstdcnt); ttisgmtcnt = (int) detzcode(up->tzhead.tzh_ttisgmtcnt); @@ -766,15 +768,36 @@ tzload(timezone_t sp, const char *name, const int doextend) ttisstdcnt + /* ttisstds */ ttisgmtcnt) /* ttisgmts */ goto oops; + timecnt = 0; for (i = 0; i < sp->timecnt; ++i) { - sp->ats[i] = (time_t)((stored == 4) ? - detzcode(p) : detzcode64(p)); + int_fast64_t at + = stored == 4 ? detzcode(p) : detzcode64(p); + sp->types[i] = ((TYPE_SIGNED(time_t) + ? time_t_min <= at + : 0 <= at) + && at <= time_t_max); + if (sp->types[i]) { + if (i && !timecnt && at != time_t_min) { + /* + ** Keep the earlier record, but tweak + ** it so that it starts with the + ** minimum time_t value. + */ + sp->types[i - 1] = 1; + sp->ats[timecnt++] = time_t_min; + } + //_DIAGASSERT(__type_fit(time_t, at)); + sp->ats[timecnt++] = (time_t)at; + } p += stored; } + timecnt = 0; for (i = 0; i < sp->timecnt; ++i) { - sp->types[i] = (unsigned char) *p++; - if (sp->types[i] >= sp->typecnt) + unsigned char typ = *p++; + if (sp->typecnt <= typ) goto oops; + if (sp->types[i]) + sp->types[timecnt++] = typ; } for (i = 0; i < sp->typecnt; ++i) { struct ttinfo * ttisp; @@ -830,44 +853,6 @@ tzload(timezone_t sp, const char *name, const int doextend) } } /* - ** Out-of-sort ats should mean we're running on a - ** signed time_t system but using a data file with - ** unsigned values (or vice versa). - */ - for (i = 0; i < sp->timecnt; ++i) - if ((i < sp->timecnt - 1 && - sp->ats[i] > sp->ats[i + 1]) || - (i == sp->timecnt - 1 && !TYPE_SIGNED(time_t) && - sp->ats[i] > - ((stored == 4) ? INT32_MAX : INT64_MAX))) { - if (TYPE_SIGNED(time_t)) { - /* - ** Ignore the end (easy). - */ - sp->timecnt = i + 1; - } else { - /* - ** Ignore the beginning (harder). - */ - int j; - - /* - ** Keep the record right before the - ** epoch boundary, - ** but tweak it so that it starts - ** right with the epoch - ** (thanks to Doug Bailey). - */ - sp->ats[i] = 0; - for (j = 0; j + i < sp->timecnt; ++j) { - sp->ats[j] = sp->ats[j + i]; - sp->types[j] = sp->types[j + i]; - } - sp->timecnt = j; - } - break; - } - /* ** If this is an old file, we're done. */ if (up->tzhead.tzh_version[0] == '\0') @@ -876,9 +861,9 @@ tzload(timezone_t sp, const char *name, const int doextend) for (i = 0; i < nread; ++i) up->buf[i] = p[i]; /* - ** If this is a narrow time_t system, we're done. + ** If this is a signed narrow time_t system, we're done. */ - if (stored >= (int) sizeof(time_t)) + if (TYPE_SIGNED(time_t) && stored >= (int) sizeof(time_t)) break; } if (doextend && nread > 2 && @@ -1207,17 +1192,16 @@ getrule(const char *strp, struct rule *const rulep) } /* -** Given the Epoch-relative time of January 1, 00:00:00 UTC, in a year, the -** year, a rule, and the offset from UT at the time that rule takes effect, -** calculate the Epoch-relative time that rule takes effect. +** Given a year, a rule, and the offset from UT at the time that rule takes +** effect, calculate the year-relative time that rule takes effect. */ -static time_t -transtime(const time_t janfirst, const int year, const struct rule *const rulep, - const int_fast32_t offset) +static int_fast32_t +transtime(const int year, const struct rule *const rulep, + const int_fast32_t offset) { int leapyear; - time_t value; + int_fast32_t value; int i; int d, m1, yy0, yy1, yy2, dow; @@ -1233,7 +1217,7 @@ transtime(const time_t janfirst, const int year, const struct rule *const rulep, ** add SECSPERDAY times the day number-1 to the time of ** January 1, midnight, to get the day. */ - value = (time_t)(janfirst + (rulep->r_day - 1) * SECSPERDAY); + value = (rulep->r_day - 1) * SECSPERDAY; if (leapyear && rulep->r_day >= 60) value += SECSPERDAY; break; @@ -1244,16 +1228,13 @@ transtime(const time_t janfirst, const int year, const struct rule *const rulep, ** Just add SECSPERDAY times the day number to the time of ** January 1, midnight, to get the day. */ - value = (time_t)(janfirst + rulep->r_day * SECSPERDAY); + value = rulep->r_day * SECSPERDAY; break; case MONTH_NTH_DAY_OF_WEEK: /* ** Mm.n.d - nth "dth day" of month m. */ - value = janfirst; - for (i = 0; i < rulep->r_mon - 1; ++i) - value += (time_t)(mon_lengths[leapyear][i] * SECSPERDAY); /* ** Use Zeller's Congruence to get day-of-week of first day of @@ -1286,17 +1267,19 @@ transtime(const time_t janfirst, const int year, const struct rule *const rulep, /* ** "d" is the day-of-month (zero-origin) of the day we want. */ - value += (time_t)(d * SECSPERDAY); + value = d * SECSPERDAY; + for (i = 0; i < rulep->r_mon - 1; ++i) + value += mon_lengths[leapyear][i] * SECSPERDAY; break; } /* - ** "value" is the Epoch-relative time of 00:00:00 UT on the day in - ** question. To get the Epoch-relative time of the specified local + ** "value" is the year-relative time of 00:00:00 UT on the day in + ** question. To get the year-relative time of the specified local ** time on that day, add the transition time and the current offset ** from UT. */ - return (time_t)(value + rulep->r_time + offset); + return value + rulep->r_time + offset; } /* @@ -1313,8 +1296,6 @@ tzparse(timezone_t sp, const char *name, const int lastditch) size_t dstlen; int_fast32_t stdoffset; int_fast32_t dstoffset; - time_t * atp; - unsigned char * typep; char * cp; int load_result; @@ -1373,9 +1354,8 @@ tzparse(timezone_t sp, const char *name, const int lastditch) struct rule end; int year; int yearlim; + int timecnt; time_t janfirst; - time_t starttime; - time_t endtime; ++name; if ((name = getrule(name, &start)) == NULL) @@ -1397,43 +1377,44 @@ tzparse(timezone_t sp, const char *name, const int lastditch) sp->ttis[1].tt_gmtoff = -stdoffset; sp->ttis[1].tt_isdst = 0; sp->ttis[1].tt_abbrind = 0; - atp = sp->ats; - typep = sp->types; + timecnt = 0; janfirst = 0; sp->timecnt = 0; yearlim = EPOCH_YEAR + YEARSPERREPEAT; for (year = EPOCH_YEAR; year < yearlim; year++) { - int_fast32_t yearsecs; - - starttime = transtime(janfirst, year, &start, - stdoffset); - endtime = transtime(janfirst, year, &end, - dstoffset); - yearsecs = (year_lengths[isleap(year)] - * SECSPERDAY); - if (starttime > endtime + int_fast32_t + starttime = transtime(year, &start, stdoffset), + endtime = transtime(year, &end, dstoffset); + int_fast32_t + yearsecs = (year_lengths[isleap(year)] + * SECSPERDAY); + int reversed = endtime < starttime; + if (reversed) { + int_fast32_t swap = starttime; + starttime = endtime; + endtime = swap; + } + if (reversed || (starttime < endtime && (endtime - starttime < (yearsecs + (stdoffset - dstoffset))))) { - if (&sp->ats[TZ_MAX_TIMES - 2] < atp) + if (TZ_MAX_TIMES - 2 < timecnt) break; yearlim = year + YEARSPERREPEAT + 1; - if (starttime > endtime) { - *atp++ = endtime; - *typep++ = 1; /* DST ends */ - *atp++ = starttime; - *typep++ = 0; /* DST begins */ - } else { - *atp++ = starttime; - *typep++ = 0; /* DST begins */ - *atp++ = endtime; - *typep++ = 1; /* DST ends */ - } + sp->ats[timecnt] = janfirst; + if (increment_overflow_time + (&sp->ats[timecnt], starttime)) + break; + sp->types[timecnt++] = reversed; + sp->ats[timecnt] = janfirst; + if (increment_overflow_time + (&sp->ats[timecnt], endtime)) + break; + sp->types[timecnt++] = !reversed; } - if (time_t_max - janfirst < yearsecs) + if (increment_overflow_time(&janfirst, yearsecs)) break; - janfirst += (time_t)yearsecs; } /* ** Get zone offsets into tzinfo (for newlib). . . @@ -1445,9 +1426,8 @@ tzparse(timezone_t sp, const char *name, const int lastditch) __gettzinfo ()->__tzrule[1].offset = -sp->ttis[0].tt_gmtoff; } - //_DIAGASSERT(__type_fit(int, atp - sp->ats)); - sp->timecnt = (int)(atp - sp->ats); - if (!sp->timecnt) + sp->timecnt = timecnt; + if (!timecnt) sp->typecnt = 1; /* Perpetual DST. */ } else { int_fast32_t theirstdoffset; @@ -2013,7 +1993,8 @@ timesub(const timezone_t sp, const time_t *const timep, if (! ((! TYPE_SIGNED(time_t) || INT_MIN <= tdelta) && tdelta <= INT_MAX)) return NULL; - idelta = tdelta; + //_DIAGASSERT(__type_fit(int, tdelta)); + idelta = (int)tdelta; if (idelta == 0) idelta = (tdays < 0) ? -1 : 1; newy = y; @@ -2162,6 +2143,22 @@ increment_overflow32(int_fast32_t *const lp, int const m) return FALSE; } +static int +increment_overflow_time(time_t *tp, int_fast32_t j) +{ + /* + ** This is like + ** 'if (! (time_t_min <= *tp + j && *tp + j <= time_t_max)) ...', + ** except that it does the right thing even if *tp + j would overflow. + */ + if (! (j < 0 + ? (TYPE_SIGNED(time_t) ? time_t_min - j <= *tp : -1 - j < *tp) + : *tp <= time_t_max - j)) + return TRUE; + *tp += j; + return FALSE; +} + static int normalize_overflow(int *const tensptr, int *const unitsptr, const int base) { From 489a47d6036660a6cbab1addfb2b7678c0de8bf2 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 28 Apr 2020 21:35:41 +0200 Subject: [PATCH 323/520] localtime 1.82 --- winsup/cygwin/localtime.cc | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc index 7324fbd98..dccaa623a 100644 --- a/winsup/cygwin/localtime.cc +++ b/winsup/cygwin/localtime.cc @@ -1,4 +1,4 @@ -/* $NetBSD: localtime.c,v 1.81 2013/12/26 18:34:28 christos Exp $ */ +/* $NetBSD: localtime.c,v 1.82 2014/05/13 16:33:56 christos Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -88,7 +88,7 @@ static char privatehid[] = "@(#)private.h 7.48"; #if 0 static char elsieid[] = "@(#)localtime.cc 8.17"; #else -__RCSID("$NetBSD: localtime.c,v 1.81 2013/12/26 18:34:28 christos Exp $"); +__RCSID("$NetBSD: localtime.c,v 1.82 2014/05/13 16:33:56 christos Exp $"); #endif /* @@ -678,7 +678,7 @@ tzload(timezone_t sp, const char *name, const int doextend) u_t * up; save_errno save; - up = (u_t *) calloc(1, sizeof *up); + up = (u_t *) malloc(sizeof *up); if (up == NULL) return -1; @@ -1377,6 +1377,7 @@ tzparse(timezone_t sp, const char *name, const int lastditch) sp->ttis[1].tt_gmtoff = -stdoffset; sp->ttis[1].tt_isdst = 0; sp->ttis[1].tt_abbrind = 0; + sp->defaulttype = 0; timecnt = 0; janfirst = 0; sp->timecnt = 0; @@ -1514,6 +1515,7 @@ tzparse(timezone_t sp, const char *name, const int lastditch) sp->ttis[1].tt_isdst = TRUE; sp->ttis[1].tt_abbrind = (int)(stdlen + 1); sp->typecnt = 2; + sp->defaulttype = 0; /* ** Get zone offsets into tzinfo (for newlib). . . */ @@ -1533,6 +1535,7 @@ tzparse(timezone_t sp, const char *name, const int lastditch) sp->ttis[0].tt_gmtoff = -stdoffset; sp->ttis[0].tt_isdst = 0; sp->ttis[0].tt_abbrind = 0; + sp->defaulttype = 0; /* ** Get zone offsets into tzinfo (for newlib). . . */ @@ -1581,7 +1584,7 @@ tzsetwall (void) if (lclptr == NULL) { save_errno save; - lclptr = (timezone_t) calloc(1, sizeof *lclptr); + lclptr = (timezone_t) malloc(sizeof *lclptr); if (lclptr == NULL) { settzname(); /* all we can do */ return; @@ -1704,7 +1707,7 @@ tzset_unlocked(void) if (lclptr == NULL) { save_errno save; - lclptr = (timezone_t) calloc(1, sizeof *lclptr); + lclptr = (timezone_t) malloc(sizeof *lclptr); if (lclptr == NULL) { settzname(); /* all we can do */ return; @@ -1857,7 +1860,7 @@ gmtsub(const timezone_t sp, const time_t *const timep, if (!gmt_is_set) { save_errno save; gmt_is_set = TRUE; - gmtptr = (timezone_t) calloc(1, sizeof *gmtptr); + gmtptr = (timezone_t) malloc(sizeof *gmtptr); if (gmtptr != NULL) gmtload(gmtptr); } @@ -1870,15 +1873,7 @@ gmtsub(const timezone_t sp, const time_t *const timep, ** but this is no time for a treasure hunt. */ if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS) - { - if (offset != 0) - tmp->TM_ZONE = wildabbr; - else { - if (gmtptr == NULL) - tmp->TM_ZONE = gmt; - else tmp->TM_ZONE = gmtptr->chars; - } - } + tmp->TM_ZONE = offset ? wildabbr : gmtptr ? gmtptr->chars : gmt; #endif /* defined TM_ZONE */ return result; } @@ -2439,17 +2434,15 @@ time1(const timezone_t sp, struct tm *const tmp, subfun_t funcp, if (tmp->tm_isdst > 1) tmp->tm_isdst = 1; t = time2(sp, tmp, funcp, offset, &okay); -#ifdef PCTS - /* - ** PCTS code courtesy Grant Sullivan. - */ if (okay) return t; if (tmp->tm_isdst < 0) +#ifdef PCTS + /* + ** POSIX Conformance Test Suite code courtesy Grant Sullivan. + */ tmp->tm_isdst = 0; /* reset to std and try again */ -#endif /* defined PCTS */ -#ifndef PCTS - if (okay || tmp->tm_isdst < 0) +#else return t; #endif /* !defined PCTS */ /* From 453b6d17bf0581e55258c5eb6dc7afbad1927cab Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 29 Apr 2020 09:51:52 +0200 Subject: [PATCH 324/520] localtime define _DIAGASSERT --- winsup/cygwin/localtime.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc index dccaa623a..ebb2d42f0 100644 --- a/winsup/cygwin/localtime.cc +++ b/winsup/cygwin/localtime.cc @@ -73,6 +73,8 @@ static char privatehid[] = "@(#)private.h 7.48"; #include "unistd.h" /* for F_OK and R_OK */ #if 0 #include +#else +#define _DIAGASSERT(e) #endif /* Unlike 's isdigit, this also works if c < 0 | c > UCHAR_MAX. */ @@ -786,7 +788,7 @@ tzload(timezone_t sp, const char *name, const int doextend) sp->types[i - 1] = 1; sp->ats[timecnt++] = time_t_min; } - //_DIAGASSERT(__type_fit(time_t, at)); + _DIAGASSERT(__type_fit(time_t, at)); sp->ats[timecnt++] = (time_t)at; } p += stored; @@ -1988,7 +1990,7 @@ timesub(const timezone_t sp, const time_t *const timep, if (! ((! TYPE_SIGNED(time_t) || INT_MIN <= tdelta) && tdelta <= INT_MAX)) return NULL; - //_DIAGASSERT(__type_fit(int, tdelta)); + _DIAGASSERT(__type_fit(int, tdelta)); idelta = (int)tdelta; if (idelta == 0) idelta = (tdays < 0) ? -1 : 1; From 717db9fd1ce369d5279480613bcf61daf658309a Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 2 May 2020 15:03:07 +0200 Subject: [PATCH 325/520] setup_pseudoconsole(): handle missing/incorrect helper gracefully When `cygwin-console-helper.exe` is either missing, or corresponds to a different Cygwin runtime, we currently wait forever while setting up access to the pseudo console, even long after the process is gone that was supposed to signal that it set up access to the pseudo console. Let's handle that more gracefully: if the process exited without signaling, we cannot use the pseudo console. In that case, let's just fall back to not using it. Signed-off-by: Johannes Schindelin --- winsup/cygwin/fhandler_tty.cc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index b2e725d5d..8547ec7c4 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -3496,7 +3496,23 @@ fhandler_pty_master::setup_pseudoconsole () TRUE, EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, &si_helper.StartupInfo, &pi_helper)) goto cleanup_event_and_pipes; - WaitForSingleObject (hello, INFINITE); + for (;;) + { + DWORD wait_result = WaitForSingleObject (hello, 500); + if (wait_result == WAIT_OBJECT_0) + break; + if (wait_result != WAIT_TIMEOUT) + goto cleanup_helper_process; + DWORD exit_code; + if (!GetExitCodeProcess(pi_helper.hProcess, &exit_code)) + goto cleanup_helper_process; + if (exit_code == STILL_ACTIVE) + continue; + if (exit_code != 0 || + WaitForSingleObject (hello, 500) != WAIT_OBJECT_0) + goto cleanup_helper_process; + break; + } CloseHandle (hello); CloseHandle (pi_helper.hThread); /* Retrieve pseudo console handles */ From 72865dc2a34903f88615f4282f157a1b62973770 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 4 May 2020 11:22:54 +0200 Subject: [PATCH 326/520] Revert "localtime define _DIAGASSERT" and followups affecting localtime.cc This reverts commits 453b6d17bf0581e55258c5eb6dc7afbad1927cab, 489a47d6036660a6cbab1addfb2b7678c0de8bf2, 3003c3dacd157c11f5e035bc18bdd30631800720, 9e29639ca01208a4a8bac5b9d0f6491b34b1017e, a40701c7dc9970457a19728e371c71e7501057e7, 0a41de2725dbf2f325e55016d85d76560845ff8d, b8aa5f7a0fe70a9a53fe4019227271a78758ae67, 0f4bda879283eaf013f86dd80e5588721a811ea0, 65bf580752db7ac01ecae19dc56aa26ea34f5e47, 3f0c2ac96e7c493bbfc2bc1b0c1274445b756a9d, 76d4d40b8b23d046473a5946cf6b83faa36ae7be, f2e06d8af5f390d81b64375a69ca834ca19d6029. --- winsup/cygwin/localtime.cc | 538 ++++++++++++++++--------------------- 1 file changed, 236 insertions(+), 302 deletions(-) diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc index ebb2d42f0..010376637 100644 --- a/winsup/cygwin/localtime.cc +++ b/winsup/cygwin/localtime.cc @@ -1,10 +1,4 @@ -/* $NetBSD: localtime.c,v 1.82 2014/05/13 16:33:56 christos Exp $ */ - -/* -** This file is in the public domain, so clarified as of -** 1996-06-05 by Arthur David Olson. -*/ -/* Temporarily merged private.h and tzfile.h for ease of management - DJ */ +/* $NetBSD: localtime.c,v 1.72 2012/10/28 19:02:29 christos Exp $ */ /* Don't reformat the code arbitrarily. @@ -12,6 +6,12 @@ versions. The purpose is to simplify subsequent diffs to the NetBSD version, should the need arise again at one point. */ +/* +** This file is in the public domain, so clarified as of +** 1996-06-05 by Arthur David Olson. +*/ +/* Temporarily merged private.h and tzfile.h for ease of management - DJ */ + #include "winsup.h" #include "cygerrno.h" #include "sync.h" @@ -71,27 +71,17 @@ static char privatehid[] = "@(#)private.h 7.48"; #include "limits.h" /* for CHAR_BIT */ #include "stdlib.h" #include "unistd.h" /* for F_OK and R_OK */ -#if 0 -#include -#else -#define _DIAGASSERT(e) -#endif /* Unlike 's isdigit, this also works if c < 0 | c > UCHAR_MAX. */ #define is_digit(c) ((unsigned)(c) - '0' <= 9) -#ifndef ATTRIBUTE_PURE +#ifndef __pure #if 2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__) -# define ATTRIBUTE_PURE __attribute__ ((__pure__)) +# define __pure __attribute__ ((__pure__)) #else -# define ATTRIBUTE_PURE /* empty */ +# define __pure /* empty */ #endif #endif -#if 0 -static char elsieid[] = "@(#)localtime.cc 8.17"; -#else -__RCSID("$NetBSD: localtime.c,v 1.82 2014/05/13 16:33:56 christos Exp $"); -#endif /* ** Finally, some convenience items. @@ -361,16 +351,6 @@ struct tzhead { # define TM_ZONE __TM_ZONE #endif -/* The minimum and maximum finite time values. */ -static time_t const time_t_min = - (TYPE_SIGNED(time_t) - ? (time_t) -1 << (int)(CHAR_BIT * sizeof (time_t) - 1) - : 0); -static time_t const time_t_max = - (TYPE_SIGNED(time_t) - ? - (~ 0 < 0) - ((time_t) -1 << (int)(CHAR_BIT * sizeof (time_t) - 1)) - : -1); - /* ** SunOS 4.1.1 headers lack O_BINARY. */ @@ -421,16 +401,16 @@ static const char gmt[] = "GMT"; #endif /* !defined TZDEFDST */ struct ttinfo { /* time type information */ - int_fast32_t tt_gmtoff; /* UT offset in seconds */ + long tt_gmtoff; /* UTC offset in seconds */ int tt_isdst; /* used to set tm_isdst */ int tt_abbrind; /* abbreviation list index */ int tt_ttisstd; /* TRUE if transition is std time */ - int tt_ttisgmt; /* TRUE if transition is UT */ + int tt_ttisgmt; /* TRUE if transition is UTC */ }; struct lsinfo { /* leap second information */ time_t ls_trans; /* transition time */ - int_fast64_t ls_corr; /* correction to apply */ + long ls_corr; /* correction to apply */ }; #define BIGGEST(a, b) (((a) > (b)) ? (a) : (b)) @@ -455,71 +435,66 @@ struct __state { char chars[/*CONSTCOND*/BIGGEST(BIGGEST(TZ_MAX_CHARS + 1, sizeof gmt), (2 * (MY_TZNAME_MAX + 1)))]; struct lsinfo lsis[TZ_MAX_LEAPS]; - int defaulttype; /* for early times or if no transitions */ }; +typedef struct __state *timezone_t; + struct rule { int r_type; /* type of rule--see below */ int r_day; /* day number of rule */ int r_week; /* week number of rule */ int r_mon; /* month number of rule */ - int_fast32_t r_time; /* transition time of rule */ + long r_time; /* transition time of rule */ }; #define JULIAN_DAY 0 /* Jn - Julian day */ #define DAY_OF_YEAR 1 /* n - day of year */ #define MONTH_NTH_DAY_OF_WEEK 2 /* Mm.n.d - month, week, day of week */ -#ifdef __CYGWIN__ -typedef struct __state *timezone_t; -#endif - typedef struct tm *(*subfun_t)(const timezone_t sp, const time_t *timep, - const int_fast32_t offset, struct tm *tmp); + long offset, struct tm *tmp); /* ** Prototypes for static functions. */ -static int_fast32_t detzcode(const char * codep); -static int_fast64_t detzcode64(const char * codep); +static long detzcode(const char * codep); +static time_t detzcode64(const char * codep); static int differ_by_repeat(time_t t1, time_t t0); -static const char * getzname(const char * strp) ATTRIBUTE_PURE; -static const char * getqzname(const char * strp, const int delim) ATTRIBUTE_PURE; +static const char * getzname(const char * strp) __pure; +static const char * getqzname(const char * strp, const int delim) __pure; static const char * getnum(const char * strp, int * nump, int min, int max); -static const char * getsecs(const char * strp, int_fast32_t * secsp); -static const char * getoffset(const char * strp, int_fast32_t * offsetp); +static const char * getsecs(const char * strp, long * secsp); +static const char * getoffset(const char * strp, long * offsetp); static const char * getrule(const char * strp, struct rule * rulep); static void gmtload(timezone_t sp); static struct tm * gmtsub(const timezone_t sp, const time_t *timep, - const int_fast32_t offset, struct tm * tmp); + long offset, struct tm * tmp); static struct tm * localsub(const timezone_t sp, const time_t *timep, - const int_fast32_t offset, struct tm *tmp); + long offset, struct tm *tmp); static int increment_overflow(int * number, int delta); -static int increment_overflow32(int_fast32_t * number, int delta); -static int increment_overflow_time(time_t *t, int_fast32_t delta); -static int leaps_thru_end_of(int y) ATTRIBUTE_PURE; +static int leaps_thru_end_of(int y) __pure; +static int long_increment_overflow(long * number, int delta); +static int long_normalize_overflow(long * tensptr, + int * unitsptr, int base); static int normalize_overflow(int * tensptr, int * unitsptr, int base); -static int normalize_overflow32(int_fast32_t * tensptr, - int * unitsptr, int base); static void settzname(void); static time_t time1(const timezone_t sp, struct tm * const tmp, - subfun_t funcp, const int_fast32_t offset); + subfun_t funcp, const long offset); static time_t time2(const timezone_t sp, struct tm * const tmp, subfun_t funcp, - const int_fast32_t offset, int *const okayp); + const long offset, int *const okayp); static time_t time2sub(const timezone_t sp, struct tm * const tmp, - subfun_t funcp, const int_fast32_t offset, + subfun_t funcp, const long offset, int *const okayp, const int do_norm_secs); static struct tm * timesub(const timezone_t sp, const time_t * timep, - const int_fast32_t offset, struct tm * tmp); + long offset, struct tm * tmp); static int tmcomp(const struct tm * atmp, const struct tm * btmp); -static int_fast32_t transtime(int year, const struct rule * rulep, - int_fast32_t offset) - ATTRIBUTE_PURE; +static time_t transtime(time_t janfirst, int year, + const struct rule * rulep, long offset) __pure; static int typesequiv(const timezone_t sp, int a, int b); static int tzload(timezone_t sp, const char * name, int doextend); @@ -530,7 +505,7 @@ extern "C" void tzset_unlocked(void); #else static void tzset_unlocked(void); #endif -static int_fast64_t leapcorr(const timezone_t sp, time_t * timep); +static long leapcorr(const timezone_t sp, time_t * timep); static timezone_t lclptr; static timezone_t gmtptr; @@ -581,30 +556,30 @@ int daylight; #endif /* defined USG_COMPAT */ #ifdef ALTZONE -long altzone = 0; +time_t altzone = 0; #endif /* defined ALTZONE */ -static int_fast32_t +static long detzcode(const char *const codep) { - int_fast32_t result; + long result; int i; - result = (codep[0] & 0x80) ? -1 : 0; + result = (codep[0] & 0x80) ? ~0L : 0; for (i = 0; i < 4; ++i) result = (result << 8) | (codep[i] & 0xff); return result; } -static int_fast64_t +static time_t detzcode64(const char *const codep) { - int_fast64_t result; + time_t result; int i; - result = (codep[0] & 0x80) ? -1 : 0; + result = (time_t)((codep[0] & 0x80) ? (~(int_fast64_t) 0) : 0); for (i = 0; i < 8; ++i) - result = (result << 8) | (codep[i] & 0xff); + result = result * 256 + (codep[i] & 0xff); return result; } @@ -630,7 +605,8 @@ settzname (void) for (i = 0; i < sp->typecnt; ++i) { const struct ttinfo * const ttisp = &sp->ttis[i]; - tzname[ttisp->tt_isdst] = &sp->chars[ttisp->tt_abbrind]; + tzname[ttisp->tt_isdst] = + &sp->chars[ttisp->tt_abbrind]; #ifdef USG_COMPAT if (ttisp->tt_isdst) daylight = 1; @@ -658,8 +634,9 @@ settzname (void) static int differ_by_repeat(const time_t t1, const time_t t0) { - if (TYPE_BIT(time_t) - TYPE_SIGNED(time_t) < SECSPERREPEAT_BITS) - return 0; + if (TYPE_INTEGRAL(time_t) && + TYPE_BIT(time_t) - TYPE_SIGNED(time_t) < SECSPERREPEAT_BITS) + return 0; return (int_fast64_t)t1 - (int_fast64_t)t0 == SECSPERREPEAT; } @@ -680,7 +657,7 @@ tzload(timezone_t sp, const char *name, const int doextend) u_t * up; save_errno save; - up = (u_t *) malloc(sizeof *up); + up = (u_t *) calloc(1, sizeof *up); if (up == NULL) return -1; @@ -745,7 +722,6 @@ tzload(timezone_t sp, const char *name, const int doextend) for (stored = 4; stored <= 8; stored *= 2) { int ttisstdcnt; int ttisgmtcnt; - int timecnt; ttisstdcnt = (int) detzcode(up->tzhead.tzh_ttisstdcnt); ttisgmtcnt = (int) detzcode(up->tzhead.tzh_ttisgmtcnt); @@ -770,36 +746,15 @@ tzload(timezone_t sp, const char *name, const int doextend) ttisstdcnt + /* ttisstds */ ttisgmtcnt) /* ttisgmts */ goto oops; - timecnt = 0; for (i = 0; i < sp->timecnt; ++i) { - int_fast64_t at - = stored == 4 ? detzcode(p) : detzcode64(p); - sp->types[i] = ((TYPE_SIGNED(time_t) - ? time_t_min <= at - : 0 <= at) - && at <= time_t_max); - if (sp->types[i]) { - if (i && !timecnt && at != time_t_min) { - /* - ** Keep the earlier record, but tweak - ** it so that it starts with the - ** minimum time_t value. - */ - sp->types[i - 1] = 1; - sp->ats[timecnt++] = time_t_min; - } - _DIAGASSERT(__type_fit(time_t, at)); - sp->ats[timecnt++] = (time_t)at; - } + sp->ats[i] = (time_t)((stored == 4) ? + detzcode(p) : detzcode64(p)); p += stored; } - timecnt = 0; for (i = 0; i < sp->timecnt; ++i) { - unsigned char typ = *p++; - if (sp->typecnt <= typ) + sp->types[i] = (unsigned char) *p++; + if (sp->types[i] >= sp->typecnt) goto oops; - if (sp->types[i]) - sp->types[timecnt++] = typ; } for (i = 0; i < sp->typecnt; ++i) { struct ttinfo * ttisp; @@ -855,6 +810,33 @@ tzload(timezone_t sp, const char *name, const int doextend) } } /* + ** Out-of-sort ats should mean we're running on a + ** signed time_t system but using a data file with + ** unsigned values (or vice versa). + */ + for (i = 0; i < sp->timecnt - 2; ++i) + if (sp->ats[i] > sp->ats[i + 1]) { + ++i; + if (TYPE_SIGNED(time_t)) { + /* + ** Ignore the end (easy). + */ + sp->timecnt = i; + } else { + /* + ** Ignore the beginning (harder). + */ + int j; + + for (j = 0; j + i < sp->timecnt; ++j) { + sp->ats[j] = sp->ats[j + i]; + sp->types[j] = sp->types[j + i]; + } + sp->timecnt = j; + } + break; + } + /* ** If this is an old file, we're done. */ if (up->tzhead.tzh_version[0] == '\0') @@ -863,9 +845,11 @@ tzload(timezone_t sp, const char *name, const int doextend) for (i = 0; i < nread; ++i) up->buf[i] = p[i]; /* - ** If this is a signed narrow time_t system, we're done. + ** If this is a narrow integer time_t system, we're done. */ - if (TYPE_SIGNED(time_t) && stored >= (int) sizeof(time_t)) + if (stored >= (int) sizeof(time_t) +/* CONSTCOND */ + && TYPE_INTEGRAL(time_t)) break; } if (doextend && nread > 2 && @@ -919,40 +903,6 @@ tzload(timezone_t sp, const char *name, const int doextend) break; } } - /* - ** If type 0 is is unused in transitions, - ** it's the type to use for early times. - */ - for (i = 0; i < sp->typecnt; ++i) - if (sp->types[i] == 0) - break; - i = (i >= sp->typecnt) ? 0 : -1; - /* - ** Absent the above, - ** if there are transition times - ** and the first transition is to a daylight time - ** find the standard type less than and closest to - ** the type of the first transition. - */ - if (i < 0 && sp->timecnt > 0 && sp->ttis[sp->types[0]].tt_isdst) { - i = sp->types[0]; - while (--i >= 0) - if (!sp->ttis[i].tt_isdst) - break; - } - /* - ** If no result yet, find the first standard type. - ** If there is none, punt to type zero. - */ - if (i < 0) { - i = 0; - while (sp->ttis[i].tt_isdst) - if (++i >= sp->typecnt) { - i = 0; - break; - } - } - sp->defaulttype = i; free(up); /* ** Get latest zone offsets into tzinfo (for newlib). . . @@ -1083,7 +1033,7 @@ getnum(const char *strp, int *const nump, const int min, const int max) */ static const char * -getsecs(const char *strp, int_fast32_t *const secsp) +getsecs(const char *strp, long *const secsp) { int num; @@ -1096,7 +1046,7 @@ getsecs(const char *strp, int_fast32_t *const secsp) strp = getnum(strp, &num, 0, HOURSPERDAY * DAYSPERWEEK - 1); if (strp == NULL) return NULL; - *secsp = num * (int_fast32_t) SECSPERHOUR; + *secsp = num * (long) SECSPERHOUR; if (*strp == ':') { ++strp; strp = getnum(strp, &num, 0, MINSPERHOUR - 1); @@ -1123,7 +1073,7 @@ getsecs(const char *strp, int_fast32_t *const secsp) */ static const char * -getoffset(const char *strp, int_fast32_t *const offsetp) +getoffset(const char *strp, long *const offsetp) { int neg = 0; @@ -1188,22 +1138,23 @@ getrule(const char *strp, struct rule *const rulep) ** Time specified. */ ++strp; - strp = getoffset(strp, &rulep->r_time); + strp = getsecs(strp, &rulep->r_time); } else rulep->r_time = 2 * SECSPERHOUR; /* default = 2:00:00 */ return strp; } /* -** Given a year, a rule, and the offset from UT at the time that rule takes -** effect, calculate the year-relative time that rule takes effect. +** Given the Epoch-relative time of January 1, 00:00:00 UTC, in a year, the +** year, a rule, and the offset from UTC at the time that rule takes effect, +** calculate the Epoch-relative time that rule takes effect. */ -static int_fast32_t -transtime(const int year, const struct rule *const rulep, - const int_fast32_t offset) +static time_t +transtime(const time_t janfirst, const int year, const struct rule *const rulep, + const long offset) { int leapyear; - int_fast32_t value; + time_t value; int i; int d, m1, yy0, yy1, yy2, dow; @@ -1219,7 +1170,7 @@ transtime(const int year, const struct rule *const rulep, ** add SECSPERDAY times the day number-1 to the time of ** January 1, midnight, to get the day. */ - value = (rulep->r_day - 1) * SECSPERDAY; + value = (time_t)(janfirst + (rulep->r_day - 1) * SECSPERDAY); if (leapyear && rulep->r_day >= 60) value += SECSPERDAY; break; @@ -1230,13 +1181,16 @@ transtime(const int year, const struct rule *const rulep, ** Just add SECSPERDAY times the day number to the time of ** January 1, midnight, to get the day. */ - value = rulep->r_day * SECSPERDAY; + value = (time_t)(janfirst + rulep->r_day * SECSPERDAY); break; case MONTH_NTH_DAY_OF_WEEK: /* ** Mm.n.d - nth "dth day" of month m. */ + value = janfirst; + for (i = 0; i < rulep->r_mon - 1; ++i) + value += (time_t)(mon_lengths[leapyear][i] * SECSPERDAY); /* ** Use Zeller's Congruence to get day-of-week of first day of @@ -1269,19 +1223,17 @@ transtime(const int year, const struct rule *const rulep, /* ** "d" is the day-of-month (zero-origin) of the day we want. */ - value = d * SECSPERDAY; - for (i = 0; i < rulep->r_mon - 1; ++i) - value += mon_lengths[leapyear][i] * SECSPERDAY; + value += (time_t)(d * SECSPERDAY); break; } /* - ** "value" is the year-relative time of 00:00:00 UT on the day in - ** question. To get the year-relative time of the specified local + ** "value" is the Epoch-relative time of 00:00:00 UTC on the day in + ** question. To get the Epoch-relative time of the specified local ** time on that day, add the transition time and the current offset - ** from UT. + ** from UTC. */ - return value + rulep->r_time + offset; + return (time_t)(value + rulep->r_time + offset); } /* @@ -1292,12 +1244,14 @@ transtime(const int year, const struct rule *const rulep, static int tzparse(timezone_t sp, const char *name, const int lastditch) { - const char * stdname; - const char * dstname; - size_t stdlen; - size_t dstlen; - int_fast32_t stdoffset; - int_fast32_t dstoffset; + const char * stdname; + const char * dstname; + size_t stdlen; + size_t dstlen; + long stdoffset; + long dstoffset; + time_t * atp; + unsigned char * typep; char * cp; int load_result; @@ -1354,10 +1308,10 @@ tzparse(timezone_t sp, const char *name, const int lastditch) if (*name == ',' || *name == ';') { struct rule start; struct rule end; - int year; - int yearlim; - int timecnt; - time_t janfirst; + int year; + time_t janfirst; + time_t starttime; + time_t endtime; ++name; if ((name = getrule(name, &start)) == NULL) @@ -1379,45 +1333,37 @@ tzparse(timezone_t sp, const char *name, const int lastditch) sp->ttis[1].tt_gmtoff = -stdoffset; sp->ttis[1].tt_isdst = 0; sp->ttis[1].tt_abbrind = 0; - sp->defaulttype = 0; - timecnt = 0; + atp = sp->ats; + typep = sp->types; janfirst = 0; sp->timecnt = 0; - yearlim = EPOCH_YEAR + YEARSPERREPEAT; - for (year = EPOCH_YEAR; year < yearlim; year++) { - int_fast32_t - starttime = transtime(year, &start, stdoffset), - endtime = transtime(year, &end, dstoffset); - int_fast32_t - yearsecs = (year_lengths[isleap(year)] - * SECSPERDAY); - int reversed = endtime < starttime; - if (reversed) { - int_fast32_t swap = starttime; - starttime = endtime; - endtime = swap; + for (year = EPOCH_YEAR; + sp->timecnt + 2 <= TZ_MAX_TIMES; + ++year) { + time_t newfirst; + + starttime = transtime(janfirst, year, &start, + stdoffset); + endtime = transtime(janfirst, year, &end, + dstoffset); + if (starttime > endtime) { + *atp++ = endtime; + *typep++ = 1; /* DST ends */ + *atp++ = starttime; + *typep++ = 0; /* DST begins */ + } else { + *atp++ = starttime; + *typep++ = 0; /* DST begins */ + *atp++ = endtime; + *typep++ = 1; /* DST ends */ } - if (reversed - || (starttime < endtime - && (endtime - starttime - < (yearsecs - + (stdoffset - dstoffset))))) { - if (TZ_MAX_TIMES - 2 < timecnt) - break; - yearlim = year + YEARSPERREPEAT + 1; - sp->ats[timecnt] = janfirst; - if (increment_overflow_time - (&sp->ats[timecnt], starttime)) - break; - sp->types[timecnt++] = reversed; - sp->ats[timecnt] = janfirst; - if (increment_overflow_time - (&sp->ats[timecnt], endtime)) - break; - sp->types[timecnt++] = !reversed; - } - if (increment_overflow_time(&janfirst, yearsecs)) + sp->timecnt += 2; + newfirst = janfirst; + newfirst += (time_t) + (year_lengths[isleap(year)] * SECSPERDAY); + if (newfirst <= janfirst) break; + janfirst = newfirst; } /* ** Get zone offsets into tzinfo (for newlib). . . @@ -1429,16 +1375,13 @@ tzparse(timezone_t sp, const char *name, const int lastditch) __gettzinfo ()->__tzrule[1].offset = -sp->ttis[0].tt_gmtoff; } - sp->timecnt = timecnt; - if (!timecnt) - sp->typecnt = 1; /* Perpetual DST. */ } else { - int_fast32_t theirstdoffset; - int_fast32_t theirdstoffset; - int_fast32_t theiroffset; - int isdst; - int i; - int j; + long theirstdoffset; + long theirdstoffset; + long theiroffset; + int isdst; + int i; + int j; if (*name != '\0') return -1; @@ -1517,7 +1460,6 @@ tzparse(timezone_t sp, const char *name, const int lastditch) sp->ttis[1].tt_isdst = TRUE; sp->ttis[1].tt_abbrind = (int)(stdlen + 1); sp->typecnt = 2; - sp->defaulttype = 0; /* ** Get zone offsets into tzinfo (for newlib). . . */ @@ -1537,7 +1479,6 @@ tzparse(timezone_t sp, const char *name, const int lastditch) sp->ttis[0].tt_gmtoff = -stdoffset; sp->ttis[0].tt_isdst = 0; sp->ttis[0].tt_abbrind = 0; - sp->defaulttype = 0; /* ** Get zone offsets into tzinfo (for newlib). . . */ @@ -1586,7 +1527,7 @@ tzsetwall (void) if (lclptr == NULL) { save_errno save; - lclptr = (timezone_t) malloc(sizeof *lclptr); + lclptr = (timezone_t) calloc(1, sizeof *lclptr); if (lclptr == NULL) { settzname(); /* all we can do */ return; @@ -1709,7 +1650,7 @@ tzset_unlocked(void) if (lclptr == NULL) { save_errno save; - lclptr = (timezone_t) malloc(sizeof *lclptr); + lclptr = (timezone_t) calloc(1, sizeof *lclptr); if (lclptr == NULL) { settzname(); /* all we can do */ return; @@ -1753,7 +1694,7 @@ tzset(void) /*ARGSUSED*/ static struct tm * -localsub(const timezone_t sp, const time_t * const timep, const int_fast32_t offset, +localsub(const timezone_t sp, const time_t * const timep, const long offset, struct tm *const tmp) { const struct ttinfo * ttisp; @@ -1765,14 +1706,22 @@ localsub(const timezone_t sp, const time_t * const timep, const int_fast32_t off (sp->goahead && t > sp->ats[sp->timecnt - 1])) { time_t newt = t; time_t seconds; - time_t years; + time_t tcycles; + int_fast64_t icycles; if (t < sp->ats[0]) seconds = sp->ats[0] - t; else seconds = t - sp->ats[sp->timecnt - 1]; --seconds; - years = (time_t)((seconds / SECSPERREPEAT + 1) * YEARSPERREPEAT); - seconds = (time_t)(years * AVGSECSPERYEAR); + tcycles = (time_t) + (seconds / YEARSPERREPEAT / AVGSECSPERYEAR); + ++tcycles; + icycles = tcycles; + if (tcycles - icycles >= 1 || icycles - tcycles >= 1) + return NULL; + seconds = (time_t) icycles; + seconds *= YEARSPERREPEAT; + seconds *= AVGSECSPERYEAR; if (t < sp->ats[0]) newt += seconds; else newt -= seconds; @@ -1785,8 +1734,8 @@ localsub(const timezone_t sp, const time_t * const timep, const int_fast32_t off newy = tmp->tm_year; if (t < sp->ats[0]) - newy -= years; - else newy += years; + newy -= (time_t)icycles * YEARSPERREPEAT; + else newy += (time_t)icycles * YEARSPERREPEAT; tmp->tm_year = (int)newy; if (tmp->tm_year != newy) return NULL; @@ -1794,7 +1743,12 @@ localsub(const timezone_t sp, const time_t * const timep, const int_fast32_t off return result; } if (sp->timecnt == 0 || t < sp->ats[0]) { - i = sp->defaulttype; + i = 0; + while (sp->ttis[i].tt_isdst) + if (++i >= sp->typecnt) { + i = 0; + break; + } } else { int lo = 1; int hi = sp->timecnt; @@ -1853,8 +1807,8 @@ localtime(const time_t *const timep) static NO_COPY muto gmt_guard; static struct tm * -gmtsub(const timezone_t sp, const time_t *const timep, - const int_fast32_t offset, struct tm *const tmp) +gmtsub(const timezone_t sp, const time_t *const timep, const long offset, + struct tm *tmp) { struct tm * result; @@ -1862,7 +1816,7 @@ gmtsub(const timezone_t sp, const time_t *const timep, if (!gmt_is_set) { save_errno save; gmt_is_set = TRUE; - gmtptr = (timezone_t) malloc(sizeof *gmtptr); + gmtptr = (timezone_t) calloc(1, sizeof *gmtptr); if (gmtptr != NULL) gmtload(gmtptr); } @@ -1871,11 +1825,19 @@ gmtsub(const timezone_t sp, const time_t *const timep, #ifdef TM_ZONE /* ** Could get fancy here and deliver something such as - ** "UT+xxxx" or "UT-xxxx" if offset is non-zero, + ** "UTC+xxxx" or "UTC-xxxx" if offset is non-zero, ** but this is no time for a treasure hunt. */ if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS) - tmp->TM_ZONE = offset ? wildabbr : gmtptr ? gmtptr->chars : gmt; + { + if (offset != 0) + tmp->TM_ZONE = wildabbr; + else { + if (gmtptr == NULL) + tmp->TM_ZONE = gmt; + else tmp->TM_ZONE = gmtptr->chars; + } + } #endif /* defined TM_ZONE */ return result; } @@ -1883,7 +1845,7 @@ gmtsub(const timezone_t sp, const time_t *const timep, extern "C" struct tm * gmtime(const time_t *const timep) { - struct tm *tmp = gmtsub(NULL, timep, 0, &tm); + struct tm *tmp = gmtsub(NULL, timep, 0L, &tm); if (tmp == NULL) errno = EOVERFLOW; @@ -1898,7 +1860,7 @@ gmtime(const time_t *const timep) extern "C" struct tm * gmtime_r(const time_t *__restrict const timep, struct tm *__restrict tmp) { - tmp = gmtsub(NULL, timep, 0, tmp); + tmp = gmtsub(NULL, timep, 0L, tmp); if (tmp == NULL) errno = EOVERFLOW; @@ -1911,14 +1873,7 @@ gmtime_r(const time_t *__restrict const timep, struct tm *__restrict tmp) extern "C" struct tm * offtime(const time_t *const timep, long offset) { - struct tm *tmp; - - if ((offset > 0 && offset > INT_FAST32_MAX) || - (offset < 0 && offset < INT_FAST32_MIN)) { - errno = EOVERFLOW; - return NULL; - } - tmp = gmtsub(NULL, timep, (int_fast32_t)offset, &tm); + struct tm *tmp = gmtsub(NULL, timep, offset, &tm); if (tmp == NULL) errno = EOVERFLOW; @@ -1941,16 +1896,16 @@ leaps_thru_end_of(const int y) } static struct tm * -timesub(const timezone_t sp, const time_t *const timep, - const int_fast32_t offset, struct tm *const tmp) +timesub(const timezone_t sp, const time_t *const timep, const long offset, + struct tm *const tmp) { const struct lsinfo * lp; time_t tdays; int idays; /* unsigned would be so 2003 */ - int_fast64_t rem; + long rem; int y; const int * ip; - int_fast64_t corr; + long corr; int hit; int i; @@ -1979,7 +1934,7 @@ timesub(const timezone_t sp, const time_t *const timep, } y = EPOCH_YEAR; tdays = (time_t)(*timep / SECSPERDAY); - rem = (int_fast64_t) (*timep - tdays * SECSPERDAY); + rem = (long) (*timep - tdays * SECSPERDAY); while (tdays < 0 || tdays >= year_lengths[isleap(y)]) { int newy; time_t tdelta; @@ -1987,11 +1942,9 @@ timesub(const timezone_t sp, const time_t *const timep, int leapdays; tdelta = tdays / DAYSPERLYEAR; - if (! ((! TYPE_SIGNED(time_t) || INT_MIN <= tdelta) - && tdelta <= INT_MAX)) + idelta = (int) tdelta; + if (tdelta - idelta >= 1 || idelta - tdelta >= 1) return NULL; - _DIAGASSERT(__type_fit(int, tdelta)); - idelta = (int)tdelta; if (idelta == 0) idelta = (tdays < 0) ? -1 : 1; newy = y; @@ -2004,11 +1957,11 @@ timesub(const timezone_t sp, const time_t *const timep, y = newy; } { - int_fast32_t seconds; + long seconds; - seconds = (int_fast32_t)(tdays * SECSPERDAY); + seconds = tdays * SECSPERDAY + 0.5; tdays = (time_t)(seconds / SECSPERDAY); - rem += (int_fast64_t)(seconds - tdays * SECSPERDAY); + rem += (long) (seconds - tdays * SECSPERDAY); } /* ** Given the range, we can now fearlessly cast... @@ -2130,32 +2083,16 @@ increment_overflow(int *const ip, int j) } static int -increment_overflow32(int_fast32_t *const lp, int const m) +long_increment_overflow(long *const lp, int m) { - int_fast32_t l = *lp; + long l = *lp; - if ((l >= 0) ? (m > INT_FAST32_MAX - l) : (m < INT_FAST32_MIN - l)) + if ((l >= 0) ? (m > LONG_MAX - l) : (m < LONG_MIN - l)) return TRUE; *lp += m; return FALSE; } -static int -increment_overflow_time(time_t *tp, int_fast32_t j) -{ - /* - ** This is like - ** 'if (! (time_t_min <= *tp + j && *tp + j <= time_t_max)) ...', - ** except that it does the right thing even if *tp + j would overflow. - */ - if (! (j < 0 - ? (TYPE_SIGNED(time_t) ? time_t_min - j <= *tp : -1 - j < *tp) - : *tp <= time_t_max - j)) - return TRUE; - *tp += j; - return FALSE; -} - static int normalize_overflow(int *const tensptr, int *const unitsptr, const int base) { @@ -2169,7 +2106,7 @@ normalize_overflow(int *const tensptr, int *const unitsptr, const int base) } static int -normalize_overflow32(int_fast32_t *const tensptr, int *const unitsptr, +long_normalize_overflow(long *const tensptr, int *const unitsptr, const int base) { int tensdelta; @@ -2178,7 +2115,7 @@ normalize_overflow32(int_fast32_t *const tensptr, int *const unitsptr, (*unitsptr / base) : (-1 - (-1 - *unitsptr) / base); *unitsptr -= tensdelta * base; - return increment_overflow32(tensptr, tensdelta); + return long_increment_overflow(tensptr, tensdelta); } static int @@ -2186,9 +2123,8 @@ tmcomp(const struct tm *const atmp, const struct tm *const btmp) { int result; - if (atmp->tm_year != btmp->tm_year) - return atmp->tm_year < btmp->tm_year ? -1 : 1; - if ((result = (atmp->tm_mon - btmp->tm_mon)) == 0 && + if ((result = (atmp->tm_year - btmp->tm_year)) == 0 && + (result = (atmp->tm_mon - btmp->tm_mon)) == 0 && (result = (atmp->tm_mday - btmp->tm_mday)) == 0 && (result = (atmp->tm_hour - btmp->tm_hour)) == 0 && (result = (atmp->tm_min - btmp->tm_min)) == 0) @@ -2198,21 +2134,21 @@ tmcomp(const struct tm *const atmp, const struct tm *const btmp) static time_t time2sub(const timezone_t sp, struct tm *const tmp, subfun_t funcp, - const int_fast32_t offset, int *const okayp, const int do_norm_secs) + const long offset, int *const okayp, const int do_norm_secs) { int dir; int i, j; int saved_seconds; - int_fast32_t li; + long li; time_t lo; time_t hi; #ifdef NO_ERROR_IN_DST_GAP time_t ilo; #endif - int_fast32_t y; - time_t newt; - time_t t; - struct tm yourtm, mytm; + long y; + time_t newt; + time_t t; + struct tm yourtm, mytm; *okayp = FALSE; yourtm = *tmp; @@ -2229,16 +2165,16 @@ again: if (normalize_overflow(&yourtm.tm_mday, &yourtm.tm_hour, HOURSPERDAY)) goto overflow; y = yourtm.tm_year; - if (normalize_overflow32(&y, &yourtm.tm_mon, MONSPERYEAR)) + if (long_normalize_overflow(&y, &yourtm.tm_mon, MONSPERYEAR)) goto overflow; /* ** Turn y into an actual year number for now. ** It is converted back to an offset from TM_YEAR_BASE later. */ - if (increment_overflow32(&y, TM_YEAR_BASE)) + if (long_increment_overflow(&y, TM_YEAR_BASE)) goto overflow; while (yourtm.tm_mday <= 0) { - if (increment_overflow32(&y, -1)) + if (long_increment_overflow(&y, -1)) goto overflow; li = y + (1 < yourtm.tm_mon); yourtm.tm_mday += year_lengths[isleap(li)]; @@ -2246,7 +2182,7 @@ again: while (yourtm.tm_mday > DAYSPERLYEAR) { li = y + (1 < yourtm.tm_mon); yourtm.tm_mday -= year_lengths[isleap(li)]; - if (increment_overflow32(&y, 1)) + if (long_increment_overflow(&y, 1)) goto overflow; } for ( ; ; ) { @@ -2256,11 +2192,11 @@ again: yourtm.tm_mday -= i; if (++yourtm.tm_mon >= MONSPERYEAR) { yourtm.tm_mon = 0; - if (increment_overflow32(&y, 1)) + if (long_increment_overflow(&y, 1)) goto overflow; } } - if (increment_overflow32(&y, -TM_YEAR_BASE)) + if (long_increment_overflow(&y, -TM_YEAR_BASE)) goto overflow; yourtm.tm_year = (int)y; if (yourtm.tm_year != y) @@ -2291,6 +2227,7 @@ again: if (!TYPE_SIGNED(time_t)) { lo = 0; hi = lo - 1; + /* LINTED const not */ } else { lo = 1; for (i = 0; i < (int) TYPE_BIT(time_t) - 1; ++i) @@ -2316,14 +2253,14 @@ again: } else dir = tmcomp(&mytm, &yourtm); if (dir != 0) { if (t == lo) { - if (t == time_t_max) - goto overflow; ++t; + if (t <= lo) + goto overflow; ++lo; } else if (t == hi) { - if (t == time_t_min) - goto overflow; --t; + if (t >= hi) + goto overflow; --hi; } #ifdef NO_ERROR_IN_DST_GAP @@ -2403,7 +2340,7 @@ invalid: static time_t time2(const timezone_t sp, struct tm *const tmp, subfun_t funcp, - const int_fast32_t offset, int *const okayp) + const long offset, int *const okayp) { time_t t; @@ -2418,7 +2355,7 @@ time2(const timezone_t sp, struct tm *const tmp, subfun_t funcp, static time_t time1(const timezone_t sp, struct tm *const tmp, subfun_t funcp, - const int_fast32_t offset) + const long offset) { time_t t; int samei, otheri; @@ -2436,15 +2373,17 @@ time1(const timezone_t sp, struct tm *const tmp, subfun_t funcp, if (tmp->tm_isdst > 1) tmp->tm_isdst = 1; t = time2(sp, tmp, funcp, offset, &okay); +#ifdef PCTS + /* + ** PCTS code courtesy Grant Sullivan. + */ if (okay) return t; if (tmp->tm_isdst < 0) -#ifdef PCTS - /* - ** POSIX Conformance Test Suite code courtesy Grant Sullivan. - */ tmp->tm_isdst = 0; /* reset to std and try again */ -#else +#endif /* defined PCTS */ +#ifndef PCTS + if (okay || tmp->tm_isdst < 0) return t; #endif /* !defined PCTS */ /* @@ -2517,23 +2456,18 @@ timegm(struct tm *const tmp) if (tmp != NULL) tmp->tm_isdst = 0; - t = time1(gmtptr, tmp, gmtsub, 0); + t = time1(gmtptr, tmp, gmtsub, 0L); return t; } extern "C" time_t -timeoff(struct tm *const tmp, long offset) +timeoff(struct tm *const tmp, const long offset) { time_t t; - if ((offset > 0 && offset > INT_FAST32_MAX) || - (offset < 0 && offset < INT_FAST32_MIN)) { - errno = EOVERFLOW; - return -1; - } if (tmp != NULL) tmp->tm_isdst = 0; - t = time1(gmtptr, tmp, gmtsub, (int_fast32_t)offset); + t = time1(gmtptr, tmp, gmtsub, offset); return t; } @@ -2572,7 +2506,7 @@ gtime(struct tm *const tmp) ** when exchanging timestamps with POSIX conforming systems. */ -static int_fast64_t +static long leapcorr(const timezone_t sp, time_t *timep) { struct lsinfo * lp; From d05124dc6beb1379c155bfa0fe5e3bd42a28f280 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Tue, 17 Mar 2020 10:36:34 -0400 Subject: [PATCH 327/520] Cygwin: FIFO: minor change - use NtClose Replace CloseHandle by NtClose since all handles are created by NT functions. --- winsup/cygwin/fhandler_fifo.cc | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 19cd0e507..c091b0add 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -319,7 +319,7 @@ fhandler_fifo::listen_client () __seterrno (); HANDLE evt = InterlockedExchangePointer (&lct_termination_evt, NULL); if (evt) - CloseHandle (evt); + NtClose (evt); return false; } return true; @@ -441,7 +441,7 @@ fhandler_fifo::listen_client_thread () ret = -1; } if (ph) - CloseHandle (ph); + NtClose (ph); fifo_client_unlock (); goto out; default: @@ -462,7 +462,7 @@ fhandler_fifo::listen_client_thread () } out: if (evt) - CloseHandle (evt); + NtClose (evt); ResetEvent (read_ready); if (ret < 0) debug_printf ("exiting with error, %E"); @@ -617,16 +617,16 @@ out: { if (read_ready) { - CloseHandle (read_ready); + NtClose (read_ready); read_ready = NULL; } if (write_ready) { - CloseHandle (write_ready); + NtClose (write_ready); write_ready = NULL; } if (get_handle ()) - CloseHandle (get_handle ()); + NtClose (get_handle ()); if (listen_client_thr) stop_listen_client (); } @@ -775,7 +775,7 @@ fhandler_fifo::raw_write (const void *ptr, size_t len) ret = nbytes; } if (evt) - CloseHandle (evt); + NtClose (evt); if (status == STATUS_THREAD_SIGNALED && ret < 0) set_errno (EINTR); else if (status == STATUS_THREAD_CANCELED) @@ -819,7 +819,7 @@ fhandler_fifo::check_listen_client_thread () switch (waitret) { case WAIT_OBJECT_0: - CloseHandle (listen_client_thr); + NtClose (listen_client_thr); break; case WAIT_TIMEOUT: ret = 1; @@ -828,7 +828,7 @@ fhandler_fifo::check_listen_client_thread () debug_printf ("WaitForSingleObject failed, %E"); ret = -1; __seterrno (); - CloseHandle (listen_client_thr); + NtClose (listen_client_thr); break; } } @@ -1001,11 +1001,11 @@ fhandler_fifo::stop_listen_client () ret = -1; debug_printf ("listen_client_thread exited with error"); } - CloseHandle (thr); + NtClose (thr); } evt = InterlockedExchangePointer (&lct_termination_evt, NULL); if (evt) - CloseHandle (evt); + NtClose (evt); return ret; } @@ -1017,9 +1017,9 @@ fhandler_fifo::close () fifo_client_unlock (); int ret = stop_listen_client (); if (read_ready) - CloseHandle (read_ready); + NtClose (read_ready); if (write_ready) - CloseHandle (write_ready); + NtClose (write_ready); fifo_client_lock (); for (int i = 0; i < nhandlers; i++) if (fc_handler[i].close () < 0) @@ -1070,7 +1070,7 @@ fhandler_fifo::dup (fhandler_base *child, int flags) GetCurrentProcess (), &fhf->write_ready, 0, true, DUPLICATE_SAME_ACCESS)) { - CloseHandle (fhf->read_ready); + NtClose (fhf->read_ready); fhf->close (); __seterrno (); goto out; @@ -1084,8 +1084,8 @@ fhandler_fifo::dup (fhandler_base *child, int flags) 0, true, DUPLICATE_SAME_ACCESS)) { fifo_client_unlock (); - CloseHandle (fhf->read_ready); - CloseHandle (fhf->write_ready); + NtClose (fhf->read_ready); + NtClose (fhf->write_ready); fhf->close (); __seterrno (); goto out; From ce23e97640bd0de35d7d0e384bda89b5161c94c1 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Mon, 16 Mar 2020 18:04:28 -0400 Subject: [PATCH 328/520] Cygwin: FIFO: simplify the fifo_client_handler structure Replace the 'fhandler_base *' member by a HANDLE to the server side of the Windows named pipe instance. Make the corresponding simplifications throughout. --- winsup/cygwin/fhandler.h | 19 +++------- winsup/cygwin/fhandler_fifo.cc | 65 ++++++++-------------------------- 2 files changed, 19 insertions(+), 65 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 1c7336370..e841f96ac 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1284,10 +1284,10 @@ enum struct fifo_client_handler { - fhandler_base *fh; + HANDLE h; fifo_client_connect_state state; - fifo_client_handler () : fh (NULL), state (fc_unknown) {} - int close (); + fifo_client_handler () : h (NULL), state (fc_unknown) {} + void close () { NtClose (h); } /* Returns FILE_PIPE_DISCONNECTED_STATE, FILE_PIPE_LISTENING_STATE, FILE_PIPE_CONNECTED_STATE, FILE_PIPE_CLOSING_STATE, FILE_PIPE_INPUT_AVAILABLE_STATE, or -1 on error. */ @@ -1312,7 +1312,7 @@ class fhandler_fifo: public fhandler_base HANDLE create_pipe_instance (bool); NTSTATUS open_pipe (HANDLE&); int add_client_handler (); - int delete_client_handler (int); + void delete_client_handler (int); bool listen_client (); int stop_listen_client (); int check_listen_client_thread (); @@ -1321,8 +1321,7 @@ public: fhandler_fifo (); bool hit_eof (); int get_nhandlers () const { return nhandlers; } - HANDLE get_fc_handle (int i) const - { return fc_handler[i].fh->get_handle (); } + HANDLE get_fc_handle (int i) const { return fc_handler[i].h; } bool is_connected (int i) const { return fc_handler[i].state == fc_connected; } PUNICODE_STRING get_pipe_name (); @@ -1345,12 +1344,6 @@ public: void fixup_after_fork (HANDLE); void fixup_after_exec (); int __reg2 fstatvfs (struct statvfs *buf); - void clear_readahead () - { - fhandler_base::clear_readahead (); - for (int i = 0; i < nhandlers; i++) - fc_handler[i].fh->clear_readahead (); - } select_record *select_read (select_stuff *); select_record *select_write (select_stuff *); select_record *select_except (select_stuff *); @@ -1374,8 +1367,6 @@ public: /* fhf->pipe_name_buf is a *copy* of this->pipe_name_buf, but fhf->pipe_name.Buffer == this->pipe_name_buf. */ fhf->pipe_name.Buffer = fhf->pipe_name_buf; - for (int i = 0; i < nhandlers; i++) - fhf->fc_handler[i].fh = fc_handler[i].fh->clone (); return fhf; } }; diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index c091b0add..6b71dd950 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -252,7 +252,6 @@ fhandler_fifo::add_client_handler () { int ret = -1; fifo_client_handler fc; - fhandler_base *fh; HANDLE ph = NULL; bool first = (nhandlers == 0); @@ -261,40 +260,26 @@ fhandler_fifo::add_client_handler () set_errno (EMFILE); goto out; } - if (!(fh = build_fh_dev (dev ()))) - { - set_errno (EMFILE); - goto out; - } ph = create_pipe_instance (first); if (!ph) - { - delete fh; - goto out; - } + goto out; else { - fh->set_handle (ph); - fh->set_flags ((openflags & ~O_ACCMODE) | O_RDONLY); - fh->set_nonblocking (false); ret = 0; - fc.fh = fh; - fifo_client_lock (); + fc.h = ph; fc_handler[nhandlers++] = fc; - fifo_client_unlock (); } out: return ret; } -int +void fhandler_fifo::delete_client_handler (int i) { - int ret = fc_handler[i].close (); + fc_handler[i].close (); if (i < --nhandlers) memmove (fc_handler + i, fc_handler + i + 1, (nhandlers - i) * sizeof (fc_handler[i])); - return ret; } /* Just hop to the listen_client_thread method. */ @@ -331,8 +316,7 @@ fhandler_fifo::record_connection (fifo_client_handler& fc) SetEvent (write_ready); fc.state = fc_connected; nconnected++; - fc.fh->set_nonblocking (true); - set_pipe_non_blocking (fc.fh->get_handle (), true); + set_pipe_non_blocking (fc.h, true); } DWORD @@ -355,13 +339,7 @@ fhandler_fifo::listen_client_thread () while (i < nhandlers) { if (fc_handler[i].state == fc_invalid) - { - if (delete_client_handler (i) < 0) - { - fifo_client_unlock (); - goto out; - } - } + delete_client_handler (i); else i++; } @@ -383,7 +361,7 @@ fhandler_fifo::listen_client_thread () NTSTATUS status; IO_STATUS_BLOCK io; - status = NtFsControlFile (fc.fh->get_handle (), evt, NULL, NULL, &io, + status = NtFsControlFile (fc.h, evt, NULL, NULL, &io, FSCTL_PIPE_LISTEN, NULL, 0, NULL, 0); if (status == STATUS_PENDING) { @@ -424,8 +402,7 @@ fhandler_fifo::listen_client_thread () && (NT_SUCCESS (io.Status) || io.Status == STATUS_PIPE_CONNECTED)) { debug_printf ("successfully connected bogus client"); - if (delete_client_handler (nhandlers - 1) < 0) - ret = -1; + delete_client_handler (nhandlers - 1); } else if ((ps = fc.pipe_state ()) == FILE_PIPE_CONNECTED_STATE || ps == FILE_PIPE_INPUT_AVAILABLE_STATE) @@ -948,19 +925,6 @@ fhandler_fifo::fstatvfs (struct statvfs *sfs) return fh.fstatvfs (sfs); } -int -fifo_client_handler::close () -{ - int res = 0; - - if (fh) - { - res = fh->fhandler_base::close (); - delete fh; - } - return res; -} - int fifo_client_handler::pipe_state () { @@ -968,7 +932,7 @@ fifo_client_handler::pipe_state () FILE_PIPE_LOCAL_INFORMATION fpli; NTSTATUS status; - status = NtQueryInformationFile (fh->get_handle (), &io, &fpli, + status = NtQueryInformationFile (h, &io, &fpli, sizeof (fpli), FilePipeLocalInformation); if (!NT_SUCCESS (status)) { @@ -1022,8 +986,7 @@ fhandler_fifo::close () NtClose (write_ready); fifo_client_lock (); for (int i = 0; i < nhandlers; i++) - if (fc_handler[i].close () < 0) - ret = -1; + fc_handler[i].close (); fifo_client_unlock (); return fhandler_base::close () || ret; } @@ -1078,9 +1041,9 @@ fhandler_fifo::dup (fhandler_base *child, int flags) fifo_client_lock (); for (int i = 0; i < nhandlers; i++) { - if (!DuplicateHandle (GetCurrentProcess (), fc_handler[i].fh->get_handle (), + if (!DuplicateHandle (GetCurrentProcess (), fc_handler[i].h, GetCurrentProcess (), - &fhf->fc_handler[i].fh->get_handle (), + &fhf->fc_handler[i].h, 0, true, DUPLICATE_SAME_ACCESS)) { fifo_client_unlock (); @@ -1114,7 +1077,7 @@ fhandler_fifo::fixup_after_fork (HANDLE parent) fork_fixup (parent, write_ready, "write_ready"); fifo_client_lock (); for (int i = 0; i < nhandlers; i++) - fc_handler[i].fh->fhandler_base::fixup_after_fork (parent); + fork_fixup (parent, fc_handler[i].h, "fc_handler[].h"); fifo_client_unlock (); if (reader && !listen_client ()) debug_printf ("failed to start lct, %E"); @@ -1136,6 +1099,6 @@ fhandler_fifo::set_close_on_exec (bool val) set_no_inheritance (write_ready, val); fifo_client_lock (); for (int i = 0; i < nhandlers; i++) - fc_handler[i].fh->fhandler_base::set_close_on_exec (val); + set_no_inheritance (fc_handler[i].h, val); fifo_client_unlock (); } From 32dbc3d21538c814da27ed3e311336700a8387d4 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Wed, 6 May 2020 18:39:26 -0400 Subject: [PATCH 329/520] Cygwin: FIFO: change the fifo_client_connect_state enum Make the values correspond to the possible return values of fifo_client_handler::pipe_state(). When cleaning up the fc_handler list in listen_client_thread(), don't delete handlers in the fc_closing state. I think the pipe might still have input to be read in that case. Set the state to fc_closing later in the same function if a connection is made and the status returned by NtFsControlFile is STATUS_PIPE_CLOSING. In raw_read, don't error out if NtReadFile returns an unexpected status; just set the state of that handler to fc_error. One writer in a bad state doesn't justify giving up on reading. --- winsup/cygwin/fhandler.h | 10 ++++++++-- winsup/cygwin/fhandler_fifo.cc | 29 ++++++++++++++--------------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index e841f96ac..c1f47025a 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1270,11 +1270,16 @@ public: #define CYGWIN_FIFO_PIPE_NAME_LEN 47 #define MAX_CLIENTS 64 +/* The last three are the ones we try to read from. */ enum fifo_client_connect_state { fc_unknown, + fc_error, + fc_disconnected, + fc_listening, fc_connected, - fc_invalid + fc_closing, + fc_input_avail, }; enum @@ -1316,7 +1321,8 @@ class fhandler_fifo: public fhandler_base bool listen_client (); int stop_listen_client (); int check_listen_client_thread (); - void record_connection (fifo_client_handler&); + void record_connection (fifo_client_handler&, + fifo_client_connect_state = fc_connected); public: fhandler_fifo (); bool hit_eof (); diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 6b71dd950..ba3dbb124 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -267,6 +267,7 @@ fhandler_fifo::add_client_handler () { ret = 0; fc.h = ph; + fc.state = fc_listening; fc_handler[nhandlers++] = fc; } out: @@ -311,10 +312,11 @@ fhandler_fifo::listen_client () } void -fhandler_fifo::record_connection (fifo_client_handler& fc) +fhandler_fifo::record_connection (fifo_client_handler& fc, + fifo_client_connect_state s) { SetEvent (write_ready); - fc.state = fc_connected; + fc.state = s; nconnected++; set_pipe_non_blocking (fc.h, true); } @@ -330,15 +332,12 @@ fhandler_fifo::listen_client_thread () while (1) { - /* At the beginning of the loop, all client handlers are - in the fc_connected or fc_invalid state. */ - - /* Delete any invalid clients. */ + /* Cleanup the fc_handler list. */ fifo_client_lock (); int i = 0; while (i < nhandlers) { - if (fc_handler[i].state == fc_invalid) + if (fc_handler[i].state < fc_connected) delete_client_handler (i); else i++; @@ -393,6 +392,10 @@ fhandler_fifo::listen_client_thread () record_connection (fc); ResetEvent (evt); break; + case STATUS_PIPE_CLOSING: + record_connection (fc, fc_closing); + ResetEvent (evt); + break; case STATUS_THREAD_IS_TERMINATING: /* Force NtFsControlFile to complete. Otherwise the next writer to connect might not be recorded in the client @@ -835,7 +838,7 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) /* Poll the connected clients for input. */ fifo_client_lock (); for (int i = 0; i < nhandlers; i++) - if (fc_handler[i].state == fc_connected) + if (fc_handler[i].state >= fc_connected) { NTSTATUS status; IO_STATUS_BLOCK io; @@ -859,18 +862,14 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) case STATUS_PIPE_EMPTY: break; case STATUS_PIPE_BROKEN: - /* Client has disconnected. Mark the client handler - to be deleted when it's safe to do that. */ - fc_handler[i].state = fc_invalid; + fc_handler[i].state = fc_disconnected; nconnected--; break; default: debug_printf ("NtReadFile status %y", status); - __seterrno_from_nt_status (status); - fc_handler[i].state = fc_invalid; + fc_handler[i].state = fc_error; nconnected--; - fifo_client_unlock (); - goto errout; + break; } } fifo_client_unlock (); From 9b2afd78ce612f4d1fda6d17149bb0c78b4a0e1c Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Wed, 29 Apr 2020 18:53:05 -0400 Subject: [PATCH 330/520] Cygwin: FIFO: simplify the listen_client_thread code Always return 0; no one is doing anything with the return value anyway. Remove the return value from stop_listen_client. Make the connection event auto-reset, so that we don't have to reset it later. Simplify the process of connecting a bogus client when thread termination is signaled. Make some failures fatal. Remove the unnecessary extra check for thread termination near the end of listen_client_thread. --- winsup/cygwin/fhandler.h | 4 +- winsup/cygwin/fhandler_fifo.cc | 117 +++++++++++++-------------------- 2 files changed, 47 insertions(+), 74 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index c1f47025a..c8f7a39a2 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1319,7 +1319,7 @@ class fhandler_fifo: public fhandler_base int add_client_handler (); void delete_client_handler (int); bool listen_client (); - int stop_listen_client (); + void stop_listen_client (); int check_listen_client_thread (); void record_connection (fifo_client_handler&, fifo_client_connect_state = fc_connected); @@ -1345,7 +1345,7 @@ public: ssize_t __reg3 raw_write (const void *ptr, size_t ulen); bool arm (HANDLE h); bool need_fixup_before () const { return reader; } - int fixup_before_fork_exec (DWORD) { return stop_listen_client (); } + int fixup_before_fork_exec (DWORD) { stop_listen_client (); return 0; } void init_fixup_before (); void fixup_after_fork (HANDLE); void fixup_after_exec (); diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index ba3dbb124..fb20e5a7e 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -324,11 +324,10 @@ fhandler_fifo::record_connection (fifo_client_handler& fc, DWORD fhandler_fifo::listen_client_thread () { - DWORD ret = -1; - HANDLE evt; + HANDLE conn_evt; - if (!(evt = create_event ())) - goto out; + if (!(conn_evt = CreateEvent (NULL, false, false, NULL))) + api_fatal ("Can't create connection event, %E"); while (1) { @@ -346,7 +345,7 @@ fhandler_fifo::listen_client_thread () /* Create a new client handler. */ if (add_client_handler () < 0) - goto out; + api_fatal ("Can't add a client handler, %E"); /* Allow a writer to open. */ if (!arm (read_ready)) @@ -359,12 +358,13 @@ fhandler_fifo::listen_client_thread () fifo_client_handler& fc = fc_handler[nhandlers - 1]; NTSTATUS status; IO_STATUS_BLOCK io; + bool cancel = false; - status = NtFsControlFile (fc.h, evt, NULL, NULL, &io, + status = NtFsControlFile (fc.h, conn_evt, NULL, NULL, &io, FSCTL_PIPE_LISTEN, NULL, 0, NULL, 0); if (status == STATUS_PENDING) { - HANDLE w[2] = { evt, lct_termination_evt }; + HANDLE w[2] = { conn_evt, lct_termination_evt }; DWORD waitret = WaitForMultipleObjects (2, w, false, INFINITE); switch (waitret) { @@ -372,83 +372,65 @@ fhandler_fifo::listen_client_thread () status = io.Status; break; case WAIT_OBJECT_0 + 1: - ret = 0; status = STATUS_THREAD_IS_TERMINATING; + cancel = true; break; default: - __seterrno (); - debug_printf ("WaitForMultipleObjects failed, %E"); - status = STATUS_THREAD_IS_TERMINATING; - break; + api_fatal ("WFMO failed, %E"); } } HANDLE ph = NULL; - int ps = -1; + NTSTATUS status1; + fifo_client_lock (); switch (status) { case STATUS_SUCCESS: case STATUS_PIPE_CONNECTED: record_connection (fc); - ResetEvent (evt); break; case STATUS_PIPE_CLOSING: record_connection (fc, fc_closing); - ResetEvent (evt); break; case STATUS_THREAD_IS_TERMINATING: - /* Force NtFsControlFile to complete. Otherwise the next - writer to connect might not be recorded in the client - handler list. */ - status = open_pipe (ph); - if (NT_SUCCESS (status) - && (NT_SUCCESS (io.Status) || io.Status == STATUS_PIPE_CONNECTED)) - { - debug_printf ("successfully connected bogus client"); - delete_client_handler (nhandlers - 1); - } - else if ((ps = fc.pipe_state ()) == FILE_PIPE_CONNECTED_STATE - || ps == FILE_PIPE_INPUT_AVAILABLE_STATE) - { - /* A connection was made under our nose. */ - debug_printf ("recording connection before terminating"); - record_connection (fc); - } + /* Try to connect a bogus client. Otherwise fc is still + listening, and the next connection might not get recorded. */ + status1 = open_pipe (ph); + WaitForSingleObject (conn_evt, INFINITE); + if (NT_SUCCESS (status1)) + /* Bogus cilent connected. */ + delete_client_handler (nhandlers - 1); else - { - debug_printf ("failed to terminate NtFsControlFile cleanly"); - delete_client_handler (nhandlers - 1); - ret = -1; - } - if (ph) - NtClose (ph); - fifo_client_unlock (); - goto out; + /* Did a real client connect? */ + switch (io.Status) + { + case STATUS_SUCCESS: + case STATUS_PIPE_CONNECTED: + record_connection (fc); + break; + case STATUS_PIPE_CLOSING: + record_connection (fc, fc_closing); + break; + default: + debug_printf ("NtFsControlFile status %y after failing to connect bogus client or real client", io.Status); + fc.state = fc_unknown; + break; + } + break; default: - debug_printf ("NtFsControlFile status %y", status); - __seterrno_from_nt_status (status); - delete_client_handler (nhandlers - 1); - fifo_client_unlock (); - goto out; + break; } fifo_client_unlock (); - /* Check for thread termination in case WaitForMultipleObjects - didn't get called above. */ - if (IsEventSignalled (lct_termination_evt)) - { - ret = 0; - goto out; - } + if (ph) + NtClose (ph); + if (cancel) + goto out; } out: - if (evt) - NtClose (evt); + if (conn_evt) + NtClose (conn_evt); ResetEvent (read_ready); - if (ret < 0) - debug_printf ("exiting with error, %E"); - else - debug_printf ("exiting without error"); - return ret; + return 0; } int @@ -945,10 +927,9 @@ fifo_client_handler::pipe_state () return fpli.NamedPipeState; } -int +void fhandler_fifo::stop_listen_client () { - int ret = 0; HANDLE thr, evt; thr = InterlockedExchangePointer (&listen_client_thr, NULL); @@ -957,19 +938,11 @@ fhandler_fifo::stop_listen_client () if (lct_termination_evt) SetEvent (lct_termination_evt); WaitForSingleObject (thr, INFINITE); - DWORD err; - GetExitCodeThread (thr, &err); - if (err) - { - ret = -1; - debug_printf ("listen_client_thread exited with error"); - } NtClose (thr); } evt = InterlockedExchangePointer (&lct_termination_evt, NULL); if (evt) NtClose (evt); - return ret; } int @@ -978,7 +951,7 @@ fhandler_fifo::close () /* Avoid deadlock with lct in case this is called from a signal handler or another thread. */ fifo_client_unlock (); - int ret = stop_listen_client (); + stop_listen_client (); if (read_ready) NtClose (read_ready); if (write_ready) @@ -987,7 +960,7 @@ fhandler_fifo::close () for (int i = 0; i < nhandlers; i++) fc_handler[i].close (); fifo_client_unlock (); - return fhandler_base::close () || ret; + return fhandler_base::close (); } /* If we have a write handle (i.e., we're a duplexer or a writer), From 25e8727368a1565dac565bf89c5effced5f0ada2 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Thu, 23 Apr 2020 08:14:05 -0400 Subject: [PATCH 331/520] Cygwin: FIFO: remove the arm method There's no reason to check for errors when we set read_ready or write_ready. We don't do that for other events. --- winsup/cygwin/fhandler.h | 1 - winsup/cygwin/fhandler_fifo.cc | 34 +++------------------------------- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index c8f7a39a2..4d691a0fc 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1343,7 +1343,6 @@ public: void set_close_on_exec (bool val); void __reg3 raw_read (void *ptr, size_t& ulen); ssize_t __reg3 raw_write (const void *ptr, size_t ulen); - bool arm (HANDLE h); bool need_fixup_before () const { return reader; } int fixup_before_fork_exec (DWORD) { stop_listen_client (); return 0; } void init_fixup_before (); diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index fb20e5a7e..44919c19e 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -93,28 +93,6 @@ sec_user_cloexec (bool cloexec, PSECURITY_ATTRIBUTES sa, PSID sid) return cloexec ? sec_user_nih (sa, sid) : sec_user (sa, sid); } -bool inline -fhandler_fifo::arm (HANDLE h) -{ -#ifdef DEBUGGING - const char *what; - if (h == read_ready) - what = "reader"; - else - what = "writer"; - debug_only_printf ("arming %s", what); -#endif - - bool res = SetEvent (h); - if (!res) -#ifdef DEBUGGING - debug_printf ("SetEvent for %s failed, %E", what); -#else - debug_printf ("SetEvent failed, %E"); -#endif - return res; -} - static HANDLE create_event () { @@ -348,11 +326,7 @@ fhandler_fifo::listen_client_thread () api_fatal ("Can't add a client handler, %E"); /* Allow a writer to open. */ - if (!arm (read_ready)) - { - __seterrno (); - goto out; - } + SetEvent (read_ready); /* Listen for a writer to connect to the new client handler. */ fifo_client_handler& fc = fc_handler[nhandlers - 1]; @@ -555,10 +529,8 @@ fhandler_fifo::open (int flags, mode_t) if (NT_SUCCESS (status)) { set_pipe_non_blocking (get_handle (), flags & O_NONBLOCK); - if (!arm (write_ready)) - res = error_set_errno; - else - res = success; + SetEvent (write_ready); + res = success; goto out; } else if (STATUS_PIPE_NO_INSTANCE_AVAILABLE (status)) From 624fda1e96adf3c4de745115d97fe254d4be53e8 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Wed, 25 Mar 2020 09:31:29 -0400 Subject: [PATCH 332/520] Cygwin: FIFO: honor the flags argument in dup Also improve the error handling. --- winsup/cygwin/fhandler_fifo.cc | 60 +++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 44919c19e..f61e2fe72 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -955,56 +955,62 @@ fhandler_fifo::fcntl (int cmd, intptr_t arg) int fhandler_fifo::dup (fhandler_base *child, int flags) { - int ret = -1; + int i = 0; fhandler_fifo *fhf = NULL; if (get_flags () & O_PATH) return fhandler_base::dup (child, flags); if (fhandler_base::dup (child, flags)) - goto out; + goto err; fhf = (fhandler_fifo *) child; if (!DuplicateHandle (GetCurrentProcess (), read_ready, GetCurrentProcess (), &fhf->read_ready, - 0, true, DUPLICATE_SAME_ACCESS)) + 0, !(flags & O_CLOEXEC), DUPLICATE_SAME_ACCESS)) { - fhf->close (); __seterrno (); - goto out; + goto err; } if (!DuplicateHandle (GetCurrentProcess (), write_ready, GetCurrentProcess (), &fhf->write_ready, - 0, true, DUPLICATE_SAME_ACCESS)) + 0, !(flags & O_CLOEXEC), DUPLICATE_SAME_ACCESS)) { - NtClose (fhf->read_ready); - fhf->close (); __seterrno (); - goto out; + goto err_close_read_ready; } - fifo_client_lock (); - for (int i = 0; i < nhandlers; i++) + if (reader) { - if (!DuplicateHandle (GetCurrentProcess (), fc_handler[i].h, - GetCurrentProcess (), - &fhf->fc_handler[i].h, - 0, true, DUPLICATE_SAME_ACCESS)) + fifo_client_lock (); + for (i = 0; i < nhandlers; i++) + { + if (!DuplicateHandle (GetCurrentProcess (), fc_handler[i].h, + GetCurrentProcess (), &fhf->fc_handler[i].h, + 0, !(flags & O_CLOEXEC), DUPLICATE_SAME_ACCESS)) + { + __seterrno (); + break; + } + } + if (i < nhandlers) { fifo_client_unlock (); - NtClose (fhf->read_ready); - NtClose (fhf->write_ready); - fhf->close (); - __seterrno (); - goto out; + goto err_close_handlers; } + fifo_client_unlock (); + if (!fhf->listen_client ()) + goto err_close_handlers; + fhf->init_fixup_before (); } - fifo_client_unlock (); - if (!reader || fhf->listen_client ()) - ret = 0; - if (reader) - fhf->init_fixup_before (); -out: - return ret; + return 0; +err_close_handlers: + for (int j = 0; j < i; j++) + fhf->fc_handler[j].close (); + NtClose (fhf->write_ready); +err_close_read_ready: + NtClose (fhf->read_ready); +err: + return -1; } void From 13c65c43c24015f75b6488dc476b8d7b22c84f18 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Mon, 4 May 2020 11:36:20 -0400 Subject: [PATCH 333/520] Cygwin: FIFO: dup/fork/exec: make sure child starts unlocked There can be deadlocks if the child starts with its fifo_client_lock in the locked state. --- winsup/cygwin/fhandler_fifo.cc | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index f61e2fe72..4904a535d 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -981,6 +981,9 @@ fhandler_fifo::dup (fhandler_base *child, int flags) } if (reader) { + /* Make sure the child starts unlocked. */ + fhf->fifo_client_unlock (); + fifo_client_lock (); for (i = 0; i < nhandlers; i++) { @@ -1025,20 +1028,32 @@ fhandler_fifo::fixup_after_fork (HANDLE parent) fhandler_base::fixup_after_fork (parent); fork_fixup (parent, read_ready, "read_ready"); fork_fixup (parent, write_ready, "write_ready"); - fifo_client_lock (); - for (int i = 0; i < nhandlers; i++) - fork_fixup (parent, fc_handler[i].h, "fc_handler[].h"); - fifo_client_unlock (); - if (reader && !listen_client ()) - debug_printf ("failed to start lct, %E"); + if (reader) + { + /* Make sure the child starts unlocked. */ + fifo_client_unlock (); + + fifo_client_lock (); + for (int i = 0; i < nhandlers; i++) + fork_fixup (parent, fc_handler[i].h, "fc_handler[].h"); + fifo_client_unlock (); + if (!listen_client ()) + debug_printf ("failed to start lct, %E"); + } } void fhandler_fifo::fixup_after_exec () { fhandler_base::fixup_after_exec (); - if (reader && !listen_client ()) - debug_printf ("failed to start lct, %E"); + if (reader && !close_on_exec ()) + { + /* Make sure the child starts unlocked. */ + fifo_client_unlock (); + + if (!listen_client ()) + debug_printf ("failed to start lct, %E"); + } } void From 301454f1320bf1cfaf826fcabf5556cb20ee642a Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sun, 26 Apr 2020 09:38:46 -0400 Subject: [PATCH 334/520] Cygwin: FIFO: fix hit_eof According to Posix, a FIFO open for reading is at EOF if it is empty and there are no writers open. The only way to test this is to poll the fifo_client_handlers as in raw_read and select.cc:peek_fifo. The current hit_eof instead relies on the value of nconnected, which can be out of date. On the one hand, it doesn't take into account writers that were connected but have since closed. On the other hand, it doesn't take into account writers that are in the process of opening but haven't yet connected. Fix this by introducing a maybe_eof method that tentatively assumes EOF if there are no connected writers after polling. Then check for writers currently opening (via a new 'writer_opening' event), and wait for the fifo_reader_thread to record any new connection that was made while we were polling. To handle the needs of peek_fifo, replace the get_fc_handle method by a get_fc_handler method, and add a fifo_client_handler::get_state method. Remove the is_connected method, which was used only in peek_fifo and is no longer needed. Remove the nconnected data member, which was used only for the flawed hit_eof. Add some comments about events to fhandler.h. --- winsup/cygwin/fhandler.h | 19 +++++--- winsup/cygwin/fhandler_fifo.cc | 84 ++++++++++++++++++++++------------ winsup/cygwin/select.cc | 44 ++++++++++++------ 3 files changed, 98 insertions(+), 49 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 4d691a0fc..3bc04cf13 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1296,19 +1296,26 @@ struct fifo_client_handler /* Returns FILE_PIPE_DISCONNECTED_STATE, FILE_PIPE_LISTENING_STATE, FILE_PIPE_CONNECTED_STATE, FILE_PIPE_CLOSING_STATE, FILE_PIPE_INPUT_AVAILABLE_STATE, or -1 on error. */ + fifo_client_connect_state &get_state () { return state; } int pipe_state (); }; class fhandler_fifo: public fhandler_base { - HANDLE read_ready; - HANDLE write_ready; + /* Handles to named events shared by all fhandlers for a given FIFO. */ + HANDLE read_ready; /* A reader is open; OK for a writer to open. */ + HANDLE write_ready; /* A writer is open; OK for a reader to open. */ + HANDLE writer_opening; /* A writer is opening; no EOF. */ + + /* Non-shared handles needed for the listen_client_thread. */ HANDLE listen_client_thr; HANDLE lct_termination_evt; + UNICODE_STRING pipe_name; WCHAR pipe_name_buf[CYGWIN_FIFO_PIPE_NAME_LEN + 1]; + bool _maybe_eof; fifo_client_handler fc_handler[MAX_CLIENTS]; - int nhandlers, nconnected; + int nhandlers; af_unix_spinlock_t _fifo_client_lock; bool reader, writer, duplexer; size_t max_atomic_write; @@ -1326,10 +1333,10 @@ class fhandler_fifo: public fhandler_base public: fhandler_fifo (); bool hit_eof (); + bool maybe_eof () const { return _maybe_eof; } + void maybe_eof (bool val) { _maybe_eof = val; } int get_nhandlers () const { return nhandlers; } - HANDLE get_fc_handle (int i) const { return fc_handler[i].h; } - bool is_connected (int i) const - { return fc_handler[i].state == fc_connected; } + fifo_client_handler get_fc_handler (int i) const { return fc_handler[i]; } PUNICODE_STRING get_pipe_name (); DWORD listen_client_thread (); void fifo_client_lock () { _fifo_client_lock.lock (); } diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 4904a535d..21faf4ec2 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -66,9 +66,10 @@ STATUS_PIPE_EMPTY simply means there's no data to be read. */ || _s == STATUS_PIPE_BUSY; }) fhandler_fifo::fhandler_fifo (): - fhandler_base (), read_ready (NULL), write_ready (NULL), - listen_client_thr (NULL), lct_termination_evt (NULL), nhandlers (0), - nconnected (0), reader (false), writer (false), duplexer (false), + fhandler_base (), + read_ready (NULL), write_ready (NULL), writer_opening (NULL), + listen_client_thr (NULL), lct_termination_evt (NULL), _maybe_eof (false), nhandlers (0), + reader (false), writer (false), duplexer (false), max_atomic_write (DEFAULT_PIPEBUFSIZE) { pipe_name_buf[0] = L'\0'; @@ -295,7 +296,8 @@ fhandler_fifo::record_connection (fifo_client_handler& fc, { SetEvent (write_ready); fc.state = s; - nconnected++; + maybe_eof (false); + ResetEvent (writer_opening); set_pipe_non_blocking (fc.h, true); } @@ -465,6 +467,13 @@ fhandler_fifo::open (int flags, mode_t) res = error_set_errno; goto out; } + npbuf[0] = 'o'; + if (!(writer_opening = CreateEvent (sa_buf, true, false, npbuf))) + { + debug_printf ("CreateEvent for %s failed, %E", npbuf); + res = error_set_errno; + goto out; + } /* If we're a duplexer, create the pipe and the first client handler. */ if (duplexer) @@ -518,10 +527,12 @@ fhandler_fifo::open (int flags, mode_t) listen_client thread is running. Then signal write_ready. */ if (writer) { + SetEvent (writer_opening); while (1) { if (!wait (read_ready)) { + ResetEvent (writer_opening); res = error_errno_set; goto out; } @@ -540,6 +551,7 @@ fhandler_fifo::open (int flags, mode_t) debug_printf ("create of writer failed"); __seterrno_from_nt_status (status); res = error_errno_set; + ResetEvent (writer_opening); goto out; } } @@ -559,6 +571,11 @@ out: NtClose (write_ready); write_ready = NULL; } + if (writer_opening) + { + NtClose (writer_opening); + writer_opening = NULL; + } if (get_handle ()) NtClose (get_handle ()); if (listen_client_thr) @@ -717,28 +734,23 @@ fhandler_fifo::raw_write (const void *ptr, size_t len) return ret; } -/* A FIFO open for reading is at EOF if no process has it open for - writing. We test this by checking nconnected. But we must take - account of the possible delay from the time of connection to the - time the connection is recorded by the listen_client thread. */ +/* A reader is at EOF if the pipe is empty and no writers are open. + hit_eof is called by raw_read and select.cc:peek_fifo if it appears + that we are at EOF after polling the fc_handlers. We recheck this + in case a writer opened while we were polling. */ bool fhandler_fifo::hit_eof () { - bool eof; - bool retry = true; - -repeat: + bool ret = maybe_eof () && !IsEventSignalled (writer_opening); + if (ret) + { + yield (); + /* Wait for the reader thread to finish recording any connection. */ fifo_client_lock (); - eof = (nconnected == 0); fifo_client_unlock (); - if (eof && retry) - { - retry = false; - /* Give the listen_client thread time to catch up. */ - Sleep (1); - goto repeat; - } - return eof; + ret = maybe_eof (); + } + return ret; } /* Is the lct running? */ @@ -783,13 +795,8 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) while (1) { - if (hit_eof ()) - { - len = 0; - return; - } - /* Poll the connected clients for input. */ + int nconnected = 0; fifo_client_lock (); for (int i = 0; i < nhandlers; i++) if (fc_handler[i].state >= fc_connected) @@ -798,7 +805,8 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) IO_STATUS_BLOCK io; size_t nbytes = 0; - status = NtReadFile (get_fc_handle (i), NULL, NULL, NULL, + nconnected++; + status = NtReadFile (fc_handler[i].h, NULL, NULL, NULL, &io, in_ptr, len, NULL, NULL); switch (status) { @@ -826,7 +834,13 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) break; } } + maybe_eof (!nconnected && !IsEventSignalled (writer_opening)); fifo_client_unlock (); + if (maybe_eof () && hit_eof ()) + { + len = 0; + return; + } if (is_nonblocking ()) { set_errno (EAGAIN); @@ -928,6 +942,8 @@ fhandler_fifo::close () NtClose (read_ready); if (write_ready) NtClose (write_ready); + if (writer_opening) + NtClose (writer_opening); fifo_client_lock (); for (int i = 0; i < nhandlers; i++) fc_handler[i].close (); @@ -979,6 +995,13 @@ fhandler_fifo::dup (fhandler_base *child, int flags) __seterrno (); goto err_close_read_ready; } + if (!DuplicateHandle (GetCurrentProcess (), writer_opening, + GetCurrentProcess (), &fhf->writer_opening, + 0, !(flags & O_CLOEXEC), DUPLICATE_SAME_ACCESS)) + { + __seterrno (); + goto err_close_write_ready; + } if (reader) { /* Make sure the child starts unlocked. */ @@ -1009,6 +1032,9 @@ fhandler_fifo::dup (fhandler_base *child, int flags) err_close_handlers: for (int j = 0; j < i; j++) fhf->fc_handler[j].close (); +/* err_close_writer_opening: */ + NtClose (fhf->writer_opening); +err_close_write_ready: NtClose (fhf->write_ready); err_close_read_ready: NtClose (fhf->read_ready); @@ -1028,6 +1054,7 @@ fhandler_fifo::fixup_after_fork (HANDLE parent) fhandler_base::fixup_after_fork (parent); fork_fixup (parent, read_ready, "read_ready"); fork_fixup (parent, write_ready, "write_ready"); + fork_fixup (parent, writer_opening, "writer_opening"); if (reader) { /* Make sure the child starts unlocked. */ @@ -1062,6 +1089,7 @@ fhandler_fifo::set_close_on_exec (bool val) fhandler_base::set_close_on_exec (val); set_no_inheritance (read_ready, val); set_no_inheritance (write_ready, val); + set_no_inheritance (writer_opening, val); fifo_client_lock (); for (int i = 0; i < nhandlers; i++) set_no_inheritance (fc_handler[i].h, val); diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index b5d19cf31..9323c423f 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -866,31 +866,45 @@ peek_fifo (select_record *s, bool from_select) goto out; } - if (fh->hit_eof ()) - { - select_printf ("read: %s, saw EOF", fh->get_name ()); - gotone = s->read_ready = true; - if (s->except_selected) - gotone += s->except_ready = true; - goto out; - } - fh->fifo_client_lock (); + int nconnected = 0; for (int i = 0; i < fh->get_nhandlers (); i++) - if (fh->is_connected (i)) + if (fh->get_fc_handler (i).get_state () >= fc_connected) { - int n = pipe_data_available (s->fd, fh, fh->get_fc_handle (i), - false); - if (n > 0) + nconnected++; + switch (fh->get_fc_handler (i).pipe_state ()) { - select_printf ("read: %s, ready for read: avail %d, client %d", - fh->get_name (), n, i); + case FILE_PIPE_CONNECTED_STATE: + fh->get_fc_handler (i).get_state () = fc_connected; + break; + case FILE_PIPE_DISCONNECTED_STATE: + fh->get_fc_handler (i).get_state () = fc_disconnected; + nconnected--; + break; + case FILE_PIPE_CLOSING_STATE: + fh->get_fc_handler (i).get_state () = fc_closing; + break; + case FILE_PIPE_INPUT_AVAILABLE_STATE: + fh->get_fc_handler (i).get_state () = fc_input_avail; + select_printf ("read: %s, ready for read", fh->get_name ()); fh->fifo_client_unlock (); gotone += s->read_ready = true; goto out; + default: + fh->get_fc_handler (i).get_state () = fc_error; + nconnected--; + break; } } + fh->maybe_eof (!nconnected); fh->fifo_client_unlock (); + if (fh->maybe_eof () && fh->hit_eof ()) + { + select_printf ("read: %s, saw EOF", fh->get_name ()); + gotone += s->read_ready = true; + if (s->except_selected) + gotone += s->except_ready = true; + } } out: if (s->write_selected) From 9ee8fdf2b3a371cb14fb902a8c9aab76dd60f4e2 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Tue, 17 Mar 2020 14:14:47 -0400 Subject: [PATCH 335/520] Cygwin: FIFO: make opening a writer more robust - Make read_ready a manual-reset event. - Signal read_ready in open instead of in the listen_client_thread. - Don't reset read_ready when the listen_client thread terminates; instead do it in close(). - Rearrange open and change its error handling. - Add a wait_open_pipe method that waits for a pipe instance to be available and then calls open_pipe. Use it when opening a writer if we can't connect immediately. This can happen if the system is heavily loaded and/or if many writers are trying to open simultaneously. --- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_fifo.cc | 271 ++++++++++++++++++++------------- 2 files changed, 170 insertions(+), 102 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 3bc04cf13..2516c93b4 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1323,6 +1323,7 @@ class fhandler_fifo: public fhandler_base static NTSTATUS npfs_handle (HANDLE &); HANDLE create_pipe_instance (bool); NTSTATUS open_pipe (HANDLE&); + NTSTATUS wait_open_pipe (HANDLE&); int add_client_handler (); void delete_client_handler (int); bool listen_client (); diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 21faf4ec2..5c3df5497 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -222,7 +222,64 @@ fhandler_fifo::open_pipe (HANDLE& ph) openflags & O_CLOEXEC ? 0 : OBJ_INHERIT, npfsh, NULL); sharing = FILE_SHARE_READ | FILE_SHARE_WRITE; - status = NtOpenFile (&ph, access, &attr, &io, sharing, 0); + return NtOpenFile (&ph, access, &attr, &io, sharing, 0); +} + +/* Wait up to 100ms for a pipe instance to be available, then connect. */ +NTSTATUS +fhandler_fifo::wait_open_pipe (HANDLE& ph) +{ + HANDLE npfsh; + HANDLE evt; + NTSTATUS status; + IO_STATUS_BLOCK io; + ULONG pwbuf_size; + PFILE_PIPE_WAIT_FOR_BUFFER pwbuf; + LONGLONG stamp; + LONGLONG orig_timeout = -100 * NS100PERSEC / MSPERSEC; /* 100ms */ + + status = npfs_handle (npfsh); + if (!NT_SUCCESS (status)) + return status; + if (!(evt = create_event ())) + api_fatal ("Can't create event, %E"); + pwbuf_size + = offsetof (FILE_PIPE_WAIT_FOR_BUFFER, Name) + get_pipe_name ()->Length; + pwbuf = (PFILE_PIPE_WAIT_FOR_BUFFER) alloca (pwbuf_size); + pwbuf->Timeout.QuadPart = orig_timeout; + pwbuf->NameLength = get_pipe_name ()->Length; + pwbuf->TimeoutSpecified = TRUE; + memcpy (pwbuf->Name, get_pipe_name ()->Buffer, get_pipe_name ()->Length); + stamp = get_clock (CLOCK_MONOTONIC)->n100secs (); + bool retry; + do + { + retry = false; + status = NtFsControlFile (npfsh, evt, NULL, NULL, &io, FSCTL_PIPE_WAIT, + pwbuf, pwbuf_size, NULL, 0); + if (status == STATUS_PENDING) + { + if (WaitForSingleObject (evt, INFINITE) == WAIT_OBJECT_0) + status = io.Status; + else + api_fatal ("WFSO failed, %E"); + } + if (NT_SUCCESS (status)) + status = open_pipe (ph); + if (STATUS_PIPE_NO_INSTANCE_AVAILABLE (status)) + { + /* Another writer has grabbed the pipe instance. Adjust + the timeout and keep waiting if there's time left. */ + pwbuf->Timeout.QuadPart = orig_timeout + + get_clock (CLOCK_MONOTONIC)->n100secs () - stamp; + if (pwbuf->Timeout.QuadPart < 0) + retry = true; + else + status = STATUS_IO_TIMEOUT; + } + } + while (retry); + NtClose (evt); return status; } @@ -294,7 +351,6 @@ void fhandler_fifo::record_connection (fifo_client_handler& fc, fifo_client_connect_state s) { - SetEvent (write_ready); fc.state = s; maybe_eof (false); ResetEvent (writer_opening); @@ -327,9 +383,6 @@ fhandler_fifo::listen_client_thread () if (add_client_handler () < 0) api_fatal ("Can't add a client handler, %E"); - /* Allow a writer to open. */ - SetEvent (read_ready); - /* Listen for a writer to connect to the new client handler. */ fifo_client_handler& fc = fc_handler[nhandlers - 1]; NTSTATUS status; @@ -405,19 +458,13 @@ fhandler_fifo::listen_client_thread () out: if (conn_evt) NtClose (conn_evt); - ResetEvent (read_ready); return 0; } int fhandler_fifo::open (int flags, mode_t) { - enum - { - success, - error_errno_set, - error_set_errno - } res; + int saved_errno = 0; if (flags & O_PATH) return open_fs (flags); @@ -437,8 +484,7 @@ fhandler_fifo::open (int flags, mode_t) break; default: set_errno (EINVAL); - res = error_errno_set; - goto out; + goto err; } debug_only_printf ("reader %d, writer %d, duplexer %d", reader, writer, duplexer); @@ -454,135 +500,151 @@ fhandler_fifo::open (int flags, mode_t) char npbuf[MAX_PATH]; __small_sprintf (npbuf, "r-event.%08x.%016X", get_dev (), get_ino ()); - if (!(read_ready = CreateEvent (sa_buf, false, false, npbuf))) + if (!(read_ready = CreateEvent (sa_buf, true, false, npbuf))) { debug_printf ("CreateEvent for %s failed, %E", npbuf); - res = error_set_errno; - goto out; + __seterrno (); + goto err; } npbuf[0] = 'w'; if (!(write_ready = CreateEvent (sa_buf, true, false, npbuf))) { debug_printf ("CreateEvent for %s failed, %E", npbuf); - res = error_set_errno; - goto out; + __seterrno (); + goto err_close_read_ready; } npbuf[0] = 'o'; if (!(writer_opening = CreateEvent (sa_buf, true, false, npbuf))) { debug_printf ("CreateEvent for %s failed, %E", npbuf); - res = error_set_errno; - goto out; + __seterrno (); + goto err_close_write_ready; } - /* If we're a duplexer, create the pipe and the first client handler. */ - if (duplexer) - { - HANDLE ph = NULL; - - if (add_client_handler () < 0) - { - res = error_errno_set; - goto out; - } - NTSTATUS status = open_pipe (ph); - if (NT_SUCCESS (status)) - { - record_connection (fc_handler[0]); - set_handle (ph); - set_pipe_non_blocking (ph, flags & O_NONBLOCK); - } - else - { - __seterrno_from_nt_status (status); - res = error_errno_set; - goto out; - } - } - - /* If we're reading, start the listen_client thread (which should - signal read_ready), and wait for a writer. */ + /* If we're reading, signal read_ready and start the listen_client + thread. */ if (reader) { if (!listen_client ()) { debug_printf ("create of listen_client thread failed"); - res = error_errno_set; - goto out; + goto err_close_writer_opening; } - else if (!duplexer && !wait (write_ready)) + SetEvent (read_ready); + + /* If we're a duplexer, we need a handle for writing. */ + if (duplexer) { - res = error_errno_set; - goto out; - } - else - { - init_fixup_before (); - res = success; + HANDLE ph = NULL; + NTSTATUS status; + + while (1) + { + status = open_pipe (ph); + if (NT_SUCCESS (status)) + { + set_handle (ph); + set_pipe_non_blocking (ph, flags & O_NONBLOCK); + break; + } + else if (status == STATUS_OBJECT_NAME_NOT_FOUND) + { + /* The pipe hasn't been created yet. */ + yield (); + continue; + } + else + { + __seterrno_from_nt_status (status); + goto err_close_reader; + } + } } + /* Not a duplexer; wait for a writer to connect. */ + else if (!wait (write_ready)) + goto err_close_reader; + init_fixup_before (); + goto success; } - /* If we're writing, wait for read_ready and then connect to the - pipe. This should always succeed quickly if the reader's - listen_client thread is running. Then signal write_ready. */ + /* If we're writing, wait for read_ready, connect to the pipe, and + signal write_ready. */ if (writer) { + NTSTATUS status; + SetEvent (writer_opening); + if (!wait (read_ready)) + { + ResetEvent (writer_opening); + goto err_close_writer_opening; + } while (1) { - if (!wait (read_ready)) - { - ResetEvent (writer_opening); - res = error_errno_set; - goto out; - } - NTSTATUS status = open_pipe (get_handle ()); + status = open_pipe (get_handle ()); if (NT_SUCCESS (status)) + goto writer_success; + else if (status == STATUS_OBJECT_NAME_NOT_FOUND) { - set_pipe_non_blocking (get_handle (), flags & O_NONBLOCK); - SetEvent (write_ready); - res = success; - goto out; + /* The pipe hasn't been created yet. */ + yield (); + continue; } else if (STATUS_PIPE_NO_INSTANCE_AVAILABLE (status)) - Sleep (1); + break; else { debug_printf ("create of writer failed"); __seterrno_from_nt_status (status); - res = error_errno_set; ResetEvent (writer_opening); - goto out; + goto err_close_writer_opening; + } + } + + /* We should get here only if the system is heavily loaded + and/or many writers are trying to connect simultaneously */ + while (1) + { + SetEvent (writer_opening); + if (!wait (read_ready)) + { + ResetEvent (writer_opening); + goto err_close_writer_opening; + } + status = wait_open_pipe (get_handle ()); + if (NT_SUCCESS (status)) + goto writer_success; + else if (status == STATUS_IO_TIMEOUT) + continue; + else + { + debug_printf ("create of writer failed"); + __seterrno_from_nt_status (status); + ResetEvent (writer_opening); + goto err_close_writer_opening; } } } -out: - if (res == error_set_errno) - __seterrno (); - if (res != success) - { - if (read_ready) - { - NtClose (read_ready); - read_ready = NULL; - } - if (write_ready) - { - NtClose (write_ready); - write_ready = NULL; - } - if (writer_opening) - { - NtClose (writer_opening); - writer_opening = NULL; - } - if (get_handle ()) - NtClose (get_handle ()); - if (listen_client_thr) - stop_listen_client (); - } - debug_printf ("res %d", res); - return res == success; +writer_success: + set_pipe_non_blocking (get_handle (), flags & O_NONBLOCK); + SetEvent (write_ready); +success: + return 1; +err_close_reader: + saved_errno = get_errno (); + close (); + set_errno (saved_errno); + return 0; +err_close_writer_opening: + NtClose (writer_opening); +err_close_write_ready: + NtClose (write_ready); +err_close_read_ready: + NtClose (read_ready); +err: + if (get_handle ()) + NtClose (get_handle ()); + return 0; } off_t @@ -938,6 +1000,11 @@ fhandler_fifo::close () handler or another thread. */ fifo_client_unlock (); stop_listen_client (); + if (reader) + /* FIXME: There could be several readers open because of + dup/fork/exec; we should only reset read_ready when the last + one closes. */ + ResetEvent (read_ready); if (read_ready) NtClose (read_ready); if (write_ready) From 71726ba70bccfed084590760f8b57f050e1bb017 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Thu, 26 Mar 2020 14:29:50 -0400 Subject: [PATCH 336/520] Cygwin: FIFO: use a cygthread instead of a homemade thread This will simplify future work. Rename the thread from "listen_client_thread" to "fifo_reader_thread" because it will be used for more than just listening. Remove the fixup_before stuff, which won't be needed after future changes to fixup_after_fork and fixup_after_exec. --- winsup/cygwin/fhandler.h | 17 ++-- winsup/cygwin/fhandler_fifo.cc | 173 +++++++++++---------------------- 2 files changed, 65 insertions(+), 125 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 2516c93b4..5e6a1d1db 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1307,9 +1307,9 @@ class fhandler_fifo: public fhandler_base HANDLE write_ready; /* A writer is open; OK for a reader to open. */ HANDLE writer_opening; /* A writer is opening; no EOF. */ - /* Non-shared handles needed for the listen_client_thread. */ - HANDLE listen_client_thr; - HANDLE lct_termination_evt; + /* Handles to non-shared events needed for fifo_reader_threads. */ + HANDLE cancel_evt; /* Signal thread to terminate. */ + HANDLE thr_sync_evt; /* The thread has terminated. */ UNICODE_STRING pipe_name; WCHAR pipe_name_buf[CYGWIN_FIFO_PIPE_NAME_LEN + 1]; @@ -1326,11 +1326,10 @@ class fhandler_fifo: public fhandler_base NTSTATUS wait_open_pipe (HANDLE&); int add_client_handler (); void delete_client_handler (int); - bool listen_client (); - void stop_listen_client (); - int check_listen_client_thread (); + void cancel_reader_thread (); void record_connection (fifo_client_handler&, fifo_client_connect_state = fc_connected); + public: fhandler_fifo (); bool hit_eof (); @@ -1339,7 +1338,7 @@ public: int get_nhandlers () const { return nhandlers; } fifo_client_handler get_fc_handler (int i) const { return fc_handler[i]; } PUNICODE_STRING get_pipe_name (); - DWORD listen_client_thread (); + DWORD fifo_reader_thread_func (); void fifo_client_lock () { _fifo_client_lock.lock (); } void fifo_client_unlock () { _fifo_client_lock.unlock (); } int open (int, mode_t); @@ -1351,9 +1350,6 @@ public: void set_close_on_exec (bool val); void __reg3 raw_read (void *ptr, size_t& ulen); ssize_t __reg3 raw_write (const void *ptr, size_t ulen); - bool need_fixup_before () const { return reader; } - int fixup_before_fork_exec (DWORD) { stop_listen_client (); return 0; } - void init_fixup_before (); void fixup_after_fork (HANDLE); void fixup_after_exec (); int __reg2 fstatvfs (struct statvfs *buf); @@ -1375,7 +1371,6 @@ public: void *ptr = (void *) ccalloc (malloc_type, 1, sizeof (fhandler_fifo)); fhandler_fifo *fhf = new (ptr) fhandler_fifo (ptr); /* We don't want our client list to change any more. */ - stop_listen_client (); copyto (fhf); /* fhf->pipe_name_buf is a *copy* of this->pipe_name_buf, but fhf->pipe_name.Buffer == this->pipe_name_buf. */ diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 5c3df5497..09a7eb321 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -32,11 +32,11 @@ When a FIFO is opened for reading, fhandler_fifo::create_pipe_instance is called to create the first instance of a Windows named pipe server (Windows terminology). A - "listen_client" thread is also started; it waits for pipe clients + "fifo_reader" thread is also started; it waits for pipe clients (Windows terminology again) to connect. This happens every time a process opens the FIFO for writing. - The listen_client thread creates new instances of the pipe server + The fifo_reader thread creates new instances of the pipe server as needed, so that there is always an instance available for a writer to connect to. @@ -68,7 +68,7 @@ STATUS_PIPE_EMPTY simply means there's no data to be read. */ fhandler_fifo::fhandler_fifo (): fhandler_base (), read_ready (NULL), write_ready (NULL), writer_opening (NULL), - listen_client_thr (NULL), lct_termination_evt (NULL), _maybe_eof (false), nhandlers (0), + cancel_evt (NULL), thr_sync_evt (NULL), _maybe_eof (false), nhandlers (0), reader (false), writer (false), duplexer (false), max_atomic_write (DEFAULT_PIPEBUFSIZE) { @@ -319,34 +319,6 @@ fhandler_fifo::delete_client_handler (int i) (nhandlers - i) * sizeof (fc_handler[i])); } -/* Just hop to the listen_client_thread method. */ -DWORD WINAPI -listen_client_func (LPVOID param) -{ - fhandler_fifo *fh = (fhandler_fifo *) param; - return fh->listen_client_thread (); -} - -/* Start a thread that listens for client connections. */ -bool -fhandler_fifo::listen_client () -{ - if (!(lct_termination_evt = create_event ())) - return false; - - listen_client_thr = CreateThread (NULL, PREFERRED_IO_BLKSIZE, - listen_client_func, (PVOID) this, 0, NULL); - if (!listen_client_thr) - { - __seterrno (); - HANDLE evt = InterlockedExchangePointer (&lct_termination_evt, NULL); - if (evt) - NtClose (evt); - return false; - } - return true; -} - void fhandler_fifo::record_connection (fifo_client_handler& fc, fifo_client_connect_state s) @@ -357,8 +329,15 @@ fhandler_fifo::record_connection (fifo_client_handler& fc, set_pipe_non_blocking (fc.h, true); } +static DWORD WINAPI +fifo_reader_thread (LPVOID param) +{ + fhandler_fifo *fh = (fhandler_fifo *) param; + return fh->fifo_reader_thread_func (); +} + DWORD -fhandler_fifo::listen_client_thread () +fhandler_fifo::fifo_reader_thread_func () { HANDLE conn_evt; @@ -377,7 +356,6 @@ fhandler_fifo::listen_client_thread () else i++; } - fifo_client_unlock (); /* Create a new client handler. */ if (add_client_handler () < 0) @@ -385,6 +363,7 @@ fhandler_fifo::listen_client_thread () /* Listen for a writer to connect to the new client handler. */ fifo_client_handler& fc = fc_handler[nhandlers - 1]; + fifo_client_unlock (); NTSTATUS status; IO_STATUS_BLOCK io; bool cancel = false; @@ -393,9 +372,8 @@ fhandler_fifo::listen_client_thread () FSCTL_PIPE_LISTEN, NULL, 0, NULL, 0); if (status == STATUS_PENDING) { - HANDLE w[2] = { conn_evt, lct_termination_evt }; - DWORD waitret = WaitForMultipleObjects (2, w, false, INFINITE); - switch (waitret) + HANDLE w[2] = { conn_evt, cancel_evt }; + switch (WaitForMultipleObjects (2, w, false, INFINITE)) { case WAIT_OBJECT_0: status = io.Status; @@ -453,11 +431,13 @@ fhandler_fifo::listen_client_thread () if (ph) NtClose (ph); if (cancel) - goto out; + goto canceled; } -out: +canceled: if (conn_evt) NtClose (conn_evt); + /* automatically return the cygthread to the cygthread pool */ + _my_tls._ctinfo->auto_release (); return 0; } @@ -521,16 +501,15 @@ fhandler_fifo::open (int flags, mode_t) goto err_close_write_ready; } - /* If we're reading, signal read_ready and start the listen_client - thread. */ + /* If we're reading, signal read_ready and start the fifo_reader_thread. */ if (reader) { - if (!listen_client ()) - { - debug_printf ("create of listen_client thread failed"); - goto err_close_writer_opening; - } SetEvent (read_ready); + if (!(cancel_evt = create_event ())) + goto err_close_writer_opening; + if (!(thr_sync_evt = create_event ())) + goto err_close_cancel_evt; + new cygthread (fifo_reader_thread, this, "fifo_reader", thr_sync_evt); /* If we're a duplexer, we need a handle for writing. */ if (duplexer) @@ -563,7 +542,6 @@ fhandler_fifo::open (int flags, mode_t) /* Not a duplexer; wait for a writer to connect. */ else if (!wait (write_ready)) goto err_close_reader; - init_fixup_before (); goto success; } @@ -635,6 +613,8 @@ err_close_reader: close (); set_errno (saved_errno); return 0; +err_close_cancel_evt: + NtClose (cancel_evt); err_close_writer_opening: NtClose (writer_opening); err_close_write_ready: @@ -815,43 +795,9 @@ fhandler_fifo::hit_eof () return ret; } -/* Is the lct running? */ -int -fhandler_fifo::check_listen_client_thread () -{ - int ret = 0; - - if (listen_client_thr) - { - DWORD waitret = WaitForSingleObject (listen_client_thr, 0); - switch (waitret) - { - case WAIT_OBJECT_0: - NtClose (listen_client_thr); - break; - case WAIT_TIMEOUT: - ret = 1; - break; - default: - debug_printf ("WaitForSingleObject failed, %E"); - ret = -1; - __seterrno (); - NtClose (listen_client_thr); - break; - } - } - return ret; -} - void __reg3 fhandler_fifo::raw_read (void *in_ptr, size_t& len) { - /* Make sure the lct is running. */ - int res = check_listen_client_thread (); - debug_printf ("lct status %d", res); - if (res < 0 || (res == 0 && !listen_client ())) - goto errout; - if (!len) return; @@ -976,35 +922,29 @@ fifo_client_handler::pipe_state () } void -fhandler_fifo::stop_listen_client () +fhandler_fifo::cancel_reader_thread () { - HANDLE thr, evt; - - thr = InterlockedExchangePointer (&listen_client_thr, NULL); - if (thr) - { - if (lct_termination_evt) - SetEvent (lct_termination_evt); - WaitForSingleObject (thr, INFINITE); - NtClose (thr); - } - evt = InterlockedExchangePointer (&lct_termination_evt, NULL); - if (evt) - NtClose (evt); + if (cancel_evt) + SetEvent (cancel_evt); + if (thr_sync_evt) + WaitForSingleObject (thr_sync_evt, INFINITE); } int fhandler_fifo::close () { - /* Avoid deadlock with lct in case this is called from a signal - handler or another thread. */ - fifo_client_unlock (); - stop_listen_client (); if (reader) - /* FIXME: There could be several readers open because of - dup/fork/exec; we should only reset read_ready when the last - one closes. */ - ResetEvent (read_ready); + { + cancel_reader_thread (); + if (cancel_evt) + NtClose (cancel_evt); + if (thr_sync_evt) + NtClose (thr_sync_evt); + /* FIXME: There could be several readers open because of + dup/fork/exec; we should only reset read_ready when the last + one closes. */ + ResetEvent (read_ready); + } if (read_ready) NtClose (read_ready); if (write_ready) @@ -1091,11 +1031,16 @@ fhandler_fifo::dup (fhandler_base *child, int flags) goto err_close_handlers; } fifo_client_unlock (); - if (!fhf->listen_client ()) + if (!(fhf->cancel_evt = create_event ())) goto err_close_handlers; - fhf->init_fixup_before (); + if (!(fhf->thr_sync_evt = create_event ())) + goto err_close_cancel_evt; + new cygthread (fifo_reader_thread, fhf, "fifo_reader", + fhf->thr_sync_evt); } return 0; +err_close_cancel_evt: + NtClose (fhf->cancel_evt); err_close_handlers: for (int j = 0; j < i; j++) fhf->fc_handler[j].close (); @@ -1109,12 +1054,6 @@ err: return -1; } -void -fhandler_fifo::init_fixup_before () -{ - cygheap->fdtab.inc_need_fixup_before (); -} - void fhandler_fifo::fixup_after_fork (HANDLE parent) { @@ -1131,8 +1070,11 @@ fhandler_fifo::fixup_after_fork (HANDLE parent) for (int i = 0; i < nhandlers; i++) fork_fixup (parent, fc_handler[i].h, "fc_handler[].h"); fifo_client_unlock (); - if (!listen_client ()) - debug_printf ("failed to start lct, %E"); + if (!(cancel_evt = create_event ())) + api_fatal ("Can't create reader thread cancel event during fork, %E"); + if (!(thr_sync_evt = create_event ())) + api_fatal ("Can't create reader thread sync event during fork, %E"); + new cygthread (fifo_reader_thread, this, "fifo_reader", thr_sync_evt); } } @@ -1145,8 +1087,11 @@ fhandler_fifo::fixup_after_exec () /* Make sure the child starts unlocked. */ fifo_client_unlock (); - if (!listen_client ()) - debug_printf ("failed to start lct, %E"); + if (!(cancel_evt = create_event ())) + api_fatal ("Can't create reader thread cancel event during exec, %E"); + if (!(thr_sync_evt = create_event ())) + api_fatal ("Can't create reader thread sync event during exec, %E"); + new cygthread (fifo_reader_thread, this, "fifo_reader", thr_sync_evt); } } From 878eb224622cd3bfc485fdf94a6c2f65e810fa19 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Tue, 17 Mar 2020 12:29:56 -0400 Subject: [PATCH 337/520] Cygwin: FIFO: add shared memory Even though we currently allow a FIFO to be opened for reading only once, we can still have more than one reader open because of dup and fork. Add a named shared memory section accessible to all readers of a given FIFO. In future commits we will add information needed by all readers to this section Add a class fifo_shmem_t that lets us access this information. Add a method create_shmem that is called when a reader opens, and add a method reopen_shmem that is called by dup, fork, and exec. (Each new reader needs its own view of the shared memory.) --- winsup/cygwin/fhandler.h | 13 +++++ winsup/cygwin/fhandler_fifo.cc | 97 ++++++++++++++++++++++++++++++++-- 2 files changed, 106 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 5e6a1d1db..8d6b94021 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1300,6 +1300,11 @@ struct fifo_client_handler int pipe_state (); }; +/* Info needed by all readers of a FIFO, stored in named shared memory. */ +class fifo_shmem_t +{ +}; + class fhandler_fifo: public fhandler_base { /* Handles to named events shared by all fhandlers for a given FIFO. */ @@ -1319,6 +1324,10 @@ class fhandler_fifo: public fhandler_base af_unix_spinlock_t _fifo_client_lock; bool reader, writer, duplexer; size_t max_atomic_write; + + HANDLE shmem_handle; + fifo_shmem_t *shmem; + bool __reg2 wait (HANDLE); static NTSTATUS npfs_handle (HANDLE &); HANDLE create_pipe_instance (bool); @@ -1330,6 +1339,9 @@ class fhandler_fifo: public fhandler_base void record_connection (fifo_client_handler&, fifo_client_connect_state = fc_connected); + int create_shmem (); + int reopen_shmem (); + public: fhandler_fifo (); bool hit_eof (); @@ -1341,6 +1353,7 @@ public: DWORD fifo_reader_thread_func (); void fifo_client_lock () { _fifo_client_lock.lock (); } void fifo_client_unlock () { _fifo_client_lock.unlock (); } + int open (int, mode_t); off_t lseek (off_t offset, int whence); int close (); diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 09a7eb321..9a0db3f33 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -70,7 +70,8 @@ fhandler_fifo::fhandler_fifo (): read_ready (NULL), write_ready (NULL), writer_opening (NULL), cancel_evt (NULL), thr_sync_evt (NULL), _maybe_eof (false), nhandlers (0), reader (false), writer (false), duplexer (false), - max_atomic_write (DEFAULT_PIPEBUFSIZE) + max_atomic_write (DEFAULT_PIPEBUFSIZE), + shmem_handle (NULL), shmem (NULL) { pipe_name_buf[0] = L'\0'; need_fork_fixup (true); @@ -441,6 +442,67 @@ canceled: return 0; } +int +fhandler_fifo::create_shmem () +{ + HANDLE sect; + OBJECT_ATTRIBUTES attr; + NTSTATUS status; + LARGE_INTEGER size = { .QuadPart = sizeof (fifo_shmem_t) }; + SIZE_T viewsize = sizeof (fifo_shmem_t); + PVOID addr = NULL; + UNICODE_STRING uname; + WCHAR shmem_name[MAX_PATH]; + + __small_swprintf (shmem_name, L"fifo-shmem.%08x.%016X", get_dev (), + get_ino ()); + RtlInitUnicodeString (&uname, shmem_name); + InitializeObjectAttributes (&attr, &uname, OBJ_INHERIT, + get_shared_parent_dir (), NULL); + status = NtCreateSection (§, STANDARD_RIGHTS_REQUIRED | SECTION_QUERY + | SECTION_MAP_READ | SECTION_MAP_WRITE, + &attr, &size, PAGE_READWRITE, SEC_COMMIT, NULL); + if (status == STATUS_OBJECT_NAME_COLLISION) + status = NtOpenSection (§, STANDARD_RIGHTS_REQUIRED | SECTION_QUERY + | SECTION_MAP_READ | SECTION_MAP_WRITE, &attr); + if (!NT_SUCCESS (status)) + { + __seterrno_from_nt_status (status); + return -1; + } + status = NtMapViewOfSection (sect, NtCurrentProcess (), &addr, 0, viewsize, + NULL, &viewsize, ViewShare, 0, PAGE_READWRITE); + if (!NT_SUCCESS (status)) + { + NtClose (sect); + __seterrno_from_nt_status (status); + return -1; + } + shmem_handle = sect; + shmem = (fifo_shmem_t *) addr; + return 0; +} + +/* shmem_handle must be valid when this is called. */ +int +fhandler_fifo::reopen_shmem () +{ + NTSTATUS status; + SIZE_T viewsize = sizeof (fifo_shmem_t); + PVOID addr = NULL; + + status = NtMapViewOfSection (shmem_handle, NtCurrentProcess (), &addr, + 0, viewsize, NULL, &viewsize, ViewShare, + 0, PAGE_READWRITE); + if (!NT_SUCCESS (status)) + { + __seterrno_from_nt_status (status); + return -1; + } + shmem = (fifo_shmem_t *) addr; + return 0; +} + int fhandler_fifo::open (int flags, mode_t) { @@ -501,12 +563,15 @@ fhandler_fifo::open (int flags, mode_t) goto err_close_write_ready; } - /* If we're reading, signal read_ready and start the fifo_reader_thread. */ + /* If we're reading, signal read_ready, create the shared memory, + and start the fifo_reader_thread. */ if (reader) { SetEvent (read_ready); - if (!(cancel_evt = create_event ())) + if (create_shmem () < 0) goto err_close_writer_opening; + if (!(cancel_evt = create_event ())) + goto err_close_shmem; if (!(thr_sync_evt = create_event ())) goto err_close_cancel_evt; new cygthread (fifo_reader_thread, this, "fifo_reader", thr_sync_evt); @@ -615,6 +680,9 @@ err_close_reader: return 0; err_close_cancel_evt: NtClose (cancel_evt); +err_close_shmem: + NtUnmapViewOfSection (NtCurrentProcess (), shmem); + NtClose (shmem_handle); err_close_writer_opening: NtClose (writer_opening); err_close_write_ready: @@ -944,6 +1012,10 @@ fhandler_fifo::close () dup/fork/exec; we should only reset read_ready when the last one closes. */ ResetEvent (read_ready); + if (shmem) + NtUnmapViewOfSection (NtCurrentProcess (), shmem); + if (shmem_handle) + NtClose (shmem_handle); } if (read_ready) NtClose (read_ready); @@ -1014,6 +1086,15 @@ fhandler_fifo::dup (fhandler_base *child, int flags) /* Make sure the child starts unlocked. */ fhf->fifo_client_unlock (); + if (!DuplicateHandle (GetCurrentProcess (), shmem_handle, + GetCurrentProcess (), &fhf->shmem_handle, + 0, !(flags & O_CLOEXEC), DUPLICATE_SAME_ACCESS)) + { + __seterrno (); + goto err_close_writer_opening; + } + if (fhf->reopen_shmem () < 0) + goto err_close_shmem_handle; fifo_client_lock (); for (i = 0; i < nhandlers; i++) { @@ -1044,7 +1125,10 @@ err_close_cancel_evt: err_close_handlers: for (int j = 0; j < i; j++) fhf->fc_handler[j].close (); -/* err_close_writer_opening: */ + NtUnmapViewOfSection (GetCurrentProcess (), fhf->shmem); +err_close_shmem_handle: + NtClose (fhf->shmem_handle); +err_close_writer_opening: NtClose (fhf->writer_opening); err_close_write_ready: NtClose (fhf->write_ready); @@ -1066,6 +1150,9 @@ fhandler_fifo::fixup_after_fork (HANDLE parent) /* Make sure the child starts unlocked. */ fifo_client_unlock (); + fork_fixup (parent, shmem_handle, "shmem_handle"); + if (reopen_shmem () < 0) + api_fatal ("Can't reopen shared memory during fork, %E"); fifo_client_lock (); for (int i = 0; i < nhandlers; i++) fork_fixup (parent, fc_handler[i].h, "fc_handler[].h"); @@ -1087,6 +1174,8 @@ fhandler_fifo::fixup_after_exec () /* Make sure the child starts unlocked. */ fifo_client_unlock (); + if (reopen_shmem () < 0) + api_fatal ("Can't reopen shared memory during exec, %E"); if (!(cancel_evt = create_event ())) api_fatal ("Can't create reader thread cancel event during exec, %E"); if (!(thr_sync_evt = create_event ())) From 365818a4a5b0140bbf37b1d91fbf82aa9e376a6b Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Fri, 27 Mar 2020 09:43:30 -0400 Subject: [PATCH 338/520] Cygwin: FIFO: keep track of the number of readers Add data and methods to the shared memory that keep track of the number of open readers. Increment this number in open, dup, fork, and exec. Decrement it in close. Reset read_ready if there are no readers left. --- winsup/cygwin/fhandler.h | 8 ++++++++ winsup/cygwin/fhandler_fifo.cc | 22 ++++++++++++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 8d6b94021..b2ee7e6b6 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1303,6 +1303,11 @@ struct fifo_client_handler /* Info needed by all readers of a FIFO, stored in named shared memory. */ class fifo_shmem_t { + LONG _nreaders; + +public: + int inc_nreaders () { return (int) InterlockedIncrement (&_nreaders); } + int dec_nreaders () { return (int) InterlockedDecrement (&_nreaders); } }; class fhandler_fifo: public fhandler_base @@ -1342,6 +1347,9 @@ class fhandler_fifo: public fhandler_base int create_shmem (); int reopen_shmem (); + int inc_nreaders () { return shmem->inc_nreaders (); } + int dec_nreaders () { return shmem->dec_nreaders (); } + public: fhandler_fifo (); bool hit_eof (); diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 9a0db3f33..d87070ac7 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -570,8 +570,9 @@ fhandler_fifo::open (int flags, mode_t) SetEvent (read_ready); if (create_shmem () < 0) goto err_close_writer_opening; + inc_nreaders (); if (!(cancel_evt = create_event ())) - goto err_close_shmem; + goto err_dec_nreaders; if (!(thr_sync_evt = create_event ())) goto err_close_cancel_evt; new cygthread (fifo_reader_thread, this, "fifo_reader", thr_sync_evt); @@ -680,7 +681,10 @@ err_close_reader: return 0; err_close_cancel_evt: NtClose (cancel_evt); -err_close_shmem: +err_dec_nreaders: + if (dec_nreaders () == 0) + ResetEvent (read_ready); +/* err_close_shmem: */ NtUnmapViewOfSection (NtCurrentProcess (), shmem); NtClose (shmem_handle); err_close_writer_opening: @@ -1003,15 +1007,13 @@ fhandler_fifo::close () { if (reader) { + if (dec_nreaders () == 0) + ResetEvent (read_ready); cancel_reader_thread (); if (cancel_evt) NtClose (cancel_evt); if (thr_sync_evt) NtClose (thr_sync_evt); - /* FIXME: There could be several readers open because of - dup/fork/exec; we should only reset read_ready when the last - one closes. */ - ResetEvent (read_ready); if (shmem) NtUnmapViewOfSection (NtCurrentProcess (), shmem); if (shmem_handle) @@ -1116,8 +1118,8 @@ fhandler_fifo::dup (fhandler_base *child, int flags) goto err_close_handlers; if (!(fhf->thr_sync_evt = create_event ())) goto err_close_cancel_evt; - new cygthread (fifo_reader_thread, fhf, "fifo_reader", - fhf->thr_sync_evt); + inc_nreaders (); + new cygthread (fifo_reader_thread, fhf, "fifo_reader", fhf->thr_sync_evt); } return 0; err_close_cancel_evt: @@ -1161,6 +1163,7 @@ fhandler_fifo::fixup_after_fork (HANDLE parent) api_fatal ("Can't create reader thread cancel event during fork, %E"); if (!(thr_sync_evt = create_event ())) api_fatal ("Can't create reader thread sync event during fork, %E"); + inc_nreaders (); new cygthread (fifo_reader_thread, this, "fifo_reader", thr_sync_evt); } } @@ -1180,6 +1183,9 @@ fhandler_fifo::fixup_after_exec () api_fatal ("Can't create reader thread cancel event during exec, %E"); if (!(thr_sync_evt = create_event ())) api_fatal ("Can't create reader thread sync event during exec, %E"); + /* At this moment we're a new reader. The count will be + decremented when the parent closes. */ + inc_nreaders (); new cygthread (fifo_reader_thread, this, "fifo_reader", thr_sync_evt); } } From 16e7c1057854728ca7768813c995e6d83f90db67 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Wed, 25 Mar 2020 19:22:10 -0400 Subject: [PATCH 339/520] Cygwin: FIFO: introduce a new type, fifo_reader_id_t This uniquely identifies an fhandler_fifo open for reading in any process. Add a new data member 'me' of this type, which is set in open, dup, fork, and exec. --- winsup/cygwin/fhandler.h | 23 +++++++++++++++++++++++ winsup/cygwin/fhandler_fifo.cc | 9 ++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index b2ee7e6b6..65aab4da3 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1300,6 +1300,26 @@ struct fifo_client_handler int pipe_state (); }; +class fhandler_fifo; + +struct fifo_reader_id_t +{ + DWORD winpid; + fhandler_fifo *fh; + + operator bool () const { return winpid != 0 || fh != NULL; } + + friend operator == (const fifo_reader_id_t &l, const fifo_reader_id_t &r) + { + return l.winpid == r.winpid && l.fh == r.fh; + } + + friend operator != (const fifo_reader_id_t &l, const fifo_reader_id_t &r) + { + return l.winpid != r.winpid || l.fh != r.fh; + } +}; + /* Info needed by all readers of a FIFO, stored in named shared memory. */ class fifo_shmem_t { @@ -1329,6 +1349,7 @@ class fhandler_fifo: public fhandler_base af_unix_spinlock_t _fifo_client_lock; bool reader, writer, duplexer; size_t max_atomic_write; + fifo_reader_id_t me; HANDLE shmem_handle; fifo_shmem_t *shmem; @@ -1362,6 +1383,8 @@ public: void fifo_client_lock () { _fifo_client_lock.lock (); } void fifo_client_unlock () { _fifo_client_lock.unlock (); } + fifo_reader_id_t get_me () const { return me; } + int open (int, mode_t); off_t lseek (off_t offset, int whence); int close (); diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index d87070ac7..5676a2c97 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -65,13 +65,15 @@ STATUS_PIPE_EMPTY simply means there's no data to be read. */ || _s == STATUS_PIPE_NOT_AVAILABLE \ || _s == STATUS_PIPE_BUSY; }) +static NO_COPY fifo_reader_id_t null_fr_id = { .winpid = 0, .fh = NULL }; + fhandler_fifo::fhandler_fifo (): fhandler_base (), read_ready (NULL), write_ready (NULL), writer_opening (NULL), cancel_evt (NULL), thr_sync_evt (NULL), _maybe_eof (false), nhandlers (0), reader (false), writer (false), duplexer (false), max_atomic_write (DEFAULT_PIPEBUFSIZE), - shmem_handle (NULL), shmem (NULL) + me (null_fr_id), shmem_handle (NULL), shmem (NULL) { pipe_name_buf[0] = L'\0'; need_fork_fixup (true); @@ -575,6 +577,8 @@ fhandler_fifo::open (int flags, mode_t) goto err_dec_nreaders; if (!(thr_sync_evt = create_event ())) goto err_close_cancel_evt; + me.winpid = GetCurrentProcessId (); + me.fh = this; new cygthread (fifo_reader_thread, this, "fifo_reader", thr_sync_evt); /* If we're a duplexer, we need a handle for writing. */ @@ -1119,6 +1123,7 @@ fhandler_fifo::dup (fhandler_base *child, int flags) if (!(fhf->thr_sync_evt = create_event ())) goto err_close_cancel_evt; inc_nreaders (); + fhf->me.fh = fhf; new cygthread (fifo_reader_thread, fhf, "fifo_reader", fhf->thr_sync_evt); } return 0; @@ -1164,6 +1169,7 @@ fhandler_fifo::fixup_after_fork (HANDLE parent) if (!(thr_sync_evt = create_event ())) api_fatal ("Can't create reader thread sync event during fork, %E"); inc_nreaders (); + me.winpid = GetCurrentProcessId (); new cygthread (fifo_reader_thread, this, "fifo_reader", thr_sync_evt); } } @@ -1179,6 +1185,7 @@ fhandler_fifo::fixup_after_exec () if (reopen_shmem () < 0) api_fatal ("Can't reopen shared memory during exec, %E"); + me.winpid = GetCurrentProcessId (); if (!(cancel_evt = create_event ())) api_fatal ("Can't create reader thread cancel event during exec, %E"); if (!(thr_sync_evt = create_event ())) From 606baf5566d683ac68e3414c457d124c7c7bdcc5 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Thu, 26 Mar 2020 14:32:10 -0400 Subject: [PATCH 340/520] Cygwin: FIFO: designate one reader as owner Among all the open readers of a FIFO, one is declared to be the owner. This is the only reader that listens for client connections, and it is the only one that has an accurate fc_handler list. Add shared data and methods for getting and setting the owner, as well as a lock to prevent more than one reader from accessing these data simultaneously. Modify the fifo_reader_thread so that it checks the owner at the beginning of its loop. If there is no owner, it takes ownership. If there is an owner but it is a different reader, the thread just waits to be canceled. Otherwise, it listens for client connections as before. Remove the 'first' argument from create_pipe_instance. It is not needed, and it may be confusing in the future since only the owner knows whether a pipe instance is the first. When opening a reader, don't return until the fifo_reader_thread has time to set an owner. If the owner closes, indicate that there is no longer an owner. Clear the child's fc_handler list in dup, and don't bother duplicating the handles. The child never starts out as owner, so it can't use those handles. Do the same thing in fixup_after_fork in the close-on-exec case. In the non-close-on-exec case, the child inherits an fc_handler list that it can't use, but we can just leave it alone; the handles will be closed when the child is closed. --- winsup/cygwin/fhandler.h | 13 +- winsup/cygwin/fhandler_fifo.cc | 241 ++++++++++++++++++--------------- 2 files changed, 143 insertions(+), 111 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 65aab4da3..bd44da5cd 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1324,10 +1324,17 @@ struct fifo_reader_id_t class fifo_shmem_t { LONG _nreaders; + fifo_reader_id_t _owner; + af_unix_spinlock_t _owner_lock; public: int inc_nreaders () { return (int) InterlockedIncrement (&_nreaders); } int dec_nreaders () { return (int) InterlockedDecrement (&_nreaders); } + + fifo_reader_id_t get_owner () const { return _owner; } + void set_owner (fifo_reader_id_t fr_id) { _owner = fr_id; } + void owner_lock () { _owner_lock.lock (); } + void owner_unlock () { _owner_lock.unlock (); } }; class fhandler_fifo: public fhandler_base @@ -1356,7 +1363,7 @@ class fhandler_fifo: public fhandler_base bool __reg2 wait (HANDLE); static NTSTATUS npfs_handle (HANDLE &); - HANDLE create_pipe_instance (bool); + HANDLE create_pipe_instance (); NTSTATUS open_pipe (HANDLE&); NTSTATUS wait_open_pipe (HANDLE&); int add_client_handler (); @@ -1384,6 +1391,10 @@ public: void fifo_client_unlock () { _fifo_client_lock.unlock (); } fifo_reader_id_t get_me () const { return me; } + fifo_reader_id_t get_owner () const { return shmem->get_owner (); } + void set_owner (fifo_reader_id_t fr_id) { shmem->set_owner (fr_id); } + void owner_lock () { shmem->owner_lock (); } + void owner_unlock () { shmem->owner_unlock (); } int open (int, mode_t); off_t lseek (off_t offset, int whence); diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 5676a2c97..0b9b33785 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -164,7 +164,7 @@ fhandler_fifo::npfs_handle (HANDLE &nph) blocking mode so that we can easily wait for a connection. After it is connected, it is put in nonblocking mode. */ HANDLE -fhandler_fifo::create_pipe_instance (bool first) +fhandler_fifo::create_pipe_instance () { NTSTATUS status; HANDLE npfsh; @@ -187,14 +187,12 @@ fhandler_fifo::create_pipe_instance (bool first) access = GENERIC_READ | FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES | SYNCHRONIZE; sharing = FILE_SHARE_READ | FILE_SHARE_WRITE; - hattr = openflags & O_CLOEXEC ? 0 : OBJ_INHERIT; - if (first) - hattr |= OBJ_CASE_INSENSITIVE; + hattr = (openflags & O_CLOEXEC ? 0 : OBJ_INHERIT) | OBJ_CASE_INSENSITIVE; InitializeObjectAttributes (&attr, get_pipe_name (), hattr, npfsh, NULL); timeout.QuadPart = -500000; status = NtCreateNamedPipeFile (&ph, access, &attr, &io, sharing, - first ? FILE_CREATE : FILE_OPEN, 0, + FILE_OPEN_IF, 0, FILE_PIPE_MESSAGE_TYPE | FILE_PIPE_REJECT_REMOTE_CLIENTS, FILE_PIPE_MESSAGE_MODE, @@ -292,14 +290,13 @@ fhandler_fifo::add_client_handler () int ret = -1; fifo_client_handler fc; HANDLE ph = NULL; - bool first = (nhandlers == 0); if (nhandlers == MAX_CLIENTS) { set_errno (EMFILE); goto out; } - ph = create_pipe_instance (first); + ph = create_pipe_instance (); if (!ph) goto out; else @@ -349,92 +346,120 @@ fhandler_fifo::fifo_reader_thread_func () while (1) { - /* Cleanup the fc_handler list. */ - fifo_client_lock (); - int i = 0; - while (i < nhandlers) + fifo_reader_id_t cur_owner; + + owner_lock (); + cur_owner = get_owner (); + if (!cur_owner) { - if (fc_handler[i].state < fc_connected) - delete_client_handler (i); - else - i++; + set_owner (me); + owner_unlock (); + continue; } - - /* Create a new client handler. */ - if (add_client_handler () < 0) - api_fatal ("Can't add a client handler, %E"); - - /* Listen for a writer to connect to the new client handler. */ - fifo_client_handler& fc = fc_handler[nhandlers - 1]; - fifo_client_unlock (); - NTSTATUS status; - IO_STATUS_BLOCK io; - bool cancel = false; - - status = NtFsControlFile (fc.h, conn_evt, NULL, NULL, &io, - FSCTL_PIPE_LISTEN, NULL, 0, NULL, 0); - if (status == STATUS_PENDING) + else if (cur_owner != me) { - HANDLE w[2] = { conn_evt, cancel_evt }; - switch (WaitForMultipleObjects (2, w, false, INFINITE)) + owner_unlock (); + WaitForSingleObject (cancel_evt, INFINITE); + goto canceled; + } + else + { + /* I'm the owner */ + fifo_client_lock (); + + /* Cleanup the fc_handler list. */ + fifo_client_lock (); + int i = 0; + while (i < nhandlers) { - case WAIT_OBJECT_0: - status = io.Status; + if (fc_handler[i].state < fc_connected) + delete_client_handler (i); + else + i++; + } + + /* Create a new client handler. */ + if (add_client_handler () < 0) + api_fatal ("Can't add a client handler, %E"); + + /* Listen for a writer to connect to the new client handler. */ + fifo_client_handler& fc = fc_handler[nhandlers - 1]; + fifo_client_unlock (); + owner_unlock (); + NTSTATUS status; + IO_STATUS_BLOCK io; + bool cancel = false; + + status = NtFsControlFile (fc.h, conn_evt, NULL, NULL, &io, + FSCTL_PIPE_LISTEN, NULL, 0, NULL, 0); + if (status == STATUS_PENDING) + { + HANDLE w[2] = { conn_evt, cancel_evt }; + switch (WaitForMultipleObjects (2, w, false, INFINITE)) + { + case WAIT_OBJECT_0: + status = io.Status; + debug_printf ("NtFsControlFile STATUS_PENDING, then %y", + status); + break; + case WAIT_OBJECT_0 + 1: + status = STATUS_THREAD_IS_TERMINATING; + cancel = true; + break; + default: + api_fatal ("WFMO failed, %E"); + } + } + else + debug_printf ("NtFsControlFile status %y, no STATUS_PENDING", + status); + HANDLE ph = NULL; + NTSTATUS status1; + + fifo_client_lock (); + switch (status) + { + case STATUS_SUCCESS: + case STATUS_PIPE_CONNECTED: + record_connection (fc); break; - case WAIT_OBJECT_0 + 1: - status = STATUS_THREAD_IS_TERMINATING; - cancel = true; + case STATUS_PIPE_CLOSING: + record_connection (fc, fc_closing); + break; + case STATUS_THREAD_IS_TERMINATING: + /* Try to connect a bogus client. Otherwise fc is still + listening, and the next connection might not get recorded. */ + status1 = open_pipe (ph); + WaitForSingleObject (conn_evt, INFINITE); + if (NT_SUCCESS (status1)) + /* Bogus cilent connected. */ + delete_client_handler (nhandlers - 1); + else + /* Did a real client connect? */ + switch (io.Status) + { + case STATUS_SUCCESS: + case STATUS_PIPE_CONNECTED: + record_connection (fc); + break; + case STATUS_PIPE_CLOSING: + record_connection (fc, fc_closing); + break; + default: + debug_printf ("NtFsControlFile status %y after failing to connect bogus client or real client", io.Status); + fc.state = fc_unknown; + break; + } break; default: - api_fatal ("WFMO failed, %E"); + break; } + fifo_client_unlock (); + if (ph) + NtClose (ph); + if (cancel) + goto canceled; } - HANDLE ph = NULL; - NTSTATUS status1; - - fifo_client_lock (); - switch (status) - { - case STATUS_SUCCESS: - case STATUS_PIPE_CONNECTED: - record_connection (fc); - break; - case STATUS_PIPE_CLOSING: - record_connection (fc, fc_closing); - break; - case STATUS_THREAD_IS_TERMINATING: - /* Try to connect a bogus client. Otherwise fc is still - listening, and the next connection might not get recorded. */ - status1 = open_pipe (ph); - WaitForSingleObject (conn_evt, INFINITE); - if (NT_SUCCESS (status1)) - /* Bogus cilent connected. */ - delete_client_handler (nhandlers - 1); - else - /* Did a real client connect? */ - switch (io.Status) - { - case STATUS_SUCCESS: - case STATUS_PIPE_CONNECTED: - record_connection (fc); - break; - case STATUS_PIPE_CLOSING: - record_connection (fc, fc_closing); - break; - default: - debug_printf ("NtFsControlFile status %y after failing to connect bogus client or real client", io.Status); - fc.state = fc_unknown; - break; - } - break; - default: - break; - } - fifo_client_unlock (); - if (ph) - NtClose (ph); - if (cancel) - goto canceled; } canceled: if (conn_evt) @@ -580,6 +605,15 @@ fhandler_fifo::open (int flags, mode_t) me.winpid = GetCurrentProcessId (); me.fh = this; new cygthread (fifo_reader_thread, this, "fifo_reader", thr_sync_evt); + /* Wait until there's an owner. */ + owner_lock (); + while (!get_owner ()) + { + owner_unlock (); + yield (); + owner_lock (); + } + owner_unlock (); /* If we're a duplexer, we need a handle for writing. */ if (duplexer) @@ -1014,6 +1048,10 @@ fhandler_fifo::close () if (dec_nreaders () == 0) ResetEvent (read_ready); cancel_reader_thread (); + owner_lock (); + if (get_owner () == me) + set_owner (null_fr_id); + owner_unlock (); if (cancel_evt) NtClose (cancel_evt); if (thr_sync_evt) @@ -1056,7 +1094,6 @@ fhandler_fifo::fcntl (int cmd, intptr_t arg) int fhandler_fifo::dup (fhandler_base *child, int flags) { - int i = 0; fhandler_fifo *fhf = NULL; if (get_flags () & O_PATH) @@ -1092,6 +1129,9 @@ fhandler_fifo::dup (fhandler_base *child, int flags) /* Make sure the child starts unlocked. */ fhf->fifo_client_unlock (); + /* Clear fc_handler list; the child never starts as owner. */ + fhf->nhandlers = 0; + if (!DuplicateHandle (GetCurrentProcess (), shmem_handle, GetCurrentProcess (), &fhf->shmem_handle, 0, !(flags & O_CLOEXEC), DUPLICATE_SAME_ACCESS)) @@ -1101,25 +1141,8 @@ fhandler_fifo::dup (fhandler_base *child, int flags) } if (fhf->reopen_shmem () < 0) goto err_close_shmem_handle; - fifo_client_lock (); - for (i = 0; i < nhandlers; i++) - { - if (!DuplicateHandle (GetCurrentProcess (), fc_handler[i].h, - GetCurrentProcess (), &fhf->fc_handler[i].h, - 0, !(flags & O_CLOEXEC), DUPLICATE_SAME_ACCESS)) - { - __seterrno (); - break; - } - } - if (i < nhandlers) - { - fifo_client_unlock (); - goto err_close_handlers; - } - fifo_client_unlock (); if (!(fhf->cancel_evt = create_event ())) - goto err_close_handlers; + goto err_close_shmem; if (!(fhf->thr_sync_evt = create_event ())) goto err_close_cancel_evt; inc_nreaders (); @@ -1129,9 +1152,7 @@ fhandler_fifo::dup (fhandler_base *child, int flags) return 0; err_close_cancel_evt: NtClose (fhf->cancel_evt); -err_close_handlers: - for (int j = 0; j < i; j++) - fhf->fc_handler[j].close (); +err_close_shmem: NtUnmapViewOfSection (GetCurrentProcess (), fhf->shmem); err_close_shmem_handle: NtClose (fhf->shmem_handle); @@ -1160,10 +1181,10 @@ fhandler_fifo::fixup_after_fork (HANDLE parent) fork_fixup (parent, shmem_handle, "shmem_handle"); if (reopen_shmem () < 0) api_fatal ("Can't reopen shared memory during fork, %E"); - fifo_client_lock (); - for (int i = 0; i < nhandlers; i++) - fork_fixup (parent, fc_handler[i].h, "fc_handler[].h"); - fifo_client_unlock (); + if (close_on_exec ()) + /* Prevent a later attempt to close the non-inherited + pipe-instance handles copied from the parent. */ + nhandlers = 0; if (!(cancel_evt = create_event ())) api_fatal ("Can't create reader thread cancel event during fork, %E"); if (!(thr_sync_evt = create_event ())) From c76ded2ca0bb6136205e69caa073bf19944ae509 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Thu, 2 Apr 2020 13:47:18 -0400 Subject: [PATCH 341/520] Cygwin: FIFO: allow fc_handler list to grow dynamically Make fc_handler a pointer to malloc'd memory instead of a fixed-size array. The size is now a new data member 'shandlers'. Call realloc in add_client_handler if we need to grow the array. free fc_handler in close. As long as we're touching that code, also remove an unneeded lock. --- winsup/cygwin/fhandler.h | 6 ++--- winsup/cygwin/fhandler_fifo.cc | 41 +++++++++++++++++++--------------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index bd44da5cd..4f42cf1b8 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1268,7 +1268,6 @@ public: }; #define CYGWIN_FIFO_PIPE_NAME_LEN 47 -#define MAX_CLIENTS 64 /* The last three are the ones we try to read from. */ enum fifo_client_connect_state @@ -1351,8 +1350,9 @@ class fhandler_fifo: public fhandler_base UNICODE_STRING pipe_name; WCHAR pipe_name_buf[CYGWIN_FIFO_PIPE_NAME_LEN + 1]; bool _maybe_eof; - fifo_client_handler fc_handler[MAX_CLIENTS]; - int nhandlers; + fifo_client_handler *fc_handler; /* Dynamically growing array. */ + int shandlers; /* Size (capacity) of the array. */ + int nhandlers; /* Number of elements in the array. */ af_unix_spinlock_t _fifo_client_lock; bool reader, writer, duplexer; size_t max_atomic_write; diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 0b9b33785..595e55ad9 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -70,7 +70,8 @@ static NO_COPY fifo_reader_id_t null_fr_id = { .winpid = 0, .fh = NULL }; fhandler_fifo::fhandler_fifo (): fhandler_base (), read_ready (NULL), write_ready (NULL), writer_opening (NULL), - cancel_evt (NULL), thr_sync_evt (NULL), _maybe_eof (false), nhandlers (0), + cancel_evt (NULL), thr_sync_evt (NULL), _maybe_eof (false), + fc_handler (NULL), shandlers (0), nhandlers (0), reader (false), writer (false), duplexer (false), max_atomic_write (DEFAULT_PIPEBUFSIZE), me (null_fr_id), shmem_handle (NULL), shmem (NULL) @@ -287,27 +288,28 @@ fhandler_fifo::wait_open_pipe (HANDLE& ph) int fhandler_fifo::add_client_handler () { - int ret = -1; fifo_client_handler fc; HANDLE ph = NULL; - if (nhandlers == MAX_CLIENTS) + if (nhandlers >= shandlers) { - set_errno (EMFILE); - goto out; + void *temp = realloc (fc_handler, + (shandlers += 64) * sizeof (fc_handler[0])); + if (!temp) + { + shandlers -= 64; + set_errno (ENOMEM); + return -1; + } + fc_handler = (fifo_client_handler *) temp; } ph = create_pipe_instance (); if (!ph) - goto out; - else - { - ret = 0; - fc.h = ph; - fc.state = fc_listening; - fc_handler[nhandlers++] = fc; - } -out: - return ret; + return -1; + fc.h = ph; + fc.state = fc_listening; + fc_handler[nhandlers++] = fc; + return 0; } void @@ -1067,10 +1069,10 @@ fhandler_fifo::close () NtClose (write_ready); if (writer_opening) NtClose (writer_opening); - fifo_client_lock (); for (int i = 0; i < nhandlers; i++) fc_handler[i].close (); - fifo_client_unlock (); + if (fc_handler) + free (fc_handler); return fhandler_base::close (); } @@ -1130,7 +1132,8 @@ fhandler_fifo::dup (fhandler_base *child, int flags) fhf->fifo_client_unlock (); /* Clear fc_handler list; the child never starts as owner. */ - fhf->nhandlers = 0; + fhf->nhandlers = fhf->shandlers = 0; + fhf->fc_handler = NULL; if (!DuplicateHandle (GetCurrentProcess (), shmem_handle, GetCurrentProcess (), &fhf->shmem_handle, @@ -1206,6 +1209,8 @@ fhandler_fifo::fixup_after_exec () if (reopen_shmem () < 0) api_fatal ("Can't reopen shared memory during exec, %E"); + fc_handler = NULL; + nhandlers = shandlers = 0; me.winpid = GetCurrentProcessId (); if (!(cancel_evt = create_event ())) api_fatal ("Can't create reader thread cancel event during exec, %E"); From d9918451e2bea933955235e07290baf7993e8813 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Thu, 23 Apr 2020 18:43:42 -0400 Subject: [PATCH 342/520] Cygwin: FIFO: add a shared fifo_client_handler list This is in a new shared memory section. We will use it for temporary storage of the owner's fc_handler list when we need to change owner. The new owner can then duplicate the pipe handles from that list before taking ownership. Add several shared data members and methods that are needed for the duplication process Add methods update_my_handlers and update_shared_handlers that carry out the duplication. Allow the shared list to grow dynamically, up to a point. Do this by initially reserving a block of memory (currently 100 pages) and only committing pages as needed. Add methods create_shared_fc_handler, reopen_shared_fc_handler, and remap_shared_fc_handler to create the new shared memory section, reopen it, and commit new pages. The first is called in open, the second is called in dup/fork/exec, and the third is called in update_shared_handlers if more shared memory is needed. Modify the fifo_reader_thread function to call update_my_handlers when it finds that there is no owner. Also make it call update_shared_handlers when the owner's thread terminates, so that the new owner will have an accurate shared fc_handler list from which to duplicate. For convenience, add new methods cleanup_handlers and close_all_handlers. And add an optional arg to add_client_handler that allows it to create a new fifo_client_handler without creating a new pipe instance. --- winsup/cygwin/fhandler.h | 43 +++++- winsup/cygwin/fhandler_fifo.cc | 253 +++++++++++++++++++++++++++++---- 2 files changed, 269 insertions(+), 27 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 4f42cf1b8..34b209f5d 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1323,17 +1323,33 @@ struct fifo_reader_id_t class fifo_shmem_t { LONG _nreaders; - fifo_reader_id_t _owner; + fifo_reader_id_t _owner, _prev_owner; af_unix_spinlock_t _owner_lock; + /* Info about shared memory block used for temporary storage of the + owner's fc_handler list. */ + LONG _sh_nhandlers, _sh_shandlers, _sh_fc_handler_committed; + public: int inc_nreaders () { return (int) InterlockedIncrement (&_nreaders); } int dec_nreaders () { return (int) InterlockedDecrement (&_nreaders); } fifo_reader_id_t get_owner () const { return _owner; } void set_owner (fifo_reader_id_t fr_id) { _owner = fr_id; } + fifo_reader_id_t get_prev_owner () const { return _prev_owner; } + void set_prev_owner (fifo_reader_id_t fr_id) { _prev_owner = fr_id; } + void owner_lock () { _owner_lock.lock (); } void owner_unlock () { _owner_lock.unlock (); } + + int get_shared_nhandlers () const { return (int) _sh_nhandlers; } + void set_shared_nhandlers (int n) { InterlockedExchange (&_sh_nhandlers, n); } + int get_shared_shandlers () const { return (int) _sh_shandlers; } + void set_shared_shandlers (int n) { InterlockedExchange (&_sh_shandlers, n); } + size_t get_shared_fc_handler_committed () const + { return (size_t) _sh_fc_handler_committed; } + void set_shared_fc_handler_committed (size_t n) + { InterlockedExchange (&_sh_fc_handler_committed, (LONG) n); } }; class fhandler_fifo: public fhandler_base @@ -1360,24 +1376,47 @@ class fhandler_fifo: public fhandler_base HANDLE shmem_handle; fifo_shmem_t *shmem; + HANDLE shared_fc_hdl; + /* Dynamically growing array in shared memory. */ + fifo_client_handler *shared_fc_handler; bool __reg2 wait (HANDLE); static NTSTATUS npfs_handle (HANDLE &); HANDLE create_pipe_instance (); NTSTATUS open_pipe (HANDLE&); NTSTATUS wait_open_pipe (HANDLE&); - int add_client_handler (); + int add_client_handler (bool new_pipe_instance = true); void delete_client_handler (int); + void cleanup_handlers (); + void close_all_handlers (); void cancel_reader_thread (); void record_connection (fifo_client_handler&, fifo_client_connect_state = fc_connected); int create_shmem (); int reopen_shmem (); + int create_shared_fc_handler (); + int reopen_shared_fc_handler (); + int remap_shared_fc_handler (size_t); int inc_nreaders () { return shmem->inc_nreaders (); } int dec_nreaders () { return shmem->dec_nreaders (); } + fifo_reader_id_t get_prev_owner () const { return shmem->get_prev_owner (); } + void set_prev_owner (fifo_reader_id_t fr_id) + { shmem->set_prev_owner (fr_id); } + + int get_shared_nhandlers () { return shmem->get_shared_nhandlers (); } + void set_shared_nhandlers (int n) { shmem->set_shared_nhandlers (n); } + int get_shared_shandlers () { return shmem->get_shared_shandlers (); } + void set_shared_shandlers (int n) { shmem->set_shared_shandlers (n); } + size_t get_shared_fc_handler_committed () const + { return shmem->get_shared_fc_handler_committed (); } + void set_shared_fc_handler_committed (size_t n) + { shmem->set_shared_fc_handler_committed (n); } + int update_my_handlers (); + int update_shared_handlers (); + public: fhandler_fifo (); bool hit_eof (); diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 595e55ad9..fd5d9f805 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -21,6 +21,7 @@ #include "shared_info.h" #include "ntdll.h" #include "cygwait.h" +#include /* Overview: @@ -65,6 +66,9 @@ STATUS_PIPE_EMPTY simply means there's no data to be read. */ || _s == STATUS_PIPE_NOT_AVAILABLE \ || _s == STATUS_PIPE_BUSY; }) +/* Number of pages reserved for shared_fc_handler. */ +#define SH_FC_HANDLER_PAGES 100 + static NO_COPY fifo_reader_id_t null_fr_id = { .winpid = 0, .fh = NULL }; fhandler_fifo::fhandler_fifo (): @@ -74,7 +78,8 @@ fhandler_fifo::fhandler_fifo (): fc_handler (NULL), shandlers (0), nhandlers (0), reader (false), writer (false), duplexer (false), max_atomic_write (DEFAULT_PIPEBUFSIZE), - me (null_fr_id), shmem_handle (NULL), shmem (NULL) + me (null_fr_id), shmem_handle (NULL), shmem (NULL), + shared_fc_hdl (NULL), shared_fc_handler (NULL) { pipe_name_buf[0] = L'\0'; need_fork_fixup (true); @@ -286,10 +291,9 @@ fhandler_fifo::wait_open_pipe (HANDLE& ph) } int -fhandler_fifo::add_client_handler () +fhandler_fifo::add_client_handler (bool new_pipe_instance) { fifo_client_handler fc; - HANDLE ph = NULL; if (nhandlers >= shandlers) { @@ -303,11 +307,14 @@ fhandler_fifo::add_client_handler () } fc_handler = (fifo_client_handler *) temp; } - ph = create_pipe_instance (); - if (!ph) - return -1; - fc.h = ph; - fc.state = fc_listening; + if (new_pipe_instance) + { + HANDLE ph = create_pipe_instance (); + if (!ph) + return -1; + fc.h = ph; + fc.state = fc_listening; + } fc_handler[nhandlers++] = fc; return 0; } @@ -321,6 +328,21 @@ fhandler_fifo::delete_client_handler (int i) (nhandlers - i) * sizeof (fc_handler[i])); } +/* Delete invalid handlers. */ +void +fhandler_fifo::cleanup_handlers () +{ + int i = 0; + + while (i < nhandlers) + { + if (fc_handler[i].state < fc_connected) + delete_client_handler (i); + else + i++; + } +} + void fhandler_fifo::record_connection (fifo_client_handler& fc, fifo_client_connect_state s) @@ -331,6 +353,65 @@ fhandler_fifo::record_connection (fifo_client_handler& fc, set_pipe_non_blocking (fc.h, true); } +/* Called from fifo_reader_thread_func with owner_lock in place. */ +int +fhandler_fifo::update_my_handlers () +{ + close_all_handlers (); + fifo_reader_id_t prev = get_prev_owner (); + if (!prev) + { + debug_printf ("No previous owner to copy handles from"); + return 0; + } + HANDLE prev_proc; + if (prev.winpid == me.winpid) + prev_proc = GetCurrentProcess (); + else + prev_proc = OpenProcess (PROCESS_DUP_HANDLE, false, prev.winpid); + if (!prev_proc) + { + debug_printf ("Can't open process of previous owner, %E"); + __seterrno (); + return -1; + } + + for (int i = 0; i < get_shared_nhandlers (); i++) + { + /* Should never happen. */ + if (shared_fc_handler[i].state < fc_connected) + continue; + if (add_client_handler (false) < 0) + api_fatal ("Can't add client handler, %E"); + fifo_client_handler &fc = fc_handler[nhandlers - 1]; + if (!DuplicateHandle (prev_proc, shared_fc_handler[i].h, + GetCurrentProcess (), &fc.h, 0, + !close_on_exec (), DUPLICATE_SAME_ACCESS)) + { + debug_printf ("Can't duplicate handle of previous owner, %E"); + --nhandlers; + __seterrno (); + return -1; + } + fc.state = shared_fc_handler[i].state; + } + return 0; +} + +int +fhandler_fifo::update_shared_handlers () +{ + cleanup_handlers (); + if (nhandlers > get_shared_shandlers ()) + { + if (remap_shared_fc_handler (nhandlers * sizeof (fc_handler[0])) < 0) + return -1; + } + set_shared_nhandlers (nhandlers); + memcpy (shared_fc_handler, fc_handler, nhandlers * sizeof (fc_handler[0])); + return 0; +} + static DWORD WINAPI fifo_reader_thread (LPVOID param) { @@ -355,6 +436,8 @@ fhandler_fifo::fifo_reader_thread_func () if (!cur_owner) { set_owner (me); + if (update_my_handlers () < 0) + api_fatal ("Can't update my handlers, %E"); owner_unlock (); continue; } @@ -368,19 +451,7 @@ fhandler_fifo::fifo_reader_thread_func () { /* I'm the owner */ fifo_client_lock (); - - /* Cleanup the fc_handler list. */ - fifo_client_lock (); - int i = 0; - while (i < nhandlers) - { - if (fc_handler[i].state < fc_connected) - delete_client_handler (i); - else - i++; - } - - /* Create a new client handler. */ + cleanup_handlers (); if (add_client_handler () < 0) api_fatal ("Can't add a client handler, %E"); @@ -391,6 +462,7 @@ fhandler_fifo::fifo_reader_thread_func () NTSTATUS status; IO_STATUS_BLOCK io; bool cancel = false; + bool update = false; status = NtFsControlFile (fc.h, conn_evt, NULL, NULL, &io, FSCTL_PIPE_LISTEN, NULL, 0, NULL, 0); @@ -407,6 +479,7 @@ fhandler_fifo::fifo_reader_thread_func () case WAIT_OBJECT_0 + 1: status = STATUS_THREAD_IS_TERMINATING; cancel = true; + update = true; break; default: api_fatal ("WFMO failed, %E"); @@ -459,6 +532,8 @@ fhandler_fifo::fifo_reader_thread_func () fifo_client_unlock (); if (ph) NtClose (ph); + if (update && update_shared_handlers () < 0) + api_fatal ("Can't update shared handlers, %E"); if (cancel) goto canceled; } @@ -532,6 +607,100 @@ fhandler_fifo::reopen_shmem () return 0; } +/* On first creation, map and commit one page of memory. */ +int +fhandler_fifo::create_shared_fc_handler () +{ + HANDLE sect; + OBJECT_ATTRIBUTES attr; + NTSTATUS status; + LARGE_INTEGER size + = { .QuadPart = (LONGLONG) (SH_FC_HANDLER_PAGES * wincap.page_size ()) }; + SIZE_T viewsize = get_shared_fc_handler_committed () ?: wincap.page_size (); + PVOID addr = NULL; + UNICODE_STRING uname; + WCHAR shared_fc_name[MAX_PATH]; + + __small_swprintf (shared_fc_name, L"fifo-shared-fc.%08x.%016X", get_dev (), + get_ino ()); + RtlInitUnicodeString (&uname, shared_fc_name); + InitializeObjectAttributes (&attr, &uname, OBJ_INHERIT, + get_shared_parent_dir (), NULL); + status = NtCreateSection (§, STANDARD_RIGHTS_REQUIRED | SECTION_QUERY + | SECTION_MAP_READ | SECTION_MAP_WRITE, &attr, + &size, PAGE_READWRITE, SEC_RESERVE, NULL); + if (status == STATUS_OBJECT_NAME_COLLISION) + status = NtOpenSection (§, STANDARD_RIGHTS_REQUIRED | SECTION_QUERY + | SECTION_MAP_READ | SECTION_MAP_WRITE, &attr); + if (!NT_SUCCESS (status)) + { + __seterrno_from_nt_status (status); + return -1; + } + status = NtMapViewOfSection (sect, NtCurrentProcess (), &addr, 0, viewsize, + NULL, &viewsize, ViewShare, 0, PAGE_READWRITE); + if (!NT_SUCCESS (status)) + { + NtClose (sect); + __seterrno_from_nt_status (status); + return -1; + } + shared_fc_hdl = sect; + shared_fc_handler = (fifo_client_handler *) addr; + if (!get_shared_fc_handler_committed ()) + set_shared_fc_handler_committed (viewsize); + set_shared_shandlers (viewsize / sizeof (fifo_client_handler)); + return 0; +} + +/* shared_fc_hdl must be valid when this is called. */ +int +fhandler_fifo::reopen_shared_fc_handler () +{ + NTSTATUS status; + SIZE_T viewsize = get_shared_fc_handler_committed (); + PVOID addr = NULL; + + status = NtMapViewOfSection (shared_fc_hdl, NtCurrentProcess (), + &addr, 0, viewsize, NULL, &viewsize, + ViewShare, 0, PAGE_READWRITE); + if (!NT_SUCCESS (status)) + { + __seterrno_from_nt_status (status); + return -1; + } + shared_fc_handler = (fifo_client_handler *) addr; + return 0; +} + +int +fhandler_fifo::remap_shared_fc_handler (size_t nbytes) +{ + NTSTATUS status; + SIZE_T viewsize = roundup2 (nbytes, wincap.page_size ()); + PVOID addr = NULL; + + if (viewsize > SH_FC_HANDLER_PAGES * wincap.page_size ()) + { + set_errno (ENOMEM); + return -1; + } + + NtUnmapViewOfSection (NtCurrentProcess (), shared_fc_handler); + status = NtMapViewOfSection (shared_fc_hdl, NtCurrentProcess (), + &addr, 0, viewsize, NULL, &viewsize, + ViewShare, 0, PAGE_READWRITE); + if (!NT_SUCCESS (status)) + { + __seterrno_from_nt_status (status); + return -1; + } + shared_fc_handler = (fifo_client_handler *) addr; + set_shared_fc_handler_committed (viewsize); + set_shared_shandlers (viewsize / sizeof (fc_handler[0])); + return 0; +} + int fhandler_fifo::open (int flags, mode_t) { @@ -599,6 +768,8 @@ fhandler_fifo::open (int flags, mode_t) SetEvent (read_ready); if (create_shmem () < 0) goto err_close_writer_opening; + if (create_shared_fc_handler () < 0) + goto err_close_shmem; inc_nreaders (); if (!(cancel_evt = create_event ())) goto err_dec_nreaders; @@ -724,7 +895,10 @@ err_close_cancel_evt: err_dec_nreaders: if (dec_nreaders () == 0) ResetEvent (read_ready); -/* err_close_shmem: */ +/* err_close_shared_fc_handler: */ + NtUnmapViewOfSection (NtCurrentProcess (), shared_fc_handler); + NtClose (shared_fc_hdl); +err_close_shmem: NtUnmapViewOfSection (NtCurrentProcess (), shmem); NtClose (shmem_handle); err_close_writer_opening: @@ -1012,6 +1186,14 @@ fhandler_fifo::fstatvfs (struct statvfs *sfs) return fh.fstatvfs (sfs); } +void +fhandler_fifo::close_all_handlers () +{ + for (int i = 0; i < nhandlers; i++) + fc_handler[i].close (); + nhandlers = 0; +} + int fifo_client_handler::pipe_state () { @@ -1062,6 +1244,10 @@ fhandler_fifo::close () NtUnmapViewOfSection (NtCurrentProcess (), shmem); if (shmem_handle) NtClose (shmem_handle); + if (shared_fc_handler) + NtUnmapViewOfSection (NtCurrentProcess (), shared_fc_handler); + if (shared_fc_hdl) + NtClose (shared_fc_hdl); } if (read_ready) NtClose (read_ready); @@ -1069,8 +1255,7 @@ fhandler_fifo::close () NtClose (write_ready); if (writer_opening) NtClose (writer_opening); - for (int i = 0; i < nhandlers; i++) - fc_handler[i].close (); + close_all_handlers (); if (fc_handler) free (fc_handler); return fhandler_base::close (); @@ -1144,8 +1329,17 @@ fhandler_fifo::dup (fhandler_base *child, int flags) } if (fhf->reopen_shmem () < 0) goto err_close_shmem_handle; + if (!DuplicateHandle (GetCurrentProcess (), shared_fc_hdl, + GetCurrentProcess (), &fhf->shared_fc_hdl, + 0, !(flags & O_CLOEXEC), DUPLICATE_SAME_ACCESS)) + { + __seterrno (); + goto err_close_shmem; + } + if (fhf->reopen_shared_fc_handler () < 0) + goto err_close_shared_fc_hdl; if (!(fhf->cancel_evt = create_event ())) - goto err_close_shmem; + goto err_close_shared_fc_handler; if (!(fhf->thr_sync_evt = create_event ())) goto err_close_cancel_evt; inc_nreaders (); @@ -1155,6 +1349,10 @@ fhandler_fifo::dup (fhandler_base *child, int flags) return 0; err_close_cancel_evt: NtClose (fhf->cancel_evt); +err_close_shared_fc_handler: + NtUnmapViewOfSection (GetCurrentProcess (), fhf->shared_fc_handler); +err_close_shared_fc_hdl: + NtClose (fhf->shared_fc_hdl); err_close_shmem: NtUnmapViewOfSection (GetCurrentProcess (), fhf->shmem); err_close_shmem_handle: @@ -1184,6 +1382,9 @@ fhandler_fifo::fixup_after_fork (HANDLE parent) fork_fixup (parent, shmem_handle, "shmem_handle"); if (reopen_shmem () < 0) api_fatal ("Can't reopen shared memory during fork, %E"); + fork_fixup (parent, shared_fc_hdl, "shared_fc_hdl"); + if (reopen_shared_fc_handler () < 0) + api_fatal ("Can't reopen shared fc_handler memory during fork, %E"); if (close_on_exec ()) /* Prevent a later attempt to close the non-inherited pipe-instance handles copied from the parent. */ @@ -1209,6 +1410,8 @@ fhandler_fifo::fixup_after_exec () if (reopen_shmem () < 0) api_fatal ("Can't reopen shared memory during exec, %E"); + if (reopen_shared_fc_handler () < 0) + api_fatal ("Can't reopen shared fc_handler memory during exec, %E"); fc_handler = NULL; nhandlers = shandlers = 0; me.winpid = GetCurrentProcessId (); From 39a9cd94651d306117c47ea1ac3eab45f6098d0e Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Thu, 23 Apr 2020 21:29:32 -0400 Subject: [PATCH 343/520] Cygwin: FIFO: take ownership on exec If fixup_after_exec is called on a non-close-on-exec reader whose parent is the owner, transfer ownership to the child. Otherwise the parent's pipe handles will be closed before any other reader can duplicate them. To help with this, make the cancel_evt and thr_sync_evt handles inheritable, so that the child can terminate the parent's fifo_reader_thread (and the parent will update the shared fc_handler list). Add an optional argument 'from_exec' to update_my_handlers to simplify its use in this case; no handle duplication is required. --- winsup/cygwin/fhandler.h | 2 +- winsup/cygwin/fhandler_fifo.cc | 157 +++++++++++++++++++++++---------- 2 files changed, 110 insertions(+), 49 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 34b209f5d..1cd7d2b11 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1414,7 +1414,7 @@ class fhandler_fifo: public fhandler_base { return shmem->get_shared_fc_handler_committed (); } void set_shared_fc_handler_committed (size_t n) { shmem->set_shared_fc_handler_committed (n); } - int update_my_handlers (); + int update_my_handlers (bool from_exec = false); int update_shared_handlers (); public: diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index fd5d9f805..5ae7b1f9c 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -104,13 +104,14 @@ sec_user_cloexec (bool cloexec, PSECURITY_ATTRIBUTES sa, PSID sid) } static HANDLE -create_event () +create_event (bool inherit = false) { NTSTATUS status; OBJECT_ATTRIBUTES attr; HANDLE evt = NULL; - InitializeObjectAttributes (&attr, NULL, 0, NULL, NULL); + InitializeObjectAttributes (&attr, NULL, inherit ? OBJ_INHERIT : 0, + NULL, NULL); status = NtCreateEvent (&evt, EVENT_ALL_ACCESS, &attr, NotificationEvent, FALSE); if (!NT_SUCCESS (status)) @@ -353,47 +354,72 @@ fhandler_fifo::record_connection (fifo_client_handler& fc, set_pipe_non_blocking (fc.h, true); } -/* Called from fifo_reader_thread_func with owner_lock in place. */ +/* Called from fifo_reader_thread_func with owner_lock in place, also + from fixup_after_exec with shared handles useable as they are. */ int -fhandler_fifo::update_my_handlers () +fhandler_fifo::update_my_handlers (bool from_exec) { - close_all_handlers (); - fifo_reader_id_t prev = get_prev_owner (); - if (!prev) + if (from_exec) { - debug_printf ("No previous owner to copy handles from"); - return 0; - } - HANDLE prev_proc; - if (prev.winpid == me.winpid) - prev_proc = GetCurrentProcess (); - else - prev_proc = OpenProcess (PROCESS_DUP_HANDLE, false, prev.winpid); - if (!prev_proc) - { - debug_printf ("Can't open process of previous owner, %E"); - __seterrno (); - return -1; - } - - for (int i = 0; i < get_shared_nhandlers (); i++) - { - /* Should never happen. */ - if (shared_fc_handler[i].state < fc_connected) - continue; - if (add_client_handler (false) < 0) - api_fatal ("Can't add client handler, %E"); - fifo_client_handler &fc = fc_handler[nhandlers - 1]; - if (!DuplicateHandle (prev_proc, shared_fc_handler[i].h, - GetCurrentProcess (), &fc.h, 0, - !close_on_exec (), DUPLICATE_SAME_ACCESS)) + nhandlers = get_shared_nhandlers (); + if (nhandlers > shandlers) { - debug_printf ("Can't duplicate handle of previous owner, %E"); - --nhandlers; + int save = shandlers; + shandlers = nhandlers + 64; + void *temp = realloc (fc_handler, + shandlers * sizeof (fc_handler[0])); + if (!temp) + { + shandlers = save; + nhandlers = 0; + set_errno (ENOMEM); + return -1; + } + fc_handler = (fifo_client_handler *) temp; + } + memcpy (fc_handler, shared_fc_handler, + nhandlers * sizeof (fc_handler[0])); + } + else + { + close_all_handlers (); + fifo_reader_id_t prev = get_prev_owner (); + if (!prev) + { + debug_printf ("No previous owner to copy handles from"); + return 0; + } + HANDLE prev_proc; + if (prev.winpid == me.winpid) + prev_proc = GetCurrentProcess (); + else + prev_proc = OpenProcess (PROCESS_DUP_HANDLE, false, prev.winpid); + if (!prev_proc) + { + debug_printf ("Can't open process of previous owner, %E"); __seterrno (); return -1; } - fc.state = shared_fc_handler[i].state; + + for (int i = 0; i < get_shared_nhandlers (); i++) + { + /* Should never happen. */ + if (shared_fc_handler[i].state < fc_connected) + continue; + if (add_client_handler (false) < 0) + api_fatal ("Can't add client handler, %E"); + fifo_client_handler &fc = fc_handler[nhandlers - 1]; + if (!DuplicateHandle (prev_proc, shared_fc_handler[i].h, + GetCurrentProcess (), &fc.h, 0, + !close_on_exec (), DUPLICATE_SAME_ACCESS)) + { + debug_printf ("Can't duplicate handle of previous owner, %E"); + --nhandlers; + __seterrno (); + return -1; + } + fc.state = shared_fc_handler[i].state; + } } return 0; } @@ -771,9 +797,9 @@ fhandler_fifo::open (int flags, mode_t) if (create_shared_fc_handler () < 0) goto err_close_shmem; inc_nreaders (); - if (!(cancel_evt = create_event ())) + if (!(cancel_evt = create_event (true))) goto err_dec_nreaders; - if (!(thr_sync_evt = create_event ())) + if (!(thr_sync_evt = create_event (true))) goto err_close_cancel_evt; me.winpid = GetCurrentProcessId (); me.fh = this; @@ -1338,9 +1364,9 @@ fhandler_fifo::dup (fhandler_base *child, int flags) } if (fhf->reopen_shared_fc_handler () < 0) goto err_close_shared_fc_hdl; - if (!(fhf->cancel_evt = create_event ())) + if (!(fhf->cancel_evt = create_event (true))) goto err_close_shared_fc_handler; - if (!(fhf->thr_sync_evt = create_event ())) + if (!(fhf->thr_sync_evt = create_event (true))) goto err_close_cancel_evt; inc_nreaders (); fhf->me.fh = fhf; @@ -1389,9 +1415,17 @@ fhandler_fifo::fixup_after_fork (HANDLE parent) /* Prevent a later attempt to close the non-inherited pipe-instance handles copied from the parent. */ nhandlers = 0; - if (!(cancel_evt = create_event ())) + else + { + /* Close inherited handles needed only by exec. */ + if (cancel_evt) + NtClose (cancel_evt); + if (thr_sync_evt) + NtClose (thr_sync_evt); + } + if (!(cancel_evt = create_event (true))) api_fatal ("Can't create reader thread cancel event during fork, %E"); - if (!(thr_sync_evt = create_event ())) + if (!(thr_sync_evt = create_event (true))) api_fatal ("Can't create reader thread sync event during fork, %E"); inc_nreaders (); me.winpid = GetCurrentProcessId (); @@ -1414,10 +1448,32 @@ fhandler_fifo::fixup_after_exec () api_fatal ("Can't reopen shared fc_handler memory during exec, %E"); fc_handler = NULL; nhandlers = shandlers = 0; + + /* Cancel parent's reader thread */ + if (cancel_evt) + SetEvent (cancel_evt); + if (thr_sync_evt) + WaitForSingleObject (thr_sync_evt, INFINITE); + + /* Take ownership if parent is owner. */ + fifo_reader_id_t parent_fr = me; me.winpid = GetCurrentProcessId (); - if (!(cancel_evt = create_event ())) + owner_lock (); + if (get_owner () == parent_fr) + { + set_owner (me); + if (update_my_handlers (true) < 0) + api_fatal ("Can't update my handlers, %E"); + } + owner_unlock (); + /* Close inherited cancel_evt and thr_sync_evt. */ + if (cancel_evt) + NtClose (cancel_evt); + if (thr_sync_evt) + NtClose (thr_sync_evt); + if (!(cancel_evt = create_event (true))) api_fatal ("Can't create reader thread cancel event during exec, %E"); - if (!(thr_sync_evt = create_event ())) + if (!(thr_sync_evt = create_event (true))) api_fatal ("Can't create reader thread sync event during exec, %E"); /* At this moment we're a new reader. The count will be decremented when the parent closes. */ @@ -1433,8 +1489,13 @@ fhandler_fifo::set_close_on_exec (bool val) set_no_inheritance (read_ready, val); set_no_inheritance (write_ready, val); set_no_inheritance (writer_opening, val); - fifo_client_lock (); - for (int i = 0; i < nhandlers; i++) - set_no_inheritance (fc_handler[i].h, val); - fifo_client_unlock (); + if (reader) + { + set_no_inheritance (cancel_evt, val); + set_no_inheritance (thr_sync_evt, val); + fifo_client_lock (); + for (int i = 0; i < nhandlers; i++) + set_no_inheritance (fc_handler[i].h, val); + fifo_client_unlock (); + } } From f35dfff3dec716869132cc89827878dc22059665 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Fri, 24 Apr 2020 09:05:12 -0400 Subject: [PATCH 344/520] Cygwin: FIFO: find a new owner when closing If the owning reader is closing, wait for another reader (if there is one) to take ownership before closing the owner's pipe handles. To synchronize the ownership transfer, add events owner_needed_evt and owner_found_evt, and add methods owner_needed and owner_found to set/reset them. Modify the fifo_reader_thread function to wake up all non-owners when a new owner is needed. Make a cosmetic change in close so that fhandler_base::close is called only if we have a write handle. This prevents strace output from being littered with statements that the null handle is being closed. --- winsup/cygwin/fhandler.h | 14 +++++ winsup/cygwin/fhandler_fifo.cc | 109 +++++++++++++++++++++++++++++---- 2 files changed, 112 insertions(+), 11 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 1cd7d2b11..f8c1b52a4 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1359,6 +1359,10 @@ class fhandler_fifo: public fhandler_base HANDLE write_ready; /* A writer is open; OK for a reader to open. */ HANDLE writer_opening; /* A writer is opening; no EOF. */ + /* Handles to named events needed by all readers of a given FIFO. */ + HANDLE owner_needed_evt; /* The owner is closing. */ + HANDLE owner_found_evt; /* A new owner has taken over. */ + /* Handles to non-shared events needed for fifo_reader_threads. */ HANDLE cancel_evt; /* Signal thread to terminate. */ HANDLE thr_sync_evt; /* The thread has terminated. */ @@ -1405,6 +1409,16 @@ class fhandler_fifo: public fhandler_base fifo_reader_id_t get_prev_owner () const { return shmem->get_prev_owner (); } void set_prev_owner (fifo_reader_id_t fr_id) { shmem->set_prev_owner (fr_id); } + void owner_needed () + { + ResetEvent (owner_found_evt); + SetEvent (owner_needed_evt); + } + void owner_found () + { + ResetEvent (owner_needed_evt); + SetEvent (owner_found_evt); + } int get_shared_nhandlers () { return shmem->get_shared_nhandlers (); } void set_shared_nhandlers (int n) { shmem->set_shared_nhandlers (n); } diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 5ae7b1f9c..793adfae8 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -74,6 +74,7 @@ static NO_COPY fifo_reader_id_t null_fr_id = { .winpid = 0, .fh = NULL }; fhandler_fifo::fhandler_fifo (): fhandler_base (), read_ready (NULL), write_ready (NULL), writer_opening (NULL), + owner_needed_evt (NULL), owner_found_evt (NULL), cancel_evt (NULL), thr_sync_evt (NULL), _maybe_eof (false), fc_handler (NULL), shandlers (0), nhandlers (0), reader (false), writer (false), duplexer (false), @@ -464,14 +465,23 @@ fhandler_fifo::fifo_reader_thread_func () set_owner (me); if (update_my_handlers () < 0) api_fatal ("Can't update my handlers, %E"); + owner_found (); owner_unlock (); continue; } else if (cur_owner != me) { owner_unlock (); - WaitForSingleObject (cancel_evt, INFINITE); - goto canceled; + HANDLE w[2] = { owner_needed_evt, cancel_evt }; + switch (WaitForMultipleObjects (2, w, false, INFINITE)) + { + case WAIT_OBJECT_0: + continue; + case WAIT_OBJECT_0 + 1: + goto canceled; + default: + api_fatal ("WFMO failed, %E"); + } } else { @@ -797,8 +807,23 @@ fhandler_fifo::open (int flags, mode_t) if (create_shared_fc_handler () < 0) goto err_close_shmem; inc_nreaders (); + npbuf[0] = 'n'; + if (!(owner_needed_evt = CreateEvent (sa_buf, true, false, npbuf))) + { + debug_printf ("CreateEvent for %s failed, %E", npbuf); + __seterrno (); + goto err_dec_nreaders; + } + npbuf[0] = 'f'; + if (!(owner_found_evt = CreateEvent (sa_buf, true, false, npbuf))) + { + debug_printf ("CreateEvent for %s failed, %E", npbuf); + __seterrno (); + goto err_close_owner_needed_evt; + } + /* Make cancel and sync inheritable for exec. */ if (!(cancel_evt = create_event (true))) - goto err_dec_nreaders; + goto err_close_owner_found_evt; if (!(thr_sync_evt = create_event (true))) goto err_close_cancel_evt; me.winpid = GetCurrentProcessId (); @@ -918,6 +943,10 @@ err_close_reader: return 0; err_close_cancel_evt: NtClose (cancel_evt); +err_close_owner_found_evt: + NtClose (owner_found_evt); +err_close_owner_needed_evt: + NtClose (owner_needed_evt); err_dec_nreaders: if (dec_nreaders () == 0) ResetEvent (read_ready); @@ -1255,13 +1284,49 @@ fhandler_fifo::close () { if (reader) { - if (dec_nreaders () == 0) - ResetEvent (read_ready); + /* If we're the owner, try to find a new owner. */ + bool find_new_owner = false; + cancel_reader_thread (); owner_lock (); if (get_owner () == me) - set_owner (null_fr_id); + { + find_new_owner = true; + set_owner (null_fr_id); + set_prev_owner (me); + owner_needed (); + } owner_unlock (); + if (dec_nreaders () == 0) + ResetEvent (read_ready); + else if (find_new_owner && !IsEventSignalled (owner_found_evt)) + { + bool found = false; + do + if (dec_nreaders () >= 0) + { + /* There's still another reader open. */ + if (WaitForSingleObject (owner_found_evt, 1) == WAIT_OBJECT_0) + found = true; + else + { + owner_lock (); + if (get_owner ()) /* We missed owner_found_evt? */ + found = true; + else + owner_needed (); + owner_unlock (); + } + } + while (inc_nreaders () > 0 && !found); + } + close_all_handlers (); + if (fc_handler) + free (fc_handler); + if (owner_needed_evt) + NtClose (owner_needed_evt); + if (owner_found_evt) + NtClose (owner_found_evt); if (cancel_evt) NtClose (cancel_evt); if (thr_sync_evt) @@ -1281,10 +1346,10 @@ fhandler_fifo::close () NtClose (write_ready); if (writer_opening) NtClose (writer_opening); - close_all_handlers (); - if (fc_handler) - free (fc_handler); - return fhandler_base::close (); + if (nohandle ()) + return 0; + else + return fhandler_base::close (); } /* If we have a write handle (i.e., we're a duplexer or a writer), @@ -1364,8 +1429,22 @@ fhandler_fifo::dup (fhandler_base *child, int flags) } if (fhf->reopen_shared_fc_handler () < 0) goto err_close_shared_fc_hdl; + if (!DuplicateHandle (GetCurrentProcess (), owner_needed_evt, + GetCurrentProcess (), &fhf->owner_needed_evt, + 0, !(flags & O_CLOEXEC), DUPLICATE_SAME_ACCESS)) + { + __seterrno (); + goto err_close_shared_fc_handler; + } + if (!DuplicateHandle (GetCurrentProcess (), owner_found_evt, + GetCurrentProcess (), &fhf->owner_found_evt, + 0, !(flags & O_CLOEXEC), DUPLICATE_SAME_ACCESS)) + { + __seterrno (); + goto err_close_owner_needed_evt; + } if (!(fhf->cancel_evt = create_event (true))) - goto err_close_shared_fc_handler; + goto err_close_owner_found_evt; if (!(fhf->thr_sync_evt = create_event (true))) goto err_close_cancel_evt; inc_nreaders (); @@ -1375,6 +1454,10 @@ fhandler_fifo::dup (fhandler_base *child, int flags) return 0; err_close_cancel_evt: NtClose (fhf->cancel_evt); +err_close_owner_found_evt: + NtClose (fhf->owner_found_evt); +err_close_owner_needed_evt: + NtClose (fhf->owner_needed_evt); err_close_shared_fc_handler: NtUnmapViewOfSection (GetCurrentProcess (), fhf->shared_fc_handler); err_close_shared_fc_hdl: @@ -1411,6 +1494,8 @@ fhandler_fifo::fixup_after_fork (HANDLE parent) fork_fixup (parent, shared_fc_hdl, "shared_fc_hdl"); if (reopen_shared_fc_handler () < 0) api_fatal ("Can't reopen shared fc_handler memory during fork, %E"); + fork_fixup (parent, owner_needed_evt, "owner_needed_evt"); + fork_fixup (parent, owner_found_evt, "owner_found_evt"); if (close_on_exec ()) /* Prevent a later attempt to close the non-inherited pipe-instance handles copied from the parent. */ @@ -1491,6 +1576,8 @@ fhandler_fifo::set_close_on_exec (bool val) set_no_inheritance (writer_opening, val); if (reader) { + set_no_inheritance (owner_needed_evt, val); + set_no_inheritance (owner_found_evt, val); set_no_inheritance (cancel_evt, val); set_no_inheritance (thr_sync_evt, val); fifo_client_lock (); From bf66a56ccaee92f44ec52551969ed52542c4ecfe Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sat, 25 Apr 2020 09:54:18 -0400 Subject: [PATCH 345/520] Cygwin: FIFO: allow any reader to take ownership Add a take_ownership method, used by raw_read and select.cc:peek_fifo. It wakes up all fifo_reader_threads and allows the caller to become owner. The work is done by the fifo_reader_threads. For synchronization we introduce several new fhandler_fifo data members and methods: - update_needed_evt signals the current owner to stop listening for writer connections and update its fc_handler list. - shared_fc_handler() gets and sets the status of the fc_handler update process. - get_pending_owner() and set_pending_owner() get and set the reader that is requesting ownership. Finally, a new 'reading_lock' prevents two readers from trying to take ownership simultaneously. --- winsup/cygwin/fhandler.h | 28 ++++++++- winsup/cygwin/fhandler_fifo.cc | 106 +++++++++++++++++++++++++++++---- winsup/cygwin/select.cc | 4 ++ 3 files changed, 122 insertions(+), 16 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index f8c1b52a4..31c65866e 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1323,12 +1323,13 @@ struct fifo_reader_id_t class fifo_shmem_t { LONG _nreaders; - fifo_reader_id_t _owner, _prev_owner; - af_unix_spinlock_t _owner_lock; + fifo_reader_id_t _owner, _prev_owner, _pending_owner; + af_unix_spinlock_t _owner_lock, _reading_lock; /* Info about shared memory block used for temporary storage of the owner's fc_handler list. */ - LONG _sh_nhandlers, _sh_shandlers, _sh_fc_handler_committed; + LONG _sh_nhandlers, _sh_shandlers, _sh_fc_handler_committed, + _sh_fc_handler_updated; public: int inc_nreaders () { return (int) InterlockedIncrement (&_nreaders); } @@ -1338,9 +1339,13 @@ public: void set_owner (fifo_reader_id_t fr_id) { _owner = fr_id; } fifo_reader_id_t get_prev_owner () const { return _prev_owner; } void set_prev_owner (fifo_reader_id_t fr_id) { _prev_owner = fr_id; } + fifo_reader_id_t get_pending_owner () const { return _pending_owner; } + void set_pending_owner (fifo_reader_id_t fr_id) { _pending_owner = fr_id; } void owner_lock () { _owner_lock.lock (); } void owner_unlock () { _owner_lock.unlock (); } + void reading_lock () { _reading_lock.lock (); } + void reading_unlock () { _reading_lock.unlock (); } int get_shared_nhandlers () const { return (int) _sh_nhandlers; } void set_shared_nhandlers (int n) { InterlockedExchange (&_sh_nhandlers, n); } @@ -1350,6 +1355,9 @@ public: { return (size_t) _sh_fc_handler_committed; } void set_shared_fc_handler_committed (size_t n) { InterlockedExchange (&_sh_fc_handler_committed, (LONG) n); } + bool shared_fc_handler_updated () const { return _sh_fc_handler_updated; } + void shared_fc_handler_updated (bool val) + { InterlockedExchange (&_sh_fc_handler_updated, val); } }; class fhandler_fifo: public fhandler_base @@ -1362,6 +1370,7 @@ class fhandler_fifo: public fhandler_base /* Handles to named events needed by all readers of a given FIFO. */ HANDLE owner_needed_evt; /* The owner is closing. */ HANDLE owner_found_evt; /* A new owner has taken over. */ + HANDLE update_needed_evt; /* shared_fc_handler needs updating. */ /* Handles to non-shared events needed for fifo_reader_threads. */ HANDLE cancel_evt; /* Signal thread to terminate. */ @@ -1409,6 +1418,11 @@ class fhandler_fifo: public fhandler_base fifo_reader_id_t get_prev_owner () const { return shmem->get_prev_owner (); } void set_prev_owner (fifo_reader_id_t fr_id) { shmem->set_prev_owner (fr_id); } + fifo_reader_id_t get_pending_owner () const + { return shmem->get_pending_owner (); } + void set_pending_owner (fifo_reader_id_t fr_id) + { shmem->set_pending_owner (fr_id); } + void owner_needed () { ResetEvent (owner_found_evt); @@ -1430,6 +1444,10 @@ class fhandler_fifo: public fhandler_base { shmem->set_shared_fc_handler_committed (n); } int update_my_handlers (bool from_exec = false); int update_shared_handlers (); + bool shared_fc_handler_updated () const + { return shmem->shared_fc_handler_updated (); } + void shared_fc_handler_updated (bool val) + { shmem->shared_fc_handler_updated (val); } public: fhandler_fifo (); @@ -1449,6 +1467,10 @@ public: void owner_lock () { shmem->owner_lock (); } void owner_unlock () { shmem->owner_unlock (); } + void take_ownership (); + void reading_lock () { shmem->reading_lock (); } + void reading_unlock () { shmem->reading_unlock (); } + int open (int, mode_t); off_t lseek (off_t offset, int whence); int close (); diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 793adfae8..5c059a567 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -74,7 +74,7 @@ static NO_COPY fifo_reader_id_t null_fr_id = { .winpid = 0, .fh = NULL }; fhandler_fifo::fhandler_fifo (): fhandler_base (), read_ready (NULL), write_ready (NULL), writer_opening (NULL), - owner_needed_evt (NULL), owner_found_evt (NULL), + owner_needed_evt (NULL), owner_found_evt (NULL), update_needed_evt (NULL), cancel_evt (NULL), thr_sync_evt (NULL), _maybe_eof (false), fc_handler (NULL), shandlers (0), nhandlers (0), reader (false), writer (false), duplexer (false), @@ -436,6 +436,8 @@ fhandler_fifo::update_shared_handlers () } set_shared_nhandlers (nhandlers); memcpy (shared_fc_handler, fc_handler, nhandlers * sizeof (fc_handler[0])); + shared_fc_handler_updated (true); + set_prev_owner (me); return 0; } @@ -456,20 +458,44 @@ fhandler_fifo::fifo_reader_thread_func () while (1) { - fifo_reader_id_t cur_owner; + fifo_reader_id_t cur_owner, pending_owner; + bool idle = false, take_ownership = false; owner_lock (); cur_owner = get_owner (); - if (!cur_owner) + pending_owner = get_pending_owner (); + + if (pending_owner) { - set_owner (me); - if (update_my_handlers () < 0) - api_fatal ("Can't update my handlers, %E"); - owner_found (); - owner_unlock (); - continue; + if (pending_owner != me) + idle = true; + else + take_ownership = true; } + else if (!cur_owner) + take_ownership = true; else if (cur_owner != me) + idle = true; + if (take_ownership) + { + if (!shared_fc_handler_updated ()) + { + owner_unlock (); + yield (); + continue; + } + else + { + set_owner (me); + set_pending_owner (null_fr_id); + if (update_my_handlers () < 0) + api_fatal ("Can't update my handlers, %E"); + owner_found (); + owner_unlock (); + continue; + } + } + else if (idle) { owner_unlock (); HANDLE w[2] = { owner_needed_evt, cancel_evt }; @@ -494,6 +520,7 @@ fhandler_fifo::fifo_reader_thread_func () /* Listen for a writer to connect to the new client handler. */ fifo_client_handler& fc = fc_handler[nhandlers - 1]; fifo_client_unlock (); + shared_fc_handler_updated (false); owner_unlock (); NTSTATUS status; IO_STATUS_BLOCK io; @@ -504,8 +531,8 @@ fhandler_fifo::fifo_reader_thread_func () FSCTL_PIPE_LISTEN, NULL, 0, NULL, 0); if (status == STATUS_PENDING) { - HANDLE w[2] = { conn_evt, cancel_evt }; - switch (WaitForMultipleObjects (2, w, false, INFINITE)) + HANDLE w[3] = { conn_evt, update_needed_evt, cancel_evt }; + switch (WaitForMultipleObjects (3, w, false, INFINITE)) { case WAIT_OBJECT_0: status = io.Status; @@ -513,6 +540,10 @@ fhandler_fifo::fifo_reader_thread_func () status); break; case WAIT_OBJECT_0 + 1: + status = STATUS_WAIT_1; + update = true; + break; + case WAIT_OBJECT_0 + 2: status = STATUS_THREAD_IS_TERMINATING; cancel = true; update = true; @@ -538,6 +569,7 @@ fhandler_fifo::fifo_reader_thread_func () record_connection (fc, fc_closing); break; case STATUS_THREAD_IS_TERMINATING: + case STATUS_WAIT_1: /* Try to connect a bogus client. Otherwise fc is still listening, and the next connection might not get recorded. */ status1 = open_pipe (ph); @@ -807,6 +839,8 @@ fhandler_fifo::open (int flags, mode_t) if (create_shared_fc_handler () < 0) goto err_close_shmem; inc_nreaders (); + /* Reinitialize _sh_fc_handler_updated, which starts as 0. */ + shared_fc_handler_updated (true); npbuf[0] = 'n'; if (!(owner_needed_evt = CreateEvent (sa_buf, true, false, npbuf))) { @@ -821,9 +855,16 @@ fhandler_fifo::open (int flags, mode_t) __seterrno (); goto err_close_owner_needed_evt; } + npbuf[0] = 'u'; + if (!(update_needed_evt = CreateEvent (sa_buf, false, false, npbuf))) + { + debug_printf ("CreateEvent for %s failed, %E", npbuf); + __seterrno (); + goto err_close_owner_found_evt; + } /* Make cancel and sync inheritable for exec. */ if (!(cancel_evt = create_event (true))) - goto err_close_owner_found_evt; + goto err_close_update_needed_evt; if (!(thr_sync_evt = create_event (true))) goto err_close_cancel_evt; me.winpid = GetCurrentProcessId (); @@ -943,6 +984,8 @@ err_close_reader: return 0; err_close_cancel_evt: NtClose (cancel_evt); +err_close_update_needed_evt: + NtClose (update_needed_evt); err_close_owner_found_evt: NtClose (owner_found_evt); err_close_owner_needed_evt: @@ -1136,6 +1179,24 @@ fhandler_fifo::hit_eof () return ret; } +/* Called from raw_read and select.cc:peek_fifo. */ +void +fhandler_fifo::take_ownership () +{ + owner_lock (); + if (get_owner () == me) + { + owner_unlock (); + return; + } + set_pending_owner (me); + owner_needed (); + SetEvent (update_needed_evt); + owner_unlock (); + /* The reader threads should now do the transfer. */ + WaitForSingleObject (owner_found_evt, INFINITE); +} + void __reg3 fhandler_fifo::raw_read (void *in_ptr, size_t& len) { @@ -1144,6 +1205,9 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) while (1) { + /* No one else can take ownership while we hold the reading_lock. */ + reading_lock (); + take_ownership (); /* Poll the connected clients for input. */ int nconnected = 0; fifo_client_lock (); @@ -1167,6 +1231,7 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) { len = nbytes; fifo_client_unlock (); + reading_unlock (); return; } break; @@ -1187,9 +1252,11 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) fifo_client_unlock (); if (maybe_eof () && hit_eof ()) { + reading_unlock (); len = 0; return; } + reading_unlock (); if (is_nonblocking ()) { set_errno (EAGAIN); @@ -1327,6 +1394,8 @@ fhandler_fifo::close () NtClose (owner_needed_evt); if (owner_found_evt) NtClose (owner_found_evt); + if (update_needed_evt) + NtClose (update_needed_evt); if (cancel_evt) NtClose (cancel_evt); if (thr_sync_evt) @@ -1443,8 +1512,15 @@ fhandler_fifo::dup (fhandler_base *child, int flags) __seterrno (); goto err_close_owner_needed_evt; } + if (!DuplicateHandle (GetCurrentProcess (), update_needed_evt, + GetCurrentProcess (), &fhf->update_needed_evt, + 0, !(flags & O_CLOEXEC), DUPLICATE_SAME_ACCESS)) + { + __seterrno (); + goto err_close_owner_found_evt; + } if (!(fhf->cancel_evt = create_event (true))) - goto err_close_owner_found_evt; + goto err_close_update_needed_evt; if (!(fhf->thr_sync_evt = create_event (true))) goto err_close_cancel_evt; inc_nreaders (); @@ -1454,6 +1530,8 @@ fhandler_fifo::dup (fhandler_base *child, int flags) return 0; err_close_cancel_evt: NtClose (fhf->cancel_evt); +err_close_update_needed_evt: + NtClose (fhf->update_needed_evt); err_close_owner_found_evt: NtClose (fhf->owner_found_evt); err_close_owner_needed_evt: @@ -1496,6 +1574,7 @@ fhandler_fifo::fixup_after_fork (HANDLE parent) api_fatal ("Can't reopen shared fc_handler memory during fork, %E"); fork_fixup (parent, owner_needed_evt, "owner_needed_evt"); fork_fixup (parent, owner_found_evt, "owner_found_evt"); + fork_fixup (parent, update_needed_evt, "update_needed_evt"); if (close_on_exec ()) /* Prevent a later attempt to close the non-inherited pipe-instance handles copied from the parent. */ @@ -1578,6 +1657,7 @@ fhandler_fifo::set_close_on_exec (bool val) { set_no_inheritance (owner_needed_evt, val); set_no_inheritance (owner_found_evt, val); + set_no_inheritance (update_needed_evt, val); set_no_inheritance (cancel_evt, val); set_no_inheritance (thr_sync_evt, val); fifo_client_lock (); diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 9323c423f..2c299acf7 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -866,6 +866,8 @@ peek_fifo (select_record *s, bool from_select) goto out; } + fh->reading_lock (); + fh->take_ownership (); fh->fifo_client_lock (); int nconnected = 0; for (int i = 0; i < fh->get_nhandlers (); i++) @@ -888,6 +890,7 @@ peek_fifo (select_record *s, bool from_select) fh->get_fc_handler (i).get_state () = fc_input_avail; select_printf ("read: %s, ready for read", fh->get_name ()); fh->fifo_client_unlock (); + fh->reading_unlock (); gotone += s->read_ready = true; goto out; default: @@ -905,6 +908,7 @@ peek_fifo (select_record *s, bool from_select) if (s->except_selected) gotone += s->except_ready = true; } + fh->reading_unlock (); } out: if (s->write_selected) From 4811889e0c6a9e8e725d0cd0c8e5c8393017a04e Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Wed, 6 May 2020 11:31:39 -0400 Subject: [PATCH 346/520] Cygwin: FIFO: support opening multiple readers Although we can have multiple readers open because of dup/fork/exec, the current code does not support multiple readers opening a FIFO by explicitly calling 'open'. The main complication in supporting this is that when a blocking reader tries to open and there's already one open, it has to check whether there any writers open. It can't rely on the write_ready event, whose state hasn't changed since the first writer opened. To fix this, add two new named events, check_write_ready_evt and write_ready_ok_evt, and a new method, check_write_ready(). The first event signals the owner's reader thread to call check_write_ready(), which polls the fc_handler list to check for connected writers. If it finds none, it checks to see if there's a writer in the process and then sets/resets write_ready appropriately. When check_write_ready() finishes it sets write_ready_ok_evt to signal the reader that write_ready has been updated. The polling is done via fifo_client_handler::pipe_state(). As long as it's calling that function anyway, check_write_ready() updates the state of each handler. Also add a new lock to prevent a race if two readers are trying to open simultaneously. --- winsup/cygwin/fhandler.h | 9 ++- winsup/cygwin/fhandler_fifo.cc | 129 ++++++++++++++++++++++++++++++--- 2 files changed, 127 insertions(+), 11 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 31c65866e..8a23d6753 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1324,7 +1324,7 @@ class fifo_shmem_t { LONG _nreaders; fifo_reader_id_t _owner, _prev_owner, _pending_owner; - af_unix_spinlock_t _owner_lock, _reading_lock; + af_unix_spinlock_t _owner_lock, _reading_lock, _reader_opening_lock; /* Info about shared memory block used for temporary storage of the owner's fc_handler list. */ @@ -1346,6 +1346,8 @@ public: void owner_unlock () { _owner_lock.unlock (); } void reading_lock () { _reading_lock.lock (); } void reading_unlock () { _reading_lock.unlock (); } + void reader_opening_lock () { _reader_opening_lock.lock (); } + void reader_opening_unlock () { _reader_opening_lock.unlock (); } int get_shared_nhandlers () const { return (int) _sh_nhandlers; } void set_shared_nhandlers (int n) { InterlockedExchange (&_sh_nhandlers, n); } @@ -1371,6 +1373,8 @@ class fhandler_fifo: public fhandler_base HANDLE owner_needed_evt; /* The owner is closing. */ HANDLE owner_found_evt; /* A new owner has taken over. */ HANDLE update_needed_evt; /* shared_fc_handler needs updating. */ + HANDLE check_write_ready_evt; /* write_ready needs to be checked. */ + HANDLE write_ready_ok_evt; /* check_write_ready is done. */ /* Handles to non-shared events needed for fifo_reader_threads. */ HANDLE cancel_evt; /* Signal thread to terminate. */ @@ -1448,6 +1452,9 @@ class fhandler_fifo: public fhandler_base { return shmem->shared_fc_handler_updated (); } void shared_fc_handler_updated (bool val) { shmem->shared_fc_handler_updated (val); } + void check_write_ready (); + void reader_opening_lock () { shmem->reader_opening_lock (); } + void reader_opening_unlock () { shmem->reader_opening_unlock (); } public: fhandler_fifo (); diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 5c059a567..4c7d51edb 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -75,6 +75,7 @@ fhandler_fifo::fhandler_fifo (): fhandler_base (), read_ready (NULL), write_ready (NULL), writer_opening (NULL), owner_needed_evt (NULL), owner_found_evt (NULL), update_needed_evt (NULL), + check_write_ready_evt (NULL), write_ready_ok_evt (NULL), cancel_evt (NULL), thr_sync_evt (NULL), _maybe_eof (false), fc_handler (NULL), shandlers (0), nhandlers (0), reader (false), writer (false), duplexer (false), @@ -441,6 +442,45 @@ fhandler_fifo::update_shared_handlers () return 0; } +/* The write_ready event gets set when a writer opens, to indicate + that a blocking reader can open. If a second reader wants to open, + we need to see if there are still any writers open. */ +void +fhandler_fifo::check_write_ready () +{ + bool set = false; + + fifo_client_lock (); + for (int i = 0; i < nhandlers && !set; i++) + switch (fc_handler[i].pipe_state ()) + { + case FILE_PIPE_CONNECTED_STATE: + fc_handler[i].state = fc_connected; + set = true; + break; + case FILE_PIPE_INPUT_AVAILABLE_STATE: + fc_handler[i].state = fc_input_avail; + set = true; + break; + case FILE_PIPE_DISCONNECTED_STATE: + fc_handler[i].state = fc_disconnected; + break; + case FILE_PIPE_LISTENING_STATE: + fc_handler[i].state = fc_listening; + case FILE_PIPE_CLOSING_STATE: + fc_handler[i].state = fc_closing; + default: + fc_handler[i].state = fc_error; + break; + } + fifo_client_unlock (); + if (set || IsEventSignalled (writer_opening)) + SetEvent (write_ready); + else + ResetEvent (write_ready); + SetEvent (write_ready_ok_evt); +} + static DWORD WINAPI fifo_reader_thread (LPVOID param) { @@ -526,13 +566,15 @@ fhandler_fifo::fifo_reader_thread_func () IO_STATUS_BLOCK io; bool cancel = false; bool update = false; + bool check = false; status = NtFsControlFile (fc.h, conn_evt, NULL, NULL, &io, FSCTL_PIPE_LISTEN, NULL, 0, NULL, 0); if (status == STATUS_PENDING) { - HANDLE w[3] = { conn_evt, update_needed_evt, cancel_evt }; - switch (WaitForMultipleObjects (3, w, false, INFINITE)) + HANDLE w[4] = { conn_evt, update_needed_evt, + check_write_ready_evt, cancel_evt }; + switch (WaitForMultipleObjects (4, w, false, INFINITE)) { case WAIT_OBJECT_0: status = io.Status; @@ -544,6 +586,10 @@ fhandler_fifo::fifo_reader_thread_func () update = true; break; case WAIT_OBJECT_0 + 2: + status = STATUS_WAIT_2; + check = true; + break; + case WAIT_OBJECT_0 + 3: status = STATUS_THREAD_IS_TERMINATING; cancel = true; update = true; @@ -570,6 +616,7 @@ fhandler_fifo::fifo_reader_thread_func () break; case STATUS_THREAD_IS_TERMINATING: case STATUS_WAIT_1: + case STATUS_WAIT_2: /* Try to connect a bogus client. Otherwise fc is still listening, and the next connection might not get recorded. */ status1 = open_pipe (ph); @@ -602,6 +649,8 @@ fhandler_fifo::fifo_reader_thread_func () NtClose (ph); if (update && update_shared_handlers () < 0) api_fatal ("Can't update shared handlers, %E"); + if (check) + check_write_ready (); if (cancel) goto canceled; } @@ -833,14 +882,19 @@ fhandler_fifo::open (int flags, mode_t) and start the fifo_reader_thread. */ if (reader) { + bool first = true; + SetEvent (read_ready); if (create_shmem () < 0) goto err_close_writer_opening; if (create_shared_fc_handler () < 0) goto err_close_shmem; - inc_nreaders (); - /* Reinitialize _sh_fc_handler_updated, which starts as 0. */ - shared_fc_handler_updated (true); + reader_opening_lock (); + if (inc_nreaders () == 1) + /* Reinitialize _sh_fc_handler_updated, which starts as 0. */ + shared_fc_handler_updated (true); + else + first = false; npbuf[0] = 'n'; if (!(owner_needed_evt = CreateEvent (sa_buf, true, false, npbuf))) { @@ -862,9 +916,23 @@ fhandler_fifo::open (int flags, mode_t) __seterrno (); goto err_close_owner_found_evt; } + npbuf[0] = 'c'; + if (!(check_write_ready_evt = CreateEvent (sa_buf, false, false, npbuf))) + { + debug_printf ("CreateEvent for %s failed, %E", npbuf); + __seterrno (); + goto err_close_update_needed_evt; + } + npbuf[0] = 'k'; + if (!(write_ready_ok_evt = CreateEvent (sa_buf, false, false, npbuf))) + { + debug_printf ("CreateEvent for %s failed, %E", npbuf); + __seterrno (); + goto err_close_check_write_ready_evt; + } /* Make cancel and sync inheritable for exec. */ if (!(cancel_evt = create_event (true))) - goto err_close_update_needed_evt; + goto err_close_write_ready_ok_evt; if (!(thr_sync_evt = create_event (true))) goto err_close_cancel_evt; me.winpid = GetCurrentProcessId (); @@ -908,9 +976,19 @@ fhandler_fifo::open (int flags, mode_t) } } } - /* Not a duplexer; wait for a writer to connect. */ - else if (!wait (write_ready)) - goto err_close_reader; + /* Not a duplexer; wait for a writer to connect if we're blocking. */ + else if (!(flags & O_NONBLOCK)) + { + if (!first) + { + /* Ask the owner to update write_ready. */ + SetEvent (check_write_ready_evt); + WaitForSingleObject (write_ready_ok_evt, INFINITE); + } + if (!wait (write_ready)) + goto err_close_reader; + } + reader_opening_unlock (); goto success; } @@ -984,6 +1062,10 @@ err_close_reader: return 0; err_close_cancel_evt: NtClose (cancel_evt); +err_close_write_ready_ok_evt: + NtClose (write_ready_ok_evt); +err_close_check_write_ready_evt: + NtClose (check_write_ready_evt); err_close_update_needed_evt: NtClose (update_needed_evt); err_close_owner_found_evt: @@ -993,6 +1075,7 @@ err_close_owner_needed_evt: err_dec_nreaders: if (dec_nreaders () == 0) ResetEvent (read_ready); + reader_opening_unlock (); /* err_close_shared_fc_handler: */ NtUnmapViewOfSection (NtCurrentProcess (), shared_fc_handler); NtClose (shared_fc_hdl); @@ -1396,6 +1479,10 @@ fhandler_fifo::close () NtClose (owner_found_evt); if (update_needed_evt) NtClose (update_needed_evt); + if (check_write_ready_evt) + NtClose (check_write_ready_evt); + if (write_ready_ok_evt) + NtClose (write_ready_ok_evt); if (cancel_evt) NtClose (cancel_evt); if (thr_sync_evt) @@ -1519,8 +1606,22 @@ fhandler_fifo::dup (fhandler_base *child, int flags) __seterrno (); goto err_close_owner_found_evt; } + if (!DuplicateHandle (GetCurrentProcess (), check_write_ready_evt, + GetCurrentProcess (), &fhf->check_write_ready_evt, + 0, !(flags & O_CLOEXEC), DUPLICATE_SAME_ACCESS)) + { + __seterrno (); + goto err_close_update_needed_evt; + } + if (!DuplicateHandle (GetCurrentProcess (), write_ready_ok_evt, + GetCurrentProcess (), &fhf->write_ready_ok_evt, + 0, !(flags & O_CLOEXEC), DUPLICATE_SAME_ACCESS)) + { + __seterrno (); + goto err_close_check_write_ready_evt; + } if (!(fhf->cancel_evt = create_event (true))) - goto err_close_update_needed_evt; + goto err_close_write_ready_ok_evt; if (!(fhf->thr_sync_evt = create_event (true))) goto err_close_cancel_evt; inc_nreaders (); @@ -1530,6 +1631,10 @@ fhandler_fifo::dup (fhandler_base *child, int flags) return 0; err_close_cancel_evt: NtClose (fhf->cancel_evt); +err_close_write_ready_ok_evt: + NtClose (fhf->write_ready_ok_evt); +err_close_check_write_ready_evt: + NtClose (fhf->check_write_ready_evt); err_close_update_needed_evt: NtClose (fhf->update_needed_evt); err_close_owner_found_evt: @@ -1575,6 +1680,8 @@ fhandler_fifo::fixup_after_fork (HANDLE parent) fork_fixup (parent, owner_needed_evt, "owner_needed_evt"); fork_fixup (parent, owner_found_evt, "owner_found_evt"); fork_fixup (parent, update_needed_evt, "update_needed_evt"); + fork_fixup (parent, check_write_ready_evt, "check_write_ready_evt"); + fork_fixup (parent, write_ready_ok_evt, "write_ready_ok_evt"); if (close_on_exec ()) /* Prevent a later attempt to close the non-inherited pipe-instance handles copied from the parent. */ @@ -1658,6 +1765,8 @@ fhandler_fifo::set_close_on_exec (bool val) set_no_inheritance (owner_needed_evt, val); set_no_inheritance (owner_found_evt, val); set_no_inheritance (update_needed_evt, val); + set_no_inheritance (check_write_ready_evt, val); + set_no_inheritance (write_ready_ok_evt, val); set_no_inheritance (cancel_evt, val); set_no_inheritance (thr_sync_evt, val); fifo_client_lock (); From 98dfadec3a07d5be5d1796d1e27e51892dd9daf0 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Tue, 14 Apr 2020 09:45:44 -0400 Subject: [PATCH 347/520] Cygwin: FIFO: update commentary The beginning of fhandler_fifo.cc contains a long comment giving an overview of the FIFO implementation. This is now updated to describe the support for multiple readers. --- winsup/cygwin/fhandler_fifo.cc | 50 +++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 4c7d51edb..ec7c5d427 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -26,29 +26,41 @@ /* Overview: - Currently a FIFO can be opened once for reading and multiple - times for writing. Any attempt to open the FIFO a second time - for reading fails with EACCES (from STATUS_ACCESS_DENIED). + FIFOs are implemented via Windows named pipes. The server end of + the pipe corresponds to an fhandler_fifo open for reading (a.k.a, + a "reader"), and the client end corresponds to an fhandler_fifo + open for writing (a.k.a, a "writer"). - When a FIFO is opened for reading, - fhandler_fifo::create_pipe_instance is called to create the first - instance of a Windows named pipe server (Windows terminology). A - "fifo_reader" thread is also started; it waits for pipe clients - (Windows terminology again) to connect. This happens every time - a process opens the FIFO for writing. + The server can have multiple instances. The reader (assuming for + the moment that there is only one) creates a pipe instance for + each writer that opens. The reader maintains a list of + "fifo_client_handler" structures, one for each writer. A + fifo_client_handler contains the handle for the pipe server + instance and information about the state of the connection with + the writer. Each writer holds the pipe instance's client handle. - The fifo_reader thread creates new instances of the pipe server - as needed, so that there is always an instance available for a - writer to connect to. + The reader runs a "fifo_reader_thread" that creates new pipe + instances as needed and listens for client connections. - The reader maintains a list of "fifo_client_handlers", one for - each pipe instance. A fifo_client_handler manages the connection - between the pipe instance and a writer connected to that pipe - instance. + If there are multiple readers open, only one of them, called the + "owner", maintains the fifo_client_handler list. The owner is + therefore the only reader that can read at any given time. If a + different reader wants to read, it has to take ownership and + duplicate the fifo_client_handler list. - TODO: Allow a FIFO to be opened multiple times for reading. - Maybe this could be done by using shared memory, so that all - readers could have access to the same list of writers. + A reader that is not an owner also runs a fifo_reader_thread, + which is mostly idle. The thread wakes up if that reader might + need to take ownership. + + There is a block of shared memory, accessible to all readers, + that contains information needed for the owner change process. + It also contains some locks to prevent races and deadlocks + between the various threads. + + At this writing, I know of only one application (Midnight + Commander when running under tcsh) that *explicitly* opens two + readers of a FIFO. But many applications will have multiple + readers open via dup/fork/exec. */ From 84d446734f766a587e1942f08fde26990ddabd02 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Fri, 8 May 2020 07:41:36 -0400 Subject: [PATCH 348/520] Document recent FIFO changes --- winsup/cygwin/release/3.1.5 | 6 ++++++ winsup/doc/new-features.xml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/winsup/cygwin/release/3.1.5 b/winsup/cygwin/release/3.1.5 index 488a0e1a5..ba7f45110 100644 --- a/winsup/cygwin/release/3.1.5 +++ b/winsup/cygwin/release/3.1.5 @@ -3,6 +3,8 @@ What changed: - Support WSL symlinks. Create those by default now. +- FIFOs can now be opened multiple times for reading. + Bug Fixes: ---------- @@ -22,3 +24,7 @@ Bug Fixes: - Fix error handling in raw disk writes and allow full disk writes including necessary locking on floppies as well. Addresses: https://cygwin.com/pipermail/cygwin/2020-April/244610.html + +- Fix several FIFO bugs. + Addresses: https://sourceware.org/pipermail/cygwin/2020-March/000206.html + https://sourceware.org/pipermail/cygwin/2020-April/244518.html diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml index 60ae60de4..32479de5d 100644 --- a/winsup/doc/new-features.xml +++ b/winsup/doc/new-features.xml @@ -86,6 +86,10 @@ https://gitlab.freedesktop.org/terminal-wg/specifications/issues/9. Support WSL symlinks. Create those by default now. + +FIFOs can now be opened multiple times for reading. + + From e6ddeca1d39bf80dbc80b5c643888b598f5b46dd Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 4 May 2020 11:39:44 +0200 Subject: [PATCH 349/520] Cygwin: add pseudo console patch to release text Signed-off-by: Corinna Vinschen --- winsup/cygwin/release/3.1.5 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/winsup/cygwin/release/3.1.5 b/winsup/cygwin/release/3.1.5 index ba7f45110..1e3763f6c 100644 --- a/winsup/cygwin/release/3.1.5 +++ b/winsup/cygwin/release/3.1.5 @@ -28,3 +28,7 @@ Bug Fixes: - Fix several FIFO bugs. Addresses: https://sourceware.org/pipermail/cygwin/2020-March/000206.html https://sourceware.org/pipermail/cygwin/2020-April/244518.html + +- Make sure pseudo tty doesn't hang if cygwin-console-helper.exe is + non-functional. + Addresses: https://cygwin.com/pipermail/cygwin-patches/2020q2/010191.html From 2125ca8a69d0680ffe8079c15ef479f869ee35cc Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 8 May 2020 20:00:24 +0200 Subject: [PATCH 350/520] Cygwin: fifo: fix type of fifo_reader_id_t operators fifo_reader_id_t::operator == and != have been defined without type accidentally. For some weird reason, only x86 gcc complains about this problem, not x86_64 gcc. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 8a23d6753..9a82d491a 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1308,12 +1308,12 @@ struct fifo_reader_id_t operator bool () const { return winpid != 0 || fh != NULL; } - friend operator == (const fifo_reader_id_t &l, const fifo_reader_id_t &r) + friend bool operator == (const fifo_reader_id_t &l, const fifo_reader_id_t &r) { return l.winpid == r.winpid && l.fh == r.fh; } - friend operator != (const fifo_reader_id_t &l, const fifo_reader_id_t &r) + friend bool operator != (const fifo_reader_id_t &l, const fifo_reader_id_t &r) { return l.winpid != r.winpid || l.fh != r.fh; } From 1f273459473e8a5a7e8b32da8e4b88c16841bd8c Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sat, 9 May 2020 17:25:39 -0400 Subject: [PATCH 351/520] Cygwin: FIFO: code simplification There are currently three functions that call NtQueryInformationFile to determine the state of a pipe instance. Do this only once, in a new fifo_client_handler::set_state () function, and call that when state information is needed. Remove the fifo_client_handler methods pipe_state and get_state, which are no longer needed. Make fhandler_fifo::get_fc_handler return a reference, for use in select.cc:peek_fifo. Make other small changes to ensure that this commit doesn't change any decisions based on the state of a fifo_client_handler. The tricky part is interpreting FILE_PIPE_CLOSING_STATE, which we translate to fc_closing. Our current interpretation, which is not changing as a result of this commit, is that the writer at the other end of the pipe instance is viewed as still connected from the point of view of raw_read and determining EOF. But it is not viewed as still connected if we are deciding whether to unblock a new reader that is trying to open. --- winsup/cygwin/fhandler.h | 23 +++++------- winsup/cygwin/fhandler_fifo.cc | 68 ++++++++++++++++------------------ winsup/cygwin/select.cc | 20 +--------- 3 files changed, 44 insertions(+), 67 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 9a82d491a..ae64086df 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1269,34 +1269,31 @@ public: #define CYGWIN_FIFO_PIPE_NAME_LEN 47 -/* The last three are the ones we try to read from. */ +/* We view the fc_closing state as borderline between open and closed + for a writer at the other end of a fifo_client_handler. + + We still attempt to read from the writer when the handler is in + this state, and we don't declare a reader to be at EOF if there's a + handler in this state. But the existence of a handler in this + state is not sufficient to unblock a reader trying to open. */ enum fifo_client_connect_state { fc_unknown, fc_error, fc_disconnected, fc_listening, - fc_connected, fc_closing, + fc_connected, fc_input_avail, }; -enum -{ - FILE_PIPE_INPUT_AVAILABLE_STATE = 5 -}; - struct fifo_client_handler { HANDLE h; fifo_client_connect_state state; fifo_client_handler () : h (NULL), state (fc_unknown) {} void close () { NtClose (h); } -/* Returns FILE_PIPE_DISCONNECTED_STATE, FILE_PIPE_LISTENING_STATE, - FILE_PIPE_CONNECTED_STATE, FILE_PIPE_CLOSING_STATE, - FILE_PIPE_INPUT_AVAILABLE_STATE, or -1 on error. */ - fifo_client_connect_state &get_state () { return state; } - int pipe_state (); + fifo_client_connect_state set_state (); }; class fhandler_fifo; @@ -1462,7 +1459,7 @@ public: bool maybe_eof () const { return _maybe_eof; } void maybe_eof (bool val) { _maybe_eof = val; } int get_nhandlers () const { return nhandlers; } - fifo_client_handler get_fc_handler (int i) const { return fc_handler[i]; } + fifo_client_handler &get_fc_handler (int i) { return fc_handler[i]; } PUNICODE_STRING get_pipe_name (); DWORD fifo_reader_thread_func (); void fifo_client_lock () { _fifo_client_lock.lock (); } diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index ec7c5d427..9cc00d5e7 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -343,7 +343,7 @@ fhandler_fifo::delete_client_handler (int i) (nhandlers - i) * sizeof (fc_handler[i])); } -/* Delete invalid handlers. */ +/* Delete handlers that we will never read from. */ void fhandler_fifo::cleanup_handlers () { @@ -351,7 +351,7 @@ fhandler_fifo::cleanup_handlers () while (i < nhandlers) { - if (fc_handler[i].state < fc_connected) + if (fc_handler[i].state < fc_closing) delete_client_handler (i); else i++; @@ -417,9 +417,6 @@ fhandler_fifo::update_my_handlers (bool from_exec) for (int i = 0; i < get_shared_nhandlers (); i++) { - /* Should never happen. */ - if (shared_fc_handler[i].state < fc_connected) - continue; if (add_client_handler (false) < 0) api_fatal ("Can't add client handler, %E"); fifo_client_handler &fc = fc_handler[nhandlers - 1]; @@ -462,30 +459,9 @@ fhandler_fifo::check_write_ready () { bool set = false; - fifo_client_lock (); for (int i = 0; i < nhandlers && !set; i++) - switch (fc_handler[i].pipe_state ()) - { - case FILE_PIPE_CONNECTED_STATE: - fc_handler[i].state = fc_connected; - set = true; - break; - case FILE_PIPE_INPUT_AVAILABLE_STATE: - fc_handler[i].state = fc_input_avail; - set = true; - break; - case FILE_PIPE_DISCONNECTED_STATE: - fc_handler[i].state = fc_disconnected; - break; - case FILE_PIPE_LISTENING_STATE: - fc_handler[i].state = fc_listening; - case FILE_PIPE_CLOSING_STATE: - fc_handler[i].state = fc_closing; - default: - fc_handler[i].state = fc_error; - break; - } - fifo_client_unlock (); + if (fc_handler[i].set_state () >= fc_connected) + set = true; if (set || IsEventSignalled (writer_opening)) SetEvent (write_ready); else @@ -656,13 +632,13 @@ fhandler_fifo::fifo_reader_thread_func () default: break; } - fifo_client_unlock (); if (ph) NtClose (ph); if (update && update_shared_handlers () < 0) api_fatal ("Can't update shared handlers, %E"); if (check) check_write_ready (); + fifo_client_unlock (); if (cancel) goto canceled; } @@ -1307,7 +1283,7 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) int nconnected = 0; fifo_client_lock (); for (int i = 0; i < nhandlers; i++) - if (fc_handler[i].state >= fc_connected) + if (fc_handler[i].state >= fc_closing) { NTSTATUS status; IO_STATUS_BLOCK io; @@ -1411,25 +1387,45 @@ fhandler_fifo::close_all_handlers () nhandlers = 0; } -int -fifo_client_handler::pipe_state () +fifo_client_connect_state +fifo_client_handler::set_state () { IO_STATUS_BLOCK io; FILE_PIPE_LOCAL_INFORMATION fpli; NTSTATUS status; + if (!h) + return (state = fc_unknown); + status = NtQueryInformationFile (h, &io, &fpli, sizeof (fpli), FilePipeLocalInformation); if (!NT_SUCCESS (status)) { debug_printf ("NtQueryInformationFile status %y", status); - __seterrno_from_nt_status (status); - return -1; + state = fc_error; } else if (fpli.ReadDataAvailable > 0) - return FILE_PIPE_INPUT_AVAILABLE_STATE; + state = fc_input_avail; else - return fpli.NamedPipeState; + switch (fpli.NamedPipeState) + { + case FILE_PIPE_DISCONNECTED_STATE: + state = fc_disconnected; + break; + case FILE_PIPE_LISTENING_STATE: + state = fc_listening; + break; + case FILE_PIPE_CONNECTED_STATE: + state = fc_connected; + break; + case FILE_PIPE_CLOSING_STATE: + state = fc_closing; + break; + default: + state = fc_error; + break; + } + return state; } void diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 2c299acf7..9ae567c38 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -871,32 +871,16 @@ peek_fifo (select_record *s, bool from_select) fh->fifo_client_lock (); int nconnected = 0; for (int i = 0; i < fh->get_nhandlers (); i++) - if (fh->get_fc_handler (i).get_state () >= fc_connected) + if (fh->get_fc_handler (i).set_state () >= fc_closing) { nconnected++; - switch (fh->get_fc_handler (i).pipe_state ()) + if (fh->get_fc_handler (i).state == fc_input_avail) { - case FILE_PIPE_CONNECTED_STATE: - fh->get_fc_handler (i).get_state () = fc_connected; - break; - case FILE_PIPE_DISCONNECTED_STATE: - fh->get_fc_handler (i).get_state () = fc_disconnected; - nconnected--; - break; - case FILE_PIPE_CLOSING_STATE: - fh->get_fc_handler (i).get_state () = fc_closing; - break; - case FILE_PIPE_INPUT_AVAILABLE_STATE: - fh->get_fc_handler (i).get_state () = fc_input_avail; select_printf ("read: %s, ready for read", fh->get_name ()); fh->fifo_client_unlock (); fh->reading_unlock (); gotone += s->read_ready = true; goto out; - default: - fh->get_fc_handler (i).get_state () = fc_error; - nconnected--; - break; } } fh->maybe_eof (!nconnected); From e637d5361782f0bb911f62355a331aa6098b0058 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Mon, 11 May 2020 09:03:37 -0400 Subject: [PATCH 352/520] Cygwin: FIFO: improve the interruptibility of raw_read During a blocking read, we sleep for 1 ms after each iteration through the connected writers. Currently we do this by calling Sleep (1). Remove this call to Sleep and instead change the timeout in the cygwait call from 0 to 1, so that raw_read can be interrupted while sleeping. --- winsup/cygwin/fhandler_fifo.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 9cc00d5e7..e8a05dfbf 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -1335,8 +1335,8 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) } else { - /* Allow interruption. */ - DWORD waitret = cygwait (NULL, cw_nowait, cw_cancel | cw_sig_eintr); + /* Allow interruption and don't hog the CPU. */ + DWORD waitret = cygwait (NULL, 1, cw_cancel | cw_sig_eintr); if (waitret == WAIT_CANCELED) pthread::static_cancel_self (); else if (waitret == WAIT_SIGNALED) @@ -1356,8 +1356,6 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) set_errno (EBADF); goto errout; } - /* Don't hog the CPU. */ - Sleep (1); } errout: len = (size_t) -1; From 6867660301f22b64edafe8803f796ad9c0d355a5 Mon Sep 17 00:00:00 2001 From: David Macek via Cygwin-patches Date: Wed, 13 May 2020 17:34:06 +0200 Subject: [PATCH 353/520] cygwin: doc: Add keywords for ACE order issues Windows Explorer shows a warning with Cygwin-created DACLs, but putting the text of the warning into Google doesn't lead to the relevant Cygwin docs. Let's copy the warning text into the docs in the hopes of helping confused users. Most of the credit for the wording belongs to Yaakov Selkowitz. Latest inquiry: Signed-off-by: David Macek --- winsup/doc/ntsec.xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/winsup/doc/ntsec.xml b/winsup/doc/ntsec.xml index 08a33bdc6..d08996466 100644 --- a/winsup/doc/ntsec.xml +++ b/winsup/doc/ntsec.xml @@ -2159,11 +2159,13 @@ will correctly deal with the ACL regardless of the order of allow and deny ACEs. The second rule is not modified to get the ACEs in the preferred order. -Unfortunately the security tab in the file properties dialog of -the Windows Explorer insists to rearrange the order of the ACEs to -canonical order before you can read them. Thank God, the sort order -remains unchanged if one presses the Cancel button. But don't even -think of pressing OK... +Unfortunately, the security tab in the file properties dialog of +the Windows Explorer will pop up a warning stating "The permissions on +... are incorrectly ordered, which may cause some entries to be +ineffective." Pressing the Cancel button of the properties dialog +fortunately leaves the sort order unchanged, but pressing OK will cause +Explorer to canonicalize the order of the ACEs, thereby invalidating +POSIX compatibility. Canonical ACLs are unable to reflect each possible combination of POSIX permissions. Example: From 5f5810e01c2078e3bc12b017aa7e56b19afa3bbe Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Sun, 17 May 2020 11:34:44 +0900 Subject: [PATCH 354/520] Cygwin: termios: Set ECHOE, ECHOK, ECHOCTL and ECHOKE by default. - Backspace key does not work correctly in linux session opend by ssh from cygwin console if the shell is bash. This is due to lack of these flags. Addresses: https://cygwin.com/pipermail/cygwin/2020-May/244837.html. --- winsup/cygwin/fhandler_termios.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index b6759b0a7..b03478b87 100644 --- a/winsup/cygwin/fhandler_termios.cc +++ b/winsup/cygwin/fhandler_termios.cc @@ -33,7 +33,8 @@ fhandler_termios::tcinit (bool is_pty_master) tc ()->ti.c_iflag = BRKINT | ICRNL | IXON | IUTF8; tc ()->ti.c_oflag = OPOST | ONLCR; tc ()->ti.c_cflag = B38400 | CS8 | CREAD; - tc ()->ti.c_lflag = ISIG | ICANON | ECHO | IEXTEN; + tc ()->ti.c_lflag = ISIG | ICANON | ECHO | IEXTEN + | ECHOE | ECHOK | ECHOCTL | ECHOKE; tc ()->ti.c_cc[VDISCARD] = CFLUSH; tc ()->ti.c_cc[VEOL] = CEOL; From 0f785536f3cee6168c9e16c619d045488f1eb548 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Tue, 19 May 2020 10:52:49 +0100 Subject: [PATCH 355/520] Reimplement aligned_alloc The original implementation had multiple issues: - Only worked when posix_memalign was available (Linux, RTEMS). - Violated C11 link namespace rules by calling posix_memalign. - Failed to set errno on error. These can be fixed by essentially using the same implementation for aligned_alloc as for memalign, i.e. simply calling _memalign_r (which is always available and a "more reserved name" although technically still not in the reserved link namespace, at least code written in c cannot define a colliding symbol, newlib has plenty such namespace issues so this is fine). It is not clear what the right policy is when MALLOC_PROVIDED is set, currently that does not cover aligned_alloc so it is kept that way. Tested on aarch64-none-elf --- newlib/libc/stdlib/aligned_alloc.c | 62 +++++++++++++++--------------- 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/newlib/libc/stdlib/aligned_alloc.c b/newlib/libc/stdlib/aligned_alloc.c index 88413ce86..feb22c24b 100644 --- a/newlib/libc/stdlib/aligned_alloc.c +++ b/newlib/libc/stdlib/aligned_alloc.c @@ -1,38 +1,36 @@ -/*- - * Copyright (c) 2015 embedded brains GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ +/* C11 aligned_alloc + Copyright (c) 2020 Arm Ltd. All rights reserved. + SPDX-License-Identifier: BSD-3-Clause + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include #include void * -aligned_alloc(size_t alignment, size_t size) +aligned_alloc (size_t align, size_t size) { - void *p; - int error; - - error = posix_memalign(&p, alignment, size); - - return (error == 0 ? p : NULL); + return _memalign_r (_REENT, align, size); } From 7659ff0f5afd751f42485f2684c799c5f37b0fb9 Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Tue, 19 May 2020 19:55:23 +0900 Subject: [PATCH 356/520] Cygwin: pty: Call FreeConsole() only if attached to current pty. - After commit 071b8e0cbd4be33449c12bb0d58f514ed8ef893c, the problem reported in https://cygwin.com/pipermail/cygwin/2020-May/244873.html occurs. This is due to freeing console device accidentally rather than pseudo console. This patch makes sure to call FreeConsole() only if the process is attached to the pseudo console of the current pty. --- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_tty.cc | 28 +++++++++++++--------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index ae64086df..857f0a4e0 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -2284,6 +2284,7 @@ class fhandler_pty_slave: public fhandler_pty_common bool try_reattach_pcon (); void restore_reattach_pcon (); + inline void free_attached_console (); public: /* Constructor */ diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 8547ec7c4..5a1bcd3ce 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -180,6 +180,16 @@ set_ishybrid_and_switch_to_pcon (HANDLE h) } } +inline void +fhandler_pty_slave::free_attached_console () +{ + if (freeconsole_on_close && get_minor () == pcon_attached_to) + { + FreeConsole (); + pcon_attached_to = -1; + } +} + #define DEF_HOOK(name) static __typeof__ (name) *name##_Orig DEF_HOOK (WriteFile); DEF_HOOK (WriteConsoleA); @@ -708,11 +718,7 @@ fhandler_pty_slave::~fhandler_pty_slave () if (!get_ttyp ()) { /* Why comes here? Who clears _tc? */ - if (freeconsole_on_close) - { - FreeConsole (); - pcon_attached_to = -1; - } + free_attached_console (); return; } if (get_pseudo_console ()) @@ -739,11 +745,7 @@ fhandler_pty_slave::~fhandler_pty_slave () if (used == 0) { init_console_handler (false); - if (freeconsole_on_close) - { - FreeConsole (); - pcon_attached_to = -1; - } + free_attached_console (); } } } @@ -3006,11 +3008,7 @@ fhandler_pty_slave::fixup_after_exec () if (used == 1 /* About to close this tty */) { init_console_handler (false); - if (freeconsole_on_close) - { - FreeConsole (); - pcon_attached_to = -1; - } + free_attached_console (); } } From 0365031ce1347600d854a23f30f1355745a1765c Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Tue, 19 May 2020 20:35:59 +0900 Subject: [PATCH 357/520] Cygwin: pty: Make system_printf() work after closing pty slave. - Current pty cannot show system_printf() output after closing pty slave. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 5a1bcd3ce..02b78cd2c 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -948,6 +948,10 @@ fhandler_pty_slave::open (int flags, mode_t) init_console_handler (true); } + get_ttyp ()->pcon_pid = 0; + get_ttyp ()->switch_to_pcon_in = false; + get_ttyp ()->switch_to_pcon_out = false; + set_open_status (); return 1; @@ -1008,6 +1012,7 @@ fhandler_pty_slave::close () termios_printf ("CloseHandle (output_mutex<%p>), %E", output_mutex); if (pcon_attached_to == get_minor ()) get_ttyp ()->num_pcon_attached_slaves --; + set_switch_to_pcon (2); /* Make system_printf() work after close. */ return 0; } From fe937e21ad6041fad12751d3e4867602e2737739 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Tue, 19 May 2020 10:14:10 -0400 Subject: [PATCH 358/520] Cygwin: FIFO: Revert "take ownership on exec" This reverts commit 39a9cd94651d306117c47ea1ac3eab45f6098d0e. There is no need to explicitly take ownership in fixup_after_exec; if ownership transfer is needed, it will be taken care of by fhandler_fifo::close when the parent closes. Moreover, closing the parent's fifo_reader_thread can cause problems, such as the one reported here: https://cygwin.com/pipermail/cygwin-patches/2020q2/010235.html --- winsup/cygwin/fhandler.h | 2 +- winsup/cygwin/fhandler_fifo.cc | 137 ++++++++++----------------------- 2 files changed, 40 insertions(+), 99 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 857f0a4e0..76ad2aab0 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1443,7 +1443,7 @@ class fhandler_fifo: public fhandler_base { return shmem->get_shared_fc_handler_committed (); } void set_shared_fc_handler_committed (size_t n) { shmem->set_shared_fc_handler_committed (n); } - int update_my_handlers (bool from_exec = false); + int update_my_handlers (); int update_shared_handlers (); bool shared_fc_handler_updated () const { return shmem->shared_fc_handler_updated (); } diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index e8a05dfbf..ab4b93942 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -118,14 +118,13 @@ sec_user_cloexec (bool cloexec, PSECURITY_ATTRIBUTES sa, PSID sid) } static HANDLE -create_event (bool inherit = false) +create_event () { NTSTATUS status; OBJECT_ATTRIBUTES attr; HANDLE evt = NULL; - InitializeObjectAttributes (&attr, NULL, inherit ? OBJ_INHERIT : 0, - NULL, NULL); + InitializeObjectAttributes (&attr, NULL, 0, NULL, NULL); status = NtCreateEvent (&evt, EVENT_ALL_ACCESS, &attr, NotificationEvent, FALSE); if (!NT_SUCCESS (status)) @@ -368,69 +367,44 @@ fhandler_fifo::record_connection (fifo_client_handler& fc, set_pipe_non_blocking (fc.h, true); } -/* Called from fifo_reader_thread_func with owner_lock in place, also - from fixup_after_exec with shared handles useable as they are. */ +/* Called from fifo_reader_thread_func with owner_lock in place. */ int -fhandler_fifo::update_my_handlers (bool from_exec) +fhandler_fifo::update_my_handlers () { - if (from_exec) + close_all_handlers (); + fifo_reader_id_t prev = get_prev_owner (); + if (!prev) { - nhandlers = get_shared_nhandlers (); - if (nhandlers > shandlers) - { - int save = shandlers; - shandlers = nhandlers + 64; - void *temp = realloc (fc_handler, - shandlers * sizeof (fc_handler[0])); - if (!temp) - { - shandlers = save; - nhandlers = 0; - set_errno (ENOMEM); - return -1; - } - fc_handler = (fifo_client_handler *) temp; - } - memcpy (fc_handler, shared_fc_handler, - nhandlers * sizeof (fc_handler[0])); + debug_printf ("No previous owner to copy handles from"); + return 0; } + HANDLE prev_proc; + if (prev.winpid == me.winpid) + prev_proc = GetCurrentProcess (); else + prev_proc = OpenProcess (PROCESS_DUP_HANDLE, false, prev.winpid); + if (!prev_proc) { - close_all_handlers (); - fifo_reader_id_t prev = get_prev_owner (); - if (!prev) + debug_printf ("Can't open process of previous owner, %E"); + __seterrno (); + return -1; + } + + for (int i = 0; i < get_shared_nhandlers (); i++) + { + if (add_client_handler (false) < 0) + api_fatal ("Can't add client handler, %E"); + fifo_client_handler &fc = fc_handler[nhandlers - 1]; + if (!DuplicateHandle (prev_proc, shared_fc_handler[i].h, + GetCurrentProcess (), &fc.h, 0, + !close_on_exec (), DUPLICATE_SAME_ACCESS)) { - debug_printf ("No previous owner to copy handles from"); - return 0; - } - HANDLE prev_proc; - if (prev.winpid == me.winpid) - prev_proc = GetCurrentProcess (); - else - prev_proc = OpenProcess (PROCESS_DUP_HANDLE, false, prev.winpid); - if (!prev_proc) - { - debug_printf ("Can't open process of previous owner, %E"); + debug_printf ("Can't duplicate handle of previous owner, %E"); + --nhandlers; __seterrno (); return -1; } - - for (int i = 0; i < get_shared_nhandlers (); i++) - { - if (add_client_handler (false) < 0) - api_fatal ("Can't add client handler, %E"); - fifo_client_handler &fc = fc_handler[nhandlers - 1]; - if (!DuplicateHandle (prev_proc, shared_fc_handler[i].h, - GetCurrentProcess (), &fc.h, 0, - !close_on_exec (), DUPLICATE_SAME_ACCESS)) - { - debug_printf ("Can't duplicate handle of previous owner, %E"); - --nhandlers; - __seterrno (); - return -1; - } - fc.state = shared_fc_handler[i].state; - } + fc.state = shared_fc_handler[i].state; } return 0; } @@ -918,10 +892,9 @@ fhandler_fifo::open (int flags, mode_t) __seterrno (); goto err_close_check_write_ready_evt; } - /* Make cancel and sync inheritable for exec. */ - if (!(cancel_evt = create_event (true))) + if (!(cancel_evt = create_event ())) goto err_close_write_ready_ok_evt; - if (!(thr_sync_evt = create_event (true))) + if (!(thr_sync_evt = create_event ())) goto err_close_cancel_evt; me.winpid = GetCurrentProcessId (); me.fh = this; @@ -1626,9 +1599,9 @@ fhandler_fifo::dup (fhandler_base *child, int flags) __seterrno (); goto err_close_check_write_ready_evt; } - if (!(fhf->cancel_evt = create_event (true))) + if (!(fhf->cancel_evt = create_event ())) goto err_close_write_ready_ok_evt; - if (!(fhf->thr_sync_evt = create_event (true))) + if (!(fhf->thr_sync_evt = create_event ())) goto err_close_cancel_evt; inc_nreaders (); fhf->me.fh = fhf; @@ -1692,17 +1665,9 @@ fhandler_fifo::fixup_after_fork (HANDLE parent) /* Prevent a later attempt to close the non-inherited pipe-instance handles copied from the parent. */ nhandlers = 0; - else - { - /* Close inherited handles needed only by exec. */ - if (cancel_evt) - NtClose (cancel_evt); - if (thr_sync_evt) - NtClose (thr_sync_evt); - } - if (!(cancel_evt = create_event (true))) + if (!(cancel_evt = create_event ())) api_fatal ("Can't create reader thread cancel event during fork, %E"); - if (!(thr_sync_evt = create_event (true))) + if (!(thr_sync_evt = create_event ())) api_fatal ("Can't create reader thread sync event during fork, %E"); inc_nreaders (); me.winpid = GetCurrentProcessId (); @@ -1725,36 +1690,14 @@ fhandler_fifo::fixup_after_exec () api_fatal ("Can't reopen shared fc_handler memory during exec, %E"); fc_handler = NULL; nhandlers = shandlers = 0; - - /* Cancel parent's reader thread */ - if (cancel_evt) - SetEvent (cancel_evt); - if (thr_sync_evt) - WaitForSingleObject (thr_sync_evt, INFINITE); - - /* Take ownership if parent is owner. */ - fifo_reader_id_t parent_fr = me; - me.winpid = GetCurrentProcessId (); - owner_lock (); - if (get_owner () == parent_fr) - { - set_owner (me); - if (update_my_handlers (true) < 0) - api_fatal ("Can't update my handlers, %E"); - } - owner_unlock (); - /* Close inherited cancel_evt and thr_sync_evt. */ - if (cancel_evt) - NtClose (cancel_evt); - if (thr_sync_evt) - NtClose (thr_sync_evt); - if (!(cancel_evt = create_event (true))) + if (!(cancel_evt = create_event ())) api_fatal ("Can't create reader thread cancel event during exec, %E"); - if (!(thr_sync_evt = create_event (true))) + if (!(thr_sync_evt = create_event ())) api_fatal ("Can't create reader thread sync event during exec, %E"); /* At this moment we're a new reader. The count will be decremented when the parent closes. */ inc_nreaders (); + me.winpid = GetCurrentProcessId (); new cygthread (fifo_reader_thread, this, "fifo_reader", thr_sync_evt); } } @@ -1773,8 +1716,6 @@ fhandler_fifo::set_close_on_exec (bool val) set_no_inheritance (update_needed_evt, val); set_no_inheritance (check_write_ready_evt, val); set_no_inheritance (write_ready_ok_evt, val); - set_no_inheritance (cancel_evt, val); - set_no_inheritance (thr_sync_evt, val); fifo_client_lock (); for (int i = 0; i < nhandlers; i++) set_no_inheritance (fc_handler[i].h, val); From bf07202e16f3b058e78d8afe74878cd828125e8a Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Tue, 19 May 2020 10:25:43 -0400 Subject: [PATCH 359/520] Cygwin: FIFO: add missing unlock There was a missing call to reader_opening_unlock on one of the error exits in fhandler_fifo::open. --- winsup/cygwin/fhandler_fifo.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index ab4b93942..3d34cdfab 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -1020,6 +1020,7 @@ err_close_reader: saved_errno = get_errno (); close (); set_errno (saved_errno); + reader_opening_unlock (); return 0; err_close_cancel_evt: NtClose (cancel_evt); From c26e08095da0c4a32b082ff4c46d5ffd76c459d3 Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Thu, 21 May 2020 17:25:01 +0900 Subject: [PATCH 360/520] Cygwin: pty: Revise code to make system_printf() work after close. - After commit 0365031ce1347600d854a23f30f1355745a1765c, the issue https://cygwin.com/pipermail/cygwin-patches/2020q2/010259.html occurs. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 15 ++++++++++++--- winsup/cygwin/tty.cc | 23 +++++++++++++++++++++++ winsup/cygwin/tty.h | 2 ++ 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 02b78cd2c..5faf896e4 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -64,6 +64,7 @@ static int pcon_attached_to = -1; static bool isHybrid; static bool do_not_reset_switch_to_pcon; static bool freeconsole_on_close = true; +static tty *last_ttyp = NULL; void clear_pcon_attached_to (void) @@ -89,7 +90,11 @@ set_switch_to_pcon (void) ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT; SetConsoleMode (ptys->get_handle (), mode); } + return; } + /* No pty slave opened */ + if (last_ttyp) /* Make system_printf() work after closing pty slave */ + last_ttyp->set_switch_to_pcon_out (true); } static void @@ -741,7 +746,10 @@ fhandler_pty_slave::~fhandler_pty_slave () needed to make GNU screen and tmux work in Windows 10 1903. */ if (attached == 0) - pcon_attached_to = -1; + { + pcon_attached_to = -1; + last_ttyp = get_ttyp (); + } if (used == 0) { init_console_handler (false); @@ -948,6 +956,7 @@ fhandler_pty_slave::open (int flags, mode_t) init_console_handler (true); } + isHybrid = false; get_ttyp ()->pcon_pid = 0; get_ttyp ()->switch_to_pcon_in = false; get_ttyp ()->switch_to_pcon_out = false; @@ -1012,7 +1021,6 @@ fhandler_pty_slave::close () termios_printf ("CloseHandle (output_mutex<%p>), %E", output_mutex); if (pcon_attached_to == get_minor ()) get_ttyp ()->num_pcon_attached_slaves --; - set_switch_to_pcon (2); /* Make system_printf() work after close. */ return 0; } @@ -2888,7 +2896,8 @@ fhandler_pty_slave::wait_pcon_fwd (void) get_ttyp ()->pcon_last_time = GetTickCount (); ResetEvent (get_ttyp ()->fwd_done); release_output_mutex (); - cygwait (get_ttyp ()->fwd_done, INFINITE); + while (get_ttyp ()->fwd_done + && cygwait (get_ttyp ()->fwd_done, 1) == WAIT_TIMEOUT); } void diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index 0663dc5ee..3fc46fb29 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -294,3 +294,26 @@ tty_min::ttyname () d.parse (ntty); return d.name (); } + +void +tty::set_switch_to_pcon_out (bool v) +{ + if (switch_to_pcon_out != v) + { + wait_pcon_fwd (); + switch_to_pcon_out = v; + } +} + +void +tty::wait_pcon_fwd (void) +{ + const int sleep_in_pcon = 16; + const int time_to_wait = sleep_in_pcon * 2 + 1/* margine */; + pcon_last_time = GetTickCount (); + while (GetTickCount () - pcon_last_time < time_to_wait) + { + int tw = time_to_wait - (GetTickCount () - pcon_last_time); + cygwait (tw); + } +} diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h index a24afad06..c4dd2e458 100644 --- a/winsup/cygwin/tty.h +++ b/winsup/cygwin/tty.h @@ -140,6 +140,8 @@ public: void set_master_ctl_closed () {master_pid = -1;} static void __stdcall create_master (int); static void __stdcall init_session (); + void set_switch_to_pcon_out (bool v); + void wait_pcon_fwd (void); friend class fhandler_pty_common; friend class fhandler_pty_master; friend class fhandler_pty_slave; From 8d7a5b39d2fa3fe009dfae3fe90d6d2e9962f98e Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Mon, 25 May 2020 17:49:08 +0900 Subject: [PATCH 361/520] Cygwin: pty: Stop counting number of slaves attached to pseudo console. - The number of slaves attached to pseudo console is used only for triggering redraw screen. Counting was not only needless, but also did not work as expected. This patch removes the code for counting. --- winsup/cygwin/fhandler_tty.cc | 22 +++++----------------- winsup/cygwin/tty.cc | 3 +-- winsup/cygwin/tty.h | 1 - 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 5faf896e4..df08dd20a 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1019,8 +1019,6 @@ fhandler_pty_slave::close () fhandler_pty_common::close (); if (!ForceCloseHandle (output_mutex)) termios_printf ("CloseHandle (output_mutex<%p>), %E", output_mutex); - if (pcon_attached_to == get_minor ()) - get_ttyp ()->num_pcon_attached_slaves --; return 0; } @@ -2924,21 +2922,11 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) { if (fhandler_console::get_console_process_id (get_helper_process_id (), true)) - { - if (pcon_attached_to != get_minor ()) - { - pcon_attached_to = get_minor (); - init_console_handler (true); - } - /* Clear screen to synchronize pseudo console screen buffer - with real terminal. This is necessary because pseudo - console screen buffer is empty at start. */ - if (get_ttyp ()->num_pcon_attached_slaves == 0) - /* Assume this is the first process using this pty slave. */ - get_ttyp ()->need_redraw_screen = true; - - get_ttyp ()->num_pcon_attached_slaves ++; - } + if (pcon_attached_to != get_minor ()) + { + pcon_attached_to = get_minor (); + init_console_handler (true); + } #if 0 /* This is for debug only. */ isHybrid = true; diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index 3fc46fb29..efdae4697 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -242,9 +242,8 @@ tty::init () screen_alternated = false; mask_switch_to_pcon_in = false; pcon_pid = 0; - num_pcon_attached_slaves = 0; term_code_page = 0; - need_redraw_screen = false; + need_redraw_screen = true; fwd_done = NULL; pcon_last_time = 0; pcon_in_empty = true; diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h index c4dd2e458..7d6fc8fef 100644 --- a/winsup/cygwin/tty.h +++ b/winsup/cygwin/tty.h @@ -103,7 +103,6 @@ private: bool screen_alternated; bool mask_switch_to_pcon_in; pid_t pcon_pid; - int num_pcon_attached_slaves; UINT term_code_page; bool need_redraw_screen; HANDLE fwd_done; From 5489240c1bc56c9c4075766addf41af5df276cf0 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 25 May 2020 13:10:41 +0200 Subject: [PATCH 362/520] Cygwin: fix declaration of __small_{v}sprintf Both functions are declared as extern "C" functions in sys/smallprint.h, but as C++ funcs in winsup.h and in the source itself. Add extern "C to definitions, remove declarations in winsup.h and include sys/smallprint.h instead. Signed-off-by: Corinna Vinschen --- winsup/cygwin/smallprint.cc | 4 ++-- winsup/cygwin/winsup.h | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/smallprint.cc b/winsup/cygwin/smallprint.cc index 3a693b5d1..26d34d9e4 100644 --- a/winsup/cygwin/smallprint.cc +++ b/winsup/cygwin/smallprint.cc @@ -130,7 +130,7 @@ __rn (char *dst, int base, int dosign, long long val, int len, int pad, unsigned return dst; } -int +extern "C" int __small_vsprintf (char *dst, const char *fmt, va_list ap) { tmpbuf tmp; @@ -373,7 +373,7 @@ gen_decimalLL: return dst - orig; } -int +extern "C" int __small_sprintf (char *dst, const char *fmt, ...) { int r; diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h index 2916728b6..fff7d18f3 100644 --- a/winsup/cygwin/winsup.h +++ b/winsup/cygwin/winsup.h @@ -14,7 +14,11 @@ details. */ #define NO_COPY __attribute__((nocommon)) __attribute__((section(".data_cygwin_nocopy"))) #define NO_COPY_INIT __attribute__((section(".data_cygwin_nocopy"))) +#ifdef __cplusplus #define EXPORT_ALIAS(sym,symalias) extern "C" __typeof (sym) symalias __attribute__ ((alias(#sym))); +#else +#define EXPORT_ALIAS(sym,symalias) __typeof (sym) symalias __attribute__ ((alias(#sym))); +#endif #define _WIN32_WINNT 0x0a00 #define WINVER 0x0a00 @@ -28,6 +32,7 @@ details. */ #include #include +#include /* Declarations for functions used in C and C++ code. */ #ifdef __cplusplus @@ -223,8 +228,6 @@ void set_ishybrid_and_switch_to_pcon (HANDLE h); /* Printf type functions */ extern "C" void vapi_fatal (const char *, va_list ap) __attribute__ ((noreturn)); extern "C" void api_fatal (const char *, ...) __attribute__ ((noreturn)); -int __small_sprintf (char *dst, const char *fmt, ...); -int __small_vsprintf (char *dst, const char *fmt, va_list ap); int __small_swprintf (PWCHAR dst, const WCHAR *fmt, ...); int __small_vswprintf (PWCHAR dst, const WCHAR *fmt, va_list ap); void multiple_cygwin_problem (const char *, uintptr_t, uintptr_t); From c66f16b2ff59cf235f79ee35e5781bcc2bc59910 Mon Sep 17 00:00:00 2001 From: Mark Geisert Date: Fri, 22 May 2020 02:32:51 -0700 Subject: [PATCH 363/520] Cygwin: tzcode resync: basics Modifies winsup/cygwin/Makefile.in to build localtime.o from items in new winsup/cygwin/tzcode subdirectory. Compiler option "-fpermissive" is used to accept warnings about missing casts on the return values of malloc() calls. This patch also removes existing localtime.cc and tz_posixrules.h from winsup/cygwin as they are superseded by the subsequent patches in this set. --- winsup/cygwin/Makefile.in | 15 +- winsup/cygwin/localtime.cc | 2597 --------------------------------- winsup/cygwin/tz_posixrules.h | 48 - 3 files changed, 12 insertions(+), 2648 deletions(-) delete mode 100644 winsup/cygwin/localtime.cc delete mode 100644 winsup/cygwin/tz_posixrules.h diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index f273ba793..2ac8bcbd8 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in @@ -27,7 +27,7 @@ export CCWRAP_HEADERS:=. ${srcdir} export CCWRAP_SYSTEM_HEADERS:=@cygwin_headers@ @newlib_headers@ export CCWRAP_DIRAFTER_HEADERS:=@windows_headers@ -VPATH+=$(srcdir)/regex $(srcdir)/lib $(srcdir)/libc $(srcdir)/math +VPATH+=$(srcdir)/regex $(srcdir)/lib $(srcdir)/libc $(srcdir)/math $(srcdir)/tzcode target_cpu:=@target_cpu@ target_alias:=@target_alias@ @@ -246,6 +246,15 @@ MATH_OFILES:= \ tgammal.o \ truncl.o +TZCODE_OFILES:=localtime.o + +localtime.o: $(srcdir)/tzcode/localtime.cc $(srcdir)/tzcode/localtime.c.patch + (cd $(srcdir)/tzcode && \ + patch -u -o localtime.c.patched localtime.c localtime.c.patch) + $(CXX) ${CXXFLAGS} ${localtime_CFLAGS} \ + -I$(target_builddir)/winsup/cygwin \ + -I$(srcdir) -I$(srcdir)/tzcode -c -o $@ $< + DLL_OFILES:= \ advapi32.o \ aio.o \ @@ -333,7 +342,6 @@ DLL_OFILES:= \ ldap.o \ libstdcxx_wrapper.o \ loadavg.o \ - localtime.o \ lsearch.o \ malloc_wrapper.o \ minires-os-if.o \ @@ -412,6 +420,7 @@ DLL_OFILES:= \ $(EXTRA_OFILES) \ $(MALLOC_OFILES) \ $(MATH_OFILES) \ + $(TZCODE_OFILES) \ $(MT_SAFE_OBJECTS) EXCLUDE_STATIC_OFILES:=$(addprefix --exclude=,\ @@ -559,7 +568,7 @@ TARGET_LIBS:=$(LIB_NAME) $(CYGWIN_START) $(GMON_START) $(LIBGMON_A) $(SUBLIBS) $ ifneq "${filter -O%,$(CFLAGS)}" "" dtable_CFLAGS:=-fcheck-new -localtime_CFLAGS:=-fwrapv +localtime_CFLAGS:=-fwrapv -fpermissive malloc_CFLAGS:=-O3 sync_CFLAGS:=-O3 ifeq ($(target_cpu),i686) diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc deleted file mode 100644 index 010376637..000000000 --- a/winsup/cygwin/localtime.cc +++ /dev/null @@ -1,2597 +0,0 @@ -/* $NetBSD: localtime.c,v 1.72 2012/10/28 19:02:29 christos Exp $ */ - -/* Don't reformat the code arbitrarily. - - It uses in wide parts the exact formatting as the upstream NetBSD - versions. The purpose is to simplify subsequent diffs to the NetBSD - version, should the need arise again at one point. */ - -/* -** This file is in the public domain, so clarified as of -** 1996-06-05 by Arthur David Olson. -*/ -/* Temporarily merged private.h and tzfile.h for ease of management - DJ */ - -#include "winsup.h" -#include "cygerrno.h" -#include "sync.h" -#include -#define STD_INSPIRED -#define lint - -#define USG_COMPAT - -#ifndef lint -#ifndef NOID -static char elsieid[] = "@(#)localtime.c 8.17"; -#endif /* !defined NOID */ -#endif /* !defined lint */ - -/* -** Leap second handling from Bradley White. -** POSIX-style TZ environment variable handling from Guy Harris. -*/ - -#define NO_ERROR_IN_DST_GAP - -/*LINTLIBRARY*/ - -#ifndef PRIVATE_H - -#define PRIVATE_H - -/* -** This file is in the public domain, so clarified as of -** 1996-06-05 by Arthur David Olson -*/ - -/* -** This header is for use ONLY with the time conversion code. -** There is no guarantee that it will remain unchanged, -** or that it will remain at all. -** Do NOT copy it to any system include directory. -** Thank you! -*/ - -/* -** ID -*/ - -#ifndef lint -#ifndef NOID -static char privatehid[] = "@(#)private.h 7.48"; -#endif /* !defined NOID */ -#endif /* !defined lint */ - -/* -** Nested includes -*/ - -#include "stdio.h" -#include "limits.h" /* for CHAR_BIT */ -#include "stdlib.h" -#include "unistd.h" /* for F_OK and R_OK */ - -/* Unlike 's isdigit, this also works if c < 0 | c > UCHAR_MAX. */ -#define is_digit(c) ((unsigned)(c) - '0' <= 9) - -#ifndef __pure -#if 2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__) -# define __pure __attribute__ ((__pure__)) -#else -# define __pure /* empty */ -#endif -#endif - -/* -** Finally, some convenience items. -*/ - -#ifndef TYPE_INTEGRAL -#define TYPE_INTEGRAL(type) (/*CONSTCOND*/((type) 0.5) != 0.5) -#endif /* !defined TYPE_INTEGRAL */ - -#ifndef TYPE_BIT -#define TYPE_BIT(type) (sizeof (type) * CHAR_BIT) -#endif /* !defined TYPE_BIT */ - -#ifndef TYPE_SIGNED -#define TYPE_SIGNED(type) (((type) -1) < 0) -#endif /* !defined TYPE_SIGNED */ - -#ifndef INT_STRLEN_MAXIMUM -/* -** 302 / 1000 is log10(2.0) rounded up. -** Subtract one for the sign bit if the type is signed; -** add one for integer division truncation; -** add one more for a minus sign if the type is signed. -*/ -#define INT_STRLEN_MAXIMUM(type) \ - ((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + 1 + TYPE_SIGNED(type)) -#endif /* !defined INT_STRLEN_MAXIMUM */ - -/* -** INITIALIZE(x) -*/ - -#ifndef GNUC_or_lint -#ifdef lint -#define GNUC_or_lint -#endif /* defined lint */ -#ifndef lint -#ifdef __GNUC__ -#define GNUC_or_lint -#endif /* defined __GNUC__ */ -#endif /* !defined lint */ -#endif /* !defined GNUC_or_lint */ - -#ifndef INITIALIZE -#ifdef GNUC_or_lint -#define INITIALIZE(x) ((x) = 0) -#endif /* defined GNUC_or_lint */ -#ifndef GNUC_or_lint -#define INITIALIZE(x) -#endif /* !defined GNUC_or_lint */ -#endif /* !defined INITIALIZE */ - -#ifndef TZ_DOMAIN -#define TZ_DOMAIN "tz" -#endif /* !defined TZ_DOMAIN */ - -#ifndef YEARSPERREPEAT -#define YEARSPERREPEAT 400 /* years before a Gregorian repeat */ -#endif /* !defined YEARSPERREPEAT */ - -/* -** The Gregorian year averages 365.2425 days, which is 31556952 seconds. -*/ - -#ifndef AVGSECSPERYEAR -#define AVGSECSPERYEAR 31556952L -#endif /* !defined AVGSECSPERYEAR */ - -#ifndef SECSPERREPEAT -#define SECSPERREPEAT ((int_fast64_t) YEARSPERREPEAT * (int_fast64_t) AVGSECSPERYEAR) -#endif /* !defined SECSPERREPEAT */ - -#ifndef SECSPERREPEAT_BITS -#define SECSPERREPEAT_BITS 34 /* ceil(log2(SECSPERREPEAT)) */ -#endif /* !defined SECSPERREPEAT_BITS */ - -/* -** UNIX was a registered trademark of UNIX System Laboratories in 1993. -*/ - -#endif /* !defined PRIVATE_H */ - -#ifndef TZFILE_H - -#define TZFILE_H - -/* -** This file is in the public domain, so clarified as of -** 1996-06-05 by Arthur David Olson. -*/ - -/* -** This header is for use ONLY with the time conversion code. -** There is no guarantee that it will remain unchanged, -** or that it will remain at all. -** Do NOT copy it to any system include directory. -** Thank you! -*/ - -/* -** ID -*/ - -#ifndef lint -#ifndef NOID -static char tzfilehid[] = "@(#)tzfile.h 7.14"; -#endif /* !defined NOID */ -#endif /* !defined lint */ - -/* -** Information about time zone files. -*/ - -#ifndef TZDIR -#define TZDIR "/usr/share/zoneinfo" /* Time zone object file directory */ -#endif /* !defined TZDIR */ - -#ifndef TZDEFAULT -#define TZDEFAULT "localtime" -#endif /* !defined TZDEFAULT */ - -#ifndef TZDEFRULES -#define TZDEFRULES "posixrules" -#endif /* !defined TZDEFRULES */ - -/* -** Each file begins with. . . -*/ - -#define TZ_MAGIC "TZif" - -struct tzhead { - char tzh_magic[4]; /* TZ_MAGIC */ - char tzh_version[1]; /* '\0' or '2' as of 2005 */ - char tzh_reserved[15]; /* reserved for future use */ - char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */ - char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */ - char tzh_leapcnt[4]; /* coded number of leap seconds */ - char tzh_timecnt[4]; /* coded number of transition times */ - char tzh_typecnt[4]; /* coded number of local time types */ - char tzh_charcnt[4]; /* coded number of abbr. chars */ -}; - -/* -** . . .followed by. . . -** -** tzh_timecnt (char [4])s coded transition times a la time(2) -** tzh_timecnt (unsigned char)s types of local time starting at above -** tzh_typecnt repetitions of -** one (char [4]) coded UTC offset in seconds -** one (unsigned char) used to set tm_isdst -** one (unsigned char) that's an abbreviation list index -** tzh_charcnt (char)s '\0'-terminated zone abbreviations -** tzh_leapcnt repetitions of -** one (char [4]) coded leap second transition times -** one (char [4]) total correction after above -** tzh_ttisstdcnt (char)s indexed by type; if TRUE, transition -** time is standard time, if FALSE, -** transition time is wall clock time -** if absent, transition times are -** assumed to be wall clock time -** tzh_ttisgmtcnt (char)s indexed by type; if TRUE, transition -** time is UTC, if FALSE, -** transition time is local time -** if absent, transition times are -** assumed to be local time -*/ - -/* -** If tzh_version is '2' or greater, the above is followed by a second instance -** of tzhead and a second instance of the data in which each coded transition -** time uses 8 rather than 4 chars, -** then a POSIX-TZ-environment-variable-style string for use in handling -** instants after the last transition time stored in the file -** (with nothing between the newlines if there is no POSIX representation for -** such instants). -*/ - -/* -** In the current implementation, "tzset()" refuses to deal with files that -** exceed any of the limits below. -*/ - -#ifndef TZ_MAX_TIMES -/* -** The TZ_MAX_TIMES value below is enough to handle a bit more than a -** year's worth of solar time (corrected daily to the nearest second) or -** 138 years of Pacific Presidential Election time -** (where there are three time zone transitions every fourth year). -*/ -#define TZ_MAX_TIMES 1200 -#endif /* !defined TZ_MAX_TIMES */ - -#ifndef TZ_MAX_TYPES -#ifndef NOSOLAR -#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ -#endif /* !defined NOSOLAR */ -#ifdef NOSOLAR -/* -** Must be at least 14 for Europe/Riga as of Jan 12 1995, -** as noted by Earl Chew. -*/ -#define TZ_MAX_TYPES 20 /* Maximum number of local time types */ -#endif /* !defined NOSOLAR */ -#endif /* !defined TZ_MAX_TYPES */ - -#ifndef TZ_MAX_CHARS -#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */ - /* (limited by what unsigned chars can hold) */ -#endif /* !defined TZ_MAX_CHARS */ - -#ifndef TZ_MAX_LEAPS -#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ -#endif /* !defined TZ_MAX_LEAPS */ - -#define SECSPERMIN 60 -#define MINSPERHOUR 60 -#define HOURSPERDAY 24 -#define DAYSPERWEEK 7 -#define DAYSPERNYEAR 365 -#define DAYSPERLYEAR 366 -#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) -#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY) -#define MONSPERYEAR 12 - -#define TM_SUNDAY 0 -#define TM_MONDAY 1 -#define TM_TUESDAY 2 -#define TM_WEDNESDAY 3 -#define TM_THURSDAY 4 -#define TM_FRIDAY 5 -#define TM_SATURDAY 6 - -#define TM_JANUARY 0 -#define TM_FEBRUARY 1 -#define TM_MARCH 2 -#define TM_APRIL 3 -#define TM_MAY 4 -#define TM_JUNE 5 -#define TM_JULY 6 -#define TM_AUGUST 7 -#define TM_SEPTEMBER 8 -#define TM_OCTOBER 9 -#define TM_NOVEMBER 10 -#define TM_DECEMBER 11 - -#define TM_YEAR_BASE 1900 - -#define EPOCH_YEAR 1970 -#define EPOCH_WDAY TM_THURSDAY - -/* -** Accurate only for the past couple of centuries; -** that will probably do. -*/ - -#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) - -#endif /* !defined TZFILE_H */ - -#include "fcntl.h" - -#ifdef __TM_GMTOFF -# define TM_GMTOFF __TM_GMTOFF -#endif -#ifdef __TM_ZONE -# define TM_ZONE __TM_ZONE -#endif - -/* -** SunOS 4.1.1 headers lack O_BINARY. -*/ - -#ifdef O_BINARY -#define OPEN_MODE (O_RDONLY | O_BINARY) -#endif /* defined O_BINARY */ -#ifndef O_BINARY -#define OPEN_MODE O_RDONLY -#endif /* !defined O_BINARY */ - -#ifndef WILDABBR -/* -** Someone might make incorrect use of a time zone abbreviation: -** 1. They might reference tzname[0] before calling tzset (explicitly -** or implicitly). -** 2. They might reference tzname[1] before calling tzset (explicitly -** or implicitly). -** 3. They might reference tzname[1] after setting to a time zone -** in which Daylight Saving Time is never observed. -** 4. They might reference tzname[0] after setting to a time zone -** in which Standard Time is never observed. -** 5. They might reference tm.TM_ZONE after calling offtime. -** What's best to do in the above cases is open to debate; -** for now, we just set things up so that in any of the five cases -** WILDABBR is used. Another possibility: initialize tzname[0] to the -** string "tzname[0] used before set", and similarly for the other cases. -** And another: initialize tzname[0] to "ERA", with an explanation in the -** manual page of what this "time zone abbreviation" means (doing this so -** that tzname[0] has the "normal" length of three characters). -*/ -#define WILDABBR " " -#endif /* !defined WILDABBR */ - -static const char wildabbr[] = WILDABBR; - -static const char gmt[] = "GMT"; - -/* -** The DST rules to use if TZ has no rules and we can't load TZDEFRULES. -** We default to US rules as of 1999-08-17. -** POSIX 1003.1 section 8.1.1 says that the default DST rules are -** implementation dependent; for historical reasons, US rules are a -** common default. -*/ -#ifndef TZDEFRULESTRING -#define TZDEFRULESTRING ",M4.1.0,M10.5.0" -#endif /* !defined TZDEFDST */ - -struct ttinfo { /* time type information */ - long tt_gmtoff; /* UTC offset in seconds */ - int tt_isdst; /* used to set tm_isdst */ - int tt_abbrind; /* abbreviation list index */ - int tt_ttisstd; /* TRUE if transition is std time */ - int tt_ttisgmt; /* TRUE if transition is UTC */ -}; - -struct lsinfo { /* leap second information */ - time_t ls_trans; /* transition time */ - long ls_corr; /* correction to apply */ -}; - -#define BIGGEST(a, b) (((a) > (b)) ? (a) : (b)) - -#ifdef TZNAME_MAX -#define MY_TZNAME_MAX TZNAME_MAX -#endif /* defined TZNAME_MAX */ -#ifndef TZNAME_MAX -#define MY_TZNAME_MAX 255 -#endif /* !defined TZNAME_MAX */ - -struct __state { - int leapcnt; - int timecnt; - int typecnt; - int charcnt; - int goback; - int goahead; - time_t ats[TZ_MAX_TIMES]; - unsigned char types[TZ_MAX_TIMES]; - struct ttinfo ttis[TZ_MAX_TYPES]; - char chars[/*CONSTCOND*/BIGGEST(BIGGEST(TZ_MAX_CHARS + 1, - sizeof gmt), (2 * (MY_TZNAME_MAX + 1)))]; - struct lsinfo lsis[TZ_MAX_LEAPS]; -}; - -typedef struct __state *timezone_t; - -struct rule { - int r_type; /* type of rule--see below */ - int r_day; /* day number of rule */ - int r_week; /* week number of rule */ - int r_mon; /* month number of rule */ - long r_time; /* transition time of rule */ -}; - -#define JULIAN_DAY 0 /* Jn - Julian day */ -#define DAY_OF_YEAR 1 /* n - day of year */ -#define MONTH_NTH_DAY_OF_WEEK 2 /* Mm.n.d - month, week, day of week */ - -typedef struct tm *(*subfun_t)(const timezone_t sp, const time_t *timep, - long offset, struct tm *tmp); - -/* -** Prototypes for static functions. -*/ - -static long detzcode(const char * codep); -static time_t detzcode64(const char * codep); -static int differ_by_repeat(time_t t1, time_t t0); -static const char * getzname(const char * strp) __pure; -static const char * getqzname(const char * strp, const int delim) __pure; -static const char * getnum(const char * strp, int * nump, int min, - int max); -static const char * getsecs(const char * strp, long * secsp); -static const char * getoffset(const char * strp, long * offsetp); -static const char * getrule(const char * strp, struct rule * rulep); -static void gmtload(timezone_t sp); -static struct tm * gmtsub(const timezone_t sp, const time_t *timep, - long offset, struct tm * tmp); -static struct tm * localsub(const timezone_t sp, const time_t *timep, - long offset, struct tm *tmp); -static int increment_overflow(int * number, int delta); -static int leaps_thru_end_of(int y) __pure; -static int long_increment_overflow(long * number, int delta); -static int long_normalize_overflow(long * tensptr, - int * unitsptr, int base); -static int normalize_overflow(int * tensptr, int * unitsptr, - int base); -static void settzname(void); -static time_t time1(const timezone_t sp, struct tm * const tmp, - subfun_t funcp, const long offset); -static time_t time2(const timezone_t sp, struct tm * const tmp, - subfun_t funcp, - const long offset, int *const okayp); -static time_t time2sub(const timezone_t sp, struct tm * const tmp, - subfun_t funcp, const long offset, - int *const okayp, const int do_norm_secs); -static struct tm * timesub(const timezone_t sp, const time_t * timep, - long offset, struct tm * tmp); -static int tmcomp(const struct tm * atmp, - const struct tm * btmp); -static time_t transtime(time_t janfirst, int year, - const struct rule * rulep, long offset) __pure; -static int typesequiv(const timezone_t sp, int a, int b); -static int tzload(timezone_t sp, const char * name, - int doextend); -static int tzparse(timezone_t sp, const char * name, - int lastditch); -#ifdef __CYGWIN__ -extern "C" void tzset_unlocked(void); -#else -static void tzset_unlocked(void); -#endif -static long leapcorr(const timezone_t sp, time_t * timep); - -static timezone_t lclptr; -static timezone_t gmtptr; - -#ifndef TZ_STRLEN_MAX -#define TZ_STRLEN_MAX 255 -#endif /* !defined TZ_STRLEN_MAX */ - -static char lcl_TZname[TZ_STRLEN_MAX + 1]; -static enum lcl_states -{ - lcl_setting = -1, - lcl_unset = 0, - lcl_from_environment = 1, - lcl_from_default = 2 -} lcl_is_set; -static int gmt_is_set; - -#define tzname _tzname -#undef _tzname - -char * tzname[2] = { - (char *) wildabbr, - (char *) wildabbr -}; - -/* -** Section 4.12.3 of X3.159-1989 requires that -** Except for the strftime function, these functions [asctime, -** ctime, gmtime, localtime] return values in one of two static -** objects: a broken-down time structure and an array of char. -** Thanks to Paul Eggert for noting this. -*/ - -static struct tm tm; - -/* These variables are initialized by tzset. The macro versions are - defined in time.h, and indirect through the __imp_ pointers. */ - -#define timezone _timezone -#define daylight _daylight -#undef _timezone -#undef _daylight - -#ifdef USG_COMPAT -long timezone = 0; -int daylight; -#endif /* defined USG_COMPAT */ - -#ifdef ALTZONE -time_t altzone = 0; -#endif /* defined ALTZONE */ - -static long -detzcode(const char *const codep) -{ - long result; - int i; - - result = (codep[0] & 0x80) ? ~0L : 0; - for (i = 0; i < 4; ++i) - result = (result << 8) | (codep[i] & 0xff); - return result; -} - -static time_t -detzcode64(const char *const codep) -{ - time_t result; - int i; - - result = (time_t)((codep[0] & 0x80) ? (~(int_fast64_t) 0) : 0); - for (i = 0; i < 8; ++i) - result = result * 256 + (codep[i] & 0xff); - return result; -} - -static void -settzname (void) -{ - timezone_t const sp = lclptr; - int i; - - tzname[0] = (char *) wildabbr; - tzname[1] = (char *) wildabbr; -#ifdef USG_COMPAT - daylight = 0; - timezone = 0; -#endif /* defined USG_COMPAT */ -#ifdef ALTZONE - altzone = 0; -#endif /* defined ALTZONE */ - if (sp == NULL) { - tzname[0] = tzname[1] = (char *) gmt; - return; - } - for (i = 0; i < sp->typecnt; ++i) { - const struct ttinfo * const ttisp = &sp->ttis[i]; - - tzname[ttisp->tt_isdst] = - &sp->chars[ttisp->tt_abbrind]; -#ifdef USG_COMPAT - if (ttisp->tt_isdst) - daylight = 1; - if (!ttisp->tt_isdst) - timezone = -(ttisp->tt_gmtoff); -#endif /* defined USG_COMPAT */ -#ifdef ALTZONE - if (ttisp->tt_isdst) - altzone = -(ttisp->tt_gmtoff); -#endif /* defined ALTZONE */ - } - /* - ** And to get the latest zone names into tzname. . . - */ - for (i = 0; i < sp->timecnt; ++i) { - const struct ttinfo *const ttisp = &sp->ttis[sp->types[i]]; - - tzname[ttisp->tt_isdst] = - &sp->chars[ttisp->tt_abbrind]; - } -} - -#include "tz_posixrules.h" - -static int -differ_by_repeat(const time_t t1, const time_t t0) -{ - if (TYPE_INTEGRAL(time_t) && - TYPE_BIT(time_t) - TYPE_SIGNED(time_t) < SECSPERREPEAT_BITS) - return 0; - return (int_fast64_t)t1 - (int_fast64_t)t0 == SECSPERREPEAT; -} - -static int -tzload(timezone_t sp, const char *name, const int doextend) -{ - const char * p; - int i; - int fid; - int stored; - ssize_t nread; - typedef union { - struct tzhead tzhead; - char buf[2 * sizeof(struct tzhead) + - 2 * sizeof *sp + - 4 * TZ_MAX_TIMES]; - } u_t; - u_t * up; - save_errno save; - - up = (u_t *) calloc(1, sizeof *up); - if (up == NULL) - return -1; - - sp->goback = sp->goahead = FALSE; - if (name == NULL && (name = TZDEFAULT) == NULL) - goto oops; - { - int doaccess; - /* - ** Section 4.9.1 of the C standard says that - ** "FILENAME_MAX expands to an integral constant expression - ** that is the size needed for an array of char large enough - ** to hold the longest file name string that the implementation - ** guarantees can be opened." - */ - char fullname[FILENAME_MAX + 1]; - - if (name[0] == ':') - ++name; - doaccess = name[0] == '/'; - if (!doaccess) { - if ((p = TZDIR) == NULL) - goto oops; - if ((strlen(p) + strlen(name) + 1) >= sizeof fullname) - goto oops; - (void) strcpy(fullname, p); /* XXX strcpy is safe */ - (void) strcat(fullname, "/"); /* XXX strcat is safe */ - (void) strcat(fullname, name); /* XXX strcat is safe */ - /* - ** Set doaccess if '.' (as in "../") shows up in name. - */ - if (strchr(name, '.') != NULL) - doaccess = TRUE; - name = fullname; - } - if ((doaccess && access(name, R_OK) != 0) - || (fid = open(name, OPEN_MODE)) == -1) - { - const char *base = strrchr(name, '/'); - if (base) - base++; - else - base = name; - if (strcmp(base, "posixrules")) - goto oops; - - /* We've got a built-in copy of posixrules just in case */ - fid = -2; - } - } - if (fid == -2) - { - memcpy(up->buf, _posixrules_data, sizeof (_posixrules_data)); - nread = sizeof (_posixrules_data); - } - else - { - nread = read(fid, up->buf, sizeof up->buf); - if (close(fid) < 0 || nread <= 0) - goto oops; - } - for (stored = 4; stored <= 8; stored *= 2) { - int ttisstdcnt; - int ttisgmtcnt; - - ttisstdcnt = (int) detzcode(up->tzhead.tzh_ttisstdcnt); - ttisgmtcnt = (int) detzcode(up->tzhead.tzh_ttisgmtcnt); - sp->leapcnt = (int) detzcode(up->tzhead.tzh_leapcnt); - sp->timecnt = (int) detzcode(up->tzhead.tzh_timecnt); - sp->typecnt = (int) detzcode(up->tzhead.tzh_typecnt); - sp->charcnt = (int) detzcode(up->tzhead.tzh_charcnt); - p = up->tzhead.tzh_charcnt + sizeof up->tzhead.tzh_charcnt; - if (sp->leapcnt < 0 || sp->leapcnt > TZ_MAX_LEAPS || - sp->typecnt <= 0 || sp->typecnt > TZ_MAX_TYPES || - sp->timecnt < 0 || sp->timecnt > TZ_MAX_TIMES || - sp->charcnt < 0 || sp->charcnt > TZ_MAX_CHARS || - (ttisstdcnt != sp->typecnt && ttisstdcnt != 0) || - (ttisgmtcnt != sp->typecnt && ttisgmtcnt != 0)) - goto oops; - if (nread - (p - up->buf) < - sp->timecnt * stored + /* ats */ - sp->timecnt + /* types */ - sp->typecnt * 6 + /* ttinfos */ - sp->charcnt + /* chars */ - sp->leapcnt * (stored + 4) + /* lsinfos */ - ttisstdcnt + /* ttisstds */ - ttisgmtcnt) /* ttisgmts */ - goto oops; - for (i = 0; i < sp->timecnt; ++i) { - sp->ats[i] = (time_t)((stored == 4) ? - detzcode(p) : detzcode64(p)); - p += stored; - } - for (i = 0; i < sp->timecnt; ++i) { - sp->types[i] = (unsigned char) *p++; - if (sp->types[i] >= sp->typecnt) - goto oops; - } - for (i = 0; i < sp->typecnt; ++i) { - struct ttinfo * ttisp; - - ttisp = &sp->ttis[i]; - ttisp->tt_gmtoff = detzcode(p); - p += 4; - ttisp->tt_isdst = (unsigned char) *p++; - if (ttisp->tt_isdst != 0 && ttisp->tt_isdst != 1) - goto oops; - ttisp->tt_abbrind = (unsigned char) *p++; - if (ttisp->tt_abbrind < 0 || - ttisp->tt_abbrind > sp->charcnt) - goto oops; - } - for (i = 0; i < sp->charcnt; ++i) - sp->chars[i] = *p++; - sp->chars[i] = '\0'; /* ensure '\0' at end */ - for (i = 0; i < sp->leapcnt; ++i) { - struct lsinfo * lsisp; - - lsisp = &sp->lsis[i]; - lsisp->ls_trans = (time_t)((stored == 4) ? - detzcode(p) : detzcode64(p)); - p += stored; - lsisp->ls_corr = detzcode(p); - p += 4; - } - for (i = 0; i < sp->typecnt; ++i) { - struct ttinfo * ttisp; - - ttisp = &sp->ttis[i]; - if (ttisstdcnt == 0) - ttisp->tt_ttisstd = FALSE; - else { - ttisp->tt_ttisstd = *p++; - if (ttisp->tt_ttisstd != TRUE && - ttisp->tt_ttisstd != FALSE) - goto oops; - } - } - for (i = 0; i < sp->typecnt; ++i) { - struct ttinfo * ttisp; - - ttisp = &sp->ttis[i]; - if (ttisgmtcnt == 0) - ttisp->tt_ttisgmt = FALSE; - else { - ttisp->tt_ttisgmt = *p++; - if (ttisp->tt_ttisgmt != TRUE && - ttisp->tt_ttisgmt != FALSE) - goto oops; - } - } - /* - ** Out-of-sort ats should mean we're running on a - ** signed time_t system but using a data file with - ** unsigned values (or vice versa). - */ - for (i = 0; i < sp->timecnt - 2; ++i) - if (sp->ats[i] > sp->ats[i + 1]) { - ++i; - if (TYPE_SIGNED(time_t)) { - /* - ** Ignore the end (easy). - */ - sp->timecnt = i; - } else { - /* - ** Ignore the beginning (harder). - */ - int j; - - for (j = 0; j + i < sp->timecnt; ++j) { - sp->ats[j] = sp->ats[j + i]; - sp->types[j] = sp->types[j + i]; - } - sp->timecnt = j; - } - break; - } - /* - ** If this is an old file, we're done. - */ - if (up->tzhead.tzh_version[0] == '\0') - break; - nread -= p - up->buf; - for (i = 0; i < nread; ++i) - up->buf[i] = p[i]; - /* - ** If this is a narrow integer time_t system, we're done. - */ - if (stored >= (int) sizeof(time_t) -/* CONSTCOND */ - && TYPE_INTEGRAL(time_t)) - break; - } - if (doextend && nread > 2 && - up->buf[0] == '\n' && up->buf[nread - 1] == '\n' && - sp->typecnt + 2 <= TZ_MAX_TYPES) { - struct __state ts; - int result; - - up->buf[nread - 1] = '\0'; - result = tzparse(&ts, &up->buf[1], FALSE); - if (result == 0 && ts.typecnt == 2 && - sp->charcnt + ts.charcnt <= TZ_MAX_CHARS) { - for (i = 0; i < 2; ++i) - ts.ttis[i].tt_abbrind += - sp->charcnt; - for (i = 0; i < ts.charcnt; ++i) - sp->chars[sp->charcnt++] = - ts.chars[i]; - i = 0; - while (i < ts.timecnt && - ts.ats[i] <= - sp->ats[sp->timecnt - 1]) - ++i; - while (i < ts.timecnt && - sp->timecnt < TZ_MAX_TIMES) { - sp->ats[sp->timecnt] = - ts.ats[i]; - sp->types[sp->timecnt] = - sp->typecnt + - ts.types[i]; - ++sp->timecnt; - ++i; - } - sp->ttis[sp->typecnt++] = ts.ttis[0]; - sp->ttis[sp->typecnt++] = ts.ttis[1]; - } - } - if (sp->timecnt > 1) { - for (i = 1; i < sp->timecnt; ++i) - if (typesequiv(sp, sp->types[i], sp->types[0]) && - differ_by_repeat(sp->ats[i], sp->ats[0])) { - sp->goback = TRUE; - break; - } - for (i = sp->timecnt - 2; i >= 0; --i) - if (typesequiv(sp, sp->types[sp->timecnt - 1], - sp->types[i]) && - differ_by_repeat(sp->ats[sp->timecnt - 1], - sp->ats[i])) { - sp->goahead = TRUE; - break; - } - } - free(up); - /* - ** Get latest zone offsets into tzinfo (for newlib). . . - */ - if (sp == lclptr) - { - for (i = 0; i < sp->timecnt; ++i) - { - const struct ttinfo *const ttisp = &sp->ttis[sp->types[i]]; - - __gettzinfo ()->__tzrule[ttisp->tt_isdst].offset - = -ttisp->tt_gmtoff; - } - } - return 0; -oops: - free(up); - return -1; -} - -static int -typesequiv(const timezone_t sp, const int a, const int b) -{ - int result; - - if (sp == NULL || - a < 0 || a >= sp->typecnt || - b < 0 || b >= sp->typecnt) - result = FALSE; - else { - const struct ttinfo * ap = &sp->ttis[a]; - const struct ttinfo * bp = &sp->ttis[b]; - result = ap->tt_gmtoff == bp->tt_gmtoff && - ap->tt_isdst == bp->tt_isdst && - ap->tt_ttisstd == bp->tt_ttisstd && - ap->tt_ttisgmt == bp->tt_ttisgmt && - strcmp(&sp->chars[ap->tt_abbrind], - &sp->chars[bp->tt_abbrind]) == 0; - } - return result; -} - -static const int mon_lengths[2][MONSPERYEAR] = { - { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, - { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } -}; - -static const int year_lengths[2] = { - DAYSPERNYEAR, DAYSPERLYEAR -}; - -/* -** Given a pointer into a time zone string, scan until a character that is not -** a valid character in a zone name is found. Return a pointer to that -** character. -*/ - -static const char * -getzname(const char *strp) -{ - char c; - - while ((c = *strp) != '\0' && !is_digit(c) && c != ',' && c != '-' && - c != '+') - ++strp; - return strp; -} - -/* -** Given a pointer into an extended time zone string, scan until the ending -** delimiter of the zone name is located. Return a pointer to the delimiter. -** -** As with getzname above, the legal character set is actually quite -** restricted, with other characters producing undefined results. -** We don't do any checking here; checking is done later in common-case code. -*/ - -static const char * -getqzname(const char *strp, const int delim) -{ - int c; - - while ((c = *strp) != '\0' && c != delim) - ++strp; - return strp; -} - -/* -** Given a pointer into a time zone string, extract a number from that string. -** Check that the number is within a specified range; if it is not, return -** NULL. -** Otherwise, return a pointer to the first character not part of the number. -*/ - -static const char * -getnum(const char *strp, int *const nump, const int min, const int max) -{ - char c; - int num; - - if (strp == NULL || !is_digit(c = *strp)) { - errno = EINVAL; - return NULL; - } - num = 0; - do { - num = num * 10 + (c - '0'); - if (num > max) { - errno = EOVERFLOW; - return NULL; /* illegal value */ - } - c = *++strp; - } while (is_digit(c)); - if (num < min) { - errno = EINVAL; - return NULL; /* illegal value */ - } - *nump = num; - return strp; -} - -/* -** Given a pointer into a time zone string, extract a number of seconds, -** in hh[:mm[:ss]] form, from the string. -** If any error occurs, return NULL. -** Otherwise, return a pointer to the first character not part of the number -** of seconds. -*/ - -static const char * -getsecs(const char *strp, long *const secsp) -{ - int num; - - /* - ** `HOURSPERDAY * DAYSPERWEEK - 1' allows quasi-Posix rules like - ** "M10.4.6/26", which does not conform to Posix, - ** but which specifies the equivalent of - ** ``02:00 on the first Sunday on or after 23 Oct''. - */ - strp = getnum(strp, &num, 0, HOURSPERDAY * DAYSPERWEEK - 1); - if (strp == NULL) - return NULL; - *secsp = num * (long) SECSPERHOUR; - if (*strp == ':') { - ++strp; - strp = getnum(strp, &num, 0, MINSPERHOUR - 1); - if (strp == NULL) - return NULL; - *secsp += num * SECSPERMIN; - if (*strp == ':') { - ++strp; - /* `SECSPERMIN' allows for leap seconds. */ - strp = getnum(strp, &num, 0, SECSPERMIN); - if (strp == NULL) - return NULL; - *secsp += num; - } - } - return strp; -} - -/* -** Given a pointer into a time zone string, extract an offset, in -** [+-]hh[:mm[:ss]] form, from the string. -** If any error occurs, return NULL. -** Otherwise, return a pointer to the first character not part of the time. -*/ - -static const char * -getoffset(const char *strp, long *const offsetp) -{ - int neg = 0; - - if (*strp == '-') { - neg = 1; - ++strp; - } else if (*strp == '+') - ++strp; - strp = getsecs(strp, offsetp); - if (strp == NULL) - return NULL; /* illegal time */ - if (neg) - *offsetp = -*offsetp; - return strp; -} - -/* -** Given a pointer into a time zone string, extract a rule in the form -** date[/time]. See POSIX section 8 for the format of "date" and "time". -** If a valid rule is not found, return NULL. -** Otherwise, return a pointer to the first character not part of the rule. -*/ - -static const char * -getrule(const char *strp, struct rule *const rulep) -{ - if (*strp == 'J') { - /* - ** Julian day. - */ - rulep->r_type = JULIAN_DAY; - ++strp; - strp = getnum(strp, &rulep->r_day, 1, DAYSPERNYEAR); - } else if (*strp == 'M') { - /* - ** Month, week, day. - */ - rulep->r_type = MONTH_NTH_DAY_OF_WEEK; - ++strp; - strp = getnum(strp, &rulep->r_mon, 1, MONSPERYEAR); - if (strp == NULL) - return NULL; - if (*strp++ != '.') - return NULL; - strp = getnum(strp, &rulep->r_week, 1, 5); - if (strp == NULL) - return NULL; - if (*strp++ != '.') - return NULL; - strp = getnum(strp, &rulep->r_day, 0, DAYSPERWEEK - 1); - } else if (is_digit(*strp)) { - /* - ** Day of year. - */ - rulep->r_type = DAY_OF_YEAR; - strp = getnum(strp, &rulep->r_day, 0, DAYSPERLYEAR - 1); - } else return NULL; /* invalid format */ - if (strp == NULL) - return NULL; - if (*strp == '/') { - /* - ** Time specified. - */ - ++strp; - strp = getsecs(strp, &rulep->r_time); - } else rulep->r_time = 2 * SECSPERHOUR; /* default = 2:00:00 */ - return strp; -} - -/* -** Given the Epoch-relative time of January 1, 00:00:00 UTC, in a year, the -** year, a rule, and the offset from UTC at the time that rule takes effect, -** calculate the Epoch-relative time that rule takes effect. -*/ - -static time_t -transtime(const time_t janfirst, const int year, const struct rule *const rulep, - const long offset) -{ - int leapyear; - time_t value; - int i; - int d, m1, yy0, yy1, yy2, dow; - - INITIALIZE(value); - leapyear = isleap(year); - switch (rulep->r_type) { - - case JULIAN_DAY: - /* - ** Jn - Julian day, 1 == January 1, 60 == March 1 even in leap - ** years. - ** In non-leap years, or if the day number is 59 or less, just - ** add SECSPERDAY times the day number-1 to the time of - ** January 1, midnight, to get the day. - */ - value = (time_t)(janfirst + (rulep->r_day - 1) * SECSPERDAY); - if (leapyear && rulep->r_day >= 60) - value += SECSPERDAY; - break; - - case DAY_OF_YEAR: - /* - ** n - day of year. - ** Just add SECSPERDAY times the day number to the time of - ** January 1, midnight, to get the day. - */ - value = (time_t)(janfirst + rulep->r_day * SECSPERDAY); - break; - - case MONTH_NTH_DAY_OF_WEEK: - /* - ** Mm.n.d - nth "dth day" of month m. - */ - value = janfirst; - for (i = 0; i < rulep->r_mon - 1; ++i) - value += (time_t)(mon_lengths[leapyear][i] * SECSPERDAY); - - /* - ** Use Zeller's Congruence to get day-of-week of first day of - ** month. - */ - m1 = (rulep->r_mon + 9) % 12 + 1; - yy0 = (rulep->r_mon <= 2) ? (year - 1) : year; - yy1 = yy0 / 100; - yy2 = yy0 % 100; - dow = ((26 * m1 - 2) / 10 + - 1 + yy2 + yy2 / 4 + yy1 / 4 - 2 * yy1) % 7; - if (dow < 0) - dow += DAYSPERWEEK; - - /* - ** "dow" is the day-of-week of the first day of the month. Get - ** the day-of-month (zero-origin) of the first "dow" day of the - ** month. - */ - d = rulep->r_day - dow; - if (d < 0) - d += DAYSPERWEEK; - for (i = 1; i < rulep->r_week; ++i) { - if (d + DAYSPERWEEK >= - mon_lengths[leapyear][rulep->r_mon - 1]) - break; - d += DAYSPERWEEK; - } - - /* - ** "d" is the day-of-month (zero-origin) of the day we want. - */ - value += (time_t)(d * SECSPERDAY); - break; - } - - /* - ** "value" is the Epoch-relative time of 00:00:00 UTC on the day in - ** question. To get the Epoch-relative time of the specified local - ** time on that day, add the transition time and the current offset - ** from UTC. - */ - return (time_t)(value + rulep->r_time + offset); -} - -/* -** Given a POSIX section 8-style TZ string, fill in the rule tables as -** appropriate. -*/ - -static int -tzparse(timezone_t sp, const char *name, const int lastditch) -{ - const char * stdname; - const char * dstname; - size_t stdlen; - size_t dstlen; - long stdoffset; - long dstoffset; - time_t * atp; - unsigned char * typep; - char * cp; - int load_result; - - INITIALIZE(dstname); - stdname = name; - if (lastditch) { - stdlen = strlen(name); /* length of standard zone name */ - name += stdlen; - if (stdlen >= sizeof sp->chars) - stdlen = (sizeof sp->chars) - 1; - stdoffset = 0; - } else { - if (*name == '<') { - name++; - stdname = name; - name = getqzname(name, '>'); - if (*name != '>') - return (-1); - stdlen = name - stdname; - name++; - } else { - name = getzname(name); - stdlen = name - stdname; - } - if (*name == '\0') - return -1; - name = getoffset(name, &stdoffset); - if (name == NULL) - return -1; - } - load_result = tzload(sp, TZDEFRULES, FALSE); - if (load_result != 0) - sp->leapcnt = 0; /* so, we're off a little */ - if (*name != '\0') { - if (*name == '<') { - dstname = ++name; - name = getqzname(name, '>'); - if (*name != '>') - return -1; - dstlen = name - dstname; - name++; - } else { - dstname = name; - name = getzname(name); - dstlen = name - dstname; /* length of DST zone name */ - } - if (*name != '\0' && *name != ',' && *name != ';') { - name = getoffset(name, &dstoffset); - if (name == NULL) - return -1; - } else dstoffset = stdoffset - SECSPERHOUR; - if (*name == '\0' && load_result != 0) - name = TZDEFRULESTRING; - if (*name == ',' || *name == ';') { - struct rule start; - struct rule end; - int year; - time_t janfirst; - time_t starttime; - time_t endtime; - - ++name; - if ((name = getrule(name, &start)) == NULL) - return -1; - if (*name++ != ',') - return -1; - if ((name = getrule(name, &end)) == NULL) - return -1; - if (*name != '\0') - return -1; - sp->typecnt = 2; /* standard time and DST */ - /* - ** Two transitions per year, from EPOCH_YEAR forward. - */ - memset(sp->ttis, 0, sizeof(sp->ttis)); - sp->ttis[0].tt_gmtoff = -dstoffset; - sp->ttis[0].tt_isdst = 1; - sp->ttis[0].tt_abbrind = (int)(stdlen + 1); - sp->ttis[1].tt_gmtoff = -stdoffset; - sp->ttis[1].tt_isdst = 0; - sp->ttis[1].tt_abbrind = 0; - atp = sp->ats; - typep = sp->types; - janfirst = 0; - sp->timecnt = 0; - for (year = EPOCH_YEAR; - sp->timecnt + 2 <= TZ_MAX_TIMES; - ++year) { - time_t newfirst; - - starttime = transtime(janfirst, year, &start, - stdoffset); - endtime = transtime(janfirst, year, &end, - dstoffset); - if (starttime > endtime) { - *atp++ = endtime; - *typep++ = 1; /* DST ends */ - *atp++ = starttime; - *typep++ = 0; /* DST begins */ - } else { - *atp++ = starttime; - *typep++ = 0; /* DST begins */ - *atp++ = endtime; - *typep++ = 1; /* DST ends */ - } - sp->timecnt += 2; - newfirst = janfirst; - newfirst += (time_t) - (year_lengths[isleap(year)] * SECSPERDAY); - if (newfirst <= janfirst) - break; - janfirst = newfirst; - } - /* - ** Get zone offsets into tzinfo (for newlib). . . - */ - if (sp == lclptr) - { - __gettzinfo ()->__tzrule[0].offset - = -sp->ttis[1].tt_gmtoff; - __gettzinfo ()->__tzrule[1].offset - = -sp->ttis[0].tt_gmtoff; - } - } else { - long theirstdoffset; - long theirdstoffset; - long theiroffset; - int isdst; - int i; - int j; - - if (*name != '\0') - return -1; - /* - ** Initial values of theirstdoffset and theirdstoffset. - */ - theirstdoffset = 0; - for (i = 0; i < sp->timecnt; ++i) { - j = sp->types[i]; - if (!sp->ttis[j].tt_isdst) { - theirstdoffset = - -sp->ttis[j].tt_gmtoff; - break; - } - } - theirdstoffset = 0; - for (i = 0; i < sp->timecnt; ++i) { - j = sp->types[i]; - if (sp->ttis[j].tt_isdst) { - theirdstoffset = - -sp->ttis[j].tt_gmtoff; - break; - } - } - /* - ** Initially we're assumed to be in standard time. - */ - isdst = FALSE; - theiroffset = theirstdoffset; - /* - ** Now juggle transition times and types - ** tracking offsets as you do. - */ - for (i = 0; i < sp->timecnt; ++i) { - j = sp->types[i]; - sp->types[i] = sp->ttis[j].tt_isdst; - if (sp->ttis[j].tt_ttisgmt) { - /* No adjustment to transition time */ - } else { - /* - ** If summer time is in effect, and the - ** transition time was not specified as - ** standard time, add the summer time - ** offset to the transition time; - ** otherwise, add the standard time - ** offset to the transition time. - */ - /* - ** Transitions from DST to DDST - ** will effectively disappear since - ** POSIX provides for only one DST - ** offset. - */ - if (isdst && !sp->ttis[j].tt_ttisstd) { - sp->ats[i] += (time_t) - (dstoffset - theirdstoffset); - } else { - sp->ats[i] += (time_t) - (stdoffset - theirstdoffset); - } - } - theiroffset = -sp->ttis[j].tt_gmtoff; - if (!sp->ttis[j].tt_isdst) - theirstdoffset = theiroffset; - else theirdstoffset = theiroffset; - } - /* - ** Finally, fill in ttis. - ** ttisstd and ttisgmt need not be handled - */ - memset(sp->ttis, 0, sizeof(sp->ttis)); - sp->ttis[0].tt_gmtoff = -stdoffset; - sp->ttis[0].tt_isdst = FALSE; - sp->ttis[0].tt_abbrind = 0; - sp->ttis[1].tt_gmtoff = -dstoffset; - sp->ttis[1].tt_isdst = TRUE; - sp->ttis[1].tt_abbrind = (int)(stdlen + 1); - sp->typecnt = 2; - /* - ** Get zone offsets into tzinfo (for newlib). . . - */ - if (sp == lclptr) - { - __gettzinfo ()->__tzrule[0].offset - = -sp->ttis[0].tt_gmtoff; - __gettzinfo ()->__tzrule[1].offset - = -sp->ttis[1].tt_gmtoff; - } - } - } else { - dstlen = 0; - sp->typecnt = 1; /* only standard time */ - sp->timecnt = 0; - memset(sp->ttis, 0, sizeof(sp->ttis)); - sp->ttis[0].tt_gmtoff = -stdoffset; - sp->ttis[0].tt_isdst = 0; - sp->ttis[0].tt_abbrind = 0; - /* - ** Get zone offsets into tzinfo (for newlib). . . - */ - if (sp == lclptr) - { - __gettzinfo ()->__tzrule[0].offset = -sp->ttis[0].tt_gmtoff; - __gettzinfo ()->__tzrule[1].offset = -sp->ttis[0].tt_gmtoff; - } - } - sp->charcnt = (int)(stdlen + 1); - if (dstlen != 0) - sp->charcnt += (int)(dstlen + 1); - if ((size_t) sp->charcnt > sizeof sp->chars) - return -1; - cp = sp->chars; - (void) strncpy(cp, stdname, stdlen); - cp += stdlen; - *cp++ = '\0'; - if (dstlen != 0) { - (void) strncpy(cp, dstname, dstlen); - *(cp + dstlen) = '\0'; - } - return 0; -} - -static void -gmtload(timezone_t sp) -{ - if (tzload(sp, gmt, TRUE) != 0) - (void) tzparse(sp, gmt, TRUE); -} - -#ifndef STD_INSPIRED -/* -** A non-static declaration of tzsetwall in a system header file -** may cause a warning about this upcoming static declaration... -*/ -static -#endif /* !defined STD_INSPIRED */ -void -tzsetwall (void) -{ - if (lcl_is_set == lcl_setting) - return; - lcl_is_set = lcl_setting; - - if (lclptr == NULL) { - save_errno save; - lclptr = (timezone_t) calloc(1, sizeof *lclptr); - if (lclptr == NULL) { - settzname(); /* all we can do */ - return; - } - } -#if defined (__CYGWIN__) - { - TIME_ZONE_INFORMATION tz; - char buf[BUFSIZ]; - char *cp, *dst; - wchar_t *src; - div_t d; - GetTimeZoneInformation(&tz); - dst = cp = buf; - for (src = tz.StandardName; *src; src++) - if (*src >= L'A' && *src <= L'Z') - *dst++ = *src; - if ((dst - cp) < 3) - { - /* In non-english Windows, converted tz.StandardName - may not contain a valid standard timezone name. */ - strcpy(cp, wildabbr); - cp += strlen(wildabbr); - } - else - cp = dst; - d = div(tz.Bias+tz.StandardBias, 60); - sprintf(cp, "%d", d.quot); - if (d.rem) - sprintf(cp=strchr(cp, 0), ":%d", abs(d.rem)); - if(tz.StandardDate.wMonth) { - cp = strchr(cp, 0); - dst = cp; - for (src = tz.DaylightName; *src; src++) - if (*src >= L'A' && *src <= L'Z') - *dst++ = *src; - if ((dst - cp) < 3) - { - /* In non-english Windows, converted tz.DaylightName - may not contain a valid daylight timezone name. */ - strcpy(cp, wildabbr); - cp += strlen(wildabbr); - } - else - cp = dst; - d = div(tz.Bias+tz.DaylightBias, 60); - sprintf(cp, "%d", d.quot); - if (d.rem) - sprintf(cp=strchr(cp, 0), ":%d", abs(d.rem)); - cp = strchr(cp, 0); - sprintf(cp=strchr(cp, 0), ",M%d.%d.%d/%d", - tz.DaylightDate.wMonth, - tz.DaylightDate.wDay, - tz.DaylightDate.wDayOfWeek, - tz.DaylightDate.wHour); - if (tz.DaylightDate.wMinute || tz.DaylightDate.wSecond) - sprintf(cp=strchr(cp, 0), ":%d", tz.DaylightDate.wMinute); - if (tz.DaylightDate.wSecond) - sprintf(cp=strchr(cp, 0), ":%d", tz.DaylightDate.wSecond); - cp = strchr(cp, 0); - sprintf(cp=strchr(cp, 0), ",M%d.%d.%d/%d", - tz.StandardDate.wMonth, - tz.StandardDate.wDay, - tz.StandardDate.wDayOfWeek, - tz.StandardDate.wHour); - if (tz.StandardDate.wMinute || tz.StandardDate.wSecond) - sprintf(cp=strchr(cp, 0), ":%d", tz.StandardDate.wMinute); - if (tz.StandardDate.wSecond) - sprintf(cp=strchr(cp, 0), ":%d", tz.StandardDate.wSecond); - } - /* printf("TZ deduced as `%s'\n", buf); */ - if (tzparse(lclptr, buf, FALSE) == 0) { - settzname(); - lcl_is_set = lcl_from_default; - strlcpy(lcl_TZname, buf, sizeof (lcl_TZname)); -#if 0 - /* Huh? POSIX doesn't mention anywhere that tzset should - set $TZ. That's not right. */ - setenv("TZ", lcl_TZname, 1); -#endif - return; - } - } -#endif - if (tzload(lclptr, NULL, TRUE) != 0) - gmtload(lclptr); - settzname(); -} - -static NO_COPY muto tzset_guard; - -#ifdef __CYGWIN__ -extern "C" -#else -#ifndef STD_INSPIRED -/* -** A non-static declaration of tzsetwall in a system header file -** may cause a warning about this upcoming static declaration... -*/ -static -#endif /* !defined STD_INSPIRED */ -#endif -void -tzset_unlocked(void) -{ - const char * name; - - name = getenv("TZ"); - if (name == NULL) { - if (lcl_is_set != lcl_from_default) - tzsetwall(); - return; - } - - if (lcl_is_set > 0 && strcmp(lcl_TZname, name) == 0) - return; - lcl_is_set = (strlen(name) < sizeof (lcl_TZname)) ? lcl_from_environment : lcl_unset; - if (lcl_is_set != lcl_unset) - (void)strlcpy(lcl_TZname, name, sizeof (lcl_TZname)); - - if (lclptr == NULL) { - save_errno save; - lclptr = (timezone_t) calloc(1, sizeof *lclptr); - if (lclptr == NULL) { - settzname(); /* all we can do */ - return; - } - } - if (*name == '\0') { - /* - ** User wants it fast rather than right. - */ - lclptr->leapcnt = 0; /* so, we're off a little */ - lclptr->timecnt = 0; - lclptr->typecnt = 0; - lclptr->ttis[0].tt_isdst = 0; - lclptr->ttis[0].tt_gmtoff = 0; - lclptr->ttis[0].tt_abbrind = 0; - (void) strlcpy(lclptr->chars, gmt, sizeof(lclptr->chars)); - } else if (tzload(lclptr, name, TRUE) != 0) - if (name[0] == ':' || tzparse(lclptr, name, FALSE) != 0) - (void) gmtload(lclptr); - settzname(); -} - -EXPORT_ALIAS (tzset_unlocked, _tzset_unlocked) - -extern "C" void -tzset(void) -{ - tzset_guard.init ("tzset_guard")->acquire (); - tzset_unlocked(); - tzset_guard.release (); -} - -/* -** The easy way to behave "as if no library function calls" localtime -** is to not call it--so we drop its guts into "localsub", which can be -** freely called. (And no, the PANS doesn't require the above behavior-- -** but it *is* desirable.) -** -** The unused offset argument is for the benefit of mktime variants. -*/ - -/*ARGSUSED*/ -static struct tm * -localsub(const timezone_t sp, const time_t * const timep, const long offset, - struct tm *const tmp) -{ - const struct ttinfo * ttisp; - int i; - struct tm * result; - const time_t t = *timep; - - if ((sp->goback && t < sp->ats[0]) || - (sp->goahead && t > sp->ats[sp->timecnt - 1])) { - time_t newt = t; - time_t seconds; - time_t tcycles; - int_fast64_t icycles; - - if (t < sp->ats[0]) - seconds = sp->ats[0] - t; - else seconds = t - sp->ats[sp->timecnt - 1]; - --seconds; - tcycles = (time_t) - (seconds / YEARSPERREPEAT / AVGSECSPERYEAR); - ++tcycles; - icycles = tcycles; - if (tcycles - icycles >= 1 || icycles - tcycles >= 1) - return NULL; - seconds = (time_t) icycles; - seconds *= YEARSPERREPEAT; - seconds *= AVGSECSPERYEAR; - if (t < sp->ats[0]) - newt += seconds; - else newt -= seconds; - if (newt < sp->ats[0] || - newt > sp->ats[sp->timecnt - 1]) - return NULL; /* "cannot happen" */ - result = localsub(sp, &newt, offset, tmp); - if (result == tmp) { - time_t newy; - - newy = tmp->tm_year; - if (t < sp->ats[0]) - newy -= (time_t)icycles * YEARSPERREPEAT; - else newy += (time_t)icycles * YEARSPERREPEAT; - tmp->tm_year = (int)newy; - if (tmp->tm_year != newy) - return NULL; - } - return result; - } - if (sp->timecnt == 0 || t < sp->ats[0]) { - i = 0; - while (sp->ttis[i].tt_isdst) - if (++i >= sp->typecnt) { - i = 0; - break; - } - } else { - int lo = 1; - int hi = sp->timecnt; - - while (lo < hi) { - int mid = (lo + hi) / 2; - - if (t < sp->ats[mid]) - hi = mid; - else lo = mid + 1; - } - i = (int) sp->types[lo - 1]; - } - ttisp = &sp->ttis[i]; - /* - ** To get (wrong) behavior that's compatible with System V Release 2.0 - ** you'd replace the statement below with - ** t += ttisp->tt_gmtoff; - ** timesub(&t, 0L, sp, tmp); - */ - result = timesub(sp, &t, ttisp->tt_gmtoff, tmp); - tmp->tm_isdst = ttisp->tt_isdst; - if (sp == lclptr) - tzname[tmp->tm_isdst] = &sp->chars[ttisp->tt_abbrind]; -#ifdef TM_ZONE - if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS) - tmp->TM_ZONE = &sp->chars[ttisp->tt_abbrind]; -#endif /* defined TM_ZONE */ - return result; -} - -/* -** Re-entrant version of localtime. -*/ -extern "C" struct tm * -localtime_r(const time_t *__restrict timep, struct tm *__restrict tmp) -{ - tzset_guard.init ("tzset_guard")->acquire (); - tzset_unlocked(); - tmp = localsub(lclptr, timep, 0L, tmp); - tzset_guard.release (); - if (tmp == NULL) - errno = EOVERFLOW; - return tmp; -} - -extern "C" struct tm * -localtime(const time_t *const timep) -{ - return localtime_r(timep, &tm); -} - -/* -** gmtsub is to gmtime as localsub is to localtime. -*/ -static NO_COPY muto gmt_guard; - -static struct tm * -gmtsub(const timezone_t sp, const time_t *const timep, const long offset, - struct tm *tmp) -{ - struct tm * result; - - gmt_guard.init ("gmt_guard")->acquire (); - if (!gmt_is_set) { - save_errno save; - gmt_is_set = TRUE; - gmtptr = (timezone_t) calloc(1, sizeof *gmtptr); - if (gmtptr != NULL) - gmtload(gmtptr); - } - gmt_guard.release (); - result = timesub(gmtptr, timep, offset, tmp); -#ifdef TM_ZONE - /* - ** Could get fancy here and deliver something such as - ** "UTC+xxxx" or "UTC-xxxx" if offset is non-zero, - ** but this is no time for a treasure hunt. - */ - if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS) - { - if (offset != 0) - tmp->TM_ZONE = wildabbr; - else { - if (gmtptr == NULL) - tmp->TM_ZONE = gmt; - else tmp->TM_ZONE = gmtptr->chars; - } - } -#endif /* defined TM_ZONE */ - return result; -} - -extern "C" struct tm * -gmtime(const time_t *const timep) -{ - struct tm *tmp = gmtsub(NULL, timep, 0L, &tm); - - if (tmp == NULL) - errno = EOVERFLOW; - - return tmp; -} - -/* -** Re-entrant version of gmtime. -*/ - -extern "C" struct tm * -gmtime_r(const time_t *__restrict const timep, struct tm *__restrict tmp) -{ - tmp = gmtsub(NULL, timep, 0L, tmp); - - if (tmp == NULL) - errno = EOVERFLOW; - - return tmp; -} - -#ifdef STD_INSPIRED - -extern "C" struct tm * -offtime(const time_t *const timep, long offset) -{ - struct tm *tmp = gmtsub(NULL, timep, offset, &tm); - - if (tmp == NULL) - errno = EOVERFLOW; - - return tmp; -} - -#endif /* defined STD_INSPIRED */ - -/* -** Return the number of leap years through the end of the given year -** where, to make the math easy, the answer for year zero is defined as zero. -*/ - -static int -leaps_thru_end_of(const int y) -{ - return (y >= 0) ? (y / 4 - y / 100 + y / 400) : - -(leaps_thru_end_of(-(y + 1)) + 1); -} - -static struct tm * -timesub(const timezone_t sp, const time_t *const timep, const long offset, - struct tm *const tmp) -{ - const struct lsinfo * lp; - time_t tdays; - int idays; /* unsigned would be so 2003 */ - long rem; - int y; - const int * ip; - long corr; - int hit; - int i; - - corr = 0; - hit = 0; - i = (sp == NULL) ? 0 : sp->leapcnt; - while (--i >= 0) { - lp = &sp->lsis[i]; - if (*timep >= lp->ls_trans) { - if (*timep == lp->ls_trans) { - hit = ((i == 0 && lp->ls_corr > 0) || - lp->ls_corr > sp->lsis[i - 1].ls_corr); - if (hit) - while (i > 0 && - sp->lsis[i].ls_trans == - sp->lsis[i - 1].ls_trans + 1 && - sp->lsis[i].ls_corr == - sp->lsis[i - 1].ls_corr + 1) { - ++hit; - --i; - } - } - corr = lp->ls_corr; - break; - } - } - y = EPOCH_YEAR; - tdays = (time_t)(*timep / SECSPERDAY); - rem = (long) (*timep - tdays * SECSPERDAY); - while (tdays < 0 || tdays >= year_lengths[isleap(y)]) { - int newy; - time_t tdelta; - int idelta; - int leapdays; - - tdelta = tdays / DAYSPERLYEAR; - idelta = (int) tdelta; - if (tdelta - idelta >= 1 || idelta - tdelta >= 1) - return NULL; - if (idelta == 0) - idelta = (tdays < 0) ? -1 : 1; - newy = y; - if (increment_overflow(&newy, idelta)) - return NULL; - leapdays = leaps_thru_end_of(newy - 1) - - leaps_thru_end_of(y - 1); - tdays -= ((time_t) newy - y) * DAYSPERNYEAR; - tdays -= leapdays; - y = newy; - } - { - long seconds; - - seconds = tdays * SECSPERDAY + 0.5; - tdays = (time_t)(seconds / SECSPERDAY); - rem += (long) (seconds - tdays * SECSPERDAY); - } - /* - ** Given the range, we can now fearlessly cast... - */ - idays = (int) tdays; - rem += offset - corr; - while (rem < 0) { - rem += SECSPERDAY; - --idays; - } - while (rem >= SECSPERDAY) { - rem -= SECSPERDAY; - ++idays; - } - while (idays < 0) { - if (increment_overflow(&y, -1)) - return NULL; - idays += year_lengths[isleap(y)]; - } - while (idays >= year_lengths[isleap(y)]) { - idays -= year_lengths[isleap(y)]; - if (increment_overflow(&y, 1)) - return NULL; - } - tmp->tm_year = y; - if (increment_overflow(&tmp->tm_year, -TM_YEAR_BASE)) - return NULL; - tmp->tm_yday = idays; - /* - ** The "extra" mods below avoid overflow problems. - */ - tmp->tm_wday = EPOCH_WDAY + - ((y - EPOCH_YEAR) % DAYSPERWEEK) * - (DAYSPERNYEAR % DAYSPERWEEK) + - leaps_thru_end_of(y - 1) - - leaps_thru_end_of(EPOCH_YEAR - 1) + - idays; - tmp->tm_wday %= DAYSPERWEEK; - if (tmp->tm_wday < 0) - tmp->tm_wday += DAYSPERWEEK; - tmp->tm_hour = (int) (rem / SECSPERHOUR); - rem %= SECSPERHOUR; - tmp->tm_min = (int) (rem / SECSPERMIN); - /* - ** A positive leap second requires a special - ** representation. This uses "... ??:59:60" et seq. - */ - tmp->tm_sec = (int) (rem % SECSPERMIN) + hit; - ip = mon_lengths[isleap(y)]; - for (tmp->tm_mon = 0; idays >= ip[tmp->tm_mon]; ++(tmp->tm_mon)) - idays -= ip[tmp->tm_mon]; - tmp->tm_mday = (int) (idays + 1); - tmp->tm_isdst = 0; -#ifdef TM_GMTOFF - if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS) - tmp->TM_GMTOFF = offset; -#endif /* defined TM_GMTOFF */ - return tmp; -} - -extern "C" char * -ctime(const time_t *const timep) -{ -/* -** Section 4.12.3.2 of X3.159-1989 requires that -** The ctime function converts the calendar time pointed to by timer -** to local time in the form of a string. It is equivalent to -** asctime(localtime(timer)) -*/ - struct tm *rtm = localtime(timep); - if (rtm == NULL) - return NULL; - return asctime(rtm); -} - -extern "C" char * -ctime_r(const time_t *const timep, char *buf) -{ - struct tm mytm, *rtm; - - rtm = localtime_r(timep, &mytm); - if (rtm == NULL) - return NULL; - return asctime_r(rtm, buf); -} - -/* -** Adapted from code provided by Robert Elz, who writes: -** The "best" way to do mktime I think is based on an idea of Bob -** Kridle's (so its said...) from a long time ago. -** It does a binary search of the time_t space. Since time_t's are -** just 32 bits, its a max of 32 iterations (even at 64 bits it -** would still be very reasonable). -*/ - -#ifndef WRONG -#define WRONG ((time_t)-1) -#endif /* !defined WRONG */ - -/* -** Simplified normalize logic courtesy Paul Eggert. -*/ - -static int -increment_overflow(int *const ip, int j) -{ - int i = *ip; - - /* - ** If i >= 0 there can only be overflow if i + j > INT_MAX - ** or if j > INT_MAX - i; given i >= 0, INT_MAX - i cannot overflow. - ** If i < 0 there can only be overflow if i + j < INT_MIN - ** or if j < INT_MIN - i; given i < 0, INT_MIN - i cannot overflow. - */ - if ((i >= 0) ? (j > INT_MAX - i) : (j < INT_MIN - i)) - return TRUE; - *ip += j; - return FALSE; -} - -static int -long_increment_overflow(long *const lp, int m) -{ - long l = *lp; - - if ((l >= 0) ? (m > LONG_MAX - l) : (m < LONG_MIN - l)) - return TRUE; - *lp += m; - return FALSE; -} - -static int -normalize_overflow(int *const tensptr, int *const unitsptr, const int base) -{ - int tensdelta; - - tensdelta = (*unitsptr >= 0) ? - (*unitsptr / base) : - (-1 - (-1 - *unitsptr) / base); - *unitsptr -= tensdelta * base; - return increment_overflow(tensptr, tensdelta); -} - -static int -long_normalize_overflow(long *const tensptr, int *const unitsptr, - const int base) -{ - int tensdelta; - - tensdelta = (*unitsptr >= 0) ? - (*unitsptr / base) : - (-1 - (-1 - *unitsptr) / base); - *unitsptr -= tensdelta * base; - return long_increment_overflow(tensptr, tensdelta); -} - -static int -tmcomp(const struct tm *const atmp, const struct tm *const btmp) -{ - int result; - - if ((result = (atmp->tm_year - btmp->tm_year)) == 0 && - (result = (atmp->tm_mon - btmp->tm_mon)) == 0 && - (result = (atmp->tm_mday - btmp->tm_mday)) == 0 && - (result = (atmp->tm_hour - btmp->tm_hour)) == 0 && - (result = (atmp->tm_min - btmp->tm_min)) == 0) - result = atmp->tm_sec - btmp->tm_sec; - return result; -} - -static time_t -time2sub(const timezone_t sp, struct tm *const tmp, subfun_t funcp, - const long offset, int *const okayp, const int do_norm_secs) -{ - int dir; - int i, j; - int saved_seconds; - long li; - time_t lo; - time_t hi; -#ifdef NO_ERROR_IN_DST_GAP - time_t ilo; -#endif - long y; - time_t newt; - time_t t; - struct tm yourtm, mytm; - - *okayp = FALSE; - yourtm = *tmp; -#ifdef NO_ERROR_IN_DST_GAP -again: -#endif - if (do_norm_secs) { - if (normalize_overflow(&yourtm.tm_min, &yourtm.tm_sec, - SECSPERMIN)) - goto overflow; - } - if (normalize_overflow(&yourtm.tm_hour, &yourtm.tm_min, MINSPERHOUR)) - goto overflow; - if (normalize_overflow(&yourtm.tm_mday, &yourtm.tm_hour, HOURSPERDAY)) - goto overflow; - y = yourtm.tm_year; - if (long_normalize_overflow(&y, &yourtm.tm_mon, MONSPERYEAR)) - goto overflow; - /* - ** Turn y into an actual year number for now. - ** It is converted back to an offset from TM_YEAR_BASE later. - */ - if (long_increment_overflow(&y, TM_YEAR_BASE)) - goto overflow; - while (yourtm.tm_mday <= 0) { - if (long_increment_overflow(&y, -1)) - goto overflow; - li = y + (1 < yourtm.tm_mon); - yourtm.tm_mday += year_lengths[isleap(li)]; - } - while (yourtm.tm_mday > DAYSPERLYEAR) { - li = y + (1 < yourtm.tm_mon); - yourtm.tm_mday -= year_lengths[isleap(li)]; - if (long_increment_overflow(&y, 1)) - goto overflow; - } - for ( ; ; ) { - i = mon_lengths[isleap(y)][yourtm.tm_mon]; - if (yourtm.tm_mday <= i) - break; - yourtm.tm_mday -= i; - if (++yourtm.tm_mon >= MONSPERYEAR) { - yourtm.tm_mon = 0; - if (long_increment_overflow(&y, 1)) - goto overflow; - } - } - if (long_increment_overflow(&y, -TM_YEAR_BASE)) - goto overflow; - yourtm.tm_year = (int)y; - if (yourtm.tm_year != y) - goto overflow; - if (yourtm.tm_sec >= 0 && yourtm.tm_sec < SECSPERMIN) - saved_seconds = 0; - else if (y + TM_YEAR_BASE < EPOCH_YEAR) { - /* - ** We can't set tm_sec to 0, because that might push the - ** time below the minimum representable time. - ** Set tm_sec to 59 instead. - ** This assumes that the minimum representable time is - ** not in the same minute that a leap second was deleted from, - ** which is a safer assumption than using 58 would be. - */ - if (increment_overflow(&yourtm.tm_sec, 1 - SECSPERMIN)) - goto overflow; - saved_seconds = yourtm.tm_sec; - yourtm.tm_sec = SECSPERMIN - 1; - } else { - saved_seconds = yourtm.tm_sec; - yourtm.tm_sec = 0; - } - /* - ** Do a binary search (this works whatever time_t's type is). - */ - /* LINTED const not */ - if (!TYPE_SIGNED(time_t)) { - lo = 0; - hi = lo - 1; - /* LINTED const not */ - } else { - lo = 1; - for (i = 0; i < (int) TYPE_BIT(time_t) - 1; ++i) - lo *= 2; - hi = -(lo + 1); - } -#ifdef NO_ERROR_IN_DST_GAP - ilo = lo; -#endif - for ( ; ; ) { - t = lo / 2 + hi / 2; - if (t < lo) - t = lo; - else if (t > hi) - t = hi; - if ((*funcp)(sp, &t, offset, &mytm) == NULL) { - /* - ** Assume that t is too extreme to be represented in - ** a struct tm; arrange things so that it is less - ** extreme on the next pass. - */ - dir = (t > 0) ? 1 : -1; - } else dir = tmcomp(&mytm, &yourtm); - if (dir != 0) { - if (t == lo) { - ++t; - if (t <= lo) - goto overflow; - ++lo; - } else if (t == hi) { - --t; - if (t >= hi) - goto overflow; - --hi; - } -#ifdef NO_ERROR_IN_DST_GAP - if (ilo != lo && lo - 1 == hi && yourtm.tm_isdst < 0 && - do_norm_secs) { - for (i = sp->typecnt - 1; i >= 0; --i) { - for (j = sp->typecnt - 1; j >= 0; --j) { - time_t off; - if (sp->ttis[j].tt_isdst == - sp->ttis[i].tt_isdst) - continue; - off = sp->ttis[j].tt_gmtoff - - sp->ttis[i].tt_gmtoff; - yourtm.tm_sec += off < 0 ? - -off : off; - goto again; - } - } - } -#endif - if (lo > hi) - goto invalid; - if (dir > 0) - hi = t; - else lo = t; - continue; - } - if (yourtm.tm_isdst < 0 || mytm.tm_isdst == yourtm.tm_isdst) - break; - /* - ** Right time, wrong type. - ** Hunt for right time, right type. - ** It's okay to guess wrong since the guess - ** gets checked. - */ - if (sp == NULL) - goto invalid; - for (i = sp->typecnt - 1; i >= 0; --i) { - if (sp->ttis[i].tt_isdst != yourtm.tm_isdst) - continue; - for (j = sp->typecnt - 1; j >= 0; --j) { - if (sp->ttis[j].tt_isdst == yourtm.tm_isdst) - continue; - newt = (time_t)(t + sp->ttis[j].tt_gmtoff - - sp->ttis[i].tt_gmtoff); - if ((*funcp)(sp, &newt, offset, &mytm) == NULL) - continue; - if (tmcomp(&mytm, &yourtm) != 0) - continue; - if (mytm.tm_isdst != yourtm.tm_isdst) - continue; - /* - ** We have a match. - */ - t = newt; - goto label; - } - } - goto invalid; - } -label: - newt = t + saved_seconds; - if ((newt < t) != (saved_seconds < 0)) - goto overflow; - t = newt; - if ((*funcp)(sp, &t, offset, tmp)) { - *okayp = TRUE; - return t; - } -overflow: - errno = EOVERFLOW; - return WRONG; -invalid: - errno = EINVAL; - return WRONG; -} - -static time_t -time2(const timezone_t sp, struct tm *const tmp, subfun_t funcp, - const long offset, int *const okayp) -{ - time_t t; - - /* - ** First try without normalization of seconds - ** (in case tm_sec contains a value associated with a leap second). - ** If that fails, try with normalization of seconds. - */ - t = time2sub(sp, tmp, funcp, offset, okayp, FALSE); - return *okayp ? t : time2sub(sp, tmp, funcp, offset, okayp, TRUE); -} - -static time_t -time1(const timezone_t sp, struct tm *const tmp, subfun_t funcp, - const long offset) -{ - time_t t; - int samei, otheri; - int sameind, otherind; - int i; - int nseen; - int seen[TZ_MAX_TYPES]; - int types[TZ_MAX_TYPES]; - int okay; - - if (tmp == NULL) { - errno = EINVAL; - return WRONG; - } - if (tmp->tm_isdst > 1) - tmp->tm_isdst = 1; - t = time2(sp, tmp, funcp, offset, &okay); -#ifdef PCTS - /* - ** PCTS code courtesy Grant Sullivan. - */ - if (okay) - return t; - if (tmp->tm_isdst < 0) - tmp->tm_isdst = 0; /* reset to std and try again */ -#endif /* defined PCTS */ -#ifndef PCTS - if (okay || tmp->tm_isdst < 0) - return t; -#endif /* !defined PCTS */ - /* - ** We're supposed to assume that somebody took a time of one type - ** and did some math on it that yielded a "struct tm" that's bad. - ** We try to divine the type they started from and adjust to the - ** type they need. - */ - if (sp == NULL) { - errno = EINVAL; - return WRONG; - } - for (i = 0; i < sp->typecnt; ++i) - seen[i] = FALSE; - nseen = 0; - for (i = sp->timecnt - 1; i >= 0; --i) - if (!seen[sp->types[i]]) { - seen[sp->types[i]] = TRUE; - types[nseen++] = sp->types[i]; - } - for (sameind = 0; sameind < nseen; ++sameind) { - samei = types[sameind]; - if (sp->ttis[samei].tt_isdst != tmp->tm_isdst) - continue; - for (otherind = 0; otherind < nseen; ++otherind) { - otheri = types[otherind]; - if (sp->ttis[otheri].tt_isdst == tmp->tm_isdst) - continue; - tmp->tm_sec += (int)(sp->ttis[otheri].tt_gmtoff - - sp->ttis[samei].tt_gmtoff); - tmp->tm_isdst = !tmp->tm_isdst; - t = time2(sp, tmp, funcp, offset, &okay); - if (okay) - return t; - tmp->tm_sec -= (int)(sp->ttis[otheri].tt_gmtoff - - sp->ttis[samei].tt_gmtoff); - tmp->tm_isdst = !tmp->tm_isdst; - } - } - errno = EOVERFLOW; - return WRONG; -} - -extern "C" time_t -mktime(struct tm *const tmp) -{ - time_t result; - - tzset_guard.init ("tzset_guard")->acquire (); - tzset_unlocked(); - result = time1(lclptr, tmp, localsub, 0L); - tzset_guard.release (); - return result; -} - -#ifdef STD_INSPIRED - -extern "C" time_t -timelocal(struct tm *const tmp) -{ - if (tmp != NULL) - tmp->tm_isdst = -1; /* in case it wasn't initialized */ - return mktime(tmp); -} - -extern "C" time_t -timegm(struct tm *const tmp) -{ - time_t t; - - if (tmp != NULL) - tmp->tm_isdst = 0; - t = time1(gmtptr, tmp, gmtsub, 0L); - return t; -} - -extern "C" time_t -timeoff(struct tm *const tmp, const long offset) -{ - time_t t; - - if (tmp != NULL) - tmp->tm_isdst = 0; - t = time1(gmtptr, tmp, gmtsub, offset); - return t; -} - -#endif /* defined STD_INSPIRED */ - -#ifdef CMUCS - -/* -** The following is supplied for compatibility with -** previous versions of the CMUCS runtime library. -*/ - -extern "C" long -gtime(struct tm *const tmp) -{ - const time_t t = mktime(tmp); - - if (t == WRONG) - return -1; - return t; -} - -#endif /* defined CMUCS */ - -/* -** XXX--is the below the right way to conditionalize?? -*/ - -#ifdef STD_INSPIRED - -/* -** IEEE Std 1003.1-1988 (POSIX) legislates that 536457599 -** shall correspond to "Wed Dec 31 23:59:59 UTC 1986", which -** is not the case if we are accounting for leap seconds. -** So, we provide the following conversion routines for use -** when exchanging timestamps with POSIX conforming systems. -*/ - -static long -leapcorr(const timezone_t sp, time_t *timep) -{ - struct lsinfo * lp; - int i; - - i = sp->leapcnt; - while (--i >= 0) { - lp = &sp->lsis[i]; - if (*timep >= lp->ls_trans) - return lp->ls_corr; - } - return 0; -} - -extern "C" time_t -time2posix(time_t t) -{ - time_t result; - tzset_guard.init ("tzset_guard")->acquire (); - tzset_unlocked(); - result = t - leapcorr(lclptr, &t); - tzset_guard.release (); - return (result); -} - -extern "C" time_t -posix2time(time_t t) -{ - time_t x; - time_t y; - - tzset_guard.init ("tzset_guard")->acquire (); - tzset_unlocked(); - /* - ** For a positive leap second hit, the result - ** is not unique. For a negative leap second - ** hit, the corresponding time doesn't exist, - ** so we return an adjacent second. - */ - x = (time_t)(t + leapcorr(lclptr, &t)); - y = (time_t)(x - leapcorr(lclptr, &x)); - if (y < t) { - do { - x++; - y = (time_t)(x - leapcorr(lclptr, &x)); - } while (y < t); - if (t != y) { - return x - 1; - } - } else if (y > t) { - do { - --x; - y = (time_t)(x - leapcorr(lclptr, &x)); - } while (y > t); - if (t != y) { - return x + 1; - } - } - tzset_guard.release (); - return x; -} - -#endif /* defined STD_INSPIRED */ - -extern "C" long -__cygwin_gettzoffset (const struct tm *tmp) -{ -#ifdef TM_GMTOFF - if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS) - return tmp->TM_GMTOFF; -#endif /* defined TM_GMTOFF */ - __tzinfo_type *tz = __gettzinfo (); - /* The sign of this is exactly opposite the envvar TZ. We - could directly use the global _timezone for tm_isdst==0, - but have to use __tzrule for daylight savings. */ - long offset = -tz->__tzrule[tmp->tm_isdst > 0].offset; - return offset; -} - -extern "C" const char * -__cygwin_gettzname (const struct tm *tmp) -{ -#ifdef TM_ZONE - if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS) - return tmp->TM_ZONE; -#endif - return _tzname[tmp->tm_isdst > 0]; -} diff --git a/winsup/cygwin/tz_posixrules.h b/winsup/cygwin/tz_posixrules.h deleted file mode 100644 index dea668e2f..000000000 --- a/winsup/cygwin/tz_posixrules.h +++ /dev/null @@ -1,48 +0,0 @@ -/* generated with bin2h from zoneinfo/posixrules */ - -static NO_COPY unsigned char _posixrules_data[] = { -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0, -0,1,16,0,0,0,2,0,0,0,8,0,151,254,240,1,135,225,224,2,119,224,240,3,112,254,96,4,96,253,112,5,80, -224,96,6,64,223,112,7,48,194,96,7,141,25,112,9,16,164,96,9,173,148,240,10,240,134,96,11,224,133,112,12,217,162, -224,13,192,103,112,14,185,132,224,15,169,131,240,16,153,102,224,17,137,101,240,18,121,72,224,19,105,71,240,20,89,42,224, -21,73,41,240,22,57,12,224,23,41,11,240,24,34,41,96,25,8,237,240,26,2,11,96,26,242,10,112,27,225,237,96,28, -209,236,112,29,193,207,96,30,177,206,112,31,161,177,96,32,118,0,240,33,129,147,96,34,85,226,240,35,106,175,224,36,53, -196,240,37,74,145,224,38,21,166,240,39,42,115,224,39,254,195,112,41,10,85,224,41,222,165,112,42,234,55,224,43,190,135, -112,44,211,84,96,45,158,105,112,46,179,54,96,47,126,75,112,48,147,24,96,49,103,103,240,50,114,250,96,51,71,73,240, -52,82,220,96,53,39,43,240,54,50,190,96,55,7,13,240,56,27,218,224,56,230,239,240,57,251,188,224,58,198,209,240,59, -219,158,224,60,175,238,112,61,187,128,224,62,143,208,112,63,155,98,224,64,111,178,112,65,132,127,96,66,79,148,112,67,100, -97,96,68,47,118,112,69,68,67,96,70,15,88,112,71,36,37,96,71,248,116,240,73,4,7,96,73,216,86,240,74,227,233, -96,75,184,56,240,76,205,5,224,77,152,26,240,78,172,231,224,79,119,252,240,80,140,201,224,81,97,25,112,82,108,171,224, -83,64,251,112,84,76,141,224,85,32,221,112,86,44,111,224,87,0,191,112,88,21,140,96,88,224,161,112,89,245,110,96,90, -192,131,112,91,213,80,96,92,169,159,240,93,181,50,96,94,137,129,240,95,149,20,96,96,105,99,240,97,126,48,224,98,73, -69,240,99,94,18,224,100,41,39,240,101,61,244,224,102,18,68,112,103,29,214,224,103,242,38,112,104,253,184,224,105,210,8, -112,106,221,154,224,107,177,234,112,108,198,183,96,109,145,204,112,110,166,153,96,111,113,174,112,112,134,123,96,113,90,202,240, -114,102,93,96,115,58,172,240,116,70,63,96,117,26,142,240,118,47,91,224,118,250,112,240,120,15,61,224,120,218,82,240,121, -239,31,224,122,186,52,240,123,207,1,224,124,163,81,112,125,174,227,224,126,131,51,112,127,142,197,224,128,99,21,112,129,119, -226,96,130,66,247,112,131,87,196,96,132,34,217,112,133,55,166,96,134,11,245,240,135,23,136,96,135,235,215,240,136,247,106, -96,137,203,185,240,138,215,76,96,139,171,155,240,140,192,104,224,141,139,125,240,142,160,74,224,143,107,95,240,144,128,44,224, -145,84,124,112,146,96,14,224,147,52,94,112,148,63,240,224,149,20,64,112,150,41,13,96,150,244,34,112,152,8,239,96,152, -212,4,112,153,232,209,96,154,189,32,240,155,200,179,96,156,157,2,240,157,168,149,96,158,124,228,240,159,136,119,96,160,92, -198,240,161,113,147,224,162,60,168,240,163,81,117,224,164,28,138,240,165,49,87,224,166,5,167,112,167,17,57,224,167,229,137, -112,168,241,27,224,169,197,107,112,170,218,56,96,171,165,77,112,172,186,26,96,173,133,47,112,174,153,252,96,175,101,17,112, -176,121,222,96,177,78,45,240,178,89,192,96,179,46,15,240,180,57,162,96,181,13,241,240,182,34,190,224,182,237,211,240,184, -2,160,224,184,205,181,240,185,226,130,224,186,182,210,112,187,194,100,224,188,150,180,112,189,162,70,224,190,118,150,112,191,130, -40,224,192,86,120,112,193,107,69,96,194,54,90,112,195,75,39,96,196,22,60,112,197,43,9,96,197,255,88,240,199,10,235, -96,199,223,58,240,200,234,205,96,201,191,28,240,202,211,233,224,203,158,254,240,204,179,203,224,205,126,224,240,206,147,173,224, -207,103,253,112,208,115,143,224,209,71,223,112,210,83,113,224,211,39,193,112,212,51,83,224,213,7,163,112,214,28,112,96,214, -231,133,112,215,252,82,96,216,199,103,112,217,220,52,96,218,176,131,240,219,188,22,96,220,144,101,240,221,155,248,96,222,112, -71,240,223,133,20,224,224,80,41,240,225,100,246,224,226,48,11,240,227,68,216,224,228,15,237,240,229,36,186,224,229,249,10, -112,231,4,156,224,231,216,236,112,232,228,126,224,233,184,206,112,234,205,155,96,235,152,176,112,236,173,125,96,237,120,146,112, -238,141,95,96,239,97,174,240,240,109,65,96,241,65,144,240,242,77,35,96,243,33,114,240,244,45,5,96,245,1,84,240,246, -22,33,224,246,225,54,240,247,246,3,224,248,193,24,240,249,213,229,224,250,160,250,240,251,181,199,224,252,138,23,112,253,149, -169,224,254,105,249,112,255,117,139,224,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, -1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, -0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, -1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, -0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, -1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, -0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, -1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, -0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,255,255,199,192,1,0,255,255,185,176,0,4,69,68,84, -0,69,83,84,0,0,0 -}; From 2452e0b806c547a7a034d32fb6fae5b1c1ca810d Mon Sep 17 00:00:00 2001 From: Mark Geisert Date: Fri, 22 May 2020 02:32:52 -0700 Subject: [PATCH 364/520] Cygwin: tzcode resync: imports Import most recent NetBSD localtime.c, private.h, and tzfile.h. An empty namespace.h suffices for Cygwin. --- winsup/cygwin/tzcode/localtime.c | 2493 ++++++++++++++++++++++++++++++ winsup/cygwin/tzcode/namespace.h | 0 winsup/cygwin/tzcode/private.h | 795 ++++++++++ winsup/cygwin/tzcode/tzfile.h | 174 +++ 4 files changed, 3462 insertions(+) create mode 100644 winsup/cygwin/tzcode/localtime.c create mode 100644 winsup/cygwin/tzcode/namespace.h create mode 100644 winsup/cygwin/tzcode/private.h create mode 100644 winsup/cygwin/tzcode/tzfile.h diff --git a/winsup/cygwin/tzcode/localtime.c b/winsup/cygwin/tzcode/localtime.c new file mode 100644 index 000000000..a4d02a4c7 --- /dev/null +++ b/winsup/cygwin/tzcode/localtime.c @@ -0,0 +1,2493 @@ +/* $NetBSD: localtime.c,v 1.122 2019/07/03 15:50:16 christos Exp $ */ + +/* Convert timestamp from time_t to struct tm. */ + +/* +** This file is in the public domain, so clarified as of +** 1996-06-05 by Arthur David Olson. +*/ + +#include +#if defined(LIBC_SCCS) && !defined(lint) +#if 0 +static char elsieid[] = "@(#)localtime.c 8.17"; +#else +__RCSID("$NetBSD: localtime.c,v 1.122 2019/07/03 15:50:16 christos Exp $"); +#endif +#endif /* LIBC_SCCS and not lint */ + +/* +** Leap second handling from Bradley White. +** POSIX-style TZ environment variable handling from Guy Harris. +*/ + +/*LINTLIBRARY*/ + +#include "namespace.h" +#include +#define LOCALTIME_IMPLEMENTATION +#include "private.h" + +#include "tzfile.h" +#include + +#if NETBSD_INSPIRED +# define NETBSD_INSPIRED_EXTERN +#else +# define NETBSD_INSPIRED_EXTERN static +#endif + +#if defined(__weak_alias) +__weak_alias(daylight,_daylight) +__weak_alias(tzname,_tzname) +#endif + +#ifndef TZ_ABBR_MAX_LEN +#define TZ_ABBR_MAX_LEN 16 +#endif /* !defined TZ_ABBR_MAX_LEN */ + +#ifndef TZ_ABBR_CHAR_SET +#define TZ_ABBR_CHAR_SET \ + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 :+-._" +#endif /* !defined TZ_ABBR_CHAR_SET */ + +#ifndef TZ_ABBR_ERR_CHAR +#define TZ_ABBR_ERR_CHAR '_' +#endif /* !defined TZ_ABBR_ERR_CHAR */ + +/* +** SunOS 4.1.1 headers lack O_BINARY. +*/ + +#ifdef O_BINARY +#define OPEN_MODE (O_RDONLY | O_BINARY | O_CLOEXEC) +#endif /* defined O_BINARY */ +#ifndef O_BINARY +#define OPEN_MODE (O_RDONLY | O_CLOEXEC) +#endif /* !defined O_BINARY */ + +#ifndef WILDABBR +/* +** Someone might make incorrect use of a time zone abbreviation: +** 1. They might reference tzname[0] before calling tzset (explicitly +** or implicitly). +** 2. They might reference tzname[1] before calling tzset (explicitly +** or implicitly). +** 3. They might reference tzname[1] after setting to a time zone +** in which Daylight Saving Time is never observed. +** 4. They might reference tzname[0] after setting to a time zone +** in which Standard Time is never observed. +** 5. They might reference tm.TM_ZONE after calling offtime. +** What's best to do in the above cases is open to debate; +** for now, we just set things up so that in any of the five cases +** WILDABBR is used. Another possibility: initialize tzname[0] to the +** string "tzname[0] used before set", and similarly for the other cases. +** And another: initialize tzname[0] to "ERA", with an explanation in the +** manual page of what this "time zone abbreviation" means (doing this so +** that tzname[0] has the "normal" length of three characters). +*/ +#define WILDABBR " " +#endif /* !defined WILDABBR */ + +static const char wildabbr[] = WILDABBR; + +static const char gmt[] = "GMT"; + +/* +** The DST rules to use if TZ has no rules and we can't load TZDEFRULES. +** Default to US rules as of 2017-05-07. +** POSIX does not specify the default DST rules; +** for historical reasons, US rules are a common default. +*/ +#ifndef TZDEFRULESTRING +#define TZDEFRULESTRING ",M3.2.0,M11.1.0" +#endif + +struct ttinfo { /* time type information */ + int_fast32_t tt_utoff; /* UT offset in seconds */ + bool tt_isdst; /* used to set tm_isdst */ + int tt_desigidx; /* abbreviation list index */ + bool tt_ttisstd; /* transition is std time */ + bool tt_ttisut; /* transition is UT */ +}; + +struct lsinfo { /* leap second information */ + time_t ls_trans; /* transition time */ + int_fast64_t ls_corr; /* correction to apply */ +}; + +#define SMALLEST(a, b) (((a) < (b)) ? (a) : (b)) +#define BIGGEST(a, b) (((a) > (b)) ? (a) : (b)) + +#ifdef TZNAME_MAX +#define MY_TZNAME_MAX TZNAME_MAX +#endif /* defined TZNAME_MAX */ +#ifndef TZNAME_MAX +#define MY_TZNAME_MAX 255 +#endif /* !defined TZNAME_MAX */ + +#define state __state +struct state { + int leapcnt; + int timecnt; + int typecnt; + int charcnt; + bool goback; + bool goahead; + time_t ats[TZ_MAX_TIMES]; + unsigned char types[TZ_MAX_TIMES]; + struct ttinfo ttis[TZ_MAX_TYPES]; + char chars[/*CONSTCOND*/BIGGEST(BIGGEST(TZ_MAX_CHARS + 1, + sizeof gmt), (2 * (MY_TZNAME_MAX + 1)))]; + struct lsinfo lsis[TZ_MAX_LEAPS]; + + /* The time type to use for early times or if no transitions. + It is always zero for recent tzdb releases. + It might be nonzero for data from tzdb 2018e or earlier. */ + int defaulttype; +}; + +enum r_type { + JULIAN_DAY, /* Jn = Julian day */ + DAY_OF_YEAR, /* n = day of year */ + MONTH_NTH_DAY_OF_WEEK /* Mm.n.d = month, week, day of week */ +}; + +struct rule { + enum r_type r_type; /* type of rule */ + int r_day; /* day number of rule */ + int r_week; /* week number of rule */ + int r_mon; /* month number of rule */ + int_fast32_t r_time; /* transition time of rule */ +}; + +static struct tm *gmtsub(struct state const *, time_t const *, int_fast32_t, + struct tm *); +static bool increment_overflow(int *, int); +static bool increment_overflow_time(time_t *, int_fast32_t); +static bool normalize_overflow32(int_fast32_t *, int *, int); +static struct tm *timesub(time_t const *, int_fast32_t, struct state const *, + struct tm *); +static bool typesequiv(struct state const *, int, int); +static bool tzparse(char const *, struct state *, bool); + +static timezone_t gmtptr; + +#ifndef TZ_STRLEN_MAX +#define TZ_STRLEN_MAX 255 +#endif /* !defined TZ_STRLEN_MAX */ + +static char lcl_TZname[TZ_STRLEN_MAX + 1]; +static int lcl_is_set; + + +#if !defined(__LIBC12_SOURCE__) +timezone_t __lclptr; +#ifdef _REENTRANT +rwlock_t __lcl_lock = RWLOCK_INITIALIZER; +#endif +#endif + +/* +** Section 4.12.3 of X3.159-1989 requires that +** Except for the strftime function, these functions [asctime, +** ctime, gmtime, localtime] return values in one of two static +** objects: a broken-down time structure and an array of char. +** Thanks to Paul Eggert for noting this. +*/ + +static struct tm tm; + +#if !HAVE_POSIX_DECLS || TZ_TIME_T || defined(__NetBSD__) +# if !defined(__LIBC12_SOURCE__) + +__aconst char * tzname[2] = { + (__aconst char *)__UNCONST(wildabbr), + (__aconst char *)__UNCONST(wildabbr) +}; + +# else + +extern __aconst char * tzname[2]; + +# endif /* __LIBC12_SOURCE__ */ + +# if USG_COMPAT +# if !defined(__LIBC12_SOURCE__) +long timezone = 0; +int daylight = 0; +# else +extern int daylight; +extern long timezone __RENAME(__timezone13); +# endif /* __LIBC12_SOURCE__ */ +# endif /* defined USG_COMPAT */ + +# ifdef ALTZONE +long altzone = 0; +# endif /* defined ALTZONE */ +#endif /* !HAVE_POSIX_DECLS */ + +/* Initialize *S to a value based on UTOFF, ISDST, and DESIGIDX. */ +static void +init_ttinfo(struct ttinfo *s, int_fast32_t utoff, bool isdst, int desigidx) +{ + s->tt_utoff = utoff; + s->tt_isdst = isdst; + s->tt_desigidx = desigidx; + s->tt_ttisstd = false; + s->tt_ttisut = false; +} + +static int_fast32_t +detzcode(const char *const codep) +{ + int_fast32_t result; + int i; + int_fast32_t one = 1; + int_fast32_t halfmaxval = one << (32 - 2); + int_fast32_t maxval = halfmaxval - 1 + halfmaxval; + int_fast32_t minval = -1 - maxval; + + result = codep[0] & 0x7f; + for (i = 1; i < 4; ++i) + result = (result << 8) | (codep[i] & 0xff); + + if (codep[0] & 0x80) { + /* Do two's-complement negation even on non-two's-complement machines. + If the result would be minval - 1, return minval. */ + result -= !TWOS_COMPLEMENT(int_fast32_t) && result != 0; + result += minval; + } + return result; +} + +static int_fast64_t +detzcode64(const char *const codep) +{ + int_fast64_t result; + int i; + int_fast64_t one = 1; + int_fast64_t halfmaxval = one << (64 - 2); + int_fast64_t maxval = halfmaxval - 1 + halfmaxval; + int_fast64_t minval = -TWOS_COMPLEMENT(int_fast64_t) - maxval; + + result = codep[0] & 0x7f; + for (i = 1; i < 8; ++i) + result = (result << 8) | (codep[i] & 0xff); + + if (codep[0] & 0x80) { + /* Do two's-complement negation even on non-two's-complement machines. + If the result would be minval - 1, return minval. */ + result -= !TWOS_COMPLEMENT(int_fast64_t) && result != 0; + result += minval; + } + return result; +} + +#include + +const char * +tzgetname(const timezone_t sp, int isdst) +{ + int i; + const char *name = NULL; + for (i = 0; i < sp->typecnt; ++i) { + const struct ttinfo *const ttisp = &sp->ttis[i]; + if (ttisp->tt_isdst == isdst) + name = &sp->chars[ttisp->tt_desigidx]; + } + if (name != NULL) + return name; + errno = ESRCH; + return NULL; +} + +long +tzgetgmtoff(const timezone_t sp, int isdst) +{ + int i; + long l = -1; + for (i = 0; i < sp->typecnt; ++i) { + const struct ttinfo *const ttisp = &sp->ttis[i]; + + if (ttisp->tt_isdst == isdst) { + l = ttisp->tt_utoff; + } + } + if (l == -1) + errno = ESRCH; + return l; +} + +static void +scrub_abbrs(struct state *sp) +{ + int i; + + /* + ** First, replace bogus characters. + */ + for (i = 0; i < sp->charcnt; ++i) + if (strchr(TZ_ABBR_CHAR_SET, sp->chars[i]) == NULL) + sp->chars[i] = TZ_ABBR_ERR_CHAR; + /* + ** Second, truncate long abbreviations. + */ + for (i = 0; i < sp->typecnt; ++i) { + const struct ttinfo * const ttisp = &sp->ttis[i]; + char *cp = &sp->chars[ttisp->tt_desigidx]; + + if (strlen(cp) > TZ_ABBR_MAX_LEN && + strcmp(cp, GRANDPARENTED) != 0) + *(cp + TZ_ABBR_MAX_LEN) = '\0'; + } +} + +static void +update_tzname_etc(const struct state *sp, const struct ttinfo *ttisp) +{ +#if HAVE_TZNAME + tzname[ttisp->tt_isdst] = __UNCONST(&sp->chars[ttisp->tt_desigidx]); +#endif +#if USG_COMPAT + if (!ttisp->tt_isdst) + timezone = - ttisp->tt_utoff; +#endif +#ifdef ALTZONE + if (ttisp->tt_isdst) + altzone = - ttisp->tt_utoff; +#endif /* defined ALTZONE */ +} + +static void +settzname(void) +{ + timezone_t const sp = __lclptr; + int i; + +#if HAVE_TZNAME + tzname[0] = tzname[1] = + (__aconst char *) __UNCONST(sp ? wildabbr : gmt); +#endif +#if USG_COMPAT + daylight = 0; + timezone = 0; +#endif +#ifdef ALTZONE + altzone = 0; +#endif /* defined ALTZONE */ + if (sp == NULL) { + return; + } + /* + ** And to get the latest time zone abbreviations into tzname. . . + */ + for (i = 0; i < sp->typecnt; ++i) + update_tzname_etc(sp, &sp->ttis[i]); + + for (i = 0; i < sp->timecnt; ++i) { + const struct ttinfo * const ttisp = &sp->ttis[sp->types[i]]; + update_tzname_etc(sp, ttisp); +#if USG_COMPAT + if (ttisp->tt_isdst) + daylight = 1; +#endif + } +} + +static bool +differ_by_repeat(const time_t t1, const time_t t0) +{ + if (TYPE_BIT(time_t) - TYPE_SIGNED(time_t) < SECSPERREPEAT_BITS) + return 0; + return (int_fast64_t)t1 - (int_fast64_t)t0 == SECSPERREPEAT; +} + +union input_buffer { + /* The first part of the buffer, interpreted as a header. */ + struct tzhead tzhead; + + /* The entire buffer. */ + char buf[2 * sizeof(struct tzhead) + 2 * sizeof (struct state) + + 4 * TZ_MAX_TIMES]; +}; + +/* TZDIR with a trailing '/' rather than a trailing '\0'. */ +static char const tzdirslash[sizeof TZDIR] = TZDIR "/"; + +/* Local storage needed for 'tzloadbody'. */ +union local_storage { + /* The results of analyzing the file's contents after it is opened. */ + struct file_analysis { + /* The input buffer. */ + union input_buffer u; + + /* A temporary state used for parsing a TZ string in the file. */ + struct state st; + } u; + + /* The file name to be opened. */ + char fullname[/*CONSTCOND*/BIGGEST(sizeof (struct file_analysis), + sizeof tzdirslash + 1024)]; +}; + +/* Load tz data from the file named NAME into *SP. Read extended + format if DOEXTEND. Use *LSP for temporary storage. Return 0 on + success, an errno value on failure. */ +static int +tzloadbody(char const *name, struct state *sp, bool doextend, + union local_storage *lsp) +{ + int i; + int fid; + int stored; + ssize_t nread; + bool doaccess; + union input_buffer *up = &lsp->u.u; + size_t tzheadsize = sizeof(struct tzhead); + + sp->goback = sp->goahead = false; + + if (! name) { + name = TZDEFAULT; + if (! name) + return EINVAL; + } + + if (name[0] == ':') + ++name; +#ifdef SUPPRESS_TZDIR + /* Do not prepend TZDIR. This is intended for specialized + applications only, due to its security implications. */ + doaccess = true; +#else + doaccess = name[0] == '/'; +#endif + if (!doaccess) { + char const *dot; + size_t namelen = strlen(name); + if (sizeof lsp->fullname - sizeof tzdirslash <= namelen) + return ENAMETOOLONG; + + /* Create a string "TZDIR/NAME". Using sprintf here + would pull in stdio (and would fail if the + resulting string length exceeded INT_MAX!). */ + memcpy(lsp->fullname, tzdirslash, sizeof tzdirslash); + strcpy(lsp->fullname + sizeof tzdirslash, name); + + /* Set doaccess if NAME contains a ".." file name + component, as such a name could read a file outside + the TZDIR virtual subtree. */ + for (dot = name; (dot = strchr(dot, '.')) != NULL; dot++) + if ((dot == name || dot[-1] == '/') && dot[1] == '.' + && (dot[2] == '/' || !dot[2])) { + doaccess = true; + break; + } + + name = lsp->fullname; + } + if (doaccess && access(name, R_OK) != 0) + return errno; + + fid = open(name, OPEN_MODE); + if (fid < 0) + return errno; + nread = read(fid, up->buf, sizeof up->buf); + if (nread < (ssize_t)tzheadsize) { + int err = nread < 0 ? errno : EINVAL; + close(fid); + return err; + } + if (close(fid) < 0) + return errno; + for (stored = 4; stored <= 8; stored *= 2) { + int_fast32_t ttisstdcnt = detzcode(up->tzhead.tzh_ttisstdcnt); + int_fast32_t ttisutcnt = detzcode(up->tzhead.tzh_ttisutcnt); + int_fast64_t prevtr = 0; + int_fast32_t prevcorr = 0; + int_fast32_t leapcnt = detzcode(up->tzhead.tzh_leapcnt); + int_fast32_t timecnt = detzcode(up->tzhead.tzh_timecnt); + int_fast32_t typecnt = detzcode(up->tzhead.tzh_typecnt); + int_fast32_t charcnt = detzcode(up->tzhead.tzh_charcnt); + char const *p = up->buf + tzheadsize; + /* Although tzfile(5) currently requires typecnt to be nonzero, + support future formats that may allow zero typecnt + in files that have a TZ string and no transitions. */ + if (! (0 <= leapcnt && leapcnt < TZ_MAX_LEAPS + && 0 <= typecnt && typecnt < TZ_MAX_TYPES + && 0 <= timecnt && timecnt < TZ_MAX_TIMES + && 0 <= charcnt && charcnt < TZ_MAX_CHARS + && (ttisstdcnt == typecnt || ttisstdcnt == 0) + && (ttisutcnt == typecnt || ttisutcnt == 0))) + return EINVAL; + if ((size_t)nread + < (tzheadsize /* struct tzhead */ + + timecnt * stored /* ats */ + + timecnt /* types */ + + typecnt * 6 /* ttinfos */ + + charcnt /* chars */ + + leapcnt * (stored + 4) /* lsinfos */ + + ttisstdcnt /* ttisstds */ + + ttisutcnt)) /* ttisuts */ + return EINVAL; + sp->leapcnt = leapcnt; + sp->timecnt = timecnt; + sp->typecnt = typecnt; + sp->charcnt = charcnt; + + /* Read transitions, discarding those out of time_t range. + But pretend the last transition before TIME_T_MIN + occurred at TIME_T_MIN. */ + timecnt = 0; + for (i = 0; i < sp->timecnt; ++i) { + int_fast64_t at + = stored == 4 ? detzcode(p) : detzcode64(p); + sp->types[i] = at <= TIME_T_MAX; + if (sp->types[i]) { + time_t attime + = ((TYPE_SIGNED(time_t) ? + at < TIME_T_MIN : at < 0) + ? TIME_T_MIN : (time_t)at); + if (timecnt && attime <= sp->ats[timecnt - 1]) { + if (attime < sp->ats[timecnt - 1]) + return EINVAL; + sp->types[i - 1] = 0; + timecnt--; + } + sp->ats[timecnt++] = attime; + } + p += stored; + } + + timecnt = 0; + for (i = 0; i < sp->timecnt; ++i) { + unsigned char typ = *p++; + if (sp->typecnt <= typ) + return EINVAL; + if (sp->types[i]) + sp->types[timecnt++] = typ; + } + sp->timecnt = timecnt; + for (i = 0; i < sp->typecnt; ++i) { + struct ttinfo * ttisp; + unsigned char isdst, desigidx; + + ttisp = &sp->ttis[i]; + ttisp->tt_utoff = detzcode(p); + p += 4; + isdst = *p++; + if (! (isdst < 2)) + return EINVAL; + ttisp->tt_isdst = isdst; + desigidx = *p++; + if (! (desigidx < sp->charcnt)) + return EINVAL; + ttisp->tt_desigidx = desigidx; + } + for (i = 0; i < sp->charcnt; ++i) + sp->chars[i] = *p++; + sp->chars[i] = '\0'; /* ensure '\0' at end */ + + /* Read leap seconds, discarding those out of time_t range. */ + leapcnt = 0; + for (i = 0; i < sp->leapcnt; ++i) { + int_fast64_t tr = stored == 4 ? detzcode(p) : + detzcode64(p); + int_fast32_t corr = detzcode(p + stored); + p += stored + 4; + /* Leap seconds cannot occur before the Epoch. */ + if (tr < 0) + return EINVAL; + if (tr <= TIME_T_MAX) { + /* Leap seconds cannot occur more than once per UTC month, + and UTC months are at least 28 days long (minus 1 + second for a negative leap second). Each leap second's + correction must differ from the previous one's by 1 + second. */ + if (tr - prevtr < 28 * SECSPERDAY - 1 + || (corr != prevcorr - 1 + && corr != prevcorr + 1)) + return EINVAL; + + sp->lsis[leapcnt].ls_trans = + (time_t)(prevtr = tr); + sp->lsis[leapcnt].ls_corr = prevcorr = corr; + leapcnt++; + } + } + sp->leapcnt = leapcnt; + + for (i = 0; i < sp->typecnt; ++i) { + struct ttinfo * ttisp; + + ttisp = &sp->ttis[i]; + if (ttisstdcnt == 0) + ttisp->tt_ttisstd = false; + else { + if (*p != true && *p != false) + return EINVAL; + ttisp->tt_ttisstd = *p++; + } + } + for (i = 0; i < sp->typecnt; ++i) { + struct ttinfo * ttisp; + + ttisp = &sp->ttis[i]; + if (ttisutcnt == 0) + ttisp->tt_ttisut = false; + else { + if (*p != true && *p != false) + return EINVAL; + ttisp->tt_ttisut = *p++; + } + } + /* + ** If this is an old file, we're done. + */ + if (up->tzhead.tzh_version[0] == '\0') + break; + nread -= p - up->buf; + memmove(up->buf, p, (size_t)nread); + } + if (doextend && nread > 2 && + up->buf[0] == '\n' && up->buf[nread - 1] == '\n' && + sp->typecnt + 2 <= TZ_MAX_TYPES) { + struct state *ts = &lsp->u.st; + + up->buf[nread - 1] = '\0'; + if (tzparse(&up->buf[1], ts, false)) { + + /* Attempt to reuse existing abbreviations. + Without this, America/Anchorage would be right on + the edge after 2037 when TZ_MAX_CHARS is 50, as + sp->charcnt equals 40 (for LMT AST AWT APT AHST + AHDT YST AKDT AKST) and ts->charcnt equals 10 + (for AKST AKDT). Reusing means sp->charcnt can + stay 40 in this example. */ + int gotabbr = 0; + int charcnt = sp->charcnt; + for (i = 0; i < ts->typecnt; i++) { + char *tsabbr = ts->chars + ts->ttis[i].tt_desigidx; + int j; + for (j = 0; j < charcnt; j++) + if (strcmp(sp->chars + j, tsabbr) == 0) { + ts->ttis[i].tt_desigidx = j; + gotabbr++; + break; + } + if (! (j < charcnt)) { + size_t tsabbrlen = strlen(tsabbr); + if (j + tsabbrlen < TZ_MAX_CHARS) { + strcpy(sp->chars + j, tsabbr); + charcnt = (int_fast32_t)(j + tsabbrlen + 1); + ts->ttis[i].tt_desigidx = j; + gotabbr++; + } + } + } + if (gotabbr == ts->typecnt) { + sp->charcnt = charcnt; + + /* Ignore any trailing, no-op transitions generated + by zic as they don't help here and can run afoul + of bugs in zic 2016j or earlier. */ + while (1 < sp->timecnt + && (sp->types[sp->timecnt - 1] + == sp->types[sp->timecnt - 2])) + sp->timecnt--; + + for (i = 0; i < ts->timecnt; i++) + if (sp->timecnt == 0 + || sp->ats[sp->timecnt - 1] < ts->ats[i]) + break; + while (i < ts->timecnt + && sp->timecnt < TZ_MAX_TIMES) { + sp->ats[sp->timecnt] = ts->ats[i]; + sp->types[sp->timecnt] = (sp->typecnt + + ts->types[i]); + sp->timecnt++; + i++; + } + for (i = 0; i < ts->typecnt; i++) + sp->ttis[sp->typecnt++] = ts->ttis[i]; + } + } + } + if (sp->typecnt == 0) + return EINVAL; + if (sp->timecnt > 1) { + for (i = 1; i < sp->timecnt; ++i) + if (typesequiv(sp, sp->types[i], sp->types[0]) && + differ_by_repeat(sp->ats[i], sp->ats[0])) { + sp->goback = true; + break; + } + for (i = sp->timecnt - 2; i >= 0; --i) + if (typesequiv(sp, sp->types[sp->timecnt - 1], + sp->types[i]) && + differ_by_repeat(sp->ats[sp->timecnt - 1], + sp->ats[i])) { + sp->goahead = true; + break; + } + } + + /* Infer sp->defaulttype from the data. Although this default + type is always zero for data from recent tzdb releases, + things are trickier for data from tzdb 2018e or earlier. + + The first set of heuristics work around bugs in 32-bit data + generated by tzdb 2013c or earlier. The workaround is for + zones like Australia/Macquarie where timestamps before the + first transition have a time type that is not the earliest + standard-time type. See: + https://mm.icann.org/pipermail/tz/2013-May/019368.html */ + /* + ** If type 0 is unused in transitions, + ** it's the type to use for early times. + */ + for (i = 0; i < sp->timecnt; ++i) + if (sp->types[i] == 0) + break; + i = i < sp->timecnt ? -1 : 0; + /* + ** Absent the above, + ** if there are transition times + ** and the first transition is to a daylight time + ** find the standard type less than and closest to + ** the type of the first transition. + */ + if (i < 0 && sp->timecnt > 0 && sp->ttis[sp->types[0]].tt_isdst) { + i = sp->types[0]; + while (--i >= 0) + if (!sp->ttis[i].tt_isdst) + break; + } + /* The next heuristics are for data generated by tzdb 2018e or + earlier, for zones like EST5EDT where the first transition + is to DST. */ + /* + ** If no result yet, find the first standard type. + ** If there is none, punt to type zero. + */ + if (i < 0) { + i = 0; + while (sp->ttis[i].tt_isdst) + if (++i >= sp->typecnt) { + i = 0; + break; + } + } + /* A simple 'sp->defaulttype = 0;' would suffice here if we + didn't have to worry about 2018e-or-earlier data. Even + simpler would be to remove the defaulttype member and just + use 0 in its place. */ + sp->defaulttype = i; + + return 0; +} + +/* Load tz data from the file named NAME into *SP. Read extended + format if DOEXTEND. Return 0 on success, an errno value on failure. */ +static int +tzload(char const *name, struct state *sp, bool doextend) +{ + union local_storage *lsp = malloc(sizeof *lsp); + if (!lsp) + return errno; + else { + int err = tzloadbody(name, sp, doextend, lsp); + free(lsp); + return err; + } +} + +static bool +typesequiv(const struct state *sp, int a, int b) +{ + bool result; + + if (sp == NULL || + a < 0 || a >= sp->typecnt || + b < 0 || b >= sp->typecnt) + result = false; + else { + const struct ttinfo * ap = &sp->ttis[a]; + const struct ttinfo * bp = &sp->ttis[b]; + result = (ap->tt_utoff == bp->tt_utoff + && ap->tt_isdst == bp->tt_isdst + && ap->tt_ttisstd == bp->tt_ttisstd + && ap->tt_ttisut == bp->tt_ttisut + && (strcmp(&sp->chars[ap->tt_desigidx], + &sp->chars[bp->tt_desigidx]) + == 0)); + } + return result; +} + +static const int mon_lengths[2][MONSPERYEAR] = { + { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, + { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } +}; + +static const int year_lengths[2] = { + DAYSPERNYEAR, DAYSPERLYEAR +}; + +/* +** Given a pointer into a timezone string, scan until a character that is not +** a valid character in a time zone abbreviation is found. +** Return a pointer to that character. +*/ + +static ATTRIBUTE_PURE const char * +getzname(const char *strp) +{ + char c; + + while ((c = *strp) != '\0' && !is_digit(c) && c != ',' && c != '-' && + c != '+') + ++strp; + return strp; +} + +/* +** Given a pointer into an extended timezone string, scan until the ending +** delimiter of the time zone abbreviation is located. +** Return a pointer to the delimiter. +** +** As with getzname above, the legal character set is actually quite +** restricted, with other characters producing undefined results. +** We don't do any checking here; checking is done later in common-case code. +*/ + +static ATTRIBUTE_PURE const char * +getqzname(const char *strp, const int delim) +{ + int c; + + while ((c = *strp) != '\0' && c != delim) + ++strp; + return strp; +} + +/* +** Given a pointer into a timezone string, extract a number from that string. +** Check that the number is within a specified range; if it is not, return +** NULL. +** Otherwise, return a pointer to the first character not part of the number. +*/ + +static const char * +getnum(const char *strp, int *const nump, const int min, const int max) +{ + char c; + int num; + + if (strp == NULL || !is_digit(c = *strp)) { + errno = EINVAL; + return NULL; + } + num = 0; + do { + num = num * 10 + (c - '0'); + if (num > max) { + errno = EOVERFLOW; + return NULL; /* illegal value */ + } + c = *++strp; + } while (is_digit(c)); + if (num < min) { + errno = EINVAL; + return NULL; /* illegal value */ + } + *nump = num; + return strp; +} + +/* +** Given a pointer into a timezone string, extract a number of seconds, +** in hh[:mm[:ss]] form, from the string. +** If any error occurs, return NULL. +** Otherwise, return a pointer to the first character not part of the number +** of seconds. +*/ + +static const char * +getsecs(const char *strp, int_fast32_t *const secsp) +{ + int num; + + /* + ** 'HOURSPERDAY * DAYSPERWEEK - 1' allows quasi-Posix rules like + ** "M10.4.6/26", which does not conform to Posix, + ** but which specifies the equivalent of + ** "02:00 on the first Sunday on or after 23 Oct". + */ + strp = getnum(strp, &num, 0, HOURSPERDAY * DAYSPERWEEK - 1); + if (strp == NULL) + return NULL; + *secsp = num * (int_fast32_t) SECSPERHOUR; + if (*strp == ':') { + ++strp; + strp = getnum(strp, &num, 0, MINSPERHOUR - 1); + if (strp == NULL) + return NULL; + *secsp += num * SECSPERMIN; + if (*strp == ':') { + ++strp; + /* 'SECSPERMIN' allows for leap seconds. */ + strp = getnum(strp, &num, 0, SECSPERMIN); + if (strp == NULL) + return NULL; + *secsp += num; + } + } + return strp; +} + +/* +** Given a pointer into a timezone string, extract an offset, in +** [+-]hh[:mm[:ss]] form, from the string. +** If any error occurs, return NULL. +** Otherwise, return a pointer to the first character not part of the time. +*/ + +static const char * +getoffset(const char *strp, int_fast32_t *const offsetp) +{ + bool neg = false; + + if (*strp == '-') { + neg = true; + ++strp; + } else if (*strp == '+') + ++strp; + strp = getsecs(strp, offsetp); + if (strp == NULL) + return NULL; /* illegal time */ + if (neg) + *offsetp = -*offsetp; + return strp; +} + +/* +** Given a pointer into a timezone string, extract a rule in the form +** date[/time]. See POSIX section 8 for the format of "date" and "time". +** If a valid rule is not found, return NULL. +** Otherwise, return a pointer to the first character not part of the rule. +*/ + +static const char * +getrule(const char *strp, struct rule *const rulep) +{ + if (*strp == 'J') { + /* + ** Julian day. + */ + rulep->r_type = JULIAN_DAY; + ++strp; + strp = getnum(strp, &rulep->r_day, 1, DAYSPERNYEAR); + } else if (*strp == 'M') { + /* + ** Month, week, day. + */ + rulep->r_type = MONTH_NTH_DAY_OF_WEEK; + ++strp; + strp = getnum(strp, &rulep->r_mon, 1, MONSPERYEAR); + if (strp == NULL) + return NULL; + if (*strp++ != '.') + return NULL; + strp = getnum(strp, &rulep->r_week, 1, 5); + if (strp == NULL) + return NULL; + if (*strp++ != '.') + return NULL; + strp = getnum(strp, &rulep->r_day, 0, DAYSPERWEEK - 1); + } else if (is_digit(*strp)) { + /* + ** Day of year. + */ + rulep->r_type = DAY_OF_YEAR; + strp = getnum(strp, &rulep->r_day, 0, DAYSPERLYEAR - 1); + } else return NULL; /* invalid format */ + if (strp == NULL) + return NULL; + if (*strp == '/') { + /* + ** Time specified. + */ + ++strp; + strp = getoffset(strp, &rulep->r_time); + } else rulep->r_time = 2 * SECSPERHOUR; /* default = 2:00:00 */ + return strp; +} + +/* +** Given a year, a rule, and the offset from UT at the time that rule takes +** effect, calculate the year-relative time that rule takes effect. +*/ + +static int_fast32_t +transtime(const int year, const struct rule *const rulep, + const int_fast32_t offset) +{ + bool leapyear; + int_fast32_t value; + int i; + int d, m1, yy0, yy1, yy2, dow; + + INITIALIZE(value); + leapyear = isleap(year); + switch (rulep->r_type) { + + case JULIAN_DAY: + /* + ** Jn - Julian day, 1 == January 1, 60 == March 1 even in leap + ** years. + ** In non-leap years, or if the day number is 59 or less, just + ** add SECSPERDAY times the day number-1 to the time of + ** January 1, midnight, to get the day. + */ + value = (rulep->r_day - 1) * SECSPERDAY; + if (leapyear && rulep->r_day >= 60) + value += SECSPERDAY; + break; + + case DAY_OF_YEAR: + /* + ** n - day of year. + ** Just add SECSPERDAY times the day number to the time of + ** January 1, midnight, to get the day. + */ + value = rulep->r_day * SECSPERDAY; + break; + + case MONTH_NTH_DAY_OF_WEEK: + /* + ** Mm.n.d - nth "dth day" of month m. + */ + + /* + ** Use Zeller's Congruence to get day-of-week of first day of + ** month. + */ + m1 = (rulep->r_mon + 9) % 12 + 1; + yy0 = (rulep->r_mon <= 2) ? (year - 1) : year; + yy1 = yy0 / 100; + yy2 = yy0 % 100; + dow = ((26 * m1 - 2) / 10 + + 1 + yy2 + yy2 / 4 + yy1 / 4 - 2 * yy1) % 7; + if (dow < 0) + dow += DAYSPERWEEK; + + /* + ** "dow" is the day-of-week of the first day of the month. Get + ** the day-of-month (zero-origin) of the first "dow" day of the + ** month. + */ + d = rulep->r_day - dow; + if (d < 0) + d += DAYSPERWEEK; + for (i = 1; i < rulep->r_week; ++i) { + if (d + DAYSPERWEEK >= + mon_lengths[leapyear][rulep->r_mon - 1]) + break; + d += DAYSPERWEEK; + } + + /* + ** "d" is the day-of-month (zero-origin) of the day we want. + */ + value = d * SECSPERDAY; + for (i = 0; i < rulep->r_mon - 1; ++i) + value += mon_lengths[leapyear][i] * SECSPERDAY; + break; + } + + /* + ** "value" is the year-relative time of 00:00:00 UT on the day in + ** question. To get the year-relative time of the specified local + ** time on that day, add the transition time and the current offset + ** from UT. + */ + return value + rulep->r_time + offset; +} + +/* +** Given a POSIX section 8-style TZ string, fill in the rule tables as +** appropriate. +*/ + +static bool +tzparse(const char *name, struct state *sp, bool lastditch) +{ + const char * stdname; + const char * dstname; + size_t stdlen; + size_t dstlen; + size_t charcnt; + int_fast32_t stdoffset; + int_fast32_t dstoffset; + char * cp; + bool load_ok; + + dstname = NULL; /* XXX gcc */ + stdname = name; + if (lastditch) { + stdlen = sizeof gmt - 1; + name += stdlen; + stdoffset = 0; + } else { + if (*name == '<') { + name++; + stdname = name; + name = getqzname(name, '>'); + if (*name != '>') + return false; + stdlen = name - stdname; + name++; + } else { + name = getzname(name); + stdlen = name - stdname; + } + if (!stdlen) + return false; + name = getoffset(name, &stdoffset); + if (name == NULL) + return false; + } + charcnt = stdlen + 1; + if (sizeof sp->chars < charcnt) + return false; + load_ok = tzload(TZDEFRULES, sp, false) == 0; + if (!load_ok) + sp->leapcnt = 0; /* so, we're off a little */ + if (*name != '\0') { + if (*name == '<') { + dstname = ++name; + name = getqzname(name, '>'); + if (*name != '>') + return false; + dstlen = name - dstname; + name++; + } else { + dstname = name; + name = getzname(name); + dstlen = name - dstname; /* length of DST abbr. */ + } + if (!dstlen) + return false; + charcnt += dstlen + 1; + if (sizeof sp->chars < charcnt) + return false; + if (*name != '\0' && *name != ',' && *name != ';') { + name = getoffset(name, &dstoffset); + if (name == NULL) + return false; + } else dstoffset = stdoffset - SECSPERHOUR; + if (*name == '\0' && !load_ok) + name = TZDEFRULESTRING; + if (*name == ',' || *name == ';') { + struct rule start; + struct rule end; + int year; + int yearlim; + int timecnt; + time_t janfirst; + int_fast32_t janoffset = 0; + int yearbeg; + + ++name; + if ((name = getrule(name, &start)) == NULL) + return false; + if (*name++ != ',') + return false; + if ((name = getrule(name, &end)) == NULL) + return false; + if (*name != '\0') + return false; + sp->typecnt = 2; /* standard time and DST */ + /* + ** Two transitions per year, from EPOCH_YEAR forward. + */ + init_ttinfo(&sp->ttis[0], -stdoffset, false, 0); + init_ttinfo(&sp->ttis[1], -dstoffset, true, + (int)(stdlen + 1)); + sp->defaulttype = 0; + timecnt = 0; + janfirst = 0; + yearbeg = EPOCH_YEAR; + + do { + int_fast32_t yearsecs + = year_lengths[isleap(yearbeg - 1)] * SECSPERDAY; + yearbeg--; + if (increment_overflow_time(&janfirst, -yearsecs)) { + janoffset = -yearsecs; + break; + } + } while (EPOCH_YEAR - YEARSPERREPEAT / 2 < yearbeg); + + yearlim = yearbeg + YEARSPERREPEAT + 1; + for (year = yearbeg; year < yearlim; year++) { + int_fast32_t + starttime = transtime(year, &start, stdoffset), + endtime = transtime(year, &end, dstoffset); + int_fast32_t + yearsecs = (year_lengths[isleap(year)] + * SECSPERDAY); + bool reversed = endtime < starttime; + if (reversed) { + int_fast32_t swap = starttime; + starttime = endtime; + endtime = swap; + } + if (reversed + || (starttime < endtime + && (endtime - starttime + < (yearsecs + + (stdoffset - dstoffset))))) { + if (TZ_MAX_TIMES - 2 < timecnt) + break; + sp->ats[timecnt] = janfirst; + if (! increment_overflow_time + (&sp->ats[timecnt], + janoffset + starttime)) + sp->types[timecnt++] = !reversed; + sp->ats[timecnt] = janfirst; + if (! increment_overflow_time + (&sp->ats[timecnt], + janoffset + endtime)) { + sp->types[timecnt++] = reversed; + yearlim = year + YEARSPERREPEAT + 1; + } + } + if (increment_overflow_time + (&janfirst, janoffset + yearsecs)) + break; + janoffset = 0; + } + sp->timecnt = timecnt; + if (! timecnt) { + sp->ttis[0] = sp->ttis[1]; + sp->typecnt = 1; /* Perpetual DST. */ + } else if (YEARSPERREPEAT < year - yearbeg) + sp->goback = sp->goahead = true; + } else { + int_fast32_t theirstdoffset; + int_fast32_t theirdstoffset; + int_fast32_t theiroffset; + bool isdst; + int i; + int j; + + if (*name != '\0') + return false; + /* + ** Initial values of theirstdoffset and theirdstoffset. + */ + theirstdoffset = 0; + for (i = 0; i < sp->timecnt; ++i) { + j = sp->types[i]; + if (!sp->ttis[j].tt_isdst) { + theirstdoffset = + - sp->ttis[j].tt_utoff; + break; + } + } + theirdstoffset = 0; + for (i = 0; i < sp->timecnt; ++i) { + j = sp->types[i]; + if (sp->ttis[j].tt_isdst) { + theirdstoffset = + - sp->ttis[j].tt_utoff; + break; + } + } + /* + ** Initially we're assumed to be in standard time. + */ + isdst = false; + theiroffset = theirstdoffset; + /* + ** Now juggle transition times and types + ** tracking offsets as you do. + */ + for (i = 0; i < sp->timecnt; ++i) { + j = sp->types[i]; + sp->types[i] = sp->ttis[j].tt_isdst; + if (sp->ttis[j].tt_ttisut) { + /* No adjustment to transition time */ + } else { + /* + ** If daylight saving time is in + ** effect, and the transition time was + ** not specified as standard time, add + ** the daylight saving time offset to + ** the transition time; otherwise, add + ** the standard time offset to the + ** transition time. + */ + /* + ** Transitions from DST to DDST + ** will effectively disappear since + ** POSIX provides for only one DST + ** offset. + */ + if (isdst && !sp->ttis[j].tt_ttisstd) { + sp->ats[i] += (time_t) + (dstoffset - theirdstoffset); + } else { + sp->ats[i] += (time_t) + (stdoffset - theirstdoffset); + } + } + theiroffset = -sp->ttis[j].tt_utoff; + if (sp->ttis[j].tt_isdst) + theirstdoffset = theiroffset; + else theirdstoffset = theiroffset; + } + /* + ** Finally, fill in ttis. + */ + init_ttinfo(&sp->ttis[0], -stdoffset, false, 0); + init_ttinfo(&sp->ttis[1], -dstoffset, true, + (int)(stdlen + 1)); + sp->typecnt = 2; + sp->defaulttype = 0; + } + } else { + dstlen = 0; + sp->typecnt = 1; /* only standard time */ + sp->timecnt = 0; + init_ttinfo(&sp->ttis[0], -stdoffset, false, 0); + init_ttinfo(&sp->ttis[1], 0, false, 0); + sp->defaulttype = 0; + } + sp->charcnt = (int)charcnt; + cp = sp->chars; + (void) memcpy(cp, stdname, stdlen); + cp += stdlen; + *cp++ = '\0'; + if (dstlen != 0) { + (void) memcpy(cp, dstname, dstlen); + *(cp + dstlen) = '\0'; + } + return true; +} + +static void +gmtload(struct state *const sp) +{ + if (tzload(gmt, sp, true) != 0) + (void) tzparse(gmt, sp, true); +} + +static int +zoneinit(struct state *sp, char const *name) +{ + if (name && ! name[0]) { + /* + ** User wants it fast rather than right. + */ + sp->leapcnt = 0; /* so, we're off a little */ + sp->timecnt = 0; + sp->typecnt = 1; + sp->charcnt = 0; + sp->goback = sp->goahead = false; + init_ttinfo(&sp->ttis[0], 0, false, 0); + strcpy(sp->chars, gmt); + sp->defaulttype = 0; + return 0; + } else { + int err = tzload(name, sp, true); + if (err != 0 && name && name[0] != ':' && + tzparse(name, sp, false)) + err = 0; + if (err == 0) + scrub_abbrs(sp); + return err; + } +} + +static void +tzsetlcl(char const *name) +{ + struct state *sp = __lclptr; + int lcl = name ? strlen(name) < sizeof lcl_TZname : -1; + if (lcl < 0 ? lcl_is_set < 0 + : 0 < lcl_is_set && strcmp(lcl_TZname, name) == 0) + return; + + if (! sp) + __lclptr = sp = malloc(sizeof *__lclptr); + if (sp) { + if (zoneinit(sp, name) != 0) + zoneinit(sp, ""); + if (0 < lcl) + strcpy(lcl_TZname, name); + } + settzname(); + lcl_is_set = lcl; +} + +#ifdef STD_INSPIRED +void +tzsetwall(void) +{ + rwlock_wrlock(&__lcl_lock); + tzsetlcl(NULL); + rwlock_unlock(&__lcl_lock); +} +#endif + +void +tzset_unlocked(void) +{ + tzsetlcl(getenv("TZ")); +} + +void +tzset(void) +{ + rwlock_wrlock(&__lcl_lock); + tzset_unlocked(); + rwlock_unlock(&__lcl_lock); +} + +static void +gmtcheck(void) +{ + static bool gmt_is_set; + rwlock_wrlock(&__lcl_lock); + if (! gmt_is_set) { + gmtptr = malloc(sizeof *gmtptr); + if (gmtptr) + gmtload(gmtptr); + gmt_is_set = true; + } + rwlock_unlock(&__lcl_lock); +} + +#if NETBSD_INSPIRED + +timezone_t +tzalloc(const char *name) +{ + timezone_t sp = malloc(sizeof *sp); + if (sp) { + int err = zoneinit(sp, name); + if (err != 0) { + free(sp); + errno = err; + return NULL; + } + } + return sp; +} + +void +tzfree(timezone_t sp) +{ + free(sp); +} + +/* +** NetBSD 6.1.4 has ctime_rz, but omit it because POSIX says ctime and +** ctime_r are obsolescent and have potential security problems that +** ctime_rz would share. Callers can instead use localtime_rz + strftime. +** +** NetBSD 6.1.4 has tzgetname, but omit it because it doesn't work +** in zones with three or more time zone abbreviations. +** Callers can instead use localtime_rz + strftime. +*/ + +#endif + +/* +** The easy way to behave "as if no library function calls" localtime +** is to not call it, so we drop its guts into "localsub", which can be +** freely called. (And no, the PANS doesn't require the above behavior, +** but it *is* desirable.) +** +** If successful and SETNAME is nonzero, +** set the applicable parts of tzname, timezone and altzone; +** however, it's OK to omit this step if the timezone is POSIX-compatible, +** since in that case tzset should have already done this step correctly. +** SETNAME's type is intfast32_t for compatibility with gmtsub, +** but it is actually a boolean and its value should be 0 or 1. +*/ + +/*ARGSUSED*/ +static struct tm * +localsub(struct state const *sp, time_t const *timep, int_fast32_t setname, + struct tm *const tmp) +{ + const struct ttinfo * ttisp; + int i; + struct tm * result; + const time_t t = *timep; + + if (sp == NULL) { + /* Don't bother to set tzname etc.; tzset has already done it. */ + return gmtsub(gmtptr, timep, 0, tmp); + } + if ((sp->goback && t < sp->ats[0]) || + (sp->goahead && t > sp->ats[sp->timecnt - 1])) { + time_t newt = t; + time_t seconds; + time_t years; + + if (t < sp->ats[0]) + seconds = sp->ats[0] - t; + else seconds = t - sp->ats[sp->timecnt - 1]; + --seconds; + years = (time_t)((seconds / SECSPERREPEAT + 1) * YEARSPERREPEAT); + seconds = (time_t)(years * AVGSECSPERYEAR); + if (t < sp->ats[0]) + newt += seconds; + else newt -= seconds; + if (newt < sp->ats[0] || + newt > sp->ats[sp->timecnt - 1]) { + errno = EINVAL; + return NULL; /* "cannot happen" */ + } + result = localsub(sp, &newt, setname, tmp); + if (result) { + int_fast64_t newy; + + newy = result->tm_year; + if (t < sp->ats[0]) + newy -= years; + else newy += years; + if (! (INT_MIN <= newy && newy <= INT_MAX)) { + errno = EOVERFLOW; + return NULL; + } + result->tm_year = (int)newy; + } + return result; + } + if (sp->timecnt == 0 || t < sp->ats[0]) { + i = sp->defaulttype; + } else { + int lo = 1; + int hi = sp->timecnt; + + while (lo < hi) { + int mid = (lo + hi) / 2; + + if (t < sp->ats[mid]) + hi = mid; + else lo = mid + 1; + } + i = (int) sp->types[lo - 1]; + } + ttisp = &sp->ttis[i]; + /* + ** To get (wrong) behavior that's compatible with System V Release 2.0 + ** you'd replace the statement below with + ** t += ttisp->tt_utoff; + ** timesub(&t, 0L, sp, tmp); + */ + result = timesub(&t, ttisp->tt_utoff, sp, tmp); + if (result) { + result->tm_isdst = ttisp->tt_isdst; +#ifdef TM_ZONE + result->TM_ZONE = __UNCONST(&sp->chars[ttisp->tt_desigidx]); +#endif /* defined TM_ZONE */ + if (setname) + update_tzname_etc(sp, ttisp); + } + return result; +} + +#if NETBSD_INSPIRED + +struct tm * +localtime_rz(timezone_t sp, time_t const *timep, struct tm *tmp) +{ + return localsub(sp, timep, 0, tmp); +} + +#endif + +static struct tm * +localtime_tzset(time_t const *timep, struct tm *tmp, bool setname) +{ + rwlock_wrlock(&__lcl_lock); + if (setname || !lcl_is_set) + tzset_unlocked(); + tmp = localsub(__lclptr, timep, setname, tmp); + rwlock_unlock(&__lcl_lock); + return tmp; +} + +struct tm * +localtime(const time_t *timep) +{ + return localtime_tzset(timep, &tm, true); +} + +struct tm * +localtime_r(const time_t * __restrict timep, struct tm *tmp) +{ + return localtime_tzset(timep, tmp, true); +} + +/* +** gmtsub is to gmtime as localsub is to localtime. +*/ + +static struct tm * +gmtsub(struct state const *sp, const time_t *timep, int_fast32_t offset, + struct tm *tmp) +{ + struct tm * result; + + result = timesub(timep, offset, gmtptr, tmp); +#ifdef TM_ZONE + /* + ** Could get fancy here and deliver something such as + ** "+xx" or "-xx" if offset is non-zero, + ** but this is no time for a treasure hunt. + */ + if (result) + result->TM_ZONE = offset ? __UNCONST(wildabbr) : gmtptr ? + gmtptr->chars : __UNCONST(gmt); +#endif /* defined TM_ZONE */ + return result; +} + + +/* +** Re-entrant version of gmtime. +*/ + +struct tm * +gmtime_r(const time_t *timep, struct tm *tmp) +{ + gmtcheck(); + return gmtsub(NULL, timep, 0, tmp); +} + +struct tm * +gmtime(const time_t *timep) +{ + return gmtime_r(timep, &tm); +} +#ifdef STD_INSPIRED + +struct tm * +offtime(const time_t *timep, long offset) +{ + gmtcheck(); + return gmtsub(gmtptr, timep, (int_fast32_t)offset, &tm); +} + +struct tm * +offtime_r(const time_t *timep, long offset, struct tm *tmp) +{ + gmtcheck(); + return gmtsub(NULL, timep, (int_fast32_t)offset, tmp); +} + +#endif /* defined STD_INSPIRED */ + +#if TZ_TIME_T + +# if USG_COMPAT +# define daylight 0 +# define timezone 0 +# endif +# ifndef ALTZONE +# define altzone 0 +# endif + +/* Convert from the underlying system's time_t to the ersatz time_tz, + which is called 'time_t' in this file. Typically, this merely + converts the time's integer width. On some platforms, the system + time is local time not UT, or uses some epoch other than the POSIX + epoch. + + Although this code appears to define a function named 'time' that + returns time_t, the macros in private.h cause this code to actually + define a function named 'tz_time' that returns tz_time_t. The call + to sys_time invokes the underlying system's 'time' function. */ + +time_t +time(time_t *p) +{ + time_t r = sys_time(0); + if (r != (time_t) -1) { + int_fast32_t offset = EPOCH_LOCAL ? (daylight ? timezone : altzone) : 0; + if (increment_overflow32(&offset, -EPOCH_OFFSET) + || increment_overflow_time (&r, offset)) { + errno = EOVERFLOW; + r = -1; + } + } + if (p) + *p = r; + return r; +} +#endif + +/* +** Return the number of leap years through the end of the given year +** where, to make the math easy, the answer for year zero is defined as zero. +*/ +static int +leaps_thru_end_of_nonneg(int y) +{ + return y / 4 - y / 100 + y / 400; +} + +static int ATTRIBUTE_PURE +leaps_thru_end_of(const int y) +{ + return (y < 0 + ? -1 - leaps_thru_end_of_nonneg(-1 - y) + : leaps_thru_end_of_nonneg(y)); +} + +static struct tm * +timesub(const time_t *timep, int_fast32_t offset, + const struct state *sp, struct tm *tmp) +{ + const struct lsinfo * lp; + time_t tdays; + int idays; /* unsigned would be so 2003 */ + int_fast64_t rem; + int y; + const int * ip; + int_fast64_t corr; + int hit; + int i; + + corr = 0; + hit = false; + i = (sp == NULL) ? 0 : sp->leapcnt; + while (--i >= 0) { + lp = &sp->lsis[i]; + if (*timep >= lp->ls_trans) { + corr = lp->ls_corr; + hit = (*timep == lp->ls_trans + && (i == 0 ? 0 : lp[-1].ls_corr) < corr); + break; + } + } + y = EPOCH_YEAR; + tdays = (time_t)(*timep / SECSPERDAY); + rem = *timep % SECSPERDAY; + while (tdays < 0 || tdays >= year_lengths[isleap(y)]) { + int newy; + time_t tdelta; + int idelta; + int leapdays; + + tdelta = tdays / DAYSPERLYEAR; + if (! ((! TYPE_SIGNED(time_t) || INT_MIN <= tdelta) + && tdelta <= INT_MAX)) + goto out_of_range; + _DIAGASSERT(__type_fit(int, tdelta)); + idelta = (int)tdelta; + if (idelta == 0) + idelta = (tdays < 0) ? -1 : 1; + newy = y; + if (increment_overflow(&newy, idelta)) + goto out_of_range; + leapdays = leaps_thru_end_of(newy - 1) - + leaps_thru_end_of(y - 1); + tdays -= ((time_t) newy - y) * DAYSPERNYEAR; + tdays -= leapdays; + y = newy; + } + /* + ** Given the range, we can now fearlessly cast... + */ + idays = (int) tdays; + rem += offset - corr; + while (rem < 0) { + rem += SECSPERDAY; + --idays; + } + while (rem >= SECSPERDAY) { + rem -= SECSPERDAY; + ++idays; + } + while (idays < 0) { + if (increment_overflow(&y, -1)) + goto out_of_range; + idays += year_lengths[isleap(y)]; + } + while (idays >= year_lengths[isleap(y)]) { + idays -= year_lengths[isleap(y)]; + if (increment_overflow(&y, 1)) + goto out_of_range; + } + tmp->tm_year = y; + if (increment_overflow(&tmp->tm_year, -TM_YEAR_BASE)) + goto out_of_range; + tmp->tm_yday = idays; + /* + ** The "extra" mods below avoid overflow problems. + */ + tmp->tm_wday = EPOCH_WDAY + + ((y - EPOCH_YEAR) % DAYSPERWEEK) * + (DAYSPERNYEAR % DAYSPERWEEK) + + leaps_thru_end_of(y - 1) - + leaps_thru_end_of(EPOCH_YEAR - 1) + + idays; + tmp->tm_wday %= DAYSPERWEEK; + if (tmp->tm_wday < 0) + tmp->tm_wday += DAYSPERWEEK; + tmp->tm_hour = (int) (rem / SECSPERHOUR); + rem %= SECSPERHOUR; + tmp->tm_min = (int) (rem / SECSPERMIN); + /* + ** A positive leap second requires a special + ** representation. This uses "... ??:59:60" et seq. + */ + tmp->tm_sec = (int) (rem % SECSPERMIN) + hit; + ip = mon_lengths[isleap(y)]; + for (tmp->tm_mon = 0; idays >= ip[tmp->tm_mon]; ++(tmp->tm_mon)) + idays -= ip[tmp->tm_mon]; + tmp->tm_mday = (int) (idays + 1); + tmp->tm_isdst = 0; +#ifdef TM_GMTOFF + tmp->TM_GMTOFF = offset; +#endif /* defined TM_GMTOFF */ + return tmp; +out_of_range: + errno = EOVERFLOW; + return NULL; +} + +char * +ctime(const time_t *timep) +{ +/* +** Section 4.12.3.2 of X3.159-1989 requires that +** The ctime function converts the calendar time pointed to by timer +** to local time in the form of a string. It is equivalent to +** asctime(localtime(timer)) +*/ + struct tm *tmp = localtime(timep); + return tmp ? asctime(tmp) : NULL; +} + +char * +ctime_r(const time_t *timep, char *buf) +{ + struct tm mytm; + struct tm *tmp = localtime_r(timep, &mytm); + return tmp ? asctime_r(tmp, buf) : NULL; +} + +char * +ctime_rz(const timezone_t sp, const time_t * timep, char *buf) +{ + struct tm mytm, *rtm; + + rtm = localtime_rz(sp, timep, &mytm); + if (rtm == NULL) + return NULL; + return asctime_r(rtm, buf); +} + +/* +** Adapted from code provided by Robert Elz, who writes: +** The "best" way to do mktime I think is based on an idea of Bob +** Kridle's (so its said...) from a long time ago. +** It does a binary search of the time_t space. Since time_t's are +** just 32 bits, its a max of 32 iterations (even at 64 bits it +** would still be very reasonable). +*/ + +#ifndef WRONG +#define WRONG ((time_t)-1) +#endif /* !defined WRONG */ + +/* +** Normalize logic courtesy Paul Eggert. +*/ + +static bool +increment_overflow(int *ip, int j) +{ + int const i = *ip; + + /* + ** If i >= 0 there can only be overflow if i + j > INT_MAX + ** or if j > INT_MAX - i; given i >= 0, INT_MAX - i cannot overflow. + ** If i < 0 there can only be overflow if i + j < INT_MIN + ** or if j < INT_MIN - i; given i < 0, INT_MIN - i cannot overflow. + */ + if ((i >= 0) ? (j > INT_MAX - i) : (j < INT_MIN - i)) + return true; + *ip += j; + return false; +} + +static bool +increment_overflow32(int_fast32_t *const lp, int const m) +{ + int_fast32_t const l = *lp; + + if ((l >= 0) ? (m > INT_FAST32_MAX - l) : (m < INT_FAST32_MIN - l)) + return true; + *lp += m; + return false; +} + +static bool +increment_overflow_time(time_t *tp, int_fast32_t j) +{ + /* + ** This is like + ** 'if (! (TIME_T_MIN <= *tp + j && *tp + j <= TIME_T_MAX)) ...', + ** except that it does the right thing even if *tp + j would overflow. + */ + if (! (j < 0 + ? (TYPE_SIGNED(time_t) ? TIME_T_MIN - j <= *tp : -1 - j < *tp) + : *tp <= TIME_T_MAX - j)) + return true; + *tp += j; + return false; +} + +static bool +normalize_overflow(int *const tensptr, int *const unitsptr, const int base) +{ + int tensdelta; + + tensdelta = (*unitsptr >= 0) ? + (*unitsptr / base) : + (-1 - (-1 - *unitsptr) / base); + *unitsptr -= tensdelta * base; + return increment_overflow(tensptr, tensdelta); +} + +static bool +normalize_overflow32(int_fast32_t *tensptr, int *unitsptr, int base) +{ + int tensdelta; + + tensdelta = (*unitsptr >= 0) ? + (*unitsptr / base) : + (-1 - (-1 - *unitsptr) / base); + *unitsptr -= tensdelta * base; + return increment_overflow32(tensptr, tensdelta); +} + +static int +tmcomp(const struct tm *const atmp, + const struct tm *const btmp) +{ + int result; + + if (atmp->tm_year != btmp->tm_year) + return atmp->tm_year < btmp->tm_year ? -1 : 1; + if ((result = (atmp->tm_mon - btmp->tm_mon)) == 0 && + (result = (atmp->tm_mday - btmp->tm_mday)) == 0 && + (result = (atmp->tm_hour - btmp->tm_hour)) == 0 && + (result = (atmp->tm_min - btmp->tm_min)) == 0) + result = atmp->tm_sec - btmp->tm_sec; + return result; +} + +static time_t +time2sub(struct tm *const tmp, + struct tm *(*funcp)(struct state const *, time_t const *, + int_fast32_t, struct tm *), + struct state const *sp, + const int_fast32_t offset, + bool *okayp, + bool do_norm_secs) +{ + int dir; + int i, j; + int saved_seconds; + int_fast32_t li; + time_t lo; + time_t hi; +#ifdef NO_ERROR_IN_DST_GAP + time_t ilo; +#endif + int_fast32_t y; + time_t newt; + time_t t; + struct tm yourtm, mytm; + + *okayp = false; + yourtm = *tmp; +#ifdef NO_ERROR_IN_DST_GAP +again: +#endif + if (do_norm_secs) { + if (normalize_overflow(&yourtm.tm_min, &yourtm.tm_sec, + SECSPERMIN)) + goto out_of_range; + } + if (normalize_overflow(&yourtm.tm_hour, &yourtm.tm_min, MINSPERHOUR)) + goto out_of_range; + if (normalize_overflow(&yourtm.tm_mday, &yourtm.tm_hour, HOURSPERDAY)) + goto out_of_range; + y = yourtm.tm_year; + if (normalize_overflow32(&y, &yourtm.tm_mon, MONSPERYEAR)) + goto out_of_range; + /* + ** Turn y into an actual year number for now. + ** It is converted back to an offset from TM_YEAR_BASE later. + */ + if (increment_overflow32(&y, TM_YEAR_BASE)) + goto out_of_range; + while (yourtm.tm_mday <= 0) { + if (increment_overflow32(&y, -1)) + goto out_of_range; + li = y + (1 < yourtm.tm_mon); + yourtm.tm_mday += year_lengths[isleap(li)]; + } + while (yourtm.tm_mday > DAYSPERLYEAR) { + li = y + (1 < yourtm.tm_mon); + yourtm.tm_mday -= year_lengths[isleap(li)]; + if (increment_overflow32(&y, 1)) + goto out_of_range; + } + for ( ; ; ) { + i = mon_lengths[isleap(y)][yourtm.tm_mon]; + if (yourtm.tm_mday <= i) + break; + yourtm.tm_mday -= i; + if (++yourtm.tm_mon >= MONSPERYEAR) { + yourtm.tm_mon = 0; + if (increment_overflow32(&y, 1)) + goto out_of_range; + } + } + if (increment_overflow32(&y, -TM_YEAR_BASE)) + goto out_of_range; + if (! (INT_MIN <= y && y <= INT_MAX)) + goto out_of_range; + yourtm.tm_year = (int)y; + if (yourtm.tm_sec >= 0 && yourtm.tm_sec < SECSPERMIN) + saved_seconds = 0; + else if (y + TM_YEAR_BASE < EPOCH_YEAR) { + /* + ** We can't set tm_sec to 0, because that might push the + ** time below the minimum representable time. + ** Set tm_sec to 59 instead. + ** This assumes that the minimum representable time is + ** not in the same minute that a leap second was deleted from, + ** which is a safer assumption than using 58 would be. + */ + if (increment_overflow(&yourtm.tm_sec, 1 - SECSPERMIN)) + goto out_of_range; + saved_seconds = yourtm.tm_sec; + yourtm.tm_sec = SECSPERMIN - 1; + } else { + saved_seconds = yourtm.tm_sec; + yourtm.tm_sec = 0; + } + /* + ** Do a binary search (this works whatever time_t's type is). + */ + lo = TIME_T_MIN; + hi = TIME_T_MAX; +#ifdef NO_ERROR_IN_DST_GAP + ilo = lo; +#endif + for ( ; ; ) { + t = lo / 2 + hi / 2; + if (t < lo) + t = lo; + else if (t > hi) + t = hi; + if (! funcp(sp, &t, offset, &mytm)) { + /* + ** Assume that t is too extreme to be represented in + ** a struct tm; arrange things so that it is less + ** extreme on the next pass. + */ + dir = (t > 0) ? 1 : -1; + } else dir = tmcomp(&mytm, &yourtm); + if (dir != 0) { + if (t == lo) { + if (t == TIME_T_MAX) + goto out_of_range; + ++t; + ++lo; + } else if (t == hi) { + if (t == TIME_T_MIN) + goto out_of_range; + --t; + --hi; + } +#ifdef NO_ERROR_IN_DST_GAP + if (ilo != lo && lo - 1 == hi && yourtm.tm_isdst < 0 && + do_norm_secs) { + for (i = sp->typecnt - 1; i >= 0; --i) { + for (j = sp->typecnt - 1; j >= 0; --j) { + time_t off; + if (sp->ttis[j].tt_isdst == + sp->ttis[i].tt_isdst) + continue; + off = sp->ttis[j].tt_utoff - + sp->ttis[i].tt_utoff; + yourtm.tm_sec += off < 0 ? + -off : off; + goto again; + } + } + } +#endif + if (lo > hi) + goto invalid; + if (dir > 0) + hi = t; + else lo = t; + continue; + } +#if defined TM_GMTOFF && ! UNINIT_TRAP + if (mytm.TM_GMTOFF != yourtm.TM_GMTOFF + && (yourtm.TM_GMTOFF < 0 + ? (-SECSPERDAY <= yourtm.TM_GMTOFF + && (mytm.TM_GMTOFF <= + (/*CONSTCOND*/SMALLEST (INT_FAST32_MAX, LONG_MAX) + + yourtm.TM_GMTOFF))) + : (yourtm.TM_GMTOFF <= SECSPERDAY + && ((/*CONSTCOND*/BIGGEST (INT_FAST32_MIN, LONG_MIN) + + yourtm.TM_GMTOFF) + <= mytm.TM_GMTOFF)))) { + /* MYTM matches YOURTM except with the wrong UT offset. + YOURTM.TM_GMTOFF is plausible, so try it instead. + It's OK if YOURTM.TM_GMTOFF contains uninitialized data, + since the guess gets checked. */ + time_t altt = t; + int_fast32_t diff = (int_fast32_t) + (mytm.TM_GMTOFF - yourtm.TM_GMTOFF); + if (!increment_overflow_time(&altt, diff)) { + struct tm alttm; + if (! funcp(sp, &altt, offset, &alttm) + && alttm.tm_isdst == mytm.tm_isdst + && alttm.TM_GMTOFF == yourtm.TM_GMTOFF + && tmcomp(&alttm, &yourtm)) { + t = altt; + mytm = alttm; + } + } + } +#endif + if (yourtm.tm_isdst < 0 || mytm.tm_isdst == yourtm.tm_isdst) + break; + /* + ** Right time, wrong type. + ** Hunt for right time, right type. + ** It's okay to guess wrong since the guess + ** gets checked. + */ + if (sp == NULL) + goto invalid; + for (i = sp->typecnt - 1; i >= 0; --i) { + if (sp->ttis[i].tt_isdst != yourtm.tm_isdst) + continue; + for (j = sp->typecnt - 1; j >= 0; --j) { + if (sp->ttis[j].tt_isdst == yourtm.tm_isdst) + continue; + newt = (time_t)(t + sp->ttis[j].tt_utoff - + sp->ttis[i].tt_utoff); + if (! funcp(sp, &newt, offset, &mytm)) + continue; + if (tmcomp(&mytm, &yourtm) != 0) + continue; + if (mytm.tm_isdst != yourtm.tm_isdst) + continue; + /* + ** We have a match. + */ + t = newt; + goto label; + } + } + goto invalid; + } +label: + newt = t + saved_seconds; + if ((newt < t) != (saved_seconds < 0)) + goto out_of_range; + t = newt; + if (funcp(sp, &t, offset, tmp)) { + *okayp = true; + return t; + } +out_of_range: + errno = EOVERFLOW; + return WRONG; +invalid: + errno = EINVAL; + return WRONG; +} + +static time_t +time2(struct tm * const tmp, + struct tm *(*funcp)(struct state const *, time_t const *, + int_fast32_t, struct tm *), + struct state const *sp, + const int_fast32_t offset, + bool *okayp) +{ + time_t t; + + /* + ** First try without normalization of seconds + ** (in case tm_sec contains a value associated with a leap second). + ** If that fails, try with normalization of seconds. + */ + t = time2sub(tmp, funcp, sp, offset, okayp, false); + return *okayp ? t : time2sub(tmp, funcp, sp, offset, okayp, true); +} + +static time_t +time1(struct tm *const tmp, + struct tm *(*funcp) (struct state const *, time_t const *, + int_fast32_t, struct tm *), + struct state const *sp, + const int_fast32_t offset) +{ + time_t t; + int samei, otheri; + int sameind, otherind; + int i; + int nseen; + int save_errno; + char seen[TZ_MAX_TYPES]; + unsigned char types[TZ_MAX_TYPES]; + bool okay; + + if (tmp == NULL) { + errno = EINVAL; + return WRONG; + } + if (tmp->tm_isdst > 1) + tmp->tm_isdst = 1; + save_errno = errno; + t = time2(tmp, funcp, sp, offset, &okay); + if (okay) { + errno = save_errno; + return t; + } + if (tmp->tm_isdst < 0) +#ifdef PCTS + /* + ** POSIX Conformance Test Suite code courtesy Grant Sullivan. + */ + tmp->tm_isdst = 0; /* reset to std and try again */ +#else + return t; +#endif /* !defined PCTS */ + /* + ** We're supposed to assume that somebody took a time of one type + ** and did some math on it that yielded a "struct tm" that's bad. + ** We try to divine the type they started from and adjust to the + ** type they need. + */ + if (sp == NULL) { + errno = EINVAL; + return WRONG; + } + for (i = 0; i < sp->typecnt; ++i) + seen[i] = false; + nseen = 0; + for (i = sp->timecnt - 1; i >= 0; --i) + if (!seen[sp->types[i]]) { + seen[sp->types[i]] = true; + types[nseen++] = sp->types[i]; + } + for (sameind = 0; sameind < nseen; ++sameind) { + samei = types[sameind]; + if (sp->ttis[samei].tt_isdst != tmp->tm_isdst) + continue; + for (otherind = 0; otherind < nseen; ++otherind) { + otheri = types[otherind]; + if (sp->ttis[otheri].tt_isdst == tmp->tm_isdst) + continue; + tmp->tm_sec += (int)(sp->ttis[otheri].tt_utoff - + sp->ttis[samei].tt_utoff); + tmp->tm_isdst = !tmp->tm_isdst; + t = time2(tmp, funcp, sp, offset, &okay); + if (okay) { + errno = save_errno; + return t; + } + tmp->tm_sec -= (int)(sp->ttis[otheri].tt_utoff - + sp->ttis[samei].tt_utoff); + tmp->tm_isdst = !tmp->tm_isdst; + } + } + errno = EOVERFLOW; + return WRONG; +} + +static time_t +mktime_tzname(timezone_t sp, struct tm *tmp, bool setname) +{ + if (sp) + return time1(tmp, localsub, sp, setname); + else { + gmtcheck(); + return time1(tmp, gmtsub, gmtptr, 0); + } +} + +#if NETBSD_INSPIRED + +time_t +mktime_z(timezone_t sp, struct tm *const tmp) +{ + return mktime_tzname(sp, tmp, false); +} + +#endif + +time_t +mktime(struct tm *tmp) +{ + time_t t; + + rwlock_wrlock(&__lcl_lock); + tzset_unlocked(); + t = mktime_tzname(__lclptr, tmp, true); + rwlock_unlock(&__lcl_lock); + return t; +} + +#ifdef STD_INSPIRED + +time_t +timelocal_z(const timezone_t sp, struct tm *const tmp) +{ + if (tmp != NULL) + tmp->tm_isdst = -1; /* in case it wasn't initialized */ + return mktime_z(sp, tmp); +} + +time_t +timelocal(struct tm *tmp) +{ + if (tmp != NULL) + tmp->tm_isdst = -1; /* in case it wasn't initialized */ + return mktime(tmp); +} + +time_t +timegm(struct tm *tmp) +{ + + return timeoff(tmp, 0); +} + +time_t +timeoff(struct tm *tmp, long offset) +{ + if (tmp) + tmp->tm_isdst = 0; + gmtcheck(); + return time1(tmp, gmtsub, gmtptr, (int_fast32_t)offset); +} + +#endif /* defined STD_INSPIRED */ + +/* +** XXX--is the below the right way to conditionalize?? +*/ + +#ifdef STD_INSPIRED + +/* +** IEEE Std 1003.1 (POSIX) says that 536457599 +** shall correspond to "Wed Dec 31 23:59:59 UTC 1986", which +** is not the case if we are accounting for leap seconds. +** So, we provide the following conversion routines for use +** when exchanging timestamps with POSIX conforming systems. +*/ + +static int_fast64_t +leapcorr(const timezone_t sp, time_t t) +{ + struct lsinfo const * lp; + int i; + + i = sp->leapcnt; + while (--i >= 0) { + lp = &sp->lsis[i]; + if (t >= lp->ls_trans) + return lp->ls_corr; + } + return 0; +} + +NETBSD_INSPIRED_EXTERN time_t +time2posix_z(timezone_t sp, time_t t) +{ + return (time_t)(t - leapcorr(sp, t)); +} + +time_t +time2posix(time_t t) +{ + rwlock_wrlock(&__lcl_lock); + if (!lcl_is_set) + tzset_unlocked(); + if (__lclptr) + t = (time_t)(t - leapcorr(__lclptr, t)); + rwlock_unlock(&__lcl_lock); + return t; +} + +NETBSD_INSPIRED_EXTERN time_t +posix2time_z(timezone_t sp, time_t t) +{ + time_t x; + time_t y; + + /* + ** For a positive leap second hit, the result + ** is not unique. For a negative leap second + ** hit, the corresponding time doesn't exist, + ** so we return an adjacent second. + */ + x = (time_t)(t + leapcorr(sp, t)); + y = (time_t)(x - leapcorr(sp, x)); + if (y < t) { + do { + x++; + y = (time_t)(x - leapcorr(sp, x)); + } while (y < t); + x -= y != t; + } else if (y > t) { + do { + --x; + y = (time_t)(x - leapcorr(sp, x)); + } while (y > t); + x += y != t; + } + return x; +} + +time_t +posix2time(time_t t) +{ + rwlock_wrlock(&__lcl_lock); + if (!lcl_is_set) + tzset_unlocked(); + if (__lclptr) + t = posix2time_z(__lclptr, t); + rwlock_unlock(&__lcl_lock); + return t; +} + +#endif /* defined STD_INSPIRED */ diff --git a/winsup/cygwin/tzcode/namespace.h b/winsup/cygwin/tzcode/namespace.h new file mode 100644 index 000000000..e69de29bb diff --git a/winsup/cygwin/tzcode/private.h b/winsup/cygwin/tzcode/private.h new file mode 100644 index 000000000..830750ad5 --- /dev/null +++ b/winsup/cygwin/tzcode/private.h @@ -0,0 +1,795 @@ +/* Private header for tzdb code. */ + +/* $NetBSD: private.h,v 1.55 2019/04/04 22:03:23 christos Exp $ */ + +#ifndef PRIVATE_H +#define PRIVATE_H + +/* NetBSD defaults */ +#define TM_GMTOFF tm_gmtoff +#define TM_ZONE tm_zone +#define STD_INSPIRED 1 +#define HAVE_LONG_DOUBLE 1 + +/* For when we build zic as a host tool. */ +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + +/* +** This file is in the public domain, so clarified as of +** 1996-06-05 by Arthur David Olson. +*/ + +/* +** This header is for use ONLY with the time conversion code. +** There is no guarantee that it will remain unchanged, +** or that it will remain at all. +** Do NOT copy it to any system include directory. +** Thank you! +*/ + +/* +** zdump has been made independent of the rest of the time +** conversion package to increase confidence in the verification it provides. +** You can use zdump to help in verifying other implementations. +** To do this, compile with -DUSE_LTZ=0 and link without the tz library. +*/ +#ifndef USE_LTZ +# define USE_LTZ 1 +#endif + +/* This string was in the Factory zone through version 2016f. */ +#define GRANDPARENTED "Local time zone must be set--see zic manual page" + +/* +** Defaults for preprocessor symbols. +** You can override these in your C compiler options, e.g. '-DHAVE_GETTEXT=1'. +*/ + +#ifndef HAVE_DECL_ASCTIME_R +#define HAVE_DECL_ASCTIME_R 1 +#endif + +#if !defined HAVE_GENERIC && defined __has_extension +# if __has_extension(c_generic_selections) +# define HAVE_GENERIC 1 +# else +# define HAVE_GENERIC 0 +# endif +#endif +/* _Generic is buggy in pre-4.9 GCC. */ +#if !defined HAVE_GENERIC && defined __GNUC__ +# define HAVE_GENERIC (4 < __GNUC__ + (9 <= __GNUC_MINOR__)) +#endif +#ifndef HAVE_GENERIC +# define HAVE_GENERIC (201112 <= __STDC_VERSION__) +#endif + +#ifndef HAVE_GETTEXT +#define HAVE_GETTEXT 0 +#endif /* !defined HAVE_GETTEXT */ + +#ifndef HAVE_INCOMPATIBLE_CTIME_R +#define HAVE_INCOMPATIBLE_CTIME_R 0 +#endif + +#ifndef HAVE_LINK +#define HAVE_LINK 1 +#endif /* !defined HAVE_LINK */ + +#ifndef HAVE_POSIX_DECLS +#define HAVE_POSIX_DECLS 1 +#endif + +#ifndef HAVE_STDBOOL_H +#define HAVE_STDBOOL_H (199901 <= __STDC_VERSION__) +#endif + +#ifndef HAVE_STRDUP +#define HAVE_STRDUP 1 +#endif + +#ifndef HAVE_STRTOLL +#define HAVE_STRTOLL 1 +#endif + +#ifndef HAVE_SYMLINK +#define HAVE_SYMLINK 1 +#endif /* !defined HAVE_SYMLINK */ + +#ifndef HAVE_SYS_STAT_H +#define HAVE_SYS_STAT_H 1 +#endif /* !defined HAVE_SYS_STAT_H */ + +#ifndef HAVE_SYS_WAIT_H +#define HAVE_SYS_WAIT_H 1 +#endif /* !defined HAVE_SYS_WAIT_H */ + +#ifndef HAVE_UNISTD_H +#define HAVE_UNISTD_H 1 +#endif /* !defined HAVE_UNISTD_H */ + +#ifndef HAVE_UTMPX_H +#define HAVE_UTMPX_H 1 +#endif /* !defined HAVE_UTMPX_H */ + +#ifndef NETBSD_INSPIRED +# define NETBSD_INSPIRED 1 +#endif + +#if HAVE_INCOMPATIBLE_CTIME_R +#define asctime_r _incompatible_asctime_r +#define ctime_r _incompatible_ctime_r +#endif /* HAVE_INCOMPATIBLE_CTIME_R */ + +/* Enable tm_gmtoff, tm_zone, and environ on GNUish systems. */ +#define _GNU_SOURCE 1 +/* Fix asctime_r on Solaris 11. */ +#define _POSIX_PTHREAD_SEMANTICS 1 +/* Enable strtoimax on pre-C99 Solaris 11. */ +#define __EXTENSIONS__ 1 + +/* To avoid having 'stat' fail unnecessarily with errno == EOVERFLOW, + enable large files on GNUish systems ... */ +#ifndef _FILE_OFFSET_BITS +# define _FILE_OFFSET_BITS 64 +#endif +/* ... and on AIX ... */ +#define _LARGE_FILES 1 +/* ... and enable large inode numbers on Mac OS X 10.5 and later. */ +#define _DARWIN_USE_64_BIT_INODE 1 + +/* +** Nested includes +*/ + +#ifndef __NetBSD__ +/* Avoid clashes with NetBSD by renaming NetBSD's declarations. */ +#define localtime_rz sys_localtime_rz +#define mktime_z sys_mktime_z +#define posix2time_z sys_posix2time_z +#define time2posix_z sys_time2posix_z +#define timezone_t sys_timezone_t +#define tzalloc sys_tzalloc +#define tzfree sys_tzfree +#include +#undef localtime_rz +#undef mktime_z +#undef posix2time_z +#undef time2posix_z +#undef timezone_t +#undef tzalloc +#undef tzfree +#else +#include "time.h" +#endif + +#include /* for time_t */ +#include +#include /* for CHAR_BIT et al. */ +#include + +#include + +#ifndef ENAMETOOLONG +# define ENAMETOOLONG EINVAL +#endif +#ifndef ENOTSUP +# define ENOTSUP EINVAL +#endif +#ifndef EOVERFLOW +# define EOVERFLOW EINVAL +#endif + +#if HAVE_GETTEXT +#include +#endif /* HAVE_GETTEXT */ + +#if HAVE_UNISTD_H +#include /* for R_OK, and other POSIX goodness */ +#endif /* HAVE_UNISTD_H */ + +#ifndef HAVE_STRFTIME_L +# if _POSIX_VERSION < 200809 +# define HAVE_STRFTIME_L 0 +# else +# define HAVE_STRFTIME_L 1 +# endif +#endif + +#ifndef USG_COMPAT +# ifndef _XOPEN_VERSION +# define USG_COMPAT 0 +# else +# define USG_COMPAT 1 +# endif +#endif + +#ifndef HAVE_TZNAME +# if _POSIX_VERSION < 198808 && !USG_COMPAT +# define HAVE_TZNAME 0 +# else +# define HAVE_TZNAME 1 +# endif +#endif + +#ifndef R_OK +#define R_OK 4 +#endif /* !defined R_OK */ + +/* Unlike 's isdigit, this also works if c < 0 | c > UCHAR_MAX. */ +#define is_digit(c) ((unsigned)(c) - '0' <= 9) + +/* +** Define HAVE_STDINT_H's default value here, rather than at the +** start, since __GLIBC__ and INTMAX_MAX's values depend on +** previously-included files. glibc 2.1 and Solaris 10 and later have +** stdint.h, even with pre-C99 compilers. +*/ +#ifndef HAVE_STDINT_H +#define HAVE_STDINT_H \ + (199901 <= __STDC_VERSION__ \ + || 2 < __GLIBC__ + (1 <= __GLIBC_MINOR__) \ + || __CYGWIN__ || INTMAX_MAX) +#endif /* !defined HAVE_STDINT_H */ + +#if HAVE_STDINT_H +#include +#endif /* !HAVE_STDINT_H */ + +#ifndef HAVE_INTTYPES_H +# define HAVE_INTTYPES_H HAVE_STDINT_H +#endif +#if HAVE_INTTYPES_H +# include +#endif + +/* Pre-C99 GCC compilers define __LONG_LONG_MAX__ instead of LLONG_MAX. */ +#ifdef __LONG_LONG_MAX__ +# ifndef LLONG_MAX +# define LLONG_MAX __LONG_LONG_MAX__ +# endif +# ifndef LLONG_MIN +# define LLONG_MIN (-1 - LLONG_MAX) +# endif +#endif + +#ifndef INT_FAST64_MAX +# ifdef LLONG_MAX +typedef long long int_fast64_t; +# define INT_FAST64_MIN LLONG_MIN +# define INT_FAST64_MAX LLONG_MAX +# else +# if LONG_MAX >> 31 < 0xffffffff +Please use a compiler that supports a 64-bit integer type (or wider); +you may need to compile with "-DHAVE_STDINT_H". +# endif +typedef long int_fast64_t; +# define INT_FAST64_MIN LONG_MIN +# define INT_FAST64_MAX LONG_MAX +# endif +#endif + +#ifndef PRIdFAST64 +# if INT_FAST64_MAX == LLONG_MAX +# define PRIdFAST64 "lld" +# else +# define PRIdFAST64 "ld" +# endif +#endif + +#ifndef SCNdFAST64 +# define SCNdFAST64 PRIdFAST64 +#endif + +#ifndef INT_FAST32_MAX +# if INT_MAX >> 31 == 0 +typedef long int_fast32_t; +# define INT_FAST32_MAX LONG_MAX +# define INT_FAST32_MIN LONG_MIN +# else +typedef int int_fast32_t; +# define INT_FAST32_MAX INT_MAX +# define INT_FAST32_MIN INT_MIN +# endif +#endif + +#ifndef INTMAX_MAX +# ifdef LLONG_MAX +typedef long long intmax_t; +# if HAVE_STRTOLL +# define strtoimax strtoll +# endif +# define INTMAX_MAX LLONG_MAX +# define INTMAX_MIN LLONG_MIN +# else +typedef long intmax_t; +# define INTMAX_MAX LONG_MAX +# define INTMAX_MIN LONG_MIN +# endif +# ifndef strtoimax +# define strtoimax strtol +# endif +#endif + +#ifndef PRIdMAX +# if INTMAX_MAX == LLONG_MAX +# define PRIdMAX "lld" +# else +# define PRIdMAX "ld" +# endif +#endif + +#ifndef UINT_FAST64_MAX +# if defined ULLONG_MAX || defined __LONG_LONG_MAX__ +typedef unsigned long long uint_fast64_t; +# else +# if ULONG_MAX >> 31 >> 1 < 0xffffffff +Please use a compiler that supports a 64-bit integer type (or wider); +you may need to compile with "-DHAVE_STDINT_H". +# endif +typedef unsigned long uint_fast64_t; +# endif +#endif + +#ifndef UINTMAX_MAX +# if defined ULLONG_MAX || defined __LONG_LONG_MAX__ +typedef unsigned long long uintmax_t; +# else +typedef unsigned long uintmax_t; +# endif +#endif + +#ifndef PRIuMAX +# if defined ULLONG_MAX || defined __LONG_LONG_MAX__ +# define PRIuMAX "llu" +# else +# define PRIuMAX "lu" +# endif +#endif + +#ifndef INT32_MAX +#define INT32_MAX 0x7fffffff +#endif /* !defined INT32_MAX */ +#ifndef INT32_MIN +#define INT32_MIN (-1 - INT32_MAX) +#endif /* !defined INT32_MIN */ + +#ifndef SIZE_MAX +#define SIZE_MAX ((size_t) -1) +#endif + +#if 3 <= __GNUC__ +# define ATTRIBUTE_CONST __attribute__ ((__const__)) +# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# define ATTRIBUTE_PURE __attribute__ ((__pure__)) +# define ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) +#else +# define ATTRIBUTE_CONST /* empty */ +# define ATTRIBUTE_MALLOC /* empty */ +# define ATTRIBUTE_PURE /* empty */ +# define ATTRIBUTE_FORMAT(spec) /* empty */ +#endif + +#if !defined _Noreturn && __STDC_VERSION__ < 201112 +# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__) +# define _Noreturn __attribute__ ((__noreturn__)) +# else +# define _Noreturn +# endif +#endif + +#if __STDC_VERSION__ < 199901 && !defined restrict +# define restrict /* empty */ +#endif + +/* +** Workarounds for compilers/systems. +*/ + +#ifndef EPOCH_LOCAL +# define EPOCH_LOCAL 0 +#endif +#ifndef EPOCH_OFFSET +# define EPOCH_OFFSET 0 +#endif +#ifndef RESERVE_STD_EXT_IDS +# define RESERVE_STD_EXT_IDS 0 +#endif + +/* If standard C identifiers with external linkage (e.g., localtime) + are reserved and are not already being renamed anyway, rename them + as if compiling with '-Dtime_tz=time_t'. */ +#if !defined time_tz && RESERVE_STD_EXT_IDS && USE_LTZ +# define time_tz time_t +#endif + +/* +** Compile with -Dtime_tz=T to build the tz package with a private +** time_t type equivalent to T rather than the system-supplied time_t. +** This debugging feature can test unusual design decisions +** (e.g., time_t wider than 'long', or unsigned time_t) even on +** typical platforms. +*/ +#if defined time_tz || EPOCH_LOCAL || EPOCH_OFFSET != 0 +# define TZ_TIME_T 1 +#else +# define TZ_TIME_T 0 +#endif + +#if TZ_TIME_T +# ifdef LOCALTIME_IMPLEMENTATION +static time_t sys_time(time_t *x) { return time(x); } +# endif + +typedef time_tz tz_time_t; + +# undef ctime +# define ctime tz_ctime +# undef ctime_r +# define ctime_r tz_ctime_r +# undef difftime +# define difftime tz_difftime +# undef gmtime +# define gmtime tz_gmtime +# undef gmtime_r +# define gmtime_r tz_gmtime_r +# undef localtime +# define localtime tz_localtime +# undef localtime_r +# define localtime_r tz_localtime_r +# undef localtime_rz +# define localtime_rz tz_localtime_rz +# undef mktime +# define mktime tz_mktime +# undef mktime_z +# define mktime_z tz_mktime_z +# undef offtime +# define offtime tz_offtime +# undef posix2time +# define posix2time tz_posix2time +# undef posix2time_z +# define posix2time_z tz_posix2time_z +# undef strftime +# define strftime tz_strftime +# undef time +# define time tz_time +# undef time2posix +# define time2posix tz_time2posix +# undef time2posix_z +# define time2posix_z tz_time2posix_z +# undef time_t +# define time_t tz_time_t +# undef timegm +# define timegm tz_timegm +# undef timelocal +# define timelocal tz_timelocal +# undef timeoff +# define timeoff tz_timeoff +# undef tzalloc +# define tzalloc tz_tzalloc +# undef tzfree +# define tzfree tz_tzfree +# undef tzset +# define tzset tz_tzset +# undef tzsetwall +# define tzsetwall tz_tzsetwall +# if HAVE_STRFTIME_L +# undef strftime_l +# define strftime_l tz_strftime_l +# endif +# if HAVE_TZNAME +# undef tzname +# define tzname tz_tzname +# endif +# if USG_COMPAT +# undef daylight +# define daylight tz_daylight +# undef timezone +# define timezone tz_timezone +# endif +# ifdef ALTZONE +# undef altzone +# define altzone tz_altzone +# endif + +char *ctime(time_t const *); +char *ctime_r(time_t const *, char *); +double difftime(time_t, time_t) ATTRIBUTE_CONST; +size_t strftime(char *restrict, size_t, char const *restrict, + struct tm const *restrict); +# if HAVE_STRFTIME_L +size_t strftime_l(char *restrict, size_t, char const *restrict, + struct tm const *restrict, locale_t); +# endif +struct tm *gmtime(time_t const *); +struct tm *gmtime_r(time_t const *restrict, struct tm *restrict); +struct tm *localtime(time_t const *); +struct tm *localtime_r(time_t const *restrict, struct tm *restrict); +time_t mktime(struct tm *); +time_t time(time_t *); +void tzset(void); +#endif + +#if !HAVE_DECL_ASCTIME_R && !defined asctime_r +extern char *asctime_r(struct tm const *restrict, char *restrict); +#endif + +#ifndef HAVE_DECL_ENVIRON +# if defined environ || defined __USE_GNU +# define HAVE_DECL_ENVIRON 1 +# else +# define HAVE_DECL_ENVIRON 0 +# endif +#endif + +#if !HAVE_DECL_ENVIRON +extern char **environ; +#endif + +#if TZ_TIME_T || !HAVE_POSIX_DECLS +# if HAVE_TZNAME +extern char *tzname[]; +# endif +# if USG_COMPAT +extern long timezone; +extern int daylight; +# endif +#endif + +#ifdef ALTZONE +extern long altzone; +#endif + +/* +** The STD_INSPIRED functions are similar, but most also need +** declarations if time_tz is defined. +*/ + +#ifdef STD_INSPIRED +# if TZ_TIME_T || !defined tzsetwall +void tzsetwall(void); +# endif +# if TZ_TIME_T || !defined offtime +struct tm *offtime(time_t const *, long); +# endif +# if TZ_TIME_T || !defined timegm +time_t timegm(struct tm *); +# endif +# if TZ_TIME_T || !defined timelocal +time_t timelocal(struct tm *); +# endif +# if TZ_TIME_T || !defined timeoff +time_t timeoff(struct tm *, long); +# endif +# if TZ_TIME_T || !defined time2posix +time_t time2posix(time_t); +# endif +# if TZ_TIME_T || !defined posix2time +time_t posix2time(time_t); +# endif +#endif + +/* Infer TM_ZONE on systems where this information is known, but suppress + guessing if NO_TM_ZONE is defined. Similarly for TM_GMTOFF. */ +#if (defined __GLIBC__ \ + || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ \ + || (defined __APPLE__ && defined __MACH__)) +# if !defined TM_GMTOFF && !defined NO_TM_GMTOFF +# define TM_GMTOFF tm_gmtoff +# endif +# if !defined TM_ZONE && !defined NO_TM_ZONE +# define TM_ZONE tm_zone +# endif +#endif + +/* +** Define functions that are ABI compatible with NetBSD but have +** better prototypes. NetBSD 6.1.4 defines a pointer type timezone_t +** and labors under the misconception that 'const timezone_t' is a +** pointer to a constant. This use of 'const' is ineffective, so it +** is not done here. What we call 'struct state' NetBSD calls +** 'struct __state', but this is a private name so it doesn't matter. +*/ +#ifndef __NetBSD__ +#if NETBSD_INSPIRED +typedef struct state *timezone_t; +struct tm *localtime_rz(timezone_t restrict, time_t const *restrict, + struct tm *restrict); +time_t mktime_z(timezone_t restrict, struct tm *restrict); +timezone_t tzalloc(char const *); +void tzfree(timezone_t); +# ifdef STD_INSPIRED +# if TZ_TIME_T || !defined posix2time_z +time_t posix2time_z(timezone_t __restrict, time_t) ATTRIBUTE_PURE; +# endif +# if TZ_TIME_T || !defined time2posix_z +time_t time2posix_z(timezone_t __restrict, time_t) ATTRIBUTE_PURE; +# endif +# endif +#endif +#endif + +/* +** Finally, some convenience items. +*/ + +#if HAVE_STDBOOL_H +# include +#else +# define true 1 +# define false 0 +# define bool int +#endif + +#define TYPE_BIT(type) (sizeof (type) * CHAR_BIT) +#define TYPE_SIGNED(type) (/*CONSTCOND*/((type) -1) < 0) +#define TWOS_COMPLEMENT(t) (/*CONSTCOND*/(t) ~ (t) 0 < 0) + +/* Max and min values of the integer type T, of which only the bottom + B bits are used, and where the highest-order used bit is considered + to be a sign bit if T is signed. */ +#define MAXVAL(t, b) /*LINTED*/ \ + ((t) (((t) 1 << ((b) - 1 - TYPE_SIGNED(t))) \ + - 1 + ((t) 1 << ((b) - 1 - TYPE_SIGNED(t))))) +#define MINVAL(t, b) \ + ((t) (TYPE_SIGNED(t) ? - TWOS_COMPLEMENT(t) - MAXVAL(t, b) : 0)) + +/* The extreme time values, assuming no padding. */ +#define TIME_T_MIN_NO_PADDING MINVAL(time_t, TYPE_BIT(time_t)) +#define TIME_T_MAX_NO_PADDING MAXVAL(time_t, TYPE_BIT(time_t)) + +/* The extreme time values. These are macros, not constants, so that + any portability problem occur only when compiling .c files that use + the macros, which is safer for applications that need only zdump and zic. + This implementation assumes no padding if time_t is signed and + either the compiler lacks support for _Generic or time_t is not one + of the standard signed integer types. */ +#if HAVE_GENERIC +# define TIME_T_MIN \ + _Generic((time_t) 0, \ + signed char: SCHAR_MIN, short: SHRT_MIN, \ + int: INT_MIN, long: LONG_MIN, long long: LLONG_MIN, \ + default: TIME_T_MIN_NO_PADDING) +# define TIME_T_MAX \ + (TYPE_SIGNED(time_t) \ + ? _Generic((time_t) 0, \ + signed char: SCHAR_MAX, short: SHRT_MAX, \ + int: INT_MAX, long: LONG_MAX, long long: LLONG_MAX, \ + default: TIME_T_MAX_NO_PADDING) \ + : (time_t) -1) +#else +# define TIME_T_MIN TIME_T_MIN_NO_PADDING +# define TIME_T_MAX TIME_T_MAX_NO_PADDING +#endif + +/* +** 302 / 1000 is log10(2.0) rounded up. +** Subtract one for the sign bit if the type is signed; +** add one for integer division truncation; +** add one more for a minus sign if the type is signed. +*/ +#define INT_STRLEN_MAXIMUM(type) \ + ((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + \ + 1 + TYPE_SIGNED(type)) + +/* +** INITIALIZE(x) +*/ + +#if defined(__GNUC__) || defined(__lint__) +# define INITIALIZE(x) ((x) = 0) +#else +# define INITIALIZE(x) +#endif + +#ifndef UNINIT_TRAP +# define UNINIT_TRAP 0 +#endif + +/* +** For the benefit of GNU folk... +** '_(MSGID)' uses the current locale's message library string for MSGID. +** The default is to use gettext if available, and use MSGID otherwise. +*/ + +#if HAVE_GETTEXT +#define _(msgid) gettext(msgid) +#else /* !HAVE_GETTEXT */ +#define _(msgid) msgid +#endif /* !HAVE_GETTEXT */ + +#if !defined TZ_DOMAIN && defined HAVE_GETTEXT +# define TZ_DOMAIN "tz" +#endif + +#if HAVE_INCOMPATIBLE_CTIME_R +#undef asctime_r +#undef ctime_r +char *asctime_r(struct tm const *, char *); +char *ctime_r(time_t const *, char *); +#endif /* HAVE_INCOMPATIBLE_CTIME_R */ + +/* Handy macros that are independent of tzfile implementation. */ + +#define YEARSPERREPEAT 400 /* years before a Gregorian repeat */ + +#define SECSPERMIN 60 +#define MINSPERHOUR 60 +#define HOURSPERDAY 24 +#define DAYSPERWEEK 7 +#define DAYSPERNYEAR 365 +#define DAYSPERLYEAR 366 +#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) +#define SECSPERDAY ((int_fast32_t) SECSPERHOUR * HOURSPERDAY) +#define MONSPERYEAR 12 + +#define TM_SUNDAY 0 +#define TM_MONDAY 1 +#define TM_TUESDAY 2 +#define TM_WEDNESDAY 3 +#define TM_THURSDAY 4 +#define TM_FRIDAY 5 +#define TM_SATURDAY 6 + +#define TM_JANUARY 0 +#define TM_FEBRUARY 1 +#define TM_MARCH 2 +#define TM_APRIL 3 +#define TM_MAY 4 +#define TM_JUNE 5 +#define TM_JULY 6 +#define TM_AUGUST 7 +#define TM_SEPTEMBER 8 +#define TM_OCTOBER 9 +#define TM_NOVEMBER 10 +#define TM_DECEMBER 11 + +#define TM_YEAR_BASE 1900 + +#define EPOCH_YEAR 1970 +#define EPOCH_WDAY TM_THURSDAY + +#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) + +/* +** Since everything in isleap is modulo 400 (or a factor of 400), we know that +** isleap(y) == isleap(y % 400) +** and so +** isleap(a + b) == isleap((a + b) % 400) +** or +** isleap(a + b) == isleap(a % 400 + b % 400) +** This is true even if % means modulo rather than Fortran remainder +** (which is allowed by C89 but not by C99 or later). +** We use this to avoid addition overflow problems. +*/ + +#define isleap_sum(a, b) isleap((a) % 400 + (b) % 400) + + +/* +** The Gregorian year averages 365.2425 days, which is 31556952 seconds. +*/ + +#define AVGSECSPERYEAR 31556952L +#define SECSPERREPEAT \ + ((int_fast64_t) YEARSPERREPEAT * (int_fast64_t) AVGSECSPERYEAR) +#define SECSPERREPEAT_BITS 34 /* ceil(log2(SECSPERREPEAT)) */ + +#ifdef _LIBC +#include "reentrant.h" +extern struct __state *__lclptr; +#if defined(__LIBC12_SOURCE__) +#define tzset_unlocked __tzset_unlocked +#else +#define tzset_unlocked __tzset_unlocked50 +#endif + +void tzset_unlocked(void); +#ifdef _REENTRANT +extern rwlock_t __lcl_lock; +#endif +#endif + +#endif /* !defined PRIVATE_H */ diff --git a/winsup/cygwin/tzcode/tzfile.h b/winsup/cygwin/tzcode/tzfile.h new file mode 100644 index 000000000..5c7a22239 --- /dev/null +++ b/winsup/cygwin/tzcode/tzfile.h @@ -0,0 +1,174 @@ +/* $NetBSD: tzfile.h,v 1.10 2019/07/03 15:49:21 christos Exp $ */ + +#ifndef _TZFILE_H_ +#define _TZFILE_H_ + +/* +** This file is in the public domain, so clarified as of +** 1996-06-05 by Arthur David Olson. +*/ + +/* +** This header is for use ONLY with the time conversion code. +** There is no guarantee that it will remain unchanged, +** or that it will remain at all. +** Do NOT copy it to any system include directory. +** Thank you! +*/ + +/* +** Information about time zone files. +*/ + +#ifndef TZDIR /* Time zone object file directory */ +#define TZDIR "/usr/share/zoneinfo" +#endif /* !defined TZDIR */ + +#ifndef TZDEFAULT +#define TZDEFAULT "/etc/localtime" +#endif /* !defined TZDEFAULT */ + +#ifndef TZDEFRULES +#define TZDEFRULES "posixrules" +#endif /* !defined TZDEFRULES */ + + +/* See Internet RFC 8536 for more details about the following format. */ + +/* +** Each file begins with. . . +*/ + +#define TZ_MAGIC "TZif" + +struct tzhead { + char tzh_magic[4]; /* TZ_MAGIC */ + char tzh_version[1]; /* '\0' or '2' or '3' as of 2013 */ + char tzh_reserved[15]; /* reserved; must be zero */ + char tzh_ttisutcnt[4]; /* coded number of trans. time flags */ + char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */ + char tzh_leapcnt[4]; /* coded number of leap seconds */ + char tzh_timecnt[4]; /* coded number of transition times */ + char tzh_typecnt[4]; /* coded number of local time types */ + char tzh_charcnt[4]; /* coded number of abbr. chars */ +}; + +/* +** . . .followed by. . . +** +** tzh_timecnt (char [4])s coded transition times a la time(2) +** tzh_timecnt (unsigned char)s types of local time starting at above +** tzh_typecnt repetitions of +** one (char [4]) coded UT offset in seconds +** one (unsigned char) used to set tm_isdst +** one (unsigned char) that's an abbreviation list index +** tzh_charcnt (char)s '\0'-terminated zone abbreviations +** tzh_leapcnt repetitions of +** one (char [4]) coded leap second transition times +** one (char [4]) total correction after above +** tzh_ttisstdcnt (char)s indexed by type; if 1, transition +** time is standard time, if 0, +** transition time is local (wall clock) +** time; if absent, transition times are +** assumed to be local time +** tzh_ttisutcnt (char)s indexed by type; if 1, transition +** time is UT, if 0, transition time is +** local time; if absent, transition +** times are assumed to be local time. +** When this is 1, the corresponding +** std/wall indicator must also be 1. +*/ + +/* +** If tzh_version is '2' or greater, the above is followed by a second instance +** of tzhead and a second instance of the data in which each coded transition +** time uses 8 rather than 4 chars, +** then a POSIX-TZ-environment-variable-style string for use in handling +** instants after the last transition time stored in the file +** (with nothing between the newlines if there is no POSIX representation for +** such instants). +** +** If tz_version is '3' or greater, the above is extended as follows. +** First, the POSIX TZ string's hour offset may range from -167 +** through 167 as compared to the POSIX-required 0 through 24. +** Second, its DST start time may be January 1 at 00:00 and its stop +** time December 31 at 24:00 plus the difference between DST and +** standard time, indicating DST all year. +*/ + +/* +** In the current implementation, "tzset()" refuses to deal with files that +** exceed any of the limits below. +*/ + +#ifndef TZ_MAX_TIMES +#define TZ_MAX_TIMES 2000 +#endif /* !defined TZ_MAX_TIMES */ + +#ifndef TZ_MAX_TYPES +/* This must be at least 17 for Europe/Samara and Europe/Vilnius. */ +#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ +#endif /* !defined TZ_MAX_TYPES */ + +#ifndef TZ_MAX_CHARS +#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */ + /* (limited by what unsigned chars can hold) */ +#endif /* !defined TZ_MAX_CHARS */ + +#ifndef TZ_MAX_LEAPS +#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ +#endif /* !defined TZ_MAX_LEAPS */ + +#define SECSPERMIN 60 +#define MINSPERHOUR 60 +#define HOURSPERDAY 24 +#define DAYSPERWEEK 7 +#define DAYSPERNYEAR 365 +#define DAYSPERLYEAR 366 +#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) +#define SECSPERDAY ((int_fast32_t) SECSPERHOUR * HOURSPERDAY) +#define MONSPERYEAR 12 + +#define TM_SUNDAY 0 +#define TM_MONDAY 1 +#define TM_TUESDAY 2 +#define TM_WEDNESDAY 3 +#define TM_THURSDAY 4 +#define TM_FRIDAY 5 +#define TM_SATURDAY 6 + +#define TM_JANUARY 0 +#define TM_FEBRUARY 1 +#define TM_MARCH 2 +#define TM_APRIL 3 +#define TM_MAY 4 +#define TM_JUNE 5 +#define TM_JULY 6 +#define TM_AUGUST 7 +#define TM_SEPTEMBER 8 +#define TM_OCTOBER 9 +#define TM_NOVEMBER 10 +#define TM_DECEMBER 11 + +#define TM_YEAR_BASE 1900 + +#define EPOCH_YEAR 1970 +#define EPOCH_WDAY TM_THURSDAY + +#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) + +/* +** Since everything in isleap is modulo 400 (or a factor of 400), we know that +** isleap(y) == isleap(y % 400) +** and so +** isleap(a + b) == isleap((a + b) % 400) +** or +** isleap(a + b) == isleap(a % 400 + b % 400) +** This is true even if % means modulo rather than Fortran remainder +** (which is allowed by C89 but not C99). +** We use this to avoid addition overflow problems. +*/ + +#define isleap_sum(a, b) isleap((a) % 400 + (b) % 400) + +#endif /* !defined _TZFILE_H_ */ From 63ff2b84ff399fa64da6653ddb1238a887b1abad Mon Sep 17 00:00:00 2001 From: Mark Geisert Date: Fri, 22 May 2020 02:32:53 -0700 Subject: [PATCH 365/520] Cygwin: tzcode resync: details Add tz_posixrules.h with data generated from most recent Cygwin tzdata package. Establish localtime.cc as primarily a wrapper around a patched copy of localtime.c. See README for more information. --- winsup/cygwin/tzcode/README | 37 ++++ winsup/cygwin/tzcode/localtime.c.patch | 59 +++++++ winsup/cygwin/tzcode/localtime.cc | 159 +++++++++++++++++ winsup/cygwin/tzcode/tz_posixrules.h | 231 +++++++++++++++++++++++++ 4 files changed, 486 insertions(+) create mode 100644 winsup/cygwin/tzcode/README create mode 100644 winsup/cygwin/tzcode/localtime.c.patch create mode 100644 winsup/cygwin/tzcode/localtime.cc create mode 100644 winsup/cygwin/tzcode/tz_posixrules.h diff --git a/winsup/cygwin/tzcode/README b/winsup/cygwin/tzcode/README new file mode 100644 index 000000000..b1a811e22 --- /dev/null +++ b/winsup/cygwin/tzcode/README @@ -0,0 +1,37 @@ +/* + How the code in this directory is supposed to work... + 2020/05/22 Mark Geisert + + localtime.cc is the Cygwin-specific module that is compiled into + the Cygwin DLL when the latter is built. It's just a wrapper that + #defines a bunch of stuff then #includes localtime.c. + + localtime.c, at any point in time, is a reasonably recent version + of /src/lib/libc/time/localtime.c from NetBSD. The same goes for + private.h and tzfile.h. An empty namespace.h suffices for Cygwin. + + The idea is that in the future, one just needs to bring over newer + versions of localtime.c, private.h, and/or tzfile.h from NetBSD as + they become available. + + With luck, you can drop those files into this directory and they + can be immediately used to build a newer Cygwin DLL that has the + newer NetBSD functionality. Without luck, you'll have to tweak the + wrapper localtime.cc. In the worst case, some other strategy will + need to be figured out, such as manually pulling out the parts of + the NetBSD code Cygwin needs to build a stand-alone localtime.cc. + + Re tz_posixrules.h: The data elements can be generated from + /usr/share/zoneinfo/posixrules in any version of Cygwin's tzdata + package. Instructions are in the comment leading tz_posixrules.h. + + Addendum: + Implementation of the strategy above has uncovered a small number + of NetBSD-isms in localtime.c that cannot be worked around with + preprocessor tricks. So there is another file localtime.c.patched + that holds just these adjustments for Cygwin, and it's this file + that localtime.cc #includes. localtime.c.patched is generated by + winsup/cygwin/Makefile[.in] operating with localtime.c.patch. + + ..mark +*/ diff --git a/winsup/cygwin/tzcode/localtime.c.patch b/winsup/cygwin/tzcode/localtime.c.patch new file mode 100644 index 000000000..e19a2cd02 --- /dev/null +++ b/winsup/cygwin/tzcode/localtime.c.patch @@ -0,0 +1,59 @@ +--- localtime.c 2020-05-16 21:54:00.533111800 -0700 ++++ localtime.c.patched 2020-05-22 00:03:30.826646000 -0700 +@@ -413,7 +413,7 @@ + }; + + /* TZDIR with a trailing '/' rather than a trailing '\0'. */ +-static char const tzdirslash[sizeof TZDIR] = TZDIR "/"; ++static char const tzdirslash[sizeof TZDIR + 1] = TZDIR "/"; + + /* Local storage needed for 'tzloadbody'. */ + union local_storage { +@@ -473,7 +473,7 @@ + would pull in stdio (and would fail if the + resulting string length exceeded INT_MAX!). */ + memcpy(lsp->fullname, tzdirslash, sizeof tzdirslash); +- strcpy(lsp->fullname + sizeof tzdirslash, name); ++ strcpy(lsp->fullname + sizeof tzdirslash - 1, name); + + /* Set doaccess if NAME contains a ".." file name + component, as such a name could read a file outside +@@ -488,11 +488,11 @@ + name = lsp->fullname; + } + if (doaccess && access(name, R_OK) != 0) +- return errno; ++ goto trydefrules; + + fid = open(name, OPEN_MODE); + if (fid < 0) +- return errno; ++ goto trydefrules; + nread = read(fid, up->buf, sizeof up->buf); + if (nread < (ssize_t)tzheadsize) { + int err = nread < 0 ? errno : EINVAL; +@@ -501,6 +501,15 @@ + } + if (close(fid) < 0) + return errno; ++ if (0) { ++trydefrules: ++ const char *base = strrchr(name, '/'); ++ base = base ? base + 1 : name; ++ if (strcmp(base, TZDEFRULES)) ++ return errno; ++ nread = sizeof _posixrules_data; ++ memcpy(up->buf, _posixrules_data, nread); ++ } + for (stored = 4; stored <= 8; stored *= 2) { + int_fast32_t ttisstdcnt = detzcode(up->tzhead.tzh_ttisstdcnt); + int_fast32_t ttisutcnt = detzcode(up->tzhead.tzh_ttisutcnt); +@@ -1417,6 +1426,8 @@ + tzsetlcl(char const *name) + { + struct state *sp = __lclptr; ++ if (! name) ++ name = tzgetwintzi(__UNCONST(wildabbr), (char *) alloca (512)); + int lcl = name ? strlen(name) < sizeof lcl_TZname : -1; + if (lcl < 0 ? lcl_is_set < 0 + : 0 < lcl_is_set && strcmp(lcl_TZname, name) == 0) diff --git a/winsup/cygwin/tzcode/localtime.cc b/winsup/cygwin/tzcode/localtime.cc new file mode 100644 index 000000000..c903bf3b9 --- /dev/null +++ b/winsup/cygwin/tzcode/localtime.cc @@ -0,0 +1,159 @@ +/* localtime.cc: Wrapper of NetBSD tzcode support for Cygwin. See README file. + +This file is part of Cygwin. + +This software is a copyrighted work licensed under the terms of the +Cygwin license. Please consult the file "CYGWIN_LICENSE" for +details. */ + +#include "../winsup.h" +#include "../sync.h" +#include "../include/cygwin/version.h" +#include "tz_posixrules.h" + +static NO_COPY muto tzset_guard; + +// Convert these NetBSD rwlock ops into Cygwin muto ops +#define rwlock_wrlock(X) tzset_guard.init("tzset_guard")->acquire() +#define rwlock_unlock(X) tzset_guard.release() + +// Set these NetBSD-related option #defines appropriately for Cygwin +//#define STD_INSPIRED // early-include private.h below does this +#define lint +#define HAVE_POSIX_DECLS 0 +#define USG_COMPAT 1 +#define NO_ERROR_IN_DST_GAP +#define state __state + +// Turn a specific known kind of const parameter into non-const +#define __UNCONST(X) ((char *) (X)) + +// Turn off these NetBSD audit-related definitions +#define __aconst +#define _DIAGASSERT(X) + +// Supply this Cygwin-specific function in advance of its use in localtime.c +static char * +tzgetwintzi (char *wildabbr, char *outbuf) +{ + TIME_ZONE_INFORMATION tzi; + char *cp, *dst; + wchar_t *wsrc; + div_t d; + + GetTimeZoneInformation (&tzi); + dst = cp = outbuf; + for (wsrc = tzi.StandardName; *wsrc; wsrc++) + if (*wsrc >= L'A' && *wsrc <= L'Z') + *dst++ = *wsrc; + if ((dst - cp) < 3) + { + /* In non-english Windows, converted tz.StandardName + may not contain a valid standard timezone name. */ + strcpy (cp, wildabbr); + cp += strlen (wildabbr); + } + else + cp = dst; + d = div (tzi.Bias + tzi.StandardBias, 60); + __small_sprintf (cp, "%d", d.quot); + if (d.rem) + __small_sprintf (cp = strchr (cp, 0), ":%d", abs (d.rem)); + if (tzi.StandardDate.wMonth) + { + cp = strchr (cp, 0); + dst = cp; + for (wsrc = tzi.DaylightName; *wsrc; wsrc++) + if (*wsrc >= L'A' && *wsrc <= L'Z') + *dst++ = *wsrc; + if ((dst - cp) < 3) + { + /* In non-english Windows, converted tz.DaylightName + may not contain a valid daylight timezone name. */ + strcpy (cp, wildabbr); + cp += strlen (wildabbr); + } + else + cp = dst; + d = div (tzi.Bias + tzi.DaylightBias, 60); + __small_sprintf (cp, "%d", d.quot); + if (d.rem) + __small_sprintf (cp = strchr (cp, 0), ":%d", abs (d.rem)); + cp = strchr (cp, 0); + __small_sprintf (cp = strchr (cp, 0), ",M%d.%d.%d/%d", + tzi.DaylightDate.wMonth, + tzi.DaylightDate.wDay, + tzi.DaylightDate.wDayOfWeek, + tzi.DaylightDate.wHour); + if (tzi.DaylightDate.wMinute || tzi.DaylightDate.wSecond) + __small_sprintf (cp = strchr (cp, 0), ":%d", + tzi.DaylightDate.wMinute); + if (tzi.DaylightDate.wSecond) + __small_sprintf (cp = strchr (cp, 0), ":%d", + tzi.DaylightDate.wSecond); + cp = strchr (cp, 0); + __small_sprintf (cp = strchr (cp, 0), ",M%d.%d.%d/%d", + tzi.StandardDate.wMonth, + tzi.StandardDate.wDay, + tzi.StandardDate.wDayOfWeek, + tzi.StandardDate.wHour); + if (tzi.StandardDate.wMinute || tzi.StandardDate.wSecond) + __small_sprintf (cp = strchr (cp, 0), ":%d", + tzi.StandardDate.wMinute); + if (tzi.StandardDate.wSecond) + __small_sprintf (cp = strchr (cp, 0), ":%d", + tzi.StandardDate.wSecond); + } + /* __small_printf ("TZ deduced as `%s'\n", outbuf); */ + return outbuf; +} + +// Get ready to wrap NetBSD's localtime.c +#ifdef __cplusplus +extern "C" { +#endif + +// Pull these in early to catch any small issues before the real test +#include "private.h" +#include "tzfile.h" + +/* Some NetBSD differences were too difficult to work around.. + so #include a patched copy of localtime.c rather than the NetBSD original. + Here is a list of the patches... + (1) fix an erroneous decl of tzdirslash size (flagged by g++) + (2) add conditional call to Cygwin's tzgetwintzi() from tzsetlcl() + (3) add Cygwin's historical "posixrules" support to tzloadbody() +*/ +#include "localtime.c.patched" + +#ifdef __cplusplus +} +#endif + +// Don't forget these Cygwin-specific additions from this point to EOF +EXPORT_ALIAS (tzset_unlocked, _tzset_unlocked) + +extern "C" long +__cygwin_gettzoffset (const struct tm *tmp) +{ +#ifdef TM_GMTOFF + if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS) + return tmp->TM_GMTOFF; +#endif /* defined TM_GMTOFF */ + __tzinfo_type *tz = __gettzinfo (); + /* The sign of this is exactly opposite the envvar TZ. We + could directly use the global _timezone for tm_isdst==0, + but have to use __tzrule for daylight savings. */ + long offset = -tz->__tzrule[tmp->tm_isdst > 0].offset; + return offset; +} + +extern "C" const char * +__cygwin_gettzname (const struct tm *tmp) +{ +#ifdef TM_ZONE + if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS) + return tmp->TM_ZONE; +#endif + return _tzname[tmp->tm_isdst > 0]; +} diff --git a/winsup/cygwin/tzcode/tz_posixrules.h b/winsup/cygwin/tzcode/tz_posixrules.h new file mode 100644 index 000000000..ebfcd065a --- /dev/null +++ b/winsup/cygwin/tzcode/tz_posixrules.h @@ -0,0 +1,231 @@ +/* tz_posixrules.h + * + * The data elements were generated with... + * od -vt u1 -A n /usr/share/zoneinfo/posixrules | + * sed 's/$/,/;s/^ //;s/[0-9] /&,/g;s/ ,/, /g' > elements_file + * + * The source posixrules file is from the Cygwin tzdata 2020a-1 package. + */ +static NO_COPY unsigned char _posixrules_data[] = { + 84, 90, 105, 102, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 0, 0, 236, 0, 0, 0, 5, 0, 0, 0, 20, 128, 0, 0, 0, +158, 166, 30, 112, 159, 186, 235, 96, 160, 134, 0, 112, 161, 154, 205, 96, +162, 101, 226, 112, 163, 131, 233, 224, 164, 106, 174, 112, 165, 53, 167, 96, +166, 83, 202, 240, 167, 21, 137, 96, 168, 51, 172, 240, 168, 254, 165, 224, +170, 19, 142, 240, 170, 222, 135, 224, 171, 243, 112, 240, 172, 190, 105, 224, +173, 211, 82, 240, 174, 158, 75, 224, 175, 179, 52, 240, 176, 126, 45, 224, +177, 156, 81, 112, 178, 103, 74, 96, 179, 124, 51, 112, 180, 71, 44, 96, +181, 92, 21, 112, 182, 39, 14, 96, 183, 59, 247, 112, 184, 6, 240, 96, +185, 27, 217, 112, 185, 230, 210, 96, 187, 4, 245, 240, 187, 198, 180, 96, +188, 228, 215, 240, 189, 175, 208, 224, 190, 196, 185, 240, 191, 143, 178, 224, +192, 164, 155, 240, 193, 111, 148, 224, 194, 132, 125, 240, 195, 79, 118, 224, +196, 100, 95, 240, 197, 47, 88, 224, 198, 77, 124, 112, 199, 15, 58, 224, +200, 45, 94, 112, 200, 248, 87, 96, 202, 13, 64, 112, 202, 216, 57, 96, +203, 136, 240, 112, 210, 35, 244, 112, 210, 96, 251, 224, 211, 117, 228, 240, +212, 64, 221, 224, 213, 85, 198, 240, 214, 32, 191, 224, 215, 53, 168, 240, +216, 0, 161, 224, 217, 21, 138, 240, 217, 224, 131, 224, 218, 254, 167, 112, +219, 192, 101, 224, 220, 222, 137, 112, 221, 169, 130, 96, 222, 190, 107, 112, +223, 137, 100, 96, 224, 158, 77, 112, 225, 105, 70, 96, 226, 126, 47, 112, +227, 73, 40, 96, 228, 94, 17, 112, 229, 87, 46, 224, 230, 71, 45, 240, +231, 55, 16, 224, 232, 39, 15, 240, 233, 22, 242, 224, 234, 6, 241, 240, +234, 246, 212, 224, 235, 230, 211, 240, 236, 214, 182, 224, 237, 198, 181, 240, +238, 191, 211, 96, 239, 175, 210, 112, 240, 159, 181, 96, 241, 143, 180, 112, +242, 127, 151, 96, 243, 111, 150, 112, 244, 95, 121, 96, 245, 79, 120, 112, +246, 63, 91, 96, 247, 47, 90, 112, 248, 40, 119, 224, 249, 15, 60, 112, +250, 8, 89, 224, 250, 248, 88, 240, 251, 232, 59, 224, 252, 216, 58, 240, +253, 200, 29, 224, 254, 184, 28, 240, 255, 167, 255, 224, 0, 151, 254, 240, + 1, 135, 225, 224, 2, 119, 224, 240, 3, 112, 254, 96, 4, 96, 253, 112, + 5, 80, 224, 96, 6, 64, 223, 112, 7, 48, 194, 96, 7, 141, 25, 112, + 9, 16, 164, 96, 9, 173, 148, 240, 10, 240, 134, 96, 11, 224, 133, 112, + 12, 217, 162, 224, 13, 192, 103, 112, 14, 185, 132, 224, 15, 169, 131, 240, + 16, 153, 102, 224, 17, 137, 101, 240, 18, 121, 72, 224, 19, 105, 71, 240, + 20, 89, 42, 224, 21, 73, 41, 240, 22, 57, 12, 224, 23, 41, 11, 240, + 24, 34, 41, 96, 25, 8, 237, 240, 26, 2, 11, 96, 26, 242, 10, 112, + 27, 225, 237, 96, 28, 209, 236, 112, 29, 193, 207, 96, 30, 177, 206, 112, + 31, 161, 177, 96, 32, 118, 0, 240, 33, 129, 147, 96, 34, 85, 226, 240, + 35, 106, 175, 224, 36, 53, 196, 240, 37, 74, 145, 224, 38, 21, 166, 240, + 39, 42, 115, 224, 39, 254, 195, 112, 41, 10, 85, 224, 41, 222, 165, 112, + 42, 234, 55, 224, 43, 190, 135, 112, 44, 211, 84, 96, 45, 158, 105, 112, + 46, 179, 54, 96, 47, 126, 75, 112, 48, 147, 24, 96, 49, 103, 103, 240, + 50, 114, 250, 96, 51, 71, 73, 240, 52, 82, 220, 96, 53, 39, 43, 240, + 54, 50, 190, 96, 55, 7, 13, 240, 56, 27, 218, 224, 56, 230, 239, 240, + 57, 251, 188, 224, 58, 198, 209, 240, 59, 219, 158, 224, 60, 175, 238, 112, + 61, 187, 128, 224, 62, 143, 208, 112, 63, 155, 98, 224, 64, 111, 178, 112, + 65, 132, 127, 96, 66, 79, 148, 112, 67, 100, 97, 96, 68, 47, 118, 112, + 69, 68, 67, 96, 69, 243, 168, 240, 71, 45, 95, 224, 71, 211, 138, 240, + 73, 13, 65, 224, 73, 179, 108, 240, 74, 237, 35, 224, 75, 156, 137, 112, + 76, 214, 64, 96, 77, 124, 107, 112, 78, 182, 34, 96, 79, 92, 77, 112, + 80, 150, 4, 96, 81, 60, 47, 112, 82, 117, 230, 96, 83, 28, 17, 112, + 84, 85, 200, 96, 84, 251, 243, 112, 86, 53, 170, 96, 86, 229, 15, 240, + 88, 30, 198, 224, 88, 196, 241, 240, 89, 254, 168, 224, 90, 164, 211, 240, + 91, 222, 138, 224, 92, 132, 181, 240, 93, 190, 108, 224, 94, 100, 151, 240, + 95, 158, 78, 224, 96, 77, 180, 112, 97, 135, 107, 96, 98, 45, 150, 112, + 99, 103, 77, 96, 100, 13, 120, 112, 101, 71, 47, 96, 101, 237, 90, 112, +103, 39, 17, 96, 103, 205, 60, 112, 105, 6, 243, 96, 105, 173, 30, 112, +106, 230, 213, 96, 107, 150, 58, 240, 108, 207, 241, 224, 109, 118, 28, 240, +110, 175, 211, 224, 111, 85, 254, 240, 112, 143, 181, 224, 113, 53, 224, 240, +114, 111, 151, 224, 115, 21, 194, 240, 116, 79, 121, 224, 116, 254, 223, 112, +118, 56, 150, 96, 118, 222, 193, 112, 120, 24, 120, 96, 120, 190, 163, 112, +121, 248, 90, 96, 122, 158, 133, 112, 123, 216, 60, 96, 124, 126, 103, 112, +125, 184, 30, 96, 126, 94, 73, 112, 127, 152, 0, 96, 2, 1, 2, 1, + 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, + 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, + 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 255, 255, 186, 158, 0, 0, 255, 255, +199, 192, 1, 4, 255, 255, 185, 176, 0, 8, 255, 255, 199, 192, 1, 12, +255, 255, 199, 192, 1, 16, 76, 77, 84, 0, 69, 68, 84, 0, 69, 83, + 84, 0, 69, 87, 84, 0, 69, 80, 84, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 0, 1, 84, 90, 105, 102, 50, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0, 236, 0, 0, 0, 5, 0, 0, 0, 20, +255, 255, 255, 255, 94, 3, 240, 144, 255, 255, 255, 255, 158, 166, 30, 112, +255, 255, 255, 255, 159, 186, 235, 96, 255, 255, 255, 255, 160, 134, 0, 112, +255, 255, 255, 255, 161, 154, 205, 96, 255, 255, 255, 255, 162, 101, 226, 112, +255, 255, 255, 255, 163, 131, 233, 224, 255, 255, 255, 255, 164, 106, 174, 112, +255, 255, 255, 255, 165, 53, 167, 96, 255, 255, 255, 255, 166, 83, 202, 240, +255, 255, 255, 255, 167, 21, 137, 96, 255, 255, 255, 255, 168, 51, 172, 240, +255, 255, 255, 255, 168, 254, 165, 224, 255, 255, 255, 255, 170, 19, 142, 240, +255, 255, 255, 255, 170, 222, 135, 224, 255, 255, 255, 255, 171, 243, 112, 240, +255, 255, 255, 255, 172, 190, 105, 224, 255, 255, 255, 255, 173, 211, 82, 240, +255, 255, 255, 255, 174, 158, 75, 224, 255, 255, 255, 255, 175, 179, 52, 240, +255, 255, 255, 255, 176, 126, 45, 224, 255, 255, 255, 255, 177, 156, 81, 112, +255, 255, 255, 255, 178, 103, 74, 96, 255, 255, 255, 255, 179, 124, 51, 112, +255, 255, 255, 255, 180, 71, 44, 96, 255, 255, 255, 255, 181, 92, 21, 112, +255, 255, 255, 255, 182, 39, 14, 96, 255, 255, 255, 255, 183, 59, 247, 112, +255, 255, 255, 255, 184, 6, 240, 96, 255, 255, 255, 255, 185, 27, 217, 112, +255, 255, 255, 255, 185, 230, 210, 96, 255, 255, 255, 255, 187, 4, 245, 240, +255, 255, 255, 255, 187, 198, 180, 96, 255, 255, 255, 255, 188, 228, 215, 240, +255, 255, 255, 255, 189, 175, 208, 224, 255, 255, 255, 255, 190, 196, 185, 240, +255, 255, 255, 255, 191, 143, 178, 224, 255, 255, 255, 255, 192, 164, 155, 240, +255, 255, 255, 255, 193, 111, 148, 224, 255, 255, 255, 255, 194, 132, 125, 240, +255, 255, 255, 255, 195, 79, 118, 224, 255, 255, 255, 255, 196, 100, 95, 240, +255, 255, 255, 255, 197, 47, 88, 224, 255, 255, 255, 255, 198, 77, 124, 112, +255, 255, 255, 255, 199, 15, 58, 224, 255, 255, 255, 255, 200, 45, 94, 112, +255, 255, 255, 255, 200, 248, 87, 96, 255, 255, 255, 255, 202, 13, 64, 112, +255, 255, 255, 255, 202, 216, 57, 96, 255, 255, 255, 255, 203, 136, 240, 112, +255, 255, 255, 255, 210, 35, 244, 112, 255, 255, 255, 255, 210, 96, 251, 224, +255, 255, 255, 255, 211, 117, 228, 240, 255, 255, 255, 255, 212, 64, 221, 224, +255, 255, 255, 255, 213, 85, 198, 240, 255, 255, 255, 255, 214, 32, 191, 224, +255, 255, 255, 255, 215, 53, 168, 240, 255, 255, 255, 255, 216, 0, 161, 224, +255, 255, 255, 255, 217, 21, 138, 240, 255, 255, 255, 255, 217, 224, 131, 224, +255, 255, 255, 255, 218, 254, 167, 112, 255, 255, 255, 255, 219, 192, 101, 224, +255, 255, 255, 255, 220, 222, 137, 112, 255, 255, 255, 255, 221, 169, 130, 96, +255, 255, 255, 255, 222, 190, 107, 112, 255, 255, 255, 255, 223, 137, 100, 96, +255, 255, 255, 255, 224, 158, 77, 112, 255, 255, 255, 255, 225, 105, 70, 96, +255, 255, 255, 255, 226, 126, 47, 112, 255, 255, 255, 255, 227, 73, 40, 96, +255, 255, 255, 255, 228, 94, 17, 112, 255, 255, 255, 255, 229, 87, 46, 224, +255, 255, 255, 255, 230, 71, 45, 240, 255, 255, 255, 255, 231, 55, 16, 224, +255, 255, 255, 255, 232, 39, 15, 240, 255, 255, 255, 255, 233, 22, 242, 224, +255, 255, 255, 255, 234, 6, 241, 240, 255, 255, 255, 255, 234, 246, 212, 224, +255, 255, 255, 255, 235, 230, 211, 240, 255, 255, 255, 255, 236, 214, 182, 224, +255, 255, 255, 255, 237, 198, 181, 240, 255, 255, 255, 255, 238, 191, 211, 96, +255, 255, 255, 255, 239, 175, 210, 112, 255, 255, 255, 255, 240, 159, 181, 96, +255, 255, 255, 255, 241, 143, 180, 112, 255, 255, 255, 255, 242, 127, 151, 96, +255, 255, 255, 255, 243, 111, 150, 112, 255, 255, 255, 255, 244, 95, 121, 96, +255, 255, 255, 255, 245, 79, 120, 112, 255, 255, 255, 255, 246, 63, 91, 96, +255, 255, 255, 255, 247, 47, 90, 112, 255, 255, 255, 255, 248, 40, 119, 224, +255, 255, 255, 255, 249, 15, 60, 112, 255, 255, 255, 255, 250, 8, 89, 224, +255, 255, 255, 255, 250, 248, 88, 240, 255, 255, 255, 255, 251, 232, 59, 224, +255, 255, 255, 255, 252, 216, 58, 240, 255, 255, 255, 255, 253, 200, 29, 224, +255, 255, 255, 255, 254, 184, 28, 240, 255, 255, 255, 255, 255, 167, 255, 224, + 0, 0, 0, 0, 0, 151, 254, 240, 0, 0, 0, 0, 1, 135, 225, 224, + 0, 0, 0, 0, 2, 119, 224, 240, 0, 0, 0, 0, 3, 112, 254, 96, + 0, 0, 0, 0, 4, 96, 253, 112, 0, 0, 0, 0, 5, 80, 224, 96, + 0, 0, 0, 0, 6, 64, 223, 112, 0, 0, 0, 0, 7, 48, 194, 96, + 0, 0, 0, 0, 7, 141, 25, 112, 0, 0, 0, 0, 9, 16, 164, 96, + 0, 0, 0, 0, 9, 173, 148, 240, 0, 0, 0, 0, 10, 240, 134, 96, + 0, 0, 0, 0, 11, 224, 133, 112, 0, 0, 0, 0, 12, 217, 162, 224, + 0, 0, 0, 0, 13, 192, 103, 112, 0, 0, 0, 0, 14, 185, 132, 224, + 0, 0, 0, 0, 15, 169, 131, 240, 0, 0, 0, 0, 16, 153, 102, 224, + 0, 0, 0, 0, 17, 137, 101, 240, 0, 0, 0, 0, 18, 121, 72, 224, + 0, 0, 0, 0, 19, 105, 71, 240, 0, 0, 0, 0, 20, 89, 42, 224, + 0, 0, 0, 0, 21, 73, 41, 240, 0, 0, 0, 0, 22, 57, 12, 224, + 0, 0, 0, 0, 23, 41, 11, 240, 0, 0, 0, 0, 24, 34, 41, 96, + 0, 0, 0, 0, 25, 8, 237, 240, 0, 0, 0, 0, 26, 2, 11, 96, + 0, 0, 0, 0, 26, 242, 10, 112, 0, 0, 0, 0, 27, 225, 237, 96, + 0, 0, 0, 0, 28, 209, 236, 112, 0, 0, 0, 0, 29, 193, 207, 96, + 0, 0, 0, 0, 30, 177, 206, 112, 0, 0, 0, 0, 31, 161, 177, 96, + 0, 0, 0, 0, 32, 118, 0, 240, 0, 0, 0, 0, 33, 129, 147, 96, + 0, 0, 0, 0, 34, 85, 226, 240, 0, 0, 0, 0, 35, 106, 175, 224, + 0, 0, 0, 0, 36, 53, 196, 240, 0, 0, 0, 0, 37, 74, 145, 224, + 0, 0, 0, 0, 38, 21, 166, 240, 0, 0, 0, 0, 39, 42, 115, 224, + 0, 0, 0, 0, 39, 254, 195, 112, 0, 0, 0, 0, 41, 10, 85, 224, + 0, 0, 0, 0, 41, 222, 165, 112, 0, 0, 0, 0, 42, 234, 55, 224, + 0, 0, 0, 0, 43, 190, 135, 112, 0, 0, 0, 0, 44, 211, 84, 96, + 0, 0, 0, 0, 45, 158, 105, 112, 0, 0, 0, 0, 46, 179, 54, 96, + 0, 0, 0, 0, 47, 126, 75, 112, 0, 0, 0, 0, 48, 147, 24, 96, + 0, 0, 0, 0, 49, 103, 103, 240, 0, 0, 0, 0, 50, 114, 250, 96, + 0, 0, 0, 0, 51, 71, 73, 240, 0, 0, 0, 0, 52, 82, 220, 96, + 0, 0, 0, 0, 53, 39, 43, 240, 0, 0, 0, 0, 54, 50, 190, 96, + 0, 0, 0, 0, 55, 7, 13, 240, 0, 0, 0, 0, 56, 27, 218, 224, + 0, 0, 0, 0, 56, 230, 239, 240, 0, 0, 0, 0, 57, 251, 188, 224, + 0, 0, 0, 0, 58, 198, 209, 240, 0, 0, 0, 0, 59, 219, 158, 224, + 0, 0, 0, 0, 60, 175, 238, 112, 0, 0, 0, 0, 61, 187, 128, 224, + 0, 0, 0, 0, 62, 143, 208, 112, 0, 0, 0, 0, 63, 155, 98, 224, + 0, 0, 0, 0, 64, 111, 178, 112, 0, 0, 0, 0, 65, 132, 127, 96, + 0, 0, 0, 0, 66, 79, 148, 112, 0, 0, 0, 0, 67, 100, 97, 96, + 0, 0, 0, 0, 68, 47, 118, 112, 0, 0, 0, 0, 69, 68, 67, 96, + 0, 0, 0, 0, 69, 243, 168, 240, 0, 0, 0, 0, 71, 45, 95, 224, + 0, 0, 0, 0, 71, 211, 138, 240, 0, 0, 0, 0, 73, 13, 65, 224, + 0, 0, 0, 0, 73, 179, 108, 240, 0, 0, 0, 0, 74, 237, 35, 224, + 0, 0, 0, 0, 75, 156, 137, 112, 0, 0, 0, 0, 76, 214, 64, 96, + 0, 0, 0, 0, 77, 124, 107, 112, 0, 0, 0, 0, 78, 182, 34, 96, + 0, 0, 0, 0, 79, 92, 77, 112, 0, 0, 0, 0, 80, 150, 4, 96, + 0, 0, 0, 0, 81, 60, 47, 112, 0, 0, 0, 0, 82, 117, 230, 96, + 0, 0, 0, 0, 83, 28, 17, 112, 0, 0, 0, 0, 84, 85, 200, 96, + 0, 0, 0, 0, 84, 251, 243, 112, 0, 0, 0, 0, 86, 53, 170, 96, + 0, 0, 0, 0, 86, 229, 15, 240, 0, 0, 0, 0, 88, 30, 198, 224, + 0, 0, 0, 0, 88, 196, 241, 240, 0, 0, 0, 0, 89, 254, 168, 224, + 0, 0, 0, 0, 90, 164, 211, 240, 0, 0, 0, 0, 91, 222, 138, 224, + 0, 0, 0, 0, 92, 132, 181, 240, 0, 0, 0, 0, 93, 190, 108, 224, + 0, 0, 0, 0, 94, 100, 151, 240, 0, 0, 0, 0, 95, 158, 78, 224, + 0, 0, 0, 0, 96, 77, 180, 112, 0, 0, 0, 0, 97, 135, 107, 96, + 0, 0, 0, 0, 98, 45, 150, 112, 0, 0, 0, 0, 99, 103, 77, 96, + 0, 0, 0, 0, 100, 13, 120, 112, 0, 0, 0, 0, 101, 71, 47, 96, + 0, 0, 0, 0, 101, 237, 90, 112, 0, 0, 0, 0, 103, 39, 17, 96, + 0, 0, 0, 0, 103, 205, 60, 112, 0, 0, 0, 0, 105, 6, 243, 96, + 0, 0, 0, 0, 105, 173, 30, 112, 0, 0, 0, 0, 106, 230, 213, 96, + 0, 0, 0, 0, 107, 150, 58, 240, 0, 0, 0, 0, 108, 207, 241, 224, + 0, 0, 0, 0, 109, 118, 28, 240, 0, 0, 0, 0, 110, 175, 211, 224, + 0, 0, 0, 0, 111, 85, 254, 240, 0, 0, 0, 0, 112, 143, 181, 224, + 0, 0, 0, 0, 113, 53, 224, 240, 0, 0, 0, 0, 114, 111, 151, 224, + 0, 0, 0, 0, 115, 21, 194, 240, 0, 0, 0, 0, 116, 79, 121, 224, + 0, 0, 0, 0, 116, 254, 223, 112, 0, 0, 0, 0, 118, 56, 150, 96, + 0, 0, 0, 0, 118, 222, 193, 112, 0, 0, 0, 0, 120, 24, 120, 96, + 0, 0, 0, 0, 120, 190, 163, 112, 0, 0, 0, 0, 121, 248, 90, 96, + 0, 0, 0, 0, 122, 158, 133, 112, 0, 0, 0, 0, 123, 216, 60, 96, + 0, 0, 0, 0, 124, 126, 103, 112, 0, 0, 0, 0, 125, 184, 30, 96, + 0, 0, 0, 0, 126, 94, 73, 112, 0, 0, 0, 0, 127, 152, 0, 96, + 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, + 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, + 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, + 2, 3, 4, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 255, 255, 186, 158, + 0, 0, 255, 255, 199, 192, 1, 4, 255, 255, 185, 176, 0, 8, 255, 255, +199, 192, 1, 12, 255, 255, 199, 192, 1, 16, 76, 77, 84, 0, 69, 68, + 84, 0, 69, 83, 84, 0, 69, 87, 84, 0, 69, 80, 84, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 1, 10, 69, 83, 84, 53, 69, 68, 84, + 44, 77, 51, 46, 50, 46, 48, 44, 77, 49, 49, 46, 49, 46, 48, 10, +}; From 2ce569ec924b75894492f1a103f42900610fe00f Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 25 May 2020 13:45:17 +0200 Subject: [PATCH 366/520] Cygwin: move localtime.o build rule to end of file otherwise a simple `make' in the cygwin dir won't build the DLL anymore. Signed-off-by: Corinna Vinschen --- winsup/cygwin/Makefile.in | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index 2ac8bcbd8..2e8c274a3 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in @@ -248,13 +248,6 @@ MATH_OFILES:= \ TZCODE_OFILES:=localtime.o -localtime.o: $(srcdir)/tzcode/localtime.cc $(srcdir)/tzcode/localtime.c.patch - (cd $(srcdir)/tzcode && \ - patch -u -o localtime.c.patched localtime.c localtime.c.patch) - $(CXX) ${CXXFLAGS} ${localtime_CFLAGS} \ - -I$(target_builddir)/winsup/cygwin \ - -I$(srcdir) -I$(srcdir)/tzcode -c -o $@ $< - DLL_OFILES:= \ advapi32.o \ aio.o \ @@ -741,6 +734,13 @@ dcrt0.o sigproc.o: child_info_magic.h shared.o: shared_info_magic.h +localtime.o: $(srcdir)/tzcode/localtime.cc $(srcdir)/tzcode/localtime.c.patch + (cd $(srcdir)/tzcode && \ + patch -u -o localtime.c.patched localtime.c localtime.c.patch) + $(CXX) ${CXXFLAGS} ${localtime_CFLAGS} \ + -I$(target_builddir)/winsup/cygwin \ + -I$(srcdir) -I$(srcdir)/tzcode -c -o $@ $< + $(srcdir)/devices.cc: gendevices devices.in devices.h ${wordlist 1,2,$^} $@ From 57625ac256299c1472f371f6d39b23c59f55d72e Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 25 May 2020 13:46:24 +0200 Subject: [PATCH 367/520] Cygwin: rename localtime.cc to localtime_wrapper.c Signed-off-by: Corinna Vinschen --- winsup/cygwin/Makefile.in | 2 +- winsup/cygwin/tzcode/{localtime.cc => localtime_wrapper.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename winsup/cygwin/tzcode/{localtime.cc => localtime_wrapper.c} (100%) diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index 2e8c274a3..1e1342ab7 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in @@ -734,7 +734,7 @@ dcrt0.o sigproc.o: child_info_magic.h shared.o: shared_info_magic.h -localtime.o: $(srcdir)/tzcode/localtime.cc $(srcdir)/tzcode/localtime.c.patch +localtime.o: $(srcdir)/tzcode/localtime_wrapper.c $(srcdir)/tzcode/localtime.c.patch (cd $(srcdir)/tzcode && \ patch -u -o localtime.c.patched localtime.c localtime.c.patch) $(CXX) ${CXXFLAGS} ${localtime_CFLAGS} \ diff --git a/winsup/cygwin/tzcode/localtime.cc b/winsup/cygwin/tzcode/localtime_wrapper.c similarity index 100% rename from winsup/cygwin/tzcode/localtime.cc rename to winsup/cygwin/tzcode/localtime_wrapper.c From 49a843b407d234ea588378196aac20eefc2a587a Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 25 May 2020 13:50:36 +0200 Subject: [PATCH 368/520] Cygwin: convert localtime_wrapper.c to plain C source That also requires a small tweak to localtime.c.patch, otherwise GCC complains about the position of the 'trydefrules' label. Also, simplify includes. Signed-off-by: Corinna Vinschen --- winsup/cygwin/Makefile.in | 4 ++-- winsup/cygwin/tzcode/localtime.c.patch | 8 ++++--- winsup/cygwin/tzcode/localtime_wrapper.c | 28 ++++++++++-------------- 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index 1e1342ab7..1801b1a11 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in @@ -561,7 +561,7 @@ TARGET_LIBS:=$(LIB_NAME) $(CYGWIN_START) $(GMON_START) $(LIBGMON_A) $(SUBLIBS) $ ifneq "${filter -O%,$(CFLAGS)}" "" dtable_CFLAGS:=-fcheck-new -localtime_CFLAGS:=-fwrapv -fpermissive +localtime_CFLAGS:=-fwrapv malloc_CFLAGS:=-O3 sync_CFLAGS:=-O3 ifeq ($(target_cpu),i686) @@ -737,7 +737,7 @@ shared.o: shared_info_magic.h localtime.o: $(srcdir)/tzcode/localtime_wrapper.c $(srcdir)/tzcode/localtime.c.patch (cd $(srcdir)/tzcode && \ patch -u -o localtime.c.patched localtime.c localtime.c.patch) - $(CXX) ${CXXFLAGS} ${localtime_CFLAGS} \ + $(CC) ${COMMON_CFLAGS} ${localtime_CFLAGS} \ -I$(target_builddir)/winsup/cygwin \ -I$(srcdir) -I$(srcdir)/tzcode -c -o $@ $< diff --git a/winsup/cygwin/tzcode/localtime.c.patch b/winsup/cygwin/tzcode/localtime.c.patch index e19a2cd02..0587b5ea7 100644 --- a/winsup/cygwin/tzcode/localtime.c.patch +++ b/winsup/cygwin/tzcode/localtime.c.patch @@ -32,13 +32,15 @@ nread = read(fid, up->buf, sizeof up->buf); if (nread < (ssize_t)tzheadsize) { int err = nread < 0 ? errno : EINVAL; -@@ -501,6 +501,15 @@ +@@ -501,6 +501,17 @@ } if (close(fid) < 0) return errno; + if (0) { ++ const char *base; +trydefrules: -+ const char *base = strrchr(name, '/'); ++ ++ base = strrchr(name, '/'); + base = base ? base + 1 : name; + if (strcmp(base, TZDEFRULES)) + return errno; @@ -48,7 +50,7 @@ for (stored = 4; stored <= 8; stored *= 2) { int_fast32_t ttisstdcnt = detzcode(up->tzhead.tzh_ttisstdcnt); int_fast32_t ttisutcnt = detzcode(up->tzhead.tzh_ttisutcnt); -@@ -1417,6 +1426,8 @@ +@@ -1417,6 +1428,8 @@ tzsetlcl(char const *name) { struct state *sp = __lclptr; diff --git a/winsup/cygwin/tzcode/localtime_wrapper.c b/winsup/cygwin/tzcode/localtime_wrapper.c index c903bf3b9..72e2f93ab 100644 --- a/winsup/cygwin/tzcode/localtime_wrapper.c +++ b/winsup/cygwin/tzcode/localtime_wrapper.c @@ -6,16 +6,17 @@ This software is a copyrighted work licensed under the terms of the Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */ -#include "../winsup.h" -#include "../sync.h" -#include "../include/cygwin/version.h" +#include "winsup.h" +#include "perprocess.h" #include "tz_posixrules.h" +#include +#include -static NO_COPY muto tzset_guard; +static NO_COPY SRWLOCK tzset_guard = SRWLOCK_INIT; -// Convert these NetBSD rwlock ops into Cygwin muto ops -#define rwlock_wrlock(X) tzset_guard.init("tzset_guard")->acquire() -#define rwlock_unlock(X) tzset_guard.release() +// Convert these NetBSD rwlock ops into SRWLocks +#define rwlock_wrlock(X) AcquireSRWLockExclusive(&tzset_guard) +#define rwlock_unlock(X) ReleaseSRWLockExclusive(&tzset_guard) // Set these NetBSD-related option #defines appropriately for Cygwin //#define STD_INSPIRED // early-include private.h below does this @@ -109,9 +110,6 @@ tzgetwintzi (char *wildabbr, char *outbuf) } // Get ready to wrap NetBSD's localtime.c -#ifdef __cplusplus -extern "C" { -#endif // Pull these in early to catch any small issues before the real test #include "private.h" @@ -126,19 +124,15 @@ extern "C" { */ #include "localtime.c.patched" -#ifdef __cplusplus -} -#endif - // Don't forget these Cygwin-specific additions from this point to EOF EXPORT_ALIAS (tzset_unlocked, _tzset_unlocked) -extern "C" long +long __cygwin_gettzoffset (const struct tm *tmp) { #ifdef TM_GMTOFF if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS) - return tmp->TM_GMTOFF; + return tmp->TM_GMTOFF; #endif /* defined TM_GMTOFF */ __tzinfo_type *tz = __gettzinfo (); /* The sign of this is exactly opposite the envvar TZ. We @@ -148,7 +142,7 @@ __cygwin_gettzoffset (const struct tm *tmp) return offset; } -extern "C" const char * +const char * __cygwin_gettzname (const struct tm *tmp) { #ifdef TM_ZONE From 4d5efe1e1d3dc7672934efce1bdc9151e7cd307d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 25 May 2020 17:40:27 +0200 Subject: [PATCH 369/520] Cygwin: revamp localtime.o build rule Rename localtime.c.patched to localtime.patched.c to keep the correct language suffix. Create localtime.patched.c in the build dir rather than in the source dir. Decouple the build rule for creating localtime.patched.c from the rule to build localtime.o, so we don't have to rebuild the patched source file all the time. Signed-off-by: Corinna Vinschen --- winsup/cygwin/Makefile.in | 11 +++++++---- winsup/cygwin/tzcode/localtime_wrapper.c | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index 1801b1a11..3a175c61c 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in @@ -670,7 +670,7 @@ uninstall-man: done clean distclean realclean: - -rm -f *.o *.dll *.dbg *.a *.exp junk *.base version.cc *.exe *.d *stamp* *_magic.h sigfe.s cygwin.def globals.h + -rm -f *.o *.dll *.dbg *.a *.exp junk *.base version.cc *.exe *.d *stamp* *_magic.h sigfe.s cygwin.def globals.h localtime.patched.c -@$(MAKE) -C ${cygserver_blddir} libclean maintainer-clean: clean @@ -734,9 +734,12 @@ dcrt0.o sigproc.o: child_info_magic.h shared.o: shared_info_magic.h -localtime.o: $(srcdir)/tzcode/localtime_wrapper.c $(srcdir)/tzcode/localtime.c.patch - (cd $(srcdir)/tzcode && \ - patch -u -o localtime.c.patched localtime.c localtime.c.patch) +localtime.patched.c: tzcode/localtime.c tzcode/localtime.c.patch + patch -u -o localtime.patched.c \ + $(srcdir)/tzcode/localtime.c \ + $(srcdir)/tzcode/localtime.c.patch + +localtime.o: tzcode/localtime_wrapper.c localtime.patched.c $(CC) ${COMMON_CFLAGS} ${localtime_CFLAGS} \ -I$(target_builddir)/winsup/cygwin \ -I$(srcdir) -I$(srcdir)/tzcode -c -o $@ $< diff --git a/winsup/cygwin/tzcode/localtime_wrapper.c b/winsup/cygwin/tzcode/localtime_wrapper.c index 72e2f93ab..1c7cd928d 100644 --- a/winsup/cygwin/tzcode/localtime_wrapper.c +++ b/winsup/cygwin/tzcode/localtime_wrapper.c @@ -122,7 +122,7 @@ tzgetwintzi (char *wildabbr, char *outbuf) (2) add conditional call to Cygwin's tzgetwintzi() from tzsetlcl() (3) add Cygwin's historical "posixrules" support to tzloadbody() */ -#include "localtime.c.patched" +#include "localtime.patched.c" // Don't forget these Cygwin-specific additions from this point to EOF EXPORT_ALIAS (tzset_unlocked, _tzset_unlocked) From 36b8811c3ec134a8ec06f55813f674b9a978d9b2 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 26 May 2020 10:19:35 +0200 Subject: [PATCH 370/520] Cygwin: add missing files to 'clean' build rule Signed-off-by: Corinna Vinschen --- winsup/cygwin/Makefile.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index 3a175c61c..0ec90de58 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in @@ -670,7 +670,9 @@ uninstall-man: done clean distclean realclean: - -rm -f *.o *.dll *.dbg *.a *.exp junk *.base version.cc *.exe *.d *stamp* *_magic.h sigfe.s cygwin.def globals.h localtime.patched.c + -rm -f *.o *.dll *.dbg *.a *.exp junk *.base version.cc *.exe *.d \ + *stamp* *_magic.h sigfe.s cygwin.def cygwin.map cygwin.sc \ + globals.h localtime.patched.c -@$(MAKE) -C ${cygserver_blddir} libclean maintainer-clean: clean From 4914c426c7494ada0f93955dcaa1dbf4694e534f Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 26 May 2020 10:22:41 +0200 Subject: [PATCH 371/520] Cygwin: drop useless comment Signed-off-by: Corinna Vinschen --- winsup/cygwin/tzcode/localtime_wrapper.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/winsup/cygwin/tzcode/localtime_wrapper.c b/winsup/cygwin/tzcode/localtime_wrapper.c index 1c7cd928d..3ac8f8cb0 100644 --- a/winsup/cygwin/tzcode/localtime_wrapper.c +++ b/winsup/cygwin/tzcode/localtime_wrapper.c @@ -109,8 +109,6 @@ tzgetwintzi (char *wildabbr, char *outbuf) return outbuf; } -// Get ready to wrap NetBSD's localtime.c - // Pull these in early to catch any small issues before the real test #include "private.h" #include "tzfile.h" From 50d7dcaa0bd535a2a70e076a0ca0d15c1c1e8e01 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 26 May 2020 19:15:37 +0200 Subject: [PATCH 372/520] Cygwin: FAQ: fix Cygwin build requirements Signed-off-by: Corinna Vinschen --- winsup/doc/faq-programming.xml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/winsup/doc/faq-programming.xml b/winsup/doc/faq-programming.xml index 65bfed97e..5920ca8c4 100644 --- a/winsup/doc/faq-programming.xml +++ b/winsup/doc/faq-programming.xml @@ -676,16 +676,20 @@ rewriting the runtime library in question from specs... First, you need to make sure you have the necessary build tools -installed; you at least need gcc-g++, make, -perl, cocom, gettext-devel, -libiconv-devel and zlib-devel. +installed; you at least need gcc-g++, +make, patch, perl, +gettext-devel, libiconv-devel and +zlib-devel. Installing git to fetch +the sources from the +source repository +helps, too. If you change a certain core part of Cygwin, namely the layout +of the Cygwin TLS area, you also have to install cocom. Building for 32-bit Cygwin also requires -mingw64-x86_64-gcc-core (for building the cyglsa64 DLL for WoW64), mingw64-i686-gcc-g++ and mingw64-i686-zlib. Building for 64-bit Cygwin also requires mingw64-x86_64-gcc-g++ and mingw64-x86_64-zlib. -If you want to run the tests, dejagnu is also required. + Normally, building ignores any errors in building the documentation, which requires the dblatex, docbook2X, docbook-xml45, docbook-xsl, and From 25987b2c2a49013ce6d8c9d2ab29a92eb05f9482 Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Thu, 28 May 2020 12:43:05 +0900 Subject: [PATCH 373/520] Cygwin: pty: Fix a bug in free_attached_console(). - After commit 7659ff0f5afd751f42485f2684c799c5f37b0fb9, nohup does not work as expected. This patch fixes the issue. Addresses: https://cygwin.com/pipermail/cygwin-developers/2020-May/011885.html --- winsup/cygwin/fhandler_tty.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index df08dd20a..f29a2c214 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -188,7 +188,10 @@ set_ishybrid_and_switch_to_pcon (HANDLE h) inline void fhandler_pty_slave::free_attached_console () { - if (freeconsole_on_close && get_minor () == pcon_attached_to) + bool attached = get_ttyp () ? + fhandler_console::get_console_process_id (get_helper_process_id (), true) + : (get_minor () == pcon_attached_to); + if (freeconsole_on_close && attached) { FreeConsole (); pcon_attached_to = -1; From b5089f339a2124f52dfe58c8e3c929e4c5634175 Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Thu, 28 May 2020 22:49:26 +0900 Subject: [PATCH 374/520] Cygwin: pty: Prevent meaningless ResizePseudoConsole() calls. - This patch prevents to call ResizePseudoConsole() unless the pty is resized. --- winsup/cygwin/fhandler_tty.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index f29a2c214..b091765b3 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -2615,18 +2615,18 @@ fhandler_pty_master::ioctl (unsigned int cmd, void *arg) *(struct winsize *) arg = get_ttyp ()->winsize; break; case TIOCSWINSZ: - /* FIXME: Pseudo console can be accessed via its handle - only in the process which created it. What else can we do? */ - if (get_pseudo_console () && get_ttyp ()->master_pid == myself->pid) - { - COORD size; - size.X = ((struct winsize *) arg)->ws_col; - size.Y = ((struct winsize *) arg)->ws_row; - ResizePseudoConsole (get_pseudo_console (), size); - } if (get_ttyp ()->winsize.ws_row != ((struct winsize *) arg)->ws_row || get_ttyp ()->winsize.ws_col != ((struct winsize *) arg)->ws_col) { + /* FIXME: Pseudo console can be accessed via its handle + only in the process which created it. What else can we do? */ + if (get_pseudo_console () && get_ttyp ()->master_pid == myself->pid) + { + COORD size; + size.X = ((struct winsize *) arg)->ws_col; + size.Y = ((struct winsize *) arg)->ws_row; + ResizePseudoConsole (get_pseudo_console (), size); + } get_ttyp ()->winsize = *(struct winsize *) arg; get_ttyp ()->kill_pgrp (SIGWINCH); } From 41ae84e6dcd810b9c94f1bbd5e00e6c8a28ccb94 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Thu, 28 May 2020 13:05:32 -0400 Subject: [PATCH 375/520] Cygwin: stat: fix st_mode of fifos again This partially reverts commit f36262d56ac78f04de147746ce4a85c6155e4a23. That commit incorrectly made the st_mode of a fifo reflect the Windows permissions of the disk file underlying the fifo. --- winsup/cygwin/fhandler_disk_file.cc | 2 +- winsup/cygwin/release/3.1.5 | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 43d81c10f..c37b3c504 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -491,7 +491,7 @@ fhandler_base::fstat_helper (struct stat *buf) else { buf->st_dev = buf->st_rdev = dev (); - buf->st_mode |= dev ().mode () & S_IFMT; + buf->st_mode = dev ().mode (); buf->st_size = 0; } } diff --git a/winsup/cygwin/release/3.1.5 b/winsup/cygwin/release/3.1.5 index 1e3763f6c..0a78f5ff0 100644 --- a/winsup/cygwin/release/3.1.5 +++ b/winsup/cygwin/release/3.1.5 @@ -32,3 +32,6 @@ Bug Fixes: - Make sure pseudo tty doesn't hang if cygwin-console-helper.exe is non-functional. Addresses: https://cygwin.com/pipermail/cygwin-patches/2020q2/010191.html + +- Fix a bug causing FIFOs to have incorrect permissions. + Addresses: https://sourceware.org/pipermail/cygwin/2020-May/245031.html From 0c5aab9c99cf150bc90374c7fb72931e56dc955f Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Sat, 30 May 2020 18:25:03 +0900 Subject: [PATCH 376/520] Cygwin: console: Make cursor keys work in vim under ConEmu. - After commit 774b8996d1f3e535e8267be4eb8e751d756c2cec, cursor keys do not work in vim under ConEmu without cygwin-connector. This patch fixes the issue. --- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_console.cc | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 76ad2aab0..b2957e4ee 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -2040,6 +2040,7 @@ class dev_console char *cons_rapoi; LONG xterm_mode_input; LONG xterm_mode_output; + bool cursor_key_app_mode; inline UINT get_console_cp (); DWORD con_to_str (char *d, int dlen, WCHAR w); diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 3930c6068..5cb4343ea 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -243,6 +243,7 @@ fhandler_console::setup () con.backspace_keycode = CERASE; con.cons_rapoi = NULL; shared_console_info->tty_min_state.is_console = true; + con.cursor_key_app_mode = false; } } @@ -289,6 +290,8 @@ fhandler_console::request_xterm_mode_input (bool req) GetConsoleMode (get_handle (), &dwMode); dwMode |= ENABLE_VIRTUAL_TERMINAL_INPUT; SetConsoleMode (get_handle (), dwMode); + if (con.cursor_key_app_mode) /* Restore DECCKM */ + WriteConsoleA (get_output_handle (), "\033[?1h", 5, NULL, 0); } } else @@ -2150,10 +2153,6 @@ fhandler_console::char_command (char c) break; case 'h': /* DECSET */ case 'l': /* DECRST */ - if (c == 'h') - con.screen_alternated = true; - else - con.screen_alternated = false; wpbuf.put (c); /* Just send the sequence */ wpbuf.send (get_output_handle ()); @@ -2161,8 +2160,15 @@ fhandler_console::char_command (char c) { bool need_fix_tab_position = false; for (int i = 0; i < con.nargs; i++) - if (con.args[i] == 1049) - need_fix_tab_position = true; + { + if (con.args[i] == 1049) + { + con.screen_alternated = (c == 'h'); + need_fix_tab_position = true; + } + if (con.args[i] == 1) /* DECCKM */ + con.cursor_key_app_mode = (c == 'h'); + } /* Call fix_tab_position() if screen has been alternated. */ if (need_fix_tab_position) fix_tab_position (); @@ -2174,6 +2180,7 @@ fhandler_console::char_command (char c) con.scroll_region.Top = 0; con.scroll_region.Bottom = -1; con.savex = con.savey = -1; + con.cursor_key_app_mode = false; } wpbuf.put (c); /* Just send the sequence */ @@ -3077,6 +3084,7 @@ fhandler_console::write (const void *vsrc, size_t len) con.scroll_region.Top = 0; con.scroll_region.Bottom = -1; con.savex = con.savey = -1; + con.cursor_key_app_mode = false; } /* ESC sequences below (e.g. OSC, etc) are left to xterm emulation in xterm compatible mode, therefore, are not From d6242d87336d7f06691d1e1d9a3ce9324fd9903c Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sat, 30 May 2020 19:41:18 +0200 Subject: [PATCH 377/520] Cygwin: update C++ dialect to gnu++14 Disable -std option since gnu++14 is default anyway, but keep it available as comment. Update dynamic exception specifications deprecated with C++11 to C++11-introduced noexcept expression. Signed-off-by: Corinna Vinschen --- winsup/cygwin/Makefile.in | 2 +- winsup/cygwin/lib/_cygwin_crt0_common.cc | 16 ++++++------ winsup/cygwin/libstdcxx_wrapper.cc | 32 ++++++++++++------------ 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index 0ec90de58..9bbdf8cc3 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in @@ -77,7 +77,7 @@ COMMON_CFLAGS=-MMD ${$(*F)_CFLAGS} -Werror -fmerge-constants -ftracer $(CCEXTRA) ifeq ($(target_cpu),x86_64) COMMON_CFLAGS+=-mcmodel=small endif -COMPILE.cc+=${COMMON_CFLAGS} -std=gnu++98 +COMPILE.cc+=${COMMON_CFLAGS} # -std=gnu++14 COMPILE.c+=${COMMON_CFLAGS} AR:=@AR@ diff --git a/winsup/cygwin/lib/_cygwin_crt0_common.cc b/winsup/cygwin/lib/_cygwin_crt0_common.cc index c7e4eeac4..025e2f2ee 100644 --- a/winsup/cygwin/lib/_cygwin_crt0_common.cc +++ b/winsup/cygwin/lib/_cygwin_crt0_common.cc @@ -34,21 +34,21 @@ details. */ references to these operators toward the redirectors in the Cygwin DLL; this way we can record what definitions were visible at final link time but still send all calls to the redirectors. */ -extern WEAK void *operator new(std::size_t sz) throw (std::bad_alloc) +extern WEAK void *operator new(std::size_t sz) noexcept (false) __asm__ (REAL_ZNWX); -extern WEAK void *operator new[](std::size_t sz) throw (std::bad_alloc) +extern WEAK void *operator new[](std::size_t sz) noexcept (false) __asm__ (REAL_ZNAX); -extern WEAK void operator delete(void *p) throw() +extern WEAK void operator delete(void *p) noexcept (true) __asm__ (REAL_ZDLPV); -extern WEAK void operator delete[](void *p) throw() +extern WEAK void operator delete[](void *p) noexcept (true) __asm__ (REAL_ZDAPV); -extern WEAK void *operator new(std::size_t sz, const std::nothrow_t &nt) throw() +extern WEAK void *operator new(std::size_t sz, const std::nothrow_t &nt) noexcept (true) __asm__ (REAL_ZNWX_NOTHROW_T); -extern WEAK void *operator new[](std::size_t sz, const std::nothrow_t &nt) throw() +extern WEAK void *operator new[](std::size_t sz, const std::nothrow_t &nt) noexcept (true) __asm__ (REAL_ZNAX_NOTHROW_T); -extern WEAK void operator delete(void *p, const std::nothrow_t &nt) throw() +extern WEAK void operator delete(void *p, const std::nothrow_t &nt) noexcept (true) __asm__ (REAL_ZDLPV_NOTHROW_T); -extern WEAK void operator delete[](void *p, const std::nothrow_t &nt) throw() +extern WEAK void operator delete[](void *p, const std::nothrow_t &nt) noexcept (true) __asm__ (REAL_ZDAPV_NOTHROW_T); /* Avoid an info message from linker when linking applications. */ diff --git a/winsup/cygwin/libstdcxx_wrapper.cc b/winsup/cygwin/libstdcxx_wrapper.cc index 6cd4c754d..2c41b3759 100644 --- a/winsup/cygwin/libstdcxx_wrapper.cc +++ b/winsup/cygwin/libstdcxx_wrapper.cc @@ -32,67 +32,67 @@ details. */ #define MANGLED_ZNAX_NOTHROW_T "___wrap__ZnajRKSt9nothrow_t" #endif -extern void *operator new(std::size_t sz) throw (std::bad_alloc) +extern void *operator new(std::size_t sz) noexcept (false) __asm__ (MANGLED_ZNWX); -extern void *operator new[](std::size_t sz) throw (std::bad_alloc) +extern void *operator new[](std::size_t sz) noexcept (false) __asm__ (MANGLED_ZNAX); -extern void operator delete(void *p) throw() +extern void operator delete(void *p) noexcept (true) __asm__ (_SYMSTR (__wrap__ZdlPv)); -extern void operator delete[](void *p) throw() +extern void operator delete[](void *p) noexcept (true) __asm__ (_SYMSTR (__wrap__ZdaPv)); -extern void *operator new(std::size_t sz, const std::nothrow_t &nt) throw() +extern void *operator new(std::size_t sz, const std::nothrow_t &nt) noexcept (true) __asm__ (MANGLED_ZNWX_NOTHROW_T); -extern void *operator new[](std::size_t sz, const std::nothrow_t &nt) throw() +extern void *operator new[](std::size_t sz, const std::nothrow_t &nt) noexcept (true) __asm__ (MANGLED_ZNAX_NOTHROW_T); -extern void operator delete(void *p, const std::nothrow_t &nt) throw() +extern void operator delete(void *p, const std::nothrow_t &nt) noexcept (true) __asm__ (_SYMSTR (__wrap__ZdlPvRKSt9nothrow_t)); -extern void operator delete[](void *p, const std::nothrow_t &nt) throw() +extern void operator delete[](void *p, const std::nothrow_t &nt) noexcept (true) __asm__ (_SYMSTR (__wrap__ZdaPvRKSt9nothrow_t)); extern void * -operator new(std::size_t sz) throw (std::bad_alloc) +operator new(std::size_t sz) noexcept (false) { return (*user_data->cxx_malloc->oper_new) (sz); } extern void * -operator new[](std::size_t sz) throw (std::bad_alloc) +operator new[](std::size_t sz) noexcept (false) { return (*user_data->cxx_malloc->oper_new__) (sz); } extern void -operator delete(void *p) throw() +operator delete(void *p) noexcept (true) { (*user_data->cxx_malloc->oper_delete) (p); } extern void -operator delete[](void *p) throw() +operator delete[](void *p) noexcept (true) { (*user_data->cxx_malloc->oper_delete__) (p); } extern void * -operator new(std::size_t sz, const std::nothrow_t &nt) throw() +operator new(std::size_t sz, const std::nothrow_t &nt) noexcept (true) { return (*user_data->cxx_malloc->oper_new_nt) (sz, nt); } extern void * -operator new[](std::size_t sz, const std::nothrow_t &nt) throw() +operator new[](std::size_t sz, const std::nothrow_t &nt) noexcept (true) { return (*user_data->cxx_malloc->oper_new___nt) (sz, nt); } extern void -operator delete(void *p, const std::nothrow_t &nt) throw() +operator delete(void *p, const std::nothrow_t &nt) noexcept (true) { (*user_data->cxx_malloc->oper_delete_nt) (p, nt); } extern void -operator delete[](void *p, const std::nothrow_t &nt) throw() +operator delete[](void *p, const std::nothrow_t &nt) noexcept (true) { (*user_data->cxx_malloc->oper_delete___nt) (p, nt); } From 0f7193f4fbbfdde52fe21639ca582a32a63eb851 Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Sun, 31 May 2020 14:53:17 +0900 Subject: [PATCH 378/520] Cygwin: pty: Prevent garbage remained in read ahead buffer. - After commit 29431fcb5b14d4c5ac3b3161a076eb1a208349d9, the issue reported in https://cygwin.com/pipermail/cygwin/2020-May/245057.html occurs. This is caused by the following mechanism. Cygwin less called from non-cygwin git is executed under /dev/cons* rather than /dev/pty* because parent git process only inherits pseudo console handle. Therefore, less sets ICANON flag for /dev/cons* rather than original /dev/pty*. When pty is switched to non-cygwin git process, line_edit() is used in fhandler_pty_master::write() only to set input_available_event and read ahead buffer is supposed to be flushed in accept_input(). However, ICANON flag is not set for /dev/pty*, so accept_input() is not called unless newline is entered. As a result, the input data remains in the read ahead buffer. This patch fixes the issue. --- winsup/cygwin/fhandler.h | 3 ++- winsup/cygwin/fhandler_tty.cc | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index b2957e4ee..4035c7e56 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -328,7 +328,7 @@ class fhandler_base virtual bool get_readahead_valid () { return raixget () < ralen (); } int puts_readahead (const char *s, size_t len = (size_t) -1); - int put_readahead (char value); + virtual int put_readahead (char value); int get_readahead (); int peek_readahead (int queryput = 0); @@ -2381,6 +2381,7 @@ public: int process_slave_output (char *buf, size_t len, int pktmode_on); void doecho (const void *str, DWORD len); int accept_input (); + int put_readahead (char value); int open (int flags, mode_t mode = 0); void open_setup (int flags); ssize_t __stdcall write (const void *ptr, size_t len); diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index b091765b3..d017cde38 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -532,6 +532,14 @@ fhandler_pty_master::doecho (const void *str, DWORD len) release_output_mutex (); } +int +fhandler_pty_master::put_readahead (char value) +{ + if (to_be_read_from_pcon ()) + return 1; + return fhandler_base::put_readahead (value); +} + int fhandler_pty_master::accept_input () { @@ -542,12 +550,14 @@ fhandler_pty_master::accept_input () bytes_left = eat_readahead (-1); - if (!bytes_left) + if (to_be_read_from_pcon ()) + ; /* Do nothing */ + else if (!bytes_left) { termios_printf ("sending EOF to slave"); get_ttyp ()->read_retval = 0; } - else if (!to_be_read_from_pcon ()) + else { char *p = rabuf (); DWORD rc; From 4527541ec66af8d82bb9dba5d25afdf489d71271 Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Sun, 31 May 2020 14:53:18 +0900 Subject: [PATCH 379/520] Cygwin: console: Discard some unsupported escape sequences. - If the cygwin vim is started from a non-cygwin process which is executed in pseudo console, shift key and ctrl key do not work. In this case, vim is executed under /dev/cons*. If vim outputs escape sequence which is not supported by pseudo console, the escape sequence is leaked into the parent pty. This causes unexpected results. This patch fixes the issue by discarding "CSI > Pm m". "OSC 10;? BEL/ST" and "OSC 11;? BEL/ST" are discarded as well. --- winsup/cygwin/fhandler_console.cc | 54 ++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 16 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 5cb4343ea..dd979fb8e 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -2186,6 +2186,14 @@ fhandler_console::char_command (char c) /* Just send the sequence */ wpbuf.send (get_output_handle ()); break; + case 'm': + if (con.saw_greater_than_sign) + break; /* Ignore unsupported CSI > Pm m */ + /* Text attribute settings */ + wpbuf.put (c); + /* Just send the sequence */ + wpbuf.send (get_output_handle ()); + break; default: /* Other escape sequences */ wpbuf.put (c); @@ -3077,6 +3085,13 @@ fhandler_console::write (const void *vsrc, size_t len) con.state = normal; wpbuf.empty(); } + else if (*src == ']') /* OSC Operating System Command */ + { + wpbuf.put (*src); + con.rarg = 0; + con.my_title_buf[0] = '\0'; + con.state = gotrsquare; + } else if (wincap.has_con_24bit_colors () && !con_is_legacy) { if (*src == 'c') /* RIS Full reset */ @@ -3095,13 +3110,6 @@ fhandler_console::write (const void *vsrc, size_t len) con.state = normal; wpbuf.empty(); } - else if (*src == ']') /* OSC Operating System Command */ - { - wpbuf.put (*src); - con.rarg = 0; - con.my_title_buf[0] = '\0'; - con.state = gotrsquare; - } else if (*src == '(') /* Designate G0 character set */ { wpbuf.put (*src); @@ -3179,7 +3187,8 @@ fhandler_console::write (const void *vsrc, size_t len) con.rarg = con.rarg * 10 + (*src - '0'); else if (*src == ';' && (con.rarg == 2 || con.rarg == 0)) con.state = gettitle; - else if (*src == ';' && (con.rarg == 4 || con.rarg == 104)) + else if (*src == ';' && (con.rarg == 4 || con.rarg == 104 + || (con.rarg >= 10 && con.rarg <= 19))) con.state = eatpalette; else con.state = eattitle; @@ -3189,10 +3198,13 @@ fhandler_console::write (const void *vsrc, size_t len) case eattitle: case gettitle: { + wpbuf.put (*src); int n = strlen (con.my_title_buf); if (*src < ' ') { - if (*src == '\007' && con.state == gettitle) + if (wincap.has_con_24bit_colors () && !con_is_legacy) + wpbuf.send (get_output_handle ()); + else if (*src == '\007' && con.state == gettitle) set_console_title (con.my_title_buf); con.state = normal; wpbuf.empty(); @@ -3201,27 +3213,37 @@ fhandler_console::write (const void *vsrc, size_t len) { con.my_title_buf[n++] = *src; con.my_title_buf[n] = '\0'; - wpbuf.put (*src); } src++; break; } case eatpalette: - if (*src == '\033') - { - wpbuf.put (*src); - con.state = endpalette; - } + wpbuf.put (*src); + if (*src == '?') + con.saw_question_mark = true; + else if (*src == '\033') + con.state = endpalette; else if (*src == '\a') { + /* Send OSC Ps; Pt BEL other than OSC Ps; ? BEL */ + if (wincap.has_con_24bit_colors () && !con_is_legacy + && !con.saw_question_mark) + wpbuf.send (get_output_handle ()); con.state = normal; wpbuf.empty(); } src++; break; case endpalette: + wpbuf.put (*src); if (*src == '\\') - con.state = normal; + { + /* Send OSC Ps; Pt ST other than OSC Ps; ? ST */ + if (wincap.has_con_24bit_colors () && !con_is_legacy + && !con.saw_question_mark) + wpbuf.send (get_output_handle ()); + con.state = normal; + } else /* Sequence error (abort) */ con.state = normal; From ac1f63ef2812093ce0e053dd505b44c55c3d47d6 Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Sun, 31 May 2020 14:53:19 +0900 Subject: [PATCH 380/520] Cygwin: pty: Clean up fhandler_pty_master::pty_master_fwd_thread(). - Remove the code which is not necessary anymore. --- winsup/cygwin/fhandler_tty.cc | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index d017cde38..c3d49968d 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -3324,24 +3324,6 @@ fhandler_pty_master::pty_master_fwd_thread () continue; } - /* Remove ESC sequence which returns results to console - input buffer. Without this, cursor position report - is put into the input buffer as a garbage. */ - /* Remove ESC sequence to report cursor position. */ - char *p0; - while ((p0 = (char *) memmem (outbuf, rlen, "\033[6n", 4))) - { - memmove (p0, p0+4, rlen - (p0+4 - outbuf)); - rlen -= 4; - } - /* Remove ESC sequence to report terminal identity. */ - while ((p0 = (char *) memmem (outbuf, rlen, "\033[0c", 4))) - { - memmove (p0, p0+4, rlen - (p0+4 - outbuf)); - rlen -= 4; - } - wlen = rlen; - size_t nlen; char *buf = convert_mb_str (get_ttyp ()->term_code_page, &nlen, CP_UTF8, ptr, wlen); From d212bdc40096fde87b086290ac34b1cc6517b19f Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Sun, 31 May 2020 14:53:20 +0900 Subject: [PATCH 381/520] Cygwin: pty: Revise the code which prevents undesired window title. - In current pty, the window title can not be set from non-cygwin program due to the code which prevents overwriting the window title to "cygwin-console-helper.exe" in fhandler_pty_master::pty_ master_fwd_thread(). This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index c3d49968d..e434b7878 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -3313,9 +3313,14 @@ fhandler_pty_master::pty_master_fwd_thread () } else if (state == 4 && outbuf[i] == '\a') { - memmove (&outbuf[start_at], &outbuf[i+1], rlen-i-1); + const char *helper_str = "\\bin\\cygwin-console-helper.exe"; + if (memmem (&outbuf[start_at], i + 1 - start_at, + helper_str, strlen (helper_str))) + { + memmove (&outbuf[start_at], &outbuf[i+1], rlen-i-1); + rlen = wlen = start_at + rlen - i - 1; + } state = 0; - rlen = wlen = start_at + rlen - i - 1; continue; } else if (outbuf[i] == '\a') From c4b060e3fe3bed05b3a69ccbcc20993ad85e163d Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Mon, 1 Jun 2020 15:16:18 +0900 Subject: [PATCH 382/520] Cygwin: pty: Fix screen distortion after using less for native apps. - If the output of non-cygwin apps is browsed using less, screen is ocasionally distorted after less exits. This frequently happens if cmd.exe is executed after less. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index e434b7878..bcc7648f3 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1372,7 +1372,7 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len, p0 = (char *) memmem (p1, nlen - (p1-buf), "\033[?1049h", 8); if (p0) { - //p0 += 8; + p0 += 8; get_ttyp ()->screen_alternated = true; if (get_ttyp ()->switch_to_pcon_out) do_not_reset_switch_to_pcon = true; @@ -1384,7 +1384,7 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len, p1 = (char *) memmem (p0, nlen - (p0-buf), "\033[?1049l", 8); if (p1) { - p1 += 8; + //p1 += 8; get_ttyp ()->screen_alternated = false; do_not_reset_switch_to_pcon = false; memmove (p0, p1, buf+nlen - p1); @@ -1504,7 +1504,10 @@ fhandler_pty_slave::write (const void *ptr, size_t len) reset_switch_to_pcon (); - UINT target_code_page = get_ttyp ()->switch_to_pcon_out ? + bool output_to_pcon = + get_ttyp ()->switch_to_pcon_out && !get_ttyp ()->screen_alternated; + + UINT target_code_page = output_to_pcon ? GetConsoleOutputCP () : get_ttyp ()->term_code_page; ssize_t nlen; char *buf = convert_mb_str (target_code_page, (size_t *) &nlen, @@ -1513,11 +1516,11 @@ fhandler_pty_slave::write (const void *ptr, size_t len) /* If not attached to this pseudo console, try to attach temporarily. */ pid_restore = 0; bool fallback = false; - if (get_ttyp ()->switch_to_pcon_out && pcon_attached_to != get_minor ()) + if (output_to_pcon && pcon_attached_to != get_minor ()) if (!try_reattach_pcon ()) fallback = true; - if (get_ttyp ()->switch_to_pcon_out && !fallback && + if (output_to_pcon && !fallback && (memmem (buf, nlen, "\033[6n", 4) || memmem (buf, nlen, "\033[0c", 4))) { get_ttyp ()->pcon_in_empty = false; @@ -1530,12 +1533,12 @@ fhandler_pty_slave::write (const void *ptr, size_t len) if (!(get_ttyp ()->ti.c_oflag & OPOST) || !(get_ttyp ()->ti.c_oflag & ONLCR)) flags |= DISABLE_NEWLINE_AUTO_RETURN; - if (get_ttyp ()->switch_to_pcon_out && !fallback) + if (output_to_pcon && !fallback) { GetConsoleMode (get_output_handle (), &dwMode); SetConsoleMode (get_output_handle (), dwMode | flags); } - HANDLE to = (get_ttyp ()->switch_to_pcon_out && !fallback) ? + HANDLE to = (output_to_pcon && !fallback) ? get_output_handle () : get_output_handle_cyg (); acquire_output_mutex (INFINITE); if (!process_opost_output (to, buf, nlen, false)) @@ -1555,7 +1558,7 @@ fhandler_pty_slave::write (const void *ptr, size_t len) release_output_mutex (); mb_str_free (buf); flags = ENABLE_VIRTUAL_TERMINAL_PROCESSING; - if (get_ttyp ()->switch_to_pcon_out && !fallback) + if (output_to_pcon && !fallback) SetConsoleMode (get_output_handle (), dwMode | flags); restore_reattach_pcon (); From 8873f073c8e2c402e3ce8d8775fc22cdaf83b55c Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 1 Jun 2020 10:48:11 +0200 Subject: [PATCH 383/520] Bump version to 3.1.6 Signed-off-by: Corinna Vinschen --- winsup/cygwin/include/cygwin/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 7e85cf1a0..b9afd279a 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -11,7 +11,7 @@ details. */ changes to the DLL and is mainly informative in nature. */ #define CYGWIN_VERSION_DLL_MAJOR 3001 -#define CYGWIN_VERSION_DLL_MINOR 5 +#define CYGWIN_VERSION_DLL_MINOR 6 /* Major numbers before CYGWIN_VERSION_DLL_EPOCH are incompatible. */ From e6ce6f1430eee503a388cf1fc7fe6634de09fb0f Mon Sep 17 00:00:00 2001 From: Eshan dhawan via Newlib Date: Tue, 2 Jun 2020 22:11:40 +0530 Subject: [PATCH 384/520] hard float support for PowerPC taken from FreeBSD Signed-off-by: Eshan dhawan --- newlib/configure.host | 1 + newlib/libc/machine/powerpc/machine/fenv-fp.h | 198 ++++++++++++++++++ newlib/libc/machine/powerpc/sys/fenv.h | 132 ++++++++++++ newlib/libm/machine/configure.in | 1 + newlib/libm/machine/powerpc/Makefile.am | 20 ++ newlib/libm/machine/powerpc/configure.in | 11 + newlib/libm/machine/powerpc/feclearexcept.c | 7 + newlib/libm/machine/powerpc/fegetenv.c | 7 + newlib/libm/machine/powerpc/fegetexceptflag.c | 7 + newlib/libm/machine/powerpc/fegetround.c | 7 + newlib/libm/machine/powerpc/feholdexcept.c | 7 + newlib/libm/machine/powerpc/fenv.c | 51 +++++ newlib/libm/machine/powerpc/feraiseexcept.c | 7 + newlib/libm/machine/powerpc/fesetenv.c | 7 + newlib/libm/machine/powerpc/fesetexceptflag.c | 7 + newlib/libm/machine/powerpc/fesetround.c | 7 + newlib/libm/machine/powerpc/fetestexcept.c | 7 + newlib/libm/machine/powerpc/feupdateenv.c | 7 + 18 files changed, 491 insertions(+) create mode 100644 newlib/libc/machine/powerpc/machine/fenv-fp.h create mode 100644 newlib/libc/machine/powerpc/sys/fenv.h create mode 100644 newlib/libm/machine/powerpc/Makefile.am create mode 100644 newlib/libm/machine/powerpc/configure.in create mode 100644 newlib/libm/machine/powerpc/feclearexcept.c create mode 100644 newlib/libm/machine/powerpc/fegetenv.c create mode 100644 newlib/libm/machine/powerpc/fegetexceptflag.c create mode 100644 newlib/libm/machine/powerpc/fegetround.c create mode 100644 newlib/libm/machine/powerpc/feholdexcept.c create mode 100644 newlib/libm/machine/powerpc/fenv.c create mode 100644 newlib/libm/machine/powerpc/feraiseexcept.c create mode 100644 newlib/libm/machine/powerpc/fesetenv.c create mode 100644 newlib/libm/machine/powerpc/fesetexceptflag.c create mode 100644 newlib/libm/machine/powerpc/fesetround.c create mode 100644 newlib/libm/machine/powerpc/fetestexcept.c create mode 100644 newlib/libm/machine/powerpc/feupdateenv.c diff --git a/newlib/configure.host b/newlib/configure.host index a84c0c80a..9d2166f3d 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -290,6 +290,7 @@ case "${host_cpu}" in ;; powerpc*) machine_dir=powerpc + libm_machine_dir=powerpc ;; pru*) newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED" diff --git a/newlib/libc/machine/powerpc/machine/fenv-fp.h b/newlib/libc/machine/powerpc/machine/fenv-fp.h new file mode 100644 index 000000000..7cf20218e --- /dev/null +++ b/newlib/libc/machine/powerpc/machine/fenv-fp.h @@ -0,0 +1,198 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2004-2005 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +__fenv_static inline int +feclearexcept(int excepts) +{ + union __fpscr __r; + + if (excepts & FE_INVALID) + excepts |= FE_ALL_INVALID; + __mffs(&__r); + __r.__bits.__reg &= ~excepts; + __mtfsf(__r); + return (0); +} + + +__fenv_static inline int +fegetexceptflag(fexcept_t *flagp, int excepts) +{ + union __fpscr __r; + + __mffs(&__r); + *flagp = __r.__bits.__reg & excepts; + return (0); +} + +__fenv_static inline int +fesetexceptflag(const fexcept_t *flagp, int excepts) +{ + union __fpscr __r; + + if (excepts & FE_INVALID) + excepts |= FE_ALL_EXCEPT; + __mffs(&__r); + __r.__bits.__reg &= ~excepts; + __r.__bits.__reg |= *flagp & excepts; + __mtfsf(__r); + return (0); +} + +__fenv_static inline int +feraiseexcept(int excepts) +{ + union __fpscr __r; + + if (excepts & FE_INVALID) + excepts |= FE_VXSOFT; + __mffs(&__r); + __r.__bits.__reg |= excepts; + __mtfsf(__r); + return (0); +} + +__fenv_static inline int +fetestexcept(int excepts) +{ + union __fpscr __r; + + __mffs(&__r); + return (__r.__bits.__reg & excepts); +} + +__fenv_static inline int +fegetround(void) +{ + union __fpscr __r; + + __mffs(&__r); + return (__r.__bits.__reg & _ROUND_MASK); +} + +__fenv_static inline int +fesetround(int rounding_mode) +{ + union __fpscr __r; + + if (rounding_mode & ~_ROUND_MASK) + return (-1); + __mffs(&__r); + __r.__bits.__reg &= ~_ROUND_MASK; + __r.__bits.__reg |= rounding_mode; + __mtfsf(__r); + return (0); +} + +__fenv_static inline int +fegetenv(fenv_t *envp) +{ + union __fpscr __r; + + __mffs(&__r); + *envp = __r.__bits.__reg; + return (0); +} + +__fenv_static inline int +feholdexcept(fenv_t *envp) +{ + union __fpscr __r; + + __mffs(&__r); + *envp = __r.__bits.__reg; + __r.__bits.__reg &= ~(FE_ALL_EXCEPT | _ENABLE_MASK); + __mtfsf(__r); + return (0); +} + +__fenv_static inline int +fesetenv(const fenv_t *envp) +{ + union __fpscr __r; + + __r.__bits.__reg = *envp; + __mtfsf(__r); + return (0); +} + +__fenv_static inline int +feupdateenv(const fenv_t *envp) +{ + union __fpscr __r; + + __mffs(&__r); + __r.__bits.__reg &= FE_ALL_EXCEPT; + __r.__bits.__reg |= *envp; + __mtfsf(__r); + return (0); +} + +#if __BSD_VISIBLE + +/* We currently provide no external definitions of the functions below. */ + +static inline int +feenableexcept(int __mask) +{ + union __fpscr __r; + fenv_t __oldmask; + + __mffs(&__r); + __oldmask = __r.__bits.__reg; + __r.__bits.__reg |= (__mask & FE_ALL_EXCEPT) >> _FPUSW_SHIFT; + __mtfsf(__r); + return ((__oldmask & _ENABLE_MASK) << _FPUSW_SHIFT); +} + +static inline int +fedisableexcept(int __mask) +{ + union __fpscr __r; + fenv_t __oldmask; + + __mffs(&__r); + __oldmask = __r.__bits.__reg; + __r.__bits.__reg &= ~((__mask & FE_ALL_EXCEPT) >> _FPUSW_SHIFT); + __mtfsf(__r); + return ((__oldmask & _ENABLE_MASK) << _FPUSW_SHIFT); +} + +static inline int +fegetexcept(void) +{ + union __fpscr __r; + + __mffs(&__r); + return ((__r.__bits.__reg & _ENABLE_MASK) << _FPUSW_SHIFT); +} + +#endif /* __BSD_VISIBLE */ + diff --git a/newlib/libc/machine/powerpc/sys/fenv.h b/newlib/libc/machine/powerpc/sys/fenv.h new file mode 100644 index 000000000..39f12bf5e --- /dev/null +++ b/newlib/libc/machine/powerpc/sys/fenv.h @@ -0,0 +1,132 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2004-2005 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_FENV_H_ +#define _SYS_FENV_H_ + +#include +#include + +#ifndef __fenv_static +#define __fenv_static static +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +typedef int fenv_t; +typedef int fexcept_t; + +/* Exception flags */ +#define FE_INEXACT 0x02000000 +#define FE_DIVBYZERO 0x04000000 +#define FE_UNDERFLOW 0x08000000 +#define FE_OVERFLOW 0x10000000 +#define FE_INVALID 0x20000000 /* all types of invalid FP ops */ + +/* + * The PowerPC architecture has extra invalid flags that indicate the + * specific type of invalid operation occurred. These flags may be + * tested, set, and cleared---but not masked---separately. All of + * these bits are cleared when FE_INVALID is cleared, but only + * FE_VXSOFT is set when FE_INVALID is explicitly set in software. + */ +#define FE_VXCVI 0x00000100 /* invalid integer convert */ +#define FE_VXSQRT 0x00000200 /* square root of a negative */ +#define FE_VXSOFT 0x00000400 /* software-requested exception */ +#define FE_VXVC 0x00080000 /* ordered comparison involving NaN */ +#define FE_VXIMZ 0x00100000 /* inf * 0 */ +#define FE_VXZDZ 0x00200000 /* 0 / 0 */ +#define FE_VXIDI 0x00400000 /* inf / inf */ +#define FE_VXISI 0x00800000 /* inf - inf */ +#define FE_VXSNAN 0x01000000 /* operation on a signalling NaN */ +#define FE_ALL_INVALID (FE_VXCVI | FE_VXSQRT | FE_VXSOFT | FE_VXVC | \ + FE_VXIMZ | FE_VXZDZ | FE_VXIDI | FE_VXISI | \ + FE_VXSNAN | FE_INVALID) +#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | \ + FE_ALL_INVALID | FE_OVERFLOW | FE_UNDERFLOW) + +/* Rounding modes */ +#define FE_TONEAREST 0x0000 +#define FE_TOWARDZERO 0x0001 +#define FE_UPWARD 0x0002 +#define FE_DOWNWARD 0x0003 +#define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \ + FE_UPWARD | FE_TOWARDZERO) + + + +/* Default floating-point environment */ +extern const fenv_t *_fe_dfl_env; +#define FE_DFL_ENV (_fe_dfl_env) + +/* We need to be able to map status flag positions to mask flag positions */ +#define _FPUSW_SHIFT 22 +#define _ENABLE_MASK ((FE_DIVBYZERO | FE_INEXACT | FE_INVALID | \ + FE_OVERFLOW | FE_UNDERFLOW) >> _FPUSW_SHIFT) + +#ifndef _SOFT_FLOAT +#ifdef __SPE__ +#define __mffs(__env) \ + __asm __volatile("mfspr %0, 512" : "=r" ((__env)->__bits.__reg)) +#define __mtfsf(__env) \ + __asm __volatile("mtspr 512,%0;isync" :: "r" ((__env).__bits.__reg)) +#else +#define __mffs(__env) \ + __asm __volatile("mffs %0" : "=f" ((__env)->__d)) +#define __mtfsf(__env) \ + __asm __volatile("mtfsf 255,%0" :: "f" ((__env).__d)) +#endif +#else +#define __mffs(__env) +#define __mtfsf(__env) +#endif + +union __fpscr { + double __d; + struct { +#if _BYTE_ORDER == _LITTLE_ENDIAN + fenv_t __reg; + __uint32_t __junk; +#else + __uint32_t __junk; + fenv_t __reg; +#endif + } __bits; +}; + + +#ifdef __cplusplus +} +#endif + + +#endif /* !_SYS_FENV_H_ */ diff --git a/newlib/libm/machine/configure.in b/newlib/libm/machine/configure.in index d4635214a..01d3d9f66 100644 --- a/newlib/libm/machine/configure.in +++ b/newlib/libm/machine/configure.in @@ -33,6 +33,7 @@ if test -n "${libm_machine_dir}"; then spu) AC_CONFIG_SUBDIRS(spu) ;; riscv) AC_CONFIG_SUBDIRS(riscv) ;; x86_64) AC_CONFIG_SUBDIRS(x86_64) ;; + powerpc) AC_CONFIG_SUBDIRS(powerpc) ;; esac; if test "${use_libtool}" = "yes"; then machlib=${libm_machine_dir}/lib${libm_machine_dir}.${aext} diff --git a/newlib/libm/machine/powerpc/Makefile.am b/newlib/libm/machine/powerpc/Makefile.am new file mode 100644 index 000000000..3d8dd250a --- /dev/null +++ b/newlib/libm/machine/powerpc/Makefile.am @@ -0,0 +1,20 @@ +## Process this file with automake to generate Makefile.in + +INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \ + $(CROSS_CFLAGS) $(TARGET_CFLAGS) + +LIB_SOURCES = \ + feclearexcept.c fegetenv.c fegetexceptflag.c \ + fegetround.c feholdexcept.c fenv.c feraiseexcept.c fesetenv.c \ + fesetexceptflag.c fesetround.c fetestexcept.c feupdateenv.c + +noinst_LIBRARIES = lib.a +lib_a_SOURCES = $(LIB_SOURCES) +lib_a_CFLAGS = $(AM_CFLAGS) +lib_a_CCASFLAGS = $(AM_CCASFLAGS) +noinst_DATA = + +include $(srcdir)/../../../Makefile.shared + +ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. +CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host diff --git a/newlib/libm/machine/powerpc/configure.in b/newlib/libm/machine/powerpc/configure.in new file mode 100644 index 000000000..7a22fa31c --- /dev/null +++ b/newlib/libm/machine/powerpc/configure.in @@ -0,0 +1,11 @@ + +AC_PREREQ(2.59) +AC_INIT([newlib],[NEWLIB_VERSION]) +AC_CONFIG_SRCDIR([Makefile.am]) + +AC_CONFIG_AUX_DIR(../../../..) + +NEWLIB_CONFIGURE(../../..) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/newlib/libm/machine/powerpc/feclearexcept.c b/newlib/libm/machine/powerpc/feclearexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/powerpc/feclearexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/powerpc/fegetenv.c b/newlib/libm/machine/powerpc/fegetenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/powerpc/fegetenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/powerpc/fegetexceptflag.c b/newlib/libm/machine/powerpc/fegetexceptflag.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/powerpc/fegetexceptflag.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/powerpc/fegetround.c b/newlib/libm/machine/powerpc/fegetround.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/powerpc/fegetround.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/powerpc/feholdexcept.c b/newlib/libm/machine/powerpc/feholdexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/powerpc/feholdexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/powerpc/fenv.c b/newlib/libm/machine/powerpc/fenv.c new file mode 100644 index 000000000..003727d05 --- /dev/null +++ b/newlib/libm/machine/powerpc/fenv.c @@ -0,0 +1,51 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2004 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#define __fenv_static +#include +#include + +#ifdef __GNUC_GNU_INLINE__ +#error "This file must be compiled with C99 'inline' semantics" +#endif + + + +extern inline int feclearexcept(int excepts); +extern inline int fegetexceptflag(fexcept_t *flagp, int excepts); +extern inline int fesetexceptflag(const fexcept_t *flagp, int excepts); +extern inline int feraiseexcept(int excepts); +extern inline int fetestexcept(int excepts); +extern inline int fegetround(void); +extern inline int fesetround(int rounding_mode); +extern inline int fegetenv(fenv_t *envp); +extern inline int feholdexcept(fenv_t *envp); +extern inline int fesetenv(const fenv_t *envp); +extern inline int feupdateenv(const fenv_t *envp); diff --git a/newlib/libm/machine/powerpc/feraiseexcept.c b/newlib/libm/machine/powerpc/feraiseexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/powerpc/feraiseexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/powerpc/fesetenv.c b/newlib/libm/machine/powerpc/fesetenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/powerpc/fesetenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/powerpc/fesetexceptflag.c b/newlib/libm/machine/powerpc/fesetexceptflag.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/powerpc/fesetexceptflag.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/powerpc/fesetround.c b/newlib/libm/machine/powerpc/fesetround.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/powerpc/fesetround.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/powerpc/fetestexcept.c b/newlib/libm/machine/powerpc/fetestexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/powerpc/fetestexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/powerpc/feupdateenv.c b/newlib/libm/machine/powerpc/feupdateenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/powerpc/feupdateenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" From 8014dc709922a0d9934540d79257fe899544046f Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Thu, 4 Jun 2020 10:43:19 +0900 Subject: [PATCH 385/520] Cygwin: pty: Fix screen distortion after less for native apps again. - Commit c4b060e3fe3bed05b3a69ccbcc20993ad85e163d seems to be not enough. Moreover, it does not work as expected at all in Win10 1809. This patch essentially reverts that commit and add another fix. After all, the cause of the problem was a race issue in switch_to_pcon_out flag. That is, this flag is set when native app starts, however, it is delayed by wait_pcon_fwd(). Since the flag is not set yet when less starts, the data which should go into the output_handle accidentally goes into output_handle_cyg. This patch fixes the problem more essentially for the cause of the problem than previous one. --- winsup/cygwin/fhandler.h | 1 - winsup/cygwin/fhandler_tty.cc | 49 +++++++++++------------------------ winsup/cygwin/tty.cc | 7 ++++- winsup/cygwin/tty.h | 1 - 4 files changed, 21 insertions(+), 37 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 4035c7e56..c6ce6d8e1 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -2354,7 +2354,6 @@ class fhandler_pty_slave: public fhandler_pty_common void setup_locale (void); void set_freeconsole_on_close (bool val); void trigger_redraw_screen (void); - void wait_pcon_fwd (void); void pull_pcon_input (void); void update_pcon_input_state (bool need_lock); }; diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index bcc7648f3..126249d9f 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1277,6 +1277,7 @@ fhandler_pty_slave::set_switch_to_pcon (int fd_set) { if (fd < 0) fd = fd_set; + acquire_output_mutex (INFINITE); if (fd == 0 && !get_ttyp ()->switch_to_pcon_in) { pull_pcon_input (); @@ -1286,13 +1287,13 @@ fhandler_pty_slave::set_switch_to_pcon (int fd_set) get_ttyp ()->switch_to_pcon_in = true; if (isHybrid && !get_ttyp ()->switch_to_pcon_out) { - wait_pcon_fwd (); + get_ttyp ()->wait_pcon_fwd (); get_ttyp ()->switch_to_pcon_out = true; } } else if ((fd == 1 || fd == 2) && !get_ttyp ()->switch_to_pcon_out) { - wait_pcon_fwd (); + get_ttyp ()->wait_pcon_fwd (); if (get_ttyp ()->pcon_pid == 0 || !pinfo (get_ttyp ()->pcon_pid)) get_ttyp ()->pcon_pid = myself->pid; @@ -1300,6 +1301,7 @@ fhandler_pty_slave::set_switch_to_pcon (int fd_set) if (isHybrid) get_ttyp ()->switch_to_pcon_in = true; } + release_output_mutex (); } void @@ -1314,12 +1316,14 @@ fhandler_pty_slave::reset_switch_to_pcon (void) return; if (do_not_reset_switch_to_pcon) return; + acquire_output_mutex (INFINITE); if (get_ttyp ()->switch_to_pcon_out) /* Wait for pty_master_fwd_thread() */ - wait_pcon_fwd (); + get_ttyp ()->wait_pcon_fwd (); get_ttyp ()->pcon_pid = 0; get_ttyp ()->switch_to_pcon_in = false; get_ttyp ()->switch_to_pcon_out = false; + release_output_mutex (); init_console_handler (true); } @@ -1372,7 +1376,7 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len, p0 = (char *) memmem (p1, nlen - (p1-buf), "\033[?1049h", 8); if (p0) { - p0 += 8; + //p0 += 8; get_ttyp ()->screen_alternated = true; if (get_ttyp ()->switch_to_pcon_out) do_not_reset_switch_to_pcon = true; @@ -1384,7 +1388,7 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len, p1 = (char *) memmem (p0, nlen - (p0-buf), "\033[?1049l", 8); if (p1) { - //p1 += 8; + p1 += 8; get_ttyp ()->screen_alternated = false; do_not_reset_switch_to_pcon = false; memmove (p0, p1, buf+nlen - p1); @@ -1504,8 +1508,9 @@ fhandler_pty_slave::write (const void *ptr, size_t len) reset_switch_to_pcon (); - bool output_to_pcon = - get_ttyp ()->switch_to_pcon_out && !get_ttyp ()->screen_alternated; + acquire_output_mutex (INFINITE); + bool output_to_pcon = get_ttyp ()->switch_to_pcon_out; + release_output_mutex (); UINT target_code_page = output_to_pcon ? GetConsoleOutputCP () : get_ttyp ()->term_code_page; @@ -2420,8 +2425,6 @@ fhandler_pty_master::close () } release_output_mutex (); master_fwd_thread->terminate_thread (); - CloseHandle (get_ttyp ()->fwd_done); - get_ttyp ()->fwd_done = NULL; } } @@ -2903,17 +2906,6 @@ fhandler_pty_slave::set_freeconsole_on_close (bool val) freeconsole_on_close = val; } -void -fhandler_pty_slave::wait_pcon_fwd (void) -{ - acquire_output_mutex (INFINITE); - get_ttyp ()->pcon_last_time = GetTickCount (); - ResetEvent (get_ttyp ()->fwd_done); - release_output_mutex (); - while (get_ttyp ()->fwd_done - && cygwait (get_ttyp ()->fwd_done, 1) == WAIT_TIMEOUT); -} - void fhandler_pty_slave::trigger_redraw_screen (void) { @@ -2967,12 +2959,14 @@ fhandler_pty_slave::fixup_after_attach (bool native_maybe, int fd_set) { DWORD mode = ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT; SetConsoleMode (get_output_handle (), mode); + acquire_output_mutex (INFINITE); if (!get_ttyp ()->switch_to_pcon_out) - wait_pcon_fwd (); + get_ttyp ()->wait_pcon_fwd (); if (get_ttyp ()->pcon_pid == 0 || !pinfo (get_ttyp ()->pcon_pid)) get_ttyp ()->pcon_pid = myself->pid; get_ttyp ()->switch_to_pcon_out = true; + release_output_mutex (); if (get_ttyp ()->need_redraw_screen) trigger_redraw_screen (); @@ -3258,19 +3252,9 @@ fhandler_pty_master::pty_master_fwd_thread () { if (get_pseudo_console ()) { - /* The forwarding in pseudo console sometimes stops for - 16-32 msec even if it already has data to transfer. - If the time without transfer exceeds 32 msec, the - forwarding is supposed to be finished. */ - const int sleep_in_pcon = 16; - const int time_to_wait = sleep_in_pcon * 2 + 1/* margine */; get_ttyp ()->pcon_last_time = GetTickCount (); while (::bytes_available (rlen, from_slave) && rlen == 0) { - acquire_output_mutex (INFINITE); - if (GetTickCount () - get_ttyp ()->pcon_last_time > time_to_wait) - SetEvent (get_ttyp ()->fwd_done); - release_output_mutex (); /* Forcibly transfer input if it is requested by slave. This happens when input data should be transfered from the input pipe for cygwin apps to the input pipe @@ -3342,7 +3326,6 @@ fhandler_pty_master::pty_master_fwd_thread () /* OPOST processing was already done in pseudo console, so just write it to to_master_cyg. */ DWORD written; - acquire_output_mutex (INFINITE); while (rlen>0) { if (!WriteFile (to_master_cyg, ptr, wlen, &written, NULL)) @@ -3353,7 +3336,6 @@ fhandler_pty_master::pty_master_fwd_thread () ptr += written; wlen = (rlen -= written); } - release_output_mutex (); mb_str_free (buf); continue; } @@ -3695,7 +3677,6 @@ fhandler_pty_master::setup () errstr = "pty master forwarding thread"; goto err; } - get_ttyp ()->fwd_done = CreateEvent (&sec_none, true, false, NULL); t.winsize.ws_col = 80; t.winsize.ws_row = 25; diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index efdae4697..4cb68f776 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -244,7 +244,6 @@ tty::init () pcon_pid = 0; term_code_page = 0; need_redraw_screen = true; - fwd_done = NULL; pcon_last_time = 0; pcon_in_empty = true; req_transfer_input_to_pcon = false; @@ -307,6 +306,12 @@ tty::set_switch_to_pcon_out (bool v) void tty::wait_pcon_fwd (void) { + /* The forwarding in pseudo console sometimes stops for + 16-32 msec even if it already has data to transfer. + If the time without transfer exceeds 32 msec, the + forwarding is supposed to be finished. pcon_last_time + is reset to GetTickCount() in pty master forwarding + thread when the last data is transfered. */ const int sleep_in_pcon = 16; const int time_to_wait = sleep_in_pcon * 2 + 1/* margine */; pcon_last_time = GetTickCount (); diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h index 7d6fc8fef..920e32b16 100644 --- a/winsup/cygwin/tty.h +++ b/winsup/cygwin/tty.h @@ -105,7 +105,6 @@ private: pid_t pcon_pid; UINT term_code_page; bool need_redraw_screen; - HANDLE fwd_done; DWORD pcon_last_time; bool pcon_in_empty; bool req_transfer_input_to_pcon; From bc5087298d61cfcd113a04dc223517b0a1073582 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 9 Jun 2020 20:59:04 -0400 Subject: [PATCH 386/520] Regenerate libm/machine configuration files for powerpc --- newlib/libm/machine/configure | 9 +- newlib/libm/machine/powerpc/Makefile.in | 558 +++ newlib/libm/machine/powerpc/aclocal.m4 | 1012 +++++ newlib/libm/machine/powerpc/configure | 4766 +++++++++++++++++++++++ 4 files changed, 6342 insertions(+), 3 deletions(-) create mode 100644 newlib/libm/machine/powerpc/Makefile.in create mode 100644 newlib/libm/machine/powerpc/aclocal.m4 create mode 100755 newlib/libm/machine/powerpc/configure diff --git a/newlib/libm/machine/configure b/newlib/libm/machine/configure index 1578d31f2..f49fc7877 100755 --- a/newlib/libm/machine/configure +++ b/newlib/libm/machine/configure @@ -793,7 +793,8 @@ nds32 pru spu riscv -x86_64' +x86_64 +powerpc' # Initialize some variables set by options. ac_init_help= @@ -11455,7 +11456,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11458 "configure" +#line 11459 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11561,7 +11562,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11564 "configure" +#line 11565 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11821,6 +11822,8 @@ subdirs="$subdirs aarch64" riscv) subdirs="$subdirs riscv" ;; x86_64) subdirs="$subdirs x86_64" + ;; + powerpc) subdirs="$subdirs powerpc" ;; esac; if test "${use_libtool}" = "yes"; then diff --git a/newlib/libm/machine/powerpc/Makefile.in b/newlib/libm/machine/powerpc/Makefile.in new file mode 100644 index 000000000..5e967db64 --- /dev/null +++ b/newlib/libm/machine/powerpc/Makefile.in @@ -0,0 +1,558 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/../../../Makefile.shared $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +lib_a_AR = $(AR) $(ARFLAGS) +lib_a_LIBADD = +am__objects_1 = lib_a-feclearexcept.$(OBJEXT) lib_a-fegetenv.$(OBJEXT) \ + lib_a-fegetexceptflag.$(OBJEXT) lib_a-fegetround.$(OBJEXT) \ + lib_a-feholdexcept.$(OBJEXT) lib_a-fenv.$(OBJEXT) \ + lib_a-feraiseexcept.$(OBJEXT) lib_a-fesetenv.$(OBJEXT) \ + lib_a-fesetexceptflag.$(OBJEXT) lib_a-fesetround.$(OBJEXT) \ + lib_a-fetestexcept.$(OBJEXT) lib_a-feupdateenv.$(OBJEXT) +am_lib_a_OBJECTS = $(am__objects_1) +lib_a_OBJECTS = $(am_lib_a_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = +am__depfiles_maybe = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(lib_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +DATA = $(noinst_DATA) +ETAGS = etags +CTAGS = ctags +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NEWLIB_CFLAGS = @NEWLIB_CFLAGS@ +NO_INCLUDE_LIST = @NO_INCLUDE_LIST@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +READELF = @READELF@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +aext = @aext@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +libm_machine_dir = @libm_machine_dir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lpfx = @lpfx@ +machine_dir = @machine_dir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +newlib_basedir = @newlib_basedir@ +oext = @oext@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sys_dir = @sys_dir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \ + $(CROSS_CFLAGS) $(TARGET_CFLAGS) + +LIB_SOURCES = \ + feclearexcept.c fegetenv.c fegetexceptflag.c \ + fegetround.c feholdexcept.c fenv.c feraiseexcept.c fesetenv.c \ + fesetexceptflag.c fesetround.c fetestexcept.c feupdateenv.c + +noinst_LIBRARIES = lib.a +lib_a_SOURCES = $(LIB_SOURCES) +lib_a_CFLAGS = $(AM_CFLAGS) +lib_a_CCASFLAGS = $(AM_CCASFLAGS) +noinst_DATA = + +# +# documentation rules +# +SUFFIXES = .def .xml +CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str +DOCBOOK_CHEW = ${top_srcdir}/../doc/makedocbook.py +DOCBOOK_OUT_FILES = $(CHEWOUT_FILES:.def=.xml) +DOCBOOK_CHAPTERS = $(CHAPTERS:.tex=.xml) +CLEANFILES = $(CHEWOUT_FILES) $(DOCBOOK_OUT_FILES) +ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. +CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host +all: all-am + +.SUFFIXES: +.SUFFIXES: .def .xml .c .o .obj +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../../Makefile.shared $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --cygnus \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --cygnus Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; +$(srcdir)/../../../Makefile.shared: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES) + -rm -f lib.a + $(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD) + $(RANLIB) lib.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.c.o: + $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -c `$(CYGPATH_W) '$<'` + +lib_a-feclearexcept.o: feclearexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feclearexcept.o `test -f 'feclearexcept.c' || echo '$(srcdir)/'`feclearexcept.c + +lib_a-feclearexcept.obj: feclearexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feclearexcept.obj `if test -f 'feclearexcept.c'; then $(CYGPATH_W) 'feclearexcept.c'; else $(CYGPATH_W) '$(srcdir)/feclearexcept.c'; fi` + +lib_a-fegetenv.o: fegetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetenv.o `test -f 'fegetenv.c' || echo '$(srcdir)/'`fegetenv.c + +lib_a-fegetenv.obj: fegetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetenv.obj `if test -f 'fegetenv.c'; then $(CYGPATH_W) 'fegetenv.c'; else $(CYGPATH_W) '$(srcdir)/fegetenv.c'; fi` + +lib_a-fegetexceptflag.o: fegetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexceptflag.o `test -f 'fegetexceptflag.c' || echo '$(srcdir)/'`fegetexceptflag.c + +lib_a-fegetexceptflag.obj: fegetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexceptflag.obj `if test -f 'fegetexceptflag.c'; then $(CYGPATH_W) 'fegetexceptflag.c'; else $(CYGPATH_W) '$(srcdir)/fegetexceptflag.c'; fi` + +lib_a-fegetround.o: fegetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetround.o `test -f 'fegetround.c' || echo '$(srcdir)/'`fegetround.c + +lib_a-fegetround.obj: fegetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetround.obj `if test -f 'fegetround.c'; then $(CYGPATH_W) 'fegetround.c'; else $(CYGPATH_W) '$(srcdir)/fegetround.c'; fi` + +lib_a-feholdexcept.o: feholdexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.o `test -f 'feholdexcept.c' || echo '$(srcdir)/'`feholdexcept.c + +lib_a-feholdexcept.obj: feholdexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.obj `if test -f 'feholdexcept.c'; then $(CYGPATH_W) 'feholdexcept.c'; else $(CYGPATH_W) '$(srcdir)/feholdexcept.c'; fi` + +lib_a-fenv.o: fenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.o `test -f 'fenv.c' || echo '$(srcdir)/'`fenv.c + +lib_a-fenv.obj: fenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.obj `if test -f 'fenv.c'; then $(CYGPATH_W) 'fenv.c'; else $(CYGPATH_W) '$(srcdir)/fenv.c'; fi` + +lib_a-feraiseexcept.o: feraiseexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feraiseexcept.o `test -f 'feraiseexcept.c' || echo '$(srcdir)/'`feraiseexcept.c + +lib_a-feraiseexcept.obj: feraiseexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feraiseexcept.obj `if test -f 'feraiseexcept.c'; then $(CYGPATH_W) 'feraiseexcept.c'; else $(CYGPATH_W) '$(srcdir)/feraiseexcept.c'; fi` + +lib_a-fesetenv.o: fesetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetenv.o `test -f 'fesetenv.c' || echo '$(srcdir)/'`fesetenv.c + +lib_a-fesetenv.obj: fesetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetenv.obj `if test -f 'fesetenv.c'; then $(CYGPATH_W) 'fesetenv.c'; else $(CYGPATH_W) '$(srcdir)/fesetenv.c'; fi` + +lib_a-fesetexceptflag.o: fesetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetexceptflag.o `test -f 'fesetexceptflag.c' || echo '$(srcdir)/'`fesetexceptflag.c + +lib_a-fesetexceptflag.obj: fesetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetexceptflag.obj `if test -f 'fesetexceptflag.c'; then $(CYGPATH_W) 'fesetexceptflag.c'; else $(CYGPATH_W) '$(srcdir)/fesetexceptflag.c'; fi` + +lib_a-fesetround.o: fesetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetround.o `test -f 'fesetround.c' || echo '$(srcdir)/'`fesetround.c + +lib_a-fesetround.obj: fesetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetround.obj `if test -f 'fesetround.c'; then $(CYGPATH_W) 'fesetround.c'; else $(CYGPATH_W) '$(srcdir)/fesetround.c'; fi` + +lib_a-fetestexcept.o: fetestexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fetestexcept.o `test -f 'fetestexcept.c' || echo '$(srcdir)/'`fetestexcept.c + +lib_a-fetestexcept.obj: fetestexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fetestexcept.obj `if test -f 'fetestexcept.c'; then $(CYGPATH_W) 'fetestexcept.c'; else $(CYGPATH_W) '$(srcdir)/fetestexcept.c'; fi` + +lib_a-feupdateenv.o: feupdateenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.o `test -f 'feupdateenv.c' || echo '$(srcdir)/'`feupdateenv.c + +lib_a-feupdateenv.obj: feupdateenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.obj `if test -f 'feupdateenv.c'; then $(CYGPATH_W) 'feupdateenv.c'; else $(CYGPATH_W) '$(srcdir)/feupdateenv.c'; fi` + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +check-am: +check: check-am +all-am: Makefile $(LIBRARIES) $(DATA) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-generic clean-noinstLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-tags dvi dvi-am \ + html html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am + +objectlist.awk.in: $(noinst_LTLIBRARIES) + -rm -f objectlist.awk.in + for i in `ls *.lo` ; \ + do \ + echo $$i `pwd`/$$i >> objectlist.awk.in ; \ + done + +.c.def: + $(CHEW) < $< > $*.def || ( rm $*.def && false ) + @touch stmp-def + +TARGETDOC ?= ../tmp.texi + +doc: $(CHEWOUT_FILES) + for chapter in $(CHAPTERS) ; \ + do \ + cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \ + done + +.c.xml: + $(DOCBOOK_CHEW) < $< > $*.xml || ( rm $*.xml && false ) + @touch stmp-xml + +docbook: $(DOCBOOK_OUT_FILES) + for chapter in $(DOCBOOK_CHAPTERS) ; \ + do \ + ${top_srcdir}/../doc/chapter-texi2docbook.py <$(srcdir)/$${chapter%.xml}.tex >../$$chapter ; \ + done + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/newlib/libm/machine/powerpc/aclocal.m4 b/newlib/libm/machine/powerpc/aclocal.m4 new file mode 100644 index 000000000..18dab02aa --- /dev/null +++ b/newlib/libm/machine/powerpc/aclocal.m4 @@ -0,0 +1,1012 @@ +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.6], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.11.6])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 16 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, +# 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless `enable' is passed literally. +# For symmetry, `disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], +[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([../../../acinclude.m4]) diff --git a/newlib/libm/machine/powerpc/configure b/newlib/libm/machine/powerpc/configure new file mode 100755 index 000000000..a8f343ac9 --- /dev/null +++ b/newlib/libm/machine/powerpc/configure @@ -0,0 +1,4766 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='newlib' +PACKAGE_TARNAME='newlib' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +ac_unique_file="Makefile.am" +ac_subst_vars='LTLIBOBJS +LIBOBJS +sys_dir +machine_dir +libm_machine_dir +lpfx +aext +oext +OBJEXT +USE_LIBTOOL_FALSE +USE_LIBTOOL_TRUE +ELIX_LEVEL_4_FALSE +ELIX_LEVEL_4_TRUE +ELIX_LEVEL_3_FALSE +ELIX_LEVEL_3_TRUE +ELIX_LEVEL_2_FALSE +ELIX_LEVEL_2_TRUE +ELIX_LEVEL_1_FALSE +ELIX_LEVEL_1_TRUE +ELIX_LEVEL_0_FALSE +ELIX_LEVEL_0_TRUE +LDFLAGS +NO_INCLUDE_LIST +NEWLIB_CFLAGS +CCASFLAGS +CCAS +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +READELF +RANLIB +AR +AS +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +CC +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +newlib_basedir +MAY_SUPPLY_SYSCALLS_FALSE +MAY_SUPPLY_SYSCALLS_TRUE +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_multilib +enable_target_optspace +enable_malloc_debugging +enable_newlib_multithread +enable_newlib_iconv +enable_newlib_elix_level +enable_newlib_io_float +enable_newlib_supplied_syscalls +enable_newlib_fno_builtin +enable_dependency_tracking +enable_maintainer_mode +' + ac_precious_vars='build_alias +host_alias +target_alias +CCAS +CCASFLAGS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/newlib] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of newlib 3.3.0:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-multilib build many library versions (default) + --enable-target-optspace optimize for space + --enable-malloc-debugging indicate malloc debugging requested + --enable-newlib-multithread enable support for multiple threads + --enable-newlib-iconv enable iconv library support + --enable-newlib-elix-level supply desired elix library level (1-4) + --disable-newlib-io-float disable printf/scanf family float support + --disable-newlib-supplied-syscalls disable newlib from supplying syscalls + --disable-newlib-fno-builtin disable -fno-builtin flag to allow compiler to use builtin library functions + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + +Some influential environment variables: + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to the package provider. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +newlib configure 3.3.0 +generated by GNU Autoconf 2.68 + +Copyright (C) 2010 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by newlib $as_me 3.3.0, which was +generated by GNU Autoconf 2.68. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +ac_aux_dir= +for ac_dir in ../../../.. "$srcdir"/../../../..; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../../.. \"$srcdir\"/../../../.." "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +am__api_version='1.11' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" = set; then : + enableval=$enable_multilib; case "${enableval}" in + yes) multilib=yes ;; + no) multilib=no ;; + *) as_fn_error $? "bad value ${enableval} for multilib option" "$LINENO" 5 ;; + esac +else + multilib=yes +fi + +# Check whether --enable-target-optspace was given. +if test "${enable_target_optspace+set}" = set; then : + enableval=$enable_target_optspace; case "${enableval}" in + yes) target_optspace=yes ;; + no) target_optspace=no ;; + *) as_fn_error $? "bad value ${enableval} for target-optspace option" "$LINENO" 5 ;; + esac +else + target_optspace= +fi + +# Check whether --enable-malloc-debugging was given. +if test "${enable_malloc_debugging+set}" = set; then : + enableval=$enable_malloc_debugging; case "${enableval}" in + yes) malloc_debugging=yes ;; + no) malloc_debugging=no ;; + *) as_fn_error $? "bad value ${enableval} for malloc-debugging option" "$LINENO" 5 ;; + esac +else + malloc_debugging= +fi + +# Check whether --enable-newlib-multithread was given. +if test "${enable_newlib_multithread+set}" = set; then : + enableval=$enable_newlib_multithread; case "${enableval}" in + yes) newlib_multithread=yes ;; + no) newlib_multithread=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-multithread option" "$LINENO" 5 ;; + esac +else + newlib_multithread=yes +fi + +# Check whether --enable-newlib-iconv was given. +if test "${enable_newlib_iconv+set}" = set; then : + enableval=$enable_newlib_iconv; if test "${newlib_iconv+set}" != set; then + case "${enableval}" in + yes) newlib_iconv=yes ;; + no) newlib_iconv=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-iconv option" "$LINENO" 5 ;; + esac + fi +else + newlib_iconv=${newlib_iconv} +fi + +# Check whether --enable-newlib-elix-level was given. +if test "${enable_newlib_elix_level+set}" = set; then : + enableval=$enable_newlib_elix_level; case "${enableval}" in + 0) newlib_elix_level=0 ;; + 1) newlib_elix_level=1 ;; + 2) newlib_elix_level=2 ;; + 3) newlib_elix_level=3 ;; + 4) newlib_elix_level=4 ;; + *) as_fn_error $? "bad value ${enableval} for newlib-elix-level option" "$LINENO" 5 ;; + esac +else + newlib_elix_level=0 +fi + +# Check whether --enable-newlib-io-float was given. +if test "${enable_newlib_io_float+set}" = set; then : + enableval=$enable_newlib_io_float; case "${enableval}" in + yes) newlib_io_float=yes ;; + no) newlib_io_float=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-io-float option" "$LINENO" 5 ;; + esac +else + newlib_io_float=yes +fi + +# Check whether --enable-newlib-supplied-syscalls was given. +if test "${enable_newlib_supplied_syscalls+set}" = set; then : + enableval=$enable_newlib_supplied_syscalls; case "${enableval}" in + yes) newlib_may_supply_syscalls=yes ;; + no) newlib_may_supply_syscalls=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;; + esac +else + newlib_may_supply_syscalls=yes +fi + + if test x${newlib_may_supply_syscalls} = xyes; then + MAY_SUPPLY_SYSCALLS_TRUE= + MAY_SUPPLY_SYSCALLS_FALSE='#' +else + MAY_SUPPLY_SYSCALLS_TRUE='#' + MAY_SUPPLY_SYSCALLS_FALSE= +fi + + +# Check whether --enable-newlib-fno-builtin was given. +if test "${enable_newlib_fno_builtin+set}" = set; then : + enableval=$enable_newlib_fno_builtin; case "${enableval}" in + yes) newlib_fno_builtin=yes ;; + no) newlib_fno_builtin=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-fno-builtin option" "$LINENO" 5 ;; + esac +else + newlib_fno_builtin= +fi + + + +test -z "${with_target_subdir}" && with_target_subdir=. + +if test "${srcdir}" = "."; then + if test "${with_target_subdir}" != "."; then + newlib_basedir="${srcdir}/${with_multisrctop}../../../.." + else + newlib_basedir="${srcdir}/${with_multisrctop}../../.." + fi +else + newlib_basedir="${srcdir}/../../.." +fi + + + + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='newlib' + VERSION='3.3.0' + + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + +# FIXME: We temporarily define our own version of AC_PROG_CC. This is +# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We +# are probably using a cross compiler, which will not be able to fully +# link an executable. This should really be fixed in autoconf +# itself. + + + + + + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5 +$as_echo_n "checking whether we are using GNU C... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.c <&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_c_compiler_gnu=yes +else + ac_cv_c_compiler_gnu=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } + +if test $ac_cv_c_compiler_gnu = yes; then + GCC=yes + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + elif test $ac_cv_prog_cc_g = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-O2" + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AS="${ac_tool_prefix}as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AS="as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args. +set dummy ${ac_tool_prefix}readelf; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_READELF+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$READELF"; then + ac_cv_prog_READELF="$READELF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_READELF="${ac_tool_prefix}readelf" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +READELF=$ac_cv_prog_READELF +if test -n "$READELF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5 +$as_echo "$READELF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_READELF"; then + ac_ct_READELF=$READELF + # Extract the first word of "readelf", so it can be a program name with args. +set dummy readelf; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_READELF+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_READELF"; then + ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_READELF="readelf" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_READELF=$ac_cv_prog_ac_ct_READELF +if test -n "$ac_ct_READELF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5 +$as_echo "$ac_ct_READELF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_READELF" = x; then + READELF=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + READELF=$ac_ct_READELF + fi +else + READELF="$ac_cv_prog_READELF" +fi + + + + +# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */ +ac_given_INSTALL=$INSTALL + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + +# By default we simply use the C compiler to build assembly code. + +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS + + + + +# We need AC_EXEEXT to keep automake happy in cygnus mode. However, +# at least currently, we never actually build a program, so we never +# need to use $(EXEEXT). Moreover, the test for EXEEXT normally +# fails, because we are probably configuring with a cross compiler +# which can't create executables. So we include AC_EXEEXT to keep +# automake happy, but we don't execute it, since we don't care about +# the result. +if false; then + + dummy_var=1 +fi + +. ${newlib_basedir}/configure.host + +NEWLIB_CFLAGS=${newlib_cflags} + + +NO_INCLUDE_LIST=${noinclude} + + +LDFLAGS=${ldflags} + + + if test x${newlib_elix_level} = x0; then + ELIX_LEVEL_0_TRUE= + ELIX_LEVEL_0_FALSE='#' +else + ELIX_LEVEL_0_TRUE='#' + ELIX_LEVEL_0_FALSE= +fi + + if test x${newlib_elix_level} = x1; then + ELIX_LEVEL_1_TRUE= + ELIX_LEVEL_1_FALSE='#' +else + ELIX_LEVEL_1_TRUE='#' + ELIX_LEVEL_1_FALSE= +fi + + if test x${newlib_elix_level} = x2; then + ELIX_LEVEL_2_TRUE= + ELIX_LEVEL_2_FALSE='#' +else + ELIX_LEVEL_2_TRUE='#' + ELIX_LEVEL_2_FALSE= +fi + + if test x${newlib_elix_level} = x3; then + ELIX_LEVEL_3_TRUE= + ELIX_LEVEL_3_FALSE='#' +else + ELIX_LEVEL_3_TRUE='#' + ELIX_LEVEL_3_FALSE= +fi + + if test x${newlib_elix_level} = x4; then + ELIX_LEVEL_4_TRUE= + ELIX_LEVEL_4_FALSE='#' +else + ELIX_LEVEL_4_TRUE='#' + ELIX_LEVEL_4_FALSE= +fi + + + if test x${use_libtool} = xyes; then + USE_LIBTOOL_TRUE= + USE_LIBTOOL_FALSE='#' +else + USE_LIBTOOL_TRUE='#' + USE_LIBTOOL_FALSE= +fi + + +# Emit any target-specific warnings. +if test "x${newlib_msg_warn}" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${newlib_msg_warn}" >&5 +$as_echo "$as_me: WARNING: ${newlib_msg_warn}" >&2;} +fi + +# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we +# use oext, which is set in configure.host based on the target platform. +OBJEXT=${oext} + + + + + + + + + + + +ac_config_files="$ac_config_files Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then + as_fn_error $? "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_0\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_1\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_3\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_4\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then + as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by newlib $as_me 3.3.0, which was +generated by GNU Autoconf 2.68. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Configuration commands: +$config_commands + +Report bugs to the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +newlib config.status 3.3.0 +configured by $0, generated by GNU Autoconf 2.68, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2010 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + From a97bdf100f54c736c1ab46d39984c4deaacd7386 Mon Sep 17 00:00:00 2001 From: Eshan dhawan via Newlib Date: Wed, 3 Jun 2020 23:15:09 +0530 Subject: [PATCH 387/520] fenv support arm Signed-off-by: Eshan dhawan --- COPYING.NEWLIB | 54 +++ newlib/libc/machine/arm/machine/acle-compat.h | 182 ++++++++++ newlib/libc/machine/arm/machine/fenv-mangle.h | 53 +++ .../libc/machine/arm/machine/fenv-softfloat.h | 187 ++++++++++ newlib/libc/machine/arm/machine/fenv-vfp.h | 187 ++++++++++ newlib/libc/machine/arm/sys/fenv.h | 122 +++++++ newlib/libm/machine/arm/Makefile.am | 18 +- newlib/libm/machine/arm/Makefile.in | 117 ++++++- newlib/libm/machine/arm/fe_dfl_env.c | 7 + newlib/libm/machine/arm/feclearexcept.c | 7 + newlib/libm/machine/arm/fegetenv.c | 7 + newlib/libm/machine/arm/fegetexceptflag.c | 7 + newlib/libm/machine/arm/fegetround.c | 7 + newlib/libm/machine/arm/feholdexcept.c | 7 + newlib/libm/machine/arm/fenv-softfp.c | 32 ++ newlib/libm/machine/arm/fenv-vfp.c | 32 ++ newlib/libm/machine/arm/fenv.c | 328 ++++++++++++++++++ newlib/libm/machine/arm/feraiseexcept.c | 7 + newlib/libm/machine/arm/fesetenv.c | 7 + newlib/libm/machine/arm/fesetexceptflag.c | 7 + newlib/libm/machine/arm/fesetround.c | 7 + newlib/libm/machine/arm/fetestexcept.c | 7 + newlib/libm/machine/arm/feupdateenv.c | 7 + 23 files changed, 1393 insertions(+), 3 deletions(-) create mode 100644 newlib/libc/machine/arm/machine/acle-compat.h create mode 100644 newlib/libc/machine/arm/machine/fenv-mangle.h create mode 100644 newlib/libc/machine/arm/machine/fenv-softfloat.h create mode 100644 newlib/libc/machine/arm/machine/fenv-vfp.h create mode 100644 newlib/libc/machine/arm/sys/fenv.h create mode 100644 newlib/libm/machine/arm/fe_dfl_env.c create mode 100644 newlib/libm/machine/arm/feclearexcept.c create mode 100644 newlib/libm/machine/arm/fegetenv.c create mode 100644 newlib/libm/machine/arm/fegetexceptflag.c create mode 100644 newlib/libm/machine/arm/fegetround.c create mode 100644 newlib/libm/machine/arm/feholdexcept.c create mode 100644 newlib/libm/machine/arm/fenv-softfp.c create mode 100644 newlib/libm/machine/arm/fenv-vfp.c create mode 100644 newlib/libm/machine/arm/fenv.c create mode 100644 newlib/libm/machine/arm/feraiseexcept.c create mode 100644 newlib/libm/machine/arm/fesetenv.c create mode 100644 newlib/libm/machine/arm/fesetexceptflag.c create mode 100644 newlib/libm/machine/arm/fesetround.c create mode 100644 newlib/libm/machine/arm/fetestexcept.c create mode 100644 newlib/libm/machine/arm/feupdateenv.c diff --git a/COPYING.NEWLIB b/COPYING.NEWLIB index 2ed849342..4e2751432 100644 --- a/COPYING.NEWLIB +++ b/COPYING.NEWLIB @@ -1220,3 +1220,57 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(53) Andrew Turner (arm-* targets) + +Copyright (c) 2013 Andrew Turner +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +(54) BSD-2-Clause-FreeBSD David Schultz (arm-* targets) + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004-2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + diff --git a/newlib/libc/machine/arm/machine/acle-compat.h b/newlib/libc/machine/arm/machine/acle-compat.h new file mode 100644 index 000000000..888ae2ea8 --- /dev/null +++ b/newlib/libc/machine/arm/machine/acle-compat.h @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2014 ARM Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the company may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __ARM_ARCH + +/* ACLE standardises a set of pre-defines that describe the ARM architecture. + These were mostly implemented in GCC around GCC-4.8; older versions + have no, or only partial support. To provide a level of backwards + compatibility we try to work out what the definitions should be, given + the older pre-defines that GCC did produce. This isn't complete, but + it should be enough for use by routines that depend on this header. */ + +/* No need to handle ARMv8, GCC had ACLE support before that. */ + +# ifdef __ARM_ARCH_7__ +/* The common subset of ARMv7 in all profiles. */ +# define __ARM_ARCH 7 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_LDREX 7 +# define __ARM_FEATURE_UNALIGNED +# endif + +# if defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7R__) +# define __ARM_ARCH 7 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_ARCH_ISA_ARM +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_SIMD32 +# define __ARM_FEATURE_DSP +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_LDREX 15 +# define __ARM_FEATURE_UNALIGNED +# ifdef __ARM_ARCH_7A__ +# define __ARM_ARCH_PROFILE 'A' +# else +# define __ARM_ARCH_PROFILE 'R' +# endif +# endif + +# ifdef __ARM_ARCH_7EM__ +# define __ARM_ARCH 7 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_SIMD32 +# define __ARM_FEATURE_DSP +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_LDREX 7 +# define __ARM_FEATURE_UNALIGNED +# define __ARM_ARCH_PROFILE 'M' +# endif + +# ifdef __ARM_ARCH_7M__ +# define __ARM_ARCH 7 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_LDREX 7 +# define __ARM_FEATURE_UNALIGNED +# define __ARM_ARCH_PROFILE 'M' +# endif + +# ifdef __ARM_ARCH_6T2__ +# define __ARM_ARCH 6 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_ARCH_ISA_ARM +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_SIMD32 +# define __ARM_FEATURE_DSP +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_LDREX 4 +# define __ARM_FEATURE_UNALIGNED +# endif + +# ifdef __ARM_ARCH_6M__ +# define __ARM_ARCH 6 +# define __ARM_ARCH_ISA_THUMB 1 +# define __ARM_ARCH_PROFILE 'M' +# endif + +# if defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6J__) \ + || defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6Z__) \ + || defined (__ARM_ARCH_6ZK__) +# define __ARM_ARCH 6 +# define __ARM_ARCH_ISA_THUMB 1 +# define __ARM_ARCH_ISA_ARM +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_SIMD32 +# define __ARM_FEATURE_DSP +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_UNALIGNED +# ifndef __thumb__ +# if defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6ZK__) +# define __ARM_FEATURE_LDREX 15 +# else +# define __ARM_FEATURE_LDREX 4 +# endif +# endif +# endif + +# if defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5E__) +# define __ARM_ARCH 5 +# define __ARM_ARCH_ISA_ARM +# ifdef __ARM_ARCH_5TE__ +# define __ARM_ARCH_ISA_THUMB 1 +# endif +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_DSP +# endif + +# if defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5__) +# define __ARM_ARCH 5 +# define __ARM_ARCH_ISA_ARM +# ifdef __ARM_ARCH_5TE__ +# define __ARM_ARCH_ISA_THUMB 1 +# endif +# define __ARM_FEATURE_CLZ +# endif + +# ifdef __ARM_ARCH_4T__ +# define __ARM_ARCH 4 +# define __ARM_ARCH_ISA_ARM +# define __ARM_ARCH_ISA_THUMB 1 +# endif + +# ifdef __ARM_ARCH_4__ +# define __ARM_ARCH 4 +# define __ARM_ARCH_ISA_ARM +# endif + +# if defined (__ARM_ARCH_3__) || defined (__ARM_ARCH_3M__) +# define __ARM_ARCH 3 +# define __ARM_ARCH_ISA_ARM +# endif + +# ifdef __ARM_ARCH_2__ +# define __ARM_ARCH 2 +# define __ARM_ARCH_ISA_ARM +# endif + +# ifdef __ARMEB__ +# define __ARM_BIG_ENDIAN +# endif + +/* If we still don't know what the target architecture is, then we're + probably not using GCC. */ +# ifndef __ARM_ARCH +# error Unable to determine architecture version. +# endif + +#endif /* __ARM_ARCH */ + diff --git a/newlib/libc/machine/arm/machine/fenv-mangle.h b/newlib/libc/machine/arm/machine/fenv-mangle.h new file mode 100644 index 000000000..476f7b20c --- /dev/null +++ b/newlib/libc/machine/arm/machine/fenv-mangle.h @@ -0,0 +1,53 @@ +/*- + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifdef _FENV_MANGLE_H_ +#error Only include fenv-mangle.h once +#endif + +#define _FENV_MANGLE_H_ + +#ifndef FENV_MANGLE +#error FENV_MANGLE is undefined +#endif + +#define feclearexcept FENV_MANGLE(feclearexcept) +#define fegetexceptflag FENV_MANGLE(fegetexceptflag) +#define fesetexceptflag FENV_MANGLE(fesetexceptflag) +#define feraiseexcept FENV_MANGLE(feraiseexcept) +#define fetestexcept FENV_MANGLE(fetestexcept) +#define fegetround FENV_MANGLE(fegetround) +#define fesetround FENV_MANGLE(fesetround) +#define fegetenv FENV_MANGLE(fegetenv) +#define feholdexcept FENV_MANGLE(feholdexcept) +#define fesetenv FENV_MANGLE(fesetenv) +#define feupdateenv FENV_MANGLE(feupdateenv) +#define feenableexcept FENV_MANGLE(feenableexcept) +#define fedisableexcept FENV_MANGLE(fedisableexcept) +#define fegetexcept FENV_MANGLE(fegetexcept) + diff --git a/newlib/libc/machine/arm/machine/fenv-softfloat.h b/newlib/libc/machine/arm/machine/fenv-softfloat.h new file mode 100644 index 000000000..5d33e18d0 --- /dev/null +++ b/newlib/libc/machine/arm/machine/fenv-softfloat.h @@ -0,0 +1,187 @@ + /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2004-2011 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_FENV_H_ +#error "This file is meant to be included only by ." +#endif +/* the file can be added from architecture specific fenv.h file found in + *libc/sys/arch/sys * + * + * This file implements the functionality of on platforms that + * lack an FPU and use softfloat in libc for floating point. To use it, + * you must write an that provides the following: + * + * - a typedef for fenv_t, which may be an integer or struct type + * - a typedef for fexcept_t (XXX This file assumes fexcept_t is a + * simple integer type containing the exception mask.) + * - definitions of FE_* constants for the five exceptions and four + * rounding modes in IEEE 754, as described in fenv(3) + * - a definition, and the corresponding external symbol, for FE_DFL_ENV + * - a macro __set_env(env, flags, mask, rnd), which sets the given fenv_t + * from the exception flags, mask, and rounding mode + * - macros __env_flags(env), __env_mask(env), and __env_round(env), which + * extract fields from an fenv_t + * - a definition of __fenv_static + * + * If the architecture supports an optional FPU, it's recommended that you + * define fenv_t and fexcept_t to match the hardware ABI. Otherwise, it + * doesn't matter how you define them. + */ +#include + +int __softfloat_float_exception_flags; +int __softfloat_float_exception_mask; +int __softfloat_float_rounding_mode; + + +__fenv_static inline int +feclearexcept(int excepts) +{ + + __softfloat_float_exception_flags &= ~excepts; + return (0); +} + +__fenv_static inline int +fegetexceptflag(fexcept_t *flagp, int excepts) +{ + + *flagp = __softfloat_float_exception_flags & excepts; + return (0); +} + +__fenv_static inline int +fesetexceptflag(const fexcept_t *flagp, int excepts) +{ + + __softfloat_float_exception_flags &= ~excepts; + __softfloat_float_exception_flags |= *flagp & excepts; + return (0); +} + +__fenv_static inline int +feraiseexcept(int excepts) +{ + + return (excepts ? -ENOTSUP : 0); +} + +__fenv_static inline int +fetestexcept(int excepts) +{ + + return (__softfloat_float_exception_flags & excepts); +} + +__fenv_static inline int +fegetround(void) +{ + + return (__softfloat_float_rounding_mode); +} + +__fenv_static inline int +fesetround(int round) +{ + + __softfloat_float_rounding_mode = round; + return (0); +} + +__fenv_static inline int +fegetenv(fenv_t *envp) +{ + + __set_env(*envp, __softfloat_float_exception_flags, + __softfloat_float_exception_mask, __softfloat_float_rounding_mode); + return (0); +} + +__fenv_static inline int +feholdexcept(fenv_t *envp) +{ + fenv_t __env; + + fegetenv(envp); + __softfloat_float_exception_flags = 0; + __softfloat_float_exception_mask = 0; + return (0); +} + +__fenv_static inline int +fesetenv(const fenv_t *envp) +{ + + __softfloat_float_exception_flags = __env_flags(*envp); + __softfloat_float_exception_mask = __env_mask(*envp); + __softfloat_float_rounding_mode = __env_round(*envp); + return (0); +} + +__fenv_static inline int +feupdateenv(const fenv_t *envp) +{ + int __oflags = __softfloat_float_exception_flags; + + fesetenv(envp); + feraiseexcept(__oflags); + return (0); +} + +#if __BSD_VISIBLE + +/* We currently provide no external definitions of the functions below. */ + +__fenv_static inline int +feenableexcept(int __mask) +{ + int __omask = __softfloat_float_exception_mask; + + __softfloat_float_exception_mask |= __mask; + return (__omask); +} + +__fenv_static inline int +fedisableexcept(int __mask) +{ + int __omask = __softfloat_float_exception_mask; + + __softfloat_float_exception_mask &= ~__mask; + return (__omask); +} + +__fenv_static inline int +fegetexcept(void) +{ + + return (__softfloat_float_exception_mask); +} + +#endif /* __BSD_VISIBLE */ diff --git a/newlib/libc/machine/arm/machine/fenv-vfp.h b/newlib/libc/machine/arm/machine/fenv-vfp.h new file mode 100644 index 000000000..25d71f3ab --- /dev/null +++ b/newlib/libc/machine/arm/machine/fenv-vfp.h @@ -0,0 +1,187 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2004-2005 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + + + +#define vmrs_fpscr(__r) __asm __volatile("vmrs %0, fpscr" : "=&r"(__r)) +#define vmsr_fpscr(__r) __asm __volatile("vmsr fpscr, %0" : : "r"(__r)) + + +#define _FPU_MASK_SHIFT 8 + +__fenv_static inline int feclearexcept(int excepts) +{ + fexcept_t __fpsr; + + vmrs_fpscr(__fpsr); + __fpsr &= ~excepts; + vmsr_fpscr(__fpsr); + return (0); +} + +__fenv_static inline int +fegetexceptflag(fexcept_t *flagp, int excepts) +{ + fexcept_t __fpsr; + + vmrs_fpscr(__fpsr); + *flagp = __fpsr & excepts; + return (0); +} + +__fenv_static inline int +fesetexceptflag(const fexcept_t *flagp, int excepts) +{ + fexcept_t __fpsr; + + vmrs_fpscr(__fpsr); + __fpsr &= ~excepts; + __fpsr |= *flagp & excepts; + vmsr_fpscr(__fpsr); + return (0); +} + +__fenv_static inline int +feraiseexcept(int excepts) +{ + fexcept_t __ex = excepts; + + fesetexceptflag(&__ex, excepts); /* XXX */ + return (0); +} + +__fenv_static inline int +fetestexcept(int excepts) +{ + fexcept_t __fpsr; + + vmrs_fpscr(__fpsr); + return (__fpsr & excepts); +} + +__fenv_static inline int +fegetround(void) +{ + fenv_t __fpsr; + + vmrs_fpscr(__fpsr); + return (__fpsr & _ROUND_MASK); +} + +__fenv_static inline int +fesetround(int round) +{ + fenv_t __fpsr; + + vmrs_fpscr(__fpsr); + __fpsr &= ~(_ROUND_MASK); + __fpsr |= round; + vmsr_fpscr(__fpsr); + return (0); +} + +__fenv_static inline int +fegetenv(fenv_t *envp) +{ + + vmrs_fpscr(*envp); + return (0); +} + +__fenv_static inline int +feholdexcept(fenv_t *envp) +{ + fenv_t __env; + + vmrs_fpscr(__env); + *envp = __env; + __env &= ~(FE_ALL_EXCEPT); + vmsr_fpscr(__env); + return (0); +} + +__fenv_static inline int +fesetenv(const fenv_t *envp) +{ + + vmsr_fpscr(*envp); + return (0); +} + +__fenv_static inline int +feupdateenv(const fenv_t *envp) +{ + fexcept_t __fpsr; + + vmrs_fpscr(__fpsr); + vmsr_fpscr(*envp); + feraiseexcept(__fpsr & FE_ALL_EXCEPT); + return (0); +} + +#if __BSD_VISIBLE + +/* We currently provide no external definitions of the functions below. */ + +__fenv_static inline int +feenableexcept(int __mask) +{ + fenv_t __old_fpsr, __new_fpsr; + + vmrs_fpscr(__old_fpsr); + __new_fpsr = __old_fpsr | + ((__mask & FE_ALL_EXCEPT) << _FPU_MASK_SHIFT); + vmsr_fpscr(__new_fpsr); + return ((__old_fpsr >> _FPU_MASK_SHIFT) & FE_ALL_EXCEPT); +} + +__fenv_static inline int +fedisableexcept(int __mask) +{ + fenv_t __old_fpsr, __new_fpsr; + + vmrs_fpscr(__old_fpsr); + __new_fpsr = __old_fpsr & + ~((__mask & FE_ALL_EXCEPT) << _FPU_MASK_SHIFT); + vmsr_fpscr(__new_fpsr); + return ((__old_fpsr >> _FPU_MASK_SHIFT) & FE_ALL_EXCEPT); +} + +__fenv_static inline int +fegetexcept(void) +{ + fenv_t __fpsr; + + vmrs_fpscr(__fpsr); + return (__fpsr & FE_ALL_EXCEPT); +} + +#endif /* __BSD_VISIBLE */ + diff --git a/newlib/libc/machine/arm/sys/fenv.h b/newlib/libc/machine/arm/sys/fenv.h new file mode 100644 index 000000000..af74c5f47 --- /dev/null +++ b/newlib/libc/machine/arm/sys/fenv.h @@ -0,0 +1,122 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2004-2005 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_FENV_H_ +#define _SYS_FENV_H_ 1 + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __fenv_static +#define __fenv_static static +#endif + +typedef int fenv_t; +typedef int fexcept_t; + +/* Exception flags */ +#define FE_INVALID 0x0001 +#define FE_DIVBYZERO 0x0002 +#define FE_OVERFLOW 0x0004 +#define FE_UNDERFLOW 0x0008 +#define FE_INEXACT 0x0010 +#ifdef __ARM_PCS_VFP +#define FE_DENORMAL 0x0080 +#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | \ + FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_DENORMAL) +#else +#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | \ + FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW) +#endif + + + +/* Rounding modes */ +#define VFP_FE_TONEAREST 0x00000000 +#define VFP_FE_UPWARD 0x00400000 +#define VFP_FE_DOWNWARD 0x00800000 +#define VFP_FE_TOWARDZERO 0x00c00000 + +#ifdef __ARM_PCS_VFP +#define FE_TONEAREST VFP_FE_TONEAREST +#define FE_UPWARD VFP_FE_UPWARD +#define FE_DOWNWARD VFP_FE_DOWNWARD +#define FE_TOWARDZERO VFP_FE_TOWARDZERO +#else +#define FE_TONEAREST 0x0000 +#define FE_TOWARDZERO 0x0001 +#define FE_UPWARD 0x0002 +#define FE_DOWNWARD 0x0003 +#endif +#define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \ + FE_UPWARD | FE_TOWARDZERO) + + +/* Default floating-point environment */ + +extern const fenv_t *_fe_dfl_env; +#define FE_DFL_ENV (_fe_dfl_env) + +/* We need to be able to map status flag positions to mask flag positions */ +#ifndef __ARM_PCS_VFP +#define _FPUSW_SHIFT 16 +#define _ENABLE_MASK (FE_ALL_EXCEPT << _FPUSW_SHIFT) +#endif + +#ifndef __ARM_PCS_VFP + +int feclearexcept(int excepts); +int fegetexceptflag(fexcept_t *flagp, int excepts); +int fesetexceptflag(const fexcept_t *flagp, int excepts); +int feraiseexcept(int excepts); +int fetestexcept(int excepts); +int fegetround(void); +int fesetround(int round); +int fegetenv(fenv_t *envp); +int feholdexcept(fenv_t *envp); +int fesetenv(const fenv_t *envp); +int feupdateenv(const fenv_t *envp); +#if __BSD_VISIBLE +int feenableexcept(int __mask); +int fedisableexcept(int __mask); +int fegetexcept(void); +#endif /* __BSD_VISIBLE */ + +#endif /* __ARM_PCS_VFP */ + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_FENV_H_ */ diff --git a/newlib/libm/machine/arm/Makefile.am b/newlib/libm/machine/arm/Makefile.am index 1f10a7a40..a64ee59d5 100644 --- a/newlib/libm/machine/arm/Makefile.am +++ b/newlib/libm/machine/arm/Makefile.am @@ -19,7 +19,23 @@ LIB_SOURCES = \ sf_nearbyint.c \ sf_rint.c \ sf_round.c \ - sf_trunc.c + sf_trunc.c \ + feclearexcept.c \ + fe_dfl_env.c\ + fegetenv.c \ + fegetexceptflag.c \ + fegetround.c \ + feholdexcept.c \ + fenv.c \ + feraiseexcept.c \ + fesetenv.c \ + fesetexceptflag.c \ + fesetround.c \ + fetestexcept.c \ + feupdateenv.c \ + fenv-vfp.c \ + fenv-softfp.c + noinst_LIBRARIES = lib.a lib_a_SOURCES = $(LIB_SOURCES) diff --git a/newlib/libm/machine/arm/Makefile.in b/newlib/libm/machine/arm/Makefile.in index 0a5a27327..ecfa684e7 100644 --- a/newlib/libm/machine/arm/Makefile.in +++ b/newlib/libm/machine/arm/Makefile.in @@ -76,7 +76,15 @@ am__objects_1 = lib_a-e_sqrt.$(OBJEXT) lib_a-ef_sqrt.$(OBJEXT) \ lib_a-s_round.$(OBJEXT) lib_a-s_trunc.$(OBJEXT) \ lib_a-sf_ceil.$(OBJEXT) lib_a-sf_floor.$(OBJEXT) \ lib_a-sf_nearbyint.$(OBJEXT) lib_a-sf_rint.$(OBJEXT) \ - lib_a-sf_round.$(OBJEXT) lib_a-sf_trunc.$(OBJEXT) + lib_a-sf_round.$(OBJEXT) lib_a-sf_trunc.$(OBJEXT) \ + lib_a-feclearexcept.$(OBJEXT) lib_a-fe_dfl_env.$(OBJEXT) \ + lib_a-fegetenv.$(OBJEXT) lib_a-fegetexceptflag.$(OBJEXT) \ + lib_a-fegetround.$(OBJEXT) lib_a-feholdexcept.$(OBJEXT) \ + lib_a-fenv.$(OBJEXT) lib_a-feraiseexcept.$(OBJEXT) \ + lib_a-fesetenv.$(OBJEXT) lib_a-fesetexceptflag.$(OBJEXT) \ + lib_a-fesetround.$(OBJEXT) lib_a-fetestexcept.$(OBJEXT) \ + lib_a-feupdateenv.$(OBJEXT) lib_a-fenv-vfp.$(OBJEXT) \ + lib_a-fenv-softfp.$(OBJEXT) am_lib_a_OBJECTS = $(am__objects_1) lib_a_OBJECTS = $(am_lib_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ @@ -216,7 +224,22 @@ LIB_SOURCES = \ sf_nearbyint.c \ sf_rint.c \ sf_round.c \ - sf_trunc.c + sf_trunc.c \ + feclearexcept.c \ + fe_dfl_env.c\ + fegetenv.c \ + fegetexceptflag.c \ + fegetround.c \ + feholdexcept.c \ + fenv.c \ + feraiseexcept.c \ + fesetenv.c \ + fesetexceptflag.c \ + fesetround.c \ + fetestexcept.c \ + feupdateenv.c \ + fenv-vfp.c \ + fenv-softfp.c noinst_LIBRARIES = lib.a lib_a_SOURCES = $(LIB_SOURCES) @@ -378,6 +401,96 @@ lib_a-sf_trunc.o: sf_trunc.c lib_a-sf_trunc.obj: sf_trunc.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_trunc.obj `if test -f 'sf_trunc.c'; then $(CYGPATH_W) 'sf_trunc.c'; else $(CYGPATH_W) '$(srcdir)/sf_trunc.c'; fi` +lib_a-feclearexcept.o: feclearexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feclearexcept.o `test -f 'feclearexcept.c' || echo '$(srcdir)/'`feclearexcept.c + +lib_a-feclearexcept.obj: feclearexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feclearexcept.obj `if test -f 'feclearexcept.c'; then $(CYGPATH_W) 'feclearexcept.c'; else $(CYGPATH_W) '$(srcdir)/feclearexcept.c'; fi` + +lib_a-fe_dfl_env.o: fe_dfl_env.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fe_dfl_env.o `test -f 'fe_dfl_env.c' || echo '$(srcdir)/'`fe_dfl_env.c + +lib_a-fe_dfl_env.obj: fe_dfl_env.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fe_dfl_env.obj `if test -f 'fe_dfl_env.c'; then $(CYGPATH_W) 'fe_dfl_env.c'; else $(CYGPATH_W) '$(srcdir)/fe_dfl_env.c'; fi` + +lib_a-fegetenv.o: fegetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetenv.o `test -f 'fegetenv.c' || echo '$(srcdir)/'`fegetenv.c + +lib_a-fegetenv.obj: fegetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetenv.obj `if test -f 'fegetenv.c'; then $(CYGPATH_W) 'fegetenv.c'; else $(CYGPATH_W) '$(srcdir)/fegetenv.c'; fi` + +lib_a-fegetexceptflag.o: fegetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexceptflag.o `test -f 'fegetexceptflag.c' || echo '$(srcdir)/'`fegetexceptflag.c + +lib_a-fegetexceptflag.obj: fegetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexceptflag.obj `if test -f 'fegetexceptflag.c'; then $(CYGPATH_W) 'fegetexceptflag.c'; else $(CYGPATH_W) '$(srcdir)/fegetexceptflag.c'; fi` + +lib_a-fegetround.o: fegetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetround.o `test -f 'fegetround.c' || echo '$(srcdir)/'`fegetround.c + +lib_a-fegetround.obj: fegetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetround.obj `if test -f 'fegetround.c'; then $(CYGPATH_W) 'fegetround.c'; else $(CYGPATH_W) '$(srcdir)/fegetround.c'; fi` + +lib_a-feholdexcept.o: feholdexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.o `test -f 'feholdexcept.c' || echo '$(srcdir)/'`feholdexcept.c + +lib_a-feholdexcept.obj: feholdexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.obj `if test -f 'feholdexcept.c'; then $(CYGPATH_W) 'feholdexcept.c'; else $(CYGPATH_W) '$(srcdir)/feholdexcept.c'; fi` + +lib_a-fenv.o: fenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.o `test -f 'fenv.c' || echo '$(srcdir)/'`fenv.c + +lib_a-fenv.obj: fenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.obj `if test -f 'fenv.c'; then $(CYGPATH_W) 'fenv.c'; else $(CYGPATH_W) '$(srcdir)/fenv.c'; fi` + +lib_a-feraiseexcept.o: feraiseexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feraiseexcept.o `test -f 'feraiseexcept.c' || echo '$(srcdir)/'`feraiseexcept.c + +lib_a-feraiseexcept.obj: feraiseexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feraiseexcept.obj `if test -f 'feraiseexcept.c'; then $(CYGPATH_W) 'feraiseexcept.c'; else $(CYGPATH_W) '$(srcdir)/feraiseexcept.c'; fi` + +lib_a-fesetenv.o: fesetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetenv.o `test -f 'fesetenv.c' || echo '$(srcdir)/'`fesetenv.c + +lib_a-fesetenv.obj: fesetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetenv.obj `if test -f 'fesetenv.c'; then $(CYGPATH_W) 'fesetenv.c'; else $(CYGPATH_W) '$(srcdir)/fesetenv.c'; fi` + +lib_a-fesetexceptflag.o: fesetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetexceptflag.o `test -f 'fesetexceptflag.c' || echo '$(srcdir)/'`fesetexceptflag.c + +lib_a-fesetexceptflag.obj: fesetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetexceptflag.obj `if test -f 'fesetexceptflag.c'; then $(CYGPATH_W) 'fesetexceptflag.c'; else $(CYGPATH_W) '$(srcdir)/fesetexceptflag.c'; fi` + +lib_a-fesetround.o: fesetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetround.o `test -f 'fesetround.c' || echo '$(srcdir)/'`fesetround.c + +lib_a-fesetround.obj: fesetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetround.obj `if test -f 'fesetround.c'; then $(CYGPATH_W) 'fesetround.c'; else $(CYGPATH_W) '$(srcdir)/fesetround.c'; fi` + +lib_a-fetestexcept.o: fetestexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fetestexcept.o `test -f 'fetestexcept.c' || echo '$(srcdir)/'`fetestexcept.c + +lib_a-fetestexcept.obj: fetestexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fetestexcept.obj `if test -f 'fetestexcept.c'; then $(CYGPATH_W) 'fetestexcept.c'; else $(CYGPATH_W) '$(srcdir)/fetestexcept.c'; fi` + +lib_a-feupdateenv.o: feupdateenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.o `test -f 'feupdateenv.c' || echo '$(srcdir)/'`feupdateenv.c + +lib_a-feupdateenv.obj: feupdateenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.obj `if test -f 'feupdateenv.c'; then $(CYGPATH_W) 'feupdateenv.c'; else $(CYGPATH_W) '$(srcdir)/feupdateenv.c'; fi` + +lib_a-fenv-vfp.o: fenv-vfp.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv-vfp.o `test -f 'fenv-vfp.c' || echo '$(srcdir)/'`fenv-vfp.c + +lib_a-fenv-vfp.obj: fenv-vfp.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv-vfp.obj `if test -f 'fenv-vfp.c'; then $(CYGPATH_W) 'fenv-vfp.c'; else $(CYGPATH_W) '$(srcdir)/fenv-vfp.c'; fi` + +lib_a-fenv-softfp.o: fenv-softfp.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv-softfp.o `test -f 'fenv-softfp.c' || echo '$(srcdir)/'`fenv-softfp.c + +lib_a-fenv-softfp.obj: fenv-softfp.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv-softfp.obj `if test -f 'fenv-softfp.c'; then $(CYGPATH_W) 'fenv-softfp.c'; else $(CYGPATH_W) '$(srcdir)/fenv-softfp.c'; fi` + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ diff --git a/newlib/libm/machine/arm/fe_dfl_env.c b/newlib/libm/machine/arm/fe_dfl_env.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/arm/fe_dfl_env.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/arm/feclearexcept.c b/newlib/libm/machine/arm/feclearexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/arm/feclearexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/arm/fegetenv.c b/newlib/libm/machine/arm/fegetenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/arm/fegetenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/arm/fegetexceptflag.c b/newlib/libm/machine/arm/fegetexceptflag.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/arm/fegetexceptflag.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/arm/fegetround.c b/newlib/libm/machine/arm/fegetround.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/arm/fegetround.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/arm/feholdexcept.c b/newlib/libm/machine/arm/feholdexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/arm/feholdexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/arm/fenv-softfp.c b/newlib/libm/machine/arm/fenv-softfp.c new file mode 100644 index 000000000..a576cc1b2 --- /dev/null +++ b/newlib/libm/machine/arm/fenv-softfp.c @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#define FENV_MANGLE(x) __softfp_ ##x +#include +#include "fenv.c" + diff --git a/newlib/libm/machine/arm/fenv-vfp.c b/newlib/libm/machine/arm/fenv-vfp.c new file mode 100644 index 000000000..297e81296 --- /dev/null +++ b/newlib/libm/machine/arm/fenv-vfp.c @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#define FENV_MANGLE(x) __vfp_ ##x +#include +#include "fenv.c" + diff --git a/newlib/libm/machine/arm/fenv.c b/newlib/libm/machine/arm/fenv.c new file mode 100644 index 000000000..5b61ab81f --- /dev/null +++ b/newlib/libm/machine/arm/fenv.c @@ -0,0 +1,328 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2004 David Schultz + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#define __fenv_static +#include + +#include + +#if __ARM_ARCH >= 6 +#define FENV_ARMv6 +#endif + +/* When SOFTFP_ABI is defined we are using the softfp ABI. */ +#if defined(__VFP_FP__) && !defined(__ARM_PCS_VFP) +#define SOFTFP_ABI +#endif + + +#ifndef FENV_MANGLE +/* + * Hopefully the system ID byte is immutable, so it's valid to use + * this as a default environment. + */ +fenv_t __fe_dfl_env = { 0 }; + +const fenv_t *_fe_dfl_env = &__fe_dfl_env; +#endif + + +/* If this is a non-mangled softfp version special processing is required */ +#if defined(FENV_MANGLE) || !defined(SOFTFP_ABI) || !defined(FENV_ARMv6) + +/* + * The following macros map between the softfloat emulator's flags and + * the hardware's FPSR. The hardware this file was written for doesn't + * have rounding control bits, so we stick those in the system ID byte. + */ +#ifndef __ARM_PCS_VFP +#define __set_env(env, flags, mask, rnd) env = ((flags) \ + | (mask)<<_FPUSW_SHIFT \ + | (rnd) << 24) +#define __env_flags(env) ((env) & FE_ALL_EXCEPT) +#define __env_mask(env) (((env) >> _FPUSW_SHIFT) \ + & FE_ALL_EXCEPT) +#define __env_round(env) (((env) >> 24) & _ROUND_MASK) + +#include + +#else /* __ARM_PCS_VFP PRESENT */ + +#include + +#endif /* __ARM_PCS_VFP */ + +#ifdef __GNUC_GNU_INLINE__ +#error "This file must be compiled with C99 'inline' semantics" +#endif + +extern inline int feclearexcept(int excepts); +extern inline int fegetexceptflag(fexcept_t *flagp, int excepts); +extern inline int fesetexceptflag(const fexcept_t *flagp, int excepts); +extern inline int feraiseexcept(int excepts); +extern inline int fetestexcept(int excepts); +extern inline int fegetround(void); +extern inline int fesetround(int round); +extern inline int fegetenv(fenv_t *envp); +extern inline int feholdexcept(fenv_t *envp); +extern inline int fesetenv(const fenv_t *envp); +extern inline int feupdateenv(const fenv_t *envp); +extern inline int feenableexcept(int __mask); +extern inline int fedisableexcept(int __mask); +extern inline int fegetexcept(void); + +#else /* !FENV_MANGLE && SOFTFP_ABI */ +/* Set by libc when the VFP unit is enabled */ + +int _libc_arm_fpu_present; + +int __softfp_feclearexcept(int excepts); +int __softfp_fegetexceptflag(fexcept_t *flagp, int excepts); +int __softfp_fesetexceptflag(const fexcept_t *flagp, int excepts); +int __softfp_feraiseexcept(int excepts); +int __softfp_fetestexcept(int excepts); +int __softfp_fegetround(void); +int __softfp_fesetround(int round); +int __softfp_fegetenv(fenv_t *envp); +int __softfp_feholdexcept(fenv_t *envp); +int __softfp_fesetenv(const fenv_t *envp); +int __softfp_feupdateenv(const fenv_t *envp); +int __softfp_feenableexcept(int __mask); +int __softfp_fedisableexcept(int __mask); +int __softfp_fegetexcept(void); + +int __vfp_feclearexcept(int excepts); +int __vfp_fegetexceptflag(fexcept_t *flagp, int excepts); +int __vfp_fesetexceptflag(const fexcept_t *flagp, int excepts); +int __vfp_feraiseexcept(int excepts); +int __vfp_fetestexcept(int excepts); +int __vfp_fegetround(void); +int __vfp_fesetround(int round); +int __vfp_fegetenv(fenv_t *envp); +int __vfp_feholdexcept(fenv_t *envp); +int __vfp_fesetenv(const fenv_t *envp); +int __vfp_feupdateenv(const fenv_t *envp); +int __vfp_feenableexcept(int __mask); +int __vfp_fedisableexcept(int __mask); +int __vfp_fegetexcept(void); + +static int +__softfp_round_to_vfp(int round) +{ + + switch (round) { + case FE_TONEAREST: + default: + return VFP_FE_TONEAREST; + case FE_TOWARDZERO: + return VFP_FE_TOWARDZERO; + case FE_UPWARD: + return VFP_FE_UPWARD; + case FE_DOWNWARD: + return VFP_FE_DOWNWARD; + } +} + +static int +__softfp_round_from_vfp(int round) +{ + + switch (round) { + case VFP_FE_TONEAREST: + default: + return FE_TONEAREST; + case VFP_FE_TOWARDZERO: + return FE_TOWARDZERO; + case VFP_FE_UPWARD: + return FE_UPWARD; + case VFP_FE_DOWNWARD: + return FE_DOWNWARD; + } +} + +int feclearexcept(int excepts) +{ + + if (_libc_arm_fpu_present) + __vfp_feclearexcept(excepts); + __softfp_feclearexcept(excepts); + + return (0); +} + +int fegetexceptflag(fexcept_t *flagp, int excepts) +{ + fexcept_t __vfp_flagp; + + __vfp_flagp = 0; + if (_libc_arm_fpu_present) + __vfp_fegetexceptflag(&__vfp_flagp, excepts); + __softfp_fegetexceptflag(flagp, excepts); + + *flagp |= __vfp_flagp; + + return (0); +} + +int fesetexceptflag(const fexcept_t *flagp, int excepts) +{ + + if (_libc_arm_fpu_present) + __vfp_fesetexceptflag(flagp, excepts); + __softfp_fesetexceptflag(flagp, excepts); + + return (0); +} + +int feraiseexcept(int excepts) +{ + + if (_libc_arm_fpu_present) + __vfp_feraiseexcept(excepts); + __softfp_feraiseexcept(excepts); + + return (0); +} + +int fetestexcept(int excepts) +{ + int __got_excepts; + + __got_excepts = 0; + if (_libc_arm_fpu_present) + __got_excepts = __vfp_fetestexcept(excepts); + __got_excepts |= __softfp_fetestexcept(excepts); + + return (__got_excepts); +} + +int fegetround(void) +{ + + if (_libc_arm_fpu_present) + return __softfp_round_from_vfp(__vfp_fegetround()); + return __softfp_fegetround(); +} + +int fesetround(int round) +{ + + if (_libc_arm_fpu_present) + __vfp_fesetround(__softfp_round_to_vfp(round)); + __softfp_fesetround(round); + + return (0); +} + +int fegetenv(fenv_t *envp) +{ + fenv_t __vfp_envp; + + __vfp_envp = 0; + if (_libc_arm_fpu_present) + __vfp_fegetenv(&__vfp_envp); + __softfp_fegetenv(envp); + *envp |= __vfp_envp; + + return (0); +} + +int feholdexcept(fenv_t *envp) +{ + fenv_t __vfp_envp; + + __vfp_envp = 0; + if (_libc_arm_fpu_present) + __vfp_feholdexcept(&__vfp_envp); + __softfp_feholdexcept(envp); + *envp |= __vfp_envp; + + return (0); +} + +int fesetenv(const fenv_t *envp) +{ + + if (_libc_arm_fpu_present) + __vfp_fesetenv(envp); + __softfp_fesetenv(envp); + + return (0); +} + +int feupdateenv(const fenv_t *envp) +{ + + if (_libc_arm_fpu_present) + __vfp_feupdateenv(envp); + __softfp_feupdateenv(envp); + + return (0); +} + +int feenableexcept(int __mask) +{ + int __unmasked; + + __unmasked = 0; + if (_libc_arm_fpu_present) + __unmasked = __vfp_feenableexcept(__mask); + __unmasked |= __softfp_feenableexcept(__mask); + + return (__unmasked); +} + +int fedisableexcept(int __mask) +{ + int __unmasked; + + __unmasked = 0; + if (_libc_arm_fpu_present) + __unmasked = __vfp_fedisableexcept(__mask); + __unmasked |= __softfp_fedisableexcept(__mask); + + return (__unmasked); +} + +int fegetexcept(void) +{ + int __unmasked; + + __unmasked = 0; + if (_libc_arm_fpu_present) + __unmasked = __vfp_fegetexcept(); + __unmasked |= __softfp_fegetexcept(); + + return (__unmasked); +} + +#endif + diff --git a/newlib/libm/machine/arm/feraiseexcept.c b/newlib/libm/machine/arm/feraiseexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/arm/feraiseexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/arm/fesetenv.c b/newlib/libm/machine/arm/fesetenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/arm/fesetenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/arm/fesetexceptflag.c b/newlib/libm/machine/arm/fesetexceptflag.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/arm/fesetexceptflag.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/arm/fesetround.c b/newlib/libm/machine/arm/fesetround.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/arm/fesetround.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/arm/fetestexcept.c b/newlib/libm/machine/arm/fetestexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/arm/fetestexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/arm/feupdateenv.c b/newlib/libm/machine/arm/feupdateenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/arm/feupdateenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" From 8121b606e843c001d5ca5213d24099e04ebc62ca Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Tue, 30 Jun 2020 20:12:13 +0900 Subject: [PATCH 388/520] Cygwin: pty: Discard CSI > Pm m sequence from native windows apps. - If vim is started from WSL (Ubuntu) which is executed in pseudo console in mintty, shift key and ctrl key do not work. Though this issue is similar to the issue resolved by commit 4527541ec66af8d82bb9dba5d25afdf489d71271, that commit is not effective for this issue. This patch fixes the issue by discarding "CSI > Pm m" in fhandler_pty_master::pty_master_fwd_thread(). --- winsup/cygwin/fhandler_tty.cc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 126249d9f..0f95cec2e 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -3316,6 +3316,34 @@ fhandler_pty_master::pty_master_fwd_thread () continue; } + /* Remove CSI > Pm m */ + state = 0; + start_at = 0; + for (DWORD i=0; i')) + { + state ++; + continue; + } + else if (state == 3 && (isdigit (outbuf[i]) || outbuf[i] == ';')) + continue; + else if (state == 3 && outbuf[i] == 'm') + { + memmove (&outbuf[start_at], &outbuf[i+1], rlen-i-1); + rlen = wlen = start_at + rlen - i - 1; + state = 0; + continue; + } + else + state = 0; + size_t nlen; char *buf = convert_mb_str (get_ttyp ()->term_code_page, &nlen, CP_UTF8, ptr, wlen); From c11b0343c069c6d69b3bdf329bcaeb550a18d9e9 Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Tue, 30 Jun 2020 20:12:50 +0900 Subject: [PATCH 389/520] Cygwin: pty, termios: Unify thoughts of read ahead beffer handling. - Return value of eat_readahead() is redefined. The return values of fhandler_termios::eat_readahead() and fhandler_pty_slave:: eat_readahead() were little bit different. This patch unifies them to number of bytes eaten by eat_readahead(). - Considerration for raixget() is added to fhandler_pty_master:: accept_input() code. - Transfering contents of read ahead buffer in fhandler_pty_master::transfer_input_to_pcon() is removed since it is not necessary. - fhandler_pty_slave::eat_readahead() ckecks EOL only when ICANON is set. - Guard for _POSIX_VDISABLE is added in checking EOL. --- winsup/cygwin/fhandler_termios.cc | 20 ++++++++--------- winsup/cygwin/fhandler_tty.cc | 37 +++++++++++++------------------ 2 files changed, 26 insertions(+), 31 deletions(-) diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index b03478b87..ac1d5bd5c 100644 --- a/winsup/cygwin/fhandler_termios.cc +++ b/winsup/cygwin/fhandler_termios.cc @@ -268,25 +268,25 @@ fhandler_termios::eat_readahead (int n) { int oralen = ralen (); if (n < 0) - n = ralen (); - if (n > 0 && ralen () > 0) + n = ralen () - raixget (); + if (n > 0 && ralen () > raixget ()) { - if ((int) (ralen () -= n) < 0) - ralen () = 0; + if ((int) (ralen () -= n) < (int) raixget ()) + ralen () = raixget (); /* If IUTF8 is set, the terminal is in UTF-8 mode. If so, we erase a complete UTF-8 multibyte sequence on VERASE/VWERASE. Otherwise, if we only erase a single byte, invalid unicode chars are left in the input. */ if (tc ()->ti.c_iflag & IUTF8) - while (ralen () > 0 && + while (ralen () > raixget () && ((unsigned char) rabuf ()[ralen ()] & 0xc0) == 0x80) --ralen (); - - if (raixget () >= ralen ()) - raixget () = raixput () = ralen () = 0; - else if (raixput () > ralen ()) - raixput () = ralen (); } + oralen = oralen - ralen (); + if (raixget () >= ralen ()) + raixget () = raixput () = ralen () = 0; + else if (raixput () > ralen ()) + raixput () = ralen (); return oralen; } diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 0f95cec2e..a61167116 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -548,6 +548,7 @@ fhandler_pty_master::accept_input () WaitForSingleObject (input_mutex, INFINITE); + char *p = rabuf () + raixget (); bytes_left = eat_readahead (-1); if (to_be_read_from_pcon ()) @@ -559,7 +560,6 @@ fhandler_pty_master::accept_input () } else { - char *p = rabuf (); DWORD rc; DWORD written = 0; @@ -1171,10 +1171,10 @@ fhandler_pty_slave::update_pcon_input_state (bool need_lock) '\n', '\r' }; - if (is_line_input () && memchr (eols, c, sizeof (eols))) + if (is_line_input () && c && memchr (eols, c, sizeof (eols))) saw_accept = true; - if ((get_ttyp ()->ti.c_lflag & ISIG) && - memchr (sigs, c, sizeof (sigs))) + if ((get_ttyp ()->ti.c_lflag & ISIG) + && c && memchr (sigs, c, sizeof (sigs))) saw_accept = true; } get_ttyp ()->pcon_in_empty = pipe_empty && !(ralen () > raixget ()); @@ -1189,7 +1189,7 @@ fhandler_pty_slave::update_pcon_input_state (bool need_lock) int fhandler_pty_slave::eat_readahead (int n) { - int oralen = ralen () - raixget (); + int oralen = ralen (); if (n < 0) n = ralen () - raixget (); if (n > 0 && ralen () > raixget ()) @@ -1202,7 +1202,8 @@ fhandler_pty_slave::eat_readahead (int n) }; while (n > 0 && ralen () > raixget ()) { - if (memchr (eols, rabuf ()[ralen ()-1], sizeof (eols))) + if (is_line_input () && rabuf ()[ralen ()-1] + && memchr (eols, rabuf ()[ralen ()-1], sizeof (eols))) break; -- n; -- ralen (); @@ -1213,15 +1214,15 @@ fhandler_pty_slave::eat_readahead (int n) if we only erase a single byte, invalid unicode chars are left in the input. */ if (get_ttyp ()->ti.c_iflag & IUTF8) - while (ralen () > 0 && + while (ralen () > raixget () && ((unsigned char) rabuf ()[ralen ()] & 0xc0) == 0x80) --ralen (); - - if (raixget () >= ralen ()) - raixget () = raixput () = ralen () = 0; - else if (raixput () > ralen ()) - raixput () = ralen (); } + oralen = oralen - ralen (); + if (raixget () >= ralen ()) + raixget () = raixput () = ralen () = 0; + else if (raixput () > ralen ()) + raixput () = ralen (); return oralen; } @@ -1245,7 +1246,7 @@ fhandler_pty_slave::get_readahead_into_buffer (char *buf, size_t buflen) }; buf[copied_chars++] = (unsigned char)(ch & 0xff); buflen--; - if (is_line_input () && memchr (eols, ch & 0xff, sizeof (eols))) + if (is_line_input () && ch && memchr (eols, ch & 0xff, sizeof (eols))) break; } @@ -1264,7 +1265,7 @@ fhandler_pty_slave::get_readahead_valid (void) '\n' }; for (size_t i=raixget (); iti.c_lflag & ISIG) for (size_t i=0; ipcon_in_empty = false; ReleaseMutex (input_mutex); From e037192b505b4f233fca9a6deafc9797210f6693 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 30 Jun 2020 13:33:57 +0200 Subject: [PATCH 390/520] Cygwin: tcp: fix IPPROTO_TCP option handling - Drop definitions from - Drop options only available on BSD - Fix value of TCP_MAXSEG. It was still defined as the BSD value while WinSock uses another value - Handle the fact that TCP_MAXSEG is a R/O value in WinSock Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_socket_inet.cc | 15 +++++++++++++++ winsup/cygwin/include/cygwin/socket.h | 6 ------ winsup/cygwin/include/netinet/tcp.h | 6 +----- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/winsup/cygwin/fhandler_socket_inet.cc b/winsup/cygwin/fhandler_socket_inet.cc index 18ee42260..ad17f48f1 100644 --- a/winsup/cygwin/fhandler_socket_inet.cc +++ b/winsup/cygwin/fhandler_socket_inet.cc @@ -23,6 +23,7 @@ #endif #include #include +#include #include #include #include @@ -1682,6 +1683,20 @@ fhandler_socket_inet::setsockopt (int level, int optname, const void *optval, } default: break; + + case IPPROTO_TCP: + switch (optname) + { + case TCP_MAXSEG: + /* Winsock doesn't support setting TCP_MAXSEG, only requesting it + via getsockopt. Make this a no-op. */ + ignore = true; + break; + + default: + break; + } + break; } /* Call Winsock setsockopt (or not) */ diff --git a/winsup/cygwin/include/cygwin/socket.h b/winsup/cygwin/include/cygwin/socket.h index 721dafcfa..0ca8300d9 100644 --- a/winsup/cygwin/include/cygwin/socket.h +++ b/winsup/cygwin/include/cygwin/socket.h @@ -300,12 +300,6 @@ struct OLD_msghdr /* IPX options */ #define IPX_TYPE 1 -/* TCP options - this way around because someone left a set in the c library includes */ -#ifndef TCP_NODELAY -#define TCP_NODELAY 0x0001 -#define TCP_MAXSEG 2 -#endif - /* SUS symbolic values for the second parm to shutdown(2) */ #define SHUT_RD 0 /* == Win32 SD_RECEIVE */ #define SHUT_WR 1 /* == Win32 SD_SEND */ diff --git a/winsup/cygwin/include/netinet/tcp.h b/winsup/cygwin/include/netinet/tcp.h index c9d534dda..5503a3fd6 100644 --- a/winsup/cygwin/include/netinet/tcp.h +++ b/winsup/cygwin/include/netinet/tcp.h @@ -123,11 +123,7 @@ struct tcphdr { /* * User-settable options (used with setsockopt). */ -#ifndef TCP_NODELAY #define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ -#define TCP_MAXSEG 0x02 /* set maximum segment size */ -#endif -#define TCP_NOPUSH 0x04 /* don't push last block of write */ -#define TCP_NOOPT 0x08 /* don't use TCP options */ +#define TCP_MAXSEG 0x04 /* get maximum segment size (r/o on windows) */ #endif From 0feb77c26084be83ce3aaeebc17b999bb3627efa Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 30 Jun 2020 14:34:19 +0200 Subject: [PATCH 391/520] Cygwin: tcp: Support TCP_FASTOPEN TCP_FASTOPEN is supported since W10 1607. Fake otherwise. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler.h | 3 +- winsup/cygwin/fhandler_socket_inet.cc | 47 +++++++++++++++++++++++++-- winsup/cygwin/include/netinet/tcp.h | 1 + winsup/cygwin/wincap.cc | 44 +++++++++++++++++++++++++ winsup/cygwin/wincap.h | 2 ++ 5 files changed, 93 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index c6ce6d8e1..57f282105 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -718,7 +718,8 @@ class fhandler_socket_wsock: public fhandler_socket class fhandler_socket_inet: public fhandler_socket_wsock { private: - bool oobinline; /* True if option SO_OOBINLINE is set */ + bool oobinline; /* True if option SO_OOBINLINE is set */ + bool tcp_fastopen; /* True if TCP_FASTOPEN is set on older systems */ protected: int af_local_connect () { return 0; } diff --git a/winsup/cygwin/fhandler_socket_inet.cc b/winsup/cygwin/fhandler_socket_inet.cc index ad17f48f1..1e837d72c 100644 --- a/winsup/cygwin/fhandler_socket_inet.cc +++ b/winsup/cygwin/fhandler_socket_inet.cc @@ -691,7 +691,8 @@ fhandler_socket_wsock::set_socket_handle (SOCKET sock, int af, int type, fhandler_socket_inet::fhandler_socket_inet () : fhandler_socket_wsock (), - oobinline (false) + oobinline (false), + tcp_fastopen (false) { } @@ -1693,6 +1694,20 @@ fhandler_socket_inet::setsockopt (int level, int optname, const void *optval, ignore = true; break; + case TCP_FASTOPEN: + /* Fake FastOpen on older systems. */ + if (!wincap.has_tcp_fastopen ()) + { + if (type != SOCK_STREAM) + { + set_errno (EOPNOTSUPP); + return -1; + } + ignore = true; + tcp_fastopen = *(int *) optval ? true : false; + } + break; + default: break; } @@ -1825,6 +1840,29 @@ fhandler_socket_inet::getsockopt (int level, int optname, const void *optval, optname = convert_ws1_ip_optname (optname); break; + case IPPROTO_TCP: + switch (optname) + { + case TCP_FASTOPEN: + /* Fake FastOpen on older systems */ + if (!wincap.has_tcp_fastopen ()) + { + if (type != SOCK_STREAM) + { + set_errno (EOPNOTSUPP); + return -1; + } + *(int *) optval = tcp_fastopen ? 1 : 0; + *optlen = sizeof (int); + return 0; + } + break; + + default: + break; + } + break; + default: break; } @@ -1869,6 +1907,10 @@ fhandler_socket_inet::getsockopt (int level, int optname, const void *optval, onebyte = true; break; + case TCP_FASTOPEN: + onebyte = true; + break; + default: break; } @@ -1881,8 +1923,7 @@ fhandler_socket_inet::getsockopt (int level, int optname, const void *optval, /* Regression in Vista and later: instead of a 4 byte BOOL value, a 1 byte BOOLEAN value is returned, in contrast to older systems and the documentation. Since an int type is expected by the calling - application, we convert the result here. For some reason only three - BSD-compatible socket options seem to be affected. */ + application, we convert the result here. */ BOOLEAN *in = (BOOLEAN *) optval; int *out = (int *) optval; *out = *in; diff --git a/winsup/cygwin/include/netinet/tcp.h b/winsup/cygwin/include/netinet/tcp.h index 5503a3fd6..ab1cd12bf 100644 --- a/winsup/cygwin/include/netinet/tcp.h +++ b/winsup/cygwin/include/netinet/tcp.h @@ -125,5 +125,6 @@ struct tcphdr { */ #define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ #define TCP_MAXSEG 0x04 /* get maximum segment size (r/o on windows) */ +#define TCP_FASTOPEN 0x0f /* enable FastOpen on listeners */ #endif diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index 4d136007f..be6d71d12 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -46,6 +46,7 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = { has_con_broken_il_dl:false, has_con_esc_rep:false, has_extended_mem_api:false, + has_tcp_fastopen:false, }, }; @@ -77,6 +78,7 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = { has_con_broken_il_dl:false, has_con_esc_rep:false, has_extended_mem_api:false, + has_tcp_fastopen:false, }, }; @@ -108,6 +110,7 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = { has_con_broken_il_dl:false, has_con_esc_rep:false, has_extended_mem_api:false, + has_tcp_fastopen:false, }, }; @@ -139,6 +142,7 @@ wincaps wincap_8_1 __attribute__((section (".cygwin_dll_common"), shared)) = { has_con_broken_il_dl:false, has_con_esc_rep:false, has_extended_mem_api:false, + has_tcp_fastopen:false, }, }; @@ -170,6 +174,39 @@ wincaps wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared)) has_con_broken_il_dl:false, has_con_esc_rep:false, has_extended_mem_api:false, + has_tcp_fastopen:false, + }, +}; + +wincaps wincap_10_1607 __attribute__((section (".cygwin_dll_common"), shared)) = { + def_guard_pages:2, + mmap_storage_high:0x700000000000LL, + { + is_server:false, + needs_count_in_si_lpres2:false, + needs_query_information:false, + has_gaa_largeaddress_bug:false, + has_broken_alloc_console:true, + has_console_logon_sid:true, + has_precise_system_time:true, + has_microsoft_accounts:true, + has_processor_groups:true, + has_broken_prefetchvm:true, + has_new_pebteb_region:false, + has_broken_whoami:false, + has_unprivileged_createsymlink:false, + has_unbiased_interrupt_time:true, + has_precise_interrupt_time:true, + has_posix_unlink_semantics:false, + has_case_sensitive_dirs:false, + has_posix_rename_semantics:false, + no_msv1_0_s4u_logon_in_wow64:false, + has_con_24bit_colors:false, + has_con_broken_csi3j:false, + has_con_broken_il_dl:false, + has_con_esc_rep:false, + has_extended_mem_api:false, + has_tcp_fastopen:true, }, }; @@ -201,6 +238,7 @@ wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_broken_il_dl:false, has_con_esc_rep:false, has_extended_mem_api:false, + has_tcp_fastopen:true, }, }; @@ -232,6 +270,7 @@ wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_broken_il_dl:false, has_con_esc_rep:false, has_extended_mem_api:false, + has_tcp_fastopen:true, }, }; @@ -263,6 +302,7 @@ wincaps wincap_10_1803 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_broken_il_dl:false, has_con_esc_rep:false, has_extended_mem_api:true, + has_tcp_fastopen:true, }, }; @@ -294,6 +334,7 @@ wincaps wincap_10_1809 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_broken_il_dl:false, has_con_esc_rep:false, has_extended_mem_api:true, + has_tcp_fastopen:true, }, }; @@ -325,6 +366,7 @@ wincaps wincap_10_1903 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_broken_il_dl:true, has_con_esc_rep:true, has_extended_mem_api:true, + has_tcp_fastopen:true, }, }; @@ -378,6 +420,8 @@ wincapc::init () caps = &wincap_10_1709; else if (version.dwBuildNumber >= 15063) caps = &wincap_10_1703; + else if (version.dwBuildNumber >= 14393) + caps = &wincap_10_1607; else caps = & wincap_10_1507; } diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h index cf13de535..54a880af7 100644 --- a/winsup/cygwin/wincap.h +++ b/winsup/cygwin/wincap.h @@ -40,6 +40,7 @@ struct wincaps unsigned has_con_broken_il_dl : 1; unsigned has_con_esc_rep : 1; unsigned has_extended_mem_api : 1; + unsigned has_tcp_fastopen : 1; }; }; @@ -103,6 +104,7 @@ public: bool IMPLEMENT (has_con_broken_il_dl) bool IMPLEMENT (has_con_esc_rep) bool IMPLEMENT (has_extended_mem_api) + bool IMPLEMENT (has_tcp_fastopen) void disable_case_sensitive_dirs () { From 8ccffddc91942dcb4a6417c13b46c5ab5d81a5d9 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 1 Jul 2020 20:27:10 +0200 Subject: [PATCH 392/520] Cygwin: tcp: Support TCP_KEEPIDLE, TCP_KEEPCNT, TCP_KEEPINTVL Use WSAIoctl(SIO_KEEPALIVE_VALS) on older systems. Make sure that keep-alive timeout is equivalent to TCP_KEEPIDLE + TCP_KEEPCNT * TCP_KEEPINTVL on older systems, even with TCP_KEEPCNT being a fixed value on those systems. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler.h | 5 + winsup/cygwin/fhandler_socket_inet.cc | 167 ++++++++++++++++++++++++-- winsup/cygwin/include/netinet/tcp.h | 9 +- winsup/cygwin/wincap.cc | 11 ++ winsup/cygwin/wincap.h | 2 + 5 files changed, 180 insertions(+), 14 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 57f282105..24184dacc 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -720,6 +720,11 @@ class fhandler_socket_inet: public fhandler_socket_wsock private: bool oobinline; /* True if option SO_OOBINLINE is set */ bool tcp_fastopen; /* True if TCP_FASTOPEN is set on older systems */ + int tcp_keepidle; /* TCP_KEEPIDLE value in secs on older systems */ + int tcp_keepcnt; /* TCP_KEEPCNT value on older systems */ + int tcp_keepintvl; /* TCP_KEEPINTVL value in secs on older systems */ + + int set_keepalive (int keepidle, int keepcnt, int keepintvl); protected: int af_local_connect () { return 0; } diff --git a/winsup/cygwin/fhandler_socket_inet.cc b/winsup/cygwin/fhandler_socket_inet.cc index 1e837d72c..9bdaece5a 100644 --- a/winsup/cygwin/fhandler_socket_inet.cc +++ b/winsup/cygwin/fhandler_socket_inet.cc @@ -23,6 +23,7 @@ #endif #include #include +#include #include #include #include @@ -692,7 +693,10 @@ fhandler_socket_wsock::set_socket_handle (SOCKET sock, int af, int type, fhandler_socket_inet::fhandler_socket_inet () : fhandler_socket_wsock (), oobinline (false), - tcp_fastopen (false) + tcp_fastopen (false), + tcp_keepidle (7200), /* WinSock default */ + tcp_keepcnt (10), /* WinSock default */ + tcp_keepintvl (1) /* WinSock default */ { } @@ -1572,6 +1576,63 @@ fhandler_socket_wsock::writev (const struct iovec *const iov, const int iovcnt, return send_internal (&wsamsg, 0); } +#define MAX_TCP_KEEPIDLE 32767 +#define MAX_TCP_KEEPCNT 255 +#define MAX_TCP_KEEPINTVL 32767 + +#define FIXED_WSOCK_TCP_KEEPCNT 10 + +int +fhandler_socket_inet::set_keepalive (int keepidle, int keepcnt, int keepintvl) +{ + struct tcp_keepalive tka; + int so_keepalive = 0; + int len = sizeof so_keepalive; + int ret; + DWORD dummy; + + /* Per MSDN, + https://docs.microsoft.com/en-us/windows/win32/winsock/sio-keepalive-vals + the subsequent keep-alive settings in struct tcp_keepalive are only used + if the onoff member is != 0. Request the current state of SO_KEEPALIVE, + then set the keep-alive options with onoff set to 1. On success, if + SO_KEEPALIVE was 0, restore to the original SO_KEEPALIVE setting. Per + the above MSDN doc, the SIO_KEEPALIVE_VALS settings are persistent + across switching SO_KEEPALIVE. */ + ret = ::getsockopt (get_socket (), SOL_SOCKET, SO_KEEPALIVE, + (char *) &so_keepalive, &len); + if (ret == SOCKET_ERROR) + debug_printf ("getsockopt (SO_KEEPALIVE) failed, %u\n", WSAGetLastError ()); + tka.onoff = 1; + tka.keepalivetime = keepidle * MSPERSEC; + /* WinSock TCP_KEEPCNT is fixed. But we still want that the keep-alive + times out after TCP_KEEPIDLE + TCP_KEEPCNT * TCP_KEEPINTVL secs. + To that end, we set keepaliveinterval so that + + keepaliveinterval * FIXED_WSOCK_TCP_KEEPCNT == TCP_KEEPINTVL * TCP_KEEPCNT + + FIXME? Does that make sense? + + Sidenote: Given the max values, the entire operation fits into an int. */ + tka.keepaliveinterval = MSPERSEC / FIXED_WSOCK_TCP_KEEPCNT * keepcnt + * keepintvl; + if (WSAIoctl (get_socket (), SIO_KEEPALIVE_VALS, (LPVOID) &tka, sizeof tka, + NULL, 0, &dummy, NULL, NULL) == SOCKET_ERROR) + { + set_winsock_errno (); + return -1; + } + if (!so_keepalive) + { + ret = ::setsockopt (get_socket (), SOL_SOCKET, SO_KEEPALIVE, + (const char *) &so_keepalive, sizeof so_keepalive); + if (ret == SOCKET_ERROR) + debug_printf ("setsockopt (SO_KEEPALIVE) failed, %u\n", + WSAGetLastError ()); + } + return 0; +} + int fhandler_socket_inet::setsockopt (int level, int optname, const void *optval, socklen_t optlen) @@ -1686,6 +1747,14 @@ fhandler_socket_inet::setsockopt (int level, int optname, const void *optval, break; case IPPROTO_TCP: + /* Check for stream socket early on, so we don't have to do this for + every option. Also, WinSock returns EINVAL. */ + if (type != SOCK_STREAM) + { + set_errno (EOPNOTSUPP); + return -1; + } + switch (optname) { case TCP_MAXSEG: @@ -1698,16 +1767,59 @@ fhandler_socket_inet::setsockopt (int level, int optname, const void *optval, /* Fake FastOpen on older systems. */ if (!wincap.has_tcp_fastopen ()) { - if (type != SOCK_STREAM) - { - set_errno (EOPNOTSUPP); - return -1; - } ignore = true; tcp_fastopen = *(int *) optval ? true : false; } break; + case TCP_KEEPIDLE: + /* Handle TCP_KEEPIDLE on older systems. */ + if (!wincap.has_linux_tcp_keepalive_sockopts ()) + { + if (*(int *) optval < 1 || *(int *) optval > MAX_TCP_KEEPIDLE) + { + set_errno (EINVAL); + return -1; + } + if (set_keepalive (*(int *) optval, tcp_keepcnt, tcp_keepintvl)) + return -1; + ignore = true; + tcp_keepidle = *(int *) optval; + } + break; + + case TCP_KEEPCNT: + /* Fake TCP_KEEPCNT on older systems. */ + if (!wincap.has_linux_tcp_keepalive_sockopts ()) + { + if (*(int *) optval < 1 || *(int *) optval > MAX_TCP_KEEPCNT) + { + set_errno (EINVAL); + return -1; + } + if (set_keepalive (tcp_keepidle, *(int *) optval, tcp_keepintvl)) + return -1; + ignore = true; + tcp_keepcnt = *(int *) optval; + } + break; + + case TCP_KEEPINTVL: + /* Handle TCP_KEEPINTVL on older systems. */ + if (!wincap.has_linux_tcp_keepalive_sockopts ()) + { + if (*(int *) optval < 1 || *(int *) optval > MAX_TCP_KEEPINTVL) + { + set_errno (EINVAL); + return -1; + } + if (set_keepalive (tcp_keepidle, tcp_keepcnt, *(int *) optval)) + return -1; + ignore = true; + tcp_keepintvl = *(int *) optval; + } + break; + default: break; } @@ -1841,23 +1953,56 @@ fhandler_socket_inet::getsockopt (int level, int optname, const void *optval, break; case IPPROTO_TCP: + /* Check for stream socket early on, so we don't have to do this for + every option. Also, WinSock returns EINVAL. */ + if (type != SOCK_STREAM) + { + set_errno (EOPNOTSUPP); + return -1; + } + switch (optname) { case TCP_FASTOPEN: /* Fake FastOpen on older systems */ if (!wincap.has_tcp_fastopen ()) { - if (type != SOCK_STREAM) - { - set_errno (EOPNOTSUPP); - return -1; - } *(int *) optval = tcp_fastopen ? 1 : 0; *optlen = sizeof (int); return 0; } break; + case TCP_KEEPIDLE: + /* Use stored value on older systems */ + if (!wincap.has_linux_tcp_keepalive_sockopts ()) + { + *(int *) optval = tcp_keepidle; + *optlen = sizeof (int); + return 0; + } + break; + + case TCP_KEEPCNT: + /* Use stored value on older systems */ + if (!wincap.has_linux_tcp_keepalive_sockopts ()) + { + *(int *) optval = tcp_keepcnt; + *optlen = sizeof (int); + return 0; + } + break; + + case TCP_KEEPINTVL: + /* Use stored value on older systems */ + if (!wincap.has_linux_tcp_keepalive_sockopts ()) + { + *(int *) optval = tcp_keepintvl; + *optlen = sizeof (int); + return 0; + } + break; + default: break; } diff --git a/winsup/cygwin/include/netinet/tcp.h b/winsup/cygwin/include/netinet/tcp.h index ab1cd12bf..9c2e90eaa 100644 --- a/winsup/cygwin/include/netinet/tcp.h +++ b/winsup/cygwin/include/netinet/tcp.h @@ -123,8 +123,11 @@ struct tcphdr { /* * User-settable options (used with setsockopt). */ -#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ -#define TCP_MAXSEG 0x04 /* get maximum segment size (r/o on windows) */ -#define TCP_FASTOPEN 0x0f /* enable FastOpen on listeners */ +#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ +#define TCP_KEEPIDLE 0x03 /* start keepalives after this period */ +#define TCP_MAXSEG 0x04 /* get maximum segment size (r/o on windows) */ +#define TCP_FASTOPEN 0x0f /* enable FastOpen on listeners */ +#define TCP_KEEPCNT 0x10 /* number of keepalives before death */ +#define TCP_KEEPINTVL 0x11 /* interval between keepalives */ #endif diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index be6d71d12..323c5a368 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -47,6 +47,7 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = { has_con_esc_rep:false, has_extended_mem_api:false, has_tcp_fastopen:false, + has_linux_tcp_keepalive_sockopts:false, }, }; @@ -79,6 +80,7 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = { has_con_esc_rep:false, has_extended_mem_api:false, has_tcp_fastopen:false, + has_linux_tcp_keepalive_sockopts:false, }, }; @@ -111,6 +113,7 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = { has_con_esc_rep:false, has_extended_mem_api:false, has_tcp_fastopen:false, + has_linux_tcp_keepalive_sockopts:false, }, }; @@ -143,6 +146,7 @@ wincaps wincap_8_1 __attribute__((section (".cygwin_dll_common"), shared)) = { has_con_esc_rep:false, has_extended_mem_api:false, has_tcp_fastopen:false, + has_linux_tcp_keepalive_sockopts:false, }, }; @@ -175,6 +179,7 @@ wincaps wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared)) has_con_esc_rep:false, has_extended_mem_api:false, has_tcp_fastopen:false, + has_linux_tcp_keepalive_sockopts:false, }, }; @@ -207,6 +212,7 @@ wincaps wincap_10_1607 __attribute__((section (".cygwin_dll_common"), shared)) has_con_esc_rep:false, has_extended_mem_api:false, has_tcp_fastopen:true, + has_linux_tcp_keepalive_sockopts:false, }, }; @@ -239,6 +245,7 @@ wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_esc_rep:false, has_extended_mem_api:false, has_tcp_fastopen:true, + has_linux_tcp_keepalive_sockopts:false, }, }; @@ -271,6 +278,7 @@ wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_esc_rep:false, has_extended_mem_api:false, has_tcp_fastopen:true, + has_linux_tcp_keepalive_sockopts:true, }, }; @@ -303,6 +311,7 @@ wincaps wincap_10_1803 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_esc_rep:false, has_extended_mem_api:true, has_tcp_fastopen:true, + has_linux_tcp_keepalive_sockopts:true, }, }; @@ -335,6 +344,7 @@ wincaps wincap_10_1809 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_esc_rep:false, has_extended_mem_api:true, has_tcp_fastopen:true, + has_linux_tcp_keepalive_sockopts:true, }, }; @@ -367,6 +377,7 @@ wincaps wincap_10_1903 __attribute__((section (".cygwin_dll_common"), shared)) = has_con_esc_rep:true, has_extended_mem_api:true, has_tcp_fastopen:true, + has_linux_tcp_keepalive_sockopts:true, }, }; diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h index 54a880af7..26c4c01ef 100644 --- a/winsup/cygwin/wincap.h +++ b/winsup/cygwin/wincap.h @@ -41,6 +41,7 @@ struct wincaps unsigned has_con_esc_rep : 1; unsigned has_extended_mem_api : 1; unsigned has_tcp_fastopen : 1; + unsigned has_linux_tcp_keepalive_sockopts : 1; }; }; @@ -105,6 +106,7 @@ public: bool IMPLEMENT (has_con_esc_rep) bool IMPLEMENT (has_extended_mem_api) bool IMPLEMENT (has_tcp_fastopen) + bool IMPLEMENT (has_linux_tcp_keepalive_sockopts) void disable_case_sensitive_dirs () { From ffb07b41bcc6763a6026366343ee2d467683e984 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 1 Jul 2020 20:30:22 +0200 Subject: [PATCH 393/520] Cygwin: tcp: Support TCP_USER_TIMEOUT Use TCP_MAXRTMS on newer systems, TCP_MAXRT on older systems. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_socket_inet.cc | 36 +++++++++++++++++++++++++++ winsup/cygwin/include/netinet/tcp.h | 2 ++ winsup/cygwin/wincap.cc | 11 ++++++++ winsup/cygwin/wincap.h | 2 ++ 4 files changed, 51 insertions(+) diff --git a/winsup/cygwin/fhandler_socket_inet.cc b/winsup/cygwin/fhandler_socket_inet.cc index 9bdaece5a..6b6b63d83 100644 --- a/winsup/cygwin/fhandler_socket_inet.cc +++ b/winsup/cygwin/fhandler_socket_inet.cc @@ -1576,6 +1576,9 @@ fhandler_socket_wsock::writev (const struct iovec *const iov, const int iovcnt, return send_internal (&wsamsg, 0); } +#define TCP_MAXRT 5 /* Older systems don't support TCP_MAXRTMS + TCP_MAXRT takes secs, not msecs. */ + #define MAX_TCP_KEEPIDLE 32767 #define MAX_TCP_KEEPCNT 255 #define MAX_TCP_KEEPINTVL 32767 @@ -1639,6 +1642,7 @@ fhandler_socket_inet::setsockopt (int level, int optname, const void *optval, { bool ignore = false; int ret = -1; + unsigned int timeout; /* Preprocessing setsockopt. Set ignore to true if setsockopt call should get skipped entirely. */ @@ -1763,6 +1767,22 @@ fhandler_socket_inet::setsockopt (int level, int optname, const void *optval, ignore = true; break; + case TCP_MAXRT: + /* Don't let this option slip through from user space. */ + set_errno (EOPNOTSUPP); + return -1; + + case TCP_USER_TIMEOUT: + if (!wincap.has_tcp_maxrtms ()) + { + /* convert msecs to secs. Values < 1000 ms are converted to + 0 secs, just as in WinSock. */ + timeout = *(unsigned int *) optval / MSPERSEC; + optname = TCP_MAXRT; + optval = (const void *) &timeout; + } + break; + case TCP_FASTOPEN: /* Fake FastOpen on older systems. */ if (!wincap.has_tcp_fastopen ()) @@ -1963,6 +1983,17 @@ fhandler_socket_inet::getsockopt (int level, int optname, const void *optval, switch (optname) { + case TCP_MAXRT: + /* Don't let this option slip through from user space. */ + set_errno (EOPNOTSUPP); + return -1; + + case TCP_USER_TIMEOUT: + /* Older systems don't support TCP_MAXRTMS, just call TCP_MAXRT. */ + if (!wincap.has_tcp_maxrtms ()) + optname = TCP_MAXRT; + break; + case TCP_FASTOPEN: /* Fake FastOpen on older systems */ if (!wincap.has_tcp_fastopen ()) @@ -2052,6 +2083,11 @@ fhandler_socket_inet::getsockopt (int level, int optname, const void *optval, onebyte = true; break; + case TCP_MAXRT: /* After above conversion from TCP_USER_TIMEOUT */ + /* convert secs to msecs */ + *(unsigned int *) optval *= MSPERSEC; + break; + case TCP_FASTOPEN: onebyte = true; break; diff --git a/winsup/cygwin/include/netinet/tcp.h b/winsup/cygwin/include/netinet/tcp.h index 9c2e90eaa..8ccb0dfaa 100644 --- a/winsup/cygwin/include/netinet/tcp.h +++ b/winsup/cygwin/include/netinet/tcp.h @@ -126,6 +126,8 @@ struct tcphdr { #define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ #define TCP_KEEPIDLE 0x03 /* start keepalives after this period */ #define TCP_MAXSEG 0x04 /* get maximum segment size (r/o on windows) */ +#define TCP_USER_TIMEOUT 0x0e /* how long for loss retry before timeout, + like WinSock TCP_MAXRTMS/TCP_MAXRT */ #define TCP_FASTOPEN 0x0f /* enable FastOpen on listeners */ #define TCP_KEEPCNT 0x10 /* number of keepalives before death */ #define TCP_KEEPINTVL 0x11 /* interval between keepalives */ diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index 323c5a368..b18e732cd 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -48,6 +48,7 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = { has_extended_mem_api:false, has_tcp_fastopen:false, has_linux_tcp_keepalive_sockopts:false, + has_tcp_maxrtms:false, }, }; @@ -81,6 +82,7 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = { has_extended_mem_api:false, has_tcp_fastopen:false, has_linux_tcp_keepalive_sockopts:false, + has_tcp_maxrtms:false, }, }; @@ -114,6 +116,7 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = { has_extended_mem_api:false, has_tcp_fastopen:false, has_linux_tcp_keepalive_sockopts:false, + has_tcp_maxrtms:false, }, }; @@ -147,6 +150,7 @@ wincaps wincap_8_1 __attribute__((section (".cygwin_dll_common"), shared)) = { has_extended_mem_api:false, has_tcp_fastopen:false, has_linux_tcp_keepalive_sockopts:false, + has_tcp_maxrtms:false, }, }; @@ -180,6 +184,7 @@ wincaps wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared)) has_extended_mem_api:false, has_tcp_fastopen:false, has_linux_tcp_keepalive_sockopts:false, + has_tcp_maxrtms:false, }, }; @@ -213,6 +218,7 @@ wincaps wincap_10_1607 __attribute__((section (".cygwin_dll_common"), shared)) has_extended_mem_api:false, has_tcp_fastopen:true, has_linux_tcp_keepalive_sockopts:false, + has_tcp_maxrtms:true, }, }; @@ -246,6 +252,7 @@ wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) = has_extended_mem_api:false, has_tcp_fastopen:true, has_linux_tcp_keepalive_sockopts:false, + has_tcp_maxrtms:true, }, }; @@ -279,6 +286,7 @@ wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) = has_extended_mem_api:false, has_tcp_fastopen:true, has_linux_tcp_keepalive_sockopts:true, + has_tcp_maxrtms:true, }, }; @@ -312,6 +320,7 @@ wincaps wincap_10_1803 __attribute__((section (".cygwin_dll_common"), shared)) = has_extended_mem_api:true, has_tcp_fastopen:true, has_linux_tcp_keepalive_sockopts:true, + has_tcp_maxrtms:true, }, }; @@ -345,6 +354,7 @@ wincaps wincap_10_1809 __attribute__((section (".cygwin_dll_common"), shared)) = has_extended_mem_api:true, has_tcp_fastopen:true, has_linux_tcp_keepalive_sockopts:true, + has_tcp_maxrtms:true, }, }; @@ -378,6 +388,7 @@ wincaps wincap_10_1903 __attribute__((section (".cygwin_dll_common"), shared)) = has_extended_mem_api:true, has_tcp_fastopen:true, has_linux_tcp_keepalive_sockopts:true, + has_tcp_maxrtms:true, }, }; diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h index 26c4c01ef..2f4191aa1 100644 --- a/winsup/cygwin/wincap.h +++ b/winsup/cygwin/wincap.h @@ -42,6 +42,7 @@ struct wincaps unsigned has_extended_mem_api : 1; unsigned has_tcp_fastopen : 1; unsigned has_linux_tcp_keepalive_sockopts : 1; + unsigned has_tcp_maxrtms : 1; }; }; @@ -107,6 +108,7 @@ public: bool IMPLEMENT (has_extended_mem_api) bool IMPLEMENT (has_tcp_fastopen) bool IMPLEMENT (has_linux_tcp_keepalive_sockopts) + bool IMPLEMENT (has_tcp_maxrtms) void disable_case_sensitive_dirs () { From ee2292413792f0360d357bc200c5e947eae516e6 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 1 Jul 2020 21:26:59 +0200 Subject: [PATCH 394/520] Cygwin: tcp: Support TCP_QUICKACK Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_socket_inet.cc | 45 +++++++++++++++++++++++++++ winsup/cygwin/include/netinet/tcp.h | 3 ++ 3 files changed, 49 insertions(+) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 24184dacc..7a28adc16 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -719,6 +719,7 @@ class fhandler_socket_inet: public fhandler_socket_wsock { private: bool oobinline; /* True if option SO_OOBINLINE is set */ + bool tcp_quickack; /* True if quickack is enabled */ bool tcp_fastopen; /* True if TCP_FASTOPEN is set on older systems */ int tcp_keepidle; /* TCP_KEEPIDLE value in secs on older systems */ int tcp_keepcnt; /* TCP_KEEPCNT value on older systems */ diff --git a/winsup/cygwin/fhandler_socket_inet.cc b/winsup/cygwin/fhandler_socket_inet.cc index 6b6b63d83..74c415d60 100644 --- a/winsup/cygwin/fhandler_socket_inet.cc +++ b/winsup/cygwin/fhandler_socket_inet.cc @@ -693,6 +693,7 @@ fhandler_socket_wsock::set_socket_handle (SOCKET sock, int af, int type, fhandler_socket_inet::fhandler_socket_inet () : fhandler_socket_wsock (), oobinline (false), + tcp_quickack (false), tcp_fastopen (false), tcp_keepidle (7200), /* WinSock default */ tcp_keepcnt (10), /* WinSock default */ @@ -1579,6 +1580,10 @@ fhandler_socket_wsock::writev (const struct iovec *const iov, const int iovcnt, #define TCP_MAXRT 5 /* Older systems don't support TCP_MAXRTMS TCP_MAXRT takes secs, not msecs. */ +#ifndef SIO_TCP_SET_ACK_FREQUENCY +#define SIO_TCP_SET_ACK_FREQUENCY _WSAIOW(IOC_VENDOR,23) +#endif + #define MAX_TCP_KEEPIDLE 32767 #define MAX_TCP_KEEPCNT 255 #define MAX_TCP_KEEPINTVL 32767 @@ -1767,6 +1772,41 @@ fhandler_socket_inet::setsockopt (int level, int optname, const void *optval, ignore = true; break; + case TCP_QUICKACK: + /* Various sources on the net claim that TCP_QUICKACK is supported + by Windows, even using the same optname value of 12. However, + the ws2ipdef.h header calls this option TCP_CONGESTION_ALGORITHM + and there's no official statement, nor official documentation + confirming or denying this option is equivalent to Linux' + TCP_QUICKACK. Also, weirdly, this option takes values from 0..7. + + There is another undocumented option to WSAIoctl called + SIO_TCP_SET_ACK_FREQUENCY which is already used by some + projects, so we're going to use it here, too, for now. + + There's an open issue in the dotnet github, + https://github.com/dotnet/runtime/issues/798 + Hopefully this clarifies the situation in the not too distant + future... */ + { + DWORD dummy; + /* https://stackoverflow.com/questions/55034112/c-disable-delayed-ack-on-windows + claims that valid values for SIO_TCP_SET_ACK_FREQUENCY are + 1..255. In contrast to that, my own testing shows that + valid values are 0 and 1 exclusively. */ + int freq = !!*(int *) optval; + if (WSAIoctl (get_socket (), SIO_TCP_SET_ACK_FREQUENCY, &freq, + sizeof freq, NULL, 0, &dummy, NULL, NULL) + == SOCKET_ERROR) + { + set_winsock_errno (); + return -1; + } + ignore = true; + tcp_quickack = freq ? true : false; + } + break; + case TCP_MAXRT: /* Don't let this option slip through from user space. */ set_errno (EOPNOTSUPP); @@ -1983,6 +2023,11 @@ fhandler_socket_inet::getsockopt (int level, int optname, const void *optval, switch (optname) { + case TCP_QUICKACK: + *(int *) optval = tcp_quickack ? 1 : 0; + *optlen = sizeof (int); + return 0; + case TCP_MAXRT: /* Don't let this option slip through from user space. */ set_errno (EOPNOTSUPP); diff --git a/winsup/cygwin/include/netinet/tcp.h b/winsup/cygwin/include/netinet/tcp.h index 8ccb0dfaa..7e4f5bbd6 100644 --- a/winsup/cygwin/include/netinet/tcp.h +++ b/winsup/cygwin/include/netinet/tcp.h @@ -126,6 +126,9 @@ struct tcphdr { #define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ #define TCP_KEEPIDLE 0x03 /* start keepalives after this period */ #define TCP_MAXSEG 0x04 /* get maximum segment size (r/o on windows) */ +#define TCP_QUICKACK 0x0c /* block/reenable quick acks + (TCP_CONGESTION_ALGORITHM in ws2ipdef.h, + valid vals 0 - 7, unclear if equivalent) */ #define TCP_USER_TIMEOUT 0x0e /* how long for loss retry before timeout, like WinSock TCP_MAXRTMS/TCP_MAXRT */ #define TCP_FASTOPEN 0x0f /* enable FastOpen on listeners */ From 5266248285bb3d2d012abd8a73957a0368f252ff Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 1 Jul 2020 21:33:15 +0200 Subject: [PATCH 395/520] Cygwin: add new IPPROTO_TCP options to release notes Signed-off-by: Corinna Vinschen --- winsup/cygwin/release/3.1.6 | 11 +++++++++++ winsup/doc/new-features.xml | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 winsup/cygwin/release/3.1.6 diff --git a/winsup/cygwin/release/3.1.6 b/winsup/cygwin/release/3.1.6 new file mode 100644 index 000000000..d64ee4c92 --- /dev/null +++ b/winsup/cygwin/release/3.1.6 @@ -0,0 +1,11 @@ +What changed: +------------- + +- Support more IPPROTO_TCP socket options: TCP_FASTOPEN, TCP_KEEPIDLE, + TCP_KEEPCNT, TCP_KEEPINTVL, TCP_QUICKACK, TCP_USER_TIMEOUT. + + +Bug Fixes: +---------- + +- Fix IPPROTO_TCP option handling, especially in terms of TCP_MAXSEG. diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml index 32479de5d..ca64b7a6f 100644 --- a/winsup/doc/new-features.xml +++ b/winsup/doc/new-features.xml @@ -90,6 +90,11 @@ Support WSL symlinks. Create those by default now. FIFOs can now be opened multiple times for reading. + +Support more IPPROTO_TCP socket options: TCP_FASTOPEN, TCP_KEEPIDLE, +TCP_KEEPCNT, TCP_KEEPINTVL, TCP_QUICKACK, TCP_USER_TIMEOUT. + + From 70cd4cbe651388897539fe38d2610e9bb733c5a8 Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov Date: Wed, 3 Jun 2020 19:14:22 +0300 Subject: [PATCH 396/520] pru: Fix memory corruption on syscall return In the initial code I missed one level of pointer indirection. Instead of storing errno in impure_data, _impure_ptr was corrupted. Only simulator is impacted. Real targets have no OS and no syscalls. This resolves a bunch of stdio cases from the GCC testsuite: FAIL->PASS: gcc.c-torture/execute/printf-2.c -O0 execution test Signed-off-by: Dimitar Dimitrov --- libgloss/pru/syscalls.S | 1 + 1 file changed, 1 insertion(+) diff --git a/libgloss/pru/syscalls.S b/libgloss/pru/syscalls.S index 8ed7601a4..3ad0d9215 100644 --- a/libgloss/pru/syscalls.S +++ b/libgloss/pru/syscalls.S @@ -42,6 +42,7 @@ __SC_ret: /* Invert return code and store to errno (first int in _impure_ptr). */ rsb r14, r14, 0 ldi32 r1, _impure_ptr + lbbo r1, r1, 0, 4 sbbo r14, r1, 0, 4 /* Return -1 (for both int32_t or int64_t). */ fill r14, 8 From fd5e27d362e9e8582dd4c85e52c50742c518345d Mon Sep 17 00:00:00 2001 From: Eshan dhawan via Newlib Date: Sun, 28 Jun 2020 01:01:29 +0530 Subject: [PATCH 397/520] fenv aarch64 support Signed-off-by: Eshan dhawan --- newlib/libc/machine/aarch64/machine/fenv-fp.h | 156 ++++++++++++++++++ newlib/libc/machine/aarch64/sys/fenv.h | 120 ++++++++++++++ newlib/libm/machine/aarch64/Makefile.am | 14 +- newlib/libm/machine/aarch64/Makefile.in | 94 ++++++++++- newlib/libm/machine/aarch64/feclearexcept.c | 7 + newlib/libm/machine/aarch64/fegetenv.c | 7 + newlib/libm/machine/aarch64/fegetexceptflag.c | 7 + newlib/libm/machine/aarch64/fegetround.c | 7 + newlib/libm/machine/aarch64/feholdexcept.c | 7 + newlib/libm/machine/aarch64/fenv.c | 57 +++++++ newlib/libm/machine/aarch64/feraiseexcept.c | 7 + newlib/libm/machine/aarch64/fesetenv.c | 7 + newlib/libm/machine/aarch64/fesetexceptflag.c | 7 + newlib/libm/machine/aarch64/fesetround.c | 7 + newlib/libm/machine/aarch64/fetestexcept.c | 7 + newlib/libm/machine/aarch64/feupdateenv.c | 7 + 16 files changed, 515 insertions(+), 3 deletions(-) create mode 100644 newlib/libc/machine/aarch64/machine/fenv-fp.h create mode 100644 newlib/libc/machine/aarch64/sys/fenv.h create mode 100644 newlib/libm/machine/aarch64/feclearexcept.c create mode 100644 newlib/libm/machine/aarch64/fegetenv.c create mode 100644 newlib/libm/machine/aarch64/fegetexceptflag.c create mode 100644 newlib/libm/machine/aarch64/fegetround.c create mode 100644 newlib/libm/machine/aarch64/feholdexcept.c create mode 100644 newlib/libm/machine/aarch64/fenv.c create mode 100644 newlib/libm/machine/aarch64/feraiseexcept.c create mode 100644 newlib/libm/machine/aarch64/fesetenv.c create mode 100644 newlib/libm/machine/aarch64/fesetexceptflag.c create mode 100644 newlib/libm/machine/aarch64/fesetround.c create mode 100644 newlib/libm/machine/aarch64/fetestexcept.c create mode 100644 newlib/libm/machine/aarch64/feupdateenv.c diff --git a/newlib/libc/machine/aarch64/machine/fenv-fp.h b/newlib/libc/machine/aarch64/machine/fenv-fp.h new file mode 100644 index 000000000..d8ec3fc76 --- /dev/null +++ b/newlib/libc/machine/aarch64/machine/fenv-fp.h @@ -0,0 +1,156 @@ +/*- + * Copyright (c) 2004-2005 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + + +__fenv_static __inline int +feclearexcept(int __excepts) +{ + fexcept_t __r; + + __mrs_fpsr(__r); + __r &= ~__excepts; + __msr_fpsr(__r); + return (0); +} + +__fenv_static inline int +fegetexceptflag(fexcept_t *__flagp, int __excepts) +{ + fexcept_t __r; + + __mrs_fpsr(__r); + *__flagp = __r & __excepts; + return (0); +} + +__fenv_static inline int +fesetexceptflag(const fexcept_t *__flagp, int __excepts) +{ + fexcept_t __r; + + __mrs_fpsr(__r); + __r &= ~__excepts; + __r |= *__flagp & __excepts; + __msr_fpsr(__r); + return (0); +} + +__fenv_static inline int +feraiseexcept(int __excepts) +{ + fexcept_t __r; + + __mrs_fpsr(__r); + __r |= __excepts; + __msr_fpsr(__r); + return (0); +} + +__fenv_static inline int +fetestexcept(int __excepts) +{ + fexcept_t __r; + + __mrs_fpsr(__r); + return (__r & __excepts); +} + +__fenv_static inline int +fegetround(void) +{ + fenv_t __r; + + __mrs_fpcr(__r); + return ((__r >> _ROUND_SHIFT) & _ROUND_MASK); +} + +__fenv_static inline int +fesetround(int __round) +{ + fenv_t __r; + + if (__round & ~_ROUND_MASK) + return (-1); + __mrs_fpcr(__r); + __r &= ~(_ROUND_MASK << _ROUND_SHIFT); + __r |= __round << _ROUND_SHIFT; + __msr_fpcr(__r); + return (0); +} + +__fenv_static inline int +fegetenv(fenv_t *__envp) +{ + fenv_t __r; + + __mrs_fpcr(__r); + *__envp = __r & _ENABLE_MASK; + + __mrs_fpsr(__r); + *__envp |= __r & (FE_ALL_EXCEPT | (_ROUND_MASK << _ROUND_SHIFT)); + + return (0); +} + +__fenv_static inline int +feholdexcept(fenv_t *__envp) +{ + fenv_t __r; + + __mrs_fpcr(__r); + *__envp = __r & _ENABLE_MASK; + __r &= ~(_ENABLE_MASK); + __msr_fpcr(__r); + + __mrs_fpsr(__r); + *__envp |= __r & (FE_ALL_EXCEPT | (_ROUND_MASK << _ROUND_SHIFT)); + __r &= ~(_ENABLE_MASK); + __msr_fpsr(__r); + return (0); +} + +__fenv_static inline int +fesetenv(const fenv_t *__envp) +{ + + __msr_fpcr((*__envp) & _ENABLE_MASK); + __msr_fpsr((*__envp) & (FE_ALL_EXCEPT | (_ROUND_MASK << _ROUND_SHIFT))); + return (0); +} + +__fenv_static inline int +feupdateenv(const fenv_t *__envp) +{ + fexcept_t __r; + + __mrs_fpsr(__r); + fesetenv(__envp); + feraiseexcept(__r & FE_ALL_EXCEPT); + return (0); +} + diff --git a/newlib/libc/machine/aarch64/sys/fenv.h b/newlib/libc/machine/aarch64/sys/fenv.h new file mode 100644 index 000000000..6b0879269 --- /dev/null +++ b/newlib/libc/machine/aarch64/sys/fenv.h @@ -0,0 +1,120 @@ +/*- + * Copyright (c) 2004-2005 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _FENV_H_ +#define _FENV_H_ + +#include + +#ifndef __fenv_static +#define __fenv_static static +#endif + +typedef __uint64_t fenv_t; +typedef __uint64_t fexcept_t; + +/* Exception flags */ +#define FE_INVALID 0x00000001 +#define FE_DIVBYZERO 0x00000002 +#define FE_OVERFLOW 0x00000004 +#define FE_UNDERFLOW 0x00000008 +#define FE_INEXACT 0x00000010 +#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | \ + FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW) + +/* + * Rounding modes + * + * We can't just use the hardware bit values here, because that would + * make FE_UPWARD and FE_DOWNWARD negative, which is not allowed. + */ +#define FE_TONEAREST 0x0 +#define FE_UPWARD 0x1 +#define FE_DOWNWARD 0x2 +#define FE_TOWARDZERO 0x3 +#define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \ + FE_UPWARD | FE_TOWARDZERO) +#define _ROUND_SHIFT 22 + + + +/* Default floating-point environment */ +extern const fenv_t *_fe_dfl_env; +#define FE_DFL_ENV _fe_dfl_env + +/* We need to be able to map status flag positions to mask flag positions */ +#define _FPUSW_SHIFT 8 +#define _ENABLE_MASK (FE_ALL_EXCEPT << _FPUSW_SHIFT) + +#define __mrs_fpcr(__r) __asm __volatile("mrs %0, fpcr" : "=r" (__r)) +#define __msr_fpcr(__r) __asm __volatile("msr fpcr, %0" : : "r" (__r)) + +#define __mrs_fpsr(__r) __asm __volatile("mrs %0, fpsr" : "=r" (__r)) +#define __msr_fpsr(__r) __asm __volatile("msr fpsr, %0" : : "r" (__r)) + + +#if __BSD_VISIBLE + +/* We currently provide no external definitions of the functions below. */ + +static inline int +feenableexcept(int __mask) +{ + fenv_t __old_r, __new_r; + + __mrs_fpcr(__old_r); + __new_r = __old_r | ((__mask & FE_ALL_EXCEPT) << _FPUSW_SHIFT); + __msr_fpcr(__new_r); + return ((__old_r >> _FPUSW_SHIFT) & FE_ALL_EXCEPT); +} + +static inline int +fedisableexcept(int __mask) +{ + fenv_t __old_r, __new_r; + + __mrs_fpcr(__old_r); + __new_r = __old_r & ~((__mask & FE_ALL_EXCEPT) << _FPUSW_SHIFT); + __msr_fpcr(__new_r); + return ((__old_r >> _FPUSW_SHIFT) & FE_ALL_EXCEPT); +} + +static inline int +fegetexcept(void) +{ + fenv_t __r; + + __mrs_fpcr(__r); + return ((__r & _ENABLE_MASK) >> _FPUSW_SHIFT); +} + +#endif /* __BSD_VISIBLE */ + + + +#endif /* !_FENV_H_ */ diff --git a/newlib/libm/machine/aarch64/Makefile.am b/newlib/libm/machine/aarch64/Makefile.am index 752f65dd1..1025bc420 100644 --- a/newlib/libm/machine/aarch64/Makefile.am +++ b/newlib/libm/machine/aarch64/Makefile.am @@ -35,7 +35,19 @@ LIB_SOURCES = \ sf_nearbyint.c \ sf_rint.c \ sf_round.c \ - sf_trunc.c + sf_trunc.c \ + fenv.c \ + feclearexcept.c \ + fegetenv.c \ + fegetexceptflag.c \ + fegetround.c \ + feholdexcept.c \ + feraiseexcept.c \ + fesetenv.c \ + fesetexceptflag.c \ + fesetround.c \ + fetestexcept.c \ + feupdateenv.c noinst_LIBRARIES = lib.a lib_a_SOURCES = $(LIB_SOURCES) diff --git a/newlib/libm/machine/aarch64/Makefile.in b/newlib/libm/machine/aarch64/Makefile.in index d31237e0f..8900c4b39 100644 --- a/newlib/libm/machine/aarch64/Makefile.in +++ b/newlib/libm/machine/aarch64/Makefile.in @@ -84,7 +84,13 @@ am__objects_1 = lib_a-e_sqrt.$(OBJEXT) lib_a-ef_sqrt.$(OBJEXT) \ lib_a-sf_llrint.$(OBJEXT) lib_a-sf_llround.$(OBJEXT) \ lib_a-sf_lrint.$(OBJEXT) lib_a-sf_lround.$(OBJEXT) \ lib_a-sf_nearbyint.$(OBJEXT) lib_a-sf_rint.$(OBJEXT) \ - lib_a-sf_round.$(OBJEXT) lib_a-sf_trunc.$(OBJEXT) + lib_a-sf_round.$(OBJEXT) lib_a-sf_trunc.$(OBJEXT) \ + lib_a-fenv.$(OBJEXT) lib_a-feclearexcept.$(OBJEXT) \ + lib_a-fegetenv.$(OBJEXT) lib_a-fegetexceptflag.$(OBJEXT) \ + lib_a-fegetround.$(OBJEXT) lib_a-feholdexcept.$(OBJEXT) \ + lib_a-feraiseexcept.$(OBJEXT) lib_a-fesetenv.$(OBJEXT) \ + lib_a-fesetexceptflag.$(OBJEXT) lib_a-fesetround.$(OBJEXT) \ + lib_a-fetestexcept.$(OBJEXT) lib_a-feupdateenv.$(OBJEXT) am_lib_a_OBJECTS = $(am__objects_1) lib_a_OBJECTS = $(am_lib_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ @@ -240,7 +246,19 @@ LIB_SOURCES = \ sf_nearbyint.c \ sf_rint.c \ sf_round.c \ - sf_trunc.c + sf_trunc.c \ + fenv.c \ + feclearexcept.c \ + fegetenv.c \ + fegetexceptflag.c \ + fegetround.c \ + feholdexcept.c \ + feraiseexcept.c \ + fesetenv.c \ + fesetexceptflag.c \ + fesetround.c \ + fetestexcept.c \ + feupdateenv.c noinst_LIBRARIES = lib.a lib_a_SOURCES = $(LIB_SOURCES) @@ -498,6 +516,78 @@ lib_a-sf_trunc.o: sf_trunc.c lib_a-sf_trunc.obj: sf_trunc.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_trunc.obj `if test -f 'sf_trunc.c'; then $(CYGPATH_W) 'sf_trunc.c'; else $(CYGPATH_W) '$(srcdir)/sf_trunc.c'; fi` +lib_a-fenv.o: fenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.o `test -f 'fenv.c' || echo '$(srcdir)/'`fenv.c + +lib_a-fenv.obj: fenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.obj `if test -f 'fenv.c'; then $(CYGPATH_W) 'fenv.c'; else $(CYGPATH_W) '$(srcdir)/fenv.c'; fi` + +lib_a-feclearexcept.o: feclearexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feclearexcept.o `test -f 'feclearexcept.c' || echo '$(srcdir)/'`feclearexcept.c + +lib_a-feclearexcept.obj: feclearexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feclearexcept.obj `if test -f 'feclearexcept.c'; then $(CYGPATH_W) 'feclearexcept.c'; else $(CYGPATH_W) '$(srcdir)/feclearexcept.c'; fi` + +lib_a-fegetenv.o: fegetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetenv.o `test -f 'fegetenv.c' || echo '$(srcdir)/'`fegetenv.c + +lib_a-fegetenv.obj: fegetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetenv.obj `if test -f 'fegetenv.c'; then $(CYGPATH_W) 'fegetenv.c'; else $(CYGPATH_W) '$(srcdir)/fegetenv.c'; fi` + +lib_a-fegetexceptflag.o: fegetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexceptflag.o `test -f 'fegetexceptflag.c' || echo '$(srcdir)/'`fegetexceptflag.c + +lib_a-fegetexceptflag.obj: fegetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexceptflag.obj `if test -f 'fegetexceptflag.c'; then $(CYGPATH_W) 'fegetexceptflag.c'; else $(CYGPATH_W) '$(srcdir)/fegetexceptflag.c'; fi` + +lib_a-fegetround.o: fegetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetround.o `test -f 'fegetround.c' || echo '$(srcdir)/'`fegetround.c + +lib_a-fegetround.obj: fegetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetround.obj `if test -f 'fegetround.c'; then $(CYGPATH_W) 'fegetround.c'; else $(CYGPATH_W) '$(srcdir)/fegetround.c'; fi` + +lib_a-feholdexcept.o: feholdexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.o `test -f 'feholdexcept.c' || echo '$(srcdir)/'`feholdexcept.c + +lib_a-feholdexcept.obj: feholdexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.obj `if test -f 'feholdexcept.c'; then $(CYGPATH_W) 'feholdexcept.c'; else $(CYGPATH_W) '$(srcdir)/feholdexcept.c'; fi` + +lib_a-feraiseexcept.o: feraiseexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feraiseexcept.o `test -f 'feraiseexcept.c' || echo '$(srcdir)/'`feraiseexcept.c + +lib_a-feraiseexcept.obj: feraiseexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feraiseexcept.obj `if test -f 'feraiseexcept.c'; then $(CYGPATH_W) 'feraiseexcept.c'; else $(CYGPATH_W) '$(srcdir)/feraiseexcept.c'; fi` + +lib_a-fesetenv.o: fesetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetenv.o `test -f 'fesetenv.c' || echo '$(srcdir)/'`fesetenv.c + +lib_a-fesetenv.obj: fesetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetenv.obj `if test -f 'fesetenv.c'; then $(CYGPATH_W) 'fesetenv.c'; else $(CYGPATH_W) '$(srcdir)/fesetenv.c'; fi` + +lib_a-fesetexceptflag.o: fesetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetexceptflag.o `test -f 'fesetexceptflag.c' || echo '$(srcdir)/'`fesetexceptflag.c + +lib_a-fesetexceptflag.obj: fesetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetexceptflag.obj `if test -f 'fesetexceptflag.c'; then $(CYGPATH_W) 'fesetexceptflag.c'; else $(CYGPATH_W) '$(srcdir)/fesetexceptflag.c'; fi` + +lib_a-fesetround.o: fesetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetround.o `test -f 'fesetround.c' || echo '$(srcdir)/'`fesetround.c + +lib_a-fesetround.obj: fesetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetround.obj `if test -f 'fesetround.c'; then $(CYGPATH_W) 'fesetround.c'; else $(CYGPATH_W) '$(srcdir)/fesetround.c'; fi` + +lib_a-fetestexcept.o: fetestexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fetestexcept.o `test -f 'fetestexcept.c' || echo '$(srcdir)/'`fetestexcept.c + +lib_a-fetestexcept.obj: fetestexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fetestexcept.obj `if test -f 'fetestexcept.c'; then $(CYGPATH_W) 'fetestexcept.c'; else $(CYGPATH_W) '$(srcdir)/fetestexcept.c'; fi` + +lib_a-feupdateenv.o: feupdateenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.o `test -f 'feupdateenv.c' || echo '$(srcdir)/'`feupdateenv.c + +lib_a-feupdateenv.obj: feupdateenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.obj `if test -f 'feupdateenv.c'; then $(CYGPATH_W) 'feupdateenv.c'; else $(CYGPATH_W) '$(srcdir)/feupdateenv.c'; fi` + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ diff --git a/newlib/libm/machine/aarch64/feclearexcept.c b/newlib/libm/machine/aarch64/feclearexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/aarch64/feclearexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/aarch64/fegetenv.c b/newlib/libm/machine/aarch64/fegetenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/aarch64/fegetenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/aarch64/fegetexceptflag.c b/newlib/libm/machine/aarch64/fegetexceptflag.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/aarch64/fegetexceptflag.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/aarch64/fegetround.c b/newlib/libm/machine/aarch64/fegetround.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/aarch64/fegetround.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/aarch64/feholdexcept.c b/newlib/libm/machine/aarch64/feholdexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/aarch64/feholdexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/aarch64/fenv.c b/newlib/libm/machine/aarch64/fenv.c new file mode 100644 index 000000000..3ffe23441 --- /dev/null +++ b/newlib/libm/machine/aarch64/fenv.c @@ -0,0 +1,57 @@ +/*- + * Copyright (c) 2004 David Schultz + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#define __fenv_static +#include +#include + +/* + * Hopefully the system ID byte is immutable, so it's valid to use + * this as a default environment. + */ + + +#ifdef __GNUC_GNU_INLINE__ +#error "This file must be compiled with C99 'inline' semantics" +#endif + +extern inline int feclearexcept(int __excepts); +extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); +extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts); +extern inline int feraiseexcept(int __excepts); +extern inline int fetestexcept(int __excepts); +extern inline int fegetround(void); +extern inline int fesetround(int __round); +extern inline int fegetenv(fenv_t *__envp); +extern inline int feholdexcept(fenv_t *__envp); +extern inline int fesetenv(const fenv_t *__envp); +extern inline int feupdateenv(const fenv_t *__envp); +extern inline int feenableexcept(int __mask); +extern inline int fedisableexcept(int __mask); +extern inline int fegetexcept(void); diff --git a/newlib/libm/machine/aarch64/feraiseexcept.c b/newlib/libm/machine/aarch64/feraiseexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/aarch64/feraiseexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/aarch64/fesetenv.c b/newlib/libm/machine/aarch64/fesetenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/aarch64/fesetenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/aarch64/fesetexceptflag.c b/newlib/libm/machine/aarch64/fesetexceptflag.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/aarch64/fesetexceptflag.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/aarch64/fesetround.c b/newlib/libm/machine/aarch64/fesetround.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/aarch64/fesetround.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/aarch64/fetestexcept.c b/newlib/libm/machine/aarch64/fetestexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/aarch64/fetestexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/aarch64/feupdateenv.c b/newlib/libm/machine/aarch64/feupdateenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/aarch64/feupdateenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" From 03bf9f431c1a2b6244dfa6f5ac4ec59ef1913709 Mon Sep 17 00:00:00 2001 From: Eshan dhawan via Newlib Date: Fri, 3 Jul 2020 02:43:05 +0530 Subject: [PATCH 398/520] SPARC fenv support Signed-off-by: Eshan dhawan --- newlib/configure.host | 1 + newlib/libc/machine/sparc/sys/fenv.h | 85 +++++ newlib/libm/machine/configure.in | 1 + newlib/libm/machine/sparc/Makefile.am | 21 ++ newlib/libm/machine/sparc/configure.in | 11 + newlib/libm/machine/sparc/feclearexcept.c | 7 + newlib/libm/machine/sparc/fegetenv.c | 7 + newlib/libm/machine/sparc/fegetexceptflag.c | 7 + newlib/libm/machine/sparc/fegetround.c | 7 + newlib/libm/machine/sparc/feholdexcept.c | 7 + newlib/libm/machine/sparc/fenv.c | 350 ++++++++++++++++++++ newlib/libm/machine/sparc/feraiseexcept.c | 7 + newlib/libm/machine/sparc/fesetenv.c | 7 + newlib/libm/machine/sparc/fesetexceptflag.c | 7 + newlib/libm/machine/sparc/fesetround.c | 7 + newlib/libm/machine/sparc/fetestexcept.c | 7 + newlib/libm/machine/sparc/feupdateenv.c | 7 + 17 files changed, 546 insertions(+) create mode 100644 newlib/libc/machine/sparc/sys/fenv.h create mode 100644 newlib/libm/machine/sparc/Makefile.am create mode 100644 newlib/libm/machine/sparc/configure.in create mode 100644 newlib/libm/machine/sparc/feclearexcept.c create mode 100644 newlib/libm/machine/sparc/fegetenv.c create mode 100644 newlib/libm/machine/sparc/fegetexceptflag.c create mode 100644 newlib/libm/machine/sparc/fegetround.c create mode 100644 newlib/libm/machine/sparc/feholdexcept.c create mode 100644 newlib/libm/machine/sparc/fenv.c create mode 100644 newlib/libm/machine/sparc/feraiseexcept.c create mode 100644 newlib/libm/machine/sparc/fesetenv.c create mode 100644 newlib/libm/machine/sparc/fesetexceptflag.c create mode 100644 newlib/libm/machine/sparc/fesetround.c create mode 100644 newlib/libm/machine/sparc/fetestexcept.c create mode 100644 newlib/libm/machine/sparc/feupdateenv.c diff --git a/newlib/configure.host b/newlib/configure.host index 9d2166f3d..29e47858d 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -322,6 +322,7 @@ case "${host_cpu}" in machine_dir=sh ;; sparc*) + libm_machine_dir=sparc machine_dir=sparc # FIXME: Might wish to make MALLOC_ALIGNMENT more generic. newlib_cflags="${newlib_cflags} -DMALLOC_ALIGNMENT=8" diff --git a/newlib/libc/machine/sparc/sys/fenv.h b/newlib/libc/machine/sparc/sys/fenv.h new file mode 100644 index 000000000..0d8fb13ea --- /dev/null +++ b/newlib/libc/machine/sparc/sys/fenv.h @@ -0,0 +1,85 @@ +/* $NetBSD: fenv.h,v 1.2 2017/01/14 12:00:13 martin Exp $ */ + +/*- + * Copyright (c) 2004-2005 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_FENV_H_ +#define _SYS_FENV_H_ + +#include + +#ifdef __arch64__ +typedef uint64_t fenv_t; +typedef uint64_t fexcept_t; +#else +typedef uint32_t fenv_t; +typedef uint32_t fexcept_t; +#endif + +/* + * Exception flags + * + * Symbols are defined in such a way, to correspond to the accrued + * exception bits (aexc) fields of FSR. + */ +#define FE_INEXACT 0x00000020 /* 0000100000 */ +#define FE_DIVBYZERO 0x00000040 /* 0001000000 */ +#define FE_UNDERFLOW 0x00000080 /* 0010000000 */ +#define FE_OVERFLOW 0x00000100 /* 0100000000 */ +#define FE_INVALID 0x00000200 /* 1000000000 */ + +#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | \ + FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW) + +/* + * Rounding modes + * + * We can't just use the hardware bit values here, because that would + * make FE_UPWARD and FE_DOWNWARD negative, which is not allowed. + */ +#define FE_TONEAREST 0 /* round to nearest representable number */ +#define FE_TOWARDZERO 1 /* round to zero (truncate) */ +#define FE_UPWARD 2 /* round toward positive infinity */ +#define FE_DOWNWARD 3 /* round toward negative infinity */ +#define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \ + FE_UPWARD | FE_TOWARDZERO) +#define _ROUND_SHIFT 30 + + + +/* Default floating-point environment */ +extern const fenv_t *_fe_dfl_env; +#define FE_DFL_ENV _fe_dfl_env + +/* We need to be able to map status flag positions to mask flag positions */ +#define _FPUSW_SHIFT 18 +#define _ENABLE_MASK (FE_ALL_EXCEPT << _FPUSW_SHIFT) + + + +#endif /* !_SYS_FENV_H_ */ diff --git a/newlib/libm/machine/configure.in b/newlib/libm/machine/configure.in index 01d3d9f66..343f83855 100644 --- a/newlib/libm/machine/configure.in +++ b/newlib/libm/machine/configure.in @@ -34,6 +34,7 @@ if test -n "${libm_machine_dir}"; then riscv) AC_CONFIG_SUBDIRS(riscv) ;; x86_64) AC_CONFIG_SUBDIRS(x86_64) ;; powerpc) AC_CONFIG_SUBDIRS(powerpc) ;; + sparc) AC_CONFIG_SUBDIRS(sparc) ;; esac; if test "${use_libtool}" = "yes"; then machlib=${libm_machine_dir}/lib${libm_machine_dir}.${aext} diff --git a/newlib/libm/machine/sparc/Makefile.am b/newlib/libm/machine/sparc/Makefile.am new file mode 100644 index 000000000..34157760b --- /dev/null +++ b/newlib/libm/machine/sparc/Makefile.am @@ -0,0 +1,21 @@ +## Process this file with automake to generate Makefile.in + +INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \ + $(CROSS_CFLAGS) $(TARGET_CFLAGS) + +LIB_SOURCES = \ + feclearexcept.c fegetenv.c fegetexceptflag.c \ + fegetround.c feholdexcept.c feraiseexcept.c fesetenv.c \ + fesetexceptflag.c fesetround.c fetestexcept.c feupdateenv.c \ + fenv.c + +noinst_LIBRARIES = lib.a +lib_a_SOURCES = $(LIB_SOURCES) +lib_a_CFLAGS = $(AM_CFLAGS) +lib_a_CCASFLAGS = $(AM_CCASFLAGS) +noinst_DATA = + +include $(srcdir)/../../../Makefile.shared + +ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. +CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host diff --git a/newlib/libm/machine/sparc/configure.in b/newlib/libm/machine/sparc/configure.in new file mode 100644 index 000000000..7a22fa31c --- /dev/null +++ b/newlib/libm/machine/sparc/configure.in @@ -0,0 +1,11 @@ + +AC_PREREQ(2.59) +AC_INIT([newlib],[NEWLIB_VERSION]) +AC_CONFIG_SRCDIR([Makefile.am]) + +AC_CONFIG_AUX_DIR(../../../..) + +NEWLIB_CONFIGURE(../../..) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/newlib/libm/machine/sparc/feclearexcept.c b/newlib/libm/machine/sparc/feclearexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/sparc/feclearexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/sparc/fegetenv.c b/newlib/libm/machine/sparc/fegetenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/sparc/fegetenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/sparc/fegetexceptflag.c b/newlib/libm/machine/sparc/fegetexceptflag.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/sparc/fegetexceptflag.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/sparc/fegetround.c b/newlib/libm/machine/sparc/fegetround.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/sparc/fegetround.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/sparc/feholdexcept.c b/newlib/libm/machine/sparc/feholdexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/sparc/feholdexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/sparc/fenv.c b/newlib/libm/machine/sparc/fenv.c new file mode 100644 index 000000000..127898021 --- /dev/null +++ b/newlib/libm/machine/sparc/fenv.c @@ -0,0 +1,350 @@ +/* $NetBSD: fenv.c,v 1.2 2017/03/22 23:11:09 chs Exp $ */ + +/*- + * Copyright (c) 2004-2005 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + */ +#include +__RCSID("$NetBSD: fenv.c,v 1.2 2017/03/22 23:11:09 chs Exp $"); + + + +#include +#include + +#define _DIAGASSERT(x) assert(x) + +#ifdef __weak_alias +__weak_alias(feclearexcept,_feclearexcept) +__weak_alias(fedisableexcept,_fedisableexcept) +__weak_alias(feenableexcept,_feenableexcept) +__weak_alias(fegetenv,_fegetenv) +__weak_alias(fegetexcept,_fegetexcept) +__weak_alias(fegetexceptflag,_fegetexceptflag) +__weak_alias(fegetround,_fegetround) +__weak_alias(feholdexcept,_feholdexcept) +__weak_alias(feraiseexcept,_feraiseexcept) +__weak_alias(fesetenv,_fesetenv) +__weak_alias(fesetexceptflag,_fesetexceptflag) +__weak_alias(fesetround,_fesetround) +__weak_alias(fetestexcept,_fetestexcept) +__weak_alias(feupdateenv,_feupdateenv) +#endif + +/* Load floating-point state register (32bits) */ +#define __ldfsr(__r) __asm__ __volatile__ \ + ("ld %0, %%fsr" : : "m" (__r)) + +/* Save floating-point state register (32bits) */ +#define __stfsr(__r) __asm__ __volatile__ \ + ("st %%fsr, %0" : "=m" (*(__r))) + +/* + * The feclearexcept() function clears the supported floating-point exceptions + * represented by `excepts'. + */ +int +feclearexcept(int excepts) +{ + fexcept_t r; + int ex; + + _DIAGASSERT((excepts & ~FE_ALL_EXCEPT) == 0); + + ex = excepts & FE_ALL_EXCEPT; + + __stfsr(&r); + r &= ~ex; + __ldfsr(r); + + /* Success */ + return 0; +} + +/* + * The fegetexceptflag() function stores an implementation-defined + * representation of the states of the floating-point status flags indicated + * by the argument excepts in the object pointed to by the argument flagp. + */ +int +fegetexceptflag(fexcept_t *flagp, int excepts) +{ + fexcept_t r; + int ex; + + _DIAGASSERT(flagp != NULL); + _DIAGASSERT((excepts & ~FE_ALL_EXCEPT) == 0); + + ex = excepts & FE_ALL_EXCEPT; + + __stfsr(&r); + *flagp = r & ex; + + /* Success */ + return 0; +} + + +/* + * This function sets the floating-point status flags indicated by the argument + * `excepts' to the states stored in the object pointed to by `flagp'. It does + * NOT raise any floating-point exceptions, but only sets the state of the flags. + */ +int +fesetexceptflag(const fexcept_t *flagp, int excepts) +{ + fexcept_t r; + int ex; + + _DIAGASSERT(flagp != NULL); + _DIAGASSERT((excepts & ~FE_ALL_EXCEPT) == 0); + + ex = excepts & FE_ALL_EXCEPT; + + __stfsr(&r); + r &= ~ex; + r |= *flagp & ex; + __ldfsr(r); + + /* Success */ + return 0; +} + +/* + * The feraiseexcept() function raises the supported floating-point exceptions + * represented by the argument `excepts'. + * + * The order in which these floating-point exceptions are raised is unspecified + * (by the standard). + */ +int +feraiseexcept(int excepts) +{ + volatile double d; + int ex; + + _DIAGASSERT((excepts & ~FE_ALL_EXCEPT) == 0); + + ex = excepts & FE_ALL_EXCEPT; + + /* + * With a compiler that supports the FENV_ACCESS pragma properly, simple + * expressions like '0.0 / 0.0' should be sufficient to generate traps. + * Unfortunately, we need to bring a volatile variable into the equation + * to prevent incorrect optimizations. + */ + if (ex & FE_INVALID) { + d = 0.0; + d = 0.0 / d; + } + if (ex & FE_DIVBYZERO) { + d = 0.0; + d = 1.0 / d; + } + if (ex & FE_OVERFLOW) { + d = 0x1.ffp1023; + d *= 2.0; + } + if (ex & FE_UNDERFLOW) { + d = 0x1p-1022; + d /= 0x1p1023; + } + if (ex & FE_INEXACT) { + d = 0x1p-1022; + d += 1.0; + } + + /* Success */ + return 0; +} + +/* + * The fetestexcept() function determines which of a specified subset of the + * floating-point exception flags are currently set. The `excepts' argument + * specifies the floating-point status flags to be queried. + */ +int +fetestexcept(int excepts) +{ + fexcept_t r; + + _DIAGASSERT((excepts & ~FE_ALL_EXCEPT) == 0); + + __stfsr(&r); + + return r & (excepts & FE_ALL_EXCEPT); +} + +/* + * The fegetround() function gets the current rounding direction. + */ +int +fegetround(void) +{ + fenv_t r; + + __stfsr(&r); + + return (r >> _ROUND_SHIFT) & _ROUND_MASK; +} + +/* + * The fesetround() function establishes the rounding direction represented by + * its argument `round'. If the argument is not equal to the value of a rounding + * direction macro, the rounding direction is not changed. + */ +int +fesetround(int round) +{ + fenv_t r; + + _DIAGASSERT((round & ~_ROUND_MASK) == 0); + if (round & ~_ROUND_MASK) + return -1; + + __stfsr(&r); + r &= ~(_ROUND_MASK << _ROUND_SHIFT); + r |= round << _ROUND_SHIFT; + __ldfsr(r); + + /* Success */ + return 0; +} + +/* + * The fegetenv() function attempts to store the current floating-point + * environment in the object pointed to by envp. + */ +int +fegetenv(fenv_t *envp) +{ + _DIAGASSERT(envp != NULL); + + __stfsr(envp); + + /* Success */ + return 0; +} + + +/* + * The feholdexcept() function saves the current floating-point environment + * in the object pointed to by envp, clears the floating-point status flags, and + * then installs a non-stop (continue on floating-point exceptions) mode, if + * available, for all floating-point exceptions. + */ +int +feholdexcept(fenv_t *envp) +{ + fenv_t r; + + _DIAGASSERT(envp != NULL); + + __stfsr(&r); + *envp = r; + r &= ~(FE_ALL_EXCEPT | _ENABLE_MASK); + __ldfsr(r); + + /* Success */ + return 0; +} + +/* + * The fesetenv() function attempts to establish the floating-point environment + * represented by the object pointed to by envp. The argument `envp' points + * to an object set by a call to fegetenv() or feholdexcept(), or equal a + * floating-point environment macro. The fesetenv() function does not raise + * floating-point exceptions, but only installs the state of the floating-point + * status flags represented through its argument. + */ +int +fesetenv(const fenv_t *envp) +{ + _DIAGASSERT(envp != NULL); + + __ldfsr(*envp); + + /* Success */ + return 0; +} + + +/* + * The feupdateenv() function saves the currently raised floating-point + * exceptions in its automatic storage, installs the floating-point environment + * represented by the object pointed to by `envp', and then raises the saved + * floating-point exceptions. The argument `envp' shall point to an object set + * by a call to feholdexcept() or fegetenv(), or equal a floating-point + * environment macro. + */ +int +feupdateenv(const fenv_t *envp) +{ + fexcept_t r; + + _DIAGASSERT(envp != NULL); + + __stfsr(&r); + __ldfsr(*envp); + + _DIAGASSERT((r & ~FE_ALL_EXCEPT) == 0); + feraiseexcept(r & FE_ALL_EXCEPT); + + /* Success */ + return 0; +} + +/* + * The following functions are extentions to the standard + */ +int +feenableexcept(int mask) +{ + fenv_t old_r, new_r; + + __stfsr(&old_r); + new_r = old_r | ((mask & FE_ALL_EXCEPT) << _FPUSW_SHIFT); + __ldfsr(new_r); + + return (old_r >> _FPUSW_SHIFT) & FE_ALL_EXCEPT; +} + +int +fedisableexcept(int mask) +{ + fenv_t old_r, new_r; + + __stfsr(&old_r); + new_r = old_r & ~((mask & FE_ALL_EXCEPT) << _FPUSW_SHIFT); + __ldfsr(new_r); + + return (old_r >> _FPUSW_SHIFT) & FE_ALL_EXCEPT; +} + +int +fegetexcept(void) +{ + fenv_t r; + + __stfsr(&r); + return (r & _ENABLE_MASK) >> _FPUSW_SHIFT; +} diff --git a/newlib/libm/machine/sparc/feraiseexcept.c b/newlib/libm/machine/sparc/feraiseexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/sparc/feraiseexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/sparc/fesetenv.c b/newlib/libm/machine/sparc/fesetenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/sparc/fesetenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/sparc/fesetexceptflag.c b/newlib/libm/machine/sparc/fesetexceptflag.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/sparc/fesetexceptflag.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/sparc/fesetround.c b/newlib/libm/machine/sparc/fesetround.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/sparc/fesetround.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/sparc/fetestexcept.c b/newlib/libm/machine/sparc/fetestexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/sparc/fetestexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/sparc/feupdateenv.c b/newlib/libm/machine/sparc/feupdateenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/sparc/feupdateenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" From 65918715a071fd753f9bca1ec778fb137ca2d0fa Mon Sep 17 00:00:00 2001 From: Eshan dhawan via Newlib Date: Fri, 3 Jul 2020 02:43:06 +0530 Subject: [PATCH 399/520] mips fenv support Signed-off-by: Eshan dhawan --- newlib/configure.host | 1 + newlib/libc/machine/mips/machine/fenv-fp.h | 207 ++++++++++++++++++ .../machine/mips/machine/fenv-softfloat.h | 182 +++++++++++++++ newlib/libc/machine/mips/sys/fenv.h | 88 ++++++++ newlib/libm/machine/configure.in | 1 + newlib/libm/machine/mips/Makefile.am | 21 ++ newlib/libm/machine/mips/configure.in | 11 + newlib/libm/machine/mips/feclearexcept.c | 7 + newlib/libm/machine/mips/fegetenv.c | 7 + newlib/libm/machine/mips/fegetexceptflag.c | 7 + newlib/libm/machine/mips/fegetround.c | 7 + newlib/libm/machine/mips/feholdexcept.c | 7 + newlib/libm/machine/mips/fenv.c | 74 +++++++ newlib/libm/machine/mips/feraiseexcept.c | 7 + newlib/libm/machine/mips/fesetenv.c | 7 + newlib/libm/machine/mips/fesetexceptflag.c | 7 + newlib/libm/machine/mips/fesetround.c | 7 + newlib/libm/machine/mips/fetestexcept.c | 7 + newlib/libm/machine/mips/feupdateenv.c | 7 + 19 files changed, 662 insertions(+) create mode 100644 newlib/libc/machine/mips/machine/fenv-fp.h create mode 100644 newlib/libc/machine/mips/machine/fenv-softfloat.h create mode 100644 newlib/libc/machine/mips/sys/fenv.h create mode 100644 newlib/libm/machine/mips/Makefile.am create mode 100644 newlib/libm/machine/mips/configure.in create mode 100644 newlib/libm/machine/mips/feclearexcept.c create mode 100644 newlib/libm/machine/mips/fegetenv.c create mode 100644 newlib/libm/machine/mips/fegetexceptflag.c create mode 100644 newlib/libm/machine/mips/fegetround.c create mode 100644 newlib/libm/machine/mips/feholdexcept.c create mode 100644 newlib/libm/machine/mips/fenv.c create mode 100644 newlib/libm/machine/mips/feraiseexcept.c create mode 100644 newlib/libm/machine/mips/fesetenv.c create mode 100644 newlib/libm/machine/mips/fesetexceptflag.c create mode 100644 newlib/libm/machine/mips/fesetround.c create mode 100644 newlib/libm/machine/mips/fetestexcept.c create mode 100644 newlib/libm/machine/mips/feupdateenv.c diff --git a/newlib/configure.host b/newlib/configure.host index 29e47858d..e3dbbc7fe 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -247,6 +247,7 @@ case "${host_cpu}" in ;; mips*) machine_dir=mips + libm_machine_dir=mips ;; mmix) ;; diff --git a/newlib/libc/machine/mips/machine/fenv-fp.h b/newlib/libc/machine/mips/machine/fenv-fp.h new file mode 100644 index 000000000..5f446e395 --- /dev/null +++ b/newlib/libc/machine/mips/machine/fenv-fp.h @@ -0,0 +1,207 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2004-2005 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +__fenv_static inline int +feclearexcept(int excepts) +{ + fexcept_t fcsr; + + excepts &= FE_ALL_EXCEPT; + __cfc1(fcsr); + fcsr &= ~(excepts | (excepts << _FCSR_CAUSE_SHIFT)); + __ctc1(fcsr); + + return (0); +} + +__fenv_static inline int +fegetexceptflag(fexcept_t *flagp, int excepts) +{ + fexcept_t fcsr; + + excepts &= FE_ALL_EXCEPT; + __cfc1(fcsr); + *flagp = fcsr & excepts; + + return (0); +} + +__fenv_static inline int +fesetexceptflag(const fexcept_t *flagp, int excepts) +{ + fexcept_t fcsr; + + excepts &= FE_ALL_EXCEPT; + __cfc1(fcsr); + fcsr &= ~excepts; + fcsr |= *flagp & excepts; + __ctc1(fcsr); + + return (0); +} + +__fenv_static inline int +feraiseexcept(int excepts) +{ + fexcept_t fcsr; + + excepts &= FE_ALL_EXCEPT; + __cfc1(fcsr); + fcsr |= excepts | (excepts << _FCSR_CAUSE_SHIFT); + __ctc1(fcsr); + + return (0); +} + +__fenv_static inline int +fetestexcept(int excepts) +{ + fexcept_t fcsr; + + excepts &= FE_ALL_EXCEPT; + __cfc1(fcsr); + + return (fcsr & excepts); +} + +__fenv_static inline int +fegetround(void) +{ + fexcept_t fcsr; + + __cfc1(fcsr); + + return (fcsr & _ROUND_MASK); +} + +__fenv_static inline int +fesetround(int rounding_mode) +{ + fexcept_t fcsr; + + if (rounding_mode & ~_ROUND_MASK) + return (-1); + + __cfc1(fcsr); + fcsr &= ~_ROUND_MASK; + fcsr |= rounding_mode; + __ctc1(fcsr); + + return (0); +} + +__fenv_static inline int +fegetenv(fenv_t *envp) +{ + + __cfc1(*envp); + + return (0); +} + +__fenv_static inline int +feholdexcept(fenv_t *envp) +{ + fexcept_t fcsr; + + __cfc1(fcsr); + *envp = fcsr; + fcsr &= ~(FE_ALL_EXCEPT | _ENABLE_MASK); + __ctc1(fcsr); + + return (0); +} + +__fenv_static inline int +fesetenv(const fenv_t *envp) +{ + + __ctc1(*envp); + + return (0); +} + +__fenv_static inline int +feupdateenv(const fenv_t *envp) +{ + fexcept_t fcsr; + + __cfc1(fcsr); + fesetenv(envp); + feraiseexcept(fcsr); + + return (0); +} +#if __BSD_VISIBLE + +/* We currently provide no external definitions of the functions below. */ + +#ifdef __mips_soft_float +int feenableexcept(int __mask); +int fedisableexcept(int __mask); +int fegetexcept(void); +#else +static inline int +feenableexcept(int __mask) +{ + fenv_t __old_fcsr, __new_fcsr; + + __cfc1(__old_fcsr); + __new_fcsr = __old_fcsr | (__mask & FE_ALL_EXCEPT) << _ENABLE_SHIFT; + __ctc1(__new_fcsr); + + return ((__old_fcsr >> _ENABLE_SHIFT) & FE_ALL_EXCEPT); +} + +static inline int +fedisableexcept(int __mask) +{ + fenv_t __old_fcsr, __new_fcsr; + + __cfc1(__old_fcsr); + __new_fcsr = __old_fcsr & ~((__mask & FE_ALL_EXCEPT) << _ENABLE_SHIFT); + __ctc1(__new_fcsr); + + return ((__old_fcsr >> _ENABLE_SHIFT) & FE_ALL_EXCEPT); +} + +static inline int +fegetexcept(void) +{ + fexcept_t fcsr; + + __cfc1(fcsr); + + return ((fcsr & _ENABLE_MASK) >> _ENABLE_SHIFT); +} + +#endif /* !__mips_soft_float */ + +#endif /* __BSD_VISIBLE */ \ No newline at end of file diff --git a/newlib/libc/machine/mips/machine/fenv-softfloat.h b/newlib/libc/machine/mips/machine/fenv-softfloat.h new file mode 100644 index 000000000..cf13e73fc --- /dev/null +++ b/newlib/libc/machine/mips/machine/fenv-softfloat.h @@ -0,0 +1,182 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2004-2011 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * This file implements the functionality of on platforms that + * lack an FPU and use softfloat in libc for floating point. To use it, + * you must write an that provides the following: + * + * - a typedef for fenv_t, which may be an integer or struct type + * - a typedef for fexcept_t (XXX This file assumes fexcept_t is a + * simple integer type containing the exception mask.) + * - definitions of FE_* constants for the five exceptions and four + * rounding modes in IEEE 754, as described in fenv(3) + * - a definition, and the corresponding external symbol, for FE_DFL_ENV + * - a macro __set_env(env, flags, mask, rnd), which sets the given fenv_t + * from the exception flags, mask, and rounding mode + * - macros __env_flags(env), __env_mask(env), and __env_round(env), which + * extract fields from an fenv_t + * - a definition of __fenv_static + * + * If the architecture supports an optional FPU, it's recommended that you + * define fenv_t and fexcept_t to match the hardware ABI. Otherwise, it + * doesn't matter how you define them. + */ +#include +int __softfloat_float_exception_flags; +int __softfloat_float_exception_mask; +int __softfloat_float_rounding_mode; + + +__fenv_static inline int +feclearexcept(int excepts) +{ + + __softfloat_float_exception_flags &= ~excepts; + return (0); +} + +__fenv_static inline int +fegetexceptflag(fexcept_t *flagp, int excepts) +{ + + *flagp = __softfloat_float_exception_flags & excepts; + return (0); +} + +__fenv_static inline int +fesetexceptflag(const fexcept_t *flagp, int excepts) +{ + + __softfloat_float_exception_flags &= ~excepts; + __softfloat_float_exception_flags |= *flagp & excepts; + return (0); +} + +__fenv_static inline int +feraiseexcept(int excepts) +{ + +return(excepts ? -ENOTSUP : 0 ); + +} + +__fenv_static inline int +fetestexcept(int excepts) +{ + + return (__softfloat_float_exception_flags & excepts); +} + +__fenv_static inline int +fegetround(void) +{ + + return (__softfloat_float_rounding_mode); +} + +__fenv_static inline int +fesetround(int rounding_mode) +{ + + __softfloat_float_rounding_mode = rounding_mode; + return (0); +} + +__fenv_static inline int +fegetenv(fenv_t *envp) +{ + + __set_env(*envp, __softfloat_float_exception_flags, + __softfloat_float_exception_mask, __softfloat_float_rounding_mode); + return (0); +} + +__fenv_static inline int +feholdexcept(fenv_t *envp) +{ + fenv_t __env; + + fegetenv(envp); + __softfloat_float_exception_flags = 0; + __softfloat_float_exception_mask = 0; + return (0); +} + +__fenv_static inline int +fesetenv(const fenv_t *envp) +{ + + __softfloat_float_exception_flags = __env_flags(*envp); + __softfloat_float_exception_mask = __env_mask(*envp); + __softfloat_float_rounding_mode = __env_round(*envp); + return (0); +} + +__fenv_static inline int +feupdateenv(const fenv_t *envp) +{ + int __oflags = __softfloat_float_exception_flags; + + fesetenv(envp); + feraiseexcept(__oflags); + return (0); +} + +#if __BSD_VISIBLE + +/* We currently provide no external definitions of the functions below. */ + +__fenv_static inline int +feenableexcept(int __mask) +{ + int __omask = __softfloat_float_exception_mask; + + __softfloat_float_exception_mask |= __mask; + return (__omask); +} + +__fenv_static inline int +fedisableexcept(int __mask) +{ + int __omask = __softfloat_float_exception_mask; + + __softfloat_float_exception_mask &= ~__mask; + return (__omask); +} + +__fenv_static inline int +fegetexcept(void) +{ + + return (__softfloat_float_exception_mask); +} + +#endif /* __BSD_VISIBLE */ diff --git a/newlib/libc/machine/mips/sys/fenv.h b/newlib/libc/machine/mips/sys/fenv.h new file mode 100644 index 000000000..282d68c49 --- /dev/null +++ b/newlib/libc/machine/mips/sys/fenv.h @@ -0,0 +1,88 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2004-2005 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_FENV_H_ +#define _SYS_FENV_H_ + +#include + +#ifndef __fenv_static +#define __fenv_static static +#endif + +typedef int fenv_t; +typedef int fexcept_t; + +/* Exception flags */ +#ifdef __mips_soft_float +#define _FPUSW_SHIFT 16 +#define FE_INVALID 0x0001 +#define FE_DIVBYZERO 0x0002 +#define FE_OVERFLOW 0x0004 +#define FE_UNDERFLOW 0x0008 +#define FE_INEXACT 0x0010 +#else +#define _FCSR_CAUSE_SHIFT 10 +#define FE_INVALID 0x0040 +#define FE_DIVBYZERO 0x0020 +#define FE_OVERFLOW 0x0010 +#define FE_UNDERFLOW 0x0008 +#define FE_INEXACT 0x0004 +#endif +#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | \ + FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW) + +/* Rounding modes */ +#define FE_TONEAREST 0x0000 +#define FE_TOWARDZERO 0x0001 +#define FE_UPWARD 0x0002 +#define FE_DOWNWARD 0x0003 +#define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \ + FE_UPWARD | FE_TOWARDZERO) + + +/* Default floating-point environment */ +extern const fenv_t *_fe_dfl_env; +#define FE_DFL_ENV (_fe_dfl_env) + +/* We need to be able to map status flag positions to mask flag positions */ +#define _ENABLE_SHIFT 5 +#define _ENABLE_MASK (FE_ALL_EXCEPT << _ENABLE_SHIFT) + +#if !defined(__mips_soft_float) && !defined(__mips_hard_float) +#error compiler didnt set soft/hard float macros +#endif + +#ifndef __mips_soft_float +#define __cfc1(__fcsr) __asm __volatile("cfc1 %0, $31" : "=r" (__fcsr)) +#define __ctc1(__fcsr) __asm __volatile("ctc1 %0, $31" :: "r" (__fcsr)) +#endif + +#endif /* !_FENV_H_ */ diff --git a/newlib/libm/machine/configure.in b/newlib/libm/machine/configure.in index 343f83855..e3df2f0f6 100644 --- a/newlib/libm/machine/configure.in +++ b/newlib/libm/machine/configure.in @@ -35,6 +35,7 @@ if test -n "${libm_machine_dir}"; then x86_64) AC_CONFIG_SUBDIRS(x86_64) ;; powerpc) AC_CONFIG_SUBDIRS(powerpc) ;; sparc) AC_CONFIG_SUBDIRS(sparc) ;; + mips) AC_CONFIG_SUBDIRS(mips) ;; esac; if test "${use_libtool}" = "yes"; then machlib=${libm_machine_dir}/lib${libm_machine_dir}.${aext} diff --git a/newlib/libm/machine/mips/Makefile.am b/newlib/libm/machine/mips/Makefile.am new file mode 100644 index 000000000..bb142a6ce --- /dev/null +++ b/newlib/libm/machine/mips/Makefile.am @@ -0,0 +1,21 @@ +## Process this file with automake to generate Makefile.in + +INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \ + $(CROSS_CFLAGS) $(TARGET_CFLAGS) + +LIB_SOURCES = \ + feclearexcept.c fegetenv.c fegetexceptflag.c \ + fegetround.c feholdexcept.c feraiseexcept.c fesetenv.c \ + fesetexceptflag.c fesetround.c fetestexcept.c feupdateenv.c \ + fenv.c + +noinst_LIBRARIES = lib.a +lib_a_SOURCES = $(LIB_SOURCES) +lib_a_CFLAGS = $(AM_CFLAGS) +lib_a_CCASFLAGS = $(AM_CCASFLAGS) +noinst_DATA = + +include $(srcdir)/../../../Makefile.shared + +ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. +CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host diff --git a/newlib/libm/machine/mips/configure.in b/newlib/libm/machine/mips/configure.in new file mode 100644 index 000000000..7a22fa31c --- /dev/null +++ b/newlib/libm/machine/mips/configure.in @@ -0,0 +1,11 @@ + +AC_PREREQ(2.59) +AC_INIT([newlib],[NEWLIB_VERSION]) +AC_CONFIG_SRCDIR([Makefile.am]) + +AC_CONFIG_AUX_DIR(../../../..) + +NEWLIB_CONFIGURE(../../..) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/newlib/libm/machine/mips/feclearexcept.c b/newlib/libm/machine/mips/feclearexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/mips/feclearexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/mips/fegetenv.c b/newlib/libm/machine/mips/fegetenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/mips/fegetenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/mips/fegetexceptflag.c b/newlib/libm/machine/mips/fegetexceptflag.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/mips/fegetexceptflag.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/mips/fegetround.c b/newlib/libm/machine/mips/fegetround.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/mips/fegetround.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/mips/feholdexcept.c b/newlib/libm/machine/mips/feholdexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/mips/feholdexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/mips/fenv.c b/newlib/libm/machine/mips/fenv.c new file mode 100644 index 000000000..6e4bb8f33 --- /dev/null +++ b/newlib/libm/machine/mips/fenv.c @@ -0,0 +1,74 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2004 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#define __fenv_static +#include +#ifndef __mips_soft_float +#include +#endif + + +#ifdef __GNUC_GNU_INLINE__ +#error "This file must be compiled with C99 'inline' semantics" +#endif + +/* + * Hopefully the system ID byte is immutable, so it's valid to use + * this as a default environment. + */ + + +#ifdef __mips_soft_float +#define __set_env(env, flags, mask, rnd) env = ((flags) \ + | (mask)<<_FPUSW_SHIFT \ + | (rnd) << 24) +#define __env_flags(env) ((env) & FE_ALL_EXCEPT) +#define __env_mask(env) (((env) >> _FPUSW_SHIFT) \ + & FE_ALL_EXCEPT) +#define __env_round(env) (((env) >> 24) & _ROUND_MASK) +#include +#endif + + + +extern inline int feclearexcept(int excepts); +extern inline int fegetexceptflag(fexcept_t *flagp, int excepts); +extern inline int fesetexceptflag(const fexcept_t *flagp, int excepts); +extern inline int feraiseexcept(int excepts); +extern inline int fetestexcept(int excepts); +extern inline int fegetround(void); +extern inline int fesetround(int rounding_mode); +extern inline int fegetenv(fenv_t *envp); +extern inline int feholdexcept(fenv_t *envp); +extern inline int fesetenv(const fenv_t *envp); +extern inline int feupdateenv(const fenv_t *envp); +extern inline int feenableexcept(int __mask); +extern inline int fedisableexcept(int __mask); +extern inline int fegetexcept(void); diff --git a/newlib/libm/machine/mips/feraiseexcept.c b/newlib/libm/machine/mips/feraiseexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/mips/feraiseexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/mips/fesetenv.c b/newlib/libm/machine/mips/fesetenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/mips/fesetenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/mips/fesetexceptflag.c b/newlib/libm/machine/mips/fesetexceptflag.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/mips/fesetexceptflag.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/mips/fesetround.c b/newlib/libm/machine/mips/fesetround.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/mips/fesetround.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/mips/fetestexcept.c b/newlib/libm/machine/mips/fetestexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/mips/fetestexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/mips/feupdateenv.c b/newlib/libm/machine/mips/feupdateenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/mips/feupdateenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" From f095752167343ac10eeeba9007a84d51151aad3d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 3 Jul 2020 10:45:44 +0200 Subject: [PATCH 400/520] libm: machine: Add missing sparc and mips configuration Signed-off-by: Corinna Vinschen --- newlib/libm/machine/configure | 12 +- newlib/libm/machine/mips/Makefile.in | 559 +++ newlib/libm/machine/mips/aclocal.m4 | 1012 ++++++ newlib/libm/machine/mips/configure | 4766 +++++++++++++++++++++++++ newlib/libm/machine/sparc/Makefile.in | 559 +++ newlib/libm/machine/sparc/aclocal.m4 | 1012 ++++++ newlib/libm/machine/sparc/configure | 4766 +++++++++++++++++++++++++ 7 files changed, 12683 insertions(+), 3 deletions(-) create mode 100644 newlib/libm/machine/mips/Makefile.in create mode 100644 newlib/libm/machine/mips/aclocal.m4 create mode 100755 newlib/libm/machine/mips/configure create mode 100644 newlib/libm/machine/sparc/Makefile.in create mode 100644 newlib/libm/machine/sparc/aclocal.m4 create mode 100755 newlib/libm/machine/sparc/configure diff --git a/newlib/libm/machine/configure b/newlib/libm/machine/configure index f49fc7877..36ea37d77 100755 --- a/newlib/libm/machine/configure +++ b/newlib/libm/machine/configure @@ -794,7 +794,9 @@ pru spu riscv x86_64 -powerpc' +powerpc +sparc +mips' # Initialize some variables set by options. ac_init_help= @@ -11456,7 +11458,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11459 "configure" +#line 11461 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11562,7 +11564,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11565 "configure" +#line 11567 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11824,6 +11826,10 @@ subdirs="$subdirs aarch64" x86_64) subdirs="$subdirs x86_64" ;; powerpc) subdirs="$subdirs powerpc" + ;; + sparc) subdirs="$subdirs sparc" + ;; + mips) subdirs="$subdirs mips" ;; esac; if test "${use_libtool}" = "yes"; then diff --git a/newlib/libm/machine/mips/Makefile.in b/newlib/libm/machine/mips/Makefile.in new file mode 100644 index 000000000..978aa7dae --- /dev/null +++ b/newlib/libm/machine/mips/Makefile.in @@ -0,0 +1,559 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/../../../Makefile.shared $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +lib_a_AR = $(AR) $(ARFLAGS) +lib_a_LIBADD = +am__objects_1 = lib_a-feclearexcept.$(OBJEXT) lib_a-fegetenv.$(OBJEXT) \ + lib_a-fegetexceptflag.$(OBJEXT) lib_a-fegetround.$(OBJEXT) \ + lib_a-feholdexcept.$(OBJEXT) lib_a-feraiseexcept.$(OBJEXT) \ + lib_a-fesetenv.$(OBJEXT) lib_a-fesetexceptflag.$(OBJEXT) \ + lib_a-fesetround.$(OBJEXT) lib_a-fetestexcept.$(OBJEXT) \ + lib_a-feupdateenv.$(OBJEXT) lib_a-fenv.$(OBJEXT) +am_lib_a_OBJECTS = $(am__objects_1) +lib_a_OBJECTS = $(am_lib_a_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = +am__depfiles_maybe = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(lib_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +DATA = $(noinst_DATA) +ETAGS = etags +CTAGS = ctags +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NEWLIB_CFLAGS = @NEWLIB_CFLAGS@ +NO_INCLUDE_LIST = @NO_INCLUDE_LIST@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +READELF = @READELF@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +aext = @aext@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +libm_machine_dir = @libm_machine_dir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lpfx = @lpfx@ +machine_dir = @machine_dir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +newlib_basedir = @newlib_basedir@ +oext = @oext@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sys_dir = @sys_dir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \ + $(CROSS_CFLAGS) $(TARGET_CFLAGS) + +LIB_SOURCES = \ + feclearexcept.c fegetenv.c fegetexceptflag.c \ + fegetround.c feholdexcept.c feraiseexcept.c fesetenv.c \ + fesetexceptflag.c fesetround.c fetestexcept.c feupdateenv.c \ + fenv.c + +noinst_LIBRARIES = lib.a +lib_a_SOURCES = $(LIB_SOURCES) +lib_a_CFLAGS = $(AM_CFLAGS) +lib_a_CCASFLAGS = $(AM_CCASFLAGS) +noinst_DATA = + +# +# documentation rules +# +SUFFIXES = .def .xml +CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str +DOCBOOK_CHEW = ${top_srcdir}/../doc/makedocbook.py +DOCBOOK_OUT_FILES = $(CHEWOUT_FILES:.def=.xml) +DOCBOOK_CHAPTERS = $(CHAPTERS:.tex=.xml) +CLEANFILES = $(CHEWOUT_FILES) $(DOCBOOK_OUT_FILES) +ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. +CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host +all: all-am + +.SUFFIXES: +.SUFFIXES: .def .xml .c .o .obj +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../../Makefile.shared $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --cygnus \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --cygnus Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; +$(srcdir)/../../../Makefile.shared: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES) + -rm -f lib.a + $(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD) + $(RANLIB) lib.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.c.o: + $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -c `$(CYGPATH_W) '$<'` + +lib_a-feclearexcept.o: feclearexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feclearexcept.o `test -f 'feclearexcept.c' || echo '$(srcdir)/'`feclearexcept.c + +lib_a-feclearexcept.obj: feclearexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feclearexcept.obj `if test -f 'feclearexcept.c'; then $(CYGPATH_W) 'feclearexcept.c'; else $(CYGPATH_W) '$(srcdir)/feclearexcept.c'; fi` + +lib_a-fegetenv.o: fegetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetenv.o `test -f 'fegetenv.c' || echo '$(srcdir)/'`fegetenv.c + +lib_a-fegetenv.obj: fegetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetenv.obj `if test -f 'fegetenv.c'; then $(CYGPATH_W) 'fegetenv.c'; else $(CYGPATH_W) '$(srcdir)/fegetenv.c'; fi` + +lib_a-fegetexceptflag.o: fegetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexceptflag.o `test -f 'fegetexceptflag.c' || echo '$(srcdir)/'`fegetexceptflag.c + +lib_a-fegetexceptflag.obj: fegetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexceptflag.obj `if test -f 'fegetexceptflag.c'; then $(CYGPATH_W) 'fegetexceptflag.c'; else $(CYGPATH_W) '$(srcdir)/fegetexceptflag.c'; fi` + +lib_a-fegetround.o: fegetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetround.o `test -f 'fegetround.c' || echo '$(srcdir)/'`fegetround.c + +lib_a-fegetround.obj: fegetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetround.obj `if test -f 'fegetround.c'; then $(CYGPATH_W) 'fegetround.c'; else $(CYGPATH_W) '$(srcdir)/fegetround.c'; fi` + +lib_a-feholdexcept.o: feholdexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.o `test -f 'feholdexcept.c' || echo '$(srcdir)/'`feholdexcept.c + +lib_a-feholdexcept.obj: feholdexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.obj `if test -f 'feholdexcept.c'; then $(CYGPATH_W) 'feholdexcept.c'; else $(CYGPATH_W) '$(srcdir)/feholdexcept.c'; fi` + +lib_a-feraiseexcept.o: feraiseexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feraiseexcept.o `test -f 'feraiseexcept.c' || echo '$(srcdir)/'`feraiseexcept.c + +lib_a-feraiseexcept.obj: feraiseexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feraiseexcept.obj `if test -f 'feraiseexcept.c'; then $(CYGPATH_W) 'feraiseexcept.c'; else $(CYGPATH_W) '$(srcdir)/feraiseexcept.c'; fi` + +lib_a-fesetenv.o: fesetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetenv.o `test -f 'fesetenv.c' || echo '$(srcdir)/'`fesetenv.c + +lib_a-fesetenv.obj: fesetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetenv.obj `if test -f 'fesetenv.c'; then $(CYGPATH_W) 'fesetenv.c'; else $(CYGPATH_W) '$(srcdir)/fesetenv.c'; fi` + +lib_a-fesetexceptflag.o: fesetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetexceptflag.o `test -f 'fesetexceptflag.c' || echo '$(srcdir)/'`fesetexceptflag.c + +lib_a-fesetexceptflag.obj: fesetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetexceptflag.obj `if test -f 'fesetexceptflag.c'; then $(CYGPATH_W) 'fesetexceptflag.c'; else $(CYGPATH_W) '$(srcdir)/fesetexceptflag.c'; fi` + +lib_a-fesetround.o: fesetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetround.o `test -f 'fesetround.c' || echo '$(srcdir)/'`fesetround.c + +lib_a-fesetround.obj: fesetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetround.obj `if test -f 'fesetround.c'; then $(CYGPATH_W) 'fesetround.c'; else $(CYGPATH_W) '$(srcdir)/fesetround.c'; fi` + +lib_a-fetestexcept.o: fetestexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fetestexcept.o `test -f 'fetestexcept.c' || echo '$(srcdir)/'`fetestexcept.c + +lib_a-fetestexcept.obj: fetestexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fetestexcept.obj `if test -f 'fetestexcept.c'; then $(CYGPATH_W) 'fetestexcept.c'; else $(CYGPATH_W) '$(srcdir)/fetestexcept.c'; fi` + +lib_a-feupdateenv.o: feupdateenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.o `test -f 'feupdateenv.c' || echo '$(srcdir)/'`feupdateenv.c + +lib_a-feupdateenv.obj: feupdateenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.obj `if test -f 'feupdateenv.c'; then $(CYGPATH_W) 'feupdateenv.c'; else $(CYGPATH_W) '$(srcdir)/feupdateenv.c'; fi` + +lib_a-fenv.o: fenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.o `test -f 'fenv.c' || echo '$(srcdir)/'`fenv.c + +lib_a-fenv.obj: fenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.obj `if test -f 'fenv.c'; then $(CYGPATH_W) 'fenv.c'; else $(CYGPATH_W) '$(srcdir)/fenv.c'; fi` + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +check-am: +check: check-am +all-am: Makefile $(LIBRARIES) $(DATA) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-generic clean-noinstLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-tags dvi dvi-am \ + html html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am + +objectlist.awk.in: $(noinst_LTLIBRARIES) + -rm -f objectlist.awk.in + for i in `ls *.lo` ; \ + do \ + echo $$i `pwd`/$$i >> objectlist.awk.in ; \ + done + +.c.def: + $(CHEW) < $< > $*.def || ( rm $*.def && false ) + @touch stmp-def + +TARGETDOC ?= ../tmp.texi + +doc: $(CHEWOUT_FILES) + for chapter in $(CHAPTERS) ; \ + do \ + cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \ + done + +.c.xml: + $(DOCBOOK_CHEW) < $< > $*.xml || ( rm $*.xml && false ) + @touch stmp-xml + +docbook: $(DOCBOOK_OUT_FILES) + for chapter in $(DOCBOOK_CHAPTERS) ; \ + do \ + ${top_srcdir}/../doc/chapter-texi2docbook.py <$(srcdir)/$${chapter%.xml}.tex >../$$chapter ; \ + done + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/newlib/libm/machine/mips/aclocal.m4 b/newlib/libm/machine/mips/aclocal.m4 new file mode 100644 index 000000000..18dab02aa --- /dev/null +++ b/newlib/libm/machine/mips/aclocal.m4 @@ -0,0 +1,1012 @@ +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.6], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.11.6])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 16 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, +# 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless `enable' is passed literally. +# For symmetry, `disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], +[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([../../../acinclude.m4]) diff --git a/newlib/libm/machine/mips/configure b/newlib/libm/machine/mips/configure new file mode 100755 index 000000000..a8f343ac9 --- /dev/null +++ b/newlib/libm/machine/mips/configure @@ -0,0 +1,4766 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='newlib' +PACKAGE_TARNAME='newlib' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +ac_unique_file="Makefile.am" +ac_subst_vars='LTLIBOBJS +LIBOBJS +sys_dir +machine_dir +libm_machine_dir +lpfx +aext +oext +OBJEXT +USE_LIBTOOL_FALSE +USE_LIBTOOL_TRUE +ELIX_LEVEL_4_FALSE +ELIX_LEVEL_4_TRUE +ELIX_LEVEL_3_FALSE +ELIX_LEVEL_3_TRUE +ELIX_LEVEL_2_FALSE +ELIX_LEVEL_2_TRUE +ELIX_LEVEL_1_FALSE +ELIX_LEVEL_1_TRUE +ELIX_LEVEL_0_FALSE +ELIX_LEVEL_0_TRUE +LDFLAGS +NO_INCLUDE_LIST +NEWLIB_CFLAGS +CCASFLAGS +CCAS +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +READELF +RANLIB +AR +AS +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +CC +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +newlib_basedir +MAY_SUPPLY_SYSCALLS_FALSE +MAY_SUPPLY_SYSCALLS_TRUE +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_multilib +enable_target_optspace +enable_malloc_debugging +enable_newlib_multithread +enable_newlib_iconv +enable_newlib_elix_level +enable_newlib_io_float +enable_newlib_supplied_syscalls +enable_newlib_fno_builtin +enable_dependency_tracking +enable_maintainer_mode +' + ac_precious_vars='build_alias +host_alias +target_alias +CCAS +CCASFLAGS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/newlib] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of newlib 3.3.0:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-multilib build many library versions (default) + --enable-target-optspace optimize for space + --enable-malloc-debugging indicate malloc debugging requested + --enable-newlib-multithread enable support for multiple threads + --enable-newlib-iconv enable iconv library support + --enable-newlib-elix-level supply desired elix library level (1-4) + --disable-newlib-io-float disable printf/scanf family float support + --disable-newlib-supplied-syscalls disable newlib from supplying syscalls + --disable-newlib-fno-builtin disable -fno-builtin flag to allow compiler to use builtin library functions + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + +Some influential environment variables: + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to the package provider. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +newlib configure 3.3.0 +generated by GNU Autoconf 2.68 + +Copyright (C) 2010 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by newlib $as_me 3.3.0, which was +generated by GNU Autoconf 2.68. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +ac_aux_dir= +for ac_dir in ../../../.. "$srcdir"/../../../..; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../../.. \"$srcdir\"/../../../.." "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +am__api_version='1.11' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" = set; then : + enableval=$enable_multilib; case "${enableval}" in + yes) multilib=yes ;; + no) multilib=no ;; + *) as_fn_error $? "bad value ${enableval} for multilib option" "$LINENO" 5 ;; + esac +else + multilib=yes +fi + +# Check whether --enable-target-optspace was given. +if test "${enable_target_optspace+set}" = set; then : + enableval=$enable_target_optspace; case "${enableval}" in + yes) target_optspace=yes ;; + no) target_optspace=no ;; + *) as_fn_error $? "bad value ${enableval} for target-optspace option" "$LINENO" 5 ;; + esac +else + target_optspace= +fi + +# Check whether --enable-malloc-debugging was given. +if test "${enable_malloc_debugging+set}" = set; then : + enableval=$enable_malloc_debugging; case "${enableval}" in + yes) malloc_debugging=yes ;; + no) malloc_debugging=no ;; + *) as_fn_error $? "bad value ${enableval} for malloc-debugging option" "$LINENO" 5 ;; + esac +else + malloc_debugging= +fi + +# Check whether --enable-newlib-multithread was given. +if test "${enable_newlib_multithread+set}" = set; then : + enableval=$enable_newlib_multithread; case "${enableval}" in + yes) newlib_multithread=yes ;; + no) newlib_multithread=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-multithread option" "$LINENO" 5 ;; + esac +else + newlib_multithread=yes +fi + +# Check whether --enable-newlib-iconv was given. +if test "${enable_newlib_iconv+set}" = set; then : + enableval=$enable_newlib_iconv; if test "${newlib_iconv+set}" != set; then + case "${enableval}" in + yes) newlib_iconv=yes ;; + no) newlib_iconv=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-iconv option" "$LINENO" 5 ;; + esac + fi +else + newlib_iconv=${newlib_iconv} +fi + +# Check whether --enable-newlib-elix-level was given. +if test "${enable_newlib_elix_level+set}" = set; then : + enableval=$enable_newlib_elix_level; case "${enableval}" in + 0) newlib_elix_level=0 ;; + 1) newlib_elix_level=1 ;; + 2) newlib_elix_level=2 ;; + 3) newlib_elix_level=3 ;; + 4) newlib_elix_level=4 ;; + *) as_fn_error $? "bad value ${enableval} for newlib-elix-level option" "$LINENO" 5 ;; + esac +else + newlib_elix_level=0 +fi + +# Check whether --enable-newlib-io-float was given. +if test "${enable_newlib_io_float+set}" = set; then : + enableval=$enable_newlib_io_float; case "${enableval}" in + yes) newlib_io_float=yes ;; + no) newlib_io_float=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-io-float option" "$LINENO" 5 ;; + esac +else + newlib_io_float=yes +fi + +# Check whether --enable-newlib-supplied-syscalls was given. +if test "${enable_newlib_supplied_syscalls+set}" = set; then : + enableval=$enable_newlib_supplied_syscalls; case "${enableval}" in + yes) newlib_may_supply_syscalls=yes ;; + no) newlib_may_supply_syscalls=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;; + esac +else + newlib_may_supply_syscalls=yes +fi + + if test x${newlib_may_supply_syscalls} = xyes; then + MAY_SUPPLY_SYSCALLS_TRUE= + MAY_SUPPLY_SYSCALLS_FALSE='#' +else + MAY_SUPPLY_SYSCALLS_TRUE='#' + MAY_SUPPLY_SYSCALLS_FALSE= +fi + + +# Check whether --enable-newlib-fno-builtin was given. +if test "${enable_newlib_fno_builtin+set}" = set; then : + enableval=$enable_newlib_fno_builtin; case "${enableval}" in + yes) newlib_fno_builtin=yes ;; + no) newlib_fno_builtin=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-fno-builtin option" "$LINENO" 5 ;; + esac +else + newlib_fno_builtin= +fi + + + +test -z "${with_target_subdir}" && with_target_subdir=. + +if test "${srcdir}" = "."; then + if test "${with_target_subdir}" != "."; then + newlib_basedir="${srcdir}/${with_multisrctop}../../../.." + else + newlib_basedir="${srcdir}/${with_multisrctop}../../.." + fi +else + newlib_basedir="${srcdir}/../../.." +fi + + + + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='newlib' + VERSION='3.3.0' + + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + +# FIXME: We temporarily define our own version of AC_PROG_CC. This is +# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We +# are probably using a cross compiler, which will not be able to fully +# link an executable. This should really be fixed in autoconf +# itself. + + + + + + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5 +$as_echo_n "checking whether we are using GNU C... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.c <&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_c_compiler_gnu=yes +else + ac_cv_c_compiler_gnu=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } + +if test $ac_cv_c_compiler_gnu = yes; then + GCC=yes + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + elif test $ac_cv_prog_cc_g = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-O2" + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AS="${ac_tool_prefix}as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AS="as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args. +set dummy ${ac_tool_prefix}readelf; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_READELF+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$READELF"; then + ac_cv_prog_READELF="$READELF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_READELF="${ac_tool_prefix}readelf" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +READELF=$ac_cv_prog_READELF +if test -n "$READELF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5 +$as_echo "$READELF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_READELF"; then + ac_ct_READELF=$READELF + # Extract the first word of "readelf", so it can be a program name with args. +set dummy readelf; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_READELF+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_READELF"; then + ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_READELF="readelf" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_READELF=$ac_cv_prog_ac_ct_READELF +if test -n "$ac_ct_READELF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5 +$as_echo "$ac_ct_READELF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_READELF" = x; then + READELF=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + READELF=$ac_ct_READELF + fi +else + READELF="$ac_cv_prog_READELF" +fi + + + + +# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */ +ac_given_INSTALL=$INSTALL + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + +# By default we simply use the C compiler to build assembly code. + +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS + + + + +# We need AC_EXEEXT to keep automake happy in cygnus mode. However, +# at least currently, we never actually build a program, so we never +# need to use $(EXEEXT). Moreover, the test for EXEEXT normally +# fails, because we are probably configuring with a cross compiler +# which can't create executables. So we include AC_EXEEXT to keep +# automake happy, but we don't execute it, since we don't care about +# the result. +if false; then + + dummy_var=1 +fi + +. ${newlib_basedir}/configure.host + +NEWLIB_CFLAGS=${newlib_cflags} + + +NO_INCLUDE_LIST=${noinclude} + + +LDFLAGS=${ldflags} + + + if test x${newlib_elix_level} = x0; then + ELIX_LEVEL_0_TRUE= + ELIX_LEVEL_0_FALSE='#' +else + ELIX_LEVEL_0_TRUE='#' + ELIX_LEVEL_0_FALSE= +fi + + if test x${newlib_elix_level} = x1; then + ELIX_LEVEL_1_TRUE= + ELIX_LEVEL_1_FALSE='#' +else + ELIX_LEVEL_1_TRUE='#' + ELIX_LEVEL_1_FALSE= +fi + + if test x${newlib_elix_level} = x2; then + ELIX_LEVEL_2_TRUE= + ELIX_LEVEL_2_FALSE='#' +else + ELIX_LEVEL_2_TRUE='#' + ELIX_LEVEL_2_FALSE= +fi + + if test x${newlib_elix_level} = x3; then + ELIX_LEVEL_3_TRUE= + ELIX_LEVEL_3_FALSE='#' +else + ELIX_LEVEL_3_TRUE='#' + ELIX_LEVEL_3_FALSE= +fi + + if test x${newlib_elix_level} = x4; then + ELIX_LEVEL_4_TRUE= + ELIX_LEVEL_4_FALSE='#' +else + ELIX_LEVEL_4_TRUE='#' + ELIX_LEVEL_4_FALSE= +fi + + + if test x${use_libtool} = xyes; then + USE_LIBTOOL_TRUE= + USE_LIBTOOL_FALSE='#' +else + USE_LIBTOOL_TRUE='#' + USE_LIBTOOL_FALSE= +fi + + +# Emit any target-specific warnings. +if test "x${newlib_msg_warn}" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${newlib_msg_warn}" >&5 +$as_echo "$as_me: WARNING: ${newlib_msg_warn}" >&2;} +fi + +# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we +# use oext, which is set in configure.host based on the target platform. +OBJEXT=${oext} + + + + + + + + + + + +ac_config_files="$ac_config_files Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then + as_fn_error $? "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_0\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_1\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_3\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_4\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then + as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by newlib $as_me 3.3.0, which was +generated by GNU Autoconf 2.68. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Configuration commands: +$config_commands + +Report bugs to the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +newlib config.status 3.3.0 +configured by $0, generated by GNU Autoconf 2.68, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2010 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/newlib/libm/machine/sparc/Makefile.in b/newlib/libm/machine/sparc/Makefile.in new file mode 100644 index 000000000..da2513b30 --- /dev/null +++ b/newlib/libm/machine/sparc/Makefile.in @@ -0,0 +1,559 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/../../../Makefile.shared $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +lib_a_AR = $(AR) $(ARFLAGS) +lib_a_LIBADD = +am__objects_1 = lib_a-feclearexcept.$(OBJEXT) lib_a-fegetenv.$(OBJEXT) \ + lib_a-fegetexceptflag.$(OBJEXT) lib_a-fegetround.$(OBJEXT) \ + lib_a-feholdexcept.$(OBJEXT) lib_a-feraiseexcept.$(OBJEXT) \ + lib_a-fesetenv.$(OBJEXT) lib_a-fesetexceptflag.$(OBJEXT) \ + lib_a-fesetround.$(OBJEXT) lib_a-fetestexcept.$(OBJEXT) \ + lib_a-feupdateenv.$(OBJEXT) lib_a-fenv.$(OBJEXT) +am_lib_a_OBJECTS = $(am__objects_1) +lib_a_OBJECTS = $(am_lib_a_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = +am__depfiles_maybe = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(lib_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +DATA = $(noinst_DATA) +ETAGS = etags +CTAGS = ctags +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NEWLIB_CFLAGS = @NEWLIB_CFLAGS@ +NO_INCLUDE_LIST = @NO_INCLUDE_LIST@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +READELF = @READELF@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +aext = @aext@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +libm_machine_dir = @libm_machine_dir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lpfx = @lpfx@ +machine_dir = @machine_dir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +newlib_basedir = @newlib_basedir@ +oext = @oext@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sys_dir = @sys_dir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \ + $(CROSS_CFLAGS) $(TARGET_CFLAGS) + +LIB_SOURCES = \ + feclearexcept.c fegetenv.c fegetexceptflag.c \ + fegetround.c feholdexcept.c feraiseexcept.c fesetenv.c \ + fesetexceptflag.c fesetround.c fetestexcept.c feupdateenv.c \ + fenv.c + +noinst_LIBRARIES = lib.a +lib_a_SOURCES = $(LIB_SOURCES) +lib_a_CFLAGS = $(AM_CFLAGS) +lib_a_CCASFLAGS = $(AM_CCASFLAGS) +noinst_DATA = + +# +# documentation rules +# +SUFFIXES = .def .xml +CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str +DOCBOOK_CHEW = ${top_srcdir}/../doc/makedocbook.py +DOCBOOK_OUT_FILES = $(CHEWOUT_FILES:.def=.xml) +DOCBOOK_CHAPTERS = $(CHAPTERS:.tex=.xml) +CLEANFILES = $(CHEWOUT_FILES) $(DOCBOOK_OUT_FILES) +ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. +CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host +all: all-am + +.SUFFIXES: +.SUFFIXES: .def .xml .c .o .obj +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../../Makefile.shared $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --cygnus \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --cygnus Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; +$(srcdir)/../../../Makefile.shared: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES) + -rm -f lib.a + $(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD) + $(RANLIB) lib.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.c.o: + $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -c `$(CYGPATH_W) '$<'` + +lib_a-feclearexcept.o: feclearexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feclearexcept.o `test -f 'feclearexcept.c' || echo '$(srcdir)/'`feclearexcept.c + +lib_a-feclearexcept.obj: feclearexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feclearexcept.obj `if test -f 'feclearexcept.c'; then $(CYGPATH_W) 'feclearexcept.c'; else $(CYGPATH_W) '$(srcdir)/feclearexcept.c'; fi` + +lib_a-fegetenv.o: fegetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetenv.o `test -f 'fegetenv.c' || echo '$(srcdir)/'`fegetenv.c + +lib_a-fegetenv.obj: fegetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetenv.obj `if test -f 'fegetenv.c'; then $(CYGPATH_W) 'fegetenv.c'; else $(CYGPATH_W) '$(srcdir)/fegetenv.c'; fi` + +lib_a-fegetexceptflag.o: fegetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexceptflag.o `test -f 'fegetexceptflag.c' || echo '$(srcdir)/'`fegetexceptflag.c + +lib_a-fegetexceptflag.obj: fegetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexceptflag.obj `if test -f 'fegetexceptflag.c'; then $(CYGPATH_W) 'fegetexceptflag.c'; else $(CYGPATH_W) '$(srcdir)/fegetexceptflag.c'; fi` + +lib_a-fegetround.o: fegetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetround.o `test -f 'fegetround.c' || echo '$(srcdir)/'`fegetround.c + +lib_a-fegetround.obj: fegetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetround.obj `if test -f 'fegetround.c'; then $(CYGPATH_W) 'fegetround.c'; else $(CYGPATH_W) '$(srcdir)/fegetround.c'; fi` + +lib_a-feholdexcept.o: feholdexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.o `test -f 'feholdexcept.c' || echo '$(srcdir)/'`feholdexcept.c + +lib_a-feholdexcept.obj: feholdexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.obj `if test -f 'feholdexcept.c'; then $(CYGPATH_W) 'feholdexcept.c'; else $(CYGPATH_W) '$(srcdir)/feholdexcept.c'; fi` + +lib_a-feraiseexcept.o: feraiseexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feraiseexcept.o `test -f 'feraiseexcept.c' || echo '$(srcdir)/'`feraiseexcept.c + +lib_a-feraiseexcept.obj: feraiseexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feraiseexcept.obj `if test -f 'feraiseexcept.c'; then $(CYGPATH_W) 'feraiseexcept.c'; else $(CYGPATH_W) '$(srcdir)/feraiseexcept.c'; fi` + +lib_a-fesetenv.o: fesetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetenv.o `test -f 'fesetenv.c' || echo '$(srcdir)/'`fesetenv.c + +lib_a-fesetenv.obj: fesetenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetenv.obj `if test -f 'fesetenv.c'; then $(CYGPATH_W) 'fesetenv.c'; else $(CYGPATH_W) '$(srcdir)/fesetenv.c'; fi` + +lib_a-fesetexceptflag.o: fesetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetexceptflag.o `test -f 'fesetexceptflag.c' || echo '$(srcdir)/'`fesetexceptflag.c + +lib_a-fesetexceptflag.obj: fesetexceptflag.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetexceptflag.obj `if test -f 'fesetexceptflag.c'; then $(CYGPATH_W) 'fesetexceptflag.c'; else $(CYGPATH_W) '$(srcdir)/fesetexceptflag.c'; fi` + +lib_a-fesetround.o: fesetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetround.o `test -f 'fesetround.c' || echo '$(srcdir)/'`fesetround.c + +lib_a-fesetround.obj: fesetround.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fesetround.obj `if test -f 'fesetround.c'; then $(CYGPATH_W) 'fesetround.c'; else $(CYGPATH_W) '$(srcdir)/fesetround.c'; fi` + +lib_a-fetestexcept.o: fetestexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fetestexcept.o `test -f 'fetestexcept.c' || echo '$(srcdir)/'`fetestexcept.c + +lib_a-fetestexcept.obj: fetestexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fetestexcept.obj `if test -f 'fetestexcept.c'; then $(CYGPATH_W) 'fetestexcept.c'; else $(CYGPATH_W) '$(srcdir)/fetestexcept.c'; fi` + +lib_a-feupdateenv.o: feupdateenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.o `test -f 'feupdateenv.c' || echo '$(srcdir)/'`feupdateenv.c + +lib_a-feupdateenv.obj: feupdateenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.obj `if test -f 'feupdateenv.c'; then $(CYGPATH_W) 'feupdateenv.c'; else $(CYGPATH_W) '$(srcdir)/feupdateenv.c'; fi` + +lib_a-fenv.o: fenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.o `test -f 'fenv.c' || echo '$(srcdir)/'`fenv.c + +lib_a-fenv.obj: fenv.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.obj `if test -f 'fenv.c'; then $(CYGPATH_W) 'fenv.c'; else $(CYGPATH_W) '$(srcdir)/fenv.c'; fi` + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +check-am: +check: check-am +all-am: Makefile $(LIBRARIES) $(DATA) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-generic clean-noinstLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-tags dvi dvi-am \ + html html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am + +objectlist.awk.in: $(noinst_LTLIBRARIES) + -rm -f objectlist.awk.in + for i in `ls *.lo` ; \ + do \ + echo $$i `pwd`/$$i >> objectlist.awk.in ; \ + done + +.c.def: + $(CHEW) < $< > $*.def || ( rm $*.def && false ) + @touch stmp-def + +TARGETDOC ?= ../tmp.texi + +doc: $(CHEWOUT_FILES) + for chapter in $(CHAPTERS) ; \ + do \ + cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \ + done + +.c.xml: + $(DOCBOOK_CHEW) < $< > $*.xml || ( rm $*.xml && false ) + @touch stmp-xml + +docbook: $(DOCBOOK_OUT_FILES) + for chapter in $(DOCBOOK_CHAPTERS) ; \ + do \ + ${top_srcdir}/../doc/chapter-texi2docbook.py <$(srcdir)/$${chapter%.xml}.tex >../$$chapter ; \ + done + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/newlib/libm/machine/sparc/aclocal.m4 b/newlib/libm/machine/sparc/aclocal.m4 new file mode 100644 index 000000000..18dab02aa --- /dev/null +++ b/newlib/libm/machine/sparc/aclocal.m4 @@ -0,0 +1,1012 @@ +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.6], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.11.6])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 16 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, +# 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless `enable' is passed literally. +# For symmetry, `disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], +[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([../../../acinclude.m4]) diff --git a/newlib/libm/machine/sparc/configure b/newlib/libm/machine/sparc/configure new file mode 100755 index 000000000..a8f343ac9 --- /dev/null +++ b/newlib/libm/machine/sparc/configure @@ -0,0 +1,4766 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.68 for newlib 3.3.0. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='newlib' +PACKAGE_TARNAME='newlib' +PACKAGE_VERSION='3.3.0' +PACKAGE_STRING='newlib 3.3.0' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +ac_unique_file="Makefile.am" +ac_subst_vars='LTLIBOBJS +LIBOBJS +sys_dir +machine_dir +libm_machine_dir +lpfx +aext +oext +OBJEXT +USE_LIBTOOL_FALSE +USE_LIBTOOL_TRUE +ELIX_LEVEL_4_FALSE +ELIX_LEVEL_4_TRUE +ELIX_LEVEL_3_FALSE +ELIX_LEVEL_3_TRUE +ELIX_LEVEL_2_FALSE +ELIX_LEVEL_2_TRUE +ELIX_LEVEL_1_FALSE +ELIX_LEVEL_1_TRUE +ELIX_LEVEL_0_FALSE +ELIX_LEVEL_0_TRUE +LDFLAGS +NO_INCLUDE_LIST +NEWLIB_CFLAGS +CCASFLAGS +CCAS +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +READELF +RANLIB +AR +AS +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +CC +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +newlib_basedir +MAY_SUPPLY_SYSCALLS_FALSE +MAY_SUPPLY_SYSCALLS_TRUE +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_multilib +enable_target_optspace +enable_malloc_debugging +enable_newlib_multithread +enable_newlib_iconv +enable_newlib_elix_level +enable_newlib_io_float +enable_newlib_supplied_syscalls +enable_newlib_fno_builtin +enable_dependency_tracking +enable_maintainer_mode +' + ac_precious_vars='build_alias +host_alias +target_alias +CCAS +CCASFLAGS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures newlib 3.3.0 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/newlib] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of newlib 3.3.0:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-multilib build many library versions (default) + --enable-target-optspace optimize for space + --enable-malloc-debugging indicate malloc debugging requested + --enable-newlib-multithread enable support for multiple threads + --enable-newlib-iconv enable iconv library support + --enable-newlib-elix-level supply desired elix library level (1-4) + --disable-newlib-io-float disable printf/scanf family float support + --disable-newlib-supplied-syscalls disable newlib from supplying syscalls + --disable-newlib-fno-builtin disable -fno-builtin flag to allow compiler to use builtin library functions + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + +Some influential environment variables: + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to the package provider. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +newlib configure 3.3.0 +generated by GNU Autoconf 2.68 + +Copyright (C) 2010 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by newlib $as_me 3.3.0, which was +generated by GNU Autoconf 2.68. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +ac_aux_dir= +for ac_dir in ../../../.. "$srcdir"/../../../..; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../../.. \"$srcdir\"/../../../.." "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +am__api_version='1.11' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" = set; then : + enableval=$enable_multilib; case "${enableval}" in + yes) multilib=yes ;; + no) multilib=no ;; + *) as_fn_error $? "bad value ${enableval} for multilib option" "$LINENO" 5 ;; + esac +else + multilib=yes +fi + +# Check whether --enable-target-optspace was given. +if test "${enable_target_optspace+set}" = set; then : + enableval=$enable_target_optspace; case "${enableval}" in + yes) target_optspace=yes ;; + no) target_optspace=no ;; + *) as_fn_error $? "bad value ${enableval} for target-optspace option" "$LINENO" 5 ;; + esac +else + target_optspace= +fi + +# Check whether --enable-malloc-debugging was given. +if test "${enable_malloc_debugging+set}" = set; then : + enableval=$enable_malloc_debugging; case "${enableval}" in + yes) malloc_debugging=yes ;; + no) malloc_debugging=no ;; + *) as_fn_error $? "bad value ${enableval} for malloc-debugging option" "$LINENO" 5 ;; + esac +else + malloc_debugging= +fi + +# Check whether --enable-newlib-multithread was given. +if test "${enable_newlib_multithread+set}" = set; then : + enableval=$enable_newlib_multithread; case "${enableval}" in + yes) newlib_multithread=yes ;; + no) newlib_multithread=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-multithread option" "$LINENO" 5 ;; + esac +else + newlib_multithread=yes +fi + +# Check whether --enable-newlib-iconv was given. +if test "${enable_newlib_iconv+set}" = set; then : + enableval=$enable_newlib_iconv; if test "${newlib_iconv+set}" != set; then + case "${enableval}" in + yes) newlib_iconv=yes ;; + no) newlib_iconv=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-iconv option" "$LINENO" 5 ;; + esac + fi +else + newlib_iconv=${newlib_iconv} +fi + +# Check whether --enable-newlib-elix-level was given. +if test "${enable_newlib_elix_level+set}" = set; then : + enableval=$enable_newlib_elix_level; case "${enableval}" in + 0) newlib_elix_level=0 ;; + 1) newlib_elix_level=1 ;; + 2) newlib_elix_level=2 ;; + 3) newlib_elix_level=3 ;; + 4) newlib_elix_level=4 ;; + *) as_fn_error $? "bad value ${enableval} for newlib-elix-level option" "$LINENO" 5 ;; + esac +else + newlib_elix_level=0 +fi + +# Check whether --enable-newlib-io-float was given. +if test "${enable_newlib_io_float+set}" = set; then : + enableval=$enable_newlib_io_float; case "${enableval}" in + yes) newlib_io_float=yes ;; + no) newlib_io_float=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-io-float option" "$LINENO" 5 ;; + esac +else + newlib_io_float=yes +fi + +# Check whether --enable-newlib-supplied-syscalls was given. +if test "${enable_newlib_supplied_syscalls+set}" = set; then : + enableval=$enable_newlib_supplied_syscalls; case "${enableval}" in + yes) newlib_may_supply_syscalls=yes ;; + no) newlib_may_supply_syscalls=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;; + esac +else + newlib_may_supply_syscalls=yes +fi + + if test x${newlib_may_supply_syscalls} = xyes; then + MAY_SUPPLY_SYSCALLS_TRUE= + MAY_SUPPLY_SYSCALLS_FALSE='#' +else + MAY_SUPPLY_SYSCALLS_TRUE='#' + MAY_SUPPLY_SYSCALLS_FALSE= +fi + + +# Check whether --enable-newlib-fno-builtin was given. +if test "${enable_newlib_fno_builtin+set}" = set; then : + enableval=$enable_newlib_fno_builtin; case "${enableval}" in + yes) newlib_fno_builtin=yes ;; + no) newlib_fno_builtin=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-fno-builtin option" "$LINENO" 5 ;; + esac +else + newlib_fno_builtin= +fi + + + +test -z "${with_target_subdir}" && with_target_subdir=. + +if test "${srcdir}" = "."; then + if test "${with_target_subdir}" != "."; then + newlib_basedir="${srcdir}/${with_multisrctop}../../../.." + else + newlib_basedir="${srcdir}/${with_multisrctop}../../.." + fi +else + newlib_basedir="${srcdir}/../../.." +fi + + + + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='newlib' + VERSION='3.3.0' + + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + +# FIXME: We temporarily define our own version of AC_PROG_CC. This is +# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We +# are probably using a cross compiler, which will not be able to fully +# link an executable. This should really be fixed in autoconf +# itself. + + + + + + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5 +$as_echo_n "checking whether we are using GNU C... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.c <&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_c_compiler_gnu=yes +else + ac_cv_c_compiler_gnu=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } + +if test $ac_cv_c_compiler_gnu = yes; then + GCC=yes + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + elif test $ac_cv_prog_cc_g = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-O2" + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AS="${ac_tool_prefix}as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AS="as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args. +set dummy ${ac_tool_prefix}readelf; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_READELF+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$READELF"; then + ac_cv_prog_READELF="$READELF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_READELF="${ac_tool_prefix}readelf" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +READELF=$ac_cv_prog_READELF +if test -n "$READELF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5 +$as_echo "$READELF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_READELF"; then + ac_ct_READELF=$READELF + # Extract the first word of "readelf", so it can be a program name with args. +set dummy readelf; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_READELF+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_READELF"; then + ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_READELF="readelf" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_READELF=$ac_cv_prog_ac_ct_READELF +if test -n "$ac_ct_READELF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5 +$as_echo "$ac_ct_READELF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_READELF" = x; then + READELF=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + READELF=$ac_ct_READELF + fi +else + READELF="$ac_cv_prog_READELF" +fi + + + + +# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */ +ac_given_INSTALL=$INSTALL + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + +# By default we simply use the C compiler to build assembly code. + +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS + + + + +# We need AC_EXEEXT to keep automake happy in cygnus mode. However, +# at least currently, we never actually build a program, so we never +# need to use $(EXEEXT). Moreover, the test for EXEEXT normally +# fails, because we are probably configuring with a cross compiler +# which can't create executables. So we include AC_EXEEXT to keep +# automake happy, but we don't execute it, since we don't care about +# the result. +if false; then + + dummy_var=1 +fi + +. ${newlib_basedir}/configure.host + +NEWLIB_CFLAGS=${newlib_cflags} + + +NO_INCLUDE_LIST=${noinclude} + + +LDFLAGS=${ldflags} + + + if test x${newlib_elix_level} = x0; then + ELIX_LEVEL_0_TRUE= + ELIX_LEVEL_0_FALSE='#' +else + ELIX_LEVEL_0_TRUE='#' + ELIX_LEVEL_0_FALSE= +fi + + if test x${newlib_elix_level} = x1; then + ELIX_LEVEL_1_TRUE= + ELIX_LEVEL_1_FALSE='#' +else + ELIX_LEVEL_1_TRUE='#' + ELIX_LEVEL_1_FALSE= +fi + + if test x${newlib_elix_level} = x2; then + ELIX_LEVEL_2_TRUE= + ELIX_LEVEL_2_FALSE='#' +else + ELIX_LEVEL_2_TRUE='#' + ELIX_LEVEL_2_FALSE= +fi + + if test x${newlib_elix_level} = x3; then + ELIX_LEVEL_3_TRUE= + ELIX_LEVEL_3_FALSE='#' +else + ELIX_LEVEL_3_TRUE='#' + ELIX_LEVEL_3_FALSE= +fi + + if test x${newlib_elix_level} = x4; then + ELIX_LEVEL_4_TRUE= + ELIX_LEVEL_4_FALSE='#' +else + ELIX_LEVEL_4_TRUE='#' + ELIX_LEVEL_4_FALSE= +fi + + + if test x${use_libtool} = xyes; then + USE_LIBTOOL_TRUE= + USE_LIBTOOL_FALSE='#' +else + USE_LIBTOOL_TRUE='#' + USE_LIBTOOL_FALSE= +fi + + +# Emit any target-specific warnings. +if test "x${newlib_msg_warn}" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${newlib_msg_warn}" >&5 +$as_echo "$as_me: WARNING: ${newlib_msg_warn}" >&2;} +fi + +# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we +# use oext, which is set in configure.host based on the target platform. +OBJEXT=${oext} + + + + + + + + + + + +ac_config_files="$ac_config_files Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then + as_fn_error $? "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_0\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_1\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_3\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then + as_fn_error $? "conditional \"ELIX_LEVEL_4\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then + as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by newlib $as_me 3.3.0, which was +generated by GNU Autoconf 2.68. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Configuration commands: +$config_commands + +Report bugs to the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +newlib config.status 3.3.0 +configured by $0, generated by GNU Autoconf 2.68, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2010 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + From bb96bd03b0b9be5ed63127771687ac4877092ef8 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 6 Jul 2020 13:17:53 +0200 Subject: [PATCH 401/520] Cygwin: fix buffer overrun in cygwin_strcasecmp sys_mbstowcs is called with the destination buffer length set to MaximumLength from the receiving UNICODE_STRING buffer. This is twice as much as the actual size of the buffer in wchar_t units, which is the unit expected by sys_mbstowcs. sys_mbstowcs always attaches a NUL, within the destination buffersize given. But if the string is exactly one wchar_t less than the actual buffer, and the buffersize is given too large, sys_mbstowcs writes a NUL one wchar_t beyond the buffer. This has only been exposed with Cygwin 3.1.5 because alloca on newer gcc 9 apparently allocates more tightly. The alloca buffer here is requested with 16 bytes, which is exactly the number of bytes required for the string L"cmd.exe". Older gcc apparently allocated a few more bytes on the stack, while gcc 9 allocates in 16 byte granularity... Fix this by giving the correct destination buffer size to sys_mbstowcs. Fixes: https://cygwin.com/pipermail/cygwin/2020-June/245226.html Signed-off-by: Corinna Vinschen --- winsup/cygwin/release/3.1.6 | 3 +++ winsup/cygwin/strfuncs.cc | 32 +++++++++++++++++++------------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/winsup/cygwin/release/3.1.6 b/winsup/cygwin/release/3.1.6 index d64ee4c92..e06c0bc9a 100644 --- a/winsup/cygwin/release/3.1.6 +++ b/winsup/cygwin/release/3.1.6 @@ -9,3 +9,6 @@ Bug Fixes: ---------- - Fix IPPROTO_TCP option handling, especially in terms of TCP_MAXSEG. + +- Fix a buffer overrun in Cygwin-internal string comparison. + Fixes: https://cygwin.com/pipermail/cygwin/2020-June/245226.html diff --git a/winsup/cygwin/strfuncs.cc b/winsup/cygwin/strfuncs.cc index e0a4c7182..604d7611c 100644 --- a/winsup/cygwin/strfuncs.cc +++ b/winsup/cygwin/strfuncs.cc @@ -635,7 +635,7 @@ sys_cp_mbstowcs (mbtowc_p f_mbtowc, wchar_t *dst, size_t dlen, /* The technique is based on a discussion here: http://www.mail-archive.com/linux-utf8@nl.linux.org/msg00080.html - Invalid bytes in a multibyte secuence are converted to + Invalid bytes in a multibyte sequence are converted to the private use area which is already used to store ASCII chars invalid in Windows filenames. This technque allows to store them in a symmetric way. */ @@ -801,14 +801,18 @@ extern "C" int __stdcall cygwin_strcasecmp (const char *cs, const char *ct) { UNICODE_STRING us, ut; - ULONG len; + ULONG len, ulen; + + len = strlen (cs) + 1; + ulen = len * sizeof (WCHAR); + RtlInitEmptyUnicodeString (&us, (PWCHAR) alloca (ulen), ulen); + us.Length = sys_mbstowcs (us.Buffer, len, cs) * sizeof (WCHAR); + + len = strlen (ct) + 1; + ulen = len * sizeof (WCHAR); + RtlInitEmptyUnicodeString (&ut, (PWCHAR) alloca (ulen), ulen); + ut.Length = sys_mbstowcs (ut.Buffer, len, ct) * sizeof (WCHAR); - len = (strlen (cs) + 1) * sizeof (WCHAR); - RtlInitEmptyUnicodeString (&us, (PWCHAR) alloca (len), len); - us.Length = sys_mbstowcs (us.Buffer, us.MaximumLength, cs) * sizeof (WCHAR); - len = (strlen (ct) + 1) * sizeof (WCHAR); - RtlInitEmptyUnicodeString (&ut, (PWCHAR) alloca (len), len); - ut.Length = sys_mbstowcs (ut.Buffer, ut.MaximumLength, ct) * sizeof (WCHAR); return RtlCompareUnicodeString (&us, &ut, TRUE); } @@ -816,19 +820,21 @@ extern "C" int __stdcall cygwin_strncasecmp (const char *cs, const char *ct, size_t n) { UNICODE_STRING us, ut; - ULONG len; + ULONG ulen; size_t ls = 0, lt = 0; while (cs[ls] && ls < n) ++ls; - len = (ls + 1) * sizeof (WCHAR); - RtlInitEmptyUnicodeString (&us, (PWCHAR) alloca (len), len); + ulen = (ls + 1) * sizeof (WCHAR); + RtlInitEmptyUnicodeString (&us, (PWCHAR) alloca (ulen), ulen); us.Length = sys_mbstowcs (us.Buffer, ls + 1, cs, ls) * sizeof (WCHAR); + while (ct[lt] && lt < n) ++lt; - len = (lt + 1) * sizeof (WCHAR); - RtlInitEmptyUnicodeString (&ut, (PWCHAR) alloca (len), len); + ulen = (lt + 1) * sizeof (WCHAR); + RtlInitEmptyUnicodeString (&ut, (PWCHAR) alloca (ulen), ulen); ut.Length = sys_mbstowcs (ut.Buffer, lt + 1, ct, lt) * sizeof (WCHAR); + return RtlCompareUnicodeString (&us, &ut, TRUE); } From 104caeb7b1dcd1377dfcfc267c95e1159cf83ef6 Mon Sep 17 00:00:00 2001 From: Eshan dhawan via Newlib Date: Sat, 4 Jul 2020 04:11:06 +0530 Subject: [PATCH 402/520] Removed #ifndef _ARM_PCS_VFP_ from sys/fenv.h for arm Signed-off-by: Eshan dhawan --- newlib/libc/machine/arm/sys/fenv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newlib/libc/machine/arm/sys/fenv.h b/newlib/libc/machine/arm/sys/fenv.h index af74c5f47..740995a1a 100644 --- a/newlib/libc/machine/arm/sys/fenv.h +++ b/newlib/libc/machine/arm/sys/fenv.h @@ -94,7 +94,7 @@ extern const fenv_t *_fe_dfl_env; #define _ENABLE_MASK (FE_ALL_EXCEPT << _FPUSW_SHIFT) #endif -#ifndef __ARM_PCS_VFP + int feclearexcept(int excepts); int fegetexceptflag(fexcept_t *flagp, int excepts); @@ -113,7 +113,7 @@ int fedisableexcept(int __mask); int fegetexcept(void); #endif /* __BSD_VISIBLE */ -#endif /* __ARM_PCS_VFP */ + #ifdef __cplusplus } From 54bb6589c31e211e9443c3f1a80b9d07409ed7a4 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Tue, 7 Jul 2020 13:00:36 -0600 Subject: [PATCH 403/520] fhandler_proc.cc(format_proc_cpuinfo): add microcode registry lookup values Re: CPU microcode reported wrong in /proc/cpuinfo https://sourceware.org/pipermail/cygwin/2020-May/245063.html earlier Windows releases used different registry values to store microcode revisions depending on the MSR name being used to get microcode revisions: add these alternative registry values to the cpuinfo registry value lookup; iterate thru the registry data until a valid microcode revision is found; some revision values are in the high bits, so if the low bits are all clear, shift the revision value down into the low bits --- winsup/cygwin/fhandler_proc.cc | 44 +++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index f1bc1c740..f637dfd8e 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -692,26 +692,52 @@ format_proc_cpuinfo (void *, char *&destbuf) union { LONG uc_len; /* -max size of buffer before call */ - char uc_microcode[16]; - } uc; + char uc_microcode[16]; /* at least 8 bytes */ + } uc[4]; /* microcode values changed historically */ - RTL_QUERY_REGISTRY_TABLE tab[3] = + RTL_QUERY_REGISTRY_TABLE tab[6] = { { NULL, RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOSTRING, - L"~Mhz", &cpu_mhz, REG_NONE, NULL, 0 }, + L"~Mhz", &cpu_mhz, REG_NONE, NULL, 0 }, { NULL, RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOSTRING, - L"Update Revision", &uc, REG_NONE, NULL, 0 }, + L"Update Revision", &uc[0], REG_NONE, NULL, 0 }, + /* latest MSR */ + { NULL, RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOSTRING, + L"Update Signature", &uc[1], REG_NONE, NULL, 0 }, + /* previous MSR */ + { NULL, RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOSTRING, + L"CurrentPatchLevel", &uc[2], REG_NONE, NULL, 0 }, + /* earlier MSR */ + { NULL, RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOSTRING, + L"Platform Specific Field1", &uc[3], REG_NONE, NULL, 0 }, + /* alternative */ { NULL, 0, NULL, NULL, 0, NULL, 0 } }; - memset (&uc, 0, sizeof (uc.uc_microcode)); - uc.uc_len = -16; /* -max size of microcode buffer */ + for (size_t uci = 0; uci < sizeof (uc)/sizeof (*uc); ++uci) + { + memset (&uc[uci], 0, sizeof (uc[uci])); + uc[uci].uc_len = -(LONG)sizeof (uc[0].uc_microcode); + /* neg buffer size */ + } + RtlQueryRegistryValues (RTL_REGISTRY_ABSOLUTE, cpu_key, tab, NULL, NULL); cpu_mhz = ((cpu_mhz - 1) / 10 + 1) * 10; /* round up to multiple of 10 */ DWORD bogomips = cpu_mhz * 2; /* bogomips is double cpu MHz since MMX */ - long long microcode = 0; /* at least 8 bytes for AMD */ - memcpy (µcode, &uc, sizeof (microcode)); + + unsigned long long microcode = 0; /* needs 8 bytes */ + for (size_t uci = 0; uci < sizeof (uc)/sizeof (*uc) && !microcode; ++uci) + { + /* still neg buffer size => no data */ + if (-(LONG)sizeof (uc[uci].uc_microcode) != uc[uci].uc_len) + { + memcpy (µcode, uc[uci].uc_microcode, sizeof (microcode)); + + if (!(microcode & 0xFFFFFFFFLL)) /* some values in high bits */ + microcode <<= 32; /* shift them down */ + } + } bufptr += __small_sprintf (bufptr, "processor\t: %d\n", cpu_number); uint32_t maxf, vendor_id[4], unused; From 7b2c7fca04e4bee7a5d3ad09ed6e31bc605dfc0f Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Tue, 7 Jul 2020 13:00:37 -0600 Subject: [PATCH 404/520] format_proc_cpuinfo: fix microcode revision shift direction --- winsup/cygwin/fhandler_proc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index f637dfd8e..2396bfe57 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -735,7 +735,7 @@ format_proc_cpuinfo (void *, char *&destbuf) memcpy (µcode, uc[uci].uc_microcode, sizeof (microcode)); if (!(microcode & 0xFFFFFFFFLL)) /* some values in high bits */ - microcode <<= 32; /* shift them down */ + microcode >>= 32; /* shift them down */ } } From 4b94604c79abb19bcc56a6cd726e35b9133c184a Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 9 Jul 2020 09:55:34 +0200 Subject: [PATCH 405/520] Cygwin: add microcode patch to release messages Signed-off-by: Corinna Vinschen --- winsup/cygwin/release/3.1.6 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/release/3.1.6 b/winsup/cygwin/release/3.1.6 index e06c0bc9a..56204ed72 100644 --- a/winsup/cygwin/release/3.1.6 +++ b/winsup/cygwin/release/3.1.6 @@ -12,3 +12,6 @@ Bug Fixes: - Fix a buffer overrun in Cygwin-internal string comparison. Fixes: https://cygwin.com/pipermail/cygwin/2020-June/245226.html + +- Fix microcode registry lookup for /proc/cpuinfo output. + Fixes: https://cygwin.com/pipermail/cygwin/2020-May/245063.html From b3af1d5aa30c093aa96e1a4e61e05c3e984e635f Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 9 Jul 2020 10:14:20 +0200 Subject: [PATCH 406/520] Cygwin: Bump DLL version to 3.1.7 Signed-off-by: Corinna Vinschen --- winsup/cygwin/include/cygwin/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index b9afd279a..1de342056 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -11,7 +11,7 @@ details. */ changes to the DLL and is mainly informative in nature. */ #define CYGWIN_VERSION_DLL_MAJOR 3001 -#define CYGWIN_VERSION_DLL_MINOR 6 +#define CYGWIN_VERSION_DLL_MINOR 7 /* Major numbers before CYGWIN_VERSION_DLL_EPOCH are incompatible. */ From 462fcdb67f21c4806641c1cbbe0bc01a11d5ce44 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 10 Jul 2020 10:29:33 +0200 Subject: [PATCH 407/520] Cygwin: convert sys_wcstombs/sys_mbstowcs wrapper to inline functions This should slightly speed up especially path conversions, given there's one less function call rearranging all function arguments in registers/stack (and less stack pressure). For clarity, rename overloaded sys_wcstombs to _sys_wcstombs and sys_cp_mbstowcs to _sys_mbstowcs. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_console.cc | 2 +- winsup/cygwin/nlsfuncs.cc | 4 +-- winsup/cygwin/strfuncs.cc | 60 +++++++------------------------ winsup/cygwin/wchar.h | 60 +++++++++++++++++++++++-------- 4 files changed, 61 insertions(+), 65 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index dd979fb8e..52741ce8b 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -403,7 +403,7 @@ dev_console::get_console_cp () inline DWORD dev_console::str_to_con (mbtowc_p f_mbtowc, PWCHAR d, const char *s, DWORD sz) { - return sys_cp_mbstowcs (f_mbtowc, d, CONVERT_LIMIT, s, sz); + return _sys_mbstowcs (f_mbtowc, d, CONVERT_LIMIT, s, sz); } bool diff --git a/winsup/cygwin/nlsfuncs.cc b/winsup/cygwin/nlsfuncs.cc index 0099a967f..668d7eb9e 100644 --- a/winsup/cygwin/nlsfuncs.cc +++ b/winsup/cygwin/nlsfuncs.cc @@ -1542,11 +1542,11 @@ internal_setlocale () if (path && *path) /* $PATH can be potentially unset. */ { w_path = tp.w_get (); - sys_cp_mbstowcs (cygheap->locale.mbtowc, w_path, 32768, path); + _sys_mbstowcs (cygheap->locale.mbtowc, w_path, 32768, path); } w_cwd = tp.w_get (); cwdstuff::cwd_lock.acquire (); - sys_cp_mbstowcs (cygheap->locale.mbtowc, w_cwd, 32768, + _sys_mbstowcs (cygheap->locale.mbtowc, w_cwd, 32768, cygheap->cwd.get_posix ()); /* Set charset for internal conversion functions. */ cygheap->locale.mbtowc = __get_global_locale ()->mbtowc; diff --git a/winsup/cygwin/strfuncs.cc b/winsup/cygwin/strfuncs.cc index 604d7611c..07f2e48bb 100644 --- a/winsup/cygwin/strfuncs.cc +++ b/winsup/cygwin/strfuncs.cc @@ -410,9 +410,9 @@ __big5_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n, to buffer size, it's a bug in Cygwin and the buffer in the calling function should be raised. */ -static size_t __reg3 -sys_wcstombs (char *dst, size_t len, const wchar_t *src, size_t nwc, - bool is_path) +size_t +_sys_wcstombs (char *dst, size_t len, const wchar_t *src, size_t nwc, + bool is_path) { char buf[10]; char *ptr = dst; @@ -436,7 +436,7 @@ sys_wcstombs (char *dst, size_t len, const wchar_t *src, size_t nwc, /* Convert UNICODE private use area. Reverse functionality for the ASCII area <= 0x7f (only for path names) is transform_chars above. Reverse functionality for invalid bytes in a multibyte sequence is - in sys_cp_mbstowcs below. */ + in _sys_mbstowcs below. */ if (is_path && (pw & 0xff00) == 0xf000 && (((cwc = (pw & 0xff)) <= 0x7f && tfx_rev_chars[cwc] >= 0xf000) || (cwc >= 0x80 && MB_CUR_MAX > 1))) @@ -498,18 +498,6 @@ sys_wcstombs (char *dst, size_t len, const wchar_t *src, size_t nwc, return n; } -size_t __reg3 -sys_wcstombs (char *dst, size_t len, const wchar_t * src, size_t nwc) -{ - return sys_wcstombs (dst, len, src, nwc, true); -} - -size_t __reg3 -sys_wcstombs_no_path (char *dst, size_t len, const wchar_t * src, size_t nwc) -{ - return sys_wcstombs (dst, len, src, nwc, false); -} - /* Allocate a buffer big enough for the string, always including the terminating '\0'. The buffer pointer is returned in *dst_p, the return value is the number of bytes written to the buffer, as usual. @@ -520,13 +508,13 @@ sys_wcstombs_no_path (char *dst, size_t len, const wchar_t * src, size_t nwc) Note that this code is shared by cygserver (which requires it via __small_vsprintf) and so when built there plain calloc is the only choice. */ -static size_t __reg3 -sys_wcstombs_alloc (char **dst_p, int type, const wchar_t *src, size_t nwc, +size_t +_sys_wcstombs_alloc (char **dst_p, int type, const wchar_t *src, size_t nwc, bool is_path) { size_t ret; - ret = sys_wcstombs (NULL, (size_t) -1, src, nwc, is_path); + ret = _sys_wcstombs (NULL, (size_t) -1, src, nwc, is_path); if (ret > 0) { size_t dlen = ret + 1; @@ -537,32 +525,19 @@ sys_wcstombs_alloc (char **dst_p, int type, const wchar_t *src, size_t nwc, *dst_p = (char *) ccalloc ((cygheap_types) type, dlen, sizeof (char)); if (!*dst_p) return 0; - ret = sys_wcstombs (*dst_p, dlen, src, nwc, is_path); + ret = _sys_wcstombs (*dst_p, dlen, src, nwc, is_path); } return ret; } -size_t __reg3 -sys_wcstombs_alloc (char **dst_p, int type, const wchar_t *src, size_t nwc) -{ - return sys_wcstombs_alloc (dst_p, type, src, nwc, true); -} - -size_t __reg3 -sys_wcstombs_alloc_no_path (char **dst_p, int type, const wchar_t *src, - size_t nwc) -{ - return sys_wcstombs_alloc (dst_p, type, src, nwc, false); -} - -/* sys_cp_mbstowcs is actually most of the time called as sys_mbstowcs with +/* _sys_mbstowcs is actually most of the time called as sys_mbstowcs with a 0 codepage. If cp is not 0, the codepage is evaluated and used for the conversion. This is so that fhandler_console can switch to an alternate charset, which is the charset returned by GetConsoleCP (). Most of the time this is used for box and line drawing characters. */ -size_t __reg3 -sys_cp_mbstowcs (mbtowc_p f_mbtowc, wchar_t *dst, size_t dlen, - const char *src, size_t nms) +size_t +_sys_mbstowcs (mbtowc_p f_mbtowc, wchar_t *dst, size_t dlen, const char *src, + size_t nms) { wchar_t *ptr = dst; unsigned const char *pmbs = (unsigned const char *) src; @@ -670,17 +645,8 @@ sys_cp_mbstowcs (mbtowc_p f_mbtowc, wchar_t *dst, size_t dlen, return count; } -size_t __reg3 -sys_mbstowcs (wchar_t * dst, size_t dlen, const char *src, size_t nms) -{ - mbtowc_p f_mbtowc = __MBTOWC; - if (f_mbtowc == __ascii_mbtowc) - f_mbtowc = __utf8_mbtowc; - return sys_cp_mbstowcs (f_mbtowc, dst, dlen, src, nms); -} - /* Same as sys_wcstombs_alloc, just backwards. */ -size_t __reg3 +size_t sys_mbstowcs_alloc (wchar_t **dst_p, int type, const char *src, size_t nms) { size_t ret; diff --git a/winsup/cygwin/wchar.h b/winsup/cygwin/wchar.h index b3dacf3b5..42919054a 100644 --- a/winsup/cygwin/wchar.h +++ b/winsup/cygwin/wchar.h @@ -45,22 +45,52 @@ extern wctomb_f __utf8_wctomb; #ifdef __INSIDE_CYGWIN__ #ifdef __cplusplus -size_t __reg3 sys_wcstombs (char *dst, size_t len, const wchar_t * src, - size_t nwc = (size_t) -1); -size_t __reg3 sys_wcstombs_no_path (char *dst, size_t len, - const wchar_t * src, - size_t nwc = (size_t) -1); -size_t __reg3 sys_wcstombs_alloc (char **, int, const wchar_t *, - size_t = (size_t) -1); -size_t __reg3 sys_wcstombs_alloc_no_path (char **, int, const wchar_t *, - size_t = (size_t) -1); +extern size_t _sys_wcstombs (char *dst, size_t len, const wchar_t *src, + size_t nwc, bool is_path); +extern size_t _sys_wcstombs_alloc (char **dst_p, int type, const wchar_t *src, + size_t nwc, bool is_path); + +static inline size_t +sys_wcstombs (char *dst, size_t len, const wchar_t * src, + size_t nwc = (size_t) -1) +{ + return _sys_wcstombs (dst, len, src, nwc, true); +} + +static inline size_t +sys_wcstombs_no_path (char *dst, size_t len, const wchar_t * src, + size_t nwc = (size_t) -1) +{ + return _sys_wcstombs (dst, len, src, nwc, false); +} + +static inline size_t +sys_wcstombs_alloc (char **dst_p, int type, const wchar_t *src, + size_t nwc = (size_t) -1) +{ + return _sys_wcstombs_alloc (dst_p, type, src, nwc, true); +} + +static inline size_t +sys_wcstombs_alloc_no_path (char **dst_p, int type, const wchar_t *src, + size_t nwc = (size_t) -1) +{ + return _sys_wcstombs_alloc (dst_p, type, src, nwc, false); +} + +size_t _sys_mbstowcs (mbtowc_p, wchar_t *, size_t, const char *, + size_t = (size_t) -1); + +static inline size_t +sys_mbstowcs (wchar_t * dst, size_t dlen, const char *src, + size_t nms = (size_t) -1) +{ + mbtowc_p f_mbtowc = (__MBTOWC == __ascii_mbtowc) ? __utf8_mbtowc : __MBTOWC; + return _sys_mbstowcs (f_mbtowc, dst, dlen, src, nms); +} + +size_t sys_mbstowcs_alloc (wchar_t **, int, const char *, size_t = (size_t) -1); -size_t __reg3 sys_cp_mbstowcs (mbtowc_p, wchar_t *, size_t, const char *, - size_t = (size_t) -1); -size_t __reg3 sys_mbstowcs (wchar_t * dst, size_t dlen, const char *src, - size_t nms = (size_t) -1); -size_t __reg3 sys_mbstowcs_alloc (wchar_t **, int, const char *, - size_t = (size_t) -1); #endif /* __cplusplus */ #endif /* __INSIDE_CYGWIN__ */ From acfc63b0cf0df472a8e17df1bf5a2c8284e28833 Mon Sep 17 00:00:00 2001 From: David Allsopp Date: Thu, 9 Jul 2020 20:17:03 +0100 Subject: [PATCH 408/520] Fix invalid acl_entry_t on 32-bit Cygwin If the acl_t struct was at or above 0x80000000 then the pointer was sign-extended to 0xffff_ffff_8000_0000 and so the index was lost. Signed-off-by: David Allsopp --- winsup/cygwin/release/3.1.7 | 4 ++++ winsup/cygwin/sec_posixacl.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 winsup/cygwin/release/3.1.7 diff --git a/winsup/cygwin/release/3.1.7 b/winsup/cygwin/release/3.1.7 new file mode 100644 index 000000000..6ce316fc4 --- /dev/null +++ b/winsup/cygwin/release/3.1.7 @@ -0,0 +1,4 @@ +Bug Fixes: +---------- + +- Fix acl_get_* functions in 32-bit Cygwin (pointer sign extension) diff --git a/winsup/cygwin/sec_posixacl.h b/winsup/cygwin/sec_posixacl.h index a3790a52b..0f9e7bde3 100644 --- a/winsup/cygwin/sec_posixacl.h +++ b/winsup/cygwin/sec_posixacl.h @@ -34,7 +34,7 @@ struct __acl_t inline acl_entry_t __to_entry (acl_t acl, uint16_t idx) { - return ((uint64_t) idx << 48) | (uint64_t) acl; + return ((uint64_t) idx << 48) | (uint64_t) ((uintptr_t) acl); } #define __to_permset(a,i) ((acl_permset_t)__to_entry((a),(i))) From 6c772f4547c5eea46fb814806509b78f08dfdfa1 Mon Sep 17 00:00:00 2001 From: Keith Packard via Newlib Date: Thu, 9 Jul 2020 16:58:45 -0700 Subject: [PATCH 409/520] libc/iconv: Detect CES handler loading failure Fix the code checking for character set loading failure so that it checks the return value from the init function. Signed-off-by: Keith Packard --- newlib/libc/iconv/ces/euc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libc/iconv/ces/euc.c b/newlib/libc/iconv/ces/euc.c index 29d36f941..ebd7091b0 100644 --- a/newlib/libc/iconv/ces/euc.c +++ b/newlib/libc/iconv/ces/euc.c @@ -306,7 +306,7 @@ ok: data->data[i] = _iconv_to_ucs_ces_handlers_table.init ( rptr, data->desc[i].csname); - if (data->data == NULL) + if (data->data[i] == NULL) goto error; } From 2c33d31fa81d97addab774a2b460a3779990c132 Mon Sep 17 00:00:00 2001 From: Keith Packard via Newlib Date: Thu, 9 Jul 2020 16:58:46 -0700 Subject: [PATCH 410/520] libc/iconv: Remove unneeded pointer var for _iconv_aliases The pointer value for the iconv alias data never changes, so get rid of the pointer and make it an array instead. Signed-off-by: Keith Packard --- newlib/libc/iconv/lib/aliasesbi.c | 5 ++--- newlib/libc/iconv/lib/local.h | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/newlib/libc/iconv/lib/aliasesbi.c b/newlib/libc/iconv/lib/aliasesbi.c index dfd7090d0..83b6fd003 100644 --- a/newlib/libc/iconv/lib/aliasesbi.c +++ b/newlib/libc/iconv/lib/aliasesbi.c @@ -5,8 +5,8 @@ #include <_ansi.h> #include "encnames.h" -const char * -_iconv_aliases = +const char +_iconv_aliases[] = { #if defined (_ICONV_FROM_ENCODING_BIG5) \ || defined (_ICONV_TO_ENCODING_BIG5) @@ -210,4 +210,3 @@ _iconv_aliases = #endif "" }; - diff --git a/newlib/libc/iconv/lib/local.h b/newlib/libc/iconv/lib/local.h index bd9dcddca..2d3a16969 100644 --- a/newlib/libc/iconv/lib/local.h +++ b/newlib/libc/iconv/lib/local.h @@ -57,10 +57,8 @@ typedef __uint16_t ucs2_t; /* 32-bit UCS-4 type */ typedef __uint32_t ucs4_t; - /* The list of built-in encoding names and aliases */ -extern const char * -_iconv_aliases; +extern const char _iconv_aliases[]; #endif /* !__ICONV_LIB_LOCAL_H__ */ From 24f3c6195395b8836f51fbfaeca35062c60bb056 Mon Sep 17 00:00:00 2001 From: Keith Packard via Newlib Date: Thu, 9 Jul 2020 16:58:47 -0700 Subject: [PATCH 411/520] libc/iconv: find_alias was mis-computing remaining alias table length This caused the strnstr to walk off the end of the alias array and fetch invalid data. Instead of attempting to update 'len', just re-compute it based on the table end pointer that is already known. Signed-off-by: Keith Packard --- newlib/libc/iconv/lib/aliasesi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libc/iconv/lib/aliasesi.c b/newlib/libc/iconv/lib/aliasesi.c index d04cebb57..ef5ce4109 100644 --- a/newlib/libc/iconv/lib/aliasesi.c +++ b/newlib/libc/iconv/lib/aliasesi.c @@ -115,7 +115,7 @@ search_again: && (p+l == table_end || isspace (*(p+l)) || *(p+l) == '\n'))) { ptable = p + l; - len -= table - p; + len = table_end - ptable; goto search_again; } From b21ad33e088e1c302e3b88e052f6a4ee903fa51b Mon Sep 17 00:00:00 2001 From: Keith Packard via Newlib Date: Thu, 9 Jul 2020 16:58:48 -0700 Subject: [PATCH 412/520] testsuite: Fix iconv tests to use new encoding config defines _ICONV_CONVERTER -> ICONV_FROM_ENCODING. It's not perfect, as the library can support different from/to encodings now, but at least in the default configurations the tests now work. Signed-off-by: Keith Packard --- newlib/testsuite/newlib.iconv/iconvjp.c | 61 ++++++++++++------------- newlib/testsuite/newlib.iconv/iconvnm.c | 8 ++-- newlib/testsuite/newlib.iconv/iconvru.c | 26 +++++------ 3 files changed, 47 insertions(+), 48 deletions(-) diff --git a/newlib/testsuite/newlib.iconv/iconvjp.c b/newlib/testsuite/newlib.iconv/iconvjp.c index 2022851a3..6c85399c7 100644 --- a/newlib/testsuite/newlib.iconv/iconvjp.c +++ b/newlib/testsuite/newlib.iconv/iconvjp.c @@ -31,12 +31,12 @@ #ifdef _ICONV_ENABLED -#if defined(_ICONV_CONVERTER_UTF_8) || \ - defined(_ICONV_CONVERTER_EUC_JP) || \ - defined(_ICONV_CONVERTER_SHIFT_JIS) || \ - defined(_ICONV_CONVERTER_UCS_2_INTERNAL) +#if defined(_ICONV_FROM_ENCODING_UTF_8) || \ + defined(_ICONV_FROM_ENCODING_EUC_JP) || \ + defined(_ICONV_FROM_ENCODING_SHIFT_JIS) || \ + defined(_ICONV_FROM_ENCODING_UCS_2_INTERNAL) -#ifdef _ICONV_CONVERTER_UTF_8 +#ifdef _ICONV_FROM_ENCODING_UTF_8 char utf8[] = { 0xe8,0x89,0xb2,0xe3,0x80,0x85,0xe3,0x83,0x86,0xe3, @@ -227,9 +227,9 @@ char utf8[] = 0x95,0xe3,0x82,0xa9,0xe3,0x83,0xbc,0xe3,0x83,0x9e, 0xe3,0x83,0x83,0xe3,0x83,0x88,0x0d,0xa }; -#endif /* ifdef _ICONV_CONVERTER_UTF_8 */ - -#ifdef _ICONV_CONVERTER_EUC_JP +#endif /* ifdef _ICONV_FROM_ENCODING_UTF_8 */ + +#ifdef _ICONV_FROM_ENCODING_EUC_JP char euc_jp[] = { 0xbf,0xa7,0xa1,0xb9,0xa5,0xc6,0xa5,0xad,0xa5,0xb9, @@ -394,10 +394,10 @@ char utf8[] = 0xa5,0xca,0xa5,0xea,0x49,0x49,0xa5,0xd5,0xa5,0xa9, 0xa1,0xbc,0xa5,0xde,0xa5,0xc3,0xa5,0xc8,0x0d,0x0a }; -#endif /* #ifdef _ICONV_CONVERTER_EUC_JP */ +#endif /* #ifdef _ICONV_FROM_ENCODING_EUC_JP */ -#ifdef _ICONV_CONVERTER_SHIFT_JIS -char shift_jis[] = +#ifdef _ICONV_FROM_ENCODING_SHIFT_JIS +char shift_jis[] = { 0x90,0x46,0x81,0x58,0x83,0x65,0x83,0x4c,0x83,0x58, 0x83,0x67,0x83,0x74,0x83,0x40,0x83,0x43,0x83,0x8b, @@ -561,9 +561,9 @@ char shift_jis[] = 0x83,0x69,0x83,0x8a,0x49,0x49,0x83,0x74,0x83,0x48, 0x81,0x5b,0x83,0x7d,0x83,0x62,0x83,0x67,0x0d,0x0a }; -#endif /* _ICONV_CONVERTER_SHIFT_JIS */ +#endif /* _ICONV_FROM_ENCODING_SHIFT_JIS */ -#ifdef _ICONV_CONVERTER_UCS_2_INTERNAL +#ifdef _ICONV_FROM_ENCODING_UCS_2_INTERNAL short ucs2[] = { 0x8272,0x3005,0x30c6,0x30ad,0x30b9, @@ -849,18 +849,18 @@ struct iconv_data #define CONVERSIONS 4 -struct iconv_data data[] = +struct iconv_data data[] = { -#ifdef _ICONV_CONVERTER_EUC_JP +#if defined(_ICONV_FROM_ENCODING_EUC_JP) && defined(_ICONV_TO_ENCODING_EUC_JP) {sizeof(euc_jp), "EUC-JP", (char *)euc_jp}, #endif -#ifdef _ICONV_CONVERTER_SHIFT_JIS +#if defined(_ICONV_FROM_ENCODING_SHIFT_JIS) && defined(_ICONV_TO_ENCODING_SHIFT_JIS) {sizeof(shift_jis), "SHIFT-JIS", (char *)shift_jis}, #endif -#ifdef _ICONV_CONVERTER_UTF_8 +#if defined(_ICONV_FROM_ENCODING_UTF_8) && defined(_ICONV_TO_ENCODING_UTF_8) {sizeof(utf8), "UTF-8", (char *)utf8}, #endif -#ifdef _ICONV_CONVERTER_UCS_2_INTERNAL +#if defined(_ICONV_FROM_ENCODING_UCS_2_INTERNAL) && defined(_ICONV_TO_ENCODING_UCS_2_INTERNAL) {sizeof(ucs2), "UCS-2-INTERNAL", (char *)ucs2}, #endif {0, NULL, NULL} @@ -881,7 +881,7 @@ int main(int argc, char **argv) int conversions = sizeof(data)/sizeof(struct iconv_data) - 1; puts("JP iconv test"); - + for (i = 0; i < conversions; i++) { for (j = 0; j < conversions; j++) @@ -895,7 +895,7 @@ int main(int argc, char **argv) } } } - + d = 0; for (i = 0; i < conversions; i++) { @@ -911,8 +911,8 @@ int main(int argc, char **argv) perror("Can't reset shift state"); CHECK(ERROR); } - - n = iconv(descs[d++], (const char **)&(inbuf), &inbytes, + + n = iconv(descs[d++], (const char **)&(inbuf), &inbytes, (char **)&outbuf, &outbytes); if (n == (size_t)-1) { @@ -921,7 +921,7 @@ int main(int argc, char **argv) perror(""); CHECK(ERROR); } - + if (data[j].len != OUTBUF_LEN - outbytes) { printf("Conversion from %s to %s FAILED", @@ -930,7 +930,7 @@ int main(int argc, char **argv) OUTBUF_LEN - outbytes, data[j].len); CHECK(ERROR); } - + for (k = 0; k < data[j].len; k++) { if (ob[k] != data[j].data[k]) @@ -940,18 +940,18 @@ int main(int argc, char **argv) printf("Error: byte %d is wrong\n", k); printf("outbuf value: %#x, inbuf value %#x, " "right value: %#x\n", - (int)ob[k], (int)(data[i].data[k]), + (int)ob[k], (int)(data[i].data[k]), (int)(data[j].data[k])); CHECK(ERROR); } } printf("iconv from %s to %s was successfully done\n", - data[i].name, data[j].name); - + data[i].name, data[j].name); + } } - + d = 0; for (i = 0; i < conversions; i++) for (j = 0; j < conversions; j++) @@ -960,14 +960,14 @@ int main(int argc, char **argv) exit(0); } -#else /* #if defined(_ICONV_CONVERTER_UTF_8) || ... */ +#else /* #if defined(_ICONV_FROM_ENCODING_UTF_8) || ... */ int main(int argc, char **argv) { puts("None of UTF-8, EUC-JP, SHIFT-JIS and UCS-2_INTERNAL converters " "linked, SKIP test"); exit(0); } -#endif /* #if defined(_ICONV_CONVERTER_UTF_8) || ... */ +#endif /* #if defined(_ICONV_FROM_ENCODING_UTF_8) || ... */ #else /* #ifdef _ICONV_ENABLED */ int main(int argc, char **argv) @@ -976,4 +976,3 @@ int main(int argc, char **argv) exit(0); } #endif /* #ifdef _ICONV_ENABLED */ - diff --git a/newlib/testsuite/newlib.iconv/iconvnm.c b/newlib/testsuite/newlib.iconv/iconvnm.c index d7ef2162c..b3ebc4765 100644 --- a/newlib/testsuite/newlib.iconv/iconvnm.c +++ b/newlib/testsuite/newlib.iconv/iconvnm.c @@ -33,13 +33,13 @@ #ifdef _ICONV_ENABLED char *good_names[] = { -#ifdef _ICONV_CONVERTER_ISO_8859_5 +#ifdef _ICONV_FROM_ENCODING_ISO_8859_5 "iso_8859_5", "iso-8859-5", "iso-8859_5", "IsO-8859_5" -#elif defined _ICONV_CONVERTER_US_ASCII +#elif defined _ICONV_FROM_ENCODING_US_ASCII "us_ascii", "US_ASCII", "us-ASCII", "US-ASCII" -#elif defined _ICONV_CONVERTER_EUC_JP +#elif defined _ICONV_FROM_ENCODING_EUC_JP "euc-jp", "EUC_JP", "euc-JP", "EUC-JP" -#elif defined _ICONV_CONVERTER_UTF_8 +#elif defined _ICONV_FROM_ENCODING_UTF_8 "utf_8", "UTF_8", "uTf-8", "UTF-8" #else #endif diff --git a/newlib/testsuite/newlib.iconv/iconvru.c b/newlib/testsuite/newlib.iconv/iconvru.c index 7f02ebcbd..aa56603e6 100644 --- a/newlib/testsuite/newlib.iconv/iconvru.c +++ b/newlib/testsuite/newlib.iconv/iconvru.c @@ -32,11 +32,11 @@ #ifdef _ICONV_ENABLED -#if defined(_ICONV_CONVERTER_UTF_8) || \ - defined(_ICONV_CONVERTER_ISO_8859_5) || \ - defined(_ICONV_CONVERTER_KOI8_R) +#if defined(_ICONV_FROM_ENCODING_UTF_8) || \ + defined(_ICONV_FROM_ENCODING_ISO_8859_5) || \ + defined(_ICONV_FROM_ENCODING_KOI8_R) -#ifdef _ICONV_CONVERTER_ISO_8859_5 +#ifdef _ICONV_FROM_ENCODING_ISO_8859_5 char iso_8859_5[] = { 0xbe,0xdf,0xd5,0xe0,0xd0,0xe2,0xde,0xe0,0xeb,0x20, @@ -137,9 +137,9 @@ char iso_8859_5[] = 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d, 0x2d,0x2d,0x3e,0x0a }; -#endif /* #ifdef _ICONV_CONVERTER_ISO_8859_5 */ +#endif /* #ifdef _ICONV_FROM_ENCODING_ISO_8859_5 */ -#ifdef _ICONV_CONVERTER_KOI8_R +#ifdef _ICONV_FROM_ENCODING_KOI8_R char koi8_r[] = { 0xef,0xd0,0xc5,0xd2,0xc1,0xd4,0xcf,0xd2,0xd9,0x20, @@ -240,9 +240,9 @@ char koi8_r[] = 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d, 0x2d,0x2d,0x3e,0x0a }; -#endif /* #ifdef _ICONV_CONVERTER_KOI8_R */ +#endif /* #ifdef _ICONV_FROM_ENCODING_KOI8_R */ -#ifdef _ICONV_CONVERTER_UTF_8 +#ifdef _ICONV_FROM_ENCODING_UTF_8 char utf8[] = { 0xd0,0x9e,0xd0,0xbf,0xd0,0xb5,0xd1,0x80,0xd0,0xb0, @@ -365,13 +365,13 @@ struct iconv_data struct iconv_data data[] = { -#ifdef _ICONV_CONVERTER_ISO_8859_5 +#ifdef _ICONV_FROM_ENCODING_ISO_8859_5 {sizeof(iso_8859_5), "ISO-8859-5", (char *)iso_8859_5}, #endif -#ifdef _ICONV_CONVERTER_KOI8_R +#ifdef _ICONV_FROM_ENCODING_KOI8_R {sizeof(koi8_r), "KOI8-R", (char *)koi8_r}, #endif -#ifdef _ICONV_CONVERTER_UTF_8 +#ifdef _ICONV_FROM_ENCODING_UTF_8 {sizeof(utf8), "UTF-8", (char *)utf8}, #endif {0, NULL, NULL} @@ -471,13 +471,13 @@ int main(int argc, char **argv) exit(0); } -#else /* #if defined(_ICONV_CONVERTER_UTF_8) || ... */ +#else /* #if defined(_ICONV_FROM_ENCODING_UTF_8) || ... */ int main(int argc, char **argv) { puts("None of ISO-8859-5, KOI8-R and UTF-8 converters linked, SKIP test"); exit(0); } -#endif /* #if defined(_ICONV_CONVERTER_UTF_8) || ... */ +#endif /* #if defined(_ICONV_FROM_ENCODING_UTF_8) || ... */ #else /* #ifdef _ICONV_ENABLED */ int main(int argc, char **argv) From f2a285bd4f424f0c84017b6051dcdd8acf221de8 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Wed, 10 Jun 2020 14:52:41 +0100 Subject: [PATCH 413/520] Cygwin: Slightly improve error_start documentation --- winsup/doc/cygwinenv.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/doc/cygwinenv.xml b/winsup/doc/cygwinenv.xml index f549fee0d..a52b6ac19 100644 --- a/winsup/doc/cygwinenv.xml +++ b/winsup/doc/cygwinenv.xml @@ -28,9 +28,13 @@ Defaults to off. which is useful for debugging. Win32filepath is usually set to the path to gdb or dumper, for example -C:\cygwin\bin\gdb.exe. +C:\cygwin\bin\gdb.exe. There is no default set. + +The filename of the executing program and it's Windows process id are appended +to the command as arguments. + From 38f88601469f4a6ab7cf42e1f076775c99eb17f2 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Mon, 29 Jun 2020 14:36:00 +0100 Subject: [PATCH 414/520] Cygwin: Update ELF target used by dumper on x86_64 Like [1], but actually making the effort to be 'usable' and 'tested'. [1] https://cygwin.com/pipermail/cygwin/2019-October/242815.html --- winsup/utils/dumper.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc index 226c2283d..e16d80a36 100644 --- a/winsup/utils/dumper.cc +++ b/winsup/utils/dumper.cc @@ -645,7 +645,13 @@ dumper::init_core_dump () { bfd_init (); - core_bfd = bfd_openw (file_name, "elf32-i386"); +#ifdef __x86_64__ + const char *target = "elf64-x86-64"; +#else + const char *target = "elf32-i386"; +#endif + + core_bfd = bfd_openw (file_name, target); if (core_bfd == NULL) { bfd_perror ("opening bfd"); @@ -658,7 +664,7 @@ dumper::init_core_dump () goto failed; } - if (!bfd_set_arch_mach (core_bfd, bfd_arch_i386, 0)) + if (!bfd_set_arch_mach (core_bfd, bfd_arch_i386, 0 /* = default */)) { bfd_perror ("setting bfd architecture"); goto failed; From 7dd1b08836e8a7bb37d330995096540afce152a0 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Mon, 29 Jun 2020 16:45:26 +0100 Subject: [PATCH 415/520] Cygwin: Add a new win32_pstatus data type for modules on x86_64 Also take a bit more care with sizes in other data types to ensure they are the same on x86 and x86_64. Add some explanatory comments. --- winsup/cygwin/include/cygwin/core_dump.h | 16 ++++++++++++---- winsup/utils/dumper.cc | 4 ++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/include/cygwin/core_dump.h b/winsup/cygwin/include/cygwin/core_dump.h index 92ecae7ab..cd218ac45 100644 --- a/winsup/cygwin/include/cygwin/core_dump.h +++ b/winsup/cygwin/include/cygwin/core_dump.h @@ -11,17 +11,23 @@ details. */ #ifndef _CYGWIN_CORE_DUMP_H #define _CYGWIN_CORE_DUMP_H +/* + Note that elfcore_grok_win32pstatus() in libbfd relies on the precise layout + of these structures. +*/ + #include #define NOTE_INFO_PROCESS 1 #define NOTE_INFO_THREAD 2 #define NOTE_INFO_MODULE 3 +#define NOTE_INFO_MODULE64 4 struct win32_core_process_info { DWORD pid; - int signal; - int command_line_size; + DWORD signal; + DWORD command_line_size; char command_line[1]; } #ifdef __GNUC__ @@ -40,10 +46,12 @@ struct win32_core_thread_info #endif ; +/* Used with data_type NOTE_INFO_MODULE or NOTE_INFO_MODULE64, depending on + arch */ struct win32_core_module_info { void* base_address; - int module_name_size; + DWORD module_name_size; char module_name[1]; } #ifdef __GNUC__ @@ -53,7 +61,7 @@ struct win32_core_module_info struct win32_pstatus { - unsigned long data_type; + DWORD data_type; union { struct win32_core_process_info process_info; diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc index e16d80a36..dcf01e800 100644 --- a/winsup/utils/dumper.cc +++ b/winsup/utils/dumper.cc @@ -502,7 +502,11 @@ dumper::dump_module (asection * to, process_module * module) strncpy (header.elf_note_header.name, "win32module", NOTE_NAME_SIZE); #pragma GCC diagnostic pop +#ifdef __x86_64__ + module_pstatus_ptr->data_type = NOTE_INFO_MODULE64; +#else module_pstatus_ptr->data_type = NOTE_INFO_MODULE; +#endif module_pstatus_ptr->data.module_info.base_address = module->base_address; module_pstatus_ptr->data.module_info.module_name_size = strlen (module->name) + 1; strcpy (module_pstatus_ptr->data.module_info.module_name, module->name); From 2a0e84c8dbe0dba5bd5f5ef652f61a1fd1e8d0fb Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Wed, 1 Jul 2020 14:00:53 +0100 Subject: [PATCH 416/520] Cygwin: Make dumper scan more than first 4GB of VM on x86_64 It's unclear that we need an end address here at all, or can just rely on VirtualQueryEx() failing when we reach the end of memory regions. --- winsup/utils/dumper.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc index dcf01e800..ccc4bd12f 100644 --- a/winsup/utils/dumper.cc +++ b/winsup/utils/dumper.cc @@ -296,7 +296,7 @@ dumper::collect_memory_sections () return 0; LPBYTE current_page_address; - LPBYTE last_base = (LPBYTE) 0xFFFFFFFF; + LPBYTE last_base = (LPBYTE) -1; SIZE_T last_size = (SIZE_T) 0; SIZE_T done; @@ -307,7 +307,7 @@ dumper::collect_memory_sections () if (hProcess == NULL) return 0; - for (current_page_address = 0; current_page_address < (LPBYTE) 0xFFFF0000;) + for (current_page_address = 0; current_page_address < (LPBYTE) -1;) { if (!VirtualQueryEx (hProcess, current_page_address, &mbi, sizeof (mbi))) break; From 906ce51747790e36f0d8f44a1b0658ad7f4f28c7 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Mon, 13 Jul 2020 06:58:56 -0600 Subject: [PATCH 417/520] Cygwin: FAQ 1.5: Clarify "What version is this" Patch to: https://sourceware.org/git/?p=newlib-cygwin.git;f=winsup/doc/faq-what.xml;a=blob as a result of thread: https://cygwin.com/pipermail/cygwin/2020-July/245442.html and comments: https://cygwin.com/pipermail/cygwin-patches/2020q3/010331.html Relate Cygwin DLL to Unix kernel, add required options to command examples, differentiate Unix and Cygwin commands; mention that the cygwin package contains the DLL, replace setup.exe reference by Cygwin Setup program wording. --- winsup/doc/faq-what.xml | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/winsup/doc/faq-what.xml b/winsup/doc/faq-what.xml index ce3483017..772fc0464 100644 --- a/winsup/doc/faq-what.xml +++ b/winsup/doc/faq-what.xml @@ -85,25 +85,34 @@ freedoms, so it is free software. To find the version of the Cygwin DLL installed, you can use -uname as on Linux or cygcheck. Refer to each command's +uname -r as you would for a Unix kernel. +As the Cygwin DLL takes the place of a Unix kernel, +you can also use the Unix compatible command: +head /proc/version, +or the Cygwin specific command: +cygcheck -V. +Refer to each command's --help output and the Cygwin User's Guide for more information. If you are looking for the version number for the whole Cygwin -release, there is none. Each package in the Cygwin release has its own -version. The packages in Cygwin are continually improving, thanks to -the efforts of net volunteers who maintain the Cygwin binary ports. +release, there is none. +Each package in the Cygwin release has its own version, and the +cygwin package containing the Cygwin DLL and Cygwin +system specific utilities is just another (but very important!) package. +The packages in Cygwin are continually improving, thanks to +the efforts of volunteers who maintain the Cygwin ports. Each package has its own version numbers and its own release process. So, how do you get the most up-to-date version of Cygwin? Easy. Just -download the Cygwin Setup program by following the instructions -here. -The setup program will handle the task of updating the packages on your system -to the latest version. For more information about using Cygwin's -setup.exe, see +download the Cygwin Setup program by following the +installation instructions. +The Setup program will handle the task of updating the packages on your system +to the latest version. +For more information about using Cygwin's Setup program, see Setting Up Cygwin -in the Cygwin User's Guide. +in the Cygwin User's Guide. From b1237e64fd03a3b802b9fedde298505e22b3f07f Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Mon, 13 Jul 2020 07:30:07 -0600 Subject: [PATCH 418/520] Cygwin: FAQ 1.6: Update "Who's behind the project?" winsup/doc/faq-what.xml: remove Red Hat, Net, Win32 references and clean up --- winsup/doc/faq-what.xml | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/winsup/doc/faq-what.xml b/winsup/doc/faq-what.xml index 772fc0464..ea8496ccb 100644 --- a/winsup/doc/faq-what.xml +++ b/winsup/doc/faq-what.xml @@ -124,29 +124,28 @@ questions, all of these people will appreciate it if you use the cygwin mailing lists rather than sending personal email.) -Corinna Vinschen is the current project lead. Corinna is a senior Red Hat -engineer. Corinna is responsible for the Cygwin library and maintains a couple -of packages, for instance OpenSSH, OpenSSL, and a lot more. +Corinna Vinschen is the current project lead, +responsible for the Cygwin library and a lot more. -Yaakov Selkowitz is another Red Hat engineer working on the Cygwin project. -He's the guy behind the current build and packaging system and maintains by -far the most packages in the Cygwin distribution. +Yaakov Selkowitz is the guy behind the current build and packaging system +and maintained by far the most packages in the Cygwin distribution. -Jon Turney is developer and maintainer of the Cygwin X server and a couple -of related packages. +Jon Turney is maintainer of the Cygwin X server and related packages. -The packages in the Net release are maintained by a large group of people; -a complete list can be found -here. +The packages are maintained by a large group of +volunteers. -Please note that all of us working on Cygwin try to be as responsive as -possible and deal with patches and questions as we get them, but realistically -we don't have time to answer all of the email that is sent to the main mailing -list. Making Net releases of the Win32 tools and helping people on the Net out -is not our primary job function, so some email will have to go unanswered. + +Please note that all of us volunteering on Cygwin try to be as responsive as +possible and deal with patches and questions as we get them, but +realistically we don't have time to answer all of the email that is sent to +the main mailing list. +Making releases of the tools and packages is an activity in our spare time, +helping people out is not our primary focus, so some email will have to go +unanswered. Many thanks to everyone using the tools for their many contributions in the form of advice, bug reports, and code fixes. Keep them coming! From aa86784937ec7868c358dd90ea5e5324f0be750d Mon Sep 17 00:00:00 2001 From: Marc Hoersken Date: Wed, 15 Jul 2020 20:53:21 +0200 Subject: [PATCH 419/520] Cygwin: make sure failed sockets always signal writability Since FD_CONNECT is only given once, we manually need to set FD_WRITE for connection failed sockets to have consistent behaviour in programs calling poll/select multiple times. Example test to non-listening port: curl -v 127.0.0.1:47 --- winsup/cygwin/fhandler_socket_inet.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/winsup/cygwin/fhandler_socket_inet.cc b/winsup/cygwin/fhandler_socket_inet.cc index 74c415d60..e5b0d2d14 100644 --- a/winsup/cygwin/fhandler_socket_inet.cc +++ b/winsup/cygwin/fhandler_socket_inet.cc @@ -376,6 +376,12 @@ fhandler_socket_wsock::evaluate_events (const long event_mask, long &events, if (erase) wsock_events->events &= ~(events & ~(FD_WRITE | FD_CLOSE)); } + /* Since FD_CONNECT is only given once, we manually need to set + FD_WRITE for connection failed sockets to have consistent + behaviour in programs calling poll/select multiple times. + Example test to non-listening port: curl -v 127.0.0.1:47 */ + if ((connect_state () == connect_failed) && (event_mask & FD_WRITE)) + wsock_events->events |= FD_WRITE; UNLOCK_EVENTS; return ret; From 52ad92e1b65d640d625f67dbd87e8193c3409db5 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 16 Jul 2020 10:58:40 +0200 Subject: [PATCH 420/520] Cygwin: document previous poll/select patch Signed-off-by: Corinna Vinschen --- winsup/cygwin/release/3.1.7 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/release/3.1.7 b/winsup/cygwin/release/3.1.7 index 6ce316fc4..910dc0a3d 100644 --- a/winsup/cygwin/release/3.1.7 +++ b/winsup/cygwin/release/3.1.7 @@ -2,3 +2,6 @@ Bug Fixes: ---------- - Fix acl_get_* functions in 32-bit Cygwin (pointer sign extension) + +- Fix select/poll issue in case a socket connect call fails. + Addresses: https://cygwin.com/pipermail/cygwin/2020-July/245528.html From 0ee972d1b095bfea89499b358646e44d60aa4a4b Mon Sep 17 00:00:00 2001 From: Aschref Ben Thabet Date: Thu, 16 Jul 2020 10:28:49 +0200 Subject: [PATCH 421/520] ctype.h: Fix unused variable warnings If __HAVE_LOCALE_INFO__ is not defined, then the locale in the locale-specific ctype functions is ignored. In the previous implementation this resulted in compiler warnings. For example: int main() { locale_t locale; locale = duplocale(uselocale((locale_t)0)); isspace_l('x', locale); return 0; } gcc -Wall main.c main.c: In function 'main': main.c:6:11: warning: variable 'locale' set but not used [-Wunused-but-set-variable] 6 | locale_t locale; | ^~~~~~ --- newlib/libc/include/ctype.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/newlib/libc/include/ctype.h b/newlib/libc/include/ctype.h index a0009af17..8b1013ac0 100644 --- a/newlib/libc/include/ctype.h +++ b/newlib/libc/include/ctype.h @@ -66,6 +66,9 @@ extern int toascii_l (int __c, locale_t __l); #define _X 0100 #define _B 0200 +/* For C++ backward-compatibility only. */ +extern __IMPORT const char _ctype_[]; + #ifdef __HAVE_LOCALE_INFO__ const char *__locale_ctype_ptr (void); #else @@ -108,7 +111,12 @@ const char *__locale_ctype_ptr (void); #ifdef __HAVE_LOCALE_INFO__ const char *__locale_ctype_ptr_l (locale_t); #else -#define __locale_ctype_ptr_l(l) _ctype_ +static __inline char * +__locale_ctype_ptr_l(locale_t _l) +{ + (void)_l; + return __locale_ctype_ptr(); +} #endif #define __ctype_lookup_l(__c,__l) ((__locale_ctype_ptr_l(__l)+sizeof(""[__c]))[(int)(__c)]) @@ -170,9 +178,6 @@ const char *__locale_ctype_ptr_l (locale_t); #endif /* !__cplusplus */ -/* For C++ backward-compatibility only. */ -extern __IMPORT const char _ctype_[]; - _END_STD_C #endif /* _CTYPE_H_ */ From da9fea07592987474203a531b88d83312f569141 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Wed, 15 Jul 2020 09:46:42 -0400 Subject: [PATCH 422/520] Cygwin: FIFO: fix problems finding new owner When the owning reader closes and there are still readers open, the owner needs to wait for a new owner to be found before closing its fifo_client handlers. This involves a loop in which dec_nreaders is called at the beginning and inc_nreaders is called at the end. Any other reader that tries to access shmem->_nreaders during this loop will therefore get an inaccurate answer. Fix this by adding an nreaders method and using it instead of dec_nreaders and inc_nreaders. Also add nreaders_lock to control access to the shmem->_nreaders. Make various other changes to improve the reliability of finding a new owner. --- winsup/cygwin/fhandler.h | 8 ++- winsup/cygwin/fhandler_fifo.cc | 90 +++++++++++++++++++++------------- 2 files changed, 63 insertions(+), 35 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 7a28adc16..cf6daea06 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1328,7 +1328,7 @@ class fifo_shmem_t { LONG _nreaders; fifo_reader_id_t _owner, _prev_owner, _pending_owner; - af_unix_spinlock_t _owner_lock, _reading_lock, _reader_opening_lock; + af_unix_spinlock_t _owner_lock, _reading_lock, _reader_opening_lock, _nreaders_lock; /* Info about shared memory block used for temporary storage of the owner's fc_handler list. */ @@ -1336,6 +1336,7 @@ class fifo_shmem_t _sh_fc_handler_updated; public: + int nreaders () const { return (int) _nreaders; } int inc_nreaders () { return (int) InterlockedIncrement (&_nreaders); } int dec_nreaders () { return (int) InterlockedDecrement (&_nreaders); } @@ -1352,6 +1353,8 @@ public: void reading_unlock () { _reading_lock.unlock (); } void reader_opening_lock () { _reader_opening_lock.lock (); } void reader_opening_unlock () { _reader_opening_lock.unlock (); } + void nreaders_lock () { _nreaders_lock.lock (); } + void nreaders_unlock () { _nreaders_lock.unlock (); } int get_shared_nhandlers () const { return (int) _sh_nhandlers; } void set_shared_nhandlers (int n) { InterlockedExchange (&_sh_nhandlers, n); } @@ -1420,8 +1423,11 @@ class fhandler_fifo: public fhandler_base int reopen_shared_fc_handler (); int remap_shared_fc_handler (size_t); + int nreaders () const { return shmem->nreaders (); } int inc_nreaders () { return shmem->inc_nreaders (); } int dec_nreaders () { return shmem->dec_nreaders (); } + void nreaders_lock () { shmem->nreaders_lock (); } + void nreaders_unlock () { shmem->nreaders_unlock (); } fifo_reader_id_t get_prev_owner () const { return shmem->get_prev_owner (); } void set_prev_owner (fifo_reader_id_t fr_id) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 3d34cdfab..2d4f7a97e 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -371,6 +371,8 @@ fhandler_fifo::record_connection (fifo_client_handler& fc, int fhandler_fifo::update_my_handlers () { + int ret = 0; + close_all_handlers (); fifo_reader_id_t prev = get_prev_owner (); if (!prev) @@ -387,7 +389,7 @@ fhandler_fifo::update_my_handlers () { debug_printf ("Can't open process of previous owner, %E"); __seterrno (); - return -1; + goto out; } for (int i = 0; i < get_shared_nhandlers (); i++) @@ -402,11 +404,13 @@ fhandler_fifo::update_my_handlers () debug_printf ("Can't duplicate handle of previous owner, %E"); --nhandlers; __seterrno (); - return -1; + goto out; } fc.state = shared_fc_handler[i].state; } - return 0; +out: + set_prev_owner (null_fr_id); + return ret; } int @@ -1414,41 +1418,59 @@ fhandler_fifo::close () { if (reader) { - /* If we're the owner, try to find a new owner. */ - bool find_new_owner = false; + /* If we're the owner, we can't close our fc_handlers if a new + owner might need to duplicate them. */ + bool close_fc_ok = false; cancel_reader_thread (); - owner_lock (); - if (get_owner () == me) - { - find_new_owner = true; - set_owner (null_fr_id); - set_prev_owner (me); - owner_needed (); - } - owner_unlock (); + nreaders_lock (); if (dec_nreaders () == 0) - ResetEvent (read_ready); - else if (find_new_owner && !IsEventSignalled (owner_found_evt)) { - bool found = false; - do - if (dec_nreaders () >= 0) - { - /* There's still another reader open. */ - if (WaitForSingleObject (owner_found_evt, 1) == WAIT_OBJECT_0) - found = true; - else - { - owner_lock (); - if (get_owner ()) /* We missed owner_found_evt? */ - found = true; - else - owner_needed (); - owner_unlock (); - } - } - while (inc_nreaders () > 0 && !found); + close_fc_ok = true; + ResetEvent (read_ready); + ResetEvent (owner_needed_evt); + ResetEvent (owner_found_evt); + set_owner (null_fr_id); + set_prev_owner (null_fr_id); + set_pending_owner (null_fr_id); + set_shared_nhandlers (0); + } + else + { + owner_lock (); + if (get_owner () != me) + close_fc_ok = true; + else + { + set_owner (null_fr_id); + set_prev_owner (me); + if (!get_pending_owner ()) + owner_needed (); + } + owner_unlock (); + } + nreaders_unlock (); + while (!close_fc_ok) + { + if (WaitForSingleObject (owner_found_evt, 1) == WAIT_OBJECT_0) + close_fc_ok = true; + else + { + nreaders_lock (); + if (!nreaders ()) + { + close_fc_ok = true; + nreaders_unlock (); + } + else + { + nreaders_unlock (); + owner_lock (); + if (get_owner () || get_prev_owner () != me) + close_fc_ok = true; + owner_unlock (); + } + } } close_all_handlers (); if (fc_handler) From 8ca713d70a4038922babc998bbf813768354d84e Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sat, 11 Jul 2020 14:05:23 -0400 Subject: [PATCH 423/520] Cygwin: FIFO: keep a writer count in shared memory When a reader opens, it needs to block if there are no writers open (unless is is opened with O_NONBLOCK). This is easy for the first reader to test, since it can just wait for a writer to signal that it is open (via the write_ready event). But when a second reader wants to open, all writers might have closed. To check this, use a new '_nwriters' member of struct fifo_shmem_t, which keeps track of the number of open writers. This should be more reliable than the previous method. Add nwriters_lock to control access to shmem->_nwriters, and remove reader_opening_lock, which is no longer needed. Previously only readers had access to the shared memory, but now writers access it too so that they can increment _nwriters during open/dup/fork/exec and decrement it during close. Add an optional 'only_open' argument to create_shmem for use by writers, which only open the shared memory rather than first trying to create it. Since writers don't need to access the shared memory until they have successfully connected to a pipe instance, they can safely assume that a reader has already created the shared memory. For debugging purposes, change create_shmem to return 1 instead of 0 when a reader successfully opens the shared memory after finding that it had already been created. Remove check_write_ready_evt, write_ready_ok_evt, and check_write_ready(), which are no longer needed. When opening a writer and looping to try to get a connection, recheck read_ready at the top of the loop since the number of readers might have changed. To slightly speed up the process of opening the first reader, take ownership immediately rather than waiting for the fifo_reader_thread to handle it. --- winsup/cygwin/fhandler.h | 27 ++-- winsup/cygwin/fhandler_fifo.cc | 263 ++++++++++++++------------------- 2 files changed, 124 insertions(+), 166 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index cf6daea06..f034a110e 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1323,12 +1323,14 @@ struct fifo_reader_id_t } }; -/* Info needed by all readers of a FIFO, stored in named shared memory. */ +/* Info needed by all fhandlers for a given FIFO, stored in named + shared memory. This is mostly for readers, but writers need access + in order to update the count of open writers. */ class fifo_shmem_t { - LONG _nreaders; + LONG _nreaders, _nwriters; fifo_reader_id_t _owner, _prev_owner, _pending_owner; - af_unix_spinlock_t _owner_lock, _reading_lock, _reader_opening_lock, _nreaders_lock; + af_unix_spinlock_t _owner_lock, _reading_lock, _nreaders_lock, _nwriters_lock; /* Info about shared memory block used for temporary storage of the owner's fc_handler list. */ @@ -1339,6 +1341,9 @@ public: int nreaders () const { return (int) _nreaders; } int inc_nreaders () { return (int) InterlockedIncrement (&_nreaders); } int dec_nreaders () { return (int) InterlockedDecrement (&_nreaders); } + int nwriters () const { return (int) _nwriters; } + int inc_nwriters () { return (int) InterlockedIncrement (&_nwriters); } + int dec_nwriters () { return (int) InterlockedDecrement (&_nwriters); } fifo_reader_id_t get_owner () const { return _owner; } void set_owner (fifo_reader_id_t fr_id) { _owner = fr_id; } @@ -1351,10 +1356,10 @@ public: void owner_unlock () { _owner_lock.unlock (); } void reading_lock () { _reading_lock.lock (); } void reading_unlock () { _reading_lock.unlock (); } - void reader_opening_lock () { _reader_opening_lock.lock (); } - void reader_opening_unlock () { _reader_opening_lock.unlock (); } void nreaders_lock () { _nreaders_lock.lock (); } void nreaders_unlock () { _nreaders_lock.unlock (); } + void nwriters_lock () { _nwriters_lock.lock (); } + void nwriters_unlock () { _nwriters_lock.unlock (); } int get_shared_nhandlers () const { return (int) _sh_nhandlers; } void set_shared_nhandlers (int n) { InterlockedExchange (&_sh_nhandlers, n); } @@ -1380,8 +1385,6 @@ class fhandler_fifo: public fhandler_base HANDLE owner_needed_evt; /* The owner is closing. */ HANDLE owner_found_evt; /* A new owner has taken over. */ HANDLE update_needed_evt; /* shared_fc_handler needs updating. */ - HANDLE check_write_ready_evt; /* write_ready needs to be checked. */ - HANDLE write_ready_ok_evt; /* check_write_ready is done. */ /* Handles to non-shared events needed for fifo_reader_threads. */ HANDLE cancel_evt; /* Signal thread to terminate. */ @@ -1417,7 +1420,7 @@ class fhandler_fifo: public fhandler_base void record_connection (fifo_client_handler&, fifo_client_connect_state = fc_connected); - int create_shmem (); + int create_shmem (bool only_open = false); int reopen_shmem (); int create_shared_fc_handler (); int reopen_shared_fc_handler (); @@ -1426,8 +1429,13 @@ class fhandler_fifo: public fhandler_base int nreaders () const { return shmem->nreaders (); } int inc_nreaders () { return shmem->inc_nreaders (); } int dec_nreaders () { return shmem->dec_nreaders (); } + int nwriters () const { return shmem->nwriters (); } + int inc_nwriters () { return shmem->inc_nwriters (); } + int dec_nwriters () { return shmem->dec_nwriters (); } void nreaders_lock () { shmem->nreaders_lock (); } void nreaders_unlock () { shmem->nreaders_unlock (); } + void nwriters_lock () { shmem->nwriters_lock (); } + void nwriters_unlock () { shmem->nwriters_unlock (); } fifo_reader_id_t get_prev_owner () const { return shmem->get_prev_owner (); } void set_prev_owner (fifo_reader_id_t fr_id) @@ -1462,9 +1470,6 @@ class fhandler_fifo: public fhandler_base { return shmem->shared_fc_handler_updated (); } void shared_fc_handler_updated (bool val) { shmem->shared_fc_handler_updated (val); } - void check_write_ready (); - void reader_opening_lock () { shmem->reader_opening_lock (); } - void reader_opening_unlock () { shmem->reader_opening_unlock (); } public: fhandler_fifo (); diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 2d4f7a97e..26b24d019 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -87,7 +87,6 @@ fhandler_fifo::fhandler_fifo (): fhandler_base (), read_ready (NULL), write_ready (NULL), writer_opening (NULL), owner_needed_evt (NULL), owner_found_evt (NULL), update_needed_evt (NULL), - check_write_ready_evt (NULL), write_ready_ok_evt (NULL), cancel_evt (NULL), thr_sync_evt (NULL), _maybe_eof (false), fc_handler (NULL), shandlers (0), nhandlers (0), reader (false), writer (false), duplexer (false), @@ -429,24 +428,6 @@ fhandler_fifo::update_shared_handlers () return 0; } -/* The write_ready event gets set when a writer opens, to indicate - that a blocking reader can open. If a second reader wants to open, - we need to see if there are still any writers open. */ -void -fhandler_fifo::check_write_ready () -{ - bool set = false; - - for (int i = 0; i < nhandlers && !set; i++) - if (fc_handler[i].set_state () >= fc_connected) - set = true; - if (set || IsEventSignalled (writer_opening)) - SetEvent (write_ready); - else - ResetEvent (write_ready); - SetEvent (write_ready_ok_evt); -} - static DWORD WINAPI fifo_reader_thread (LPVOID param) { @@ -532,15 +513,13 @@ fhandler_fifo::fifo_reader_thread_func () IO_STATUS_BLOCK io; bool cancel = false; bool update = false; - bool check = false; status = NtFsControlFile (fc.h, conn_evt, NULL, NULL, &io, FSCTL_PIPE_LISTEN, NULL, 0, NULL, 0); if (status == STATUS_PENDING) { - HANDLE w[4] = { conn_evt, update_needed_evt, - check_write_ready_evt, cancel_evt }; - switch (WaitForMultipleObjects (4, w, false, INFINITE)) + HANDLE w[3] = { conn_evt, update_needed_evt, cancel_evt }; + switch (WaitForMultipleObjects (3, w, false, INFINITE)) { case WAIT_OBJECT_0: status = io.Status; @@ -552,10 +531,6 @@ fhandler_fifo::fifo_reader_thread_func () update = true; break; case WAIT_OBJECT_0 + 2: - status = STATUS_WAIT_2; - check = true; - break; - case WAIT_OBJECT_0 + 3: status = STATUS_THREAD_IS_TERMINATING; cancel = true; update = true; @@ -582,7 +557,6 @@ fhandler_fifo::fifo_reader_thread_func () break; case STATUS_THREAD_IS_TERMINATING: case STATUS_WAIT_1: - case STATUS_WAIT_2: /* Try to connect a bogus client. Otherwise fc is still listening, and the next connection might not get recorded. */ status1 = open_pipe (ph); @@ -614,8 +588,6 @@ fhandler_fifo::fifo_reader_thread_func () NtClose (ph); if (update && update_shared_handlers () < 0) api_fatal ("Can't update shared handlers, %E"); - if (check) - check_write_ready (); fifo_client_unlock (); if (cancel) goto canceled; @@ -629,8 +601,14 @@ canceled: return 0; } +/* Return -1 on error and 0 or 1 on success. If ONLY_OPEN is true, we + expect the shared memory to exist, and we only try to open it. In + this case, we return 0 on success. + + Otherwise, we create the shared memory if it doesn't exist, and we + return 1 if it already existed and we successfully open it. */ int -fhandler_fifo::create_shmem () +fhandler_fifo::create_shmem (bool only_open) { HANDLE sect; OBJECT_ATTRIBUTES attr; @@ -640,16 +618,22 @@ fhandler_fifo::create_shmem () PVOID addr = NULL; UNICODE_STRING uname; WCHAR shmem_name[MAX_PATH]; + bool already_exists = false; __small_swprintf (shmem_name, L"fifo-shmem.%08x.%016X", get_dev (), get_ino ()); RtlInitUnicodeString (&uname, shmem_name); InitializeObjectAttributes (&attr, &uname, OBJ_INHERIT, get_shared_parent_dir (), NULL); - status = NtCreateSection (§, STANDARD_RIGHTS_REQUIRED | SECTION_QUERY - | SECTION_MAP_READ | SECTION_MAP_WRITE, - &attr, &size, PAGE_READWRITE, SEC_COMMIT, NULL); - if (status == STATUS_OBJECT_NAME_COLLISION) + if (!only_open) + { + status = NtCreateSection (§, STANDARD_RIGHTS_REQUIRED | SECTION_QUERY + | SECTION_MAP_READ | SECTION_MAP_WRITE, + &attr, &size, PAGE_READWRITE, SEC_COMMIT, NULL); + if (status == STATUS_OBJECT_NAME_COLLISION) + already_exists = true; + } + if (only_open || already_exists) status = NtOpenSection (§, STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ | SECTION_MAP_WRITE, &attr); if (!NT_SUCCESS (status)) @@ -667,7 +651,7 @@ fhandler_fifo::create_shmem () } shmem_handle = sect; shmem = (fifo_shmem_t *) addr; - return 0; + return already_exists ? 1 : 0; } /* shmem_handle must be valid when this is called. */ @@ -787,7 +771,7 @@ fhandler_fifo::remap_shared_fc_handler (size_t nbytes) int fhandler_fifo::open (int flags, mode_t) { - int saved_errno = 0; + int saved_errno = 0, shmem_res = 0; if (flags & O_PATH) return open_fs (flags); @@ -802,8 +786,7 @@ fhandler_fifo::open (int flags, mode_t) writer = true; break; case O_RDWR: - reader = true; - duplexer = true; + reader = writer = duplexer = true; break; default: set_errno (EINVAL); @@ -844,29 +827,26 @@ fhandler_fifo::open (int flags, mode_t) goto err_close_write_ready; } - /* If we're reading, signal read_ready, create the shared memory, - and start the fifo_reader_thread. */ + /* If we're reading, create the shared memory and the shared + fc_handler memory, create some events, start the + fifo_reader_thread, signal read_ready, and wait for a writer. */ if (reader) { - bool first = true; - - SetEvent (read_ready); - if (create_shmem () < 0) + /* Create/open shared memory. */ + if ((shmem_res = create_shmem ()) < 0) goto err_close_writer_opening; + else if (shmem_res == 0) + debug_printf ("shmem created"); + else + debug_printf ("shmem existed; ok if we're not the first reader"); if (create_shared_fc_handler () < 0) goto err_close_shmem; - reader_opening_lock (); - if (inc_nreaders () == 1) - /* Reinitialize _sh_fc_handler_updated, which starts as 0. */ - shared_fc_handler_updated (true); - else - first = false; npbuf[0] = 'n'; if (!(owner_needed_evt = CreateEvent (sa_buf, true, false, npbuf))) { debug_printf ("CreateEvent for %s failed, %E", npbuf); __seterrno (); - goto err_dec_nreaders; + goto err_close_shared_fc_handler; } npbuf[0] = 'f'; if (!(owner_found_evt = CreateEvent (sa_buf, true, false, npbuf))) @@ -882,36 +862,23 @@ fhandler_fifo::open (int flags, mode_t) __seterrno (); goto err_close_owner_found_evt; } - npbuf[0] = 'c'; - if (!(check_write_ready_evt = CreateEvent (sa_buf, false, false, npbuf))) - { - debug_printf ("CreateEvent for %s failed, %E", npbuf); - __seterrno (); - goto err_close_update_needed_evt; - } - npbuf[0] = 'k'; - if (!(write_ready_ok_evt = CreateEvent (sa_buf, false, false, npbuf))) - { - debug_printf ("CreateEvent for %s failed, %E", npbuf); - __seterrno (); - goto err_close_check_write_ready_evt; - } if (!(cancel_evt = create_event ())) - goto err_close_write_ready_ok_evt; + goto err_close_update_needed_evt; if (!(thr_sync_evt = create_event ())) goto err_close_cancel_evt; + me.winpid = GetCurrentProcessId (); me.fh = this; - new cygthread (fifo_reader_thread, this, "fifo_reader", thr_sync_evt); - /* Wait until there's an owner. */ - owner_lock (); - while (!get_owner ()) + nreaders_lock (); + if (inc_nreaders () == 1) { - owner_unlock (); - yield (); - owner_lock (); + /* Reinitialize _sh_fc_handler_updated, which starts as 0. */ + shared_fc_handler_updated (true); + set_owner (me); } - owner_unlock (); + new cygthread (fifo_reader_thread, this, "fifo_reader", thr_sync_evt); + SetEvent (read_ready); + nreaders_unlock (); /* If we're a duplexer, we need a handle for writing. */ if (duplexer) @@ -919,6 +886,11 @@ fhandler_fifo::open (int flags, mode_t) HANDLE ph = NULL; NTSTATUS status; + nwriters_lock (); + inc_nwriters (); + SetEvent (write_ready); + nwriters_unlock (); + while (1) { status = open_pipe (ph); @@ -937,46 +909,39 @@ fhandler_fifo::open (int flags, mode_t) else { __seterrno_from_nt_status (status); + nohandle (true); goto err_close_reader; } } } /* Not a duplexer; wait for a writer to connect if we're blocking. */ - else if (!(flags & O_NONBLOCK)) - { - if (!first) - { - /* Ask the owner to update write_ready. */ - SetEvent (check_write_ready_evt); - WaitForSingleObject (write_ready_ok_evt, INFINITE); - } - if (!wait (write_ready)) - goto err_close_reader; - } - reader_opening_unlock (); + else if (!wait (write_ready)) + goto err_close_reader; goto success; } - /* If we're writing, wait for read_ready, connect to the pipe, and - signal write_ready. */ + /* If we're writing, wait for read_ready, connect to the pipe, open + the shared memory, and signal write_ready. */ if (writer) { NTSTATUS status; + /* Don't let a reader see EOF at this point. */ SetEvent (writer_opening); - if (!wait (read_ready)) - { - ResetEvent (writer_opening); - goto err_close_writer_opening; - } while (1) { + if (!wait (read_ready)) + { + ResetEvent (writer_opening); + goto err_close_writer_opening; + } status = open_pipe (get_handle ()); if (NT_SUCCESS (status)) - goto writer_success; + goto writer_shmem; else if (status == STATUS_OBJECT_NAME_NOT_FOUND) { - /* The pipe hasn't been created yet. */ + /* The pipe hasn't been created yet or there's no longer + a reader open. */ yield (); continue; } @@ -995,7 +960,6 @@ fhandler_fifo::open (int flags, mode_t) and/or many writers are trying to connect simultaneously */ while (1) { - SetEvent (writer_opening); if (!wait (read_ready)) { ResetEvent (writer_opening); @@ -1003,7 +967,7 @@ fhandler_fifo::open (int flags, mode_t) } status = wait_open_pipe (get_handle ()); if (NT_SUCCESS (status)) - goto writer_success; + goto writer_shmem; else if (status == STATUS_IO_TIMEOUT) continue; else @@ -1015,34 +979,34 @@ fhandler_fifo::open (int flags, mode_t) } } } -writer_success: +writer_shmem: + if (create_shmem (true) < 0) + goto err_close_writer_opening; +/* writer_success: */ set_pipe_non_blocking (get_handle (), flags & O_NONBLOCK); + nwriters_lock (); + inc_nwriters (); SetEvent (write_ready); + ResetEvent (writer_opening); + nwriters_unlock (); success: return 1; err_close_reader: saved_errno = get_errno (); close (); set_errno (saved_errno); - reader_opening_unlock (); return 0; +/* err_close_thr_sync_evt: */ +/* NtClose (thr_sync_evt); */ err_close_cancel_evt: NtClose (cancel_evt); -err_close_write_ready_ok_evt: - NtClose (write_ready_ok_evt); -err_close_check_write_ready_evt: - NtClose (check_write_ready_evt); err_close_update_needed_evt: NtClose (update_needed_evt); err_close_owner_found_evt: NtClose (owner_found_evt); err_close_owner_needed_evt: NtClose (owner_needed_evt); -err_dec_nreaders: - if (dec_nreaders () == 0) - ResetEvent (read_ready); - reader_opening_unlock (); -/* err_close_shared_fc_handler: */ +err_close_shared_fc_handler: NtUnmapViewOfSection (NtCurrentProcess (), shared_fc_handler); NtClose (shared_fc_hdl); err_close_shmem: @@ -1416,6 +1380,13 @@ fhandler_fifo::cancel_reader_thread () int fhandler_fifo::close () { + if (writer) + { + nwriters_lock (); + if (dec_nwriters () == 0) + ResetEvent (write_ready); + nwriters_unlock (); + } if (reader) { /* If we're the owner, we can't close our fc_handlers if a new @@ -1481,23 +1452,19 @@ fhandler_fifo::close () NtClose (owner_found_evt); if (update_needed_evt) NtClose (update_needed_evt); - if (check_write_ready_evt) - NtClose (check_write_ready_evt); - if (write_ready_ok_evt) - NtClose (write_ready_ok_evt); if (cancel_evt) NtClose (cancel_evt); if (thr_sync_evt) NtClose (thr_sync_evt); - if (shmem) - NtUnmapViewOfSection (NtCurrentProcess (), shmem); - if (shmem_handle) - NtClose (shmem_handle); if (shared_fc_handler) NtUnmapViewOfSection (NtCurrentProcess (), shared_fc_handler); if (shared_fc_hdl) NtClose (shared_fc_hdl); } + if (shmem) + NtUnmapViewOfSection (NtCurrentProcess (), shmem); + if (shmem_handle) + NtClose (shmem_handle); if (read_ready) NtClose (read_ready); if (write_ready) @@ -1560,6 +1527,15 @@ fhandler_fifo::dup (fhandler_base *child, int flags) __seterrno (); goto err_close_write_ready; } + if (!DuplicateHandle (GetCurrentProcess (), shmem_handle, + GetCurrentProcess (), &fhf->shmem_handle, + 0, !(flags & O_CLOEXEC), DUPLICATE_SAME_ACCESS)) + { + __seterrno (); + goto err_close_writer_opening; + } + if (fhf->reopen_shmem () < 0) + goto err_close_shmem_handle; if (reader) { /* Make sure the child starts unlocked. */ @@ -1569,15 +1545,6 @@ fhandler_fifo::dup (fhandler_base *child, int flags) fhf->nhandlers = fhf->shandlers = 0; fhf->fc_handler = NULL; - if (!DuplicateHandle (GetCurrentProcess (), shmem_handle, - GetCurrentProcess (), &fhf->shmem_handle, - 0, !(flags & O_CLOEXEC), DUPLICATE_SAME_ACCESS)) - { - __seterrno (); - goto err_close_writer_opening; - } - if (fhf->reopen_shmem () < 0) - goto err_close_shmem_handle; if (!DuplicateHandle (GetCurrentProcess (), shared_fc_hdl, GetCurrentProcess (), &fhf->shared_fc_hdl, 0, !(flags & O_CLOEXEC), DUPLICATE_SAME_ACCESS)) @@ -1608,35 +1575,19 @@ fhandler_fifo::dup (fhandler_base *child, int flags) __seterrno (); goto err_close_owner_found_evt; } - if (!DuplicateHandle (GetCurrentProcess (), check_write_ready_evt, - GetCurrentProcess (), &fhf->check_write_ready_evt, - 0, !(flags & O_CLOEXEC), DUPLICATE_SAME_ACCESS)) - { - __seterrno (); - goto err_close_update_needed_evt; - } - if (!DuplicateHandle (GetCurrentProcess (), write_ready_ok_evt, - GetCurrentProcess (), &fhf->write_ready_ok_evt, - 0, !(flags & O_CLOEXEC), DUPLICATE_SAME_ACCESS)) - { - __seterrno (); - goto err_close_check_write_ready_evt; - } if (!(fhf->cancel_evt = create_event ())) - goto err_close_write_ready_ok_evt; + goto err_close_update_needed_evt; if (!(fhf->thr_sync_evt = create_event ())) goto err_close_cancel_evt; inc_nreaders (); fhf->me.fh = fhf; new cygthread (fifo_reader_thread, fhf, "fifo_reader", fhf->thr_sync_evt); } + if (writer) + inc_nwriters (); return 0; err_close_cancel_evt: NtClose (fhf->cancel_evt); -err_close_write_ready_ok_evt: - NtClose (fhf->write_ready_ok_evt); -err_close_check_write_ready_evt: - NtClose (fhf->check_write_ready_evt); err_close_update_needed_evt: NtClose (fhf->update_needed_evt); err_close_owner_found_evt: @@ -1668,22 +1619,20 @@ fhandler_fifo::fixup_after_fork (HANDLE parent) fork_fixup (parent, read_ready, "read_ready"); fork_fixup (parent, write_ready, "write_ready"); fork_fixup (parent, writer_opening, "writer_opening"); + fork_fixup (parent, shmem_handle, "shmem_handle"); + if (reopen_shmem () < 0) + api_fatal ("Can't reopen shared memory during fork, %E"); if (reader) { /* Make sure the child starts unlocked. */ fifo_client_unlock (); - fork_fixup (parent, shmem_handle, "shmem_handle"); - if (reopen_shmem () < 0) - api_fatal ("Can't reopen shared memory during fork, %E"); fork_fixup (parent, shared_fc_hdl, "shared_fc_hdl"); if (reopen_shared_fc_handler () < 0) api_fatal ("Can't reopen shared fc_handler memory during fork, %E"); fork_fixup (parent, owner_needed_evt, "owner_needed_evt"); fork_fixup (parent, owner_found_evt, "owner_found_evt"); fork_fixup (parent, update_needed_evt, "update_needed_evt"); - fork_fixup (parent, check_write_ready_evt, "check_write_ready_evt"); - fork_fixup (parent, write_ready_ok_evt, "write_ready_ok_evt"); if (close_on_exec ()) /* Prevent a later attempt to close the non-inherited pipe-instance handles copied from the parent. */ @@ -1696,19 +1645,23 @@ fhandler_fifo::fixup_after_fork (HANDLE parent) me.winpid = GetCurrentProcessId (); new cygthread (fifo_reader_thread, this, "fifo_reader", thr_sync_evt); } + if (writer) + inc_nwriters (); } void fhandler_fifo::fixup_after_exec () { fhandler_base::fixup_after_exec (); - if (reader && !close_on_exec ()) + if (close_on_exec ()) + return; + if (reopen_shmem () < 0) + api_fatal ("Can't reopen shared memory during exec, %E"); + if (reader) { /* Make sure the child starts unlocked. */ fifo_client_unlock (); - if (reopen_shmem () < 0) - api_fatal ("Can't reopen shared memory during exec, %E"); if (reopen_shared_fc_handler () < 0) api_fatal ("Can't reopen shared fc_handler memory during exec, %E"); fc_handler = NULL; @@ -1723,6 +1676,8 @@ fhandler_fifo::fixup_after_exec () me.winpid = GetCurrentProcessId (); new cygthread (fifo_reader_thread, this, "fifo_reader", thr_sync_evt); } + if (writer) + inc_nwriters (); } void @@ -1737,8 +1692,6 @@ fhandler_fifo::set_close_on_exec (bool val) set_no_inheritance (owner_needed_evt, val); set_no_inheritance (owner_found_evt, val); set_no_inheritance (update_needed_evt, val); - set_no_inheritance (check_write_ready_evt, val); - set_no_inheritance (write_ready_ok_evt, val); fifo_client_lock (); for (int i = 0; i < nhandlers; i++) set_no_inheritance (fc_handler[i].h, val); From e10425e1e31ee4db2ae50a67dfb9fe67e83707fe Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sat, 11 Jul 2020 14:23:11 -0400 Subject: [PATCH 424/520] Cygwin: fhandler_fifo::hit_eof: improve reliability Use the writer count introduced in the previous commit to help detect EOF. Drop the maybe_eof method, which is no longer needed. --- winsup/cygwin/fhandler.h | 7 +++---- winsup/cygwin/fhandler_fifo.cc | 26 ++------------------------ winsup/cygwin/select.cc | 3 +-- 3 files changed, 6 insertions(+), 30 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index f034a110e..b5bfdd0b3 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1392,7 +1392,6 @@ class fhandler_fifo: public fhandler_base UNICODE_STRING pipe_name; WCHAR pipe_name_buf[CYGWIN_FIFO_PIPE_NAME_LEN + 1]; - bool _maybe_eof; fifo_client_handler *fc_handler; /* Dynamically growing array. */ int shandlers; /* Size (capacity) of the array. */ int nhandlers; /* Number of elements in the array. */ @@ -1473,9 +1472,9 @@ class fhandler_fifo: public fhandler_base public: fhandler_fifo (); - bool hit_eof (); - bool maybe_eof () const { return _maybe_eof; } - void maybe_eof (bool val) { _maybe_eof = val; } + /* Called if we appear to be at EOF after polling fc_handlers. */ + bool hit_eof () const + { return !nwriters () && !IsEventSignalled (writer_opening); } int get_nhandlers () const { return nhandlers; } fifo_client_handler &get_fc_handler (int i) { return fc_handler[i]; } PUNICODE_STRING get_pipe_name (); diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 26b24d019..3685cc0c2 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -87,7 +87,7 @@ fhandler_fifo::fhandler_fifo (): fhandler_base (), read_ready (NULL), write_ready (NULL), writer_opening (NULL), owner_needed_evt (NULL), owner_found_evt (NULL), update_needed_evt (NULL), - cancel_evt (NULL), thr_sync_evt (NULL), _maybe_eof (false), + cancel_evt (NULL), thr_sync_evt (NULL), fc_handler (NULL), shandlers (0), nhandlers (0), reader (false), writer (false), duplexer (false), max_atomic_write (DEFAULT_PIPEBUFSIZE), @@ -361,8 +361,6 @@ fhandler_fifo::record_connection (fifo_client_handler& fc, fifo_client_connect_state s) { fc.state = s; - maybe_eof (false); - ResetEvent (writer_opening); set_pipe_non_blocking (fc.h, true); } @@ -1173,25 +1171,6 @@ fhandler_fifo::raw_write (const void *ptr, size_t len) return ret; } -/* A reader is at EOF if the pipe is empty and no writers are open. - hit_eof is called by raw_read and select.cc:peek_fifo if it appears - that we are at EOF after polling the fc_handlers. We recheck this - in case a writer opened while we were polling. */ -bool -fhandler_fifo::hit_eof () -{ - bool ret = maybe_eof () && !IsEventSignalled (writer_opening); - if (ret) - { - yield (); - /* Wait for the reader thread to finish recording any connection. */ - fifo_client_lock (); - fifo_client_unlock (); - ret = maybe_eof (); - } - return ret; -} - /* Called from raw_read and select.cc:peek_fifo. */ void fhandler_fifo::take_ownership () @@ -1261,9 +1240,8 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) break; } } - maybe_eof (!nconnected && !IsEventSignalled (writer_opening)); fifo_client_unlock (); - if (maybe_eof () && hit_eof ()) + if (!nconnected && hit_eof ()) { reading_unlock (); len = 0; diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 9ae567c38..80d16f2a7 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -883,9 +883,8 @@ peek_fifo (select_record *s, bool from_select) goto out; } } - fh->maybe_eof (!nconnected); fh->fifo_client_unlock (); - if (fh->maybe_eof () && fh->hit_eof ()) + if (!nconnected && fh->hit_eof ()) { select_printf ("read: %s, saw EOF", fh->get_name ()); gotone += s->read_ready = true; From 1c0cf5f4f9b21f2e840109dfa4248886038b96dd Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sat, 11 Jul 2020 14:34:24 -0400 Subject: [PATCH 425/520] Cygwin: FIFO: reduce I/O interleaving Add a bool member 'last_read' to the fifo_client_handler structure, which is set to true on a successful read. This is used by raw_read as follows. When raw_read is called, it first locates the writer (if any) for which last_read is true. raw_read tries to read from that writer and returns if there is input available. Otherwise, it proceeds to poll all the writers, as before. The effect of this is that if a writer writes some data that is only partially read, the next attempt to read will continue to read from the same writer. This should reduce the interleaving of output from different writers. --- winsup/cygwin/fhandler.h | 3 +- winsup/cygwin/fhandler_fifo.cc | 55 +++++++++++++++++++++++++++++----- 2 files changed, 50 insertions(+), 8 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index b5bfdd0b3..221c856e6 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1298,7 +1298,8 @@ struct fifo_client_handler { HANDLE h; fifo_client_connect_state state; - fifo_client_handler () : h (NULL), state (fc_unknown) {} + bool last_read; /* true if our last successful read was from this client. */ + fifo_client_handler () : h (NULL), state (fc_unknown), last_read (false) {} void close () { NtClose (h); } fifo_client_connect_state set_state (); }; diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 3685cc0c2..afe21a468 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -404,6 +404,7 @@ fhandler_fifo::update_my_handlers () goto out; } fc.state = shared_fc_handler[i].state; + fc.last_read = shared_fc_handler[i].last_read; } out: set_prev_owner (null_fr_id); @@ -1200,15 +1201,56 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) /* No one else can take ownership while we hold the reading_lock. */ reading_lock (); take_ownership (); - /* Poll the connected clients for input. */ - int nconnected = 0; + /* Poll the connected clients for input. Make two passes. On + the first pass, just try to read from the client from which + we last read successfully. This should minimize + interleaving of writes from different clients. */ fifo_client_lock (); + /* First pass. */ + int j; + for (j = 0; j < nhandlers; j++) + if (fc_handler[j].last_read) + break; + if (j < nhandlers && fc_handler[j].state >= fc_closing) + { + NTSTATUS status; + IO_STATUS_BLOCK io; + + status = NtReadFile (fc_handler[j].h, NULL, NULL, NULL, + &io, in_ptr, len, NULL, NULL); + switch (status) + { + case STATUS_SUCCESS: + case STATUS_BUFFER_OVERFLOW: + /* io.Information is supposedly valid in latter case. */ + if (io.Information > 0) + { + len = io.Information; + fifo_client_unlock (); + reading_unlock (); + return; + } + break; + case STATUS_PIPE_EMPTY: + break; + case STATUS_PIPE_BROKEN: + fc_handler[j].state = fc_disconnected; + break; + default: + debug_printf ("NtReadFile status %y", status); + fc_handler[j].state = fc_error; + break; + } + fc_handler[j].last_read = false; + } + + /* Second pass. */ + int nconnected = 0; for (int i = 0; i < nhandlers; i++) if (fc_handler[i].state >= fc_closing) { NTSTATUS status; IO_STATUS_BLOCK io; - size_t nbytes = 0; nconnected++; status = NtReadFile (fc_handler[i].h, NULL, NULL, NULL, @@ -1217,11 +1259,10 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) { case STATUS_SUCCESS: case STATUS_BUFFER_OVERFLOW: - /* io.Information is supposedly valid. */ - nbytes = io.Information; - if (nbytes > 0) + if (io.Information > 0) { - len = nbytes; + len = io.Information; + fc_handler[i].last_read = true; fifo_client_unlock (); reading_unlock (); return; From 6b8a8294966316f6e044e78f76579a18a3e9c173 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sat, 11 Jul 2020 14:52:55 -0400 Subject: [PATCH 426/520] Cygwin: FIFO: improve taking ownership in fifo_reader_thread When a reader takes ownership in fifo_reader_thread, it now goes directly to the part of the main loop that listens for a connection. Previously it went back to the beginning of the loop. Also, if the reader has to delay taking ownership because the previous owner has not finished updating the shared fifo_client handlers, it now checks to see if cancel_evt has been set. Previously it might have had to spin its wheels unnecessarily only to eventually find that its thread had been canceled. --- winsup/cygwin/fhandler_fifo.cc | 48 ++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index afe21a468..1fb319fcf 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -462,26 +462,10 @@ fhandler_fifo::fifo_reader_thread_func () take_ownership = true; else if (cur_owner != me) idle = true; - if (take_ownership) - { - if (!shared_fc_handler_updated ()) - { - owner_unlock (); - yield (); - continue; - } - else - { - set_owner (me); - set_pending_owner (null_fr_id); - if (update_my_handlers () < 0) - api_fatal ("Can't update my handlers, %E"); - owner_found (); - owner_unlock (); - continue; - } - } - else if (idle) + else + /* I'm the owner. */ + goto owner_listen; + if (idle) { owner_unlock (); HANDLE w[2] = { owner_needed_evt, cancel_evt }; @@ -495,9 +479,28 @@ fhandler_fifo::fifo_reader_thread_func () api_fatal ("WFMO failed, %E"); } } - else + else if (take_ownership) { - /* I'm the owner */ + if (!shared_fc_handler_updated ()) + { + owner_unlock (); + if (IsEventSignalled (cancel_evt)) + goto canceled; + continue; + } + else + { + set_owner (me); + set_pending_owner (null_fr_id); + if (update_my_handlers () < 0) + api_fatal ("Can't update my handlers, %E"); + owner_found (); + owner_unlock (); + /* Fall through to owner_listen. */ + } + } + +owner_listen: fifo_client_lock (); cleanup_handlers (); if (add_client_handler () < 0) @@ -590,7 +593,6 @@ fhandler_fifo::fifo_reader_thread_func () fifo_client_unlock (); if (cancel) goto canceled; - } } canceled: if (conn_evt) From b0418138fe47d328b6e12137255b6df86483b1dc Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sat, 11 Jul 2020 14:55:39 -0400 Subject: [PATCH 427/520] Cygwin: FIFO: fix indentation --- winsup/cygwin/fhandler_fifo.cc | 168 ++++++++++++++++----------------- 1 file changed, 84 insertions(+), 84 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 1fb319fcf..69dda0811 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -501,98 +501,98 @@ fhandler_fifo::fifo_reader_thread_func () } owner_listen: - fifo_client_lock (); - cleanup_handlers (); - if (add_client_handler () < 0) - api_fatal ("Can't add a client handler, %E"); + fifo_client_lock (); + cleanup_handlers (); + if (add_client_handler () < 0) + api_fatal ("Can't add a client handler, %E"); - /* Listen for a writer to connect to the new client handler. */ - fifo_client_handler& fc = fc_handler[nhandlers - 1]; - fifo_client_unlock (); - shared_fc_handler_updated (false); - owner_unlock (); - NTSTATUS status; - IO_STATUS_BLOCK io; - bool cancel = false; - bool update = false; + /* Listen for a writer to connect to the new client handler. */ + fifo_client_handler& fc = fc_handler[nhandlers - 1]; + fifo_client_unlock (); + shared_fc_handler_updated (false); + owner_unlock (); + NTSTATUS status; + IO_STATUS_BLOCK io; + bool cancel = false; + bool update = false; - status = NtFsControlFile (fc.h, conn_evt, NULL, NULL, &io, - FSCTL_PIPE_LISTEN, NULL, 0, NULL, 0); - if (status == STATUS_PENDING) + status = NtFsControlFile (fc.h, conn_evt, NULL, NULL, &io, + FSCTL_PIPE_LISTEN, NULL, 0, NULL, 0); + if (status == STATUS_PENDING) + { + HANDLE w[3] = { conn_evt, update_needed_evt, cancel_evt }; + switch (WaitForMultipleObjects (3, w, false, INFINITE)) { - HANDLE w[3] = { conn_evt, update_needed_evt, cancel_evt }; - switch (WaitForMultipleObjects (3, w, false, INFINITE)) - { - case WAIT_OBJECT_0: - status = io.Status; - debug_printf ("NtFsControlFile STATUS_PENDING, then %y", - status); - break; - case WAIT_OBJECT_0 + 1: - status = STATUS_WAIT_1; - update = true; - break; - case WAIT_OBJECT_0 + 2: - status = STATUS_THREAD_IS_TERMINATING; - cancel = true; - update = true; - break; - default: - api_fatal ("WFMO failed, %E"); - } - } - else - debug_printf ("NtFsControlFile status %y, no STATUS_PENDING", - status); - HANDLE ph = NULL; - NTSTATUS status1; - - fifo_client_lock (); - switch (status) - { - case STATUS_SUCCESS: - case STATUS_PIPE_CONNECTED: - record_connection (fc); + case WAIT_OBJECT_0: + status = io.Status; + debug_printf ("NtFsControlFile STATUS_PENDING, then %y", + status); break; - case STATUS_PIPE_CLOSING: - record_connection (fc, fc_closing); + case WAIT_OBJECT_0 + 1: + status = STATUS_WAIT_1; + update = true; break; - case STATUS_THREAD_IS_TERMINATING: - case STATUS_WAIT_1: - /* Try to connect a bogus client. Otherwise fc is still - listening, and the next connection might not get recorded. */ - status1 = open_pipe (ph); - WaitForSingleObject (conn_evt, INFINITE); - if (NT_SUCCESS (status1)) - /* Bogus cilent connected. */ - delete_client_handler (nhandlers - 1); - else - /* Did a real client connect? */ - switch (io.Status) - { - case STATUS_SUCCESS: - case STATUS_PIPE_CONNECTED: - record_connection (fc); - break; - case STATUS_PIPE_CLOSING: - record_connection (fc, fc_closing); - break; - default: - debug_printf ("NtFsControlFile status %y after failing to connect bogus client or real client", io.Status); - fc.state = fc_unknown; - break; - } + case WAIT_OBJECT_0 + 2: + status = STATUS_THREAD_IS_TERMINATING; + cancel = true; + update = true; break; default: - break; + api_fatal ("WFMO failed, %E"); } - if (ph) - NtClose (ph); - if (update && update_shared_handlers () < 0) - api_fatal ("Can't update shared handlers, %E"); - fifo_client_unlock (); - if (cancel) - goto canceled; + } + else + debug_printf ("NtFsControlFile status %y, no STATUS_PENDING", + status); + HANDLE ph = NULL; + NTSTATUS status1; + + fifo_client_lock (); + switch (status) + { + case STATUS_SUCCESS: + case STATUS_PIPE_CONNECTED: + record_connection (fc); + break; + case STATUS_PIPE_CLOSING: + record_connection (fc, fc_closing); + break; + case STATUS_THREAD_IS_TERMINATING: + case STATUS_WAIT_1: + /* Try to connect a bogus client. Otherwise fc is still + listening, and the next connection might not get recorded. */ + status1 = open_pipe (ph); + WaitForSingleObject (conn_evt, INFINITE); + if (NT_SUCCESS (status1)) + /* Bogus cilent connected. */ + delete_client_handler (nhandlers - 1); + else + /* Did a real client connect? */ + switch (io.Status) + { + case STATUS_SUCCESS: + case STATUS_PIPE_CONNECTED: + record_connection (fc); + break; + case STATUS_PIPE_CLOSING: + record_connection (fc, fc_closing); + break; + default: + debug_printf ("NtFsControlFile status %y after failing to connect bogus client or real client", io.Status); + fc.state = fc_unknown; + break; + } + break; + default: + break; + } + if (ph) + NtClose (ph); + if (update && update_shared_handlers () < 0) + api_fatal ("Can't update shared handlers, %E"); + fifo_client_unlock (); + if (cancel) + goto canceled; } canceled: if (conn_evt) From d3a01b7ec253db6cf9b3dc2be4dd80a9da01281e Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sat, 11 Jul 2020 15:20:45 -0400 Subject: [PATCH 428/520] Cygwin: FIFO: make certain errors non-fatal If update_my_handlers fails to duplicate one or more handles, just mark the corresponding handlers as being in an error state. But if update_my_handlers is unable to open the process of the previous owner, it's likely that something serious has gone wrong, so we continue to make that a fatal error. --- winsup/cygwin/fhandler_fifo.cc | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 69dda0811..91a276ee9 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -383,11 +383,7 @@ fhandler_fifo::update_my_handlers () else prev_proc = OpenProcess (PROCESS_DUP_HANDLE, false, prev.winpid); if (!prev_proc) - { - debug_printf ("Can't open process of previous owner, %E"); - __seterrno (); - goto out; - } + api_fatal ("Can't open process of previous owner, %E"); for (int i = 0; i < get_shared_nhandlers (); i++) { @@ -399,14 +395,17 @@ fhandler_fifo::update_my_handlers () !close_on_exec (), DUPLICATE_SAME_ACCESS)) { debug_printf ("Can't duplicate handle of previous owner, %E"); - --nhandlers; __seterrno (); - goto out; + fc.state = fc_error; + fc.last_read = false; + ret = -1; + } + else + { + fc.state = shared_fc_handler[i].state; + fc.last_read = shared_fc_handler[i].last_read; } - fc.state = shared_fc_handler[i].state; - fc.last_read = shared_fc_handler[i].last_read; } -out: set_prev_owner (null_fr_id); return ret; } @@ -493,7 +492,7 @@ fhandler_fifo::fifo_reader_thread_func () set_owner (me); set_pending_owner (null_fr_id); if (update_my_handlers () < 0) - api_fatal ("Can't update my handlers, %E"); + debug_printf ("error updating my handlers, %E"); owner_found (); owner_unlock (); /* Fall through to owner_listen. */ From 4f25d82cb1f5f021a548bf6794dfe2f8767f2c0f Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Wed, 15 Jul 2020 16:13:47 -0400 Subject: [PATCH 429/520] Cygwin: FIFO: add missing lock --- winsup/cygwin/fhandler_fifo.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 91a276ee9..b6e172ddc 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -422,7 +422,9 @@ fhandler_fifo::update_shared_handlers () set_shared_nhandlers (nhandlers); memcpy (shared_fc_handler, fc_handler, nhandlers * sizeof (fc_handler[0])); shared_fc_handler_updated (true); + owner_lock (); set_prev_owner (me); + owner_unlock (); return 0; } From a4dc0eb15c534396b199b6aa350475b62bae32d5 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sun, 12 Jul 2020 18:11:38 -0400 Subject: [PATCH 430/520] Cygwin: fhandler_fifo::take_ownership: don't set event unnecessarily Don't set update_needed_evt if there's currently no owner. This will cause unnecessary churn once I'm the owner and am listening for connections. --- winsup/cygwin/fhandler_fifo.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index b6e172ddc..fd1695f40 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -1186,8 +1186,11 @@ fhandler_fifo::take_ownership () return; } set_pending_owner (me); + /* Wake up my fifo_reader_thread. */ owner_needed (); - SetEvent (update_needed_evt); + if (get_owner ()) + /* Wake up owner's fifo_reader_thread. */ + SetEvent (update_needed_evt); owner_unlock (); /* The reader threads should now do the transfer. */ WaitForSingleObject (owner_found_evt, INFINITE); From 4eaa55463d97596310c1793fb877502dabec397c Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Mon, 13 Jul 2020 07:01:57 -0400 Subject: [PATCH 431/520] Cygwin: FIFO: allow take_ownership to be interrupted Use cygwait in take_ownership to allow interruption while waiting to become owner. Return the cygwait return value or a suitable value to indicate an error. raw_read now checks the return value and acts accordingly. --- winsup/cygwin/fhandler.h | 2 +- winsup/cygwin/fhandler_fifo.cc | 54 ++++++++++++++++++++++++++++++---- winsup/cygwin/select.cc | 11 ++++++- 3 files changed, 59 insertions(+), 8 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 221c856e6..0e0cfbd71 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1489,7 +1489,7 @@ public: void owner_lock () { shmem->owner_lock (); } void owner_unlock () { shmem->owner_unlock (); } - void take_ownership (); + DWORD take_ownership (); void reading_lock () { shmem->reading_lock (); } void reading_unlock () { shmem->reading_unlock (); } diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index fd1695f40..30486304f 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -1175,15 +1175,16 @@ fhandler_fifo::raw_write (const void *ptr, size_t len) return ret; } -/* Called from raw_read and select.cc:peek_fifo. */ -void +/* Called from raw_read and select.cc:peek_fifo. Return WAIT_OBJECT_0 + on success. */ +DWORD fhandler_fifo::take_ownership () { owner_lock (); if (get_owner () == me) { owner_unlock (); - return; + return WAIT_OBJECT_0; } set_pending_owner (me); /* Wake up my fifo_reader_thread. */ @@ -1192,8 +1193,19 @@ fhandler_fifo::take_ownership () /* Wake up owner's fifo_reader_thread. */ SetEvent (update_needed_evt); owner_unlock (); - /* The reader threads should now do the transfer. */ - WaitForSingleObject (owner_found_evt, INFINITE); + /* The reader threads should now do the transfer. */ + DWORD waitret = cygwait (owner_found_evt, cw_cancel | cw_sig_eintr); + owner_lock (); + if (waitret == WAIT_OBJECT_0 + && (get_owner () != me || get_pending_owner ())) + { + /* Something went wrong. Return WAIT_TIMEOUT, which can't be + returned by the above cygwait call. */ + set_pending_owner (null_fr_id); + waitret = WAIT_TIMEOUT; + } + owner_unlock (); + return waitret; } void __reg3 @@ -1206,7 +1218,37 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) { /* No one else can take ownership while we hold the reading_lock. */ reading_lock (); - take_ownership (); + switch (take_ownership ()) + { + case WAIT_OBJECT_0: + break; + case WAIT_SIGNALED: + if (_my_tls.call_signal_handler ()) + { + reading_unlock (); + continue; + } + else + { + set_errno (EINTR); + reading_unlock (); + goto errout; + } + break; + case WAIT_CANCELED: + reading_unlock (); + pthread::static_cancel_self (); + break; + case WAIT_TIMEOUT: + reading_unlock (); + debug_printf ("take_ownership returned an unexpected result; retry"); + continue; + default: + reading_unlock (); + debug_printf ("unknown error while trying to take ownership, %E"); + goto errout; + } + /* Poll the connected clients for input. Make two passes. On the first pass, just try to read from the client from which we last read successfully. This should minimize diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 80d16f2a7..3f3f33fb5 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -867,7 +867,16 @@ peek_fifo (select_record *s, bool from_select) } fh->reading_lock (); - fh->take_ownership (); + if (fh->take_ownership () != WAIT_OBJECT_0) + { + select_printf ("%s, unable to take ownership", fh->get_name ()); + fh->reading_unlock (); + gotone += s->read_ready = true; + if (s->except_selected) + gotone += s->except_ready = true; + goto out; + } + fh->fifo_client_lock (); int nconnected = 0; for (int i = 0; i < fh->get_nhandlers (); i++) From f56dc3357901bee805422e5e6c6d6c4cd8cfa8f7 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Wed, 15 Jul 2020 16:58:18 -0400 Subject: [PATCH 432/520] Cygwin: FIFO: clean up Remove the fhandler_fifo::get_me method, which is no longer used. Make the methods get_owner, set_owner, owner_lock, and owner_unlock private. --- winsup/cygwin/fhandler.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 0e0cfbd71..60bd27e00 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1437,6 +1437,8 @@ class fhandler_fifo: public fhandler_base void nwriters_lock () { shmem->nwriters_lock (); } void nwriters_unlock () { shmem->nwriters_unlock (); } + fifo_reader_id_t get_owner () const { return shmem->get_owner (); } + void set_owner (fifo_reader_id_t fr_id) { shmem->set_owner (fr_id); } fifo_reader_id_t get_prev_owner () const { return shmem->get_prev_owner (); } void set_prev_owner (fifo_reader_id_t fr_id) { shmem->set_prev_owner (fr_id); } @@ -1444,6 +1446,8 @@ class fhandler_fifo: public fhandler_base { return shmem->get_pending_owner (); } void set_pending_owner (fifo_reader_id_t fr_id) { shmem->set_pending_owner (fr_id); } + void owner_lock () { shmem->owner_lock (); } + void owner_unlock () { shmem->owner_unlock (); } void owner_needed () { @@ -1483,12 +1487,6 @@ public: void fifo_client_lock () { _fifo_client_lock.lock (); } void fifo_client_unlock () { _fifo_client_lock.unlock (); } - fifo_reader_id_t get_me () const { return me; } - fifo_reader_id_t get_owner () const { return shmem->get_owner (); } - void set_owner (fifo_reader_id_t fr_id) { shmem->set_owner (fr_id); } - void owner_lock () { shmem->owner_lock (); } - void owner_unlock () { shmem->owner_unlock (); } - DWORD take_ownership (); void reading_lock () { shmem->reading_lock (); } void reading_unlock () { shmem->reading_unlock (); } From ac371ee1baa27441d21b71fefbc817e9d821411e Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sat, 11 Jul 2020 15:43:44 -0400 Subject: [PATCH 433/520] Cygwin: FIFO: update commentary --- winsup/cygwin/fhandler_fifo.cc | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 30486304f..e9d0187d4 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -52,10 +52,23 @@ which is mostly idle. The thread wakes up if that reader might need to take ownership. - There is a block of shared memory, accessible to all readers, - that contains information needed for the owner change process. - It also contains some locks to prevent races and deadlocks - between the various threads. + There is a block of named shared memory, accessible to all + fhandlers for a given FIFO. It keeps track of the number of open + readers and writers; it contains information needed for the owner + change process; and it contains some locks to prevent races and + deadlocks between the various threads. + + The shared memory is created by the first reader to open the + FIFO. It is opened by subsequent readers and by all writers. It + is destroyed by Windows when the last handle to it is closed. + + If a handle to it somehow remains open after all processes + holding file descriptors to the FIFO have closed, the shared + memory can persist and be reused with stale data by the next + process that opens the FIFO. So far I've seen this happen only + as a result of a bug in the code, but there are some debug_printf + statements in fhandler_fifo::open to help detect this if it + happens again. At this writing, I know of only one application (Midnight Commander when running under tcsh) that *explicitly* opens two From 53b7116705754192c66f2580d638644414b60c9d Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Thu, 16 Jul 2020 16:21:03 -0400 Subject: [PATCH 434/520] Cygwin: FIFO: document recent fixes --- winsup/cygwin/release/3.1.7 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/release/3.1.7 b/winsup/cygwin/release/3.1.7 index 910dc0a3d..0c437e9e9 100644 --- a/winsup/cygwin/release/3.1.7 +++ b/winsup/cygwin/release/3.1.7 @@ -5,3 +5,6 @@ Bug Fixes: - Fix select/poll issue in case a socket connect call fails. Addresses: https://cygwin.com/pipermail/cygwin/2020-July/245528.html + +- Fix multiple reader support for FIFOs + Addresses: https://sourceware.org/pipermail/cygwin/2020-July/245456.html From 2aa3eb750332096ccc590d777176f4a686b71faf Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 20 Jul 2020 09:49:07 +0200 Subject: [PATCH 435/520] Cygwin: sockets: Rearrange check for connect failure Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_socket_inet.cc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/winsup/cygwin/fhandler_socket_inet.cc b/winsup/cygwin/fhandler_socket_inet.cc index e5b0d2d14..2b50671e5 100644 --- a/winsup/cygwin/fhandler_socket_inet.cc +++ b/winsup/cygwin/fhandler_socket_inet.cc @@ -352,9 +352,13 @@ fhandler_socket_wsock::evaluate_events (const long event_mask, long &events, WSASetLastError (wsa_err); ret = SOCKET_ERROR; } - else - wsock_events->events |= FD_WRITE; - wsock_events->events &= ~FD_CONNECT; + /* Since FD_CONNECT is only given once, we have to keep FD_CONNECT + for connection failed sockets to have consistent behaviour in + programs calling poll/select multiple times. Example test to + non-listening port: curl -v 127.0.0.1:47 */ + if (connect_state () != connect_failed) + wsock_events->events &= ~FD_CONNECT; + wsock_events->events |= FD_WRITE; wsock_events->connect_errorcode = 0; } /* This test makes accept/connect behave as on Linux when accept/connect @@ -376,12 +380,6 @@ fhandler_socket_wsock::evaluate_events (const long event_mask, long &events, if (erase) wsock_events->events &= ~(events & ~(FD_WRITE | FD_CLOSE)); } - /* Since FD_CONNECT is only given once, we manually need to set - FD_WRITE for connection failed sockets to have consistent - behaviour in programs calling poll/select multiple times. - Example test to non-listening port: curl -v 127.0.0.1:47 */ - if ((connect_state () == connect_failed) && (event_mask & FD_WRITE)) - wsock_events->events |= FD_WRITE; UNLOCK_EVENTS; return ret; From e0a53d66256ba720fa3ad9f4eaef94da1df11463 Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Sat, 18 Jul 2020 13:48:47 +0900 Subject: [PATCH 436/520] Cygwin: pty: Fix a bug on redirecting something to /dev/pty*. - After commit 0365031ce1347600d854a23f30f1355745a1765c, key input becomes not working by following steps. 1) Start cmd.exe in mintty. 2) Open another mintty. 3) Execute "echo AAA > /dev/pty*" (pty* is the pty opened in 1.) This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index a61167116..6a004f3a5 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -969,11 +969,6 @@ fhandler_pty_slave::open (int flags, mode_t) init_console_handler (true); } - isHybrid = false; - get_ttyp ()->pcon_pid = 0; - get_ttyp ()->switch_to_pcon_in = false; - get_ttyp ()->switch_to_pcon_out = false; - set_open_status (); return 1; From d8a8d2ce5953af3383aff019596bdf7f7aef6c41 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Mon, 20 Jul 2020 08:59:09 -0400 Subject: [PATCH 437/520] Cygwin: mmap: fix mapping beyond EOF on 64 bit Commit 605bdcd410384dda6db66b9b8cd19e863702e1bb enabled mapping beyond EOF in 64 bit environments. But the variable 'orig_len' did not get rounded up to a multiple of 64K. This rounding was done on 32 bit only. Fix this by rounding up orig_len on 64 bit, in the same place where 'len' is rounded up. Rounding up is needed to make sigbus_page_len a multiple of the allocation granularity. In addition, failing to round up could cause orig_len to be smaller than len. Since these are both unsigned values, the statement 'orig_len -= len' could then cause orig_len to be huge, and mmap would fail with errno EFBIG. I observed this failure while debugging the problem reported in https://sourceware.org/pipermail/cygwin/2020-July/245557.html. The failure can be seen by running the test case in that report under gdb or strace. --- winsup/cygwin/mmap.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index feb9e5d0e..a08d00f83 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -1144,6 +1144,7 @@ go_ahead: ends in, but there's nothing at all we can do about that. */ #ifdef __x86_64__ len = roundup2 (len, wincap.allocation_granularity ()); + orig_len = roundup2 (orig_len, wincap.allocation_granularity ()); #else len = roundup2 (len, wincap.is_wow64 () ? wincap.allocation_granularity () : wincap.page_size ()); From 119e8d5c11318058880922625907b60b86875024 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 20 Jul 2020 17:53:29 +0200 Subject: [PATCH 438/520] Cygwin: mmap: constify pagesize throughout Signed-off-by: Corinna Vinschen --- winsup/cygwin/mmap.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index a08d00f83..1fccc6c58 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -765,7 +765,7 @@ mmap_is_attached_or_noreserve (void *addr, size_t len) LIST_LOCK (); mmap_list *map_list = mmapped_areas.get_list_by_fd (-1, NULL); - size_t pagesize = wincap.allocation_granularity (); + const size_t pagesize = wincap.allocation_granularity (); caddr_t start_addr = (caddr_t) rounddown ((uintptr_t) addr, pagesize); len += ((caddr_t) addr - start_addr); len = roundup2 (len, pagesize); @@ -852,7 +852,7 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, off_t off) caddr_t base = NULL; struct stat st; - size_t pagesize = wincap.allocation_granularity (); + const size_t pagesize = wincap.allocation_granularity (); fh_anonymous.set_handle (INVALID_HANDLE_VALUE); fh_anonymous.set_access (GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE); @@ -1227,7 +1227,7 @@ munmap (void *addr, size_t len) set_errno (EINVAL); return -1; } - size_t pagesize = wincap.allocation_granularity (); + const size_t pagesize = wincap.allocation_granularity (); if (((uintptr_t) addr % pagesize) || !len) { set_errno (EINVAL); @@ -1348,7 +1348,7 @@ mprotect (void *addr, size_t len, int prot) syscall_printf ("mprotect (addr: %p, len %lu, prot %y)", addr, len, prot); /* See comment in mmap64 for a description. */ - size_t pagesize = wincap.allocation_granularity (); + const size_t pagesize = wincap.allocation_granularity (); if ((uintptr_t) addr % pagesize) { set_errno (EINVAL); @@ -1433,7 +1433,7 @@ mlock (const void *addr, size_t len) int ret = -1; /* Align address and length values to page size. */ - size_t pagesize = wincap.allocation_granularity (); + const size_t pagesize = wincap.allocation_granularity (); PVOID base = (PVOID) rounddown ((uintptr_t) addr, pagesize); SIZE_T size = roundup2 (((uintptr_t) addr - (uintptr_t) base) + len, pagesize); @@ -1491,7 +1491,7 @@ munlock (const void *addr, size_t len) int ret = -1; /* Align address and length values to page size. */ - size_t pagesize = wincap.allocation_granularity (); + const size_t pagesize = wincap.allocation_granularity (); PVOID base = (PVOID) rounddown ((uintptr_t) addr, pagesize); SIZE_T size = roundup2 (((uintptr_t) addr - (uintptr_t) base) + len, pagesize); @@ -1539,7 +1539,7 @@ posix_madvise (void *addr, size_t len, int advice) case POSIX_MADV_WILLNEED: { /* Align address and length values to page size. */ - size_t pagesize = wincap.allocation_granularity (); + const size_t pagesize = wincap.allocation_granularity (); PVOID base = (PVOID) rounddown ((uintptr_t) addr, pagesize); SIZE_T size = roundup2 (((uintptr_t) addr - (uintptr_t) base) + len, pagesize); @@ -1560,7 +1560,7 @@ posix_madvise (void *addr, size_t len, int advice) case POSIX_MADV_DONTNEED: { /* Align address and length values to page size. */ - size_t pagesize = wincap.allocation_granularity (); + const size_t pagesize = wincap.allocation_granularity (); PVOID base = (PVOID) rounddown ((uintptr_t) addr, pagesize); SIZE_T size = roundup2 (((uintptr_t) addr - (uintptr_t) base) + len, pagesize); From b40983eda166acf9741690cb49922b6c7255369b Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Wed, 1 Jul 2020 16:08:59 +0100 Subject: [PATCH 439/520] Cygwin: Show details of all memory regions in dumper debug output --- winsup/utils/dumper.cc | 99 +++++++++++++++++++++++++++++++++--------- 1 file changed, 79 insertions(+), 20 deletions(-) diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc index ccc4bd12f..46e4b0692 100644 --- a/winsup/utils/dumper.cc +++ b/winsup/utils/dumper.cc @@ -289,6 +289,25 @@ dumper::add_module (LPVOID base_address) #define PAGE_BUFFER_SIZE 4096 +void protect_dump(DWORD protect, char *buf) +{ + const char *pt[10]; + pt[0] = (protect & PAGE_READONLY) ? "RO " : ""; + pt[1] = (protect & PAGE_READWRITE) ? "RW " : ""; + pt[2] = (protect & PAGE_WRITECOPY) ? "WC " : ""; + pt[3] = (protect & PAGE_EXECUTE) ? "EX " : ""; + pt[4] = (protect & PAGE_EXECUTE_READ) ? "EXRO " : ""; + pt[5] = (protect & PAGE_EXECUTE_READWRITE) ? "EXRW " : ""; + pt[6] = (protect & PAGE_EXECUTE_WRITECOPY) ? "EXWC " : ""; + pt[7] = (protect & PAGE_GUARD) ? "GRD " : ""; + pt[8] = (protect & PAGE_NOACCESS) ? "NA " : ""; + pt[9] = (protect & PAGE_NOCACHE) ? "NC " : ""; + + buf[0] = '\0'; + for (int i = 0; i < 10; i++) + strcat (buf, pt[i]); +} + int dumper::collect_memory_sections () { @@ -313,10 +332,65 @@ dumper::collect_memory_sections () break; int skip_region_p = 0; + const char *disposition = "dumped"; - if (mbi.Protect & (PAGE_NOACCESS | PAGE_GUARD) || - mbi.State != MEM_COMMIT) - skip_region_p = 1; + if (mbi.Protect & PAGE_NOACCESS) + { + skip_region_p = 1; + disposition = "skipped due to noaccess"; + } + + if (mbi.Protect & PAGE_GUARD) + { + skip_region_p = 1; + disposition = "skipped due to guardpage"; + } + + if (mbi.State != MEM_COMMIT) + { + skip_region_p = 1; + disposition = "skipped due to uncommited"; + } + + { + char buf[10 * 6]; + protect_dump(mbi.Protect, buf); + + const char *state = ""; + const char *type = ""; + + if (mbi.State & MEM_COMMIT) + { + state = "COMMIT"; + } + else if (mbi.State & MEM_FREE) + { + state = "FREE"; + type = "FREE"; + } + else if (mbi.State & MEM_RESERVE) + { + state = "RESERVE"; + } + + if (mbi.Type & MEM_IMAGE) + { + type = "IMAGE"; + } + else if (mbi.Type & MEM_MAPPED) + { + type = "MAPPED"; + } + else if (mbi.Type & MEM_PRIVATE) + { + type = "PRIVATE"; + } + + deb_printf ("region 0x%016lx-0x%016lx (protect = %-8s, state = %-7s, type = %-7s, %s)\n", + current_page_address, + current_page_address + mbi.RegionSize, + buf, state, type, disposition); + } if (!skip_region_p) { @@ -326,26 +400,11 @@ dumper::collect_memory_sections () if (!ReadProcessMemory (hProcess, current_page_address, mem_buf, sizeof (mem_buf), &done)) { DWORD err = GetLastError (); - const char *pt[10]; - pt[0] = (mbi.Protect & PAGE_READONLY) ? "RO " : ""; - pt[1] = (mbi.Protect & PAGE_READWRITE) ? "RW " : ""; - pt[2] = (mbi.Protect & PAGE_WRITECOPY) ? "WC " : ""; - pt[3] = (mbi.Protect & PAGE_EXECUTE) ? "EX " : ""; - pt[4] = (mbi.Protect & PAGE_EXECUTE_READ) ? "EXRO " : ""; - pt[5] = (mbi.Protect & PAGE_EXECUTE_READWRITE) ? "EXRW " : ""; - pt[6] = (mbi.Protect & PAGE_EXECUTE_WRITECOPY) ? "EXWC " : ""; - pt[7] = (mbi.Protect & PAGE_GUARD) ? "GRD " : ""; - pt[8] = (mbi.Protect & PAGE_NOACCESS) ? "NA " : ""; - pt[9] = (mbi.Protect & PAGE_NOCACHE) ? "NC " : ""; - char buf[10 * 6]; - buf[0] = '\0'; - for (int i = 0; i < 10; i++) - strcat (buf, pt[i]); - deb_printf ("warning: failed to read memory at %p-%p (protect = %s), error %ld.\n", + deb_printf ("warning: failed to read memory at %p-%p, error %ld.\n", current_page_address, current_page_address + mbi.RegionSize, - buf, err); + err); skip_region_p = 1; } } From 0302c69164e5aac8b9c2dc03c70a2a23cfb6add4 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Sat, 4 Jul 2020 15:51:14 +0100 Subject: [PATCH 440/520] Cygwin: Remove reading of PE for section flags from dumper --- winsup/utils/Makefile.in | 6 +-- winsup/utils/dumper.cc | 2 - winsup/utils/dumper.h | 2 - winsup/utils/parse_pe.cc | 107 --------------------------------------- 4 files changed, 3 insertions(+), 114 deletions(-) delete mode 100644 winsup/utils/parse_pe.cc diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in index 5bb62bc6f..f9892fa1d 100644 --- a/winsup/utils/Makefile.in +++ b/winsup/utils/Makefile.in @@ -113,9 +113,9 @@ build_dumper := $(shell test -r "$(libbfd)" && echo 1) ifdef build_dumper CYGWIN_BINS += dumper.exe -dumper.o module_info.o parse_pe.o: CXXFLAGS += -I$(top_srcdir)/include -dumper.o parse_pe.o: dumper.h -dumper.exe: module_info.o parse_pe.o +dumper.o module_info.o: CXXFLAGS += -I$(top_srcdir)/include +dumper.o: dumper.h +dumper.exe: module_info.o dumper.exe: CYGWIN_LDFLAGS += -lpsapi -lbfd -lintl -liconv -liberty ${ZLIB} else all: warn_dumper diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc index 46e4b0692..4577d2a3f 100644 --- a/winsup/utils/dumper.cc +++ b/winsup/utils/dumper.cc @@ -281,8 +281,6 @@ dumper::add_module (LPVOID base_address) new_entity->u.module.base_address = base_address; new_entity->u.module.name = module_name; - parse_pe (module_name, excl_list); - deb_printf ("added module %p %s\n", base_address, module_name); return 1; } diff --git a/winsup/utils/dumper.h b/winsup/utils/dumper.h index 9367587bf..78592b61e 100644 --- a/winsup/utils/dumper.h +++ b/winsup/utils/dumper.h @@ -133,8 +133,6 @@ extern int deb_printf ( const char* format, ... ); extern char* psapi_get_module_name ( HANDLE hProcess, LPVOID BaseAddress ); -extern int parse_pe ( const char* file_name, exclusion* excl_list ); - extern BOOL verbose; #endif diff --git a/winsup/utils/parse_pe.cc b/winsup/utils/parse_pe.cc deleted file mode 100644 index 90b5c0b0d..000000000 --- a/winsup/utils/parse_pe.cc +++ /dev/null @@ -1,107 +0,0 @@ -/* parse_pe.cc - - Written by Egor Duda - - This file is part of Cygwin. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License (file COPYING.dumper) for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ - -#define PACKAGE -#include -#include -#include - -#include "dumper.h" - -#ifndef bfd_get_section_size -#define bfd_get_section_size(sect) bfd_section_size(sect) -#endif - -int -exclusion::add (LPBYTE mem_base, SIZE_T mem_size) -{ - while (last >= size) - size += step; - region = (process_mem_region *) realloc (region, size * sizeof (process_mem_region)); - if (region == NULL) - return 0; - region[last].base = mem_base; - region[last].size = mem_size; - last++; - return 1; -}; - -int -cmp_regions (const void *r1, const void *r2) -{ - if (((process_mem_region *) r1)->base < ((process_mem_region *) r2)->base) - return -1; - if (((process_mem_region *) r1)->base > ((process_mem_region *) r2)->base) - return 1; - return 0; -} - -int -exclusion::sort_and_check () -{ - qsort (region, last, sizeof (process_mem_region), &cmp_regions); - for (process_mem_region * p = region; p < region + last - 1; p++) - { - process_mem_region *q = p + 1; - if (q == p + 1) - continue; - if (p->base + size > q->base) - { - fprintf (stderr, "region error @ (%p + %zd) > %p\n", p->base, size, q->base); - return 0; - } - } - return 1; -} - -static void -select_data_section (bfd * abfd, asection * sect, PTR obj) -{ - exclusion *excl_list = (exclusion *) obj; - - if ((sect->flags & (SEC_CODE | SEC_DEBUGGING)) && - sect->vma && bfd_get_section_size (sect)) - { - excl_list->add ((LPBYTE) sect->vma, (SIZE_T) bfd_get_section_size (sect)); - deb_printf ("excluding section: %20s %08lx\n", sect->name, - bfd_get_section_size (sect)); - } -} - -int -parse_pe (const char *file_name, exclusion * excl_list) -{ - if (file_name == NULL || excl_list == NULL) - return 0; - - bfd *abfd = bfd_openr (file_name, "pei-i386"); - if (abfd == NULL) - { - bfd_perror ("failed to open file"); - return 0; - } - - bfd_check_format (abfd, bfd_object); - bfd_map_over_sections (abfd, &select_data_section, (PTR) excl_list); - excl_list->sort_and_check (); - - bfd_close (abfd); - return 1; -} From 44103c062166dc66c54ac0640cd4b2ab80d5561e Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Sat, 4 Jul 2020 15:57:31 +0100 Subject: [PATCH 441/520] Cygwin: Drop excluded regions list from dumper Drop excluded regions, now it's always empty --- winsup/utils/dumper.cc | 48 ++++-------------------------------------- winsup/utils/dumper.h | 17 --------------- 2 files changed, 4 insertions(+), 61 deletions(-) diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc index 4577d2a3f..2a0c66002 100644 --- a/winsup/utils/dumper.cc +++ b/winsup/utils/dumper.cc @@ -83,7 +83,6 @@ dumper::dumper (DWORD pid, DWORD tid, const char *file_name) this->pid = pid; this->tid = tid; core_bfd = NULL; - excl_list = new exclusion (20); list = last = NULL; @@ -125,19 +124,16 @@ dumper::close () { if (core_bfd) bfd_close (core_bfd); - if (excl_list) - delete excl_list; if (hProcess) CloseHandle (hProcess); core_bfd = NULL; hProcess = NULL; - excl_list = NULL; } int dumper::sane () { - if (hProcess == NULL || core_bfd == NULL || excl_list == NULL) + if (hProcess == NULL || core_bfd == NULL) return 0; return 1; } @@ -226,42 +222,6 @@ dumper::add_mem_region (LPBYTE base, SIZE_T size) return 1; } -/* split_add_mem_region scans list of regions to be excluded from dumping process - (excl_list) and removes all "excluded" parts from given region. */ -int -dumper::split_add_mem_region (LPBYTE base, SIZE_T size) -{ - if (!sane ()) - return 0; - - if (base == NULL || size == 0) - return 1; // just ignore empty regions - - LPBYTE last_base = base; - - for (process_mem_region * p = excl_list->region; - p < excl_list->region + excl_list->last; - p++) - { - if (p->base >= base + size || p->base + p->size <= base) - continue; - - if (p->base <= base) - { - last_base = p->base + p->size; - continue; - } - - add_mem_region (last_base, p->base - last_base); - last_base = p->base + p->size; - } - - if (last_base < base + size) - add_mem_region (last_base, base + size - last_base); - - return 1; -} - int dumper::add_module (LPVOID base_address) { @@ -413,14 +373,14 @@ dumper::collect_memory_sections () last_size += mbi.RegionSize; else { - split_add_mem_region (last_base, last_size); + add_mem_region (last_base, last_size); last_base = (LPBYTE) mbi.BaseAddress; last_size = mbi.RegionSize; } } else { - split_add_mem_region (last_base, last_size); + add_mem_region (last_base, last_size); last_base = NULL; last_size = 0; } @@ -429,7 +389,7 @@ dumper::collect_memory_sections () } /* dump last sections, if any */ - split_add_mem_region (last_base, last_size); + add_mem_region (last_base, last_size); return 1; }; diff --git a/winsup/utils/dumper.h b/winsup/utils/dumper.h index 78592b61e..6e624a983 100644 --- a/winsup/utils/dumper.h +++ b/winsup/utils/dumper.h @@ -62,22 +62,6 @@ typedef struct _process_entity struct _process_entity* next; } process_entity; -class exclusion -{ -public: - size_t last; - size_t size; - size_t step; - process_mem_region* region; - - exclusion ( size_t step ) { last = size = 0; - this->step = step; - region = NULL; } - ~exclusion () { free ( region ); } - int add ( LPBYTE mem_base, SIZE_T mem_size ); - int sort_and_check (); -}; - #define PAGE_BUFFER_SIZE 4096 class dumper @@ -87,7 +71,6 @@ class dumper HANDLE hProcess; process_entity* list; process_entity* last; - exclusion* excl_list; char* file_name; bfd* core_bfd; From 35227fec9781dd85ef30257f12b857d58dec1840 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Sun, 5 Jul 2020 14:42:59 +0100 Subject: [PATCH 442/520] Cygwin: Don't dump non-writable image regions After this, we will end up dumping memory regions where: - state is MEM_COMMIT (i.e. is not MEM_RESERVE or MEM_FREE), and -- type is MEM_PRIVATE and protection allows reads (i.e. not a guardpage), or -- type is MEM_IMAGE and protection allows writes Making this decision based on the current protection isn't 100% correct, because it may have been changed using VirtualProtect(). But we don't know how to determine if a region is shareable. (As a practical matter, anything which gets us the stack (MEM_PRIVATE) and .data/.bss (RW MEM_IMAGE) is going to be enough for 99% of cases) --- winsup/utils/dumper.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc index 2a0c66002..b96ee54cc 100644 --- a/winsup/utils/dumper.cc +++ b/winsup/utils/dumper.cc @@ -292,6 +292,12 @@ dumper::collect_memory_sections () int skip_region_p = 0; const char *disposition = "dumped"; + if ((mbi.Type & MEM_IMAGE) && !(mbi.Protect & (PAGE_EXECUTE_READWRITE | PAGE_READWRITE))) + { + skip_region_p = 1; + disposition = "skipped due to non-writeable MEM_IMAGE"; + } + if (mbi.Protect & PAGE_NOACCESS) { skip_region_p = 1; From b245014abdf919de55357cbd9ec7b9aa9f1e5cb4 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Tue, 7 Jul 2020 20:54:27 +0100 Subject: [PATCH 443/520] Cygwin: Use MEMORY_WORKING_SET_EX_INFORMATION in dumper Use the (undocumented) MEMORY_WORKING_SET_EX_INFORMATION in dumper to determine if a MEM_IMAGE region is unsharable, and hence has been modified. After this, we will end up dumping memory regions where: - state is MEM_COMMIT (i.e. is not MEM_RESERVE or MEM_FREE), and -- type is MEM_PRIVATE and protection allows reads (i.e. not a guardpage), or -- type is MEM_IMAGE and attribute is non-sharable (i.e. it was WC, got written to, and is now a RW copy) --- winsup/doc/utils.xml | 8 ++--- winsup/utils/Makefile.in | 2 +- winsup/utils/dumper.cc | 63 ++++++++++++++++++++++++++++++++++++++-- 3 files changed, 65 insertions(+), 8 deletions(-) diff --git a/winsup/doc/utils.xml b/winsup/doc/utils.xml index 5f266bcb1..8b92bfdf1 100644 --- a/winsup/doc/utils.xml +++ b/winsup/doc/utils.xml @@ -524,11 +524,11 @@ error_start=x:\path\to\dumper.exe dumper exits, the target process is terminated too. To save space in the core dump, dumper doesn't - write those portions of target process' memory space that are loaded from - executable and dll files and are unchangeable, such as program code and - debug info. Instead, dumper saves paths to files which + write those portions of the target process's memory space that are loaded + from executable and dll files and are unchanged (e.g. program code). + Instead, dumper saves paths to the files which contain that data. When a core dump is loaded into gdb, it uses these - paths to load appropriate files. That means that if you create a core + paths to load the appropriate files. That means that if you create a core dump on one machine and try to debug it on another, you'll need to place identical copies of the executable and dlls in the same directories as on the machine where the core dump was created. diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in index f9892fa1d..6bf4454c5 100644 --- a/winsup/utils/Makefile.in +++ b/winsup/utils/Makefile.in @@ -116,7 +116,7 @@ CYGWIN_BINS += dumper.exe dumper.o module_info.o: CXXFLAGS += -I$(top_srcdir)/include dumper.o: dumper.h dumper.exe: module_info.o -dumper.exe: CYGWIN_LDFLAGS += -lpsapi -lbfd -lintl -liconv -liberty ${ZLIB} +dumper.exe: CYGWIN_LDFLAGS += -lpsapi -lbfd -lintl -liconv -liberty ${ZLIB} -lntdll else all: warn_dumper endif diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc index b96ee54cc..3af138b9e 100644 --- a/winsup/utils/dumper.cc +++ b/winsup/utils/dumper.cc @@ -266,6 +266,46 @@ void protect_dump(DWORD protect, char *buf) strcat (buf, pt[i]); } +typedef enum _MEMORY_INFORMATION_CLASS +{ + MemoryWorkingSetExInformation = 4, // MEMORY_WORKING_SET_EX_INFORMATION +} MEMORY_INFORMATION_CLASS; + +extern "C" +NTSTATUS +NtQueryVirtualMemory(HANDLE ProcessHandle, + LPVOID BaseAddress, + MEMORY_INFORMATION_CLASS MemoryInformationClass, + LPVOID MemoryInformation, + SIZE_T MemoryInformationLength, + SIZE_T *ReturnLength); + +typedef struct _MEMORY_WORKING_SET_EX_INFORMATION +{ + LPVOID VirtualAddress; + ULONG_PTR Long; +} MEMORY_WORKING_SET_EX_INFORMATION; + +#define MWSEI_ATTRIB_SHARED (0x1 << 15) + +static BOOL +getRegionAttributes(HANDLE hProcess, LPVOID address, DWORD &attribs) +{ + MEMORY_WORKING_SET_EX_INFORMATION mwsei = { address }; + NTSTATUS status = NtQueryVirtualMemory(hProcess, 0, + MemoryWorkingSetExInformation, + &mwsei, sizeof(mwsei), 0); + + if (!status) + { + attribs = mwsei.Long; + return TRUE; + } + + deb_printf("MemoryWorkingSetExInformation failed status %08x\n", status); + return FALSE; +} + int dumper::collect_memory_sections () { @@ -292,10 +332,27 @@ dumper::collect_memory_sections () int skip_region_p = 0; const char *disposition = "dumped"; - if ((mbi.Type & MEM_IMAGE) && !(mbi.Protect & (PAGE_EXECUTE_READWRITE | PAGE_READWRITE))) + if (mbi.Type & MEM_IMAGE) { - skip_region_p = 1; - disposition = "skipped due to non-writeable MEM_IMAGE"; + DWORD attribs = 0; + if (getRegionAttributes(hProcess, current_page_address, attribs)) + { + if (attribs & MWSEI_ATTRIB_SHARED) + { + skip_region_p = 1; + disposition = "skipped due to shared MEM_IMAGE"; + } + } + /* + The undocumented MemoryWorkingSetExInformation is allegedly + supported since XP, so should always succeed, but if it fails, + fallback to looking at region protection. + */ + else if (!(mbi.Protect & (PAGE_EXECUTE_READWRITE | PAGE_READWRITE))) + { + skip_region_p = 1; + disposition = "skipped due to non-writeable MEM_IMAGE"; + } } if (mbi.Protect & PAGE_NOACCESS) From eeb2dc1537d2e7de509cec7b88484358d138f231 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Tue, 21 Jul 2020 17:57:37 -0400 Subject: [PATCH 444/520] Cygwin: mmap: document recent bugfix --- winsup/cygwin/release/3.1.7 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/release/3.1.7 b/winsup/cygwin/release/3.1.7 index 0c437e9e9..2f4856495 100644 --- a/winsup/cygwin/release/3.1.7 +++ b/winsup/cygwin/release/3.1.7 @@ -8,3 +8,6 @@ Bug Fixes: - Fix multiple reader support for FIFOs Addresses: https://sourceware.org/pipermail/cygwin/2020-July/245456.html + +- Fix an mmap issue that could cause failure with errno EFBIG + Partially addresses: https://sourceware.org/pipermail/cygwin/2020-July/245557.html From 1c803a6d8864d6f7b2696099f44734914657aa7c Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 20 Jul 2020 20:55:43 +0200 Subject: [PATCH 445/520] Cygwin: mmap: Remove AT_ROUND_TO_PAGE workaround It's working on 32 bit OSes only anyway. It even fails on WOW64. Drop unsupported NtMapViewOfSection flags. Signed-off-by: Corinna Vinschen --- winsup/cygwin/mmap.cc | 143 +++++++++++++----------------------------- winsup/cygwin/ntdll.h | 4 -- 2 files changed, 42 insertions(+), 105 deletions(-) diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index 1fccc6c58..6b2e1c655 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -172,8 +172,7 @@ CreateMapping (HANDLE fhdl, size_t len, off_t off, DWORD openflags, } else { - /* Zero len creates mapping for whole file and allows - AT_EXTENDABLE_FILE mapping, if we ever use it... */ + /* Zero len creates mapping for whole file */ sectionsize.QuadPart = 0; status = NtCreateSection (&h, SECTION_ALL_ACCESS, &oa, §ionsize, protect, attributes, fhdl); @@ -195,12 +194,7 @@ MapView (HANDLE h, void *addr, size_t len, DWORD openflags, DWORD protect = gen_create_protect (openflags, flags); void *base = addr; SIZE_T viewsize = len; -#ifdef __x86_64__ /* AT_ROUND_TO_PAGE isn't supported on 64 bit systems. */ ULONG alloc_type = MEM_TOP_DOWN; -#else - ULONG alloc_type = (base && !wincap.is_wow64 () ? AT_ROUND_TO_PAGE : 0) - | MEM_TOP_DOWN; -#endif #ifdef __x86_64__ /* Don't call NtMapViewOfSectionEx during fork. It requires autoloading @@ -878,6 +872,10 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, off_t off) if (!anonymous (flags) && fd != -1) { + UNICODE_STRING fname; + IO_STATUS_BLOCK io; + FILE_STANDARD_INFORMATION fsi; + /* Ensure that fd is open */ cygheap_fdget cfd (fd); if (cfd < 0) @@ -896,19 +894,16 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, off_t off) /* The autoconf mmap test maps a file of size 1 byte. It then tests every byte of the entire mapped page of 64K for 0-bytes since that's - what POSIX requires. The problem is, we can't create that mapping on - 64 bit systems. The file mapping will be only a single page, 4K, and - since 64 bit systems don't support the AT_ROUND_TO_PAGE flag, the - remainder of the 64K slot will result in a SEGV when accessed. + what POSIX requires. The problem is, we can't create that mapping. + The file mapping will be only a single page, 4K, and the remainder + of the 64K slot will result in a SEGV when accessed. - So, what we do here is cheating for the sake of the autoconf test - on 64 bit systems. The justification is that there's very likely - no application actually utilizing the map beyond EOF, and we know that - all bytes beyond EOF are set to 0 anyway. If this test doesn't work - on 64 bit systems, it will result in not using mmap at all in a - package. But we want that mmap is treated as usable by autoconf, - regardless whether the autoconf test runs on a 32 bit or a 64 bit - system. + So, what we do here is cheating for the sake of the autoconf test. + The justification is that there's very likely no application actually + utilizing the map beyond EOF, and we know that all bytes beyond EOF + are set to 0 anyway. If this test doesn't work, it will result in + not using mmap at all in a package. But we want mmap being treated + as usable by autoconf. Ok, so we know exactly what autoconf is doing. The file is called "conftest.txt", it has a size of 1 byte, the mapping size is the @@ -916,31 +911,19 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, off_t off) mapping is MAP_SHARED, the offset is 0. If all these requirements are given, we just return an anonymous map. - This will help to get over the autoconf test even on 64 bit systems. The tests are ordered for speed. */ -#ifdef __x86_64__ - if (1) -#else - if (wincap.is_wow64 ()) -#endif - { - UNICODE_STRING fname; - IO_STATUS_BLOCK io; - FILE_STANDARD_INFORMATION fsi; - - if (len == pagesize - && prot == (PROT_READ | PROT_WRITE) - && flags == MAP_SHARED - && off == 0 - && (RtlSplitUnicodePath (fh->pc.get_nt_native_path (), NULL, - &fname), - wcscmp (fname.Buffer, L"conftest.txt") == 0) - && NT_SUCCESS (NtQueryInformationFile (fh->get_handle (), &io, - &fsi, sizeof fsi, - FileStandardInformation)) - && fsi.EndOfFile.QuadPart == 1LL) - flags |= MAP_ANONYMOUS; - } + if (len == pagesize + && prot == (PROT_READ | PROT_WRITE) + && flags == MAP_SHARED + && off == 0 + && (RtlSplitUnicodePath (fh->pc.get_nt_native_path (), NULL, + &fname), + wcscmp (fname.Buffer, L"conftest.txt") == 0) + && NT_SUCCESS (NtQueryInformationFile (fh->get_handle (), &io, + &fsi, sizeof fsi, + FileStandardInformation)) + && fsi.EndOfFile.QuadPart == 1LL) + flags |= MAP_ANONYMOUS; } if (anonymous (flags) || fd == -1) @@ -1025,20 +1008,8 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, off_t off) goto go_ahead; } fsiz -= off; - /* We're creating the pages beyond EOF as reserved, anonymous pages. - Note that 64 bit environments don't support the AT_ROUND_TO_PAGE - flag, which is required to get this right for the remainder of - the first 64K block the file ends in. We perform the workaround - nevertheless to support expectations that the range mapped beyond - EOF can be safely munmap'ed instead of being taken by another, - totally unrelated mapping. */ - if ((off_t) len > fsiz && !autogrow (flags)) - orig_len = len; -#ifdef __i386__ - else if (!wincap.is_wow64 () && roundup2 (len, wincap.page_size ()) - < roundup2 (len, pagesize)) - orig_len = len; -#endif + /* We're creating the pages beyond EOF as reserved, anonymous + pages if MAP_AUTOGROW is not set. */ if ((off_t) len > fsiz) { if (autogrow (flags)) @@ -1053,9 +1024,12 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, off_t off) } } else - /* Otherwise, don't map beyond EOF, since Windows would change - the file to the new length, in contrast to POSIX. */ - len = fsiz; + { + /* Otherwise, don't map beyond EOF, since Windows would change + the file to the new length, in contrast to POSIX. */ + orig_len = len; + len = fsiz; + } } /* If the requested offset + len is <= file size, drop MAP_AUTOGROW. @@ -1088,6 +1062,7 @@ go_ahead: } } + orig_len = roundup2 (orig_len, pagesize); #ifdef __x86_64__ if (!wincap.has_extended_mem_api ()) addr = mmap_alloc.alloc (addr, orig_len ?: len, fixed (flags)); @@ -1099,7 +1074,6 @@ go_ahead: deallocated and the address we got is used as base address for the subsequent real mappings. This ensures that we have enough space for the whole thing. */ - orig_len = roundup2 (orig_len, pagesize); PVOID newaddr = VirtualAlloc (addr, orig_len, MEM_TOP_DOWN | MEM_RESERVE, PAGE_READWRITE); if (!newaddr) @@ -1132,51 +1106,18 @@ go_ahead: if (orig_len) { /* If the requested length is bigger than the file size, the - remainder is created as anonymous mapping. Actually two - mappings are created, first the remainder from the file end to - the next 64K boundary as accessible pages with the same - protection as the file's pages, then as much pages as necessary - to accomodate the requested length, but as reserved pages which - raise a SIGBUS when trying to access them. AT_ROUND_TO_PAGE - and page protection on shared pages is only supported by the - 32 bit environment, so don't even try on 64 bit or even WOW64. - This results in an allocation gap in the first 64K block the file - ends in, but there's nothing at all we can do about that. */ -#ifdef __x86_64__ - len = roundup2 (len, wincap.allocation_granularity ()); - orig_len = roundup2 (orig_len, wincap.allocation_granularity ()); -#else - len = roundup2 (len, wincap.is_wow64 () ? wincap.allocation_granularity () - : wincap.page_size ()); -#endif + remainder is created as anonymous mapping, as reserved pages which + raise a SIGBUS when trying to access them. This results in an + allocation gap in the first 64K block the file ends in, but there's + nothing at all we can do about that. */ + len = roundup2 (len, pagesize); if (orig_len - len) { - orig_len -= len; - size_t valid_page_len = 0; -#ifndef __x86_64__ - if (!wincap.is_wow64 ()) - valid_page_len = orig_len % pagesize; -#endif - size_t sigbus_page_len = orig_len - valid_page_len; + size_t sigbus_page_len = orig_len - len; - caddr_t at_base = base + len; - if (valid_page_len) - { - prot |= __PROT_FILLER; - flags &= MAP_SHARED | MAP_PRIVATE; - flags |= MAP_ANONYMOUS | MAP_FIXED; - at_base = mmap_worker (NULL, &fh_anonymous, at_base, - valid_page_len, prot, flags, -1, 0, NULL); - if (!at_base) - { - fh->munmap (fh->get_handle (), base, len); - set_errno (ENOMEM); - goto out_with_unlock; - } - at_base += valid_page_len; - } if (sigbus_page_len) { + caddr_t at_base = base + len; prot = PROT_READ | PROT_WRITE | __PROT_ATTACH; flags = MAP_ANONYMOUS | MAP_NORESERVE | MAP_FIXED; at_base = mmap_worker (NULL, &fh_anonymous, at_base, diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h index 5c6552751..0c6ad13dc 100644 --- a/winsup/cygwin/ntdll.h +++ b/winsup/cygwin/ntdll.h @@ -51,10 +51,6 @@ extern GUID __cygwin_socket_guid; #define FILE_AUTOGENERATED_DEVICE_NAME 0x00000080 #define FILE_DEVICE_SECURE_OPEN 0x00000100 -/* Allocation type values in NtMapViewOfSection call. */ -#define AT_EXTENDABLE_FILE 0x00002000 -#define AT_ROUND_TO_PAGE 0x40000000 - /* Lock type in NtLockVirtualMemory/NtUnlockVirtualMemory call. */ #define MAP_PROCESS 1 #define MAP_SYSTEM 2 From 0947efb859110d0bbe4b6f1ddc9a762613e662a8 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Wed, 22 Jul 2020 13:22:54 -0600 Subject: [PATCH 446/520] fhandler_proc.cc(format_proc_cpuinfo): add flags and TLB size update to Linux-next 5.8 order fields and flags: add amd_dcm, arch_lbr, arch_perfmon, art, cpuid, extd_apicid, ibpb, ibrs, ibrs_enhanced, nonstop_tsc_s3, nopl, rep_good, ring3mwait, ssbd, stibp, tsc_known_freq, tsc_reliable, xtopology flags; add TLB size line; add ftuprint macro for feature test unconditional flag print; add commented out flags requiring CR or MSR access in print order with comment explaining issue; make cpuid leaf numbers consistent 8 hex digits for searching --- winsup/cygwin/fhandler_proc.cc | 299 ++++++++++++++++++++++++++++----- 1 file changed, 256 insertions(+), 43 deletions(-) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 2396bfe57..4bb8bea17 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -609,8 +609,10 @@ format_proc_stat (void *, char *&destbuf) } #define print(x) { bufptr = stpcpy (bufptr, (x)); } +/* feature test unconditional print */ +#define ftuprint(msg) print (" " msg) /* feature test bit position (0-32) and conditional print */ -#define ftcprint(feat,bitno,msg) if ((feat) & (1 << (bitno))) { print (" " msg); } +#define ftcprint(feat,bitno,msg) if ((feat) & (1 << (bitno))) { ftuprint (msg); } static inline uint32_t get_msb (uint32_t in) @@ -1021,8 +1023,8 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features1, 22, "acpi"); /* ACPI via MSR */ ftcprint (features1, 23, "mmx"); /* multimedia extensions */ ftcprint (features1, 24, "fxsr"); /* fxsave/fxrstor */ - ftcprint (features1, 25, "sse"); /* xmm */ - ftcprint (features1, 26, "sse2"); /* xmm2 */ + ftcprint (features1, 25, "sse"); /* xmm sse */ + ftcprint (features1, 26, "sse2"); /* xmm2 sse2 */ ftcprint (features1, 27, "ss"); /* CPU self snoop */ ftcprint (features1, 28, "ht"); /* hyper threading */ ftcprint (features1, 29, "tm"); /* acc automatic clock control */ @@ -1041,27 +1043,171 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features1, 25, "fxsr_opt"); /* fxsave/fxrstor optims */ ftcprint (features1, 26, "pdpe1gb"); /* GB large pages */ ftcprint (features1, 27, "rdtscp"); /* rdtscp */ - ftcprint (features1, 29, "lm"); /* long mode (x86 64) */ + ftcprint (features1, 29, "lm"); /* long mode (x86-64 amd64) */ ftcprint (features1, 30, "3dnowext"); /* 3DNow extensions */ ftcprint (features1, 31, "3dnow"); /* 3DNow */ } + + /* cpuid 0x80000007 edx */ + if (maxe >= 0x80000007) + { + cpuid (&unused, &unused, &unused, &features1, 0x80000007); + + ftcprint (features1, 8, "constant_tsc"); /* TSC ticks at a constant rate */ + } + +/* ftcprint (features2, 9, "up"); *//* SMP kernel running on UP N/A */ + + /* cpuid 0x00000007 ebx */ + if (maxf >= 0x00000007) + cpuid (&unused, &features1, &unused, &unused, 0x00000007, 0); + else + features1 = 0; + /* cpuid 0x80000007 edx */ + if (maxe >= 0x80000007) + cpuid (&unused, &unused, &unused, &features2, 0x80000007); + else + features2 = 0; + uint32_t cr_den, cr_num, Hz; + /* cpuid 0x00000015 eax ebx ecx clock ratios optional Hz */ + if (is_intel && maxf >= 0x00000015) + cpuid (&cr_den, &cr_num, &Hz, &unused, 0x00000015); + else + cr_den = 0; + /* TSC requires adjustment, nonstop, and clock ratio divider min */ + if ((features1 & (1 << 1)) && /* TSC adjustment MSR 0x3B */ + (features2 & (1 << 8)) && /* nonstop C states */ + (cr_den > 1)) /* clock ratio denominator > min */ + ftuprint ("art"); /* Always running timer (ART) */ + + /* Intel cpuid 0x0000000a eax Arch Perf Mon */ + if (is_intel && maxf >= 0x0000000a) + { + cpuid (&features2, &unused, &unused, &unused, 0x0000000a); + + /* rev > 0 and # counters/cpu > 1 */ + if ((features2 & 0xff) > 0 && (((features2 >> 8) & 0xff) > 1)) + ftuprint ("arch_perfmon"); /* Intel Arch Perf Mon */ + } + +/* ftcprint (features2, 12, "pebs");*//* MSR_IA32_MISC_ENABLE 12 Precise-Event Based Sampling */ +/* ftcprint (features2, 13, "bts"); *//* MSR_IA32_MISC_ENABLE 11 Branch Trace Store */ + + /* AMD cpuid 0x00000001 eax */ + if (is_amd && maxf >= 0x00000001) + cpuid(&features2, &unused, &unused, &unused, 0x00000001); + else + features2 = 0; + +/* Intel family 6 or AMD family >= x10 or ... */ +/* ... or AMD cpuid 0x00000001 eax in [0x0f58,) or [0x0f48,0x0f50) */ + if ((is_intel && family == 6) || + (is_amd && (family >= 0x10 || + (features2 >= 0x0f58 || + (features2 >= 0x0f48 && features2 < 0x0f50))))) + ftuprint ("rep_good"); /* REP microcode works well */ + + /* cpuid 0x80000007 edx Advanced power management */ + if (maxe >= 0x80000007) + { + cpuid (&unused, &unused, &unused, &features2, 0x80000007); + + ftcprint (features2, 12, "acc_power"); /* accum power */ + } + +#if __x86_64__ + ftuprint ("nopl"); /* NOPL (0F 1F) instructions */ +#endif + +/* cpuid 0x0000000b ecx[8:15] type */ +#define BAD_TYPE 0 +#define SMT_TYPE 1 +#define CORE_TYPE 2 + /* cpuid 0x0000000b ebx ecx */ + if (maxf >= 0x0000000b) + { + cpuid(&unused, &features1, &features2, &unused, 0x0000000b); + + /* check if SMT implemented */ + if (features1 != 0 && (((features2 >> 8) & 0xff) == SMT_TYPE)) + ftuprint ("xtopology"); /* CPU topology enum extensions */ + } + /* AMD cpuid 0x80000007 edx */ if (is_amd && maxe >= 0x80000007) { cpuid (&unused, &unused, &unused, &features1, 0x80000007); - ftcprint (features1, 8, "constant_tsc"); /* TSC constant rate */ + ftcprint (features1, 8, "tsc_reliable"); /* TSC constant rate */ ftcprint (features1, 8, "nonstop_tsc"); /* nonstop C states */ } - /* cpuid 0x00000006 ecx */ - if (maxf >= 0x06) + + if (is_amd || is_intel) + ftuprint ("cpuid"); /* CPU has CPUID instruction */ + + if (is_amd && family > 0x16) + ftuprint ("extd_apicid"); /* Extended APICID (8 bits) */ + + /* AMD cpuid 0x8000001e ecx */ + if (is_amd && maxe >= 0x8000001e) { - cpuid (&unused, &unused, &features1, &unused, 0x06); + cpuid (&unused, &unused, &features1, &unused, 0x8000001e); + + if (((features1 >> 8) & 7) + 1 > 1) /* nodes/socket */ + ftuprint ("amd_dcm"); /* AMD multi-node processor */ + } + + /* cpuid 0x00000006 ecx */ + if (maxf >= 0x00000006) + { + cpuid (&unused, &unused, &features1, &unused, 0x00000006); ftcprint (features1, 0, "aperfmperf"); /* P state hw coord fb */ } + /* Penwell, Cloverview, ... TSC doesn't sleep on S3 */ + if (is_intel && family == 6) + switch (model) + { + case 0x27: /* Atom Saltwell Mid Penwell */ + case 0x35: /* Atom Saltwell Tablet Cloverview */ + case 0x4a: /* Atom Silvermont Mid Merriefield */ + case 0x75: /* Atom Airmont NP Lightning Mountain */ + ftuprint ("nonstop_tsc_s3"); /* TSC doesn't stop in S3 state */ + break; + } + + /* cpuid 0x00000015 eax ebx ecx clock ratios optional Hz */ + if (is_intel && maxf >= 0x00000015) + { + uint32_t cr_den, cr_num, Hz, kHz; + cpuid (&cr_den, &cr_num, &Hz, &unused, 0x00000015); + if (cr_num != 0 && cr_den != 0) + { + kHz = Hz / 1000; + /* Denverton don't report hz nor support cpuid 0x16 so set 25MHz */ + if (kHz == 0 && model == 0x5F) /* Atom Goldmont D Denverton */ + kHz = 25000; + + /* cpuid TSC frequency is known */ + if (kHz != 0) + ftuprint ("tsc_known_freq"); /* TSC has known frequency */ +#if 0 /* keep for future and doc */ + else /* kHz == 0 */ + /* Skylake and Kabylake don't report clock so use CPU speed and ratio */ + if (maxf >= 0x00000016) + { + uint32_t mHz; + cpuid(&mHz, &unused, &unused, &unused, 0x00000016); + kHz = mHz * 1000 * cr_num / cr_den; + } +#endif + } + } + /* cpuid 0x00000001 ecx */ + cpuid (&unused, &unused, &features2, &unused, 0x00000001); + ftcprint (features2, 0, "pni"); /* xmm3 sse3 */ ftcprint (features2, 1, "pclmuldq"); /* pclmulqdq instruction */ ftcprint (features2, 2, "dtes64"); /* 64-bit debug store */ @@ -1088,7 +1234,7 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features2, 24, "tsc_deadline_timer"); /* TSC deadline timer */ ftcprint (features2, 25, "aes"); /* AES instructions */ ftcprint (features2, 26, "xsave"); /* xsave/xrstor/xsetbv/xgetbv */ -/* ftcprint (features2, 27, "osxsave"); */ /* not output on Linux */ +/* ftcprint (features2, 27, "osxsave");*//* "" XSAVE supported in OS */ ftcprint (features2, 28, "avx"); /* advanced vector extensions */ ftcprint (features2, 29, "f16c"); /* 16 bit FP conversions */ ftcprint (features2, 30, "rdrand"); /* RNG rdrand instruction */ @@ -1133,34 +1279,49 @@ format_proc_cpuinfo (void *, char *&destbuf) } } - /* features scattered in various CPUID levels. */ + /* ring 3 monitor/mwait */ + if (is_intel && family == 6) + switch (model) + { + case 0x57: /* Xeon Phi Knights Landing */ + case 0x85: /* Xeon Phi Knights Mill */ + ftuprint ("ring3mwait"); /* Ring 3 MONITOR/MWAIT instructions */ + break; + } + +/* ftcprint (features1, 1, "cpuid_fault");*//* MSR_PLATFORM_INFO Intel CPUID faulting */ + +/* features scattered in various CPUID levels. */ /* cpuid 0x80000007 edx */ - if (maxf >= 0x07) + if (maxf >= 0x00000007) { cpuid (&unused, &unused, &unused, &features1, 0x80000007); ftcprint (features1, 9, "cpb"); /* core performance boost */ } /* cpuid 0x00000006 ecx */ - if (maxf >= 0x06) + if (maxf >= 0x00000006) { - cpuid (&unused, &unused, &features1, &unused, 0x06); + cpuid (&unused, &unused, &features1, &unused, 0x00000006); ftcprint (features1, 3, "epb"); /* energy perf bias */ } /* cpuid 0x00000010 ebx */ - if (maxf >= 0x10) + if (maxf >= 0x00000010) { - cpuid (&unused, &features1, &unused, &unused, 0x10); + cpuid (&unused, &features1, &unused, &unused, 0x00000010); ftcprint (features1, 1, "cat_l3"); /* cache alloc tech l3 */ ftcprint (features1, 2, "cat_l2"); /* cache alloc tech l2 */ /* cpuid 0x00000010:1 ecx */ - cpuid (&unused, &unused, &features1, &unused, 0x10, 1); + cpuid (&unused, &unused, &features1, &unused, 0x00000010, 1); ftcprint (features1, 2, "cdp_l3"); /* code data prior l3 */ } + +/* ftcprint (features1, 7, "invpcid_single");*//* INVPCID && CR4.PCIDE=1 */ + /* cpuid 0x80000007 edx */ if (maxe >= 0x80000007) { @@ -1176,51 +1337,87 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features1, 0, "sme"); /* secure memory encryption */ } + +/* ftcprint (features1, 11, "pti");*//* Page Table Isolation reqd with Meltdown */ + +/* ftcprint (features1, 14, "intel_ppin");*//* MSR_PPIN_CTL Prot Proc Id No */ + /* cpuid 0x00000010:2 ecx */ - if (maxf >= 0x10) + if (maxf >= 0x00000010) { - cpuid (&unused, &unused, &features1, &unused, 0x10, 2); + cpuid (&unused, &unused, &features2, &unused, 0x00000010, 2); - ftcprint (features1, 2, "cdp_l2"); /* code data prior l2 */ + ftcprint (features2, 2, "cdp_l2"); /* code data prior l2 */ + } + /* cpuid 0x80000008 ebx */ + if (maxe >= 0x80000008) + { + cpuid (&unused, &features1, &unused, &unused, 0x80000008, 0); - /* cpuid 0x00000010 ebx */ - cpuid (&unused, &features1, &unused, &unused, 0x10); + ftcprint (features1, 24, "ssbd"); /* spec store byp dis */ + } + /* cpuid 0x00000010 ebx */ + if (maxf >= 0x00000010) + { + cpuid (&unused, &features2, &unused, &unused, 0x00000010); - ftcprint (features1, 3, "mba"); /* memory bandwidth alloc */ + ftcprint (features2, 3, "mba"); /* memory bandwidth alloc */ } /* cpuid 0x80000008 ebx */ if (maxe >= 0x80000008) { - cpuid (&unused, &features1, &unused, &unused, 0x80000008); - +/* cpuid (&unused, &features1, &unused, &unused, 0x80000008, 0); */ +/* from above */ ftcprint (features1, 6, "mba"); /* memory bandwidth alloc */ } /* cpuid 0x8000001f eax */ if (maxe >= 0x8000001f) { - cpuid (&features1, &unused, &unused, &unused, 0x8000001f); + cpuid (&features2, &unused, &unused, &unused, 0x8000001f); - ftcprint (features1, 1, "sev"); /* secure encrypted virt */ + ftcprint (features2, 1, "sev"); /* secure encrypted virt */ } + /* cpuid 0x80000008 ebx */ + if (maxe >= 0x80000008) + { +/* cpuid (&unused, &features1, &unused, &unused, 0x80000008, 0); */ +/* from above */ +/* ftcprint (features1, 0, "clzero"); *//* clzero instruction */ +/* ftcprint (features1, 1, "irperf"); *//* instr retired count */ +/* ftcprint (features1, 2, "xsaveerptr");*//* save/rest FP err ptrs */ +/* ftcprint (features1, 4, "rdpru"); *//* user level rd proc reg */ +/* ftcprint (features1, 6, "mba"); *//* memory BW alloc */ +/* ftcprint (features1, 9, "wbnoinvd"); *//* wbnoinvd instruction */ + ftcprint (features1, 14, "ibrs"); /* ind br restricted spec */ + ftcprint (features1, 12, "ibpb"); /* ind br pred barrier */ + ftcprint (features1, 15, "stibp"); /* 1 thread ind br pred */ + ftcprint (features1, 16, "ibrs_enhanced"); /* IBRS_ALL enhanced IBRS always on */ +/* ftcprint (features1, 17, "stibp_always_on"); */ /* stibp always on */ +/* ftcprint (features1, 18, "ibrs_pref");*//* IBRS_PREF IBRS preferred */ +/* ftcprint (features1, 23, "amd_ppin"); *//* protected proc id no */ +/* ftcprint (features1, 24, "ssbd"); *//* spec store byp dis */ +/* ftcprint (features1, 25, "virt_ssbd");*//* vir spec store byp dis */ +/* ftcprint (features1, 26, "ssb_no"); *//* ssb fixed in hardware */ + } /* cpuid 0x00000007 ebx */ - if (maxf >= 0x07) + if (maxf >= 0x00000007) { - cpuid (&unused, &features1, &unused, &unused, 0x07, 0); + cpuid (&unused, &features1, &unused, &unused, 0x00000007, 0); ftcprint (features1, 0, "fsgsbase"); /* rd/wr fs/gs base */ ftcprint (features1, 1, "tsc_adjust"); /* TSC adjustment MSR 0x3B */ ftcprint (features1, 3, "bmi1"); /* bit manip ext group 1 */ ftcprint (features1, 4, "hle"); /* hardware lock elision */ ftcprint (features1, 5, "avx2"); /* AVX ext instructions */ -/* ftcprint (features1, 6, "fpdx"); */ /* FP data ptr upd on exc */ +/* ftcprint (features1, 6, "fpdx"); */ /* "" FP data ptr upd on exc */ ftcprint (features1, 7, "smep"); /* super mode exec prot */ ftcprint (features1, 8, "bmi2"); /* bit manip ext group 2 */ ftcprint (features1, 9, "erms"); /* enh rep movsb/stosb */ ftcprint (features1, 10, "invpcid"); /* inv proc context id */ ftcprint (features1, 11, "rtm"); /* restricted txnal mem */ ftcprint (features1, 12, "cqm"); /* cache QoS monitoring */ -/* ftcprint (features1, 13, "fpcsdsz"); */ /* zero FP cs/ds */ +/* ftcprint (features1, 13, "fpcsdsz"); */ /* "" zero FP cs/ds */ ftcprint (features1, 14, "mpx"); /* mem prot ext */ ftcprint (features1, 15, "rdt_a"); /* rsrc dir tech alloc */ ftcprint (features1, 16, "avx512f"); /* vec foundation */ @@ -1242,9 +1439,9 @@ format_proc_cpuinfo (void *, char *&destbuf) /* more random feature flags */ /* cpuid 0x0000000d:1 eax */ - if (maxf >= 0x0d) + if (maxf >= 0x0000000d) { - cpuid (&features1, &unused, &unused, &unused, 0x0d, 1); + cpuid (&features1, &unused, &unused, &unused, 0x0000000d, 1); ftcprint (features1, 0, "xsaveopt"); /* xsaveopt instruction */ ftcprint (features1, 1, "xsavec"); /* xsavec instruction */ @@ -1252,23 +1449,26 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features1, 3, "xsaves"); /* xsaves/xrstors */ } /* cpuid 0x0000000f edx */ - if (maxf >= 0x0f) + if (maxf >= 0x0000000f) { - cpuid (&unused, &unused, &unused, &features1, 0x0f); + cpuid (&unused, &unused, &unused, &features1, 0x0000000f); ftcprint (features1, 1, "cqm_llc"); /* llc QoS */ /* cpuid 0x0000000f:1 edx */ - cpuid (&unused, &unused, &unused, &features1, 0x0f, 1); + cpuid (&unused, &unused, &unused, &features1, 0x0000000f, 1); ftcprint (features1, 0, "cqm_occup_llc"); /* llc occup monitor */ ftcprint (features1, 1, "cqm_mbm_total"); /* llc total MBM mon */ ftcprint (features1, 2, "cqm_mbm_local"); /* llc local MBM mon */ } + +/* ftcprint (features1, 6, "split_lock_detect");*//* MSR_TEST_CTRL split lock */ + /* cpuid 0x00000007:1 eax */ - if (maxf >= 0x07) + if (maxf >= 0x00000007) { - cpuid (&features1, &unused, &unused, &unused, 0x07, 1); + cpuid (&features1, &unused, &unused, &unused, 0x00000007, 1); ftcprint (features1, 5, "avx512_bf16"); /* vec bfloat16 short */ } @@ -1287,7 +1487,9 @@ format_proc_cpuinfo (void *, char *&destbuf) /* ftcprint (features1, 12, "ibpb" ); */ /* ind br pred barrier */ /* ftcprint (features1, 14, "ibrs" ); */ /* ind br restricted spec */ /* ftcprint (features1, 15, "stibp"); */ /* 1 thread ind br pred */ +/* ftcprint (features1, 16, "ibrs_enhanced");*//* IBRS_ALL enhanced IBRS always on */ /* ftcprint (features1, 17, "stibp_always_on"); */ /* stibp always on */ +/* ftcprint (features1, 18, "ibrs_pref");*//* IBRS_PREF IBRS preferred */ ftcprint (features1, 23, "amd_ppin"); /* protected proc id no */ /* ftcprint (features1, 24, "ssbd"); */ /* spec store byp dis */ ftcprint (features1, 25, "virt_ssbd"); /* vir spec store byp dis */ @@ -1295,9 +1497,9 @@ format_proc_cpuinfo (void *, char *&destbuf) } /* thermal & power cpuid 0x00000006 eax */ - if (maxf >= 0x06) + if (maxf >= 0x00000006) { - cpuid (&features1, &unused, &features2, &unused, 0x06); + cpuid (&features1, &unused, &features2, &unused, 0x00000006); ftcprint (features1, 0, "dtherm"); /* digital thermal sensor */ ftcprint (features1, 1, "ida"); /* Intel dynamic acceleration */ @@ -1332,9 +1534,9 @@ format_proc_cpuinfo (void *, char *&destbuf) } /* Intel cpuid 0x00000007 ecx */ - if (is_intel && maxf >= 0x07) + if (is_intel && maxf >= 0x00000007) { - cpuid (&unused, &unused, &features1, &unused, 0x07, 0); + cpuid (&unused, &unused, &features1, &unused, 0x00000007, 0); ftcprint (features1, 1, "avx512vbmi"); /* vec bit manip */ ftcprint (features1, 2, "umip"); /* user mode ins prot */ @@ -1367,9 +1569,9 @@ format_proc_cpuinfo (void *, char *&destbuf) } /* Intel cpuid 0x00000007 edx */ - if (is_intel && maxf >= 0x07) + if (is_intel && maxf >= 0x00000007) { - cpuid (&unused, &unused, &unused, &features1, 0x07, 0); + cpuid (&unused, &unused, &unused, &features1, 0x00000007, 0); ftcprint (features1, 2, "avx512_4vnniw"); /* vec dot prod dw */ ftcprint (features1, 3, "avx512_4fmaps"); /* vec 4 FMA single */ @@ -1377,6 +1579,7 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features1, 8, "avx512_vp2intersect"); /* vec intcpt d/q */ ftcprint (features1, 10, "md_clear"); /* verw clear buf */ ftcprint (features1, 18, "pconfig"); /* platform config */ + ftcprint (features1, 19, "arch_lbr"); /* last branch records */ ftcprint (features1, 28, "flush_l1d"); /* flush l1d cache */ ftcprint (features1, 29, "arch_capabilities"); /* arch cap MSR */ } @@ -1386,6 +1589,16 @@ format_proc_cpuinfo (void *, char *&destbuf) bufptr += __small_sprintf (bufptr, "bogomips\t: %d.00\n", bogomips); + /* cpuid 0x80000006 ebx TLB size */ + if (maxe >= 0x80000006) + { + cpuid( &unused, &features1, &unused, &unused, 0x80000006, 0); + uint32_t tlbsize = ((features1 >> 16) & 0xfff) + (features1 & 0xfff); + if (tlbsize > 0) + bufptr += __small_sprintf (bufptr, "TLB size\t: %d 4K pages\n", + tlbsize); + } + bufptr += __small_sprintf (bufptr, "clflush size\t: %d\n" "cache_alignment\t: %d\n", clflush, From 123b8065237a3fb644528d3e95216ade336334bd Mon Sep 17 00:00:00 2001 From: PkmX via Newlib Date: Fri, 24 Jul 2020 19:07:45 +0800 Subject: [PATCH 447/520] riscv: fix integer wraparound in memcpy This patch fixes a bug in RISC-V's memcpy implementation where an integer wraparound occurs when src + size < 8 * sizeof(long), causing the word-sized copy loop to be incorrectly entered. Signed-off-by: Chih-Mao Chen --- newlib/libc/machine/riscv/memcpy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newlib/libc/machine/riscv/memcpy.c b/newlib/libc/machine/riscv/memcpy.c index 07e8e0076..4098f3ab1 100644 --- a/newlib/libc/machine/riscv/memcpy.c +++ b/newlib/libc/machine/riscv/memcpy.c @@ -51,9 +51,9 @@ small: const long *lb = (const long *)b; long *lend = (long *)((uintptr_t)end & ~msk); - if (unlikely (la < (lend - 8))) + if (unlikely (lend - la > 8)) { - while (la < (lend - 8)) + while (lend - la > 8) { long b0 = *lb++; long b1 = *lb++; From 7b1416c3abe890c8058001d6bb795802f80270af Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Tue, 28 Jul 2020 13:25:00 +0100 Subject: [PATCH 448/520] Cygwin: Decorate NtQueryVirtualMemory() to fix 32-bit build Decorate NtQueryVirtualMemory() with NTAPI (for stdcall) to fix 32-bit build. Reported-by: Takashi Yano --- winsup/utils/dumper.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc index 3af138b9e..36dbf9dbb 100644 --- a/winsup/utils/dumper.cc +++ b/winsup/utils/dumper.cc @@ -272,7 +272,7 @@ typedef enum _MEMORY_INFORMATION_CLASS } MEMORY_INFORMATION_CLASS; extern "C" -NTSTATUS +NTSTATUS NTAPI NtQueryVirtualMemory(HANDLE ProcessHandle, LPVOID BaseAddress, MEMORY_INFORMATION_CLASS MemoryInformationClass, From b7a6e02dc6a5289bfa489c0e7b6539abd281e2c6 Mon Sep 17 00:00:00 2001 From: Eshan dhawan Date: Sun, 19 Jul 2020 01:22:53 +0530 Subject: [PATCH 449/520] arm: Fix fenv support The previous fenv support for ARM used the soft-float implementation of FreeBSD. Newlib uses the one from libgcc by default. They are not compatible. Having an GCC incompatible soft-float fenv support in Newlib makes no sense. A long-term solution could be to provide a libgcc compatible soft-float support. This likely requires changes in the GCC configuration. For now, provide a stub implementation for soft-float multilibs similar to RISC-V. Move implementation to one file and delete now unused files. Hide implementation details. Remove function parameter names from header file to avoid name conflicts. Provide VFP support if __SOFTFP__ is not defined like glibc. Reviewed-by: Sebastian Huber Signed-off-by: Eshan dhawan --- newlib/libc/machine/arm/machine/fenv-mangle.h | 53 --- .../libc/machine/arm/machine/fenv-softfloat.h | 187 ---------- newlib/libc/machine/arm/machine/fenv-vfp.h | 187 ---------- newlib/libc/machine/arm/sys/fenv.h | 66 +--- newlib/libm/machine/arm/Makefile.am | 4 +- newlib/libm/machine/arm/Makefile.in | 19 +- newlib/libm/machine/arm/fenv-softfp.c | 32 -- newlib/libm/machine/arm/fenv-vfp.c | 32 -- newlib/libm/machine/arm/fenv.c | 319 ++++++------------ 9 files changed, 127 insertions(+), 772 deletions(-) delete mode 100644 newlib/libc/machine/arm/machine/fenv-mangle.h delete mode 100644 newlib/libc/machine/arm/machine/fenv-softfloat.h delete mode 100644 newlib/libc/machine/arm/machine/fenv-vfp.h delete mode 100644 newlib/libm/machine/arm/fenv-softfp.c delete mode 100644 newlib/libm/machine/arm/fenv-vfp.c diff --git a/newlib/libc/machine/arm/machine/fenv-mangle.h b/newlib/libc/machine/arm/machine/fenv-mangle.h deleted file mode 100644 index 476f7b20c..000000000 --- a/newlib/libc/machine/arm/machine/fenv-mangle.h +++ /dev/null @@ -1,53 +0,0 @@ -/*- - * Copyright (c) 2013 Andrew Turner - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#ifdef _FENV_MANGLE_H_ -#error Only include fenv-mangle.h once -#endif - -#define _FENV_MANGLE_H_ - -#ifndef FENV_MANGLE -#error FENV_MANGLE is undefined -#endif - -#define feclearexcept FENV_MANGLE(feclearexcept) -#define fegetexceptflag FENV_MANGLE(fegetexceptflag) -#define fesetexceptflag FENV_MANGLE(fesetexceptflag) -#define feraiseexcept FENV_MANGLE(feraiseexcept) -#define fetestexcept FENV_MANGLE(fetestexcept) -#define fegetround FENV_MANGLE(fegetround) -#define fesetround FENV_MANGLE(fesetround) -#define fegetenv FENV_MANGLE(fegetenv) -#define feholdexcept FENV_MANGLE(feholdexcept) -#define fesetenv FENV_MANGLE(fesetenv) -#define feupdateenv FENV_MANGLE(feupdateenv) -#define feenableexcept FENV_MANGLE(feenableexcept) -#define fedisableexcept FENV_MANGLE(fedisableexcept) -#define fegetexcept FENV_MANGLE(fegetexcept) - diff --git a/newlib/libc/machine/arm/machine/fenv-softfloat.h b/newlib/libc/machine/arm/machine/fenv-softfloat.h deleted file mode 100644 index 5d33e18d0..000000000 --- a/newlib/libc/machine/arm/machine/fenv-softfloat.h +++ /dev/null @@ -1,187 +0,0 @@ - /*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2004-2011 David Schultz - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#ifndef _SYS_FENV_H_ -#error "This file is meant to be included only by ." -#endif -/* the file can be added from architecture specific fenv.h file found in - *libc/sys/arch/sys * - * - * This file implements the functionality of on platforms that - * lack an FPU and use softfloat in libc for floating point. To use it, - * you must write an that provides the following: - * - * - a typedef for fenv_t, which may be an integer or struct type - * - a typedef for fexcept_t (XXX This file assumes fexcept_t is a - * simple integer type containing the exception mask.) - * - definitions of FE_* constants for the five exceptions and four - * rounding modes in IEEE 754, as described in fenv(3) - * - a definition, and the corresponding external symbol, for FE_DFL_ENV - * - a macro __set_env(env, flags, mask, rnd), which sets the given fenv_t - * from the exception flags, mask, and rounding mode - * - macros __env_flags(env), __env_mask(env), and __env_round(env), which - * extract fields from an fenv_t - * - a definition of __fenv_static - * - * If the architecture supports an optional FPU, it's recommended that you - * define fenv_t and fexcept_t to match the hardware ABI. Otherwise, it - * doesn't matter how you define them. - */ -#include - -int __softfloat_float_exception_flags; -int __softfloat_float_exception_mask; -int __softfloat_float_rounding_mode; - - -__fenv_static inline int -feclearexcept(int excepts) -{ - - __softfloat_float_exception_flags &= ~excepts; - return (0); -} - -__fenv_static inline int -fegetexceptflag(fexcept_t *flagp, int excepts) -{ - - *flagp = __softfloat_float_exception_flags & excepts; - return (0); -} - -__fenv_static inline int -fesetexceptflag(const fexcept_t *flagp, int excepts) -{ - - __softfloat_float_exception_flags &= ~excepts; - __softfloat_float_exception_flags |= *flagp & excepts; - return (0); -} - -__fenv_static inline int -feraiseexcept(int excepts) -{ - - return (excepts ? -ENOTSUP : 0); -} - -__fenv_static inline int -fetestexcept(int excepts) -{ - - return (__softfloat_float_exception_flags & excepts); -} - -__fenv_static inline int -fegetround(void) -{ - - return (__softfloat_float_rounding_mode); -} - -__fenv_static inline int -fesetround(int round) -{ - - __softfloat_float_rounding_mode = round; - return (0); -} - -__fenv_static inline int -fegetenv(fenv_t *envp) -{ - - __set_env(*envp, __softfloat_float_exception_flags, - __softfloat_float_exception_mask, __softfloat_float_rounding_mode); - return (0); -} - -__fenv_static inline int -feholdexcept(fenv_t *envp) -{ - fenv_t __env; - - fegetenv(envp); - __softfloat_float_exception_flags = 0; - __softfloat_float_exception_mask = 0; - return (0); -} - -__fenv_static inline int -fesetenv(const fenv_t *envp) -{ - - __softfloat_float_exception_flags = __env_flags(*envp); - __softfloat_float_exception_mask = __env_mask(*envp); - __softfloat_float_rounding_mode = __env_round(*envp); - return (0); -} - -__fenv_static inline int -feupdateenv(const fenv_t *envp) -{ - int __oflags = __softfloat_float_exception_flags; - - fesetenv(envp); - feraiseexcept(__oflags); - return (0); -} - -#if __BSD_VISIBLE - -/* We currently provide no external definitions of the functions below. */ - -__fenv_static inline int -feenableexcept(int __mask) -{ - int __omask = __softfloat_float_exception_mask; - - __softfloat_float_exception_mask |= __mask; - return (__omask); -} - -__fenv_static inline int -fedisableexcept(int __mask) -{ - int __omask = __softfloat_float_exception_mask; - - __softfloat_float_exception_mask &= ~__mask; - return (__omask); -} - -__fenv_static inline int -fegetexcept(void) -{ - - return (__softfloat_float_exception_mask); -} - -#endif /* __BSD_VISIBLE */ diff --git a/newlib/libc/machine/arm/machine/fenv-vfp.h b/newlib/libc/machine/arm/machine/fenv-vfp.h deleted file mode 100644 index 25d71f3ab..000000000 --- a/newlib/libc/machine/arm/machine/fenv-vfp.h +++ /dev/null @@ -1,187 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2004-2005 David Schultz - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - - - -#define vmrs_fpscr(__r) __asm __volatile("vmrs %0, fpscr" : "=&r"(__r)) -#define vmsr_fpscr(__r) __asm __volatile("vmsr fpscr, %0" : : "r"(__r)) - - -#define _FPU_MASK_SHIFT 8 - -__fenv_static inline int feclearexcept(int excepts) -{ - fexcept_t __fpsr; - - vmrs_fpscr(__fpsr); - __fpsr &= ~excepts; - vmsr_fpscr(__fpsr); - return (0); -} - -__fenv_static inline int -fegetexceptflag(fexcept_t *flagp, int excepts) -{ - fexcept_t __fpsr; - - vmrs_fpscr(__fpsr); - *flagp = __fpsr & excepts; - return (0); -} - -__fenv_static inline int -fesetexceptflag(const fexcept_t *flagp, int excepts) -{ - fexcept_t __fpsr; - - vmrs_fpscr(__fpsr); - __fpsr &= ~excepts; - __fpsr |= *flagp & excepts; - vmsr_fpscr(__fpsr); - return (0); -} - -__fenv_static inline int -feraiseexcept(int excepts) -{ - fexcept_t __ex = excepts; - - fesetexceptflag(&__ex, excepts); /* XXX */ - return (0); -} - -__fenv_static inline int -fetestexcept(int excepts) -{ - fexcept_t __fpsr; - - vmrs_fpscr(__fpsr); - return (__fpsr & excepts); -} - -__fenv_static inline int -fegetround(void) -{ - fenv_t __fpsr; - - vmrs_fpscr(__fpsr); - return (__fpsr & _ROUND_MASK); -} - -__fenv_static inline int -fesetround(int round) -{ - fenv_t __fpsr; - - vmrs_fpscr(__fpsr); - __fpsr &= ~(_ROUND_MASK); - __fpsr |= round; - vmsr_fpscr(__fpsr); - return (0); -} - -__fenv_static inline int -fegetenv(fenv_t *envp) -{ - - vmrs_fpscr(*envp); - return (0); -} - -__fenv_static inline int -feholdexcept(fenv_t *envp) -{ - fenv_t __env; - - vmrs_fpscr(__env); - *envp = __env; - __env &= ~(FE_ALL_EXCEPT); - vmsr_fpscr(__env); - return (0); -} - -__fenv_static inline int -fesetenv(const fenv_t *envp) -{ - - vmsr_fpscr(*envp); - return (0); -} - -__fenv_static inline int -feupdateenv(const fenv_t *envp) -{ - fexcept_t __fpsr; - - vmrs_fpscr(__fpsr); - vmsr_fpscr(*envp); - feraiseexcept(__fpsr & FE_ALL_EXCEPT); - return (0); -} - -#if __BSD_VISIBLE - -/* We currently provide no external definitions of the functions below. */ - -__fenv_static inline int -feenableexcept(int __mask) -{ - fenv_t __old_fpsr, __new_fpsr; - - vmrs_fpscr(__old_fpsr); - __new_fpsr = __old_fpsr | - ((__mask & FE_ALL_EXCEPT) << _FPU_MASK_SHIFT); - vmsr_fpscr(__new_fpsr); - return ((__old_fpsr >> _FPU_MASK_SHIFT) & FE_ALL_EXCEPT); -} - -__fenv_static inline int -fedisableexcept(int __mask) -{ - fenv_t __old_fpsr, __new_fpsr; - - vmrs_fpscr(__old_fpsr); - __new_fpsr = __old_fpsr & - ~((__mask & FE_ALL_EXCEPT) << _FPU_MASK_SHIFT); - vmsr_fpscr(__new_fpsr); - return ((__old_fpsr >> _FPU_MASK_SHIFT) & FE_ALL_EXCEPT); -} - -__fenv_static inline int -fegetexcept(void) -{ - fenv_t __fpsr; - - vmrs_fpscr(__fpsr); - return (__fpsr & FE_ALL_EXCEPT); -} - -#endif /* __BSD_VISIBLE */ - diff --git a/newlib/libc/machine/arm/sys/fenv.h b/newlib/libc/machine/arm/sys/fenv.h index 740995a1a..70bd57be4 100644 --- a/newlib/libc/machine/arm/sys/fenv.h +++ b/newlib/libc/machine/arm/sys/fenv.h @@ -38,10 +38,6 @@ extern "C" { #endif -#ifndef __fenv_static -#define __fenv_static static -#endif - typedef int fenv_t; typedef int fexcept_t; @@ -51,7 +47,7 @@ typedef int fexcept_t; #define FE_OVERFLOW 0x0004 #define FE_UNDERFLOW 0x0008 #define FE_INEXACT 0x0010 -#ifdef __ARM_PCS_VFP +#ifndef __SOFTFP__ #define FE_DENORMAL 0x0080 #define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | \ FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_DENORMAL) @@ -60,61 +56,33 @@ typedef int fexcept_t; FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW) #endif - - /* Rounding modes */ -#define VFP_FE_TONEAREST 0x00000000 -#define VFP_FE_UPWARD 0x00400000 -#define VFP_FE_DOWNWARD 0x00800000 -#define VFP_FE_TOWARDZERO 0x00c00000 - -#ifdef __ARM_PCS_VFP -#define FE_TONEAREST VFP_FE_TONEAREST -#define FE_UPWARD VFP_FE_UPWARD -#define FE_DOWNWARD VFP_FE_DOWNWARD -#define FE_TOWARDZERO VFP_FE_TOWARDZERO -#else -#define FE_TONEAREST 0x0000 -#define FE_TOWARDZERO 0x0001 -#define FE_UPWARD 0x0002 -#define FE_DOWNWARD 0x0003 -#endif -#define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \ - FE_UPWARD | FE_TOWARDZERO) - +#define FE_TONEAREST 0x00000000 +#define FE_UPWARD 0x00400000 +#define FE_DOWNWARD 0x00800000 +#define FE_TOWARDZERO 0x00c00000 /* Default floating-point environment */ - extern const fenv_t *_fe_dfl_env; #define FE_DFL_ENV (_fe_dfl_env) -/* We need to be able to map status flag positions to mask flag positions */ -#ifndef __ARM_PCS_VFP -#define _FPUSW_SHIFT 16 -#define _ENABLE_MASK (FE_ALL_EXCEPT << _FPUSW_SHIFT) -#endif - - - -int feclearexcept(int excepts); -int fegetexceptflag(fexcept_t *flagp, int excepts); -int fesetexceptflag(const fexcept_t *flagp, int excepts); -int feraiseexcept(int excepts); -int fetestexcept(int excepts); +int feclearexcept(int); +int fegetexceptflag(fexcept_t *, int); +int fesetexceptflag(const fexcept_t *, int); +int feraiseexcept(int); +int fetestexcept(int); int fegetround(void); -int fesetround(int round); -int fegetenv(fenv_t *envp); -int feholdexcept(fenv_t *envp); -int fesetenv(const fenv_t *envp); -int feupdateenv(const fenv_t *envp); +int fesetround(int); +int fegetenv(fenv_t *); +int feholdexcept(fenv_t *); +int fesetenv(const fenv_t *); +int feupdateenv(const fenv_t *); #if __BSD_VISIBLE -int feenableexcept(int __mask); -int fedisableexcept(int __mask); +int feenableexcept(int); +int fedisableexcept(int); int fegetexcept(void); #endif /* __BSD_VISIBLE */ - - #ifdef __cplusplus } #endif diff --git a/newlib/libm/machine/arm/Makefile.am b/newlib/libm/machine/arm/Makefile.am index a64ee59d5..180a37f44 100644 --- a/newlib/libm/machine/arm/Makefile.am +++ b/newlib/libm/machine/arm/Makefile.am @@ -32,9 +32,7 @@ LIB_SOURCES = \ fesetexceptflag.c \ fesetround.c \ fetestexcept.c \ - feupdateenv.c \ - fenv-vfp.c \ - fenv-softfp.c + feupdateenv.c noinst_LIBRARIES = lib.a diff --git a/newlib/libm/machine/arm/Makefile.in b/newlib/libm/machine/arm/Makefile.in index ecfa684e7..aa23dd4d5 100644 --- a/newlib/libm/machine/arm/Makefile.in +++ b/newlib/libm/machine/arm/Makefile.in @@ -83,8 +83,7 @@ am__objects_1 = lib_a-e_sqrt.$(OBJEXT) lib_a-ef_sqrt.$(OBJEXT) \ lib_a-fenv.$(OBJEXT) lib_a-feraiseexcept.$(OBJEXT) \ lib_a-fesetenv.$(OBJEXT) lib_a-fesetexceptflag.$(OBJEXT) \ lib_a-fesetround.$(OBJEXT) lib_a-fetestexcept.$(OBJEXT) \ - lib_a-feupdateenv.$(OBJEXT) lib_a-fenv-vfp.$(OBJEXT) \ - lib_a-fenv-softfp.$(OBJEXT) + lib_a-feupdateenv.$(OBJEXT) am_lib_a_OBJECTS = $(am__objects_1) lib_a_OBJECTS = $(am_lib_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ @@ -237,9 +236,7 @@ LIB_SOURCES = \ fesetexceptflag.c \ fesetround.c \ fetestexcept.c \ - feupdateenv.c \ - fenv-vfp.c \ - fenv-softfp.c + feupdateenv.c noinst_LIBRARIES = lib.a lib_a_SOURCES = $(LIB_SOURCES) @@ -479,18 +476,6 @@ lib_a-feupdateenv.o: feupdateenv.c lib_a-feupdateenv.obj: feupdateenv.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.obj `if test -f 'feupdateenv.c'; then $(CYGPATH_W) 'feupdateenv.c'; else $(CYGPATH_W) '$(srcdir)/feupdateenv.c'; fi` -lib_a-fenv-vfp.o: fenv-vfp.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv-vfp.o `test -f 'fenv-vfp.c' || echo '$(srcdir)/'`fenv-vfp.c - -lib_a-fenv-vfp.obj: fenv-vfp.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv-vfp.obj `if test -f 'fenv-vfp.c'; then $(CYGPATH_W) 'fenv-vfp.c'; else $(CYGPATH_W) '$(srcdir)/fenv-vfp.c'; fi` - -lib_a-fenv-softfp.o: fenv-softfp.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv-softfp.o `test -f 'fenv-softfp.c' || echo '$(srcdir)/'`fenv-softfp.c - -lib_a-fenv-softfp.obj: fenv-softfp.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv-softfp.obj `if test -f 'fenv-softfp.c'; then $(CYGPATH_W) 'fenv-softfp.c'; else $(CYGPATH_W) '$(srcdir)/fenv-softfp.c'; fi` - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ diff --git a/newlib/libm/machine/arm/fenv-softfp.c b/newlib/libm/machine/arm/fenv-softfp.c deleted file mode 100644 index a576cc1b2..000000000 --- a/newlib/libm/machine/arm/fenv-softfp.c +++ /dev/null @@ -1,32 +0,0 @@ -/*- - * Copyright (c) 2013 Andrew Turner - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#define FENV_MANGLE(x) __softfp_ ##x -#include -#include "fenv.c" - diff --git a/newlib/libm/machine/arm/fenv-vfp.c b/newlib/libm/machine/arm/fenv-vfp.c deleted file mode 100644 index 297e81296..000000000 --- a/newlib/libm/machine/arm/fenv-vfp.c +++ /dev/null @@ -1,32 +0,0 @@ -/*- - * Copyright (c) 2013 Andrew Turner - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#define FENV_MANGLE(x) __vfp_ ##x -#include -#include "fenv.c" - diff --git a/newlib/libm/machine/arm/fenv.c b/newlib/libm/machine/arm/fenv.c index 5b61ab81f..0735cd1c5 100644 --- a/newlib/libm/machine/arm/fenv.c +++ b/newlib/libm/machine/arm/fenv.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2004 David Schultz + * Copyright (c) 2004-2005 David Schultz * Copyright (c) 2013 Andrew Turner * All rights reserved. * @@ -29,300 +29,195 @@ * $FreeBSD$ */ -#define __fenv_static #include -#include - -#if __ARM_ARCH >= 6 -#define FENV_ARMv6 +#ifndef __SOFTFP__ +#define vmrs_fpscr(__r) __asm __volatile("vmrs %0, fpscr" : "=&r"(__r)) +#define vmsr_fpscr(__r) __asm __volatile("vmsr fpscr, %0" : : "r"(__r)) +#define _FPU_MASK_SHIFT 8 +#define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \ + FE_UPWARD | FE_TOWARDZERO) #endif -/* When SOFTFP_ABI is defined we are using the softfp ABI. */ -#if defined(__VFP_FP__) && !defined(__ARM_PCS_VFP) -#define SOFTFP_ABI -#endif - - -#ifndef FENV_MANGLE -/* - * Hopefully the system ID byte is immutable, so it's valid to use - * this as a default environment. - */ fenv_t __fe_dfl_env = { 0 }; const fenv_t *_fe_dfl_env = &__fe_dfl_env; -#endif - - -/* If this is a non-mangled softfp version special processing is required */ -#if defined(FENV_MANGLE) || !defined(SOFTFP_ABI) || !defined(FENV_ARMv6) - -/* - * The following macros map between the softfloat emulator's flags and - * the hardware's FPSR. The hardware this file was written for doesn't - * have rounding control bits, so we stick those in the system ID byte. - */ -#ifndef __ARM_PCS_VFP -#define __set_env(env, flags, mask, rnd) env = ((flags) \ - | (mask)<<_FPUSW_SHIFT \ - | (rnd) << 24) -#define __env_flags(env) ((env) & FE_ALL_EXCEPT) -#define __env_mask(env) (((env) >> _FPUSW_SHIFT) \ - & FE_ALL_EXCEPT) -#define __env_round(env) (((env) >> 24) & _ROUND_MASK) - -#include - -#else /* __ARM_PCS_VFP PRESENT */ - -#include - -#endif /* __ARM_PCS_VFP */ - -#ifdef __GNUC_GNU_INLINE__ -#error "This file must be compiled with C99 'inline' semantics" -#endif - -extern inline int feclearexcept(int excepts); -extern inline int fegetexceptflag(fexcept_t *flagp, int excepts); -extern inline int fesetexceptflag(const fexcept_t *flagp, int excepts); -extern inline int feraiseexcept(int excepts); -extern inline int fetestexcept(int excepts); -extern inline int fegetround(void); -extern inline int fesetround(int round); -extern inline int fegetenv(fenv_t *envp); -extern inline int feholdexcept(fenv_t *envp); -extern inline int fesetenv(const fenv_t *envp); -extern inline int feupdateenv(const fenv_t *envp); -extern inline int feenableexcept(int __mask); -extern inline int fedisableexcept(int __mask); -extern inline int fegetexcept(void); - -#else /* !FENV_MANGLE && SOFTFP_ABI */ -/* Set by libc when the VFP unit is enabled */ - -int _libc_arm_fpu_present; - -int __softfp_feclearexcept(int excepts); -int __softfp_fegetexceptflag(fexcept_t *flagp, int excepts); -int __softfp_fesetexceptflag(const fexcept_t *flagp, int excepts); -int __softfp_feraiseexcept(int excepts); -int __softfp_fetestexcept(int excepts); -int __softfp_fegetround(void); -int __softfp_fesetround(int round); -int __softfp_fegetenv(fenv_t *envp); -int __softfp_feholdexcept(fenv_t *envp); -int __softfp_fesetenv(const fenv_t *envp); -int __softfp_feupdateenv(const fenv_t *envp); -int __softfp_feenableexcept(int __mask); -int __softfp_fedisableexcept(int __mask); -int __softfp_fegetexcept(void); - -int __vfp_feclearexcept(int excepts); -int __vfp_fegetexceptflag(fexcept_t *flagp, int excepts); -int __vfp_fesetexceptflag(const fexcept_t *flagp, int excepts); -int __vfp_feraiseexcept(int excepts); -int __vfp_fetestexcept(int excepts); -int __vfp_fegetround(void); -int __vfp_fesetround(int round); -int __vfp_fegetenv(fenv_t *envp); -int __vfp_feholdexcept(fenv_t *envp); -int __vfp_fesetenv(const fenv_t *envp); -int __vfp_feupdateenv(const fenv_t *envp); -int __vfp_feenableexcept(int __mask); -int __vfp_fedisableexcept(int __mask); -int __vfp_fegetexcept(void); - -static int -__softfp_round_to_vfp(int round) -{ - - switch (round) { - case FE_TONEAREST: - default: - return VFP_FE_TONEAREST; - case FE_TOWARDZERO: - return VFP_FE_TOWARDZERO; - case FE_UPWARD: - return VFP_FE_UPWARD; - case FE_DOWNWARD: - return VFP_FE_DOWNWARD; - } -} - -static int -__softfp_round_from_vfp(int round) -{ - - switch (round) { - case VFP_FE_TONEAREST: - default: - return FE_TONEAREST; - case VFP_FE_TOWARDZERO: - return FE_TOWARDZERO; - case VFP_FE_UPWARD: - return FE_UPWARD; - case VFP_FE_DOWNWARD: - return FE_DOWNWARD; - } -} int feclearexcept(int excepts) { +#ifndef __SOFTFP__ + fexcept_t __fpsr; - if (_libc_arm_fpu_present) - __vfp_feclearexcept(excepts); - __softfp_feclearexcept(excepts); - + vmrs_fpscr(__fpsr); + __fpsr &= ~excepts; + vmsr_fpscr(__fpsr); +#endif return (0); } int fegetexceptflag(fexcept_t *flagp, int excepts) { - fexcept_t __vfp_flagp; - - __vfp_flagp = 0; - if (_libc_arm_fpu_present) - __vfp_fegetexceptflag(&__vfp_flagp, excepts); - __softfp_fegetexceptflag(flagp, excepts); - - *flagp |= __vfp_flagp; +#ifndef __SOFTFP__ + fexcept_t __fpsr; + vmrs_fpscr(__fpsr); + __fpsr &= ~excepts; + __fpsr |= *flagp & excepts; + vmsr_fpscr(__fpsr); +#endif return (0); } int fesetexceptflag(const fexcept_t *flagp, int excepts) { +#ifndef __SOFTFP__ + fexcept_t __fpsr; - if (_libc_arm_fpu_present) - __vfp_fesetexceptflag(flagp, excepts); - __softfp_fesetexceptflag(flagp, excepts); - + vmrs_fpscr(__fpsr); + __fpsr &= ~excepts; + __fpsr |= *flagp & excepts; + vmsr_fpscr(__fpsr); +#endif return (0); } int feraiseexcept(int excepts) { +#ifndef __SOFTFP__ + fexcept_t __ex = excepts; - if (_libc_arm_fpu_present) - __vfp_feraiseexcept(excepts); - __softfp_feraiseexcept(excepts); - + fesetexceptflag(&__ex, excepts); +#endif return (0); } int fetestexcept(int excepts) { - int __got_excepts; +#ifndef __SOFTFP__ + fexcept_t __fpsr; - __got_excepts = 0; - if (_libc_arm_fpu_present) - __got_excepts = __vfp_fetestexcept(excepts); - __got_excepts |= __softfp_fetestexcept(excepts); - - return (__got_excepts); + vmrs_fpscr(__fpsr); + return (__fpsr & excepts); +#else + return (0); +#endif } int fegetround(void) { +#ifndef __SOFTFP__ + fenv_t __fpsr; - if (_libc_arm_fpu_present) - return __softfp_round_from_vfp(__vfp_fegetround()); - return __softfp_fegetround(); + vmrs_fpscr(__fpsr); + return (__fpsr & _ROUND_MASK); +#else +#ifdef FE_TONEAREST + return (FE_TONEAREST); +#else + return (0); +#endif +#endif } int fesetround(int round) { +#ifndef __SOFTFP__ + fenv_t __fpsr; - if (_libc_arm_fpu_present) - __vfp_fesetround(__softfp_round_to_vfp(round)); - __softfp_fesetround(round); - + vmrs_fpscr(__fpsr); + __fpsr &= ~(_ROUND_MASK); + __fpsr |= round; + vmsr_fpscr(__fpsr); +#endif return (0); } int fegetenv(fenv_t *envp) { - fenv_t __vfp_envp; - - __vfp_envp = 0; - if (_libc_arm_fpu_present) - __vfp_fegetenv(&__vfp_envp); - __softfp_fegetenv(envp); - *envp |= __vfp_envp; +#ifndef __SOFTFP__ + vmrs_fpscr(*envp); +#endif return (0); } int feholdexcept(fenv_t *envp) { - fenv_t __vfp_envp; - - __vfp_envp = 0; - if (_libc_arm_fpu_present) - __vfp_feholdexcept(&__vfp_envp); - __softfp_feholdexcept(envp); - *envp |= __vfp_envp; +#ifndef __SOFTFP__ + fenv_t __env; + vmrs_fpscr(__env); + *envp = __env; + __env &= ~(FE_ALL_EXCEPT); + vmsr_fpscr(__env); +#endif return (0); } int fesetenv(const fenv_t *envp) { - if (_libc_arm_fpu_present) - __vfp_fesetenv(envp); - __softfp_fesetenv(envp); - +#ifndef __SOFTFP__ + vmsr_fpscr(*envp); +#endif return (0); } int feupdateenv(const fenv_t *envp) { +#ifndef __SOFTFP__ + fexcept_t __fpsr; - if (_libc_arm_fpu_present) - __vfp_feupdateenv(envp); - __softfp_feupdateenv(envp); - + vmrs_fpscr(__fpsr); + vmsr_fpscr(*envp); + feraiseexcept(__fpsr & FE_ALL_EXCEPT); +#else +#if defined(FE_NOMASK_ENV) && FE_ALL_EXCEPT != 0 + if (envp == FE_NOMASK_ENV) + return (1); +#endif +#endif return (0); } int feenableexcept(int __mask) { - int __unmasked; +#ifndef __SOFTFP__ + fenv_t __old_fpsr, __new_fpsr; - __unmasked = 0; - if (_libc_arm_fpu_present) - __unmasked = __vfp_feenableexcept(__mask); - __unmasked |= __softfp_feenableexcept(__mask); - - return (__unmasked); + vmrs_fpscr(__old_fpsr); + __new_fpsr = __old_fpsr | + ((__mask & FE_ALL_EXCEPT) << _FPU_MASK_SHIFT); + vmsr_fpscr(__new_fpsr); + return ((__old_fpsr >> _FPU_MASK_SHIFT) & FE_ALL_EXCEPT); +#else + return (0); +#endif } int fedisableexcept(int __mask) { - int __unmasked; +#ifndef __SOFTFP__ + fenv_t __old_fpsr, __new_fpsr; - __unmasked = 0; - if (_libc_arm_fpu_present) - __unmasked = __vfp_fedisableexcept(__mask); - __unmasked |= __softfp_fedisableexcept(__mask); - - return (__unmasked); + vmrs_fpscr(__old_fpsr); + __new_fpsr = __old_fpsr & + ~((__mask & FE_ALL_EXCEPT) << _FPU_MASK_SHIFT); + vmsr_fpscr(__new_fpsr); + return ((__old_fpsr >> _FPU_MASK_SHIFT) & FE_ALL_EXCEPT); +#else + return (0); +#endif } int fegetexcept(void) { - int __unmasked; - - __unmasked = 0; - if (_libc_arm_fpu_present) - __unmasked = __vfp_fegetexcept(); - __unmasked |= __softfp_fegetexcept(); - - return (__unmasked); -} +#ifndef __SOFTFP__ + fenv_t __fpsr; + vmrs_fpscr(__fpsr); + return (__fpsr & FE_ALL_EXCEPT); +#else + return (0); #endif - +} From 3ca43259686187e081d317e2b406724a849c9d7b Mon Sep 17 00:00:00 2001 From: Eshan dhawan Date: Fri, 24 Jul 2020 00:36:46 +0530 Subject: [PATCH 450/520] arm: Split fenv.c into multiple files Use the already existing stub files if possible. These files are necessary to override the stub implementation with the machine-specific implementation through the build system. Reviewed-by: Sebastian Huber Signed-off-by: Eshan dhawan --- newlib/libm/machine/arm/Makefile.am | 6 +- newlib/libm/machine/arm/Makefile.in | 34 +++- newlib/libm/machine/arm/_fenv.h | 40 ++++ newlib/libm/machine/arm/fe_dfl_env.c | 37 +++- newlib/libm/machine/arm/feclearexcept.c | 45 ++++- newlib/libm/machine/arm/fedisableexcept.c | 47 +++++ newlib/libm/machine/arm/feenableexcept.c | 47 +++++ newlib/libm/machine/arm/fegetenv.c | 42 +++- newlib/libm/machine/arm/fegetexcept.c | 44 +++++ newlib/libm/machine/arm/fegetexceptflag.c | 46 ++++- newlib/libm/machine/arm/fegetround.c | 49 ++++- newlib/libm/machine/arm/feholdexcept.c | 46 ++++- newlib/libm/machine/arm/fenv.c | 223 ---------------------- newlib/libm/machine/arm/feraiseexcept.c | 43 ++++- newlib/libm/machine/arm/fesetenv.c | 42 +++- newlib/libm/machine/arm/fesetexceptflag.c | 46 ++++- newlib/libm/machine/arm/fesetround.c | 46 ++++- newlib/libm/machine/arm/fetestexcept.c | 45 ++++- newlib/libm/machine/arm/feupdateenv.c | 50 ++++- 19 files changed, 696 insertions(+), 282 deletions(-) create mode 100644 newlib/libm/machine/arm/_fenv.h create mode 100644 newlib/libm/machine/arm/fedisableexcept.c create mode 100644 newlib/libm/machine/arm/feenableexcept.c create mode 100644 newlib/libm/machine/arm/fegetexcept.c delete mode 100644 newlib/libm/machine/arm/fenv.c diff --git a/newlib/libm/machine/arm/Makefile.am b/newlib/libm/machine/arm/Makefile.am index 180a37f44..6574c56c9 100644 --- a/newlib/libm/machine/arm/Makefile.am +++ b/newlib/libm/machine/arm/Makefile.am @@ -26,13 +26,15 @@ LIB_SOURCES = \ fegetexceptflag.c \ fegetround.c \ feholdexcept.c \ - fenv.c \ + fegetexcept.c \ feraiseexcept.c \ fesetenv.c \ fesetexceptflag.c \ fesetround.c \ fetestexcept.c \ - feupdateenv.c + feupdateenv.c \ + feenableexcept.c \ + fedisableexcept.c noinst_LIBRARIES = lib.a diff --git a/newlib/libm/machine/arm/Makefile.in b/newlib/libm/machine/arm/Makefile.in index aa23dd4d5..63de93443 100644 --- a/newlib/libm/machine/arm/Makefile.in +++ b/newlib/libm/machine/arm/Makefile.in @@ -54,7 +54,8 @@ build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/../../../Makefile.shared $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs + $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs \ + $(srcdir)/../../../../mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \ @@ -80,10 +81,11 @@ am__objects_1 = lib_a-e_sqrt.$(OBJEXT) lib_a-ef_sqrt.$(OBJEXT) \ lib_a-feclearexcept.$(OBJEXT) lib_a-fe_dfl_env.$(OBJEXT) \ lib_a-fegetenv.$(OBJEXT) lib_a-fegetexceptflag.$(OBJEXT) \ lib_a-fegetround.$(OBJEXT) lib_a-feholdexcept.$(OBJEXT) \ - lib_a-fenv.$(OBJEXT) lib_a-feraiseexcept.$(OBJEXT) \ + lib_a-fegetexcept.$(OBJEXT) lib_a-feraiseexcept.$(OBJEXT) \ lib_a-fesetenv.$(OBJEXT) lib_a-fesetexceptflag.$(OBJEXT) \ lib_a-fesetround.$(OBJEXT) lib_a-fetestexcept.$(OBJEXT) \ - lib_a-feupdateenv.$(OBJEXT) + lib_a-feupdateenv.$(OBJEXT) lib_a-feenableexcept.$(OBJEXT) \ + lib_a-fedisableexcept.$(OBJEXT) am_lib_a_OBJECTS = $(am__objects_1) lib_a_OBJECTS = $(am_lib_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ @@ -230,13 +232,15 @@ LIB_SOURCES = \ fegetexceptflag.c \ fegetround.c \ feholdexcept.c \ - fenv.c \ + fegetexcept.c \ feraiseexcept.c \ fesetenv.c \ fesetexceptflag.c \ fesetround.c \ fetestexcept.c \ - feupdateenv.c + feupdateenv.c \ + feenableexcept.c \ + fedisableexcept.c noinst_LIBRARIES = lib.a lib_a_SOURCES = $(LIB_SOURCES) @@ -434,11 +438,11 @@ lib_a-feholdexcept.o: feholdexcept.c lib_a-feholdexcept.obj: feholdexcept.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.obj `if test -f 'feholdexcept.c'; then $(CYGPATH_W) 'feholdexcept.c'; else $(CYGPATH_W) '$(srcdir)/feholdexcept.c'; fi` -lib_a-fenv.o: fenv.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.o `test -f 'fenv.c' || echo '$(srcdir)/'`fenv.c +lib_a-fegetexcept.o: fegetexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexcept.o `test -f 'fegetexcept.c' || echo '$(srcdir)/'`fegetexcept.c -lib_a-fenv.obj: fenv.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.obj `if test -f 'fenv.c'; then $(CYGPATH_W) 'fenv.c'; else $(CYGPATH_W) '$(srcdir)/fenv.c'; fi` +lib_a-fegetexcept.obj: fegetexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexcept.obj `if test -f 'fegetexcept.c'; then $(CYGPATH_W) 'fegetexcept.c'; else $(CYGPATH_W) '$(srcdir)/fegetexcept.c'; fi` lib_a-feraiseexcept.o: feraiseexcept.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feraiseexcept.o `test -f 'feraiseexcept.c' || echo '$(srcdir)/'`feraiseexcept.c @@ -476,6 +480,18 @@ lib_a-feupdateenv.o: feupdateenv.c lib_a-feupdateenv.obj: feupdateenv.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feupdateenv.obj `if test -f 'feupdateenv.c'; then $(CYGPATH_W) 'feupdateenv.c'; else $(CYGPATH_W) '$(srcdir)/feupdateenv.c'; fi` +lib_a-feenableexcept.o: feenableexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feenableexcept.o `test -f 'feenableexcept.c' || echo '$(srcdir)/'`feenableexcept.c + +lib_a-feenableexcept.obj: feenableexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feenableexcept.obj `if test -f 'feenableexcept.c'; then $(CYGPATH_W) 'feenableexcept.c'; else $(CYGPATH_W) '$(srcdir)/feenableexcept.c'; fi` + +lib_a-fedisableexcept.o: fedisableexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fedisableexcept.o `test -f 'fedisableexcept.c' || echo '$(srcdir)/'`fedisableexcept.c + +lib_a-fedisableexcept.obj: fedisableexcept.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fedisableexcept.obj `if test -f 'fedisableexcept.c'; then $(CYGPATH_W) 'fedisableexcept.c'; else $(CYGPATH_W) '$(srcdir)/fedisableexcept.c'; fi` + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ diff --git a/newlib/libm/machine/arm/_fenv.h b/newlib/libm/machine/arm/_fenv.h new file mode 100644 index 000000000..7cde0a05a --- /dev/null +++ b/newlib/libm/machine/arm/_fenv.h @@ -0,0 +1,40 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2004-2005 David Schultz + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include + +#ifndef __SOFTFP__ +#define vmrs_fpscr(__r) __asm __volatile("vmrs %0, fpscr" : "=&r"(__r)) +#define vmsr_fpscr(__r) __asm __volatile("vmsr fpscr, %0" : : "r"(__r)) +#define _FPU_MASK_SHIFT 8 +#define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \ + FE_UPWARD | FE_TOWARDZERO) +#endif diff --git a/newlib/libm/machine/arm/fe_dfl_env.c b/newlib/libm/machine/arm/fe_dfl_env.c index 8cbee7771..14dfd4448 100644 --- a/newlib/libm/machine/arm/fe_dfl_env.c +++ b/newlib/libm/machine/arm/fe_dfl_env.c @@ -1,7 +1,36 @@ -/* - * SPDX-License-Identifier: BSD-2-Clause +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * (c) Copyright 2019 Joel Sherrill + * Copyright (c) 2004-2005 David Schultz + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ */ -#include "../../fenv/fenv_stub.c" +#include "_fenv.h" + +fenv_t __fe_dfl_env = { 0 }; + +const fenv_t *_fe_dfl_env = &__fe_dfl_env; diff --git a/newlib/libm/machine/arm/feclearexcept.c b/newlib/libm/machine/arm/feclearexcept.c index 8cbee7771..dbcfdb672 100644 --- a/newlib/libm/machine/arm/feclearexcept.c +++ b/newlib/libm/machine/arm/feclearexcept.c @@ -1,7 +1,44 @@ -/* - * SPDX-License-Identifier: BSD-2-Clause +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * (c) Copyright 2019 Joel Sherrill + * Copyright (c) 2004-2005 David Schultz + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ */ -#include "../../fenv/fenv_stub.c" +#include "_fenv.h" + +int feclearexcept(int excepts) +{ +#ifndef __SOFTFP__ + fexcept_t __fpsr; + + vmrs_fpscr(__fpsr); + __fpsr &= ~excepts; + vmsr_fpscr(__fpsr); +#endif + return (0); +} diff --git a/newlib/libm/machine/arm/fedisableexcept.c b/newlib/libm/machine/arm/fedisableexcept.c new file mode 100644 index 000000000..3613769a0 --- /dev/null +++ b/newlib/libm/machine/arm/fedisableexcept.c @@ -0,0 +1,47 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2004-2005 David Schultz + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include "_fenv.h" + +int fedisableexcept(int __mask) +{ +#ifndef __SOFTFP__ + fenv_t __old_fpsr, __new_fpsr; + + vmrs_fpscr(__old_fpsr); + __new_fpsr = __old_fpsr & + ~((__mask & FE_ALL_EXCEPT) << _FPU_MASK_SHIFT); + vmsr_fpscr(__new_fpsr); + return ((__old_fpsr >> _FPU_MASK_SHIFT) & FE_ALL_EXCEPT); +#else + return (0); +#endif +} diff --git a/newlib/libm/machine/arm/feenableexcept.c b/newlib/libm/machine/arm/feenableexcept.c new file mode 100644 index 000000000..80719d970 --- /dev/null +++ b/newlib/libm/machine/arm/feenableexcept.c @@ -0,0 +1,47 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2004-2005 David Schultz + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include "_fenv.h" + +int feenableexcept(int __mask) +{ +#ifndef __SOFTFP__ + fenv_t __old_fpsr, __new_fpsr; + + vmrs_fpscr(__old_fpsr); + __new_fpsr = __old_fpsr | + ((__mask & FE_ALL_EXCEPT) << _FPU_MASK_SHIFT); + vmsr_fpscr(__new_fpsr); + return ((__old_fpsr >> _FPU_MASK_SHIFT) & FE_ALL_EXCEPT); +#else + return (0); +#endif +} diff --git a/newlib/libm/machine/arm/fegetenv.c b/newlib/libm/machine/arm/fegetenv.c index 8cbee7771..efa3146e1 100644 --- a/newlib/libm/machine/arm/fegetenv.c +++ b/newlib/libm/machine/arm/fegetenv.c @@ -1,7 +1,41 @@ -/* - * SPDX-License-Identifier: BSD-2-Clause +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * (c) Copyright 2019 Joel Sherrill + * Copyright (c) 2004-2005 David Schultz + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ */ -#include "../../fenv/fenv_stub.c" +#include "_fenv.h" + +int fegetenv(fenv_t *envp) +{ + +#ifndef __SOFTFP__ + vmrs_fpscr(*envp); +#endif + return (0); +} diff --git a/newlib/libm/machine/arm/fegetexcept.c b/newlib/libm/machine/arm/fegetexcept.c new file mode 100644 index 000000000..4395314b2 --- /dev/null +++ b/newlib/libm/machine/arm/fegetexcept.c @@ -0,0 +1,44 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2004-2005 David Schultz + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include "_fenv.h" + +int fegetexcept(void) +{ +#ifndef __SOFTFP__ + fenv_t __fpsr; + + vmrs_fpscr(__fpsr); + return (__fpsr & FE_ALL_EXCEPT); +#else + return (0); +#endif +} diff --git a/newlib/libm/machine/arm/fegetexceptflag.c b/newlib/libm/machine/arm/fegetexceptflag.c index 8cbee7771..2bfcb08ae 100644 --- a/newlib/libm/machine/arm/fegetexceptflag.c +++ b/newlib/libm/machine/arm/fegetexceptflag.c @@ -1,7 +1,45 @@ -/* - * SPDX-License-Identifier: BSD-2-Clause +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * (c) Copyright 2019 Joel Sherrill + * Copyright (c) 2004-2005 David Schultz + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ */ -#include "../../fenv/fenv_stub.c" +#include "_fenv.h" + +int fegetexceptflag(fexcept_t *flagp, int excepts) +{ +#ifndef __SOFTFP__ + fexcept_t __fpsr; + + vmrs_fpscr(__fpsr); + __fpsr &= ~excepts; + __fpsr |= *flagp & excepts; + vmsr_fpscr(__fpsr); +#endif + return (0); +} diff --git a/newlib/libm/machine/arm/fegetround.c b/newlib/libm/machine/arm/fegetround.c index 8cbee7771..9c681f824 100644 --- a/newlib/libm/machine/arm/fegetround.c +++ b/newlib/libm/machine/arm/fegetround.c @@ -1,7 +1,48 @@ -/* - * SPDX-License-Identifier: BSD-2-Clause +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * (c) Copyright 2019 Joel Sherrill + * Copyright (c) 2004-2005 David Schultz + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ */ -#include "../../fenv/fenv_stub.c" +#include "_fenv.h" + +int fegetround(void) +{ +#ifndef __SOFTFP__ + fenv_t __fpsr; + + vmrs_fpscr(__fpsr); + return (__fpsr & _ROUND_MASK); +#else +#ifdef FE_TONEAREST + return (FE_TONEAREST); +#else + return (0); +#endif +#endif +} diff --git a/newlib/libm/machine/arm/feholdexcept.c b/newlib/libm/machine/arm/feholdexcept.c index 8cbee7771..8432e88a2 100644 --- a/newlib/libm/machine/arm/feholdexcept.c +++ b/newlib/libm/machine/arm/feholdexcept.c @@ -1,7 +1,45 @@ -/* - * SPDX-License-Identifier: BSD-2-Clause +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * (c) Copyright 2019 Joel Sherrill + * Copyright (c) 2004-2005 David Schultz + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ */ -#include "../../fenv/fenv_stub.c" +#include "_fenv.h" + +int feholdexcept(fenv_t *envp) +{ +#ifndef __SOFTFP__ + fenv_t __env; + + vmrs_fpscr(__env); + *envp = __env; + __env &= ~(FE_ALL_EXCEPT); + vmsr_fpscr(__env); +#endif + return (0); +} diff --git a/newlib/libm/machine/arm/fenv.c b/newlib/libm/machine/arm/fenv.c deleted file mode 100644 index 0735cd1c5..000000000 --- a/newlib/libm/machine/arm/fenv.c +++ /dev/null @@ -1,223 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2004-2005 David Schultz - * Copyright (c) 2013 Andrew Turner - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#include - -#ifndef __SOFTFP__ -#define vmrs_fpscr(__r) __asm __volatile("vmrs %0, fpscr" : "=&r"(__r)) -#define vmsr_fpscr(__r) __asm __volatile("vmsr fpscr, %0" : : "r"(__r)) -#define _FPU_MASK_SHIFT 8 -#define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \ - FE_UPWARD | FE_TOWARDZERO) -#endif - -fenv_t __fe_dfl_env = { 0 }; - -const fenv_t *_fe_dfl_env = &__fe_dfl_env; - -int feclearexcept(int excepts) -{ -#ifndef __SOFTFP__ - fexcept_t __fpsr; - - vmrs_fpscr(__fpsr); - __fpsr &= ~excepts; - vmsr_fpscr(__fpsr); -#endif - return (0); -} - -int fegetexceptflag(fexcept_t *flagp, int excepts) -{ -#ifndef __SOFTFP__ - fexcept_t __fpsr; - - vmrs_fpscr(__fpsr); - __fpsr &= ~excepts; - __fpsr |= *flagp & excepts; - vmsr_fpscr(__fpsr); -#endif - return (0); -} - -int fesetexceptflag(const fexcept_t *flagp, int excepts) -{ -#ifndef __SOFTFP__ - fexcept_t __fpsr; - - vmrs_fpscr(__fpsr); - __fpsr &= ~excepts; - __fpsr |= *flagp & excepts; - vmsr_fpscr(__fpsr); -#endif - return (0); -} - -int feraiseexcept(int excepts) -{ -#ifndef __SOFTFP__ - fexcept_t __ex = excepts; - - fesetexceptflag(&__ex, excepts); -#endif - return (0); -} - -int fetestexcept(int excepts) -{ -#ifndef __SOFTFP__ - fexcept_t __fpsr; - - vmrs_fpscr(__fpsr); - return (__fpsr & excepts); -#else - return (0); -#endif -} - -int fegetround(void) -{ -#ifndef __SOFTFP__ - fenv_t __fpsr; - - vmrs_fpscr(__fpsr); - return (__fpsr & _ROUND_MASK); -#else -#ifdef FE_TONEAREST - return (FE_TONEAREST); -#else - return (0); -#endif -#endif -} - -int fesetround(int round) -{ -#ifndef __SOFTFP__ - fenv_t __fpsr; - - vmrs_fpscr(__fpsr); - __fpsr &= ~(_ROUND_MASK); - __fpsr |= round; - vmsr_fpscr(__fpsr); -#endif - return (0); -} - -int fegetenv(fenv_t *envp) -{ - -#ifndef __SOFTFP__ - vmrs_fpscr(*envp); -#endif - return (0); -} - -int feholdexcept(fenv_t *envp) -{ -#ifndef __SOFTFP__ - fenv_t __env; - - vmrs_fpscr(__env); - *envp = __env; - __env &= ~(FE_ALL_EXCEPT); - vmsr_fpscr(__env); -#endif - return (0); -} - -int fesetenv(const fenv_t *envp) -{ - -#ifndef __SOFTFP__ - vmsr_fpscr(*envp); -#endif - return (0); -} - -int feupdateenv(const fenv_t *envp) -{ -#ifndef __SOFTFP__ - fexcept_t __fpsr; - - vmrs_fpscr(__fpsr); - vmsr_fpscr(*envp); - feraiseexcept(__fpsr & FE_ALL_EXCEPT); -#else -#if defined(FE_NOMASK_ENV) && FE_ALL_EXCEPT != 0 - if (envp == FE_NOMASK_ENV) - return (1); -#endif -#endif - return (0); -} - -int feenableexcept(int __mask) -{ -#ifndef __SOFTFP__ - fenv_t __old_fpsr, __new_fpsr; - - vmrs_fpscr(__old_fpsr); - __new_fpsr = __old_fpsr | - ((__mask & FE_ALL_EXCEPT) << _FPU_MASK_SHIFT); - vmsr_fpscr(__new_fpsr); - return ((__old_fpsr >> _FPU_MASK_SHIFT) & FE_ALL_EXCEPT); -#else - return (0); -#endif -} - -int fedisableexcept(int __mask) -{ -#ifndef __SOFTFP__ - fenv_t __old_fpsr, __new_fpsr; - - vmrs_fpscr(__old_fpsr); - __new_fpsr = __old_fpsr & - ~((__mask & FE_ALL_EXCEPT) << _FPU_MASK_SHIFT); - vmsr_fpscr(__new_fpsr); - return ((__old_fpsr >> _FPU_MASK_SHIFT) & FE_ALL_EXCEPT); -#else - return (0); -#endif -} - -int fegetexcept(void) -{ -#ifndef __SOFTFP__ - fenv_t __fpsr; - - vmrs_fpscr(__fpsr); - return (__fpsr & FE_ALL_EXCEPT); -#else - return (0); -#endif -} diff --git a/newlib/libm/machine/arm/feraiseexcept.c b/newlib/libm/machine/arm/feraiseexcept.c index 8cbee7771..4cab1b2d5 100644 --- a/newlib/libm/machine/arm/feraiseexcept.c +++ b/newlib/libm/machine/arm/feraiseexcept.c @@ -1,7 +1,42 @@ -/* - * SPDX-License-Identifier: BSD-2-Clause +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * (c) Copyright 2019 Joel Sherrill + * Copyright (c) 2004-2005 David Schultz + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ */ -#include "../../fenv/fenv_stub.c" +#include "_fenv.h" + +int feraiseexcept(int excepts) +{ +#ifndef __SOFTFP__ + fexcept_t __ex = excepts; + + fesetexceptflag(&__ex, excepts); +#endif + return (0); +} diff --git a/newlib/libm/machine/arm/fesetenv.c b/newlib/libm/machine/arm/fesetenv.c index 8cbee7771..eb44db3c7 100644 --- a/newlib/libm/machine/arm/fesetenv.c +++ b/newlib/libm/machine/arm/fesetenv.c @@ -1,7 +1,41 @@ -/* - * SPDX-License-Identifier: BSD-2-Clause +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * (c) Copyright 2019 Joel Sherrill + * Copyright (c) 2004-2005 David Schultz + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ */ -#include "../../fenv/fenv_stub.c" +#include + +int fesetenv(const fenv_t *envp) +{ + +#ifndef __SOFTFP__ + vmsr_fpscr(*envp); +#endif + return (0); +} diff --git a/newlib/libm/machine/arm/fesetexceptflag.c b/newlib/libm/machine/arm/fesetexceptflag.c index 8cbee7771..7ba9c0662 100644 --- a/newlib/libm/machine/arm/fesetexceptflag.c +++ b/newlib/libm/machine/arm/fesetexceptflag.c @@ -1,7 +1,45 @@ -/* - * SPDX-License-Identifier: BSD-2-Clause +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * (c) Copyright 2019 Joel Sherrill + * Copyright (c) 2004-2005 David Schultz + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ */ -#include "../../fenv/fenv_stub.c" +#include "_fenv.h" + +int fesetexceptflag(const fexcept_t *flagp, int excepts) +{ +#ifndef __SOFTFP__ + fexcept_t __fpsr; + + vmrs_fpscr(__fpsr); + __fpsr &= ~excepts; + __fpsr |= *flagp & excepts; + vmsr_fpscr(__fpsr); +#endif + return (0); +} diff --git a/newlib/libm/machine/arm/fesetround.c b/newlib/libm/machine/arm/fesetround.c index 8cbee7771..b530f9ab0 100644 --- a/newlib/libm/machine/arm/fesetround.c +++ b/newlib/libm/machine/arm/fesetround.c @@ -1,7 +1,45 @@ -/* - * SPDX-License-Identifier: BSD-2-Clause +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * (c) Copyright 2019 Joel Sherrill + * Copyright (c) 2004-2005 David Schultz + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ */ -#include "../../fenv/fenv_stub.c" +#include "_fenv.h" + +int fesetround(int round) +{ +#ifndef __SOFTFP__ + fenv_t __fpsr; + + vmrs_fpscr(__fpsr); + __fpsr &= ~(_ROUND_MASK); + __fpsr |= round; + vmsr_fpscr(__fpsr); +#endif + return (0); +} diff --git a/newlib/libm/machine/arm/fetestexcept.c b/newlib/libm/machine/arm/fetestexcept.c index 8cbee7771..f825374be 100644 --- a/newlib/libm/machine/arm/fetestexcept.c +++ b/newlib/libm/machine/arm/fetestexcept.c @@ -1,7 +1,44 @@ -/* - * SPDX-License-Identifier: BSD-2-Clause +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * (c) Copyright 2019 Joel Sherrill + * Copyright (c) 2004-2005 David Schultz + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ */ -#include "../../fenv/fenv_stub.c" +#include "_fenv.h" + +int fetestexcept(int excepts) +{ +#ifndef __SOFTFP__ + fexcept_t __fpsr; + + vmrs_fpscr(__fpsr); + return (__fpsr & excepts); +#else + return (0); +#endif +} diff --git a/newlib/libm/machine/arm/feupdateenv.c b/newlib/libm/machine/arm/feupdateenv.c index 8cbee7771..a1dcd5b6d 100644 --- a/newlib/libm/machine/arm/feupdateenv.c +++ b/newlib/libm/machine/arm/feupdateenv.c @@ -1,7 +1,49 @@ -/* - * SPDX-License-Identifier: BSD-2-Clause +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * (c) Copyright 2019 Joel Sherrill + * Copyright (c) 2004-2005 David Schultz + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ */ -#include "../../fenv/fenv_stub.c" +#include "_fenv.h" + +int feupdateenv(const fenv_t *envp) +{ +#ifndef __SOFTFP__ + fexcept_t __fpsr; + + vmrs_fpscr(__fpsr); + vmsr_fpscr(*envp); + feraiseexcept(__fpsr & FE_ALL_EXCEPT); +#else +#if defined(FE_NOMASK_ENV) && FE_ALL_EXCEPT != 0 + if (envp == FE_NOMASK_ENV) + return (1); +#endif +#endif + return (0); +} From ba283d8777b617696342cad1f973e22b03bc7c74 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 29 Jul 2020 16:24:13 +0200 Subject: [PATCH 451/520] arm: Fix include to avoid undefined reference ld: libm.a(lib_a-fesetenv.o): in function `fesetenv': newlib/libm/machine/arm/fesetenv.c:38: undefined reference to `vmsr_fpscr' Signed-off-by: Sebastian Huber --- newlib/libm/machine/arm/fesetenv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libm/machine/arm/fesetenv.c b/newlib/libm/machine/arm/fesetenv.c index eb44db3c7..d98235628 100644 --- a/newlib/libm/machine/arm/fesetenv.c +++ b/newlib/libm/machine/arm/fesetenv.c @@ -29,7 +29,7 @@ * $FreeBSD$ */ -#include +#include "_fenv.h" int fesetenv(const fenv_t *envp) { From a5218ff7721bd5df023f576a0e9afb8f099c3b09 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Mon, 6 Jul 2020 14:51:32 +0100 Subject: [PATCH 452/520] Cygwin: Add --nokill dumper option Add --nokill option to dumper, for compatibility with minidumper, and to assist with testing. --- winsup/doc/utils.xml | 10 +++++++--- winsup/utils/dumper.cc | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/winsup/doc/utils.xml b/winsup/doc/utils.xml index 8b92bfdf1..22bd86904 100644 --- a/winsup/doc/utils.xml +++ b/winsup/doc/utils.xml @@ -496,6 +496,7 @@ dumper [OPTION] FILENAME WIN32PID Options +-n, --nokill don't terminate the dumped process -d, --verbose be verbose while dumping -h, --help output help information and exit -q, --quiet be quiet while dumping (default) @@ -519,9 +520,12 @@ error_start=x:\path\to\dumper.exe be started whenever some program encounters a fatal error. dumper can be also be started from the command - line to create a core dump of any running process. Unfortunately, because - of a Windows API limitation, when a core dump is created and - dumper exits, the target process is terminated too. + line to create a core dump of any running process. + + For historical reasons, unless the -n option + is given, after the core dump is created and when the + dumper exits, the target process is also + terminated. To save space in the core dump, dumper doesn't write those portions of the target process's memory space that are loaded diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc index 36dbf9dbb..3eb4af275 100644 --- a/winsup/utils/dumper.cc +++ b/winsup/utils/dumper.cc @@ -64,6 +64,7 @@ __attribute__ ((packed)) note_header; BOOL verbose = FALSE; +BOOL nokill = FALSE; int deb_printf (const char *format,...) { @@ -716,7 +717,19 @@ dumper::collect_process_information () current_event.dwThreadId, DBG_CONTINUE); } + failed: + if (nokill) + { + if (!DebugActiveProcessStop (pid)) + { + fprintf (stderr, "Cannot detach from process #%u, error %ld", + (unsigned int) pid, (long) GetLastError ()); + } + } + /* Otherwise, the debuggee is terminated when this process exits + (as DebugSetProcessKillOnExit() defaults to TRUE) */ + /* set debugee free */ if (sync_with_debugee) SetEvent (sync_with_debugee); @@ -960,6 +973,7 @@ Usage: %s [OPTION] FILENAME WIN32PID\n\ \n\ Dump core from WIN32PID to FILENAME.core\n\ \n\ + -n, --nokill don't terminate the dumped process\n\ -d, --verbose be verbose while dumping\n\ -h, --help output help information and exit\n\ -q, --quiet be quiet while dumping (default)\n\ @@ -969,13 +983,14 @@ Dump core from WIN32PID to FILENAME.core\n\ } struct option longopts[] = { + {"nokill", no_argument, NULL, 'n'}, {"verbose", no_argument, NULL, 'd'}, {"help", no_argument, NULL, 'h'}, {"quiet", no_argument, NULL, 'q'}, {"version", no_argument, 0, 'V'}, {0, no_argument, NULL, 0} }; -const char *opts = "dhqV"; +const char *opts = "ndhqV"; static void print_version () @@ -1001,6 +1016,9 @@ main (int argc, char **argv) while ((opt = getopt_long (argc, argv, opts, longopts, NULL) ) != EOF) switch (opt) { + case 'n': + nokill = TRUE; + break; case 'd': verbose = TRUE; break; From 0d4d2d38fbdf923f379a89b82b6a63580abbaed2 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Mon, 6 Jul 2020 15:02:39 +0100 Subject: [PATCH 453/520] Cygwin: Remove synchronization event from dumper The use of the 'cygwin_error_start_event' for synchronization with dumper was removed from the DLL in commit 8abeff1e (April 2001). --- winsup/utils/dumper.cc | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc index 3eb4af275..816320e6d 100644 --- a/winsup/utils/dumper.cc +++ b/winsup/utils/dumper.cc @@ -627,10 +627,6 @@ dumper::collect_process_information () return 0; } - char event_name[sizeof ("cygwin_error_start_event") + 20]; - sprintf (event_name, "cygwin_error_start_event%16x", (unsigned int) pid); - HANDLE sync_with_debugee = OpenEvent (EVENT_MODIFY_STATE, FALSE, event_name); - DEBUG_EVENT current_event; while (1) @@ -701,10 +697,6 @@ dumper::collect_process_information () goto failed; }; - /* signal a debugee that we've finished */ - if (sync_with_debugee) - SetEvent (sync_with_debugee); - break; default: @@ -730,10 +722,6 @@ failed: /* Otherwise, the debuggee is terminated when this process exits (as DebugSetProcessKillOnExit() defaults to TRUE) */ - /* set debugee free */ - if (sync_with_debugee) - SetEvent (sync_with_debugee); - return 0; } From c222c1b294c7d6e2b0e554aa2fbde79c8b768594 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Mon, 6 Jul 2020 15:10:40 +0100 Subject: [PATCH 454/520] Cygwin: Speed up dumper Stop after we've written the dump in response to the initial breakpoint EXCEPTION_DEBUG_EVENT we recieve for attaching to the process. (rather than bogusly sitting there for 20 seconds waiting for more debug events from a stopped process after we've already written the dump). --- winsup/utils/dumper.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc index 816320e6d..5f8121aa3 100644 --- a/winsup/utils/dumper.cc +++ b/winsup/utils/dumper.cc @@ -615,8 +615,6 @@ out: int dumper::collect_process_information () { - int exception_level = 0; - if (!sane ()) return 0; @@ -631,7 +629,7 @@ dumper::collect_process_information () while (1) { - if (!WaitForDebugEvent (¤t_event, 20000)) + if (!WaitForDebugEvent (¤t_event, INFINITE)) return 0; deb_printf ("got debug event %d\n", current_event.dwDebugEventCode); @@ -675,12 +673,6 @@ dumper::collect_process_information () case EXCEPTION_DEBUG_EVENT: - exception_level++; - if (exception_level == 2) - break; - else if (exception_level > 2) - return 0; - collect_memory_sections (); /* got all info. time to dump */ @@ -697,6 +689,9 @@ dumper::collect_process_information () goto failed; }; + /* We're done */ + goto failed; + break; default: From 3fbfcd11fb09d5f47af3043ee47ec5c7d863d872 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sat, 1 Aug 2020 21:35:58 +0200 Subject: [PATCH 455/520] Cygwin: posix_spawn: add Cygwin-specific code fixing process synchronisation Newlib's posix_spawn has been taken from FreeBSD. The code relies on BSD-specific behaviour of vfork, namely the fact that vfork blocks the parent until the child exits or calls execve as well as the fact that the child shares parent memory in non-COW mode. This behaviour can't be emulated by Cygwin. Cygwin's vfork is equivalent to fork. This is POSIX-compliant, but it's lacking BSD's vfork ingrained synchronization of the parent to wait for the child calling execve, or the chance to just write a variable and the parent will see the result. So this requires a Cygwin-specific solution. The core function of posix_spawn, called do_posix_spawn is now implemented twice, once using the BSD method, and once for Cygwin using Windows synchronization under the hood waiting for the child to call execve and signalling errors upstream. The Windows specifics are hidden inside Cygwin, so newlib only calls internal Cygwin functions. Signed-off-by: Corinna Vinschen --- newlib/libc/posix/posix_spawn.c | 64 ++++++++++++++++++++ winsup/cygwin/child_info.h | 12 +++- winsup/cygwin/fork.cc | 34 +++++++++-- winsup/cygwin/spawn.cc | 104 ++++++++++++++++++++++++++++++++ 4 files changed, 206 insertions(+), 8 deletions(-) diff --git a/newlib/libc/posix/posix_spawn.c b/newlib/libc/posix/posix_spawn.c index 19c5cd0fe..005471fde 100644 --- a/newlib/libc/posix/posix_spawn.c +++ b/newlib/libc/posix/posix_spawn.c @@ -254,6 +254,69 @@ process_file_actions(const posix_spawn_file_actions_t fa) return (0); } +#ifdef __CYGWIN__ +/* Cygwin's vfork does not follow BSD vfork semantics. Rather it's equivalent + to fork. While that's POSIX compliant, the below FreeBSD implementation + relying on BSD vfork semantics doesn't work as expected on Cygwin. The + following Cygwin-specific code handles the synchronization FreeBSD gets + for free by using vfork. */ + +extern int __posix_spawn_sem_create (void **semp); +extern void __posix_spawn_sem_release (void *sem, int error); +extern int __posix_spawn_sem_wait_and_close (void *sem, void *proc); +extern int __posix_spawn_fork (void **proc); +extern int __posix_spawn_execvpe (const char *path, char * const *argv, + char *const *envp, void *sem, + int use_env_path); + + +static int +do_posix_spawn(pid_t *pid, const char *path, + const posix_spawn_file_actions_t *fa, + const posix_spawnattr_t *sa, + char * const argv[], char * const envp[], int use_env_path) +{ + int error; + void *sem, *proc; + pid_t p; + + error = __posix_spawn_sem_create(&sem); + if (error) + return error; + + p = __posix_spawn_fork(&proc); + switch (p) { + case -1: + return (errno); + case 0: + if (sa != NULL) { + error = process_spawnattr(*sa); + if (error) { + __posix_spawn_sem_release(sem, error); + _exit(127); + } + } + if (fa != NULL) { + error = process_file_actions(*fa); + if (error) { + __posix_spawn_sem_release(sem, error); + _exit(127); + } + } + __posix_spawn_execvpe(path, argv, + envp != NULL ? envp : *p_environ, + sem, use_env_path); + _exit(127); + default: + error = __posix_spawn_sem_wait_and_close(sem, proc); + if (error != 0) + waitpid(p, NULL, WNOHANG); + else if (pid != NULL) + *pid = p; + return (error); + } +} +#else static int do_posix_spawn(pid_t *pid, const char *path, const posix_spawn_file_actions_t *fa, @@ -292,6 +355,7 @@ do_posix_spawn(pid_t *pid, const char *path, return (error); } } +#endif int posix_spawn (pid_t *pid, diff --git a/winsup/cygwin/child_info.h b/winsup/cygwin/child_info.h index 2fa71ba69..e5aa28144 100644 --- a/winsup/cygwin/child_info.h +++ b/winsup/cygwin/child_info.h @@ -37,7 +37,7 @@ enum child_status #define EXEC_MAGIC_SIZE sizeof(child_info) /* Change this value if you get a message indicating that it is out-of-sync. */ -#define CURR_CHILD_INFO_MAGIC 0xf4531879U +#define CURR_CHILD_INFO_MAGIC 0xecc930b9U #define NPROCS 256 @@ -144,6 +144,7 @@ class child_info_spawn: public child_info { HANDLE hExeced; HANDLE ev; + HANDLE sem; pid_t cygpid; public: cygheap_exec_info *moreinfo; @@ -159,6 +160,11 @@ public: void *operator new (size_t, void *p) __attribute__ ((nothrow)) {return p;} void set (child_info_types ci, bool b) { new (this) child_info_spawn (ci, b);} void __reg1 handle_spawn (); + void set_sem (HANDLE _sem) + { + /* Don't leak semaphore handle into exec'ed process. */ + SetHandleInformation (sem = _sem, HANDLE_FLAG_INHERIT, 0); + } bool set_saw_ctrl_c () { if (!has_execed ()) @@ -188,8 +194,8 @@ public: bool get_parent_handle (); bool has_execed_cygwin () const { return iscygwin () && has_execed (); } operator HANDLE& () {return hExeced;} - int __reg3 worker (const char *, const char *const *, const char *const [], int, - int = -1, int = -1);; + int __reg3 worker (const char *, const char *const *, const char *const [], + int, int = -1, int = -1); }; extern child_info_spawn ch_spawn; diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 691d08137..7c07b062e 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -31,7 +31,7 @@ details. */ /* FIXME: Once things stabilize, bump up to a few minutes. */ #define FORK_WAIT_TIMEOUT (300 * 1000) /* 300 seconds */ -static int dofork (bool *with_forkables); +static int dofork (void **proc, bool *with_forkables); class frok { frok (bool *forkables) @@ -47,7 +47,7 @@ class frok int __stdcall parent (volatile char * volatile here); int __stdcall child (volatile char * volatile here); bool error (const char *fmt, ...); - friend int dofork (bool *with_forkables); + friend int dofork (void **proc, bool *with_forkables); }; static void @@ -583,17 +583,36 @@ extern "C" int fork () { bool with_forkables = false; /* do not force hardlinks on first try */ - int res = dofork (&with_forkables); + int res = dofork (NULL, &with_forkables); if (res >= 0) return res; if (with_forkables) return res; /* no need for second try when already enabled */ with_forkables = true; /* enable hardlinks for second try */ - return dofork (&with_forkables); + return dofork (NULL, &with_forkables); +} + + +/* __posix_spawn_fork is called from newlib's posix_spawn implementation. + The original code in newlib has been taken from FreeBSD, and the core + code relies on specific, non-portable behaviour of vfork(2). Our + replacement implementation needs the forked child's HANDLE for + synchronization, so __posix_spawn_fork returns it in proc. */ +extern "C" int +__posix_spawn_fork (void **proc) +{ + bool with_forkables = false; /* do not force hardlinks on first try */ + int res = dofork (proc, &with_forkables); + if (res >= 0) + return res; + if (with_forkables) + return res; /* no need for second try when already enabled */ + with_forkables = true; /* enable hardlinks for second try */ + return dofork (proc, &with_forkables); } static int -dofork (bool *with_forkables) +dofork (void **proc, bool *with_forkables) { frok grouped (with_forkables); @@ -671,6 +690,11 @@ dofork (bool *with_forkables) set_errno (grouped.this_errno); } + else if (proc) + { + /* Return child process handle to posix_fork. */ + *proc = grouped.hchild; + } syscall_printf ("%R = fork()", res); return res; } diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 3e8c8367a..840ec4a86 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -252,6 +252,8 @@ struct system_call_handle child_info_spawn NO_COPY ch_spawn; +extern "C" void __posix_spawn_sem_release (void *sem, int error); + int child_info_spawn::worker (const char *prog_arg, const char *const *argv, const char *const envp[], int mode, @@ -897,6 +899,8 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, && WaitForSingleObject (pi.hProcess, 0) == WAIT_TIMEOUT) wait_for_myself (); } + if (sem) + __posix_spawn_sem_release (sem, 0); myself.exit (EXITCODE_NOSET); break; case _P_WAIT: @@ -1295,3 +1299,103 @@ err: __seterrno (); return -1; } + +/* The following __posix_spawn_* functions are called from newlib's posix_spawn + implementation. The original code in newlib has been taken from FreeBSD, + and the core code relies on specific, non-portable behaviour of vfork(2). + Our replacement implementation uses a semaphore to synchronize parent and + child process. Note: __posix_spawn_fork in fork.cc is part of the set. */ + +/* Create an inheritable semaphore. Set it to 0 (== non-signalled), so the + parent can wait on the semaphore immediately. */ +extern "C" int +__posix_spawn_sem_create (void **semp) +{ + HANDLE sem; + OBJECT_ATTRIBUTES attr; + NTSTATUS status; + + if (!semp) + return EINVAL; + InitializeObjectAttributes (&attr, NULL, OBJ_INHERIT, NULL, NULL); + status = NtCreateSemaphore (&sem, SEMAPHORE_ALL_ACCESS, &attr, 0, INT_MAX); + if (!NT_SUCCESS (status)) + return geterrno_from_nt_status (status); + *semp = sem; + return 0; +} + +/* Signal the semaphore. "error" should be 0 if all went fine and the + exec'd child process is up and running, a useful POSIX error code otherwise. + After releasing the semaphore, the value of the semaphore reflects + the error code + 1. Thus, after WFMO in__posix_spawn_sem_wait_and_close, + querying the value of the semaphore returns either 0 if all went well, + or a value > 0 equivalent to the POSIX error code. */ +extern "C" void +__posix_spawn_sem_release (void *sem, int error) +{ + ReleaseSemaphore (sem, error + 1, NULL); +} + +/* Helper to check the semaphore value. */ +static inline int +__posix_spawn_sem_query (void *sem) +{ + SEMAPHORE_BASIC_INFORMATION sbi; + + NtQuerySemaphore (sem, SemaphoreBasicInformation, &sbi, sizeof sbi, NULL); + return sbi.CurrentCount; +} + +/* Called from parent to wait for fork/exec completion. We're waiting for + the semaphore as well as the child's process handle, so even if the + child crashes without signalling the semaphore, we won't wait infinitely. */ +extern "C" int +__posix_spawn_sem_wait_and_close (void *sem, void *proc) +{ + int ret = 0; + HANDLE w4[2] = { sem, proc }; + + switch (WaitForMultipleObjects (2, w4, FALSE, INFINITE)) + { + case WAIT_OBJECT_0: + ret = __posix_spawn_sem_query (sem); + break; + case WAIT_OBJECT_0 + 1: + /* If we return here due to the child process dying, the semaphore is + very likely not signalled. Check this here and return a valid error + code. */ + ret = __posix_spawn_sem_query (sem); + if (ret == 0) + ret = ECHILD; + break; + default: + ret = geterrno_from_win_error (); + break; + } + + CloseHandle (sem); + return ret; +} + +/* Replacement for execve/execvpe, called from forked child in newlib's + posix_spawn. The relevant difference is the additional semaphore + so the worker method (which is not supposed to return on success) + can signal the semaphore after sync'ing with the exec'd child. */ +extern "C" int +__posix_spawn_execvpe (const char *path, char * const *argv, char *const *envp, + HANDLE sem, int use_env_path) +{ + path_conv buf; + + static char *const empty_env[] = { NULL }; + if (!envp) + envp = empty_env; + ch_spawn.set_sem (sem); + ch_spawn.worker (use_env_path ? (find_exec (path, buf, "PATH", FE_NNF) ?: "") + : path, + argv, envp, + _P_OVERLAY | (use_env_path ? _P_PATH_TYPE_EXEC : 0)); + __posix_spawn_sem_release (sem, errno); + return -1; +} From 5717262b8ecfed0f7fab63e2c09c78991e36f9dd Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 3 Aug 2020 12:40:43 +0200 Subject: [PATCH 456/520] select.h: update FD macros to latest FreeBSD, fix type conversion warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compiling #include void f(int X) {   fd_set set;   FD_ZERO(&set);   FD_SET(X,&set);   FD_CLR(X+1,&set);   (void)FD_ISSET(X+2,&set); } results in plenty of gcc warnings when compiled with -Wconversion -Wsign-conversion: fds.c:7:2: warning: conversion to ‘long unsigned int’ from ‘int’ may   FD_SET(X,&set);   ^~~~~~ [...] The unsigned NFDBITS macro combined with the signed 1L constant are causing lots of implicit signed/unsigned type conversions. Fix this by updating the FD_* macro code to the latest from FreeBSD and adding an (int) cast to _NFDBITS. As a side-effect, this fixes the visibility of NFDBITS and fds_bits (only if __BSD_VISIBLE). This also eliminates the old, outdated fd_set workaround. Signed-off-by: Corinna Vinschen --- newlib/libc/include/sys/select.h | 60 ++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/newlib/libc/include/sys/select.h b/newlib/libc/include/sys/select.h index 1e5d895bb..a5cd6c3fe 100644 --- a/newlib/libc/include/sys/select.h +++ b/newlib/libc/include/sys/select.h @@ -27,33 +27,47 @@ typedef __sigset_t sigset_t; * FD_SETSIZE may be defined by the user, but the default here * should be >= NOFILE (param.h). */ -# ifndef FD_SETSIZE -# define FD_SETSIZE 64 -# endif +#ifndef FD_SETSIZE +#define FD_SETSIZE 64 +#endif -typedef unsigned long fd_mask; -# define NFDBITS (sizeof (fd_mask) * 8) /* bits per mask */ -# ifndef _howmany -# define _howmany(x,y) (((x)+((y)-1))/(y)) -# endif +typedef unsigned long __fd_mask; +#if __BSD_VISIBLE +typedef __fd_mask fd_mask; +#endif -/* We use a macro for fd_set so that including Sockets.h afterwards - can work. */ -typedef struct _types_fd_set { - fd_mask fds_bits[_howmany(FD_SETSIZE, NFDBITS)]; -} _types_fd_set; +#define _NFDBITS ((int)sizeof(__fd_mask) * 8) /* bits per mask */ +#if __BSD_VISIBLE +#define NFDBITS _NFDBITS +#endif -#define fd_set _types_fd_set +#ifndef _howmany +#define _howmany(x,y) (((x) + ((y) - 1)) / (y)) +#endif -# define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS))) -# define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS))) -# define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS))) -# define FD_ZERO(p) (__extension__ (void)({ \ - size_t __i; \ - char *__tmp = (char *)p; \ - for (__i = 0; __i < sizeof (*(p)); ++__i) \ - *__tmp++ = 0; \ -})) +typedef struct fd_set { + __fd_mask __fds_bits[_howmany(FD_SETSIZE, _NFDBITS)]; +} fd_set; +#if __BSD_VISIBLE +#define fds_bits __fds_bits +#endif + +#define __fdset_mask(n) ((__fd_mask)1 << ((n) % _NFDBITS)) +#define FD_CLR(n, p) ((p)->__fds_bits[(n)/_NFDBITS] &= ~__fdset_mask(n)) +#if __BSD_VISIBLE +#define FD_COPY(f, t) (void)(*(t) = *(f)) +#endif +#define FD_ISSET(n, p) (((p)->__fds_bits[(n)/_NFDBITS] & __fdset_mask(n)) != 0) +#define FD_SET(n, p) ((p)->__fds_bits[(n)/_NFDBITS] |= __fdset_mask(n)) +#define FD_ZERO(p) do { \ + fd_set *_p; \ + __size_t _n; \ + \ + _p = (p); \ + _n = _howmany(FD_SETSIZE, _NFDBITS); \ + while (_n > 0) \ + _p->__fds_bits[--_n] = 0; \ +} while (0) #if !defined (__INSIDE_CYGWIN_NET__) From 12ad9a46dff86b7750aa9c8f8fca7349a0925114 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 30 Jul 2020 16:41:05 -0700 Subject: [PATCH 457/520] libm/math: Use __math_xflow in obsolete math code [v2] C compilers may fold const values at compile time, so expressions which try to elicit underflow/overflow by performing simple arithemetic on suitable values will not generate the required exceptions. Work around this by replacing code which does these arithmetic operations with calls to the existing __math_xflow functions that are designed to do this correctly. Signed-off-by: Keith Packard ---- v2: libm/math: Pass sign to __math_xflow instead of muliplying result --- newlib/libm/common/math_errf.c | 2 +- newlib/libm/math/e_cosh.c | 9 +++++---- newlib/libm/math/e_exp.c | 5 +++-- newlib/libm/math/e_pow.c | 18 ++++++++---------- newlib/libm/math/ef_cosh.c | 7 ++++--- newlib/libm/math/ef_exp.c | 5 +++-- newlib/libm/math/ef_pow.c | 14 ++++++-------- newlib/libm/math/s_erf.c | 3 ++- newlib/libm/math/sf_erf.c | 3 ++- 9 files changed, 34 insertions(+), 32 deletions(-) diff --git a/newlib/libm/common/math_errf.c b/newlib/libm/common/math_errf.c index 53c68b1cf..bb8273b8d 100644 --- a/newlib/libm/common/math_errf.c +++ b/newlib/libm/common/math_errf.c @@ -51,13 +51,13 @@ xflowf (uint32_t sign, float y) return with_errnof (y, ERANGE); } -#if !__OBSOLETE_MATH HIDDEN float __math_uflowf (uint32_t sign) { return xflowf (sign, 0x1p-95f); } +#if !__OBSOLETE_MATH #if WANT_ERRNO_UFLOW /* Underflows to zero in some non-nearest rounding mode, setting errno is valid even if the result is non-zero, but in the subnormal range. */ diff --git a/newlib/libm/math/e_cosh.c b/newlib/libm/math/e_cosh.c index a6310bd07..7b258ffef 100644 --- a/newlib/libm/math/e_cosh.c +++ b/newlib/libm/math/e_cosh.c @@ -25,7 +25,7 @@ * 2 * 22 <= x <= lnovft : cosh(x) := exp(x)/2 * lnovft <= x <= ln2ovft: cosh(x) := exp(x/2)/2 * exp(x/2) - * ln2ovft < x : cosh(x) := huge*huge (overflow) + * ln2ovft < x : cosh(x) := overflow * * Special cases: * cosh(x) is |x| if x is +INF, -INF, or NaN. @@ -33,13 +33,14 @@ */ #include "fdlibm.h" +#include "math_config.h" #ifndef _DOUBLE_IS_32BITS #ifdef __STDC__ -static const double one = 1.0, half=0.5, huge = 1.0e300; +static const double one = 1.0, half=0.5; #else -static double one = 1.0, half=0.5, huge = 1.0e300; +static double one = 1.0, half=0.5; #endif #ifdef __STDC__ @@ -87,7 +88,7 @@ static double one = 1.0, half=0.5, huge = 1.0e300; } /* |x| > overflowthresold, cosh(x) overflow */ - return huge*huge; + return __math_oflow(0); } #endif /* defined(_DOUBLE_IS_32BITS) */ diff --git a/newlib/libm/math/e_exp.c b/newlib/libm/math/e_exp.c index d23b1162b..ec26c2099 100644 --- a/newlib/libm/math/e_exp.c +++ b/newlib/libm/math/e_exp.c @@ -75,6 +75,7 @@ */ #include "fdlibm.h" +#include "math_config.h" #if __OBSOLETE_MATH #ifndef _DOUBLE_IS_32BITS @@ -126,8 +127,8 @@ P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */ return x+x; /* NaN */ else return (xsb==0)? x:0.0; /* exp(+-inf)={inf,0} */ } - if(x > o_threshold) return huge*huge; /* overflow */ - if(x < u_threshold) return twom1000*twom1000; /* underflow */ + if(x > o_threshold) return __math_oflow(0); /* overflow */ + if(x < u_threshold) return __math_uflow(0); /* underflow */ } /* argument reduction */ diff --git a/newlib/libm/math/e_pow.c b/newlib/libm/math/e_pow.c index 4c450ec05..258cca8dd 100644 --- a/newlib/libm/math/e_pow.c +++ b/newlib/libm/math/e_pow.c @@ -76,8 +76,6 @@ zero = 0.0, one = 1.0, two = 2.0, two53 = 9007199254740992.0, /* 0x43400000, 0x00000000 */ -huge = 1.0e300, -tiny = 1.0e-300, /* poly coefs for (3/2)*(log(x)-2s-2/3*s**3 */ L1 = 5.99999999999994648725e-01, /* 0x3FE33333, 0x33333303 */ L2 = 4.28571428578550184252e-01, /* 0x3FDB6DB6, 0xDB6FABFF */ @@ -197,12 +195,12 @@ ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/ /* |y| is huge */ if(iy>0x41e00000) { /* if |y| > 2**31 */ if(iy>0x43f00000){ /* if |y| > 2**64, must o/uflow */ - if(ix<=0x3fefffff) return (hy<0)? huge*huge:tiny*tiny; - if(ix>=0x3ff00000) return (hy>0)? huge*huge:tiny*tiny; + if(ix<=0x3fefffff) return (hy<0)? __math_oflow(0):__math_uflow(0); + if(ix>=0x3ff00000) return (hy>0)? __math_oflow(0):__math_uflow(0); } /* over/underflow if x is not close to one */ - if(ix<0x3fefffff) return (hy<0)? huge*huge:tiny*tiny; - if(ix>0x3ff00000) return (hy>0)? huge*huge:tiny*tiny; + if(ix<0x3fefffff) return (hy<0)? __math_oflow(0):__math_uflow(0); + if(ix>0x3ff00000) return (hy>0)? __math_oflow(0):__math_uflow(0); /* now |1-x| is tiny <= 2**-20, suffice to compute log(x) by x-x^2/2+x^3/3-x^4/4 */ t = ax-1; /* t has 20 trailing zeros */ @@ -275,15 +273,15 @@ ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/ EXTRACT_WORDS(j,i,z); if (j>=0x40900000) { /* z >= 1024 */ if(((j-0x40900000)|i)!=0) /* if z > 1024 */ - return s*huge*huge; /* overflow */ + return __math_oflow(s<0); /* overflow */ else { - if(p_l+ovt>z-p_h) return s*huge*huge; /* overflow */ + if(p_l+ovt>z-p_h) return __math_oflow(s<0); /* overflow */ } } else if((j&0x7fffffff)>=0x4090cc00 ) { /* z <= -1075 */ if(((j-0xc090cc00)|i)!=0) /* z < -1075 */ - return s*tiny*tiny; /* underflow */ + return __math_uflow(s<0); /* underflow */ else { - if(p_l<=z-p_h) return s*tiny*tiny; /* underflow */ + if(p_l<=z-p_h) return __math_uflow(s<0); /* underflow */ } } /* diff --git a/newlib/libm/math/ef_cosh.c b/newlib/libm/math/ef_cosh.c index bdce61a00..5690bd7a4 100644 --- a/newlib/libm/math/ef_cosh.c +++ b/newlib/libm/math/ef_cosh.c @@ -14,15 +14,16 @@ */ #include "fdlibm.h" +#include "math_config.h" #ifdef __v810__ #define const #endif #ifdef __STDC__ -static const float one = 1.0, half=0.5, huge = 1.0e30; +static const float one = 1.0, half=0.5; #else -static float one = 1.0, half=0.5, huge = 1.0e30; +static float one = 1.0, half=0.5; #endif #ifdef __STDC__ @@ -67,5 +68,5 @@ static float one = 1.0, half=0.5, huge = 1.0e30; } /* |x| > overflowthresold, cosh(x) overflow */ - return huge*huge; + return __math_oflowf(0); } diff --git a/newlib/libm/math/ef_exp.c b/newlib/libm/math/ef_exp.c index fb3e2ffe6..0cd0c00b3 100644 --- a/newlib/libm/math/ef_exp.c +++ b/newlib/libm/math/ef_exp.c @@ -14,6 +14,7 @@ */ #include "fdlibm.h" +#include "math_config.h" #if __OBSOLETE_MATH #ifdef __v810__ @@ -61,9 +62,9 @@ P5 = 4.1381369442e-08; /* 0x3331bb4c */ if(FLT_UWORD_IS_INFINITE(hx)) return (xsb==0)? x:0.0; /* exp(+-inf)={inf,0} */ if(sx > FLT_UWORD_LOG_MAX) - return huge*huge; /* overflow */ + return __math_oflowf(0); /* overflow */ if(sx < 0 && hx > FLT_UWORD_LOG_MIN) - return twom100*twom100; /* underflow */ + return __math_uflow(0); /* underflow */ /* argument reduction */ if(hx > 0x3eb17218) { /* if |x| > 0.5 ln2 */ diff --git a/newlib/libm/math/ef_pow.c b/newlib/libm/math/ef_pow.c index d4ea4c5e8..e3579f071 100644 --- a/newlib/libm/math/ef_pow.c +++ b/newlib/libm/math/ef_pow.c @@ -33,8 +33,6 @@ zero = 0.0, one = 1.0, two = 2.0, two24 = 16777216.0, /* 0x4b800000 */ -huge = 1.0e30, -tiny = 1.0e-30, /* poly coefs for (3/2)*(log(x)-2s-2/3*s**3 */ L1 = 6.0000002384e-01, /* 0x3f19999a */ L2 = 4.2857143283e-01, /* 0x3edb6db7 */ @@ -140,8 +138,8 @@ ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/ /* |y| is huge */ if(iy>0x4d000000) { /* if |y| > 2**27 */ /* over/underflow if x is not close to one */ - if(ix<0x3f7ffff8) return (hy<0)? huge*huge:tiny*tiny; - if(ix>0x3f800007) return (hy>0)? huge*huge:tiny*tiny; + if(ix<0x3f7ffff8) return (hy<0)? __math_oflowf(0):__math_uflowf(0); + if(ix>0x3f800007) return (hy>0)? __math_oflowf(0):__math_uflowf(0); /* now |1-x| is tiny <= 2**-20, suffice to compute log(x) by x-x^2/2+x^3/3-x^4/4 */ t = ax-1; /* t has 20 trailing zeros */ @@ -219,14 +217,14 @@ ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/ i = j&0x7fffffff; if (j>0) { if (i>FLT_UWORD_EXP_MAX) - return s*huge*huge; /* overflow */ + return __math_oflowf(s<0); /* overflow */ else if (i==FLT_UWORD_EXP_MAX) - if(p_l+ovt>z-p_h) return s*huge*huge; /* overflow */ + if(p_l+ovt>z-p_h) return __math_oflowf(s<0); /* overflow */ } else { if (i>FLT_UWORD_EXP_MIN) - return s*tiny*tiny; /* underflow */ + return __math_uflowf(s<0); /* underflow */ else if (i==FLT_UWORD_EXP_MIN) - if(p_l<=z-p_h) return s*tiny*tiny; /* underflow */ + if(p_l<=z-p_h) return __math_uflowf(s<0); /* underflow */ } /* * compute 2**(p_h+p_l) diff --git a/newlib/libm/math/s_erf.c b/newlib/libm/math/s_erf.c index eb288fc73..9e2333c11 100644 --- a/newlib/libm/math/s_erf.c +++ b/newlib/libm/math/s_erf.c @@ -152,6 +152,7 @@ PORTABILITY #include "fdlibm.h" +#include "math_config.h" #ifndef _DOUBLE_IS_32BITS @@ -352,7 +353,7 @@ sb7 = -2.24409524465858183362e+01; /* 0xC03670E2, 0x42712D62 */ __ieee754_exp((z-x)*(z+x)+R/S); if(hx>0) return r/x; else return two-r/x; } else { - if(hx>0) return tiny*tiny; else return two-tiny; + if(hx>0) return __math_uflow(0); else return two-tiny; } } diff --git a/newlib/libm/math/sf_erf.c b/newlib/libm/math/sf_erf.c index 0329c60fa..f3d0de97a 100644 --- a/newlib/libm/math/sf_erf.c +++ b/newlib/libm/math/sf_erf.c @@ -14,6 +14,7 @@ */ #include "fdlibm.h" +#include "math_config.h" #ifdef __v810__ #define const @@ -217,7 +218,7 @@ sb7 = -2.2440952301e+01; /* 0xc1b38712 */ __ieee754_expf((z-x)*(z+x)+R/S); if(hx>0) return r/x; else return two-r/x; } else { - if(hx>0) return tiny*tiny; else return two-tiny; + if(hx>0) return __math_uflow(0); else return two-tiny; } } From 4ecc804d54ad1f6e9c64f7379cb24b319a9f3f2b Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Mon, 3 Aug 2020 10:22:46 -0600 Subject: [PATCH 458/520] fhandler_proc.cc(format_proc_cpuinfo): add SERIALIZE instruction flag CPUID 7:0 EDX[14] serialize added in linux-next 5.8 by Ricardo Neri-Calderon: The Intel architecture defines a set of Serializing Instructions (a detailed definition can be found in Vol.3 Section 8.3 of the Intel "main" manual, SDM). However, these instructions do more than what is required, have side effects and/or may be rather invasive. Furthermore, some of these instructions are only available in kernel mode or may cause VMExits. Thus, software using these instructions only to serialize execution (as defined in the manual) must handle the undesired side effects. As indicated in the name, SERIALIZE is a new Intel architecture Serializing Instruction. Crucially, it does not have any of the mentioned side effects. Also, it does not cause VMExit and can be used in user mode. This new instruction is currently documented in the latest "extensions" manual (ISE). It will appear in the "main" manual in the future. https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/x86/include/asm/cpufeatures.h?id=85b23fbc7d88f8c6e3951721802d7845bc39663d --- winsup/cygwin/fhandler_proc.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 4bb8bea17..72ffa89cd 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -1578,6 +1578,7 @@ format_proc_cpuinfo (void *, char *&destbuf) ftcprint (features1, 4, "fsrm"); /* fast short REP MOVSB */ ftcprint (features1, 8, "avx512_vp2intersect"); /* vec intcpt d/q */ ftcprint (features1, 10, "md_clear"); /* verw clear buf */ + ftcprint (features1, 14, "serialize"); /* SERIALIZE instruction */ ftcprint (features1, 18, "pconfig"); /* platform config */ ftcprint (features1, 19, "arch_lbr"); /* last branch records */ ftcprint (features1, 28, "flush_l1d"); /* flush l1d cache */ From cb7fba2f3e30e2b62092000bfe0ea34c4a887be0 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Tue, 4 Aug 2020 00:51:56 -0600 Subject: [PATCH 459/520] fhandler_proc.cc(format_proc_cpuinfo): use _small_sprintf %X for microcode microcode is unsigned long long, printed by _small_sprintf using %x; Cygwin32 used last 4 bytes of microcode for next field MHz, printing 0; use correct _small_sprintf format %X to print microcode, producing correct MHz value under Cygwin32 --- winsup/cygwin/fhandler_proc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 72ffa89cd..9a20c23d4 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -833,7 +833,7 @@ format_proc_cpuinfo (void *, char *&destbuf) "model\t\t: %d\n" "model name\t: %s\n" "stepping\t: %d\n" - "microcode\t: 0x%x\n" + "microcode\t: 0x%X\n" "cpu MHz\t\t: %d.000\n", family, model, From e319fd0e627292f2083d7c8365186d175a7578fd Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Fri, 31 Jul 2020 13:55:17 -0400 Subject: [PATCH 460/520] Cygwin: FIFO: lock fixes Add some missing locks and remove one extra unlock. Clarify for some functions whether caller or callee acquires lock, and add appropriate comments. --- winsup/cygwin/fhandler_fifo.cc | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index e9d0187d4..ee7f47c0c 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -316,6 +316,7 @@ fhandler_fifo::wait_open_pipe (HANDLE& ph) return status; } +/* Always called with fifo_client_lock in place. */ int fhandler_fifo::add_client_handler (bool new_pipe_instance) { @@ -345,6 +346,7 @@ fhandler_fifo::add_client_handler (bool new_pipe_instance) return 0; } +/* Always called with fifo_client_lock in place. */ void fhandler_fifo::delete_client_handler (int i) { @@ -354,7 +356,8 @@ fhandler_fifo::delete_client_handler (int i) (nhandlers - i) * sizeof (fc_handler[i])); } -/* Delete handlers that we will never read from. */ +/* Delete handlers that we will never read from. Always called with + fifo_client_lock in place. */ void fhandler_fifo::cleanup_handlers () { @@ -369,6 +372,7 @@ fhandler_fifo::cleanup_handlers () } } +/* Always called with fifo_client_lock in place. */ void fhandler_fifo::record_connection (fifo_client_handler& fc, fifo_client_connect_state s) @@ -398,6 +402,7 @@ fhandler_fifo::update_my_handlers () if (!prev_proc) api_fatal ("Can't open process of previous owner, %E"); + fifo_client_lock (); for (int i = 0; i < get_shared_nhandlers (); i++) { if (add_client_handler (false) < 0) @@ -419,10 +424,12 @@ fhandler_fifo::update_my_handlers () fc.last_read = shared_fc_handler[i].last_read; } } + fifo_client_unlock (); set_prev_owner (null_fr_id); return ret; } +/* Always called with fifo_client_lock and owner_lock in place. */ int fhandler_fifo::update_shared_handlers () { @@ -435,9 +442,7 @@ fhandler_fifo::update_shared_handlers () set_shared_nhandlers (nhandlers); memcpy (shared_fc_handler, fc_handler, nhandlers * sizeof (fc_handler[0])); shared_fc_handler_updated (true); - owner_lock (); set_prev_owner (me); - owner_unlock (); return 0; } @@ -509,7 +514,6 @@ fhandler_fifo::fifo_reader_thread_func () if (update_my_handlers () < 0) debug_printf ("error updating my handlers, %E"); owner_found (); - owner_unlock (); /* Fall through to owner_listen. */ } } @@ -602,8 +606,13 @@ owner_listen: } if (ph) NtClose (ph); - if (update && update_shared_handlers () < 0) - api_fatal ("Can't update shared handlers, %E"); + if (update) + { + owner_lock (); + if (get_owner () == me && update_shared_handlers () < 0) + api_fatal ("Can't update shared handlers, %E"); + owner_unlock (); + } fifo_client_unlock (); if (cancel) goto canceled; @@ -1402,9 +1411,11 @@ fhandler_fifo::fstatvfs (struct statvfs *sfs) void fhandler_fifo::close_all_handlers () { + fifo_client_lock (); for (int i = 0; i < nhandlers; i++) fc_handler[i].close (); nhandlers = 0; + fifo_client_unlock (); } fifo_client_connect_state From 6acce025d07aa9328968351e1b718c0974e8780d Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sun, 2 Aug 2020 16:38:24 -0400 Subject: [PATCH 461/520] Cygwin: FIFO: fix timing issue with owner change fhandler_fifo::take_ownership() tacitly assumes that the current owner's fifo_reader_thread will be woken up from WFMO when update_needed_evt is signaled. But it's possible that the the current owner's fifo_reader_thread is at the beginning of its main loop rather than in its WFMO call when that event is signaled. In this case the owner will never see that the event has been signaled, and it will never update the shared fifo_client_handlers. The reader that wants to take ownership will then spin its wheels forever. Fix this by having the current owner call update_shared_handlers at the beginning of its loop, if necessary. --- winsup/cygwin/fhandler_fifo.cc | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index ee7f47c0c..7b87aab00 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -472,17 +472,34 @@ fhandler_fifo::fifo_reader_thread_func () if (pending_owner) { - if (pending_owner != me) + if (pending_owner == me) + take_ownership = true; + else if (cur_owner != me) idle = true; else - take_ownership = true; + { + /* I'm the owner but someone else wants to be. Have I + already seen and reacted to update_needed_evt? */ + if (WaitForSingleObject (update_needed_evt, 0) == WAIT_OBJECT_0) + { + /* No, I haven't. */ + fifo_client_lock (); + if (update_shared_handlers () < 0) + api_fatal ("Can't update shared handlers, %E"); + fifo_client_unlock (); + } + owner_unlock (); + /* Yield to pending owner. */ + Sleep (1); + continue; + } } else if (!cur_owner) take_ownership = true; else if (cur_owner != me) idle = true; else - /* I'm the owner. */ + /* I'm the owner and there's no pending owner. */ goto owner_listen; if (idle) { @@ -1212,7 +1229,7 @@ fhandler_fifo::take_ownership () /* Wake up my fifo_reader_thread. */ owner_needed (); if (get_owner ()) - /* Wake up owner's fifo_reader_thread. */ + /* Wake up the owner and request an update of the shared fc_handlers. */ SetEvent (update_needed_evt); owner_unlock (); /* The reader threads should now do the transfer. */ From 6ed067a0ae5c39b43c8a77433e4c8ca30f87020a Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Mon, 3 Aug 2020 09:17:06 -0400 Subject: [PATCH 462/520] Cygwin: FIFO: add a timeout to take_ownership fhandler_fifo::take_ownership() is called from select.cc::peek_fifo and fhandler_fifo::raw_read and could potentially block indefinitely if something goes wrong. This is always undesirable in peek_fifo, and it is undesirable in a nonblocking read. Fix this by adding a timeout parameter to take_ownership. Arbitrarily use a 1 ms timeout in peek_fifo and a 10 ms timeout in raw_read. These numbers may have to be tweaked based on experience. Replace the call to cygwait in take_ownership by a call to WFSO. There's no need to allow interruption now that we have a timeout. --- winsup/cygwin/fhandler.h | 2 +- winsup/cygwin/fhandler_fifo.cc | 74 +++++++++++++--------------------- winsup/cygwin/select.cc | 7 +--- 3 files changed, 30 insertions(+), 53 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 60bd27e00..5488327a2 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1487,7 +1487,7 @@ public: void fifo_client_lock () { _fifo_client_lock.lock (); } void fifo_client_unlock () { _fifo_client_lock.unlock (); } - DWORD take_ownership (); + int take_ownership (DWORD timeout = INFINITE); void reading_lock () { shmem->reading_lock (); } void reading_unlock () { shmem->reading_unlock (); } diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 7b87aab00..b8a47f27f 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -1214,16 +1214,17 @@ fhandler_fifo::raw_write (const void *ptr, size_t len) return ret; } -/* Called from raw_read and select.cc:peek_fifo. Return WAIT_OBJECT_0 - on success. */ -DWORD -fhandler_fifo::take_ownership () +/* Called from raw_read and select.cc:peek_fifo. */ +int +fhandler_fifo::take_ownership (DWORD timeout) { + int ret = 0; + owner_lock (); if (get_owner () == me) { owner_unlock (); - return WAIT_OBJECT_0; + return 0; } set_pending_owner (me); /* Wake up my fifo_reader_thread. */ @@ -1233,18 +1234,25 @@ fhandler_fifo::take_ownership () SetEvent (update_needed_evt); owner_unlock (); /* The reader threads should now do the transfer. */ - DWORD waitret = cygwait (owner_found_evt, cw_cancel | cw_sig_eintr); - owner_lock (); - if (waitret == WAIT_OBJECT_0 - && (get_owner () != me || get_pending_owner ())) + switch (WaitForSingleObject (owner_found_evt, timeout)) { - /* Something went wrong. Return WAIT_TIMEOUT, which can't be - returned by the above cygwait call. */ - set_pending_owner (null_fr_id); - waitret = WAIT_TIMEOUT; + case WAIT_OBJECT_0: + owner_lock (); + if (get_owner () != me) + { + debug_printf ("owner_found_evt signaled, but I'm not the owner"); + ret = -1; + } + owner_unlock (); + break; + case WAIT_TIMEOUT: + debug_printf ("timed out"); + ret = -1; + default: + debug_printf ("WFSO failed, %E"); + ret = -1; } - owner_unlock (); - return waitret; + return ret; } void __reg3 @@ -1255,38 +1263,12 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) while (1) { + int nconnected = 0; + /* No one else can take ownership while we hold the reading_lock. */ reading_lock (); - switch (take_ownership ()) - { - case WAIT_OBJECT_0: - break; - case WAIT_SIGNALED: - if (_my_tls.call_signal_handler ()) - { - reading_unlock (); - continue; - } - else - { - set_errno (EINTR); - reading_unlock (); - goto errout; - } - break; - case WAIT_CANCELED: - reading_unlock (); - pthread::static_cancel_self (); - break; - case WAIT_TIMEOUT: - reading_unlock (); - debug_printf ("take_ownership returned an unexpected result; retry"); - continue; - default: - reading_unlock (); - debug_printf ("unknown error while trying to take ownership, %E"); - goto errout; - } + if (take_ownership (10) < 0) + goto maybe_retry; /* Poll the connected clients for input. Make two passes. On the first pass, just try to read from the client from which @@ -1332,7 +1314,6 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) } /* Second pass. */ - int nconnected = 0; for (int i = 0; i < nhandlers; i++) if (fc_handler[i].state >= fc_closing) { @@ -1375,6 +1356,7 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) len = 0; return; } +maybe_retry: reading_unlock (); if (is_nonblocking ()) { diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 3f3f33fb5..1ba76c817 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -867,16 +867,11 @@ peek_fifo (select_record *s, bool from_select) } fh->reading_lock (); - if (fh->take_ownership () != WAIT_OBJECT_0) + if (fh->take_ownership (1) < 0) { - select_printf ("%s, unable to take ownership", fh->get_name ()); fh->reading_unlock (); - gotone += s->read_ready = true; - if (s->except_selected) - gotone += s->except_ready = true; goto out; } - fh->fifo_client_lock (); int nconnected = 0; for (int i = 0; i < fh->get_nhandlers (); i++) From 289af73a896b110580e237ecfdf044dcdc2f5066 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Mon, 3 Aug 2020 09:32:30 -0400 Subject: [PATCH 463/520] Cygwin: FIFO: reorganize some fifo_client_handler methods Rename the existing set_state() to query_and_set_state() to reflect what it really does. (It queries the O/S for the pipe state.) Add a new set_state() method, which is a standard setter, and a corresponding getter get_state(). --- winsup/cygwin/fhandler.h | 9 ++++-- winsup/cygwin/fhandler_fifo.cc | 50 +++++++++++++++++++--------------- winsup/cygwin/select.cc | 28 +++++++++++-------- 3 files changed, 50 insertions(+), 37 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 5488327a2..f64eabda4 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1297,11 +1297,14 @@ enum fifo_client_connect_state struct fifo_client_handler { HANDLE h; - fifo_client_connect_state state; + fifo_client_connect_state _state; bool last_read; /* true if our last successful read was from this client. */ - fifo_client_handler () : h (NULL), state (fc_unknown), last_read (false) {} + fifo_client_handler () : h (NULL), _state (fc_unknown), last_read (false) {} void close () { NtClose (h); } - fifo_client_connect_state set_state (); + fifo_client_connect_state get_state () const { return _state; } + void set_state (fifo_client_connect_state s) { _state = s; } + /* Query O/S. Return previous state. */ + fifo_client_connect_state query_and_set_state (); }; class fhandler_fifo; diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index b8a47f27f..c816c692a 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -340,7 +340,7 @@ fhandler_fifo::add_client_handler (bool new_pipe_instance) if (!ph) return -1; fc.h = ph; - fc.state = fc_listening; + fc.set_state (fc_listening); } fc_handler[nhandlers++] = fc; return 0; @@ -365,7 +365,7 @@ fhandler_fifo::cleanup_handlers () while (i < nhandlers) { - if (fc_handler[i].state < fc_closing) + if (fc_handler[i].get_state () < fc_closing) delete_client_handler (i); else i++; @@ -377,7 +377,7 @@ void fhandler_fifo::record_connection (fifo_client_handler& fc, fifo_client_connect_state s) { - fc.state = s; + fc.set_state (s); set_pipe_non_blocking (fc.h, true); } @@ -414,13 +414,13 @@ fhandler_fifo::update_my_handlers () { debug_printf ("Can't duplicate handle of previous owner, %E"); __seterrno (); - fc.state = fc_error; + fc.set_state (fc_error); fc.last_read = false; ret = -1; } else { - fc.state = shared_fc_handler[i].state; + fc.set_state (shared_fc_handler[i].get_state ()); fc.last_read = shared_fc_handler[i].last_read; } } @@ -614,7 +614,7 @@ owner_listen: break; default: debug_printf ("NtFsControlFile status %y after failing to connect bogus client or real client", io.Status); - fc.state = fc_unknown; + fc.set_state (fc_unknown); break; } break; @@ -1280,7 +1280,7 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) for (j = 0; j < nhandlers; j++) if (fc_handler[j].last_read) break; - if (j < nhandlers && fc_handler[j].state >= fc_closing) + if (j < nhandlers && fc_handler[j].get_state () >= fc_closing) { NTSTATUS status; IO_STATUS_BLOCK io; @@ -1303,11 +1303,11 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) case STATUS_PIPE_EMPTY: break; case STATUS_PIPE_BROKEN: - fc_handler[j].state = fc_disconnected; + fc_handler[j].set_state (fc_disconnected); break; default: debug_printf ("NtReadFile status %y", status); - fc_handler[j].state = fc_error; + fc_handler[j].set_state (fc_error); break; } fc_handler[j].last_read = false; @@ -1315,7 +1315,7 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) /* Second pass. */ for (int i = 0; i < nhandlers; i++) - if (fc_handler[i].state >= fc_closing) + if (fc_handler[i].get_state () >= fc_closing) { NTSTATUS status; IO_STATUS_BLOCK io; @@ -1339,12 +1339,12 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) case STATUS_PIPE_EMPTY: break; case STATUS_PIPE_BROKEN: - fc_handler[i].state = fc_disconnected; + fc_handler[i].set_state (fc_disconnected); nconnected--; break; default: debug_printf ("NtReadFile status %y", status); - fc_handler[i].state = fc_error; + fc_handler[i].set_state (fc_error); nconnected--; break; } @@ -1417,45 +1417,51 @@ fhandler_fifo::close_all_handlers () fifo_client_unlock (); } +/* Return previous state. */ fifo_client_connect_state -fifo_client_handler::set_state () +fifo_client_handler::query_and_set_state () { IO_STATUS_BLOCK io; FILE_PIPE_LOCAL_INFORMATION fpli; NTSTATUS status; + fifo_client_connect_state prev_state = get_state (); if (!h) - return (state = fc_unknown); + { + set_state (fc_unknown); + goto out; + } status = NtQueryInformationFile (h, &io, &fpli, sizeof (fpli), FilePipeLocalInformation); if (!NT_SUCCESS (status)) { debug_printf ("NtQueryInformationFile status %y", status); - state = fc_error; + set_state (fc_error); } else if (fpli.ReadDataAvailable > 0) - state = fc_input_avail; + set_state (fc_input_avail); else switch (fpli.NamedPipeState) { case FILE_PIPE_DISCONNECTED_STATE: - state = fc_disconnected; + set_state (fc_disconnected); break; case FILE_PIPE_LISTENING_STATE: - state = fc_listening; + set_state (fc_listening); break; case FILE_PIPE_CONNECTED_STATE: - state = fc_connected; + set_state (fc_connected); break; case FILE_PIPE_CLOSING_STATE: - state = fc_closing; + set_state (fc_closing); break; default: - state = fc_error; + set_state (fc_error); break; } - return state; +out: + return prev_state; } void diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 1ba76c817..0c94f6c45 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -875,18 +875,22 @@ peek_fifo (select_record *s, bool from_select) fh->fifo_client_lock (); int nconnected = 0; for (int i = 0; i < fh->get_nhandlers (); i++) - if (fh->get_fc_handler (i).set_state () >= fc_closing) - { - nconnected++; - if (fh->get_fc_handler (i).state == fc_input_avail) - { - select_printf ("read: %s, ready for read", fh->get_name ()); - fh->fifo_client_unlock (); - fh->reading_unlock (); - gotone += s->read_ready = true; - goto out; - } - } + { + fifo_client_handler &fc = fh->get_fc_handler (i); + fc.query_and_set_state (); + if (fc.get_state () >= fc_closing) + { + nconnected++; + if (fc.get_state () == fc_input_avail) + { + select_printf ("read: %s, ready for read", fh->get_name ()); + fh->fifo_client_unlock (); + fh->reading_unlock (); + gotone += s->read_ready = true; + goto out; + } + } + } fh->fifo_client_unlock (); if (!nconnected && fh->hit_eof ()) { From 251624a3529c3d0d3d9cdb5fbaf4c3e9b079c894 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Mon, 3 Aug 2020 09:35:00 -0400 Subject: [PATCH 464/520] Cygwin: FIFO: don't read from pipes that are closing Don't try to read from fifo_client_handlers that are in the fc_closing state. Experiments have shown that this always yields STATUS_PIPE_BROKEN, so it just wastes a Windows system call. Re-order the values in enum fifo_client_connect_state to reflect the new status of fc_closing. --- winsup/cygwin/fhandler.h | 9 +-------- winsup/cygwin/fhandler_fifo.cc | 6 +++--- winsup/cygwin/select.cc | 2 +- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index f64eabda4..40e201b0f 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1276,20 +1276,13 @@ public: #define CYGWIN_FIFO_PIPE_NAME_LEN 47 -/* We view the fc_closing state as borderline between open and closed - for a writer at the other end of a fifo_client_handler. - - We still attempt to read from the writer when the handler is in - this state, and we don't declare a reader to be at EOF if there's a - handler in this state. But the existence of a handler in this - state is not sufficient to unblock a reader trying to open. */ enum fifo_client_connect_state { fc_unknown, fc_error, fc_disconnected, - fc_listening, fc_closing, + fc_listening, fc_connected, fc_input_avail, }; diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index c816c692a..1e1140f53 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -365,7 +365,7 @@ fhandler_fifo::cleanup_handlers () while (i < nhandlers) { - if (fc_handler[i].get_state () < fc_closing) + if (fc_handler[i].get_state () < fc_connected) delete_client_handler (i); else i++; @@ -1280,7 +1280,7 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) for (j = 0; j < nhandlers; j++) if (fc_handler[j].last_read) break; - if (j < nhandlers && fc_handler[j].get_state () >= fc_closing) + if (j < nhandlers && fc_handler[j].get_state () >= fc_connected) { NTSTATUS status; IO_STATUS_BLOCK io; @@ -1315,7 +1315,7 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) /* Second pass. */ for (int i = 0; i < nhandlers; i++) - if (fc_handler[i].get_state () >= fc_closing) + if (fc_handler[i].get_state () >= fc_connected) { NTSTATUS status; IO_STATUS_BLOCK io; diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 0c94f6c45..9ee305f64 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -878,7 +878,7 @@ peek_fifo (select_record *s, bool from_select) { fifo_client_handler &fc = fh->get_fc_handler (i); fc.query_and_set_state (); - if (fc.get_state () >= fc_closing) + if (fc.get_state () >= fc_connected) { nconnected++; if (fc.get_state () == fc_input_avail) From 0fda55133a82eb70e98e636d0d00f48c674b9440 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Mon, 3 Aug 2020 09:38:08 -0400 Subject: [PATCH 465/520] Cygwin: FIFO: synchronize the fifo_reader and fifosel threads The fifo_reader thread function and the function select.cc:peek_fifo() can both change the state of a fifo_client_handler. These changes are made under fifo_client_lock, so there is no race, but the changes can still be incompatible. Add code to make sure that only one of these functions can change the state from its initial fc_listening state. Whichever function does this calls the fhandler_fifo::record_connection method, which is now public so that peek_fifo can call it. Slightly modify that method to make it suitable for being called by peek_fifo. Make a few other small changes to the fifo_reader thread function to change how it deals with the STATUS_PIPE_CLOSING value that can (rarely) be returned by NtFsControlFile. Add commentary to fhandler_fifo.cc to explain fifo_client connect states and where they can be changed. --- winsup/cygwin/fhandler.h | 4 +-- winsup/cygwin/fhandler_fifo.cc | 60 ++++++++++++++++++++++++++++++---- winsup/cygwin/select.cc | 5 ++- 3 files changed, 60 insertions(+), 9 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 40e201b0f..a577ca542 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1413,8 +1413,6 @@ class fhandler_fifo: public fhandler_base void cleanup_handlers (); void close_all_handlers (); void cancel_reader_thread (); - void record_connection (fifo_client_handler&, - fifo_client_connect_state = fc_connected); int create_shmem (bool only_open = false); int reopen_shmem (); @@ -1482,6 +1480,8 @@ public: DWORD fifo_reader_thread_func (); void fifo_client_lock () { _fifo_client_lock.lock (); } void fifo_client_unlock () { _fifo_client_lock.unlock (); } + void record_connection (fifo_client_handler&, bool = true, + fifo_client_connect_state = fc_connected); int take_ownership (DWORD timeout = INFINITE); void reading_lock () { shmem->reading_lock (); } diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 1e1140f53..2b829eb6c 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -37,11 +37,42 @@ "fifo_client_handler" structures, one for each writer. A fifo_client_handler contains the handle for the pipe server instance and information about the state of the connection with - the writer. Each writer holds the pipe instance's client handle. + the writer. Access to the list is controlled by a + "fifo_client_lock". The reader runs a "fifo_reader_thread" that creates new pipe instances as needed and listens for client connections. + The connection state of a fifo_client_handler has one of the + following values, in which order is important: + + fc_unknown + fc_error + fc_disconnected + fc_closing + fc_listening + fc_connected + fc_input_avail + + It can be changed in the following places: + + - It is set to fc_listening when the pipe instance is created. + + - It is set to fc_connected when the fifo_reader_thread detects + a connection. + + - It is set to a value reported by the O/S when + query_and_set_state is called. This can happen in + select.cc:peek_fifo and a couple other places. + + - It is set to fc_disconnected by raw_read when an attempt to + read yields STATUS_PIPE_BROKEN. + + - It is set to fc_error in various places when unexpected + things happen. + + State changes are always guarded by fifo_client_lock. + If there are multiple readers open, only one of them, called the "owner", maintains the fifo_client_handler list. The owner is therefore the only reader that can read at any given time. If a @@ -374,10 +405,11 @@ fhandler_fifo::cleanup_handlers () /* Always called with fifo_client_lock in place. */ void -fhandler_fifo::record_connection (fifo_client_handler& fc, +fhandler_fifo::record_connection (fifo_client_handler& fc, bool set, fifo_client_connect_state s) { - fc.set_state (s); + if (set) + fc.set_state (s); set_pipe_non_blocking (fc.h, true); } @@ -583,6 +615,11 @@ owner_listen: NTSTATUS status1; fifo_client_lock (); + if (fc.get_state () != fc_listening) + /* select.cc:peek_fifo has already recorded a connection. */ + ; + else + { switch (status) { case STATUS_SUCCESS: @@ -590,7 +627,12 @@ owner_listen: record_connection (fc); break; case STATUS_PIPE_CLOSING: - record_connection (fc, fc_closing); + debug_printf ("NtFsControlFile got STATUS_PIPE_CLOSING..."); + /* Maybe a writer already connected, wrote, and closed. + Just query the O/S. */ + fc.query_and_set_state (); + debug_printf ("...O/S reports state %d", fc.get_state ()); + record_connection (fc, false); break; case STATUS_THREAD_IS_TERMINATING: case STATUS_WAIT_1: @@ -610,17 +652,23 @@ owner_listen: record_connection (fc); break; case STATUS_PIPE_CLOSING: - record_connection (fc, fc_closing); + debug_printf ("got STATUS_PIPE_CLOSING when trying to connect bogus client..."); + fc.query_and_set_state (); + debug_printf ("...O/S reports state %d", fc.get_state ()); + record_connection (fc, false); break; default: debug_printf ("NtFsControlFile status %y after failing to connect bogus client or real client", io.Status); - fc.set_state (fc_unknown); + fc.set_state (fc_error); break; } break; default: + debug_printf ("NtFsControlFile got unexpected status %y", status); + fc.set_state (fc_error); break; } + } if (ph) NtClose (ph); if (update) diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 9ee305f64..43f07af43 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -877,10 +877,13 @@ peek_fifo (select_record *s, bool from_select) for (int i = 0; i < fh->get_nhandlers (); i++) { fifo_client_handler &fc = fh->get_fc_handler (i); - fc.query_and_set_state (); + fifo_client_connect_state prev_state = fc.query_and_set_state (); if (fc.get_state () >= fc_connected) { nconnected++; + if (prev_state == fc_listening) + /* The connection was not recorded by the fifo_reader_thread. */ + fh->record_connection (fc, false); if (fc.get_state () == fc_input_avail) { select_printf ("read: %s, ready for read", fh->get_name ()); From 55b93b27d67f068e435f48ea5442627b32577526 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Mon, 3 Aug 2020 09:43:36 -0400 Subject: [PATCH 466/520] Cygwin: FIFO: fix indentation --- winsup/cygwin/fhandler_fifo.cc | 96 +++++++++++++++++----------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 2b829eb6c..017d44e54 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -619,56 +619,56 @@ owner_listen: /* select.cc:peek_fifo has already recorded a connection. */ ; else - { - switch (status) { - case STATUS_SUCCESS: - case STATUS_PIPE_CONNECTED: - record_connection (fc); - break; - case STATUS_PIPE_CLOSING: - debug_printf ("NtFsControlFile got STATUS_PIPE_CLOSING..."); - /* Maybe a writer already connected, wrote, and closed. - Just query the O/S. */ - fc.query_and_set_state (); - debug_printf ("...O/S reports state %d", fc.get_state ()); - record_connection (fc, false); - break; - case STATUS_THREAD_IS_TERMINATING: - case STATUS_WAIT_1: - /* Try to connect a bogus client. Otherwise fc is still - listening, and the next connection might not get recorded. */ - status1 = open_pipe (ph); - WaitForSingleObject (conn_evt, INFINITE); - if (NT_SUCCESS (status1)) - /* Bogus cilent connected. */ - delete_client_handler (nhandlers - 1); - else - /* Did a real client connect? */ - switch (io.Status) - { - case STATUS_SUCCESS: - case STATUS_PIPE_CONNECTED: - record_connection (fc); - break; - case STATUS_PIPE_CLOSING: - debug_printf ("got STATUS_PIPE_CLOSING when trying to connect bogus client..."); - fc.query_and_set_state (); - debug_printf ("...O/S reports state %d", fc.get_state ()); - record_connection (fc, false); - break; - default: - debug_printf ("NtFsControlFile status %y after failing to connect bogus client or real client", io.Status); - fc.set_state (fc_error); - break; - } - break; - default: - debug_printf ("NtFsControlFile got unexpected status %y", status); - fc.set_state (fc_error); - break; + switch (status) + { + case STATUS_SUCCESS: + case STATUS_PIPE_CONNECTED: + record_connection (fc); + break; + case STATUS_PIPE_CLOSING: + debug_printf ("NtFsControlFile got STATUS_PIPE_CLOSING..."); + /* Maybe a writer already connected, wrote, and closed. + Just query the O/S. */ + fc.query_and_set_state (); + debug_printf ("...O/S reports state %d", fc.get_state ()); + record_connection (fc, false); + break; + case STATUS_THREAD_IS_TERMINATING: + case STATUS_WAIT_1: + /* Try to connect a bogus client. Otherwise fc is still + listening, and the next connection might not get recorded. */ + status1 = open_pipe (ph); + WaitForSingleObject (conn_evt, INFINITE); + if (NT_SUCCESS (status1)) + /* Bogus cilent connected. */ + delete_client_handler (nhandlers - 1); + else + /* Did a real client connect? */ + switch (io.Status) + { + case STATUS_SUCCESS: + case STATUS_PIPE_CONNECTED: + record_connection (fc); + break; + case STATUS_PIPE_CLOSING: + debug_printf ("got STATUS_PIPE_CLOSING when trying to connect bogus client..."); + fc.query_and_set_state (); + debug_printf ("...O/S reports state %d", fc.get_state ()); + record_connection (fc, false); + break; + default: + debug_printf ("NtFsControlFile status %y after failing to connect bogus client or real client", io.Status); + fc.set_state (fc_error); + break; + } + break; + default: + debug_printf ("NtFsControlFile got unexpected status %y", status); + fc.set_state (fc_error); + break; + } } - } if (ph) NtClose (ph); if (update) From 4f5b52ffe7e91866fea18072b69c912385397648 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Mon, 3 Aug 2020 09:44:31 -0400 Subject: [PATCH 467/520] Cygwin: FIFO: add a third pass to raw_read Currently raw_read makes two passes through the list of clients. On the first pass it tries to read from the client from which it last read successfully. On the second pass it tries to read from all connected clients. Add a new pass in between these two, in which raw_read tries to read from all clients that are in the fc_input_avail case. This should be more efficient in case select was previously called and detected input available. Slightly tweak the first pass. If a client is marked as having the last successful read but reading from it now finds no input, don't unmark it unless we successfully read from a different client on one of the later passes. --- winsup/cygwin/fhandler_fifo.cc | 66 ++++++++++++++++++++++++++++++---- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 017d44e54..a33c32b73 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -1318,17 +1318,30 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) if (take_ownership (10) < 0) goto maybe_retry; - /* Poll the connected clients for input. Make two passes. On - the first pass, just try to read from the client from which - we last read successfully. This should minimize - interleaving of writes from different clients. */ fifo_client_lock (); + /* Poll the connected clients for input. Make three passes. + + On the first pass, just try to read from the client from + which we last read successfully. This should minimize + interleaving of writes from different clients. + + On the second pass, just try to read from the clients in the + state fc_input_avail. This should be more efficient if + select has been called and detected input available. + + On the third pass, try to read from all connected clients. */ + /* First pass. */ int j; for (j = 0; j < nhandlers; j++) if (fc_handler[j].last_read) break; - if (j < nhandlers && fc_handler[j].get_state () >= fc_connected) + if (j < nhandlers && fc_handler[j].get_state () < fc_connected) + { + fc_handler[j].last_read = false; + j = nhandlers; + } + if (j < nhandlers) { NTSTATUS status; IO_STATUS_BLOCK io; @@ -1349,6 +1362,8 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) } break; case STATUS_PIPE_EMPTY: + /* Update state in case it's fc_input_avail. */ + fc_handler[j].set_state (fc_connected); break; case STATUS_PIPE_BROKEN: fc_handler[j].set_state (fc_disconnected); @@ -1358,10 +1373,47 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) fc_handler[j].set_state (fc_error); break; } - fc_handler[j].last_read = false; } /* Second pass. */ + for (int i = 0; i < nhandlers; i++) + if (fc_handler[i].get_state () == fc_input_avail) + { + NTSTATUS status; + IO_STATUS_BLOCK io; + + status = NtReadFile (fc_handler[i].h, NULL, NULL, NULL, + &io, in_ptr, len, NULL, NULL); + switch (status) + { + case STATUS_SUCCESS: + case STATUS_BUFFER_OVERFLOW: + if (io.Information > 0) + { + len = io.Information; + if (j < nhandlers) + fc_handler[j].last_read = false; + fc_handler[i].last_read = true; + fifo_client_unlock (); + reading_unlock (); + return; + } + break; + case STATUS_PIPE_EMPTY: + /* No input available after all. */ + fc_handler[i].set_state (fc_connected); + break; + case STATUS_PIPE_BROKEN: + fc_handler[i].set_state (fc_disconnected); + break; + default: + debug_printf ("NtReadFile status %y", status); + fc_handler[i].set_state (fc_error); + break; + } + } + + /* Third pass. */ for (int i = 0; i < nhandlers; i++) if (fc_handler[i].get_state () >= fc_connected) { @@ -1378,6 +1430,8 @@ fhandler_fifo::raw_read (void *in_ptr, size_t& len) if (io.Information > 0) { len = io.Information; + if (j < nhandlers) + fc_handler[j].last_read = false; fc_handler[i].last_read = true; fifo_client_unlock (); reading_unlock (); From bb166cfc3e45ceb712fb867c116b7cae4834209d Mon Sep 17 00:00:00 2001 From: Keith Packard via Newlib Date: Mon, 3 Aug 2020 10:55:03 -0700 Subject: [PATCH 468/520] libm/common: Set WANT_ERRNO based on _IEEE_LIBM value _IEEE_LIBM is the configuration value which controls whether the original libm functions modify errno. Use that in the new math code as well so that the resulting library is internally consistent. Signed-off-by: Keith Packard --- newlib/libm/common/math_config.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/newlib/libm/common/math_config.h b/newlib/libm/common/math_config.h index 1a2d0f639..3be7e6320 100644 --- a/newlib/libm/common/math_config.h +++ b/newlib/libm/common/math_config.h @@ -36,7 +36,9 @@ /* Correct special case results in non-nearest rounding modes. */ # define WANT_ROUNDING 1 #endif -#ifndef WANT_ERRNO +#ifdef _IEEE_LIBM +# define WANT_ERRNO 0 +#else /* Set errno according to ISO C with (math_errhandling & MATH_ERRNO) != 0. */ # define WANT_ERRNO 1 #endif From 45efe659b836f7e48b0671c4318c5d4ba7210504 Mon Sep 17 00:00:00 2001 From: Keith Packard via Newlib Date: Tue, 4 Aug 2020 08:04:39 -0700 Subject: [PATCH 469/520] libm: Set math_errhandling to match library and hardware [v2] math_errhandling is specified to contain two bits of information: 1. MATH_ERRNO -- Set when the library sets errno 2. MATH_ERREXCEPT -- Set when math operations report exceptions MATH_ERRNO should match whether the original math code is compiled in _IEEE_LIBM mode and the new math code has WANT_ERRNO == 1. MATH_ERREXCEPT should match whether the underlying hardware has exception support. This patch adds configurations of this value for RISC-V, ARM, Aarch64, x86 and x86_64 when using HW float. Signed-off-by: Keith Packard --- newlib/libc/include/machine/ieeefp.h | 11 +++++++++++ newlib/libc/include/math.h | 12 +++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/newlib/libc/include/machine/ieeefp.h b/newlib/libc/include/machine/ieeefp.h index aa8a1903b..b0042bbf6 100644 --- a/newlib/libc/include/machine/ieeefp.h +++ b/newlib/libc/include/machine/ieeefp.h @@ -87,6 +87,9 @@ # define __IEEE_BYTES_LITTLE_ENDIAN # endif #endif +#ifndef __SOFTFP__ +# define _SUPPORTS_ERREXCEPT +#endif #endif #if defined (__aarch64__) @@ -96,6 +99,9 @@ #define __IEEE_BIG_ENDIAN #endif #define __OBSOLETE_MATH_DEFAULT 0 +#ifdef __ARM_FP +# define _SUPPORTS_ERREXCEPT +#endif #endif #ifdef __epiphany__ @@ -189,10 +195,14 @@ #ifdef __i386__ #define __IEEE_LITTLE_ENDIAN +# define _SUPPORTS_ERREXCEPT #endif #ifdef __riscv #define __IEEE_LITTLE_ENDIAN +#ifdef __riscv_flen +# define _SUPPORTS_ERREXCEPT +#endif #endif #ifdef __i960__ @@ -386,6 +396,7 @@ #ifdef __x86_64__ #define __IEEE_LITTLE_ENDIAN +# define _SUPPORTS_ERREXCEPT #endif #ifdef __mep__ diff --git a/newlib/libc/include/math.h b/newlib/libc/include/math.h index 1efc5b92c..9fd82d9fa 100644 --- a/newlib/libc/include/math.h +++ b/newlib/libc/include/math.h @@ -188,7 +188,17 @@ extern int isnan (double); # define MATH_ERREXCEPT 2 #endif #ifndef math_errhandling -# define math_errhandling MATH_ERRNO +# ifdef _IEEE_LIBM +# define _MATH_ERRHANDLING_ERRNO 0 +# else +# define _MATH_ERRHANDLING_ERRNO MATH_ERRNO +# endif +# ifdef _SUPPORTS_ERREXCEPT +# define _MATH_ERRHANDLING_ERREXCEPT MATH_ERREXCEPT +# else +# define _MATH_ERRHANDLING_ERREXCEPT 0 +# endif +# define math_errhandling (_MATH_ERRHANDLING_ERRNO | _MATH_ERRHANDLING_ERREXCEPT) #endif extern int __isinff (float x); From 5898a044c32cf67a1fdc90c8ba48c166d2b11909 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 5 Aug 2020 21:46:53 +0200 Subject: [PATCH 470/520] Cygwin: Fix missing breaks in switch statement Two switch statements in sysconf() and fhandler_fifo::take_ownership were missing breaks. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_fifo.cc | 2 ++ winsup/cygwin/sysconf.cc | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index a33c32b73..b3c4c4a25 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -1296,9 +1296,11 @@ fhandler_fifo::take_ownership (DWORD timeout) case WAIT_TIMEOUT: debug_printf ("timed out"); ret = -1; + break; default: debug_printf ("WFSO failed, %E"); ret = -1; + break; } return ret; } diff --git a/winsup/cygwin/sysconf.cc b/winsup/cygwin/sysconf.cc index 3440c09ee..001da96ad 100644 --- a/winsup/cygwin/sysconf.cc +++ b/winsup/cygwin/sysconf.cc @@ -341,9 +341,11 @@ get_cpu_cache_intel_cpuid4 (int in) case _SC_LEVEL1_ICACHE_ASSOC: if (cur_level == 1 && cache_type == 2) return assoc; + break; case _SC_LEVEL1_ICACHE_LINESIZE: if (cur_level == 1 && cache_type == 2) return linesize; + break; case _SC_LEVEL1_DCACHE_SIZE: if (cur_level == 1 && cache_type == 1) ret += assoc * part * linesize * sets; @@ -351,9 +353,11 @@ get_cpu_cache_intel_cpuid4 (int in) case _SC_LEVEL1_DCACHE_ASSOC: if (cur_level == 1 && cache_type == 1) return assoc; + break; case _SC_LEVEL1_DCACHE_LINESIZE: if (cur_level == 1 && cache_type == 1) return linesize; + break; case _SC_LEVEL2_CACHE_SIZE: if (cur_level == 2) ret += assoc * part * linesize * sets; @@ -361,9 +365,11 @@ get_cpu_cache_intel_cpuid4 (int in) case _SC_LEVEL2_CACHE_ASSOC: if (cur_level == 2) return assoc; + break; case _SC_LEVEL2_CACHE_LINESIZE: if (cur_level == 2) return linesize; + break; case _SC_LEVEL3_CACHE_SIZE: if (cur_level == 3) ret += assoc * part * linesize * sets; @@ -371,9 +377,11 @@ get_cpu_cache_intel_cpuid4 (int in) case _SC_LEVEL3_CACHE_ASSOC: if (cur_level == 3) return assoc; + break; case _SC_LEVEL3_CACHE_LINESIZE: if (cur_level == 3) return linesize; + break; } } return ret; From 50ad1980858b1092ebdd8c3dd6ae14d72596eb4d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 5 Aug 2020 21:58:22 +0200 Subject: [PATCH 471/520] Cygwin: Add 'fallthrough' pseudo keyword for switch/case use This patch has been inspired by the Linux kernel patch 294f69e662d1 compiler_attributes.h: Add 'fallthrough' pseudo keyword for switch/case use written by Joe Perches based on an idea from Dan Carpenter . The following text is from the original log message: Reserve the pseudo keyword 'fallthrough' for the ability to convert the various case block /* fallthrough */ style comments to appear to be an actual reserved word with the same gcc case block missing fallthrough warning capability. All switch/case blocks now should end in one of: break; fallthrough; goto -Does Setup accept command-line arguments? +Does the Cygwin Setup program accept command-line arguments? -Yes, run setup-x86.exe --help or -setup-x86_64.exe --help for a list. +Yes, run the Cygwin Setup program with option +--help for an up to date list: --allow-unsupported-windows Allow old, unsupported Windows versions - -a --arch architecture to install (x86_64 or x86) + -a --arch Architecture to install (x86_64 or x86) -C --categories Specify entire categories to install - -o --delete-orphans remove orphaned packages + -o --delete-orphans Remove orphaned packages -A --disable-buggy-antivirus Disable known or suspected buggy anti virus software packages during execution. - -D --download Download from internet - -f --force-current select the current version for all packages - -h --help print help - -I --include-source Automatically include source download + -D --download Download packages from internet only + -f --force-current Select the current version for all packages + -h --help Print help + -I --include-source Automatically install source for every + package installed -i --ini-basename Use a different basename, e.g. "foo", instead of "setup" -U --keep-untrusted-keys Use untrusted keys and retain all - -L --local-install Install from local directory + -L --local-install Install packages from local directory only -l --local-package-dir Local package directory - -m --mirror-mode Skip availability check when installing from - local directory (requires local directory to - be clean mirror!) + -m --mirror-mode Skip package availability check when + installing from local directory (requires + local directory to be clean mirror!) -B --no-admin Do not check for and enforce running as Administrator -d --no-desktop Disable creation of desktop shortcut @@ -85,23 +90,29 @@ For other options, search the mailing lists with terms such as shortcuts -N --no-startmenu Disable creation of start menu shortcut -X --no-verify Don't verify setup.ini signatures - -O --only-site Ignore all sites except for -s + --no-version-check Suppress checking if a newer version of + setup is available + --old-keys Enable old cygwin.com keys + -O --only-site Do not download mirror list. Only use sites + specified with -s. -M --package-manager Semi-attended chooser-only mode -P --packages Specify packages to install -p --proxy HTTP/FTP proxy (host:port) - -Y --prune-install prune the installation to only the requested + -Y --prune-install Prune the installation to only the requested packages - -K --pubkey URL of extra public key file (gpg format) + -K --pubkey URL or absolute path of extra public key + file (RFC4880 format) -q --quiet-mode Unattended setup mode -c --remove-categories Specify categories to uninstall -x --remove-packages Specify packages to uninstall -R --root Root installation directory - -S --sexpr-pubkey Extra public key in s-expr format - -s --site Download site - -u --untrusted-keys Use untrusted keys from last-extrakeys - -g --upgrade-also also upgrade installed packages + -S --sexpr-pubkey Extra DSA public key in s-expr format + -s --site Download site URL + -u --untrusted-keys Use untrusted saved extra keys + -g --upgrade-also Also upgrade installed packages --user-agent User agent string for HTTP requests -v --verbose Verbose output + -V --version Show version -W --wait When elevating, wait for elevated child process @@ -116,15 +127,14 @@ For other options, search the mailing lists with terms such as this allows to set up the Cygwin environment so that all users can start a Cygwin shell out of the box. However, if you don't have administrator rights for your machine, and the admins don't want to install it for you, -you can install Cygwin just for yourself by downloading -setup-x86.exe (for a 32 bit install) or -setup-x86_64.exe (for a 64 bit install) and then start +you can install Cygwin just for yourself by downloading the Cygwin Setup +program, and then start it from the command line or via the "Run..." dialog from the start menu using the --no-admin option, for instance: - setup-x86.exe --no-admin + setup-x86_64.exe --no-admin @@ -151,11 +161,11 @@ now.) -Can I use Cygwin Setup to get old versions of packages (like gcc-2.95)? +Can I use the Cygwin Setup program to get old versions of packages (like gcc-2.95)? -Cygwin Setup can be used to install any packages that are on a -Cygwin mirror, which usually includes one version previous to the +The Cygwin Setup program can be used to install any packages that are on a +Cygwin mirror, which usually includes at least one version previous to the current one. The complete list may be searched at . There is no complete archive of older packages. If you have a problem with the current version of @@ -180,12 +190,12 @@ Here is how Cygwin secures the installation and update process to counter -The Cygwin website provides the setup program +The Cygwin website provides the Cygwin Setup program (setup-x86.exe or setup-x86_64.exe) using HTTPS (SSL/TLS). -This authenticates that the setup program +This authenticates that the Cygwin Setup program came from the Cygwin website -(users simply use their web browsers to download the setup program). +(users simply use their web browsers to download the Cygwin Setup program). You can use tools like Qualsys' SSL Server Test, , to check the HTTPS configuration of Cygwin. @@ -193,31 +203,32 @@ The cygwin.com site supports HTTP Strict Transport Security (HSTS), which forces the browser to keep using HTTPS once the browser has seen it before (this counters many downgrade attacks). -The setup program has the +The Cygwin Setup program has the Cygwin public key embedded in it. The Cygwin public key is protected from attacker subversion during transmission by the previous step, and this public key is then used to protect all later steps. -You can confirm that the key is in setup by looking at the setup project +You can confirm that the key is in the Cygwin Setup program by looking at the setup project () source code file cyg-pubkey.h (the key is automatically generated from file cygwin.pub). -The setup program downloads +The Cygwin Setup program downloads the package list setup.ini from a mirror and checks its digital signature. -The package list is in the file +The package list is in the files +setup.xz, setup.zst, setup.bz2 (compressed) or setup.ini (uncompressed) on the selected mirror. The package list includes for every official Cygwin package the package name, cryptographic hash, and length (in bytes). -The setup program also gets the relevant .sig +The Cygwin Setup program also gets the relevant .sig (signature) file for that package list, and checks that the package list -is properly signed with the Cygwin public key embedded in the setup program. +is properly signed with the Cygwin public key embedded in the Setup program. A mirror could corrupt the package list and/or signature, but this -would be detected by setup program's signature detection +would be detected by the Cygwin Setup program's signature detection (unless you use the -X option to disable signature checking). -The setup program also checks the package list +The Cygwin Setup program also checks the package list timestamp/version and reports to the user if the file goes backwards in time; that process detects downgrade attacks (e.g., where an attacker subverts a mirror to send a signed package list @@ -226,7 +237,7 @@ that is older than the currently-downloaded version). The packages to be installed (which may be updates) are downloaded and both their lengths and cryptographic hashes -(from the signed setup.{bz2,ini} file) are checked. +(from the signed setup.xz/.zst/.bz2/.ini file) are checked. Non-matching packages are rejected, countering any attacker's attempt to subvert the files on a mirror. Cygwin currently uses the cryptographic hash function SHA-512 @@ -250,8 +261,8 @@ widely-used SHA-2 suite of cryptographic hashes). To best secure your installation and update process, download -the setup program setup-x86.exe (32-bit) or -setup-x86_64.exe (64-bit), and then +the Cygwin Setup program setup-x86_64.exe (64-bit) or +setup-x86.exe (32-bit), and then check its signature (using a signature-checking tool you trust) using the Cygwin public key (). @@ -277,22 +288,22 @@ Not everyone will go through this additional effort, but we make it possible for those who want that extra confidence. We also provide automatic mechanisms (such as our use of HTTPS) for those with limited time and -do not want to perform the signature checking on the setup program itself. -Once the correct setup program is running, it will counter other attacks +do not want to perform the signature checking on the Cygwin Setup program itself. +Once the correct Setup program is running, it will counter other attacks as described in . -Is Cygwin Setup, or one of the packages, infected with a virus? +Is the Cygwin Setup program, or one of the packages, infected with a virus? Unlikely. Unless you can confirm it, please don't report it to the mailing list. Anti-virus products have been known to detect false positives when extracting compressed tar archives. If this causes problems for you, consider disabling your anti-virus software when -running setup. Read the next entry for a fairly safe way to do +running the Cygwin Setup program. Read the next entry for a fairly safe way to do this. @@ -304,17 +315,18 @@ this. Both Network Associates (formerly McAfee) and Norton anti-virus products have been reported to "hang" when extracting Cygwin tar archives. If this happens to you, consider disabling your anti-virus -software when running Cygwin Setup. The following procedure should be +software when running the Cygwin Setup program. The following procedure should be a fairly safe way to do that: -Download setup-x86.exe or -setup-x86_64.exe and scan it explicitly. +Download setup-x86_64.exe or +setup-x86.exe and scan it explicitly. Turn off the anti-virus software. -Run setup to download and extract all the tar files. +Run the Cygwin Setup program to download and install or upgrade +all desired packages. Re-activate your anti-virus software and scan everything @@ -324,7 +336,7 @@ disk if you are paranoid. -This should be safe, but only if Cygwin Setup is not substituted by +This should be safe, but only if the Cygwin Setup program is not substituted by something malicious. See also @@ -341,7 +353,7 @@ interfere with the normal functioning of Cygwin. What packages should I download? Where are 'make', 'gcc', 'vi', etc? -When using Cygwin Setup for the first time, the default is to install +When using the Cygwin Setup program for the first time, the default is to install a minimal subset of all available packages. If you want anything beyond that, you will have to select it explicitly. See for a searchable list of available @@ -361,53 +373,20 @@ User's Guide at Long ago, the default was to install everything, much to the irritation of most users. Now the default is to install only a basic -core of packages. Cygwin Setup is designed to make it easy to browse +core of packages. The Cygwin Setup program is designed to make it easy to browse categories and select what you want to install or omit from those -categories. It's also easy to install everything: +categories. +There are now more than 10000 Cygwin packages requiring more than 150GB +of disk space just to download and hundreds of GB more to install so you +are strongly advised not to attempt to +install everything +at once, unless you have a lot of free disk space, a very high speed network +connection, and the system will not be required for any other purpose for +many hours (or days) until installation completes. +For a 32-bit Cygwin installation, you can not install everything, as the +installation will fail because the 4GB memory available is insufficient to allow +all the DLLs required to run along with the programs using them. - -At the ``Select Packages'' screen, in ``Categories'' view, at the line -marked ``All'', click on the word ``default'' so that it changes to -``install''. (Be patient, there is some computing to do at this step. -It may take a second or two to register the change.) This tells Setup -to install everything, not just what it thinks you should have -by default. - - -Now click on the ``View'' button (twice) until you get to the -``Pending'' view. This shows exactly which packages are about to be -downloaded and installed. - - - - -This procedure only works for packages that are currently available. -There is no way to tell Cygwin Setup to install all packages by -default from now on. As new packages become available that would not -be installed by default, you have to repeat the above procedure to get -them. - -In general, a better method (in my opinion), is to: - - -First download & install all packages that would normally be -installed by default. This includes fundamental packages and any -updates to what you have already installed. Then... - - -Run Cygwin Setup again, and apply the above technique to get all -new packages that would not be installed by default. You can check -the list in the ``Pending'' view before proceeding, in case there's -something you really don't want. - - -In the latest version of Cygwin Setup, if you click the ``View'' -button (twice) more, it shows packages not currently installed. You -ought to check whether you really want to install everything! - - - - @@ -415,16 +394,16 @@ ought to check whether you really want to install everythin That depends, obviously, on what you've chosen to download and -install. A full installation today is probably larger than 1 GB +install. A full installation today is many hundreds of GB installed, not including the package archives themselves nor the source code. After installation, the package archives remain in your ``Local -Package Directory''. By default the location of -setup-x86{_64}.exe. You may conserve disk space by +Package Directory''. By default the location of the Cygwin Setup program. +You may conserve disk space by deleting the subdirectories there. These directories will have very weird looking names, being encoded with their URLs -(named ftp%3a%2f...). +(named http%3a%2f...cygwin...%2f). Of course, you can keep them around in case you want to reinstall a package. If you want to clean out only the outdated packages, Michael Chase @@ -438,42 +417,42 @@ at unsupported/clean_setup.pl in a Cygwin mirror. Detailed logs of the most recent Cygwin Setup session can be found in -/var/log/setup.log.full and less verbose information about -prior actions is in /var/log/setup.log. +/var/log/setup.log.full and less verbose information about +prior actions is in /var/log/setup.log. -What if setup fails? +What if the Cygwin Setup program fails? -First, make sure that you are using the latest version of Cygwin Setup. +First, make sure that you are using the latest version of the Cygwin Setup program. The latest version is always available from the Cygwin Home Page at . If you are downloading from the Internet, setup will fail if it cannot -download the list of mirrors at . +download the list of mirrors at . It could be that the network is too busy. Something similar could be the cause of a download site not working. Try another mirror, or try again later. -If setup refuses to download a package that you know needs to be +If the Cygwin Setup program refuses to download a package that you know needs to be upgraded, try deleting that package's entry from /etc/setup. If you are reacting quickly to an announcement on the mailing list, it could be that the mirror you are using doesn't have the latest copy yet. Try another mirror, or try again tomorrow. -If setup has otherwise behaved strangely, check the files -setup.log and setup.log.full in -/var/log (C:\cygwin\var\log by +If the Cygwin Setup program has otherwise behaved strangely, check the files +setup.log and setup.log.full in +/var/log (C:\cygwin\var\log by default). It may provide some clues as to what went wrong and why. If you're still baffled, search the Cygwin mailing list for clues. Others may have the same problem, and a solution may be posted there. If that search proves fruitless, send a query to the Cygwin mailing list. You must provide complete details in your query: version of -setup, options you selected, contents of setup.log and setup.log.full, +the Cygwin Setup program, options you selected, contents of setup.log and setup.log.full, what happened that wasn't supposed to happen, etc. @@ -542,7 +521,7 @@ getpwnam(3), disregarding HOME. How do I uninstall individual packages? -Run Cygwin Setup as you would to install packages. In the list of +Run the Cygwin Setup program as you would to install packages. In the list of packages to install, browse the relevant category or click on the ``View'' button to get a full listing. Click on the cycle glyph until the action reads ``Uninstall''. Proceed by clicking ``Next''. @@ -627,8 +606,8 @@ mount points as well. Delete the Cygwin shortcuts on the Desktop and Start Menu, and -anything left by setup-x86{_64}.exe in the download directory. However, if you -plan to reinstall Cygwin it's a good idea to keep your setup-x86{_64}.exe +anything left by the Cygwin Setup program in the download directory. However, if you +plan to reinstall Cygwin it's a good idea to keep your download directory since you can reinstall the packages left in its cache without redownloading them. @@ -659,7 +638,7 @@ have not been tested. Use them only if there i bugfix that you need to try, and you are willing to deal with any problems, or at the request of a Cygwin developer. -You cannot use Cygwin Setup to install a snapshot. +You cannot use the Cygwin Setup program to install a snapshot. First, you will need to download the snapshot from the snapshots page at . Note the directory where @@ -699,21 +678,21 @@ DLL, again, close all Cygwin processes, delete rename C:\cygwin\bin\cygwin1-prev.dll back to C:\cygwin\bin\cygwin1.dll (again assuming that your "/" is C:\cygwin). To restore the rest of the snapshot -files, reinstall the "cygwin" package using Setup. +files, reinstall the "cygwin" package using the Cygwin Setup program. -Can Cygwin Setup maintain a ``mirror''? +Can the Cygwin Setup program maintain a ``mirror''? -NO. Cygwin Setup cannot do this for you. Use a tool designed for +NO. The Cygwin Setup program cannot do this for you. Use a tool designed for this purpose. See , for utilities that can do this for you. For more information on setting up a custom Cygwin package server, see -the Cygwin Setup homepage at -. +the Cygwin Setup program page. + diff --git a/winsup/doc/faq-using.xml b/winsup/doc/faq-using.xml index c24ecf6c5..7b9bbe1c1 100644 --- a/winsup/doc/faq-using.xml +++ b/winsup/doc/faq-using.xml @@ -12,10 +12,10 @@ Well, something has gone wrong somehow... -To repair the damage, you must run Cygwin Setup again, and re-install the +To repair the damage, you must run the Cygwin Setup program again, and re-install the package which provides the missing DLL package. -If you already installed the package at one point, Cygwin Setup won't +If you already installed the package at one point, the Cygwin Setup program won't show the option to install the package by default. In the ``Select packages to install'' dialog, click on the Full/Part button. This lists all packages, even those that are already @@ -188,7 +188,7 @@ information). This is done for you in the file /etc/profile, which is sourced by bash when you start it from the Desktop or Start Menu shortcut, created by -setup.exe. The line is +the Cygwin Setup program. The line is PATH="/usr/local/bin:/usr/bin:/bin:$PATH" @@ -537,11 +537,11 @@ if you have one a single Cygwin installation, for example, if you update the Cygwin package without exiting all Cygwin apps (including services like sshd) beforehand. The only DLL that is sanctioned by the Cygwin project is the one that -you get by running setup-x86.exe or setup-x86_64.exe, +you get by running the Cygwin Setup program, installed in a directory controlled by this program. If you have other versions on your system and desire help from the cygwin project, you should delete or rename all DLLs that are not installed by -setup.exe. +the Cygwin Setup program. If you're trying to find multiple versions of the DLL that are causing this problem, reboot first, in case DLLs still loaded in memory are the @@ -882,7 +882,7 @@ this is still a problem, however.) hang when unpacking tar.gz archives. This is surely a bug in VirusScan, and should be reported to NAI. The only workaround is to disable VirusScan when accessing these files. This can be an issue during -setup, and is discussed in that FAQ entry. +Setup, and is discussed in that FAQ entry. Some users report a significant performance hit using Cygwin when their anti-virus software is enabled. Rather than disable the anti-virus @@ -1402,10 +1402,10 @@ such as virtual memory paging and file caching. Force a full rebase: Run rebase-trigger fullrebase, - exit all Cygwin programs and run Cygwin setup. + exit all Cygwin programs and run the Cygwin Setup program. - By default, Cygwin's setup program automatically performs an incremental + By default, the Cygwin Setup program automatically performs an incremental rebase of newly installed files. Forcing a full rebase causes the rebase map to be cleared before doing the rebase. @@ -1448,11 +1448,12 @@ such as virtual memory paging and file caching. They also may not provide any obvious way to keep the Cygwin packages their application uses up to date with fixes for security issues and upgrades. - The solution is simply downloading and running Cygwin Setup, - following the instructions in the Internet Setup section of + The solution is simply downloading and running the Cygwin Setup program, + following the instructions in the - Setting Up Cygwin in the Cygwin User's Guide. - Please exit from all applications before running Cygwin Setup. + Internet Setup section of ``Setting Up Cygwin'' in the + Cygwin User's Guide. + Please exit from all applications before running the Cygwin Setup program. When running Setup, you should not change most of the values presented, just select the Next button in most cases, as you already have a Cygwin release installed, and only want to upgrade your @@ -1463,7 +1464,7 @@ such as virtual memory paging and file caching. faster downloads, as shown, with more details to help you choose, on the Mirror Sites web page. - Cygwin Setup will download and apply upgrades to all packages + The Cygwin Setup program will download and apply upgrades to all packages required for Cygwin itself and installed applications. Any problems with applying updates, or the application after updates, should be reported to the project or product supplier for remedial From ed978361498b5f961b3c09643686569a43476ab6 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Tue, 25 Aug 2020 06:57:14 -0600 Subject: [PATCH 507/520] winsup/doc/faq-api.xml, -programming.xml: change Win32 to Windows/API --- winsup/doc/faq-api.xml | 10 +++++----- winsup/doc/faq-programming.xml | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/winsup/doc/faq-api.xml b/winsup/doc/faq-api.xml index 313f15d37..829e4d7fe 100644 --- a/winsup/doc/faq-api.xml +++ b/winsup/doc/faq-api.xml @@ -18,7 +18,7 @@ Windows into the C library. Then your apps should (ideally) run on POSIX systems (Unix/Linux) and Windows with no changes at the source level. The C library is in a DLL, which makes basic applications quite small. -And it allows relatively easy upgrades to the Win32/POSIX translation +And it allows relatively easy upgrades to the Windows/POSIX translation layer, providing that DLL changes stay backward-compatible. For a good overview of Cygwin, you may want to read the Cygwin @@ -140,7 +140,7 @@ spawn family of calls if possible. Here's how it works: Parent initializes a space in the Cygwin process table for child. -Parent creates child suspended using Win32 CreateProcess call, giving +Parent creates child suspended using Windows CreateProcess call, giving the same path it was invoked with itself. Parent calls setjmp to save its own context and then sets a pointer to this in the Cygwin shared memory area (shared among all Cygwin tasks). Parent fills in the child's @@ -326,7 +326,7 @@ name under the API. E.g., the POSIX select system call can wait on a standard file handles and handles to sockets. The select call in Winsock can only wait on sockets. Because of this, the Cygwin dll does a lot of nasty stuff behind -the scenes, trying to persuade various Winsock/Win32 functions to do what +the scenes, trying to persuade various Winsock/Windows functions to do what a Unix select would do. If you are porting an application which already uses Winsock, then @@ -337,11 +337,11 @@ direct calls to Winsock functions. If you use Cygwin, use the POSIX API. -I don't want Unix sockets, how do I use normal Win32 winsock? +I don't want Unix sockets, how do I use normal Windows winsock? You don't. Look for the Mingw-w64 project to port applications using -native Win32/Winsock functions. Cross compilers packages to build Mingw-w64 +native Windows API/Winsock functions. Cross compilers packages to build Mingw-w64 targets are available in the Cygwin distro. diff --git a/winsup/doc/faq-programming.xml b/winsup/doc/faq-programming.xml index 5920ca8c4..07d3a61f2 100644 --- a/winsup/doc/faq-programming.xml +++ b/winsup/doc/faq-programming.xml @@ -76,7 +76,7 @@ sizeof(void*) 4 8 8 This difference can result in interesting problems, especially when -using Win32 functions, especially when using pointers to Windows +using Windows API functions using pointers to Windows datatypes like LONG, ULONG, DWORD. Given that Windows is LLP64, all of the aforementioned types are 4 byte in size, on 32 as well as on 64 bit Windows, while `long' on 64 bit Cygwin is 8 bytes. @@ -189,10 +189,10 @@ string pointer given to printf is missing the upper 4 bytes. -Don't use C base types together with Win32 functions. +Don't use C base types together with Windows API functions. Keep in mind that DWORD, LONG, ULONG are not the same -as long and unsigned long. Try to use only Win32 datatypes in conjunction -with Win32 API function calls to avoid type problems. See the above +as long and unsigned long. Try to use only Windows datatypes in conjunction +with Windows API function calls to avoid type problems. See the above ReadFile example. Windows functions in printf calls should be treated carefully as well. This code is common for 32 bit code, but probably prints the wrong value on 64 bit: @@ -438,11 +438,11 @@ gcj --main=Hello Hello.java -How do I use Win32 API calls? +How do I use Windows API calls? Cygwin tools require that you explicitly link the import libraries -for whatever Win32 API functions that you are going to use, with the exception +for whatever Windows API functions that you are going to use, with the exception of kernel32, which is linked automatically (because the startup and/or built-in code uses it). @@ -464,7 +464,7 @@ including user32, gdi32 and comdlg32. or at least after all the object files and static libraries that reference them. -There are a few restrictions for calls to the Win32 API. +There are a few restrictions for calls to the Windows API. For details, see the User's Guide section Restricted Win32 environment, as well as the User's Guide section @@ -472,7 +472,7 @@ as well as the User's Guide section -How do I compile a Win32 executable that doesn't use Cygwin? +How do I compile a Windows executable that doesn't use Cygwin? The compilers provided by the mingw64-i686-gcc and @@ -528,7 +528,7 @@ lines must start with tabs. This is not specific to Cygwin. -Why can't we redistribute Microsoft's Win32 headers? +Why can't we redistribute Microsoft's Windows API headers? Subsection 2.d.f of the `Microsoft Open Tools License agreement' looks @@ -536,7 +536,7 @@ like it says that one may not "permit further redistribution of the Redistributables to their end users". We take this to mean that we can give them to you, but you can't give them to anyone else, which is something that we can't agree to. Fortunately, we -have our own Win32 headers which are pretty complete. +have our own Windows API headers which are pretty complete. From ed1573fc178fa1534ade5306f8bcef707ea346d0 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Tue, 25 Aug 2020 17:16:36 +0100 Subject: [PATCH 508/520] doc: Also update shebang for chapter-texi2docbook.py --- newlib/doc/chapter-texi2docbook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/doc/chapter-texi2docbook.py b/newlib/doc/chapter-texi2docbook.py index e21489b9a..1a7803091 100755 --- a/newlib/doc/chapter-texi2docbook.py +++ b/newlib/doc/chapter-texi2docbook.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # python script to convert the handwritten chapter .texi files, which include # the generated files for each function, to DocBook XML From 69a2a8db58302d4c4e72fb656a1a6347e471340e Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Thu, 27 Aug 2020 12:35:03 +0900 Subject: [PATCH 509/520] Cygwin: console: Replace WriteConsoleA() with WriteConsoleW(). - To allow sending non-ASCII chars to console, all WriteConsoleA() are replaced by WriteConsoleW(). Addresses: https://cygwin.com/pipermail/cygwin-patches/2020q3/010476.html --- winsup/cygwin/fhandler_console.cc | 89 ++++++++++++++++--------------- 1 file changed, 47 insertions(+), 42 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 02a5996a1..33e40a9f9 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -59,7 +59,7 @@ static struct fhandler_base::rabuf_t con_ra; /* Write pending buffer for ESC sequence handling in xterm compatible mode */ -static unsigned char last_char; +static wchar_t last_char; /* simple helper class to accumulate output in a buffer and send that to the console on request: */ @@ -67,18 +67,20 @@ static class write_pending_buffer { private: static const size_t WPBUF_LEN = 256u; - unsigned char buf[WPBUF_LEN]; + char buf[WPBUF_LEN]; size_t ixput; public: - inline void put (unsigned char x) + inline void put (char x) { if (ixput < WPBUF_LEN) buf[ixput++] = x; } inline void empty () { ixput = 0u; } - inline void send (HANDLE &handle, DWORD *wn = NULL) + inline void send (HANDLE &handle) { - WriteConsoleA (handle, buf, ixput, wn, 0); + wchar_t bufw[WPBUF_LEN]; + DWORD len = sys_mbstowcs (bufw, WPBUF_LEN, buf, ixput); + WriteConsoleW (handle, bufw, len, NULL, 0); } } wpbuf; @@ -291,7 +293,7 @@ fhandler_console::request_xterm_mode_input (bool req) dwMode |= ENABLE_VIRTUAL_TERMINAL_INPUT; SetConsoleMode (get_handle (), dwMode); if (con.cursor_key_app_mode) /* Restore DECCKM */ - WriteConsoleA (get_output_handle (), "\033[?1h", 5, NULL, 0); + WriteConsoleW (get_output_handle (), L"\033[?1h", 5, NULL, 0); } } else @@ -1793,6 +1795,9 @@ fhandler_console::write_console (PWCHAR buf, DWORD len, DWORD& done) if (buf[i] >= (unsigned char) '`' && buf[i] <= (unsigned char) '~') buf[i] = __vt100_conv[buf[i] - (unsigned char) '`']; + if (len > 0) + last_char = buf[len-1]; + while (len > 0) { DWORD nbytes = len > MAX_WRITE_CHARS ? MAX_WRITE_CHARS : len; @@ -2001,6 +2006,7 @@ fhandler_console::char_command (char c) { int x, y, n; char buf[40]; + wchar_t bufw[40]; int r, g, b; if (wincap.has_con_24bit_colors () && !con_is_legacy) @@ -2035,9 +2041,9 @@ fhandler_console::char_command (char c) if (wincap.has_con_esc_rep ()) /* Just send the sequence */ wpbuf.send (get_output_handle ()); - else if (last_char && last_char != '\n') + else if (last_char && last_char != L'\n') for (int i = 0; i < con.args[0]; i++) - WriteConsoleA (get_output_handle (), &last_char, 1, 0, 0); + WriteConsoleW (get_output_handle (), &last_char, 1, 0, 0); break; case 'r': /* DECSTBM */ con.scroll_region.Top = con.args[0] ? con.args[0] - 1 : 0; @@ -2058,25 +2064,25 @@ fhandler_console::char_command (char c) { /* Erase scroll down area */ n = con.args[0] ? : 1; - __small_sprintf (buf, "\033[%d;1H\033[J\033[%d;%dH", - srBottom - (n-1) - con.b.srWindow.Top + 1, - y + 1 - con.b.srWindow.Top, x + 1); - WriteConsoleA (get_output_handle (), - buf, strlen (buf), 0, 0); + __small_swprintf (bufw, L"\033[%d;1H\033[J\033[%d;%dH", + srBottom - (n-1) - con.b.srWindow.Top + 1, + y + 1 - con.b.srWindow.Top, x + 1); + WriteConsoleW (get_output_handle (), + bufw, wcslen (bufw), 0, 0); } - __small_sprintf (buf, "\033[%d;%dr", - y + 1 - con.b.srWindow.Top, - srBottom + 1 - con.b.srWindow.Top); - WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0); + __small_swprintf (bufw, L"\033[%d;%dr", + y + 1 - con.b.srWindow.Top, + srBottom + 1 - con.b.srWindow.Top); + WriteConsoleW (get_output_handle (), bufw, wcslen (bufw), 0, 0); wpbuf.put ('T'); wpbuf.send (get_output_handle ()); - __small_sprintf (buf, "\033[%d;%dr", - srTop + 1 - con.b.srWindow.Top, - srBottom + 1 - con.b.srWindow.Top); - WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0); - __small_sprintf (buf, "\033[%d;%dH", - y + 1 - con.b.srWindow.Top, x + 1); - WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0); + __small_swprintf (bufw, L"\033[%d;%dr", + srTop + 1 - con.b.srWindow.Top, + srBottom + 1 - con.b.srWindow.Top); + WriteConsoleW (get_output_handle (), bufw, wcslen (bufw), 0, 0); + __small_swprintf (bufw, L"\033[%d;%dH", + y + 1 - con.b.srWindow.Top, x + 1); + WriteConsoleW (get_output_handle (), bufw, wcslen (bufw), 0, 0); } else { @@ -2092,19 +2098,19 @@ fhandler_console::char_command (char c) cursor_get (&x, &y); if (y < srTop || y > srBottom) break; - __small_sprintf (buf, "\033[%d;%dr", - y + 1 - con.b.srWindow.Top, - srBottom + 1 - con.b.srWindow.Top); - WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0); + __small_swprintf (bufw, L"\033[%d;%dr", + y + 1 - con.b.srWindow.Top, + srBottom + 1 - con.b.srWindow.Top); + WriteConsoleW (get_output_handle (), bufw, wcslen (bufw), 0, 0); wpbuf.put ('S'); wpbuf.send (get_output_handle ()); - __small_sprintf (buf, "\033[%d;%dr", - srTop + 1 - con.b.srWindow.Top, - srBottom + 1 - con.b.srWindow.Top); - WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0); - __small_sprintf (buf, "\033[%d;%dH", - y + 1 - con.b.srWindow.Top, x + 1); - WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0); + __small_swprintf (bufw, L"\033[%d;%dr", + srTop + 1 - con.b.srWindow.Top, + srBottom + 1 - con.b.srWindow.Top); + WriteConsoleW (get_output_handle (), bufw, wcslen (bufw), 0, 0); + __small_swprintf (bufw, L"\033[%d;%dH", + y + 1 - con.b.srWindow.Top, x + 1); + WriteConsoleW (get_output_handle (), bufw, wcslen (bufw), 0, 0); } else { @@ -2838,7 +2844,6 @@ fhandler_console::write_normal (const unsigned char *src, break; default: found += ret; - last_char = *(found - 1); break; } } @@ -3056,12 +3061,12 @@ fhandler_console::write (const void *vsrc, size_t len) && srBottom == con.b.srWindow.Bottom) { /* Erase scroll down area */ - char buf[] = "\033[32768;1H\033[J\033[32768;32768"; - __small_sprintf (buf, "\033[%d;1H\033[J\033[%d;%dH", - srBottom - con.b.srWindow.Top + 1, - y + 1 - con.b.srWindow.Top, x + 1); - WriteConsoleA (get_output_handle (), - buf, strlen (buf), 0, 0); + wchar_t buf[] = L"\033[32768;1H\033[J\033[32768;32768"; + __small_swprintf (buf, L"\033[%d;1H\033[J\033[%d;%dH", + srBottom - con.b.srWindow.Top + 1, + y + 1 - con.b.srWindow.Top, x + 1); + WriteConsoleW (get_output_handle (), + buf, wcslen (buf), 0, 0); } /* Substitute "CSI Ps T" */ wpbuf.put ('['); From 573dda0cf2efa947a9c3d665abc1d94a0d600a9e Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Thu, 27 Aug 2020 01:17:09 -0600 Subject: [PATCH 510/520] winsup/doc/faq-api.xml(faq.api.timezone): explain time zone updates based on material from tz@IANA.org mailing list sources --- winsup/doc/faq-api.xml | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/winsup/doc/faq-api.xml b/winsup/doc/faq-api.xml index 829e4d7fe..6283fb663 100644 --- a/winsup/doc/faq-api.xml +++ b/winsup/doc/faq-api.xml @@ -385,13 +385,43 @@ Cygwin version number details, check out the -Why isn't timezone set correctly? +Why isn't my time (or zone) set correctly? -(Please note: This section has not yet been updated for the latest net release.) +Daylight saving (Summer time) and other time zone changes are +decided on by politicians, and announced by government officials, +sometimes with short or no notice, so time zone updates are released at +least a few, and sometimes several, times a year. +Details of changes are not known until they are announced publicly by +officials, often in foreign languages. +Those details then have to be noticed, possibly translated, passed to, +picked up, and applied by the official tzdata +source package maintainers. +That information has to be compiled, checked, and released publicly in +an update to the official tzdata source package. +Then those changes have to be picked up and applied to the Cygwin +tzdata package, which has to be updated, built, +tested, and released publicly. -Did you explicitly call tzset() before checking the value of timezone? -If not, you must do so. +Time zone settings are updates to the daylight saving (Summer +time) rules for dates of changes, hour offsets from UTC of time zones, +and the geographic regions to which those rules and offsets apply, +provided in the tzdata package included in all +Cygwin installations. +Have you run the Cygwin Setup program recently to update at least +the tzdata package? + +Are you developing applications using times which may be affected +by time zones? +Since the ctime(), localtime(), +mktime(), and strftime() functions +are required to set time zone information as if by calling +tzset(), there is no need for an explicit +tzset() call before using these functions. +However, if none of the above functions are called first, applications +should ensure tzset() is called explicitly before +using any other time functions, or checking or using time zone +information. From 49a9ffdf4bcb3388cde5e4f441dd710701136ba7 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Wed, 26 Aug 2020 18:21:20 -0400 Subject: [PATCH 511/520] Cygwin: fhandler_fifo::delete_client_handler: improve efficiency Delete a client handler by swapping it with the last one in the list instead of calling memmove. --- winsup/cygwin/fhandler_fifo.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index b3c4c4a25..75c8406fe 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -377,14 +377,14 @@ fhandler_fifo::add_client_handler (bool new_pipe_instance) return 0; } -/* Always called with fifo_client_lock in place. */ +/* Always called with fifo_client_lock in place. Delete a + client_handler by swapping it with the last one in the list. */ void fhandler_fifo::delete_client_handler (int i) { fc_handler[i].close (); if (i < --nhandlers) - memmove (fc_handler + i, fc_handler + i + 1, - (nhandlers - i) * sizeof (fc_handler[i])); + fc_handler[i] = fc_handler[nhandlers]; } /* Delete handlers that we will never read from. Always called with From 0a31ad6f4c8bf18864b0be3546b402db0a6108f7 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 27 Aug 2020 21:38:50 +0200 Subject: [PATCH 512/520] Cygwin: fix up proc_subproc flags and matching pinfo methods After patch 23a779bf3d7c2afc9eab88f6b8727c1db5544547 "Cygwin: pinfo: stop remember doing reattach", PROC_ADDCHILD actually just sets up a new child, mirroring PROC_DETACHED_CHILD. The actual attaching of the child is performed by action PROC_REATTACH_CHILD or pinfo::reattach respectively. To better reflect what's going on, rename PROC_REATTACH_CHILD to PROC_ATTACH_CHILD and rename pinfo::reattach to pinfo::attach. For better readability change PROC_ADDCHILD to PROC_ADD_CHILD. Fix comments accordingly. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fork.cc | 4 ++-- winsup/cygwin/pinfo.h | 8 ++++---- winsup/cygwin/sigproc.cc | 11 ++++++----- winsup/cygwin/sigproc.h | 4 ++-- winsup/cygwin/spawn.cc | 2 +- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 38172ca1e..43a92738c 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -509,11 +509,11 @@ frok::parent (volatile char * volatile stack_here) /* Do not attach to the child before it has successfully initialized. Otherwise we may wait forever, or deliver an orphan SIGCHILD. */ - if (!child.reattach ()) + if (!child.attach ()) { this_errno = EAGAIN; #ifdef DEBUGGING0 - error ("child reattach failed"); + error ("child attach failed"); #endif goto cleanup; } diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h index 23f308360..2db7d6a01 100644 --- a/winsup/cygwin/pinfo.h +++ b/winsup/cygwin/pinfo.h @@ -187,18 +187,18 @@ public: void preserve () { destroy = false; } void allow_remove () { destroy = true; } #ifndef SIG_BAD_MASK // kludge to ensure that sigproc.h included - // int reattach () {system_printf ("reattach is not here"); return 0;} + // int attach () {system_printf ("attach is not here"); return 0;} // int remember (bool) {system_printf ("remember is not here"); return 0;} #else - int reattach () + int attach () { - int res = proc_subproc (PROC_REATTACH_CHILD, (uintptr_t) this); + int res = proc_subproc (PROC_ATTACH_CHILD, (uintptr_t) this); destroy = res ? false : true; return res; } int remember (bool detach) { - int res = proc_subproc (detach ? PROC_DETACHED_CHILD : PROC_ADDCHILD, + int res = proc_subproc (detach ? PROC_DETACHED_CHILD : PROC_ADD_CHILD, (uintptr_t) this); destroy = res ? false : true; return res; diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index a5cf73bde..b29835ee6 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -195,7 +195,7 @@ proc_subproc (DWORD what, uintptr_t val) /* Add a new subprocess to the children arrays. * (usually called from the main thread) */ - case PROC_ADDCHILD: + case PROC_ADD_CHILD: /* Filled up process table? */ if (nprocs >= NPROCS) { @@ -217,11 +217,12 @@ proc_subproc (DWORD what, uintptr_t val) vchild->ctty = myself->ctty; vchild->cygstarted = true; vchild->process_state |= PID_INITIALIZING; - vchild->ppid = what == PROC_DETACHED_CHILD ? 1 : myself->pid; /* always set last */ + vchild->ppid = what == PROC_DETACHED_CHILD + ? 1 : myself->pid; /* always set last */ } break; - case PROC_REATTACH_CHILD: + case PROC_ATTACH_CHILD: procs[nprocs] = vchild; rc = procs[nprocs].wait (); if (rc) @@ -879,7 +880,7 @@ child_info_spawn::wait_for_myself () { postfork (myself); if (myself.remember (false)) - myself.reattach (); + myself.attach (); WaitForSingleObject (ev, INFINITE); } @@ -973,7 +974,7 @@ cygheap_exec_info::reattach_children (HANDLE parent) pinfo p (parent, children[i].p, children[i].pid); if (!p) debug_only_printf ("couldn't reattach child %d from previous process", children[i].pid); - else if (!p.reattach ()) + else if (!p.attach ()) debug_only_printf ("attach of child process %d failed", children[i].pid); else debug_only_printf ("reattached pid %d<%u>, process handle %p, rd_proc_pipe %p->%p", diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h index f8f92d350..f6702f4a3 100644 --- a/winsup/cygwin/sigproc.h +++ b/winsup/cygwin/sigproc.h @@ -30,8 +30,8 @@ enum enum procstuff { - PROC_ADDCHILD = 1, // add a new subprocess to list - PROC_REATTACH_CHILD = 2, // reattach after exec + PROC_ADD_CHILD = 1, // set up a new child + PROC_ATTACH_CHILD = 2, // attach child or reattach after exec PROC_EXEC_CLEANUP = 3, // cleanup waiting children after exec PROC_DETACHED_CHILD = 4, // set up a detached child PROC_CLEARWAIT = 5, // clear all waits - signal arrived diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 8308bccf3..1efcdb366 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -869,7 +869,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, postfork (child); if (mode == _P_DETACH ? !child.remember (true) - : !(child.remember (false) && child.reattach ())) + : !(child.remember (false) && child.attach ())) { /* FIXME: Child in strange state now */ CloseHandle (pi.hProcess); From eb3e3e47385790db463b341f47e0ca4b7b2f8dcb Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 27 Aug 2020 21:48:54 +0200 Subject: [PATCH 513/520] Cygwin: sigproc: return int from remove_proc The return value is used in a numerical context and remove_proc already returned inconsistently "true" vs. 0. Signed-off-by: Corinna Vinschen --- winsup/cygwin/sigproc.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index b29835ee6..86c0aa11b 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -63,7 +63,7 @@ HANDLE NO_COPY my_pendingsigs_evt; /* Function declarations */ static int __reg1 checkstate (waitq *); static __inline__ bool get_proc_lock (DWORD, DWORD); -static bool __stdcall remove_proc (int); +static int __stdcall remove_proc (int); static bool __stdcall stopped_or_terminated (waitq *, _pinfo *); static void WINAPI wait_sig (VOID *arg); @@ -1153,7 +1153,7 @@ out: /* Remove a proc from procs by swapping it with the last child in the list. Also releases shared memory of exited processes. */ -static bool __stdcall +static int __stdcall remove_proc (int ci) { if (have_execed) @@ -1162,7 +1162,7 @@ remove_proc (int ci) procs[ci].wait_thread->terminate_thread (); } else if (procs[ci] && procs[ci]->exists ()) - return true; + return 1; sigproc_printf ("removing procs[%d], pid %d, nprocs %d", ci, procs[ci]->pid, nprocs); From 558fa888e50e21b8bcc86c01f2a1b2e8691807df Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 27 Aug 2020 21:56:43 +0200 Subject: [PATCH 514/520] Cygwin: sigproc: drop __stdcall Nothing to gain here Signed-off-by: Corinna Vinschen --- winsup/cygwin/sigproc.cc | 20 ++++++++++---------- winsup/cygwin/sigproc.h | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 86c0aa11b..7679f76f4 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -63,8 +63,8 @@ HANDLE NO_COPY my_pendingsigs_evt; /* Function declarations */ static int __reg1 checkstate (waitq *); static __inline__ bool get_proc_lock (DWORD, DWORD); -static int __stdcall remove_proc (int); -static bool __stdcall stopped_or_terminated (waitq *, _pinfo *); +static int remove_proc (int); +static bool stopped_or_terminated (waitq *, _pinfo *); static void WINAPI wait_sig (VOID *arg); /* wait_sig bookkeeping */ @@ -87,7 +87,7 @@ public: Static pending_signals sigq; /* Functions */ -void __stdcall +void sigalloc () { cygheap->sigs = global_sigs = @@ -95,7 +95,7 @@ sigalloc () global_sigs[SIGSTOP].sa_flags = SA_RESTART | SA_NODEFER; } -void __stdcall +void signal_fixup_after_exec () { global_sigs = cygheap->sigs; @@ -137,7 +137,7 @@ get_proc_lock (DWORD what, DWORD val) return false; } -static bool __stdcall +static bool proc_can_be_signalled (_pinfo *p) { if (!(p->exitcode & EXITCODE_SET)) @@ -160,7 +160,7 @@ pid_exists (pid_t pid) } /* Return true if this is one of our children, false otherwise. */ -static inline bool __stdcall +static inline bool mychild (int pid) { for (int i = 0; i < nprocs; i++) @@ -357,7 +357,7 @@ _cygtls::remove_wq (DWORD wait) Also called by spawn_guts to disassociate any subprocesses from this process. Subprocesses will then know to clean up after themselves and will not become procs. */ -void __stdcall +void proc_terminate () { sigproc_printf ("nprocs %d", nprocs); @@ -444,7 +444,7 @@ sig_dispatch_pending (bool fast) /* Signal thread initialization. Called from dll_crt0_1. This routine starts the signal handling thread. */ -void __stdcall +void sigproc_init () { char char_sa_buf[1024]; @@ -1153,7 +1153,7 @@ out: /* Remove a proc from procs by swapping it with the last child in the list. Also releases shared memory of exited processes. */ -static int __stdcall +static int remove_proc (int ci) { if (have_execed) @@ -1188,7 +1188,7 @@ remove_proc (int ci) child is the subprocess being considered. Returns non-zero if waiting thread released. */ -static bool __stdcall +static bool stopped_or_terminated (waitq *parent_w, _pinfo *child) { int might_match; diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h index f6702f4a3..3d4e766a2 100644 --- a/winsup/cygwin/sigproc.h +++ b/winsup/cygwin/sigproc.h @@ -68,13 +68,13 @@ int __stdcall handle_sigsuspend (sigset_t); int __reg2 proc_subproc (DWORD, uintptr_t); class _pinfo; -void __stdcall proc_terminate (); -void __stdcall sigproc_init (); +void proc_terminate (); +void sigproc_init (); bool __reg1 pid_exists (pid_t); sigset_t __reg3 sig_send (_pinfo *, siginfo_t&, class _cygtls * = NULL); sigset_t __reg3 sig_send (_pinfo *, int, class _cygtls * = NULL); -void __stdcall signal_fixup_after_exec (); -void __stdcall sigalloc (); +void signal_fixup_after_exec (); +void sigalloc (); int kill_pgrp (pid_t, siginfo_t&); void __reg1 exit_thread (DWORD) __attribute__ ((noreturn)); From 163daed37ceda6cd32838ee0137026d68e8ffb18 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 28 Aug 2020 11:10:48 +0200 Subject: [PATCH 515/520] Cygwin: drop PROC_DETACHED_CHILD flag pinfo::remember with the detach parameter set to true is the only way to call proc_subproc with PROC_DETACHED_CHILD. This call is exclusively used in spawn to set up a pinfo for a detached child, and that pinfo goes out of scope right afterwards without any further action. Drop the flag and drop the detach parameter from pinfo::remember. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fork.cc | 2 +- winsup/cygwin/pinfo.h | 5 ++--- winsup/cygwin/sigproc.cc | 8 ++------ winsup/cygwin/sigproc.h | 9 ++++----- winsup/cygwin/spawn.cc | 5 ++--- 5 files changed, 11 insertions(+), 18 deletions(-) diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 43a92738c..719217856 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -415,7 +415,7 @@ frok::parent (volatile char * volatile stack_here) it in afterwards. This requires more bookkeeping than I like, though, so we'll just do it the easy way. So, terminate any child process if we can't actually record the pid in the internal table. */ - if (!child.remember (false)) + if (!child.remember ()) { this_errno = EAGAIN; #ifdef DEBUGGING0 diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h index 2db7d6a01..69c1223f3 100644 --- a/winsup/cygwin/pinfo.h +++ b/winsup/cygwin/pinfo.h @@ -196,10 +196,9 @@ public: destroy = res ? false : true; return res; } - int remember (bool detach) + int remember () { - int res = proc_subproc (detach ? PROC_DETACHED_CHILD : PROC_ADD_CHILD, - (uintptr_t) this); + int res = proc_subproc (PROC_ADD_CHILD, (uintptr_t) this); destroy = res ? false : true; return res; } diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 7679f76f4..ba1e64b33 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -205,9 +205,6 @@ proc_subproc (DWORD what, uintptr_t val) set_errno (EAGAIN); break; } - fallthrough; - - case PROC_DETACHED_CHILD: if (vchild != myself) { vchild->uid = myself->uid; @@ -217,8 +214,7 @@ proc_subproc (DWORD what, uintptr_t val) vchild->ctty = myself->ctty; vchild->cygstarted = true; vchild->process_state |= PID_INITIALIZING; - vchild->ppid = what == PROC_DETACHED_CHILD - ? 1 : myself->pid; /* always set last */ + vchild->ppid = myself->pid; /* always set last */ } break; @@ -879,7 +875,7 @@ void child_info_spawn::wait_for_myself () { postfork (myself); - if (myself.remember (false)) + if (myself.remember ()) myself.attach (); WaitForSingleObject (ev, INFINITE); } diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h index 3d4e766a2..2a3d248d1 100644 --- a/winsup/cygwin/sigproc.h +++ b/winsup/cygwin/sigproc.h @@ -33,11 +33,10 @@ enum procstuff PROC_ADD_CHILD = 1, // set up a new child PROC_ATTACH_CHILD = 2, // attach child or reattach after exec PROC_EXEC_CLEANUP = 3, // cleanup waiting children after exec - PROC_DETACHED_CHILD = 4, // set up a detached child - PROC_CLEARWAIT = 5, // clear all waits - signal arrived - PROC_WAIT = 6, // setup for wait() for subproc - PROC_EXECING = 7, // used to get a lock when execing - PROC_NOTHING = 8 // nothing, really + PROC_CLEARWAIT = 4, // clear all waits - signal arrived + PROC_WAIT = 5, // setup for wait() for subproc + PROC_EXECING = 6, // used to get a lock when execing + PROC_NOTHING = 7 // nothing, really }; struct sigpacket diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 1efcdb366..a2f7697d7 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -867,9 +867,8 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, child->start_time = time (NULL); /* Register child's starting time. */ child->nice = myself->nice; postfork (child); - if (mode == _P_DETACH - ? !child.remember (true) - : !(child.remember (false) && child.attach ())) + if (mode != _P_DETACH + && (!child.remember () || !child.attach ())) { /* FIXME: Child in strange state now */ CloseHandle (pi.hProcess); From 7c963c7ba030b9e110eefd6412eff4d6189f29e7 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 28 Aug 2020 15:22:58 +0200 Subject: [PATCH 516/520] Cygwin: sigproc: Allow more child processes per process 256 children per process is a bit tight in some scenarios. Fix this by revamping the `procs' array. Convert it to an extensible class child_procs and rename procs to chld_procs. Fix code throughout to use matching class methods rather than direct access. To allow a lot more child processes while trying to avoid allocations at DLL startup, maintain two arrays within class child_procs, one using a default size for 255 (i686) or 1023 (x86_64) children, the other, dynamically allocated on overflowing the first array, giving room for another 1023 (i686) or 4095 (x86_64) processes. On testing with a simple reproducer on a x86_64 machine with 4 Gigs RAM, a system memory overflow occured after forking about 1450 child processes, so this simple dynamic should suffice for a while. Signed-off-by: Corinna Vinschen --- winsup/cygwin/child_info.h | 2 - winsup/cygwin/sigproc.cc | 145 ++++++++++++++++++++++++------------- 2 files changed, 93 insertions(+), 54 deletions(-) diff --git a/winsup/cygwin/child_info.h b/winsup/cygwin/child_info.h index e5aa28144..505eaef23 100644 --- a/winsup/cygwin/child_info.h +++ b/winsup/cygwin/child_info.h @@ -39,8 +39,6 @@ enum child_status /* Change this value if you get a message indicating that it is out-of-sync. */ #define CURR_CHILD_INFO_MAGIC 0xecc930b9U -#define NPROCS 256 - #include "pinfo.h" struct cchildren { diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index ba1e64b33..43da97bc3 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -38,19 +38,55 @@ int __sp_ln; bool no_thread_exit_protect::flag; -char NO_COPY myself_nowait_dummy[1] = {'0'};// Flag to sig_send that signal goes to - // current process but no wait is required +/* Flag to sig_send that signal goes to current process but no wait is + required. */ +char NO_COPY myself_nowait_dummy[1] = {'0'}; #define Static static NO_COPY +/* All my children info. Avoid expensive constructor ops at DLL startup */ +class child_procs { +#ifdef __i386__ + static const int _NPROCS = 255; + static const int _NPROCS_2 = 1023; +#else + static const int _NPROCS = 1023; + static const int _NPROCS_2 = 4095; +#endif + int _count; + uint8_t _procs[(_NPROCS + 1) * sizeof (pinfo)] __attribute__ ((__aligned__)); + pinfo *_procs_2; + public: + int count () const { return _count; } + int add_one () { return ++_count; } + int del_one () { return --_count; } + int reset () { return _count = 0; } + pinfo &operator[] (int idx) + { + if (idx >= _NPROCS) + { + if (!_procs_2) + { + /* Use HeapAlloc to avoid propagating this memory area + to the child processes. */ + _procs_2 = (pinfo *) HeapAlloc (GetProcessHeap (), + HEAP_GENERATE_EXCEPTIONS + | HEAP_ZERO_MEMORY, + (_NPROCS_2 + 1) * sizeof (pinfo)); + } + return _procs_2[idx - _NPROCS]; + } + return ((pinfo *) _procs)[idx]; + } + int max_child_procs () const { return _NPROCS + _NPROCS_2; } +}; +Static child_procs chld_procs; -Static int nprocs; // Number of deceased children -Static char cprocs[(NPROCS + 1) * sizeof (pinfo)];// All my children info -#define procs ((pinfo *) cprocs) // All this just to avoid expensive - // constructor operation at DLL startup -Static waitq waitq_head; // Start of queue for wait'ing threads +/* Start of queue for waiting threads. */ +Static waitq waitq_head; -Static muto sync_proc_subproc; // Control access to subproc stuff +/* Controls access to subproc stuff. */ +Static muto sync_proc_subproc; _cygtls NO_COPY *_sig_tls; @@ -163,8 +199,8 @@ pid_exists (pid_t pid) static inline bool mychild (int pid) { - for (int i = 0; i < nprocs; i++) - if (procs[i]->pid == pid) + for (int i = 0; i < chld_procs.count (); i++) + if (chld_procs[i]->pid == pid) return true; return false; } @@ -174,6 +210,7 @@ mychild (int pid) int __reg2 proc_subproc (DWORD what, uintptr_t val) { + int slot; int rc = 1; int potential_match; int clearing; @@ -197,14 +234,15 @@ proc_subproc (DWORD what, uintptr_t val) */ case PROC_ADD_CHILD: /* Filled up process table? */ - if (nprocs >= NPROCS) + if (chld_procs.count () >= chld_procs.max_child_procs ()) { sigproc_printf ("proc table overflow: hit %d processes, pid %d\n", - nprocs, vchild->pid); + chld_procs.count (), vchild->pid); rc = 0; set_errno (EAGAIN); break; } + if (vchild != myself) { vchild->uid = myself->uid; @@ -219,13 +257,14 @@ proc_subproc (DWORD what, uintptr_t val) break; case PROC_ATTACH_CHILD: - procs[nprocs] = vchild; - rc = procs[nprocs].wait (); + slot = chld_procs.count (); + chld_procs[slot] = vchild; + rc = chld_procs[slot].wait (); if (rc) { sigproc_printf ("added pid %d to proc table, slot %d", vchild->pid, - nprocs); - nprocs++; + slot); + chld_procs.add_one (); } break; @@ -260,7 +299,7 @@ proc_subproc (DWORD what, uintptr_t val) goto scan_wait; case PROC_EXEC_CLEANUP: - while (nprocs) + while (chld_procs.count ()) remove_proc (0); for (w = &waitq_head; w->next != NULL; w = w->next) CloseHandle (w->next->ev); @@ -274,7 +313,8 @@ proc_subproc (DWORD what, uintptr_t val) if (val) sigproc_printf ("clear waiting threads"); else - sigproc_printf ("looking for processes to reap, nprocs %d", nprocs); + sigproc_printf ("looking for processes to reap, count %d", + chld_procs.count ()); clearing = val; scan_wait: @@ -312,7 +352,7 @@ proc_subproc (DWORD what, uintptr_t val) } if (global_sigs[SIGCHLD].sa_handler == (void *) SIG_IGN) - for (int i = 0; i < nprocs; i += remove_proc (i)) + for (int i = 0; i < chld_procs.count (); i += remove_proc (i)) continue; } @@ -352,35 +392,35 @@ _cygtls::remove_wq (DWORD wait) Called on process exit. Also called by spawn_guts to disassociate any subprocesses from this process. Subprocesses will then know to clean up after themselves and - will not become procs. */ + will not become chld_procs. */ void proc_terminate () { - sigproc_printf ("nprocs %d", nprocs); - if (nprocs) + sigproc_printf ("child_procs count %d", chld_procs.count ()); + if (chld_procs.count ()) { sync_proc_subproc.acquire (WPSP); proc_subproc (PROC_CLEARWAIT, 1); /* Clean out proc processes from the pid list. */ - for (int i = 0; i < nprocs; i++) + for (int i = 0; i < chld_procs.count (); i++) { /* If we've execed then the execed process will handle setting ppid to 1 iff it is a Cygwin process. */ if (!have_execed || !have_execed_cygwin) - procs[i]->ppid = 1; - if (procs[i].wait_thread) - procs[i].wait_thread->terminate_thread (); + chld_procs[i]->ppid = 1; + if (chld_procs[i].wait_thread) + chld_procs[i].wait_thread->terminate_thread (); /* Release memory associated with this process unless it is 'myself'. - 'myself' is only in the procs table when we've execed. We reach - here when the next process has finished initializing but we still - can't free the memory used by 'myself' since it is used later on - during cygwin tear down. */ - if (procs[i] != myself) - procs[i].release (); + 'myself' is only in the chld_procs table when we've execed. We + reach here when the next process has finished initializing but we + still can't free the memory used by 'myself' since it is used + later on during cygwin tear down. */ + if (chld_procs[i] != myself) + chld_procs[i].release (); } - nprocs = 0; + chld_procs.reset (); sync_proc_subproc.release (); } sigproc_printf ("leaving"); @@ -866,7 +906,8 @@ cygheap_exec_info::alloc () cygheap_exec_info *res = (cygheap_exec_info *) ccalloc_abort (HEAP_1_EXEC, 1, sizeof (cygheap_exec_info) - + (nprocs * sizeof (children[0]))); + + (chld_procs.count () + * sizeof (children[0]))); res->sigmask = _my_tls.sigmask; return res; } @@ -942,10 +983,10 @@ child_info_spawn::cleanup () inline void cygheap_exec_info::record_children () { - for (nchildren = 0; nchildren < nprocs; nchildren++) + for (nchildren = 0; nchildren < chld_procs.count (); nchildren++) { - children[nchildren].pid = procs[nchildren]->pid; - children[nchildren].p = procs[nchildren]; + children[nchildren].pid = chld_procs[nchildren]->pid; + children[nchildren].p = chld_procs[nchildren]; /* Set inheritance of required child handles for reattach_children in the about-to-be-execed process. */ children[nchildren].p.set_inheritance (true); @@ -1126,13 +1167,13 @@ checkstate (waitq *parent_w) { int potential_match = 0; - sigproc_printf ("nprocs %d", nprocs); + sigproc_printf ("child_procs count %d", chld_procs.count ()); /* Check already dead processes first to see if they match the criteria * given in w->next. */ int res; - for (int i = 0; i < nprocs; i++) - if ((res = stopped_or_terminated (parent_w, procs[i]))) + for (int i = 0; i < chld_procs.count (); i++) + if ((res = stopped_or_terminated (parent_w, chld_procs[i]))) { remove_proc (i); potential_match = 1; @@ -1140,40 +1181,40 @@ checkstate (waitq *parent_w) } sigproc_printf ("no matching terminated children found"); - potential_match = -!!nprocs; + potential_match = -!!chld_procs.count (); out: sigproc_printf ("returning %d", potential_match); return potential_match; } -/* Remove a proc from procs by swapping it with the last child in the list. +/* Remove a proc from chld_procs by swapping it with the last child in the list. Also releases shared memory of exited processes. */ static int remove_proc (int ci) { if (have_execed) { - if (_my_tls._ctinfo != procs[ci].wait_thread) - procs[ci].wait_thread->terminate_thread (); + if (_my_tls._ctinfo != chld_procs[ci].wait_thread) + chld_procs[ci].wait_thread->terminate_thread (); } - else if (procs[ci] && procs[ci]->exists ()) + else if (chld_procs[ci] && chld_procs[ci]->exists ()) return 1; - sigproc_printf ("removing procs[%d], pid %d, nprocs %d", ci, procs[ci]->pid, - nprocs); - if (procs[ci] != myself) - procs[ci].release (); - if (ci < --nprocs) + sigproc_printf ("removing chld_procs[%d], pid %d, child_procs count %d", + ci, chld_procs[ci]->pid, chld_procs.count ()); + if (chld_procs[ci] != myself) + chld_procs[ci].release (); + if (ci < chld_procs.del_one ()) { /* Wait for proc_waiter thread to make a copy of this element before moving it or it may become confused. The chances are very high that the proc_waiter thread has already done this by the time we get here. */ if (!have_execed && !exit_state) - while (!procs[nprocs].waiter_ready) + while (!chld_procs[chld_procs.count ()].waiter_ready) yield (); - procs[ci] = procs[nprocs]; + chld_procs[ci] = chld_procs[chld_procs.count ()]; } return 0; } From c8b076a23361fa9ebaec09d01253043ca2948f24 Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Thu, 27 Aug 2020 18:46:20 +0900 Subject: [PATCH 517/520] Cygwin: select: Fix a bug on closing pi->bye event. - Close event handle pi->bye only if it was created. Addresses: https://cygwin.com/pipermail/cygwin-developers/2020-August/011948.html --- winsup/cygwin/select.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 9f1a8a57a..501714fa7 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -783,8 +783,8 @@ pipe_cleanup (select_record *, select_stuff *stuff) pi->stop_thread = true; SetEvent (pi->bye); pi->thread->detach (); + CloseHandle (pi->bye); } - CloseHandle (pi->bye); delete pi; stuff->device_specific_pipe = NULL; } @@ -978,8 +978,8 @@ fifo_cleanup (select_record *, select_stuff *stuff) pi->stop_thread = true; SetEvent (pi->bye); pi->thread->detach (); + CloseHandle (pi->bye); } - CloseHandle (pi->bye); delete pi; stuff->device_specific_fifo = NULL; } @@ -1344,8 +1344,8 @@ pty_slave_cleanup (select_record *me, select_stuff *stuff) pi->stop_thread = true; SetEvent (pi->bye); pi->thread->detach (); + CloseHandle (pi->bye); } - CloseHandle (pi->bye); delete pi; stuff->device_specific_ptys = NULL; } From c6b45af544b5e48127ea24650a72a2b7b8b75c58 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 28 Aug 2020 15:40:16 +0200 Subject: [PATCH 518/520] Cygwin: sigproc: fix minor formatting issue Signed-off-by: Corinna Vinschen --- winsup/cygwin/sigproc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 43da97bc3..f46d3d0d8 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -78,7 +78,7 @@ class child_procs { } return ((pinfo *) _procs)[idx]; } - int max_child_procs () const { return _NPROCS + _NPROCS_2; } + int max_child_procs () const { return _NPROCS + _NPROCS_2; } }; Static child_procs chld_procs; From b05b0b78fa91514473b092877da0f13be5a6b2c5 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 28 Aug 2020 19:34:52 +0200 Subject: [PATCH 519/520] Cygwin: sigproc: Eliminate redundant copying of chld_procs On PROC_EXEC_CLEANUP, the pinfo's in chld_procs are removed. This is done in a loop always removing the child with index 0. This, however, results in copying the last child's pinfo in chld_procs to position 0. Do this for 100 children and you get 99 entirely useless copy operations. Fix this by calling remove_proc in reverse order. Signed-off-by: Corinna Vinschen --- winsup/cygwin/sigproc.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index f46d3d0d8..aa946fb4c 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -299,8 +299,10 @@ proc_subproc (DWORD what, uintptr_t val) goto scan_wait; case PROC_EXEC_CLEANUP: + /* Cleanup backwards to eliminate redundant copying of chld_procs + array members inside remove_proc. */ while (chld_procs.count ()) - remove_proc (0); + remove_proc (chld_procs.count () - 1); for (w = &waitq_head; w->next != NULL; w = w->next) CloseHandle (w->next->ev); break; From bf251d5a0b644f7b5165a404822d88f532593160 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 28 Aug 2020 19:38:05 +0200 Subject: [PATCH 520/520] Cygwin: sigproc: Fix a thinko in array size We need one more entry than max children in the arrays. There's no reason to do this for the static array, though. One more entry in the overflow array is sufficient. Signed-off-by: Corinna Vinschen --- winsup/cygwin/sigproc.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index aa946fb4c..2a9734f00 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -47,14 +47,14 @@ char NO_COPY myself_nowait_dummy[1] = {'0'}; /* All my children info. Avoid expensive constructor ops at DLL startup */ class child_procs { #ifdef __i386__ - static const int _NPROCS = 255; + static const int _NPROCS = 256; static const int _NPROCS_2 = 1023; #else - static const int _NPROCS = 1023; + static const int _NPROCS = 1024; static const int _NPROCS_2 = 4095; #endif int _count; - uint8_t _procs[(_NPROCS + 1) * sizeof (pinfo)] __attribute__ ((__aligned__)); + uint8_t _procs[_NPROCS * sizeof (pinfo)] __attribute__ ((__aligned__)); pinfo *_procs_2; public: int count () const { return _count; }