summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordevzero2000 <devzero2000>2011-09-05 12:14:30 +0000
committerdevzero2000 <devzero2000>2011-09-05 12:14:30 +0000
commit3a6b52e0f6745105bbb468a089f13a280570cb4f (patch)
tree5b7c7eb375b2667559abe398d87286b26b8732bb
parentf0c843329483d4feb7653215beed2f0dcd2854aa (diff)
downloadlibpopt-3a6b52e0f6745105bbb468a089f13a280570cb4f.tar.gz
redo commit 8396019
Useless to have format crap just for conforming to oddball platform (http://rpm5.org/community/rpm-devel/5166.html). Keep the patch only inside MinGW.
-rw-r--r--CHANGES5
-rw-r--r--popthelp.c4
-rw-r--r--test1.c4
3 files changed, 13 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index d886701..01b43b9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,9 @@
1.17 -> 2.0:
+ - devzero2000: redo commit 8396019
+ Useless to have format crap just for conforming
+ to oddball platform
+ (http://rpm5.org/community/rpm-devel/5166.html).
+ Keep the patch only inside MinGW.
- devzero2000: merge commit fc8836e from git pull request
https://github.com/devzero2000/POPT/pull/2
"Fix more MSVC build warnings"
diff --git a/popthelp.c b/popthelp.c
index b49e0eb..eff4f0e 100644
--- a/popthelp.c
+++ b/popthelp.c
@@ -265,7 +265,11 @@ assert(le); /* XXX can't happen */
le += sprintf(le, "%ld", arg.longp[0]);
break;
case POPT_ARG_LONGLONG:
+#if defined(_MSC_VER) || defined(__MINGW32__)
le += sprintf(le, "%" LONG_LONG_FORMAT, arg.longlongp[0]);
+#else
+ le += sprintf(le, "%lld", arg.longlongp[0]);
+#endif
break;
case POPT_ARG_FLOAT:
{ double aDouble = (double) arg.floatp[0];
diff --git a/test1.c b/test1.c
index 4e7e6f9..da1fcef 100644
--- a/test1.c
+++ b/test1.c
@@ -334,7 +334,11 @@ int main(int argc, const char ** argv)
if (aLong != bLong)
fprintf(stdout, " aLong: %ld", aLong);
if (aLongLong != bLongLong)
+#if defined(_MSC_VER) || defined(__MINGW32__)
fprintf(stdout, " aLongLong: %" LONG_LONG_FORMAT, aLongLong);
+#else
+ fprintf(stdout, " aLongLong: %lld", aLongLong);
+#endif
/*@-realcompare@*/
if (aFloat != bFloat)
fprintf(stdout, " aFloat: %g", (double)aFloat);