Skip to content

Check EX_OK is defined before including sysexits.h means it is always redefined #129539

@collinfunk

Description

@collinfunk

Bug report

Bug description:

Minor nit, but there is a check for the definition of EX_OK before sysexits.h is included. Meaning it is always redefined when that header exists.

  In file included from ./Modules/posixmodule.c:295:
  /usr/include/sysexits.h:92:9: warning: "EX_OK" redefined
     92 | #define EX_OK           0       /* successful termination */
        |         ^~~~~ 
  ./Modules/posixmodule.c:56:11: note: this is the location of the previous definition
     56 | #  define EX_OK EXIT_SUCCESS
      |           ^~~~~ 

The C standard says redefinition's like this aren't allowed, but in practice I've only seen compilers warn about them.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy