Index: String++.h =================================================================== RCS file: /cvs/cygwin-apps/setup/String++.h,v retrieving revision 2.11 diff -u -p -r2.11 String++.h --- String++.h 23 Jun 2003 20:48:59 -0000 2.11 +++ String++.h 12 Jul 2003 00:47:14 -0000 @@ -106,5 +106,8 @@ String::size() const { return theData->length; } + +#define __TOSTRING__(X) #X +#define TOSTRING(X) __TOSTRING__(X) #endif /* SETUP_STRING___H */ Index: UserSettings.cc =================================================================== RCS file: /cvs/cygwin-apps/setup/UserSettings.cc,v retrieving revision 2.3 diff -u -p -r2.3 UserSettings.cc --- UserSettings.cc 16 Mar 2003 02:06:05 -0000 2.3 +++ UserSettings.cc 12 Jul 2003 00:47:14 -0000 @@ -63,6 +63,6 @@ UserSettings::deRegisterSetting(UserSett { Settings::iterator i = find(settings.begin(), settings.end(), &aSetting); if (i == settings.end()) - throw new Exception ("__LINE__ __FILE__", String ("Attempt to deregister non registered setting!"), APPERR_LOGIC_ERROR); + throw new Exception (TOSTRING(__LINE__) " " __FILE__, String ("Attempt to deregister non registered setting!"), APPERR_LOGIC_ERROR); settings.erase(i); } Index: download.cc =================================================================== RCS file: /cvs/cygwin-apps/setup/download.cc,v retrieving revision 2.37 diff -u -p -r2.37 download.cc --- download.cc 7 Apr 2003 12:46:55 -0000 2.37 +++ download.cc 12 Jul 2003 00:47:14 -0000 @@ -88,7 +88,7 @@ validateCachedPackage (String const &ful } delete thefile; if (count < 0) - throw new Exception ("__LINE__ __FILE__", String ("IO Error reading ") + pkgsource.Cached(), APPERR_IO_ERROR); + throw new Exception (TOSTRING(__LINE__) " " __FILE__, String ("IO Error reading ") + pkgsource.Cached(), APPERR_IO_ERROR); md5_byte_t tempdigest[16]; md5_finish(&pns, tempdigest); @@ -128,7 +128,7 @@ check_for_cached (packagesource & pkgsou if (validateCachedPackage (prefix + pkgsource.Canonical (), pkgsource)) pkgsource.set_cached (prefix + pkgsource.Canonical ()); else - throw new Exception ("__LINE__ __FILE__", String ("Package validation failure for ") + prefix + pkgsource.Canonical (), APPERR_CORRUPT_PACKAGE); + throw new Exception (TOSTRING(__LINE__) " " __FILE__, String ("Package validation failure for ") + prefix + pkgsource.Canonical (), APPERR_CORRUPT_PACKAGE); return 1; } @@ -146,7 +146,7 @@ check_for_cached (packagesource & pkgsou if (validateCachedPackage (fullname, pkgsource)) pkgsource.set_cached (fullname ); else - throw new Exception ("__LINE__ __FILE__", String ("Package validation failure for ") + fullname, APPERR_CORRUPT_PACKAGE); + throw new Exception (TOSTRING(__LINE__) " " __FILE__, String ("Package validation failure for ") + fullname, APPERR_CORRUPT_PACKAGE); return 1; } } Index: geturl.cc =================================================================== RCS file: /cvs/cygwin-apps/setup/geturl.cc,v retrieving revision 2.21 diff -u -p -r2.21 geturl.cc --- geturl.cc 12 May 2002 11:16:24 -0000 2.21 +++ geturl.cc 12 Jul 2003 00:47:14 -0000 @@ -125,7 +125,7 @@ getUrlToStream (String const &_url, HWND { delete n; log (LOG_BABBLE) << "getUrlToStream failed!" << endLog; - throw new Exception ("__LINE__ __FILE__", "Error opening url", APPERR_IO_ERROR); + throw new Exception (TOSTRING(__LINE__) " " __FILE__, "Error opening url", APPERR_IO_ERROR); } if (n->file_size) Index: install.cc =================================================================== RCS file: /cvs/cygwin-apps/setup/install.cc,v retrieving revision 2.61 diff -u -p -r2.61 install.cc --- install.cc 25 Mar 2003 20:57:13 -0000 2.61 +++ install.cc 12 Jul 2003 00:47:14 -0000 @@ -658,7 +658,7 @@ void md5_one (const packagesource& sourc // check the MD5 sum of the cached file here io_stream *thefile = io_stream::open (source.Cached (), "rb"); if (!thefile) - throw new Exception ("__LINE__ __FILE__", String ("IO Error opening ") + source.Cached(), APPERR_IO_ERROR); + throw new Exception (TOSTRING(__LINE__) " " __FILE__, String ("IO Error opening ") + source.Cached(), APPERR_IO_ERROR); md5_state_t pns; md5_init (&pns); @@ -668,7 +668,7 @@ void md5_one (const packagesource& sourc md5_append (&pns, buffer, count); delete thefile; if (count < 0) - throw new Exception ("__LINE__ __FILE__", String ("IO Error reading ") + source.Cached(), APPERR_IO_ERROR); + throw new Exception (TOSTRING(__LINE__) " " __FILE__, String ("IO Error reading ") + source.Cached(), APPERR_IO_ERROR); md5_byte_t tempdigest[16]; md5_finish(&pns, tempdigest); @@ -678,6 +678,6 @@ void md5_one (const packagesource& sourc log (LOG_BABBLE, String ("For file ") + source.Cached() + " ini digest is " + source.md5.print() + " file digest is " + tempMD5.print()); if (source.md5 != tempMD5) - throw new Exception ("__LINE__ __FILE__", String ("Checksum failure for ") + source.Cached(), APPERR_CORRUPT_PACKAGE); + throw new Exception (TOSTRING(__LINE__) " " __FILE__, String ("Checksum failure for ") + source.Cached(), APPERR_CORRUPT_PACKAGE); } }