Skip to main content
Up and Coming
August 13, 2014

Classic Mac OS 9 linebreaks? Seriously?

I just updated to SDK 0.4.1 on Mac and found my source control complaining about changed files that didn't actually change.
I found that this is due to the .h and .cpp files of the Mac OSX SDK download having 'classic', meaning Mac OS 9, line endings (\r control character instead of \n).

In case you didn't notice, OSX came out in 1999 and it uses standard Unix line endings. I've batch-converted all files to Unix line-endings now to avoid confusing my source code repository.

Is there any particular reason why you want the SDK to have different line endings on different OS, and why would you chose Mac OS 9 line endings for OSX?

    3 replies

    Inspiring
    August 13, 2014
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    Up and Coming
    August 13, 2014
    I've been struggling with these in trying to maintain a "universal" LibOVR library, too... Visual Studio always complains about it.

    I think this could easily be solved by normalizing with LF (Unix) line breaks (which are fine in Visual Studio, despite the name/platform). It would also be helpful to have a sanctioned universal SDK for all platforms instead of the separate platform-specific branches. It seems that all the platform specific code lives in their own files anyways, so why even bother splitting the SDKs up?
    Inspiring
    August 13, 2014
    "mindabuse" wrote:
    I've been struggling with these in trying to maintain a "universal" LibOVR library, too... Visual Studio always complains about it.

    I think this could easily be solved by normalizing with LF (Unix) line breaks (which are fine in Visual Studio, despite the name/platform). It would also be helpful to have a sanctioned universal SDK for all platforms instead of the separate platform-specific branches. It seems that all the platform specific code lives in their own files anyways, so why even bother splitting the SDKs up?


    Well, that's pretty much what I've attempted to create with my repository. A single coherent codebase that can be used on any platform. On my linux platform it checks out with Unix line endings, although I think I have my windows client to automatically convert to windows line endings. I'm not sure exactly how I have it set up, but basically Git is supposed to be able to manage this for you.
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action