Added an EXV_ prefix to precompiler defines (still not to all yet - I don't like the idea of "exv_size_t" or "exv_const" - but hopefully to those more likely to create conflicts). Fixes bug #420
This commit is contained in:
parent
0f6c5e5889
commit
59e1a6f29f
@ -134,7 +134,7 @@ ifeq ($(strip $(MAKECMDGOALS)),)
|
||||
else
|
||||
# ...or the target is _not_ one in the list of targets below.
|
||||
NOINCLUDE = uninstall uninstall-lib check doc ctags mostlyclean clean \
|
||||
install-header uninstall-header distclean maintainer-clean
|
||||
install-header uninstall-header distclean maintainer-clean exv_conf.h
|
||||
ifneq ($(MAKECMDGOALS), $(filter $(MAKECMDGOALS), $(NOINCLUDE)))
|
||||
-include $(DEP)
|
||||
endif
|
||||
@ -175,8 +175,11 @@ $(sort $(BINOBJ) $(EXIV2OBJ) $(MCOBJ) mn.o): %.o: %.cpp
|
||||
types.hpp: exv_conf.h
|
||||
actions.cpp exiv2.cpp image.cpp utils.cpp: exv_conf.h
|
||||
|
||||
#exv_conf.h: $(top_srcdir)/config/config.h
|
||||
# cp -f $(top_srcdir)/config/config.h exv_conf.h
|
||||
|
||||
exv_conf.h: $(top_srcdir)/config/config.h
|
||||
cp -f $(top_srcdir)/config/config.h exv_conf.h
|
||||
sed 's/#define \([A-Z]\)/#define EXV_\1/; s/#undef \([A-Z]\)/#undef EXV_\1/' < $< > $@
|
||||
|
||||
mn.cpp: ./mn.sh
|
||||
./mn.sh
|
||||
|
||||
@ -44,7 +44,7 @@ EXIV2_RCSID("@(#) $Id$");
|
||||
#include "exif.hpp"
|
||||
#include "canonmn.hpp"
|
||||
#include "iptc.hpp"
|
||||
#ifndef HAVE_TIMEGM
|
||||
#ifndef EXV_HAVE_TIMEGM
|
||||
# include "timegm.h"
|
||||
#endif
|
||||
|
||||
@ -61,7 +61,7 @@ EXIV2_RCSID("@(#) $Id$");
|
||||
#include <cassert>
|
||||
#include <sys/types.h> // for stat()
|
||||
#include <sys/stat.h> // for stat()
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#ifdef EXV_HAVE_UNISTD_H
|
||||
# include <unistd.h> // for stat()
|
||||
#endif
|
||||
|
||||
@ -723,7 +723,7 @@ namespace Action {
|
||||
return 1;
|
||||
}
|
||||
std::string newPath
|
||||
= Util::dirname(path) + SEPERATOR_STR + basename + Util::suffix(path);
|
||||
= Util::dirname(path) + EXV_SEPERATOR_STR + basename + Util::suffix(path);
|
||||
if ( Util::dirname(newPath) == Util::dirname(path)
|
||||
&& Util::basename(newPath) == Util::basename(path)) {
|
||||
if (Params::instance().verbose_) {
|
||||
@ -880,7 +880,7 @@ namespace Action {
|
||||
if (Params::instance().target_ & ~Params::ctThumb) {
|
||||
std::string directory = Params::instance().directory_;
|
||||
if (directory.empty()) directory = Util::dirname(path_);
|
||||
std::string exvPath = directory + SEPERATOR_STR
|
||||
std::string exvPath = directory + EXV_SEPERATOR_STR
|
||||
+ Util::basename(path_, true) + ".exv";
|
||||
if (!Params::instance().force_ && Util::fileExists(exvPath)) {
|
||||
std::cout << Params::instance().progname()
|
||||
@ -927,7 +927,7 @@ namespace Action {
|
||||
|
||||
std::string directory = Params::instance().directory_;
|
||||
if (directory.empty()) directory = Util::dirname(path_);
|
||||
std::string thumb = directory + SEPERATOR_STR
|
||||
std::string thumb = directory + EXV_SEPERATOR_STR
|
||||
+ Util::basename(path_, true) + "-thumb";
|
||||
std::string thumbExt = exifData.thumbnailExtension();
|
||||
if (thumbExt.empty()) {
|
||||
@ -983,7 +983,7 @@ namespace Action {
|
||||
|| Params::instance().target_ & Params::ctComment) {
|
||||
std::string directory = Params::instance().directory_;
|
||||
if (directory.empty()) directory = Util::dirname(path);
|
||||
std::string exvPath = directory + SEPERATOR_STR
|
||||
std::string exvPath = directory + EXV_SEPERATOR_STR
|
||||
+ Util::basename(path, true) + ".exv";
|
||||
rc = metacopy(exvPath, path, true);
|
||||
}
|
||||
@ -1000,7 +1000,7 @@ namespace Action {
|
||||
{
|
||||
std::string directory = Params::instance().directory_;
|
||||
if (directory.empty()) directory = Util::dirname(path);
|
||||
std::string thumbPath = directory + SEPERATOR_STR
|
||||
std::string thumbPath = directory + EXV_SEPERATOR_STR
|
||||
+ Util::basename(path, true) + "-thumb.jpg";
|
||||
if (!Util::fileExists(thumbPath, true)) {
|
||||
std::cerr << thumbPath
|
||||
|
||||
@ -40,10 +40,10 @@ EXIV2_RCSID("@(#) $Id$");
|
||||
#include <cassert>
|
||||
#include <sys/types.h> // for stat()
|
||||
#include <sys/stat.h> // for stat()
|
||||
#ifdef HAVE_PROCESS_H
|
||||
#ifdef EXV_HAVE_PROCESS_H
|
||||
# include <process.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#ifdef EXV_HAVE_UNISTD_H
|
||||
# include <unistd.h> // for getpid, stat
|
||||
#endif
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ EXIV2_RCSID("@(#) $Id$");
|
||||
#include <cstdio>
|
||||
#include <sys/types.h> // for stat()
|
||||
#include <sys/stat.h> // for stat()
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#ifdef EXV_HAVE_UNISTD_H
|
||||
# include <unistd.h> // for stat()
|
||||
#endif
|
||||
|
||||
|
||||
@ -159,7 +159,7 @@ Params& Params::instance()
|
||||
|
||||
void Params::version(std::ostream& os) const
|
||||
{
|
||||
os << PACKAGE_STRING << ", "
|
||||
os << EXV_PACKAGE_STRING << ", "
|
||||
<< "Copyright (C) 2004, 2005 Andreas Huggel.\n\n"
|
||||
<< "This is free software; see the source for copying conditions. "
|
||||
<< "There is NO \nwarranty; not even for MERCHANTABILITY or FITNESS FOR "
|
||||
|
||||
@ -14,28 +14,28 @@
|
||||
#ifdef _MSC_VER
|
||||
|
||||
/* Define to 1 if you have the <process.h> header file. */
|
||||
#define HAVE_PROCESS_H 1
|
||||
#define EXV_HAVE_PROCESS_H 1
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "ahuggel@gmx.net"
|
||||
#define EXV_PACKAGE_BUGREPORT "ahuggel@gmx.net"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "Exiv2"
|
||||
#define EXV_PACKAGE_NAME "Exiv2"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "Exiv2 0.6.2"
|
||||
#define EXV_PACKAGE_STRING "Exiv2 0.6.2"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "exiv2"
|
||||
#define EXV_PACKAGE_TARNAME "exiv2"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "0.6.2"
|
||||
#define EXV_PACKAGE_VERSION "0.6.2"
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define pid_t. */
|
||||
#define pid_t int
|
||||
|
||||
/* File path seperator */
|
||||
#define SEPERATOR_STR "\\"
|
||||
#define SEPERATOR_CHR '\\'
|
||||
#define EXV_SEPERATOR_STR "\\"
|
||||
#define EXV_SEPERATOR_CHR '\\'
|
||||
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
#ifdef __GNUC__
|
||||
#define alloca __builtin_alloca
|
||||
#else /* not __GNUC__ */
|
||||
#if defined (HAVE_ALLOCA_H) || (defined(sparc) && (defined(sun) || (!defined(USG) && !defined(SVR4) && !defined(__svr4__))))
|
||||
#if defined (EXV_HAVE_ALLOCA_H) || (defined(sparc) && (defined(sun) || (!defined(USG) && !defined(SVR4) && !defined(__svr4__))))
|
||||
#include <alloca.h>
|
||||
#else
|
||||
#ifndef _AIX
|
||||
|
||||
@ -56,7 +56,7 @@ EXIV2_RCSID("@(#) $Id$");
|
||||
#ifdef _MSC_VER
|
||||
# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#ifdef EXV_HAVE_UNISTD_H
|
||||
# include <unistd.h> // stat
|
||||
#endif
|
||||
|
||||
|
||||
@ -32,12 +32,10 @@ EXIV2_RCSID("@(#) $Id$");
|
||||
|
||||
// *****************************************************************************
|
||||
// included header files
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#ifdef _MSC_VER
|
||||
# include "exv_msvc.h"
|
||||
#else
|
||||
# ifdef _MSC_VER
|
||||
# include <config_win32.h>
|
||||
# endif
|
||||
# include "exv_conf.h"
|
||||
#endif
|
||||
|
||||
#include "jpgimage.hpp"
|
||||
|
||||
@ -59,18 +59,18 @@ static char privatehid[] = "@(#)private.h 7.53";
|
||||
|
||||
/* ahu: deleted include sys/wait.h and WIFEXITED, WEXITSTATUS macros */
|
||||
|
||||
#if HAVE_UNISTD_H - 0
|
||||
#if EXV_HAVE_UNISTD_H - 0
|
||||
#include "unistd.h" /* for F_OK and R_OK */
|
||||
#endif /* HAVE_UNISTD_H - 0 */
|
||||
#endif /* EXV_HAVE_UNISTD_H - 0 */
|
||||
|
||||
#if !(HAVE_UNISTD_H - 0)
|
||||
#if !(EXV_HAVE_UNISTD_H - 0)
|
||||
#ifndef F_OK
|
||||
#define F_OK 0
|
||||
#endif /* !defined F_OK */
|
||||
#ifndef R_OK
|
||||
#define R_OK 4
|
||||
#endif /* !defined R_OK */
|
||||
#endif /* !(HAVE_UNISTD_H - 0) */
|
||||
#endif /* !(EXV_HAVE_UNISTD_H - 0) */
|
||||
|
||||
/* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX. */
|
||||
#define is_digit(c) ((unsigned)(c) - '0' <= 9)
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
#include <utility>
|
||||
#include <sstream>
|
||||
#include <cstdio>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#ifdef EXV_HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ EXIV2_RCSID("@(#) $Id$");
|
||||
# include "getopt_win32.h"
|
||||
# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#ifdef EXV_HAVE_UNISTD_H
|
||||
# include <unistd.h> // for getopt(), stat()
|
||||
#endif
|
||||
#include <errno.h>
|
||||
@ -100,15 +100,15 @@ int Getopt::getopt(int argc, char* const argv[], const std::string& optstring)
|
||||
if (path == "") return ".";
|
||||
// Strip trailing slashes
|
||||
std::string p = path;
|
||||
while (p.length() > 1 && p[p.length()-1] == SEPERATOR_CHR) {
|
||||
while (p.length() > 1 && p[p.length()-1] == EXV_SEPERATOR_CHR) {
|
||||
p = p.substr(0, p.length()-1);
|
||||
}
|
||||
if (p == SEPERATOR_STR) return SEPERATOR_STR;
|
||||
std::string::size_type idx = p.rfind(SEPERATOR_CHR);
|
||||
if (p == EXV_SEPERATOR_STR) return EXV_SEPERATOR_STR;
|
||||
std::string::size_type idx = p.rfind(EXV_SEPERATOR_CHR);
|
||||
if (idx == std::string::npos) return ".";
|
||||
if (idx == 0) return SEPERATOR_STR;
|
||||
if (idx == 0) return EXV_SEPERATOR_STR;
|
||||
p = p.substr(0, idx);
|
||||
while (p.length() > 1 && p[p.length()-1] == SEPERATOR_CHR) {
|
||||
while (p.length() > 1 && p[p.length()-1] == EXV_SEPERATOR_CHR) {
|
||||
p = p.substr(0, p.length()-1);
|
||||
}
|
||||
return p;
|
||||
@ -119,11 +119,11 @@ int Getopt::getopt(int argc, char* const argv[], const std::string& optstring)
|
||||
if (path == "") return ".";
|
||||
// Strip trailing slashes
|
||||
std::string p = path;
|
||||
while (p.length() > 1 && p[p.length()-1] == SEPERATOR_CHR) {
|
||||
while (p.length() > 1 && p[p.length()-1] == EXV_SEPERATOR_CHR) {
|
||||
p = p.substr(0, p.length()-1);
|
||||
}
|
||||
if (p == SEPERATOR_STR) return p;
|
||||
std::string::size_type idx = p.rfind(SEPERATOR_CHR);
|
||||
if (p == EXV_SEPERATOR_STR) return p;
|
||||
std::string::size_type idx = p.rfind(EXV_SEPERATOR_CHR);
|
||||
if (idx != std::string::npos) p = p.substr(idx+1);
|
||||
if (delsuffix) p = p.substr(0, p.length() - suffix(p).length());
|
||||
return p;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user