mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 10:08:56 +01:00 
			
		
		
		
	gwinhttpfile.c: Fix build on Visual Studio
Visual Studio, at least the older versions, cannot use L on macros which are defined as a constant string, plus the L must be applied to all string literals here. This does not look nice, but this is life...
This commit is contained in:
		@@ -548,12 +548,15 @@ g_winhttp_file_query_info (GFile                *file,
 | 
			
		||||
    {
 | 
			
		||||
      gint64 cl;
 | 
			
		||||
      int n;
 | 
			
		||||
      const char *gint64_format = "%"G_GINT64_FORMAT"%n";
 | 
			
		||||
      wchar_t *gint64_format_w = g_utf8_to_utf16 (gint64_format, -1, NULL, NULL, NULL);
 | 
			
		||||
 | 
			
		||||
      if (swscanf (content_length, L"%"G_GINT64_FORMAT"%n", &cl, &n) == 1 &&
 | 
			
		||||
      if (swscanf (content_length, gint64_format_w, &cl, &n) == 1 &&
 | 
			
		||||
          n == wcslen (content_length))
 | 
			
		||||
        g_file_info_set_size (info, cl);
 | 
			
		||||
 | 
			
		||||
      g_free (content_length);
 | 
			
		||||
      g_free (gint64_format_w);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  if (matcher == NULL)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user