helpAutoconf - Support: sr #110296, AC_TYPE_PID_T defines pid_t...

 
 

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

Submitter:  Bruno Haible <haible>
Submitted:  Sun 23 Aug 2020 11:36:11 PM UTC
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Operating System:  Microsoft Windows
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Tue 25 Aug 2020 01:22:44 AM UTC, comment #3: 

> maybe an entry in the NEWS file is appropriate?


I didn't think the patch important enough to mention in NEWS. No big deal either way.

Paul Eggert <eggert>
Project Administrator
Mon 24 Aug 2020 06:28:00 AM UTC, comment #2: 

Sure. I didn't pay attention to this terminology detail.

Also, maybe an entry in the NEWS file is appropriate?

Bruno Haible <haible>
Mon 24 Aug 2020 02:28:58 AM UTC, comment #1: 

Thanks I installed that after changing "Windows" to "Microsoft Windows" in the comments.

Paul Eggert <eggert>
Project Administrator
Sun 23 Aug 2020 11:36:11 PM UTC, original submission:  

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.

Bruno Haible <haible>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #49700:  0001-AC_TYPE_PID_T-Define-pid_t-correctly-on-64-bit-nativ.patch added by haible (2KiB - text/x-patch - Proposed patch (nearly identical to code in gnulib that I wrote))

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by eggert (Posted a comment)
  • -email is unavailable- added by haible (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-08-24 eggert StatusNone Done
        Open/ClosedOpen Closed
    2020-08-23 haible Attached File- Added 0001-AC_TYPE_PID_T-Define-pid_t-correctly-on-64-bit-nativ.patch, #49700

    Back to the top


    Powered by Savane 3.9