forked from Imagelibrary/rtems
Fully tested on all in-house targets
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#if !defined(RTEMS_UNIX)
|
||||
|
||||
/*
|
||||
* RTEMS "Broken" __brk/__sbrk Implementation
|
||||
*
|
||||
@@ -12,7 +14,7 @@
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
* __brk.c,v 1.2 1995/05/09 20:24:28 joel Exp
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
@@ -38,3 +40,5 @@ int __brk( const void *endds )
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
* __gettod.c,v 1.2 1995/05/09 20:24:31 joel Exp
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
@@ -19,8 +19,10 @@
|
||||
#ifdef RTEMS_NEWLIB
|
||||
#include <sys/reent.h>
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
|
||||
@@ -29,14 +31,14 @@
|
||||
*/
|
||||
|
||||
int gettimeofday(
|
||||
struct timeval *tp,
|
||||
struct timezone *tzp
|
||||
struct timeval *tp,
|
||||
struct timezone *tzp
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
rtems_clock_time_value time;
|
||||
|
||||
if ( !tp || !tzp ) {
|
||||
if ( !tp ) {
|
||||
errno = EFAULT;
|
||||
return -1;
|
||||
}
|
||||
@@ -51,34 +53,51 @@ int gettimeofday(
|
||||
tp->tv_sec = time.seconds;
|
||||
tp->tv_usec = time.microseconds;
|
||||
|
||||
#if 0
|
||||
tzp->minuteswest = timezone / 60; /* from seconds to minutes */
|
||||
tzp->dsttime = daylight;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* newlib does not have timezone and daylight savings time
|
||||
* yet. When it does this needs to be fixed.
|
||||
*/
|
||||
|
||||
tzp->tz_minuteswest = 0; /* at UTC */
|
||||
tzp->tz_dsttime = 0; /* no daylight savings */
|
||||
if ( tzp ) {
|
||||
tzp->tz_minuteswest = 0; /* at UTC */
|
||||
tzp->tz_dsttime = 0; /* no daylight savings */
|
||||
#if 0
|
||||
tzp->minuteswest = timezone / 60; /* from seconds to minutes */
|
||||
tzp->dsttime = daylight;
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* "Reentrant" versions of the above routines implemented above.
|
||||
*/
|
||||
#if defined(RTEMS_NEWLIB)
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* "Reentrant" version
|
||||
*/
|
||||
|
||||
int _gettimeofday_r(
|
||||
struct _reent *ignored_reentrancy_stuff,
|
||||
struct timeval *tp,
|
||||
struct timezone *tzp
|
||||
struct _reent *ignored_reentrancy_stuff,
|
||||
struct timeval *tp,
|
||||
struct timezone *tzp
|
||||
)
|
||||
{
|
||||
return gettimeofday( tp, tzp );
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* "System call" version
|
||||
*/
|
||||
|
||||
int _gettimeofday(
|
||||
struct timeval *tp,
|
||||
struct timezone *tzp
|
||||
)
|
||||
{
|
||||
return gettimeofday( tp, tzp );
|
||||
}
|
||||
|
||||
#endif /* defined(RTEMS_NEWLIB) */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* @(#)newlibc.c 1.8 - 95/04/25
|
||||
* @(#)newlibc.c 1.9 - 95/05/16
|
||||
*
|
||||
*/
|
||||
|
||||
#if defined(RTEMS_NEWLIB)
|
||||
|
||||
/*
|
||||
* File: $RCSfile$
|
||||
* File: newlibc.c,v
|
||||
* Project: PixelFlow
|
||||
* Created: 94/12/7
|
||||
* Revision: $Revision$
|
||||
* Last Mod: $Date$
|
||||
* Revision: 1.2
|
||||
* Last Mod: 1995/05/09 20:24:37
|
||||
*
|
||||
* COPYRIGHT (c) 1994 by Division Incorporated
|
||||
*
|
||||
@@ -35,7 +35,7 @@
|
||||
*
|
||||
* NOTE:
|
||||
*
|
||||
* $Id$
|
||||
* newlibc.c,v 1.2 1995/05/09 20:24:37 joel Exp
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user