git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] MSVC: Compile fix by not including sys/resources.h
@ 2011-10-21 19:36 Vincent van Ravesteijn
  2011-10-21 19:39 ` [PATCH 2/3] MSVC: Compile fix by including io.h Vincent van Ravesteijn
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Vincent van Ravesteijn @ 2011-10-21 19:36 UTC (permalink / raw)
  To: git

Fix compilation when compiling with MSVC because sys/resource.h
is not available. This patch causes a number of other headerfiles
that are not available to be excluded as well.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
---
  git-compat-util.h |   13 ++++++-------
  1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/git-compat-util.h b/git-compat-util.h
index 5ef8ff7..53186da 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -116,7 +116,12 @@
  #else
  #include <poll.h>
  #endif
-#ifndef __MINGW32__
+#if defined(__MINGW32__)
+/* pull in Windows compatibility stuff */
+#include "compat/mingw.h"
+#elif defined(_MSC_VER)
+#include "compat/msvc.h"
+#else
  #include <sys/wait.h>
  #include <sys/resource.h>
  #include <sys/socket.h>
@@ -145,12 +150,6 @@
  #include <grp.h>
  #define _ALL_SOURCE 1
  #endif
-#else  /* __MINGW32__ */
-/* pull in Windows compatibility stuff */
-#include "compat/mingw.h"
-#endif /* __MINGW32__ */
-#ifdef _MSC_VER
-#include "compat/msvc.h"
  #endif

  #ifndef NO_LIBGEN_H
--
1.7.6.msysgit.0

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

* [PATCH 2/3] MSVC: Compile fix by including io.h
  2011-10-21 19:36 [PATCH 1/3] MSVC: Compile fix by not including sys/resources.h Vincent van Ravesteijn
@ 2011-10-21 19:39 ` Vincent van Ravesteijn
  2011-10-21 19:42 ` [PATCH 3/3] MSVC: Remove unneeded header stubs Vincent van Ravesteijn
  2011-10-22  0:56 ` [PATCH 1/3] MSVC: Compile fix by not including sys/resources.h Junio C Hamano
  2 siblings, 0 replies; 5+ messages in thread
From: Vincent van Ravesteijn @ 2011-10-21 19:39 UTC (permalink / raw)
  To: git

Include io.h when compiling with MSVC

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
---
  compat/msvc.h |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/compat/msvc.h b/compat/msvc.h
index a33b01c..aa4b563 100644
--- a/compat/msvc.h
+++ b/compat/msvc.h
@@ -4,6 +4,7 @@
  #include <direct.h>
  #include <process.h>
  #include <malloc.h>
+#include <io.h>

  /* porting function */
  #define inline __inline
--
1.7.6.msysgit.0

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

* [PATCH 3/3] MSVC: Remove unneeded header stubs
  2011-10-21 19:36 [PATCH 1/3] MSVC: Compile fix by not including sys/resources.h Vincent van Ravesteijn
  2011-10-21 19:39 ` [PATCH 2/3] MSVC: Compile fix by including io.h Vincent van Ravesteijn
@ 2011-10-21 19:42 ` Vincent van Ravesteijn
  2011-10-22  0:56 ` [PATCH 1/3] MSVC: Compile fix by not including sys/resources.h Junio C Hamano
  2 siblings, 0 replies; 5+ messages in thread
From: Vincent van Ravesteijn @ 2011-10-21 19:42 UTC (permalink / raw)
  To: git

These headers are not necessary anymore as they are no longer included
in git-compat-util.h.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
---
  compat/vcbuild/include/arpa/inet.h   |    1 -
  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/select.h  |    1 -
  compat/vcbuild/include/sys/socket.h  |    1 -
  compat/vcbuild/include/sys/wait.h    |    1 -
  compat/vcbuild/include/termios.h     |    1 -
  12 files changed, 0 insertions(+), 12 deletions(-)
  delete mode 100644 compat/vcbuild/include/arpa/inet.h
  delete mode 100644 compat/vcbuild/include/grp.h
  delete mode 100644 compat/vcbuild/include/inttypes.h
  delete mode 100644 compat/vcbuild/include/netdb.h
  delete mode 100644 compat/vcbuild/include/netinet/in.h
  delete mode 100644 compat/vcbuild/include/netinet/tcp.h
  delete mode 100644 compat/vcbuild/include/pwd.h
  delete mode 100644 compat/vcbuild/include/sys/ioctl.h
  delete mode 100644 compat/vcbuild/include/sys/select.h
  delete mode 100644 compat/vcbuild/include/sys/socket.h
  delete mode 100644 compat/vcbuild/include/sys/wait.h
  delete mode 100644 compat/vcbuild/include/termios.h

diff --git a/compat/vcbuild/include/arpa/inet.h 
b/compat/vcbuild/include/arpa/inet.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/arpa/inet.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/grp.h b/compat/vcbuild/include/grp.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/grp.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/inttypes.h 
b/compat/vcbuild/include/inttypes.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/inttypes.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/netdb.h b/compat/vcbuild/include/netdb.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/netdb.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/netinet/in.h 
b/compat/vcbuild/include/netinet/in.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/netinet/in.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/netinet/tcp.h 
b/compat/vcbuild/include/netinet/tcp.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/netinet/tcp.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/pwd.h b/compat/vcbuild/include/pwd.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/pwd.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/sys/ioctl.h 
b/compat/vcbuild/include/sys/ioctl.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/sys/ioctl.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/sys/select.h 
b/compat/vcbuild/include/sys/select.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/sys/select.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/sys/socket.h 
b/compat/vcbuild/include/sys/socket.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/sys/socket.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/sys/wait.h 
b/compat/vcbuild/include/sys/wait.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/sys/wait.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/termios.h 
b/compat/vcbuild/include/termios.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/termios.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
-- 
1.7.6.msysgit.0

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

* Re: [PATCH 1/3] MSVC: Compile fix by not including sys/resources.h
  2011-10-21 19:36 [PATCH 1/3] MSVC: Compile fix by not including sys/resources.h Vincent van Ravesteijn
  2011-10-21 19:39 ` [PATCH 2/3] MSVC: Compile fix by including io.h Vincent van Ravesteijn
  2011-10-21 19:42 ` [PATCH 3/3] MSVC: Remove unneeded header stubs Vincent van Ravesteijn
@ 2011-10-22  0:56 ` Junio C Hamano
  2 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2011-10-22  0:56 UTC (permalink / raw)
  To: Vincent van Ravesteijn; +Cc: git

