D2848: xdiff: move stdint.h to xdiff.h

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

D2848: xdiff: move stdint.h to xdiff.h

indygreg (Gregory Szorc)
quark created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  It's more correct to put it in xdiff.h since that file actually uses int64_t
  etc and xdiff.h is included by xinclude.h.
 
  This should fix the oss-fuzz build. Thanks durin42 for discovering the
  issue.

TEST PLAN
  `make local` and xdiff related tests still work.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2848

AFFECTED FILES
  mercurial/thirdparty/xdiff/xdiff.h
  mercurial/thirdparty/xdiff/xinclude.h

CHANGE DETAILS

diff --git a/mercurial/thirdparty/xdiff/xinclude.h b/mercurial/thirdparty/xdiff/xinclude.h
--- a/mercurial/thirdparty/xdiff/xinclude.h
+++ b/mercurial/thirdparty/xdiff/xinclude.h
@@ -24,13 +24,6 @@
 #define XINCLUDE_H
 
 #include <ctype.h>
-#if !defined(_MSC_VER) || _MSC_VER >= 1600
-#include <stdint.h>
-#else
-/* prior to Visual Studio 2010 */
-typedef long long int64_t;
-typedef unsigned long long uint64_t;
-#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/mercurial/thirdparty/xdiff/xdiff.h b/mercurial/thirdparty/xdiff/xdiff.h
--- a/mercurial/thirdparty/xdiff/xdiff.h
+++ b/mercurial/thirdparty/xdiff/xdiff.h
@@ -29,6 +29,14 @@
 
 #include <stddef.h> /* size_t */
 
+#if !defined(_MSC_VER) || _MSC_VER >= 1600
+#include <stdint.h>
+#else
+/* prior to Visual Studio 2010 */
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+#endif
+
 /* xpparm_t.flags */
 #define XDF_NEED_MINIMAL (1 << 0)
 



To: quark, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

D2848: xdiff: move stdint.h to xdiff.h

indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGafebb7588e95: xdiff: move stdint.h to xdiff.h (authored by quark, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2848?vs=7005&id=7006

REVISION DETAIL
  https://phab.mercurial-scm.org/D2848

AFFECTED FILES
  mercurial/thirdparty/xdiff/xdiff.h
  mercurial/thirdparty/xdiff/xinclude.h

CHANGE DETAILS

diff --git a/mercurial/thirdparty/xdiff/xinclude.h b/mercurial/thirdparty/xdiff/xinclude.h
--- a/mercurial/thirdparty/xdiff/xinclude.h
+++ b/mercurial/thirdparty/xdiff/xinclude.h
@@ -24,13 +24,6 @@
 #define XINCLUDE_H
 
 #include <ctype.h>
-#if !defined(_MSC_VER) || _MSC_VER >= 1600
-#include <stdint.h>
-#else
-/* prior to Visual Studio 2010 */
-typedef long long int64_t;
-typedef unsigned long long uint64_t;
-#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/mercurial/thirdparty/xdiff/xdiff.h b/mercurial/thirdparty/xdiff/xdiff.h
--- a/mercurial/thirdparty/xdiff/xdiff.h
+++ b/mercurial/thirdparty/xdiff/xdiff.h
@@ -29,6 +29,14 @@
 
 #include <stddef.h> /* size_t */
 
+#if !defined(_MSC_VER) || _MSC_VER >= 1600
+#include <stdint.h>
+#else
+/* prior to Visual Studio 2010 */
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+#endif
+
 /* xpparm_t.flags */
 #define XDF_NEED_MINIMAL (1 << 0)
 



To: quark, #hg-reviewers, durin42
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel