Thread: Are there platform specific headers other than <windows.h>

  1. #1
    Registered User
    Join Date
    Sep 2018
    Posts
    217

    Are there platform specific headers other than <windows.h>

    There ought to be right? I couldn't find anything proper.
    Is there a site with like a list or something?

    I'm talking about headers that aren't cross-platform yet which are available in compilers right when you get them.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    C -> C Standard Library header files - cppreference.com
    C++ -> C++ Standard Library headers - cppreference.com
    If it isn't on either of those lists, it's platform specific.

    The approximate Unix/Linux/BSD equivalent of windows.h is unistd.h.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Sep 2018
    Posts
    217
    What about mac os

  4. #4
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    In the C and C++ programming languages, unistd.h is the name of the header file that provides access to the POSIX operating system API. It is defined by the POSIX.1 standard, the base of the Single Unix Specification, and should therefore be available in any conforming (or quasi-conforming) operating system/compiler (all official versions of UNIX, including macOS, Linux, etc.).
    unistd.h - Wikipedia
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. API design: Handling platform specific errors
    By MOS-6581 in forum C Programming
    Replies: 8
    Last Post: 03-14-2015, 11:38 PM
  2. I need a new Windows platform!!!!
    By Hussain Hani in forum General Discussions
    Replies: 84
    Last Post: 08-10-2009, 08:57 AM
  3. platform specific API or C standard API
    By George2 in forum C Programming
    Replies: 1
    Last Post: 11-12-2007, 01:32 AM
  4. Platform Specific...
    By Cheeze-It in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 09-29-2002, 01:48 AM
  5. Platform specific
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 02-11-2002, 08:25 PM

Tags for this Thread