summaryrefslogtreecommitdiffstats
path: root/gcc/libgcov.c
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-13 16:28:25 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-13 16:28:25 +0000
commit6073aca2967c8dbda36216f7f2bef87ded55e473 (patch)
tree5dcc938a73f1b1d0d9190bda9b9610df0e6e1978 /gcc/libgcov.c
parenteab6912163676d826aa1b99ba1220b7097d6c802 (diff)
downloadppe42-gcc-6073aca2967c8dbda36216f7f2bef87ded55e473.tar.gz
ppe42-gcc-6073aca2967c8dbda36216f7f2bef87ded55e473.zip
2005-07-13 H.J. Lu <hongjiu.lu@intel.com>
* config/alpha/linux.h (TARGET_HAS_F_SETLKW): Renamed to ... (TARGET_POSIX_IO): This. * config/darwin.h: Likewise. * config/freebsd.h: Likewise. * config/linux.h: Likewise. * config/lynx.h: Likewise. * config/netbsd.h: Likewise. * config/rs6000/linux64.h: Likewise. * config/rs6000/linux.h: Likewise. * config/s390/tpf.h: Likewise. * config/sh/embed-elf.h: Likewise. * config/sparc/linux64.h: Likewise. * config/sparc/linux.h: Likewise. * config/svr4.h: Likewise. * gcov-io.h: Likewise. * doc/tm.texi: Updated. * libgcov.c (create_file_directory): Defined only if TARGET_POSIX_IO is defined. (gcov_exit): Call create_file_directory only if TARGET_POSIX_IO is defined. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101973 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/libgcov.c')
-rw-r--r--gcc/libgcov.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/libgcov.c b/gcc/libgcov.c
index 09f3522537a..de44d911f01 100644
--- a/gcc/libgcov.c
+++ b/gcc/libgcov.c
@@ -91,6 +91,7 @@ static gcov_unsigned_t gcov_crc32;
/* Size of the longest file name. */
static size_t gcov_max_filename = 0;
+#ifdef TARGET_POSIX_IO
/* Make sure path component of the given FILENAME exists, create
missing directories. FILENAME must be writable.
Returns zero on success, or -1 if an error occurred. */
@@ -122,6 +123,7 @@ create_file_directory (char *filename)
};
return 0;
}
+#endif
/* Check if VERSION of the info block PTR matches libgcov one.
Return 1 on success, or zero in case of versions mismatch.
@@ -299,6 +301,7 @@ gcov_exit (void)
if (!gcov_open (gi_filename))
{
+#ifdef TARGET_POSIX_IO
/* Open failed likely due to missed directory.
Create directory and retry to open file. */
if (create_file_directory (gi_filename))
@@ -306,6 +309,7 @@ gcov_exit (void)
fprintf (stderr, "profiling:%s:Skip\n", gi_filename);
continue;
}
+#endif
if (!gcov_open (gi_filename))
{
fprintf (stderr, "profiling:%s:Cannot open\n", gi_filename);
OpenPOWER on IntegriCloud