GVariant: support serialising to GVariantVectors
[platform/upstream/glib.git] / glib / gnulib / printf-parse.c
index e511fc1..da7b4e0 100644 (file)
@@ -12,9 +12,7 @@
    Library General Public License for more details.
 
    You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
+   License along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
@@ -286,6 +284,15 @@ printf_parse (const char *format, char_directives *d, arguments *a)
                      flags += 8;
                      cp++;
                    }
+#ifdef HAVE_INT64_AND_I64
+                 else if (cp[0] == 'I' && 
+                          cp[1] == '6' &&
+                          cp[2] == '4')
+                   {
+                     flags = 64;
+                     cp += 3;
+                   }
+#endif
 #ifdef HAVE_INTMAX_T
                  else if (*cp == 'j')
                    {
@@ -342,6 +349,11 @@ printf_parse (const char *format, char_directives *d, arguments *a)
              switch (c)
                {
                case 'd': case 'i':
+#ifdef HAVE_INT64_AND_I64
+                 if (flags == 64) 
+                   type = TYPE_INT64;
+                 else
+#endif
 #ifdef HAVE_LONG_LONG
                  if (flags >= 16 || (flags & 4))
                    type = TYPE_LONGLONGINT;
@@ -357,6 +369,11 @@ printf_parse (const char *format, char_directives *d, arguments *a)
                    type = TYPE_INT;
                  break;
                case 'o': case 'u': case 'x': case 'X':
+#ifdef HAVE_INT64_AND_I64
+                 if (flags == 64)
+                   type = TYPE_UINT64;
+                 else
+#endif
 #ifdef HAVE_LONG_LONG
                  if (flags >= 16 || (flags & 4))
                    type = TYPE_ULONGLONGINT;