* sysdep.c: Problem discovered during IA64 VMS port. [VMS] #include <unixio.h> to get proper prototypes. * adaint.c: Issues discovered/problems fixed during IA64 VMS port. [VMS] #define _POSIX_EXIT for proper semantics. [VMS] #include <unixio.h> for proper prototypes. [VMS] (fork): #define IA64 version. (__gnat_os_exit): Remove unnecessary VMS specific code. * 3vtrasym.adb: Minor reformatting Use terminology encoded/decoded name, rather than C++ specific notion of mangling (this is the terminology used throughout GNAT). * einfo.h: Regenerated * einfo.ads, einfo.adb: Add new flag Is_Thread_Body * exp_ch6.adb: (Expand_N_Subprogram_Body): Handle expansion of thread body procedure * par-prag.adb: Add dummy entry for Thread_Body pragma * rtsfind.ads: Add entries for System.Threads entities for thread body processing * sem_attr.adb: (Analyze_Pragma, Access attributes): Check these are not applied to a thread body, since this is not permitted * sem_prag.adb: Add processing for Thread_Body pragma. Minor comment fix. * sem_res.adb: (Resolve_Call): Check for incorrect attempt to call a thread body procedure with a direct call. * snames.ads, snames.adb: Add entry for Thread_Body pragma Add names associated with thread body expansion * snames.h: Add entry for Thread_Body pragma * s-thread.adb: Add entries for thread body processing These are dummy bodies so far * s-thread.ads: Add documentation on thread body handling. Add entries for thread body processing. * sem_ch10.adb: (Build_Limited_Views): Return after posting an error in case of limited with_clause on subprograms, generics, instances or generic renamings (Install_Limited_Withed_Unit): Do nothing in case of limited with_clause on subprograms, generics, instances or generic renamings * raise.c (setup_to_install): Correct mistake in last revision; two arguments out of order. * trans.c, cuintp.c, argv.c, aux-io.c, cal.c, errno.c, exit.c, gnatbl.c, init.c, stringt.h, utils.c, utils2.c: Update copyright notice, missed in previous change. Remove trailing blanks and other style errors introduced in previous change. * decl.c (gnat_to_gnu_field): Adjust the conditions under which we get rid of the wrapper for a LJM type, ensuring we don't do that if the field is addressable. This avoids potential low level type view mismatches later on, for instance in a by-reference argument passing process. * decl.c (gnat_to_gnu_field): No longer check for BLKmode being aligned at byte boundary. * decl.c (components_to_record): Do not delete the empty variants from the end of the union type. * exp_ch4.adb (Expand_N_Op_Eq): Use base type when locating primitive operation for a derived type, an explicit declaration may use a local subtype of Boolean. * make.adb (Gnatmake): Allow main sources on the command line with a library project when it is only for compilation (no binding or linking). Part of PR ada/12806: * ada-tree.h (TYPE_DIGITS_VALUE, SET_TYPE_DIGITS_VALUE): Save count as tree, not integer. * decl.c: (gnat_to_gnu_entity, case E_Floating_Point_Type): Save count as tree, not integer. * targtyps.c, decl.c, misc.c, gigi.h (fp_prec_to_size, fp_size_to_prec): Temporary routines to work around change in FP sizing semantics in GCC. * utils.c: (build_vms_descriptor): TYPE_DIGITS_VALUE is tree, not integer. * gigi.h: (enumerate_modes): New function. * Make-lang.in: (ada/misc.o): Add real.h. * misc.c: (enumerate_modes): New function. From-SVN: r73250
101 lines
3.8 KiB
C
101 lines
3.8 KiB
C
/****************************************************************************
|
|
* *
|
|
* GNAT COMPILER COMPONENTS *
|
|
* *
|
|
* C A L *
|
|
* *
|
|
* C Implementation File *
|
|
* *
|
|
* Copyright (C) 1992-2003, Free Software Foundation, Inc. *
|
|
* *
|
|
* GNAT is free software; you can redistribute it and/or modify it under *
|
|
* terms of the GNU General Public License as published by the Free Soft- *
|
|
* ware Foundation; either version 2, or (at your option) any later ver- *
|
|
* sion. GNAT is distributed in the hope that it will be useful, but WITH- *
|
|
* OUT 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 distributed with GNAT; see file COPYING. If not, write *
|
|
* to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, *
|
|
* MA 02111-1307, USA. *
|
|
* *
|
|
* As a special exception, if you link this file with other files to *
|
|
* produce an executable, this file does not by itself cause the resulting *
|
|
* executable to be covered by the GNU General Public License. This except- *
|
|
* ion does not however invalidate any other reasons why the executable *
|
|
* file might be covered by the GNU Public License. *
|
|
* *
|
|
* GNAT was originally developed by the GNAT team at New York University. *
|
|
* Extensive contributions were provided by Ada Core Technologies Inc. *
|
|
* *
|
|
****************************************************************************/
|
|
|
|
/* This file contains those routines named by Import pragmas in package */
|
|
/* GNAT.Calendar. It is used to to Duration to timeval convertion. */
|
|
/* These are simple wrappers function to abstarct the fact that the C */
|
|
/* struct timeval fields type are not normalized (they are generaly */
|
|
/* defined as int or long values). */
|
|
|
|
#if defined(VMS)
|
|
|
|
/* this is temporary code to avoid build failure under VMS */
|
|
|
|
void
|
|
__gnat_timeval_to_duration (void *t, long *sec, long *usec)
|
|
{
|
|
}
|
|
|
|
void
|
|
__gnat_duration_to_timeval (long sec, long usec, void *t)
|
|
{
|
|
}
|
|
|
|
#else
|
|
|
|
#if defined (__vxworks)
|
|
#include <sys/times.h>
|
|
#else
|
|
#include <sys/time.h>
|
|
#endif
|
|
|
|
#ifdef __MINGW32__
|
|
#include "mingw32.h"
|
|
#if STD_MINGW
|
|
#include <winsock.h>
|
|
#endif
|
|
#endif
|
|
|
|
void
|
|
__gnat_timeval_to_duration (struct timeval *t, long *sec, long *usec)
|
|
{
|
|
*sec = (long) t->tv_sec;
|
|
*usec = (long) t->tv_usec;
|
|
}
|
|
|
|
void
|
|
__gnat_duration_to_timeval (long sec, long usec, struct timeval *t)
|
|
{
|
|
/* here we are doing implicit convertion from a long to the struct timeval
|
|
fields types. */
|
|
|
|
t->tv_sec = sec;
|
|
t->tv_usec = usec;
|
|
}
|
|
#endif
|
|
|
|
#ifdef __alpha_vxworks
|
|
#include "vxWorks.h"
|
|
#elif defined (__vxworks)
|
|
#include <types/vxTypesOld.h>
|
|
#endif
|
|
|
|
/* Return the value of the "time" C library function. We always return
|
|
a long and do it this way to avoid problems with not knowing
|
|
what time_t is on the target. */
|
|
|
|
long
|
|
gnat_time (void)
|
|
{
|
|
return time (0);
|
|
}
|