>> ...
>> Subject: [PATCH 1/3] MSVC: Compile fix by not including sys/resources.h
>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
........................................................^^^^^^

Could you refrain from doing that?  It breaks the patch text.

Vincent van Ravesteijn <vfr@lyx.org> writes:

> Fix compilation when compiling with MSVC because sys/resource.h
> is not available. This patch causes a number of other headerfiles
> that are not available to be excluded as well.
>
> Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>

Instead of current

	#ifndef mingw32 is the only one that is strange
        ... everything for systems that is not strainge ...
        #else
        ... include mingw specific tweaks ...
        #endif
        #ifdef msvc is also strange
        ... include msvc specific tweaks ...
        #endif

it turns things around and says what it wants to achieve in a more direct
way, i.e.

	#if mingw32
        #include "compat/mingw.h"
	#elif msvc
        #include "compat/msvc.h"
	#else
        ... all the others ...
	#endif

which makes it look simpler.

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

* [PATCH 3/3] MSVC: Remove unneeded header stubs
  2011-10-31 19:12 [PATCHv2] Compile fix for MSVC Vincent van Ravesteijn
@ 2011-10-31 19:12 ` Vincent van Ravesteijn
  0 siblings, 0 replies; 5+ messages in thread
From: Vincent van Ravesteijn @ 2011-10-31 19:12 UTC (permalink / raw)
  To: git; +Cc: kusmabite, ramsay, msysgit, gitster, Vincent van Ravesteijn

These headers are no longer needed since they are no longer
unnecessarily included in git-compat-util.h.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
---
 compat/vcbuild/include/arpa/inet.h   |    1 -
 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/select.h  |    1 -
 compat/vcbuild/include/sys/socket.h  |    1 -
 compat/vcbuild/include/sys/wait.h    |    1 -
 compat/vcbuild/include/termios.h     |    1 -
 12 files changed, 0 insertions(+), 12 deletions(-)
 delete mode 100644 compat/vcbuild/include/arpa/inet.h
 delete mode 100644 compat/vcbuild/include/grp.h
 delete mode 100644 compat/vcbuild/include/inttypes.h
 delete mode 100644 compat/vcbuild/include/netdb.h
 delete mode 100644 compat/vcbuild/include/netinet/in.h
 delete mode 100644 compat/vcbuild/include/netinet/tcp.h
 delete mode 100644 compat/vcbuild/include/pwd.h
 delete mode 100644 compat/vcbuild/include/sys/ioctl.h
 delete mode 100644 compat/vcbuild/include/sys/select.h
 delete mode 100644 compat/vcbuild/include/sys/socket.h
 delete mode 100644 compat/vcbuild/include/sys/wait.h
 delete mode 100644 compat/vcbuild/include/termios.h

diff --git a/compat/vcbuild/include/arpa/inet.h b/compat/vcbuild/include/arpa/inet.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/arpa/inet.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/grp.h b/compat/vcbuild/include/grp.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/grp.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/inttypes.h b/compat/vcbuild/include/inttypes.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/inttypes.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/netdb.h b/compat/vcbuild/include/netdb.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/netdb.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/netinet/in.h b/compat/vcbuild/include/netinet/in.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/netinet/in.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/netinet/tcp.h b/compat/vcbuild/include/netinet/tcp.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/netinet/tcp.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/pwd.h b/compat/vcbuild/include/pwd.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/pwd.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/sys/ioctl.h b/compat/vcbuild/include/sys/ioctl.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/sys/ioctl.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/sys/select.h b/compat/vcbuild/include/sys/select.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/sys/select.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/sys/socket.h b/compat/vcbuild/include/sys/socket.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/sys/socket.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/sys/wait.h b/compat/vcbuild/include/sys/wait.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/sys/wait.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/compat/vcbuild/include/termios.h b/compat/vcbuild/include/termios.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/termios.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
-- 
1.7.4.1

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

end of thread, other threads:[~2011-10-31 19:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-21 19:36 [PATCH 1/3] MSVC: Compile fix by not including sys/resources.h Vincent van Ravesteijn
2011-10-21 19:39 ` [PATCH 2/3] MSVC: Compile fix by including io.h Vincent van Ravesteijn
2011-10-21 19:42 ` [PATCH 3/3] MSVC: Remove unneeded header stubs Vincent van Ravesteijn
2011-10-22  0:56 ` [PATCH 1/3] MSVC: Compile fix by not including sys/resources.h Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2011-10-31 19:12 [PATCHv2] Compile fix for MSVC Vincent van Ravesteijn
2011-10-31 19:12 ` [PATCH 3/3] MSVC: Remove unneeded header stubs Vincent van Ravesteijn

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).