]> granicus.if.org Git - libass/commitdiff
Fully fix compilation with MSVC/ICL
authorOleg Oshmyan <chortos@inbox.lv>
Sun, 27 Apr 2014 05:55:42 +0000 (06:55 +0100)
committerOleg Oshmyan <chortos@inbox.lv>
Thu, 17 Sep 2015 20:37:10 +0000 (23:37 +0300)
As before, this does not add any build system support:
a config.h file and a project must still be manually created
(or the compiler can be run manually instead of using a project).

Signed-off-by: Grigori Goronzy <greg@kinoho.net>
Signed-off-by: Oleg Oshmyan <chortos@inbox.lv>
22 files changed:
libass/Makefile.am
libass/ass.c
libass/ass_bitmap.c
libass/ass_blur.c
libass/ass_cache.c
libass/ass_compat.h [new file with mode: 0644]
libass/ass_coretext.c
libass/ass_directwrite.c
libass/ass_drawing.c
libass/ass_font.c
libass/ass_fontconfig.c
libass/ass_fontselect.c
libass/ass_library.c
libass/ass_parse.c
libass/ass_rasterizer.c
libass/ass_rasterizer_c.c
libass/ass_render.c
libass/ass_render_api.c
libass/ass_shaper.c
libass/ass_string.c
libass/ass_strtod.c
libass/ass_utils.c

index cef1291a19665c1118228ee85312e4ae29fa3db3..cf075bbd1353531b856ac5518f1adda9a58ad486 100644 (file)
@@ -30,7 +30,7 @@ libass_la_SOURCES = ass.c ass_cache.c ass_font.c ass_fontselect.c ass_render.c \
                     ass_drawing.h ass_cache_template.h ass_render.h \
                     ass_parse.c ass_parse.h ass_render_api.c ass_shaper.c \
                     ass_shaper.h ass_strtod.c ass_fontconfig.c ass_fontconfig.h \
-                    ass_string.h ass_string.c
+                    ass_string.h ass_string.c ass_compat.h
 
 libass_la_LDFLAGS = -no-undefined -version-info $(LIBASS_LT_CURRENT):$(LIBASS_LT_REVISION):$(LIBASS_LT_AGE)
 libass_la_LDFLAGS += -export-symbols $(srcdir)/libass.sym
index 57cc0e2359f58c0dde5c439d0deb622e2222ab51..e8bc843bb0c2ba55063f9e2c2b061ea6cea0981f 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
 
 #include <stdio.h>
 #include <stdlib.h>
index f2480c87231e05baed38c0971f3dfe87690510d1..2c354b3211296bae100169d6101fbc4dd8de73d1 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
 
 #include <stdlib.h>
 #include <string.h>
index f02072549894aee2b3f6b635c75b52b39df8702a..870992eb022f5c9f8ff5b71471cd8a9f9470ea42 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
 
 #include <math.h>
 #include <stdbool.h>
index d1aaec0949097fcad42cf563086e18b70f29579b..d8c561e1cd83f2b50e8c149e078e793e1ea5c7a7 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
 
 #include <inttypes.h>
 #include <ft2build.h>
diff --git a/libass/ass_compat.h b/libass/ass_compat.h
new file mode 100644 (file)
index 0000000..dc3395e
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2015 Oleg Oshmyan <chortos@inbox.lv>
+ *
+ * This file is part of libass.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef LIBASS_COMPAT_H
+#define LIBASS_COMPAT_H
+
+#ifdef _MSC_VER
+#define _CRT_NONSTDC_NO_DEPRECATE
+#define _CRT_SECURE_NO_WARNINGS
+#define _USE_MATH_DEFINES
+#define inline __inline
+#endif
+
+#endif                          /* LIBASS_COMPAT_H */
index 877018d5ca175fccda82734f25de58403881c25e..fdc7bd1f2802b6353f63899ed2249169d6f4edb0 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
 
 #include <CoreFoundation/CoreFoundation.h>
 #include <CoreText/CoreText.h>
index cc0f1edac3bfece1f4faa10bba503dcf6d9538c4..521447d1da95e49f8bc0d2b4332765b2e9b97fbd 100644 (file)
@@ -18,6 +18,7 @@
 #define COBJMACROS
 
 #include "config.h"
+#include "ass_compat.h"
 
 #include <initguid.h>
 #include <ole2.h>
index 9828d575db20221057f5be2e290b43820924fd75..6c99428f8dd1259156e33b71592dc199419a4f48 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
 
 #include <ft2build.h>
 #include FT_OUTLINE_H
index b97567f11a4d3bd0b11c3b72ce426a96d1640375..7dd0e8cb3e4aa3ace6e05561b95c87aaed9cc278 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
 
 #include <inttypes.h>
 #include <ft2build.h>
index 184f090435852f5e201584cc6c7382edbe697aad..30a9d38a2f63371b2a15e2afcc7156bf6e288729 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
 
 #ifdef CONFIG_FONTCONFIG
 
index e75eb1fce9ad3d143f08e21fcb266dd111580cce..cde33323abae92646e7c358b1c78af5f6020c852 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
 
 #include <stdlib.h>
 #include <stdio.h>
index a2945d86619c158982dd810ca5865708dc73467d..6ee5f8192996737d46b523f18aa048b2826fc196 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
 
 #include <inttypes.h>
 #include <stdio.h>
index c818e73b4deb6d38968c9bb295c11f2f60b1fb9a..e6db422453d7049ac24822248b934b81ab21222b 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
 
 #include <stdio.h>
 #include <stdlib.h>
index 91c0cf1fff2cf5570e7006420c1e76f7cf02022f..d8e86e8451a1f5924e0529f2ef9e5c65b1b6f55a 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
 
 #include "ass_utils.h"
 #include "ass_rasterizer.h"
index ac865453bf0873bbb9f60a72c813afabcfa3467a..324cdca6dba57d7747b77210e8cc7f618cc5777e 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
 
 #include "ass_utils.h"
 #include "ass_rasterizer.h"
index e7a306000f4beae94e0423a847c7ecccaccb3616..7044335c6a689684e2ce5fb39e3f708722911c1a 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
 
 #include <assert.h>
 #include <math.h>
index 975cd6379f81dd110a08a7436eb627a3eb9c7b60..4f6b0633908fb765a3eee04cef42525e0d08b2aa 100644 (file)
@@ -18,6 +18,8 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
+
 #include "ass_render.h"
 
 static void ass_reconfigure(ASS_Renderer *priv)
index 658d1ef7fd9bf80ea6a4ccb747cc2aa369fb6e5f..31e368217b19f7513a5579e23e1eba630dd32c35 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
 
 #include "ass_shaper.h"
 #include "ass_render.h"
index dfde674baaa2da062be0dde7d4dc902568d5104e..0a086b12598fc458c9744fc33c9a1bcdad61df8d 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
 
 #include "ass_string.h"
 
index 0d5f752ca02ac3ed30022c78c32eac3de1b27b18..856815c25056b5dec3dcbd8f36664dd3e93a7df4 100644 (file)
@@ -13,6 +13,7 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
 
 #include <stdlib.h>
 #include <errno.h>
index 9c9155b6e99ebdcc3bd3dfb469d7d6321acd073e..10b37a30fe334507b1f8ae42e07390799a904096 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "config.h"
+#include "ass_compat.h"
 
 #include <stddef.h>
 #include <stdlib.h>