Small patch for visual studio project files

I moved my own llvm tree out of the way and tried to get a fresh copy from cvs and build everything from scratch... and it worked! apart from one little problem, a file was moved and should be removed from the project files -- here is a patch.

There is a small problem with submitting patches for the .vcproj files - VS saves them with CRLF line endings but the CVS versions appear to have only LF (Unix style). This causes every line to differ! I used 'tr -d \r' this time, but it will be a bit painful to have to do this every time a project file is modified... Any suggestions?

There are some changes which should be applied to all project files, namely getting rid of the __STDC_LIMIT_MACROS preprocessor define and disabling the negating unsigned number warning... Because of the line ending problem it will have to wait until something more important forces a check in of the project files.

m.

diff.txt (668 Bytes)

Are you sure your CVS is configured correctly? On Windows, CVS
automatically converts between LF and CR/LF line endings. I sent a
patch to remove all CRs from the repository because when I checked out
the files on Windows, every line had two CRs and a single LF. When VS
saved a modified project file, the extra CR went away, causing every
line to diff.

Jeff Cohen wrote:

Are you sure your CVS is configured correctly? On Windows, CVS
automatically converts between LF and CR/LF line endings. I sent a
patch to remove all CRs from the repository because when I checked out
the files on Windows, every line had two CRs and a single LF. When VS
saved a modified project file, the extra CR went away, causing every
line to diff.

I'm using the cygwin cvs which doesn't add any CR when checking out.. so I'm getting the version with only LF and when VS saves a modified project file every line diffs... I don't see any option to cvs to tell it how to handle line endings, so I don't know how to fix this.

m.

You have to use a version of CVS that's specifically built for Windows.
You can find prebuilt Windows binaries at cvshome.org. The cygwin
supplied CVS no doubt thinks it's running on Unix, so naturally it won't
convert line endings.

We could also do the "cvs admin -kb" thing on all the project files so
that cvs won't do keyword expansion or line ending conversion.

Thoughts?

Reid.

No, projects files are text files and should be treated as text files.
This is a non-problem when the correct version of CVS is used. The
moral here is never use a binary that relies on Unix emulation when
there's a native Windows version available.

Getting rid of keyword expansion globally seems excessive to solve the line-feed problem for one platform. Keywords can be useful sometimes.

--Vikram
http://www.cs.uiuc.edu/~vadve
http://llvm.cs.uiuc.edu/

Jeff Cohen wrote:

You have to use a version of CVS that's specifically built for Windows. You can find prebuilt Windows binaries at cvshome.org. The cygwin
supplied CVS no doubt thinks it's running on Unix, so naturally it won't
convert line endings.

OK, I put the CVSNT binaries distributed with WinCVS in my path. Problem solved... It's just that I didn't know the cause of the problem, the cvs in cygwin is horribly broken - the binary files in the test/ hierarchy were even getting corrupted.

m.

Applied.

-Chris