Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3acc8ad8487717b4a60e791bf56caa4f5caa6ac206b51bd4552df76bb692ed2a
Ticket: c9759399735f1979a2e7931fd9f00da20f2fbb7e
Usage of gnu_printf in latest mingw-w64
User & Date: anonymous on 2021-01-06 17:06:40
Changes

  1. closer changed to: "nobody"
  2. icomment:
    I64 works with MinGW when __USE_MINGW_ANSI_STDIO=1:
    
    #include <stdio.h>
    
    int main() {
      long long a = 0x1234567890123456LL;
      printf("a= %I64x\n", a);
    }
    
    
    $ gcc -D__USE_MINGW_ANSI_STDIO=1 mingw-stdio.c -o ms.exe && ./ms.exe
    a= 1234567890123456
    
    $ gcc -v
    Using built-in specs.
    COLLECT_GCC=c:\apps\msys64\mingw64\bin\gcc.exe
    COLLECT_LTO_WRAPPER=c:/apps/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/lto-wrapper.exe
    Target: x86_64-w64-mingw32
    Configured with: ../gcc-10.2.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --disable-plugin --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev6, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --with-boot-ldflags='-pipe -Wl,--dynamicbase,--high-entropy-va,--nxcompat,--default-image-base-high -Wl,--disable-dynamicbase -static-libstdc++ -static-libgcc' 'LDFLAGS_FOR_TARGET=-pipe -Wl,--dynamicbase,--high-entropy-va,--nxcompat,--default-image-base-high' --enable-linker-plugin-flags='LDFLAGS=-static-libstdc++\ -static-libgcc\ -pipe\ -Wl,--dynamicbase,--high-entropy-va,--nxcompat,--default-image-base-high\ -Wl,--stack,12582912'
    Thread model: posix
    Supported LTO compression algorithms: zlib zstd
    gcc version 10.2.0 (Rev6, Built by MSYS2 project) 
    
    
    (This is MinGW-w64, dunno about plain MinGW).
    
    Forcing __USE_MINGW_ANSI_STDIO=0 can be problematic when Tcl/Tk are embedded in other applications that use __USE_MINGW_ANSI_STDIO=1 (which is the default for everything built by MSYS2's makepkg-mingw, for instance).
    
    Until now, MSYS2 distributed Tcl/Tk binaries built with __USE_MINGW_ANSI_STDIO=1, so forcing __USE_MINGW_ANSI_STDIO=0 on Tcl's makefile (and placing it after CPPFLAGS/CFLAGS, which precludes the user from choosing his own setting) is a significant, possibly problematic change.
    
    If you are sure that Tcl's impact of __USE_MINGW_ANSI_STDIO setting does not leak to the client applications and binary packages and will remain so, then we can close this issue for good.
    
    Thanks for your work on Tlc/MinGW, I greatly appreciate it.
    
    Óscar Fuentes, occasional maintainer of MSYS2 Tcl-related packages.
    
  3. login: "anonymous"
  4. mimetype: "text/plain"
  5. status changed to: "Open"