]> granicus.if.org Git - curl/commitdiff
No longer support Z as a flag to print size_t, it isn't used by libcurl
authorDaniel Stenberg <daniel@haxx.se>
Fri, 20 Feb 2004 15:16:31 +0000 (15:16 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 20 Feb 2004 15:16:31 +0000 (15:16 +0000)
and I doubt anyone else uses it.

Better preprocessor magic for the O flag (for curl_off_t printing) to prevent
compiler warnings.

lib/mprintf.c

index 42199cb8fe0730de1884a486821723ee7a69b860..60fe81fe825aee7f4a60ac6ffe4cb1bdc77c2d41 100644 (file)
@@ -374,19 +374,20 @@ static int dprintf_Pass1(char *format, va_stack_t *vto, char **endpos, va_list a
        case 'q':
          flags |= FLAGS_LONGLONG;
          break;
+#if 0
        case 'Z':
          if (sizeof(size_t) > sizeof(unsigned long int))
            flags |= FLAGS_LONGLONG;
          if (sizeof(size_t) > sizeof(unsigned int))
            flags |= FLAGS_LONG;
          break;
+#endif
        case 'O':
-         if (sizeof(curl_off_t) > sizeof(unsigned long int)) {
-           flags |= FLAGS_LONGLONG;
-         }
-          else if (sizeof(curl_off_t) > sizeof(unsigned int)) {
-           flags |= FLAGS_LONG;
-         }
+#if SIZEOF_CURL_OFF_T > 4
+          flags |= FLAGS_LONGLONG;
+#else
+          flags |= FLAGS_LONG;
+#endif
          break;
        case '0':
          if (!(flags & FLAGS_LEFT))