directory. OpenVMS couldn't open a file through symbolic link. This macro is mainly used
in test/links.c for the function call external_symlink and in src/H5F.c.
Tested the same change for 1.8 on OpenVMS.
------------------------------------------------------------------------
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
int main(void)
{
int file1, file2;
/* Create a symbolic link to the file 21b.c */
if(symlink("[LU.hdf5_1_8_2_5.test.tmp2]21b.c", "[LU.hdf5_1_8_2_5.test.tmp]sym1") < 0)
printf("symlink failed\n");
/* Create the file 21b.c */
if((file1 = open("[LU.hdf5_1_8_2_5.test.tmp2]21b.c", O_CREAT | O_TRUNC | O_RDWR)) < 0)
printf("1st open failed\n");
if(close(file1) < 0)
printf("close failed\n");
/* Open the 21b.c through the symbolic link */
if((file2 = open("[LU.hdf5_1_8_2_5.test.tmp]sym1", O_RDWR)) < 0) {
int errsv = errno;
printf("2nd open failed, errno=%d\n", errsv);
}
if(close(file2) < 0)
printf("close failed\n");
return 0;
}
Add detection for POSIX lstat() routine to configure script (mostly for
non-UNIX/Linux machines) and add macro wrapper for it.
Alphabetatize the system/library calls we test for, to make them easier
to read.
Removed the sigaction() detection & macro wrappers, since it's not
used by the distribution currently.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode