Source
573
573
HDstrcat(_fname,";*");
574
574
/* Do not use HDremove; function becomes recursive (see H5private.h file)*/
575
575
remove(_fname);
576
576
H5MM_xfree(_fname);
577
577
ret_value = 0;
578
578
}
579
579
return ret_value;
580
580
}
581
581
#endif
582
582
583
+
/*-------------------------------------------------------------------------
584
+
* Function: HDgettimeofday
585
+
*
586
+
* Purpose: Wrapper function for gettimeofday on Windows systems
587
+
*
588
+
* This function can get the time as well as a timezone
589
+
*
590
+
* Return: 0
591
+
*
592
+
* This implementation is taken from the Cygwin source distribution at
593
+
* src/winsup/mingw/mingwex/gettimeofday.c
594
+
*
595
+
* The original source code was contributed by
596
+
* Danny Smith <dannysmith@users.sourceforge.net>
597
+
* and released in the public domain.
598
+
*
599
+
* Programmer: Scott Wegner
600
+
* May 19, 2009
601
+
*
602
+
*-------------------------------------------------------------------------
603
+
*/
604
+
#if !defined(H5_HAVE_GETTIMEOFDAY) && defined(_WIN32)
605
+
606
+
/* Offset between 1/1/1601 and 1/1/1970 in 100 nanosec units */
607
+
#define _W32_FT_OFFSET (116444736000000000ULL)
608
+
609
+
int
610
+
HDgettimeofday(struct timeval *tv, void *tz)
611
+
{
612
+
union {
613
+
unsigned long long ns100; /*time since 1 Jan 1601 in 100ns units */
614
+
FILETIME ft;
615
+
} _now;
616
+
617
+
if(tv)
618
+
{
619
+
GetSystemTimeAsFileTime (&_now.ft);
620
+
tv->tv_usec=(long)((_now.ns100 / 10ULL) % 1000000ULL );
621
+
tv->tv_sec= (long)((_now.ns100 - _W32_FT_OFFSET) / 10000000ULL);
622
+
}
623
+
/* Always return 0 as per Open Group Base Specifications Issue 6.
624
+
Do not set errno on error. */
625
+
return 0;
626
+
}
627
+
#endif
628
+
583
629
•
584
630
/*
585
631
*-------------------------------------------------------------------------
586
632
*
587
633
* Function: H5_build_extpath
588
634
*
589
635
* Purpose: To build the path for later searching of target file for external link.
590
636
* This path can be either:
591
637
* 1. The absolute path of NAME
592
638
* or