psutil icon indicating copy to clipboard operation
psutil copied to clipboard

Properly attribute ntextapi symbols as extern

Open georgthegreat opened this issue 2 years ago • 0 comments

Summary

  • OS: Windows
  • Bug fix: no
  • Type: core

Description

At the time, an attempt to compile the binding with (on by default) clang-cl's `-fno-common leads to the following error: psutil.lib(_psutil_common.c.py2.obj) : error LNK2005: _RtlNtStatusToDosErrorNoTeb already defined in psutil.lib(_psutil_windows.c.py2.obj).

(as to my knowledge, the best description of fcommon mechanics can be found in GCC's bugzilla.

This PR properly attributes functions as extern in every place except for the _psutil_common.c which is going to assign proper values to them.

georgthegreat avatar Jan 24 '22 11:01 georgthegreat