486
|
1 |
--- libmtp-0.2.1/configure.ac.orig 2007-09-18 15:57:27.571218159 +0700
|
|
2 |
+++ libmtp-0.2.1/configure.ac 2007-09-18 15:57:32.866226254 +0700
|
|
3 |
@@ -87,6 +87,26 @@
|
|
4 |
# (No need to use AC_SUBST on this default substituted environment variable.)
|
|
5 |
# CFLAGS="$CFLAGS -Wall -Wmissing-prototypes"
|
|
6 |
|
|
7 |
+AC_MSG_CHECKING([if inttypes has u_int32_t etc])
|
|
8 |
+AC_COMPILE_IFELSE(
|
|
9 |
+ [AC_LANG_PROGRAM(
|
|
10 |
+ [[
|
|
11 |
+#if HAVE_SYS_TYPES_H
|
|
12 |
+#include <sys/types.h>
|
|
13 |
+#endif
|
|
14 |
+#if HAVE_INTTYPES_H
|
|
15 |
+#include <inttypes.h>
|
|
16 |
+#endif
|
|
17 |
+#if HAVE_UNISTD_H
|
|
18 |
+#include <unistd.h>
|
|
19 |
+#endif
|
|
20 |
+ ]],[[
|
|
21 |
+ u_int32_t s;
|
|
22 |
+ sleep((unsigned int)s);
|
|
23 |
+ ]]
|
|
24 |
+ )],
|
|
25 |
+ [AC_DEFINE(HAVE_U_INT_TYPES, 1, [Define to 1 if have u_int32_t types etc])
|
|
26 |
+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
|
|
27 |
# Output files
|
|
28 |
|
|
29 |
# Create a stdint.h-like file containing size-specific integer definitions
|
|
30 |
--- libmtp-0.2.1/examples/common.h.orig 2007-09-18 16:00:32.671373913 +0700
|
|
31 |
+++ libmtp-0.2.1/examples/common.h 2007-09-18 16:01:02.820289580 +0700
|
|
32 |
@@ -32,3 +32,12 @@
|
|
33 |
// Only if using MSVC...
|
|
34 |
#include "..\windows\getopt.h"
|
|
35 |
#endif
|
|
36 |
+#ifdef HAVE_INTTYPES_H
|
|
37 |
+#include <inttypes.h>
|
|
38 |
+#endif
|
|
39 |
+#ifndef HAVE_U_INT_TYPES
|
|
40 |
+typedef uint8_t u_int8_t;
|
|
41 |
+typedef uint16_t u_int16_t;
|
|
42 |
+typedef uint32_t u_int32_t;
|
|
43 |
+typedef uint64_t u_int64_t;
|
|
44 |
+#endif
|