git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC/PATCH v2 00/17] Build Git with MSVC
@ 2009-09-14 13:11 Marius Storm-Olsen
  2009-09-14 13:11 ` [PATCH 01/17] Avoid declaration after statement Marius Storm-Olsen
  0 siblings, 1 reply; 35+ messages in thread
From: Marius Storm-Olsen @ 2009-09-14 13:11 UTC (permalink / raw)
  To: Johannes.Schindelin; +Cc: msysgit, git, lznuaa, Marius Storm-Olsen


Here's a second roll of the series for supporting compilation of Git
using Visual C++ (MSVC). (Sorry for the long delay on a followup, time
is in short supply these days)

There's no guarantee that the compiled result will work as well as the
current MinGW compile, or at all. However, I think it's important to
get the Git repo to a compilable state with MSVC as quickly as
possible, to further enable contributions from the Windows developers
which we are sorely lacking at the moment.
I hope that a repo which compiles successfully with the tools they are
accustomed to (also a very good debugger) will entice them to send more
patches.

In addition to this series, I have also setup a repo with binaries of
the required libs to compile Git with MSVC. Only 32bit versions for now.
So, the developer can choose to either use that, or Frank's source code
repo to build Git with MSVC. You'll find the binary repo here:
    http://repo.or.cz/w/msvcgit.git

Note that the binaries will still require the msysgit environment for
execution, due to the non-binary components of Git. (Scripts, gitk,
git-gui, etc). You'll find that repo here:
    http://repo.or.cz/w/msysgit.git

=== V2 2009.09.14 ===
1) Rebased ontop on current git.git 'next'.
2) Fixed code and commit msgs based on the previous feedback.
   Let me know if I forgot anything!
3) Added a proper Makefile patch for MSVC support.
   You now compile with 'make MSVC=1'.
4) Added perl scripts (contrib) which uses GNU Make output to generate
   MSVC IDE (.sln & .vcproj) projects and QMake projects, and picking
   up the project settings from the Makefile, so it's all in one place.
5) Added necessary patches to make things compile ontop of current
   'next'.

=== V1 2009.08.21 ===
So, Frank Li started this series, and I took it upon my self to help
out a bit; cleaning, reorganizing, rebasing the series. Hopefully
we're now a bit closer to including the series into mainline..

Here's a summary of what has happend:
1) This series is rebased ontop of git.git 'next', which needed an
   extra patch to avoid a non-constant array creation, which
   mscv doesn't like.
2) I've polished (tied to anyways) the commit messages a bit.
3) I've applied much of the feedback provided to the first round of
   the patches.
4) I've split, merged and reordered some of the patches, so things
   that belong together are in the same commits, and in a order of
   'importance'
5) I've removed the
       #define func _func
   stuff, as it's not needed and Microsoft cannot really kill the
   compatibility functions anyways. So, adding the define
       _CRT_NONSTDC_NO_DEPRECATE
   will kill the warnings seen without the defines above.
6) ..probably much more as well, but I forget..

Note: I did not sign off on the last two commits, which involve the
adding of the vcproj files, since I don't agree on adding them as is.
We need a Makefile way of compiling primarily, and second, a script
to generate the vcproj, as already discussed. But the commits are
included for completeness, at to let others compile and play with it.

I've kept the original author as is, and just signed the patches..
Thanks for watching, now bring on the comments!

Frank Li (8):
  Avoid declaration after statement
  Define SNPRINTF_SIZE_CORR=1 for Microsoft Visual C++
  Change regerror() declaration from K&R style to ANSI C (C89)
  mingw.c: Use the O_BINARY flag to open files
  Fix __stdcall/WINAPI placement and function prototype
  Test for WIN32 instead of __MINGW32_
  Add MinGW header files to build git with MSVC
  Add platform files for MSVC porting

Marius Storm-Olsen (9):
  boolean is a typedef under MSVC, so rename variable to 'i_boolean'
  Add define guards to compat/win32.h
  Add empty header files for MSVC port
  Make usage of windows.h lean and mean
  Define strncasecmp as _strnicmp for MSVC
  Add ftruncate implementation for MSVC
  Add MSVC to Makefile
  Add README for MSVC build
  Add scripts to generate projects for other buildsystems (MSVC vcproj,
    QMake)

 .gitignore                                |   11 +
 Makefile                                  |   54 +++-
 compat/mingw.c                            |   22 +-
 compat/mingw.h                            |    2 +
 compat/msvc.c                             |   43 ++
 compat/msvc.h                             |   51 +++
 compat/regex/regex.c                      |    7 +-
 compat/snprintf.c                         |   10 +-
 compat/vcbuild/README                     |   50 +++
 compat/vcbuild/include/alloca.h           |    1 +
 compat/vcbuild/include/arpa/inet.h        |    1 +
 compat/vcbuild/include/dirent.h           |  128 ++++++
 compat/vcbuild/include/grp.h              |    1 +
 compat/vcbuild/include/inttypes.h         |    1 +
 compat/vcbuild/include/netdb.h            |    1 +
 compat/vcbuild/include/netinet/in.h       |    1 +
 compat/vcbuild/include/netinet/tcp.h      |    1 +
 compat/vcbuild/include/pwd.h              |    1 +
 compat/vcbuild/include/sys/ioctl.h        |    1 +
 compat/vcbuild/include/sys/param.h        |    1 +
 compat/vcbuild/include/sys/poll.h         |    1 +
 compat/vcbuild/include/sys/select.h       |    1 +
 compat/vcbuild/include/sys/socket.h       |    1 +
 compat/vcbuild/include/sys/time.h         |    1 +
 compat/vcbuild/include/sys/utime.h        |   34 ++
 compat/vcbuild/include/sys/wait.h         |    1 +
 compat/vcbuild/include/unistd.h           |   92 ++++
 compat/vcbuild/include/utime.h            |    1 +
 compat/vcbuild/scripts/clink.pl           |   48 +++
 compat/vcbuild/scripts/lib.pl             |   26 ++
 compat/win32.h                            |    7 +
 compat/winansi.c                          |    1 -
 contrib/buildsystems/Generators.pm        |   42 ++
 contrib/buildsystems/Generators/QMake.pm  |  189 +++++++++
 contrib/buildsystems/Generators/Vcproj.pm |  639 +++++++++++++++++++++++++++++
 contrib/buildsystems/engine.pl            |  353 ++++++++++++++++
 contrib/buildsystems/generate             |   29 ++
 contrib/buildsystems/parse.pl             |  228 ++++++++++
 git-compat-util.h                         |    9 +
 help.c                                    |    5 +-
 pager.c                                   |    4 +-
 run-command.c                             |   12 +-
 run-command.h                             |    2 +-
 setup.c                                   |    2 +-
 test-parse-options.c                      |   12 +-
 thread-utils.c                            |    5 +-
 46 files changed, 2094 insertions(+), 39 deletions(-)
 create mode 100644 compat/msvc.c
 create mode 100644 compat/msvc.h
 create mode 100644 compat/vcbuild/README
 create mode 100644 compat/vcbuild/include/alloca.h
 create mode 100644 compat/vcbuild/include/arpa/inet.h
 create mode 100644 compat/vcbuild/include/dirent.h
 create mode 100644 compat/vcbuild/include/grp.h
 create mode 100644 compat/vcbuild/include/inttypes.h
 create mode 100644 compat/vcbuild/include/netdb.h
 create mode 100644 compat/vcbuild/include/netinet/in.h
 create mode 100644 compat/vcbuild/include/netinet/tcp.h
 create mode 100644 compat/vcbuild/include/pwd.h
 create mode 100644 compat/vcbuild/include/sys/ioctl.h
 create mode 100644 compat/vcbuild/include/sys/param.h
 create mode 100644 compat/vcbuild/include/sys/poll.h
 create mode 100644 compat/vcbuild/include/sys/select.h
 create mode 100644 compat/vcbuild/include/sys/socket.h
 create mode 100644 compat/vcbuild/include/sys/time.h
 create mode 100644 compat/vcbuild/include/sys/utime.h
 create mode 100644 compat/vcbuild/include/sys/wait.h
 create mode 100644 compat/vcbuild/include/unistd.h
 create mode 100644 compat/vcbuild/include/utime.h
 create mode 100644 compat/vcbuild/scripts/clink.pl
 create mode 100644 compat/vcbuild/scripts/lib.pl
 create mode 100644 contrib/buildsystems/Generators.pm
 create mode 100644 contrib/buildsystems/Generators/QMake.pm
 create mode 100644 contrib/buildsystems/Generators/Vcproj.pm
 create mode 100644 contrib/buildsystems/engine.pl
 create mode 100644 contrib/buildsystems/generate
 create mode 100644 contrib/buildsystems/parse.pl

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2009-09-15  5:59 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-14 13:11 [RFC/PATCH v2 00/17] Build Git with MSVC Marius Storm-Olsen
2009-09-14 13:11 ` [PATCH 01/17] Avoid declaration after statement Marius Storm-Olsen
2009-09-14 13:11   ` [PATCH 02/17] boolean is a typedef under MSVC, so rename variable to 'i_boolean' Marius Storm-Olsen
2009-09-14 13:11     ` [PATCH 03/17] Define SNPRINTF_SIZE_CORR=1 for Microsoft Visual C++ Marius Storm-Olsen
2009-09-14 13:11       ` [PATCH 04/17] Add define guards to compat/win32.h Marius Storm-Olsen
2009-09-14 13:11         ` [PATCH 05/17] Change regerror() declaration from K&R style to ANSI C (C89) Marius Storm-Olsen
2009-09-14 13:11           ` [PATCH 06/17] mingw.c: Use the O_BINARY flag to open files Marius Storm-Olsen
2009-09-14 13:11             ` [PATCH 07/17] Fix __stdcall/WINAPI placement and function prototype Marius Storm-Olsen
2009-09-14 13:11               ` [PATCH 08/17] Test for WIN32 instead of __MINGW32_ Marius Storm-Olsen
2009-09-14 13:11                 ` [PATCH 09/17] Add empty header files for MSVC port Marius Storm-Olsen
2009-09-14 13:11                   ` [PATCH 10/17] Add MinGW header files to build git with MSVC Marius Storm-Olsen
2009-09-14 13:11                     ` [PATCH 11/17] Add platform files for MSVC porting Marius Storm-Olsen
2009-09-14 13:11                       ` [PATCH 12/17] Make usage of windows.h lean and mean Marius Storm-Olsen
2009-09-14 13:11                         ` [PATCH 13/17] Define strncasecmp as _strnicmp for MSVC Marius Storm-Olsen
2009-09-14 13:11                           ` [PATCH 14/17] Add ftruncate implementation " Marius Storm-Olsen
2009-09-14 13:11                             ` [PATCH 15/17] Add MSVC to Makefile Marius Storm-Olsen
2009-09-14 13:11                               ` [PATCH 16/17] Add README for MSVC build Marius Storm-Olsen
2009-09-14 13:11                                 ` [PATCH 17/17] Add scripts to generate projects for other buildsystems (MSVC vcproj, QMake) Marius Storm-Olsen
2009-09-14 14:06                               ` [PATCH 15/17] Add MSVC to Makefile Alex Riesen
2009-09-14 19:09                                 ` Marius Storm-Olsen
2009-09-14 14:18                             ` [PATCH 14/17] Add ftruncate implementation for MSVC Alex Riesen
2009-09-14 19:03                               ` Marius Storm-Olsen
2009-09-14 19:48                             ` Junio C Hamano
2009-09-14 19:31                 ` [PATCH 08/17] Test for WIN32 instead of __MINGW32_ Junio C Hamano
2009-09-14 19:42                   ` Marius Storm-Olsen
2009-09-14 20:00               ` [PATCH 07/17] Fix __stdcall/WINAPI placement and function prototype Johannes Sixt
2009-09-15  0:24                 ` [msysGit] " Johannes Schindelin
2009-09-15  5:59                   ` Marius Storm-Olsen
2009-09-14 19:06             ` [msysGit] [PATCH 06/17] mingw.c: Use the O_BINARY flag to open files Alexey Borzenkov
2009-09-14 13:41     ` [PATCH 02/17] boolean is a typedef under MSVC, so rename variable to 'i_boolean' Marius Storm-Olsen
2009-09-14 13:59   ` [PATCH 01/17] Avoid declaration after statement Alex Riesen
2009-09-14 14:01     ` Marius Storm-Olsen
2009-09-14 14:04     ` Frank Li
2009-09-14 14:10       ` Alex Riesen
2009-09-14 19:00         ` Marius Storm-Olsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).