patches/libmtp-02-u_int.diff
author jurikm
Sun, 12 Feb 2012 14:04:10 +0000
changeset 8245 383896da4129
parent 2225 fe592484358a
permissions -rw-r--r--
SFEsauerbraten.spec: add IPS package name
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2225
fe592484358a 2009-10-29 James Choi <[email protected]>
jchoi42
parents: 486
diff changeset
     1
--- libmtp-1.0.1-orig/configure.ac	2009-10-23 01:08:15.464268552 -0400
fe592484358a 2009-10-29 James Choi <[email protected]>
jchoi42
parents: 486
diff changeset
     2
+++ libmtp-1.0.1/configure.ac	2009-10-23 01:10:04.270117940 -0400
fe592484358a 2009-10-29 James Choi <[email protected]>
jchoi42
parents: 486
diff changeset
     3
@@ -96,6 +96,27 @@
486
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     4
 # (No need to use AC_SUBST on this default substituted environment variable.)
2225
fe592484358a 2009-10-29 James Choi <[email protected]>
jchoi42
parents: 486
diff changeset
     5
 #CFLAGS="$CFLAGS -Wall -Wmissing-prototypes"
486
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     6
 
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     7
+AC_MSG_CHECKING([if inttypes has u_int32_t etc])
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     8
+AC_COMPILE_IFELSE(
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     9
+    [AC_LANG_PROGRAM(
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    10
+        [[
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    11
+#if HAVE_SYS_TYPES_H
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    12
+#include <sys/types.h>
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    13
+#endif
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    14
+#if HAVE_INTTYPES_H
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    15
+#include <inttypes.h>
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    16
+#endif
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    17
+#if HAVE_UNISTD_H
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    18
+#include <unistd.h>
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    19
+#endif
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    20
+        ]],[[
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    21
+    u_int32_t  s;
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    22
+    sleep((unsigned int)s);
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    23
+        ]]
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    24
+    )],
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    25
+    [AC_DEFINE(HAVE_U_INT_TYPES, 1, [Define to 1 if have u_int32_t types etc])
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    26
+    AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
2225
fe592484358a 2009-10-29 James Choi <[email protected]>
jchoi42
parents: 486
diff changeset
    27
+ 
486
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    28
 # Output files
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    29
 
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    30
 # Create a stdint.h-like file containing size-specific integer definitions
2225
fe592484358a 2009-10-29 James Choi <[email protected]>
jchoi42
parents: 486
diff changeset
    31
--- libmtp-1.0.1-orig/examples/common.h	2009-10-23 01:11:22.968773695 -0400
fe592484358a 2009-10-29 James Choi <[email protected]>
jchoi42
parents: 486
diff changeset
    32
+++ libmtp-1.0.1/examples/common.h	2009-10-23 01:11:55.749290619 -0400
fe592484358a 2009-10-29 James Choi <[email protected]>
jchoi42
parents: 486
diff changeset
    33
@@ -32,3 +32,10 @@
486
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    34
 // Only if using MSVC...
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    35
 #include "..\windows\getopt.h"
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    36
 #endif
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    37
+#ifndef HAVE_U_INT_TYPES
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    38
+typedef uint8_t u_int8_t;
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    39
+typedef uint16_t u_int16_t;
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    40
+typedef uint32_t u_int32_t;
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    41
+typedef uint64_t u_int64_t;
5705ff477924 2007-09-18 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    42
+#endif
2225
fe592484358a 2009-10-29 James Choi <[email protected]>
jchoi42
parents: 486
diff changeset
    43
+