Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use proper types from <sys/types.h> in struct definition #13

Open
pythonhacker opened this issue Oct 27, 2014 · 3 comments
Open

Use proper types from <sys/types.h> in struct definition #13

pythonhacker opened this issue Oct 27, 2014 · 3 comments
Milestone

Comments

@pythonhacker
Copy link

I noticed a few places where int types are used when standard system typedefs are available which would be more appropriate.

Examples.

  1. fields pid, ppid in struct Process. Should be pid_t instead of "unsigned int".
  2. field uid etc - Should be uid_t.
  3. field create_time - Should be time_t (I think).

Most of these are available in <sys/types.h> and we should use them wherever possible.

@nibrahim
Copy link
Collaborator

nibrahim commented Dec 8, 2014

I'm not completely sure about this. We'd have different types for different platforms. The types like pid_t are Linux specific. Are they not?

@pythonhacker
Copy link
Author

It is part of C POSIX library. Not specific to Linux. If you have a proper autoconfigure system it can decide to add or not add it for you depending on the target platform.

https://en.wikipedia.org/wiki/C_POSIX_library

@k4rtik
Copy link
Contributor

k4rtik commented Dec 24, 2015

I took care of pid_t type fields in the last refactor (nibrahim@ad7964a).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants