comparison gcc/ada/sysdep.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
4 * * 4 * *
5 * S Y S D E P * 5 * S Y S D E P *
6 * * 6 * *
7 * C Implementation File * 7 * C Implementation File *
8 * * 8 * *
9 * Copyright (C) 1992-2017, Free Software Foundation, Inc. * 9 * Copyright (C) 1992-2018, Free Software Foundation, Inc. *
10 * * 10 * *
11 * GNAT is free software; you can redistribute it and/or modify it under * 11 * GNAT is free software; you can redistribute it and/or modify it under *
12 * terms of the GNU General Public License as published by the Free Soft- * 12 * terms of the GNU General Public License as published by the Free Soft- *
13 * ware Foundation; either version 3, or (at your option) any later ver- * 13 * ware Foundation; either version 3, or (at your option) any later ver- *
14 * sion. GNAT is distributed in the hope that it will be useful, but WITH- * 14 * sion. GNAT is distributed in the hope that it will be useful, but WITH- *
315 #if defined (__linux__) || defined (__sun__) \ 315 #if defined (__linux__) || defined (__sun__) \
316 || defined (WINNT) \ 316 || defined (WINNT) \
317 || defined (__MACHTEN__) || defined (__hpux__) || defined (_AIX) \ 317 || defined (__MACHTEN__) || defined (__hpux__) || defined (_AIX) \
318 || (defined (__svr4__) && defined (__i386__)) || defined (__Lynx__) \ 318 || (defined (__svr4__) && defined (__i386__)) || defined (__Lynx__) \
319 || defined (__CYGWIN__) || defined (__FreeBSD__) || defined (__OpenBSD__) \ 319 || defined (__CYGWIN__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
320 || defined (__GLIBC__) || defined (__APPLE__) || defined (__DragonFly__) 320 || defined (__GLIBC__) || defined (__APPLE__) || defined (__DragonFly__) \
321 || defined (__QNX__)
321 322
322 # ifdef __MINGW32__ 323 # ifdef __MINGW32__
323 # if OLD_MINGW 324 # if OLD_MINGW
324 # include <termios.h> 325 # include <termios.h>
325 # else 326 # else
367 { 368 {
368 #if defined (__linux__) || defined (__sun__) \ 369 #if defined (__linux__) || defined (__sun__) \
369 || defined (__CYGWIN32__) || defined (__MACHTEN__) || defined (__hpux__) \ 370 || defined (__CYGWIN32__) || defined (__MACHTEN__) || defined (__hpux__) \
370 || defined (_AIX) || (defined (__svr4__) && defined (__i386__)) \ 371 || defined (_AIX) || (defined (__svr4__) && defined (__i386__)) \
371 || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \ 372 || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
372 || defined (__GLIBC__) || defined (__APPLE__) || defined (__DragonFly__) 373 || defined (__GLIBC__) || defined (__APPLE__) || defined (__DragonFly__) \
374 || defined (__QNX__)
373 char c; 375 char c;
374 int nread; 376 int nread;
375 int good_one = 0; 377 int good_one = 0;
376 int eof_ch = 4; /* Ctrl-D */ 378 int eof_ch = 4; /* Ctrl-D */
377 int fd = fileno (stream); 379 int fd = fileno (stream);
387 389
388 #if defined (__linux__) || defined (__sun__) \ 390 #if defined (__linux__) || defined (__sun__) \
389 || defined (__MACHTEN__) || defined (__hpux__) \ 391 || defined (__MACHTEN__) || defined (__hpux__) \
390 || defined (_AIX) || (defined (__svr4__) && defined (__i386__)) \ 392 || defined (_AIX) || (defined (__svr4__) && defined (__i386__)) \
391 || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \ 393 || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
392 || defined (__GLIBC__) || defined (__APPLE__) || defined (__DragonFly__) 394 || defined (__GLIBC__) || defined (__APPLE__) || defined (__DragonFly__) \
395 || defined (__QNX__)
393 eof_ch = termios_rec.c_cc[VEOF]; 396 eof_ch = termios_rec.c_cc[VEOF];
394 397
395 /* If waiting (i.e. Get_Immediate (Char)), set MIN = 1 and wait for 398 /* If waiting (i.e. Get_Immediate (Char)), set MIN = 1 and wait for
396 a character forever. This doesn't seem to effect Ctrl-Z or 399 a character forever. This doesn't seem to effect Ctrl-Z or
397 Ctrl-C processing. 400 Ctrl-C processing.
824 /* Darwin, Free BSD, Linux, where component tm_gmtoff is present in 827 /* Darwin, Free BSD, Linux, where component tm_gmtoff is present in
825 struct tm */ 828 struct tm */
826 829
827 #elif defined (__APPLE__) || defined (__FreeBSD__) || defined (__linux__) \ 830 #elif defined (__APPLE__) || defined (__FreeBSD__) || defined (__linux__) \
828 || defined (__GLIBC__) || defined (__DragonFly__) || defined (__OpenBSD__) \ 831 || defined (__GLIBC__) || defined (__DragonFly__) || defined (__OpenBSD__) \
829 || defined (__DJGPP__) 832 || defined (__DJGPP__) || defined (__QNX__)
830 { 833 {
831 localtime_r (timer, &tp); 834 localtime_r (timer, &tp);
832 *off = tp.tm_gmtoff; 835 *off = tp.tm_gmtoff;
833 } 836 }
834 837
1044 _getpagesize (void) 1047 _getpagesize (void)
1045 { 1048 {
1046 return getpagesize (); 1049 return getpagesize ();
1047 } 1050 }
1048 #endif 1051 #endif
1052
1053 int
1054 __gnat_name_case_equivalence ()
1055 {
1056 /* the values here must be synchronized with Ada.Directories.Name_Case_Kind:
1057
1058 Unknown = 0
1059 Case_Sensitive = 1
1060 Case_Insensitive = 2
1061 Case_Preserving = 3 */
1062
1063 #if defined (__APPLE__) || defined (WIN32)
1064 return 3;
1065 #else
1066 return 1;
1067 #endif
1068 }
1069