* Makefile.am:

remove m4 libtool installed files during the
	maintainer-clean rule
	* src/lib/evil_stdio.c:
	* src/lib/evil_stdio.h:
	add the remove() function



SVN revision: 44577
This commit is contained in:
Vincent Torri 2009-12-19 19:08:28 +00:00
parent bca91fb4c2
commit 8e9e67f075
4 changed files with 41 additions and 1 deletions

View File

@ -1,3 +1,13 @@
2009-12-19 Vincent Torri <doursse at users dot sf dot net>
* Makefile.am:
remove m4 libtool installed files during the
maintainer-clean rule
* src/lib/evil_stdio.c:
* src/lib/evil_stdio.h:
add the remove() function
2009-12-11 Vincent Torri <doursse at users dot sf dot net>
* configure.ac:

View File

@ -15,7 +15,12 @@ ltmain.sh \
Makefile.in \
missing \
mkinstalldirs \
$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)*
$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)* \
m4/libtool.m4 \
m4/lt~obsolete.m4 \
m4/ltoptions.m4 \
m4/ltsugar.m4 \
m4/ltversion.m4
SUBDIRS = src doc

View File

@ -77,6 +77,27 @@ void evil_rewind(FILE *stream)
fseek(stream, 0, SEEK_SET);
}
int evil_remove(const char *path)
{
struct stat st;
if (stat(path, &st) < 0) return -1;
if (S_ISDIR(st.st_mode))
{
if (rmdir(path) < 0) return -1;
return 0;
}
if (S_ISREG(st.st_mode))
{
if (unlink(path) < 0) return -1;
return 0;
}
return -1;
}
#endif /* _WIN32_WCE && ! __CEGCC__ */

View File

@ -35,6 +35,10 @@ EAPI void evil_rewind(FILE *stream);
# define rewind(f) evil_rewind(f)
EAPI int evil_remove(const char *path);
# define remove(p) evil_remove(p)
#endif /* _WIN32_WCE && ! __CEGCC__ */