]> git.sesse.net Git - x264/commitdiff
configure: add QNX support
authorMike Gorchak <mike.gorchak.qnx@gmail.com>
Sun, 3 Feb 2013 07:35:00 +0000 (23:35 -0800)
committerFiona Glaser <fiona@x264.com>
Mon, 25 Feb 2013 20:14:33 +0000 (12:14 -0800)
common/common.c
configure
x264.h

index 0efe6d38bec1719754ded37295b98b6798f75960..de6e9ff42fdf9274a991c3b5e9aa67315725bd45 100644 (file)
@@ -563,6 +563,8 @@ static double x264_atof( const char *str, int *b_error )
 }
 
 #define atobool(str) ( name_was_bool = 1, x264_atobool( str, &b_error ) )
+#undef atoi
+#undef atof
 #define atoi(str) x264_atoi( str, &b_error )
 #define atof(str) x264_atof( str, &b_error )
 
index 4d663aaf04ea7d1bcc0efdabb0e22cd3b7578259..c974ba4025be6949593780917698e22fba44d1fb 100755 (executable)
--- a/configure
+++ b/configure
@@ -521,6 +521,13 @@ case $host_os in
         fi
         HAVE_GETOPT_LONG=0
         ;;
+    *qnx*)
+        SYS="QNX"
+        define HAVE_MALLOC_H
+        libm="-lm"
+        HAVE_GETOPT_LONG=0
+        CFLAGS="$CFLAGS -I\$(SRCPATH)/extras"
+        ;;
     *)
         die "Unknown system $host, edit the configure"
         ;;
@@ -772,6 +779,9 @@ if [ "$thread" = "auto" ]; then
                 thread="win32"
             fi
             ;;
+        QNX)
+            cc_check pthread.h -lc && thread="posix" && libpthread="-lc"
+            ;;
         *)
             cc_check pthread.h -lpthread && thread="posix" && libpthread="-lpthread"
             ;;
diff --git a/x264.h b/x264.h
index fff3ab38f4cfbc6e05963e3e048559670e5eb3c2..a93db090b7715a4bd55653aa0c2585aeb44ba754 100644 (file)
--- a/x264.h
+++ b/x264.h
@@ -28,7 +28,7 @@
 #ifndef X264_X264_H
 #define X264_X264_H
 
-#if !defined(_STDINT_H) && !defined(_STDINT_H_) && \
+#if !defined(_STDINT_H) && !defined(_STDINT_H_) && !defined(_STDINT_H_INCLUDED) &&\
     !defined(_INTTYPES_H) && !defined(_INTTYPES_H_)
 # ifdef _MSC_VER
 #  pragma message("You must include stdint.h or inttypes.h before x264.h")