[Top][All Lists]

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

[sr #110296] AC_TYPE_PID_T defines pid_t incorrectly on 64-bit MSVC

From: Bruno Haible
Subject: [sr #110296] AC_TYPE_PID_T defines pid_t incorrectly on 64-bit MSVC
Date: Sun, 23 Aug 2020 19:36:13 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0


                 Summary: AC_TYPE_PID_T defines pid_t incorrectly on 64-bit
                 Project: Autoconf
            Submitted by: haible
            Submitted on: Mon 24 Aug 2020 01:36:11 AM CEST
                Category: None
                Priority: 5 - Normal
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: Microsoft Windows



On 64-bit native Windows, pid_t has to be a 64-bit type, as explained in
https://lists.gnu.org/archive/html/bug-gnulib/2020-08/msg00209.html .

With mingw, there is no problem, as mingw defines pid_t correctly.

But on MSVC (and MSVC/clang), the type pid_t is not defined, neither by the
standard header files nor by the compiler. The AC_TYPE_PID_T therefore kicks
in and defines it. But it defines it incorrectly, namely to 'int', where
instead 'long long' or '__int64' is the correct definition. For compatibility
with MSVC versions < 14 (older than 2015), it is best to use '__int64', as
support for 'long long' was only added in MSVC 14 (Visual Studio 2015).

Patch is attached.


Reply to this item at:


  Message sent via Savannah

reply via email to

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