bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MSVC: compilation failure in canonicalize.c due to unsupported C99


From: Michael Goffioul
Subject: MSVC: compilation failure in canonicalize.c due to unsupported C99
Date: Sun, 14 Oct 2012 16:21:27 -0400

Hi,

I get a compilation failure in canonicalize.c due to unsupported C99 feature in MSVC, namely the ability to define variables anywhere in C code. Is is possible to swap lines 102 and 103 in that file? That is:

  91 char *
  92 canonicalize_filename_mode (const char *name, canonicalize_mode_t can_mode)
  93 {
  94   char *rname, *dest, *extra_buf = NULL;
  95   char const *start;
  96   char const *end;
  97   char const *rname_limit;
  98   size_t extra_len = 0;
  99   Hash_table *ht = NULL;
 100   int saved_errno;
 101   int can_flags = can_mode & ~CAN_MODE_MASK;
 102   can_mode &= CAN_MODE_MASK;
 103   bool logical = can_flags & CAN_NOLINKS;
 104   /* Perhaps in future we might support CAN_NOALLOC with CAN_NOLINKS.  */

moving "logical" definition with the rest of the variables.

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]