[vlc-devel] [PATCH] Fit a DLL name longer than 8 characters to 8.3 limit on OS/2

KO Myung-Hun komh78 at gmail.com
Sun Oct 21 07:24:59 CEST 2012


---
 modules/genmf                 |   13 +++++++++++++
 modules/mmx/Modules.am        |    9 +++++++++
 modules/sse2/Modules.am       |    9 +++++++++
 modules/stream_out/Modules.am |    9 +++++++++
 4 files changed, 40 insertions(+), 0 deletions(-)
 mode change 100755 => 100644 modules/genmf

diff --git a/modules/genmf b/modules/genmf
old mode 100755
new mode 100644
index 0b9bdb5..ab5b8e1
--- a/modules/genmf
+++ b/modules/genmf
@@ -9,6 +9,8 @@
 
 cd $(dirname "$0")/.. || exit 1
 
+system_name=$(uname -s)
+
 while test "$1"
 do
   dir="$1"
@@ -49,6 +51,14 @@ include \$(top_srcdir)/modules/common.am
 EOF
   for mod in $mods
   do
+    shortname_flag=
+    if test "$system_name" = "OS/2"; then
+        shortname="`echo $mod | sed -e s/access_/a_/ -e s/output_/o_/ -e s/memcpy/mc/ -e s/packetizer_/p_/ -e s/stream_/s_/ -e s/filter_/f_/ -e s/out_/o_/ -e s/i420_/i0_/ -e s/i422_/i2_/ -e s/yuy2_/y2_/ -e s/ymga_/ym_/ -e s/converter_/c_/ -e s/audiobargraph/abg/`"
+        if test "$mod" != "$shortname"; then
+            shortname_flag="-shortname `echo ${shortname}_plugin | cut -b -8`"
+        fi
+    fi
+
     cat >> "${makf}" << EOF
 # The ${mod} plugin
 lib${mod}_plugin_la_SOURCES = \$(SOURCES_${mod})
@@ -61,6 +71,9 @@ lib${mod}_plugin_la_OBJCFLAGS = \$(AM_OBJCFLAGS) \$(OBJCFLAGS_${mod})
 # Set LIBADD manually:
 lib${mod}_plugin_la_LIBADD = \$(AM_LIBADD) \$(LIBS_${mod})
 lib${mod}_plugin_la_LDFLAGS = \$(AM_LDFLAGS) \$(LDFLAGS_${mod})
+if HAVE_OS2
+lib${mod}_plugin_la_LDFLAGS += $shortname_flag
+endif
 
 EOF
   done
diff --git a/modules/mmx/Modules.am b/modules/mmx/Modules.am
index e4dec7d..0681180 100644
--- a/modules/mmx/Modules.am
+++ b/modules/mmx/Modules.am
@@ -5,18 +5,27 @@ libi420_rgb_mmx_plugin_la_SOURCES = \
         i420_rgb_mmx.h
 libi420_rgb_mmx_plugin_la_CFLAGS = $(AM_CFLAGS)
 libi420_rgb_mmx_plugin_la_LIBADD = $(AM_LIBADD)
+if HAVE_OS2
+libi420_rgb_mmx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -shortname i0_r_mx
+endif
 
 libi420_yuy2_mmx_plugin_la_SOURCES = \
         ../video_chroma/i420_yuy2.c \
 	../video_chroma/i420_yuy2.h
 libi420_yuy2_mmx_plugin_la_CFLAGS = $(AM_CFLAGS)
 libi420_yuy2_mmx_plugin_la_LIBADD = $(AM_LIBADD)
+if HAVE_OS2
+libi420_yuy2_mmx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -shortname i0_y2_mx
+endif
 
 libi422_yuy2_mmx_plugin_la_SOURCES = \
         ../video_chroma/i422_yuy2.c \
 	../video_chroma/i422_yuy2.h
 libi422_yuy2_mmx_plugin_la_CFLAGS = $(AM_CFLAGS)
 libi422_yuy2_mmx_plugin_la_LIBADD = $(AM_LIBADD)
+if HAVE_OS2
+libi422_yuy2_mmx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -shortname i2_y2_mx
+endif
 
 libvlc_LTLIBRARIES += \
 	libi420_rgb_mmx_plugin.la \
diff --git a/modules/sse2/Modules.am b/modules/sse2/Modules.am
index 2d38445..f9fb820 100644
--- a/modules/sse2/Modules.am
+++ b/modules/sse2/Modules.am
@@ -5,18 +5,27 @@ libi420_rgb_sse2_plugin_la_SOURCES = \
         ../mmx/i420_rgb_mmx.h
 libi420_rgb_sse2_plugin_la_CFLAGS = $(AM_CFLAGS)
 libi420_rgb_sse2_plugin_la_LIBADD = $(AM_LIBADD)
+if HAVE_OS2
+libi420_rgb_sse2_plugin_la_LDFLAGS = $(AM_LDFLAGS) -shortname i0_r_s2
+endif
 
 libi420_yuy2_sse2_plugin_la_SOURCES = \
         ../video_chroma/i420_yuy2.c \
 	../video_chroma/i420_yuy2.h
 libi420_yuy2_sse2_plugin_la_CFLAGS = $(AM_CFLAGS)
 libi420_yuy2_sse2_plugin_la_LIBADD = $(AM_LIBADD)
+if HAVE_OS2
+libi420_yuy2_sse2_plugin_la_LDFLAGS = $(AM_LDFLAGS) -shortname i0_y2_s2
+endif
 
 libi422_yuy2_sse2_plugin_la_SOURCES = \
         ../video_chroma/i422_yuy2.c \
 	../video_chroma/i422_yuy2.h
 libi422_yuy2_sse2_plugin_la_CFLAGS = $(AM_CFLAGS)
 libi422_yuy2_sse2_plugin_la_LIBADD = $(AM_LIBADD)
+if HAVE_OS2
+libi422_yuy2_sse2_plugin_la_LDFLAGS = $(AM_LDFLAGS) -shortname i2_y2_s2
+endif
 
 libvlc_LTLIBRARIES += \
 	libi420_rgb_sse2_plugin.la \
diff --git a/modules/stream_out/Modules.am b/modules/stream_out/Modules.am
index 26ad06b..ff204bf 100644
--- a/modules/stream_out/Modules.am
+++ b/modules/stream_out/Modules.am
@@ -20,6 +20,9 @@ libstream_out_transcode_plugin_la_SOURCES = \
 	transcode/osd.c transcode/spu.c transcode/audio.c transcode/video.c
 libstream_out_transcode_plugin_la_CFLAGS = $(AM_CFLAGS)
 libstream_out_transcode_plugin_la_LIBADD = $(AM_LIBADD)
+if HAVE_OS2
+libstream_out_transcode_plugin_la_LDFLAGS = $(AM_LDFLAGS) -shortname s_o_tran
+endif
 
 libvlc_LTLIBRARIES += \
 	libstream_out_dummy_plugin.la \
@@ -46,6 +49,9 @@ libstream_out_rtp_plugin_la_SOURCES = \
 	rtp.c rtp.h rtpfmt.c rtcp.c rtsp.c vod.c
 libstream_out_rtp_plugin_la_CFLAGS = $(AM_CFLAGS)
 libstream_out_rtp_plugin_la_LIBADD = $(AM_LIBADD) $(SOCKET_LIBS)
+if HAVE_OS2
+libstream_out_rtp_plugin_la_LDFLAGS = $(AM_LDFLAGS) -shortname s_o_rtp
+endif
 if HAVE_GCRYPT
 SRTP_CFLAGS = -I$(top_srcdir)/modules/access/rtp
 SRTP_LIBS = $(top_builddir)/modules/access/rtp/libvlc_srtp.la
@@ -58,6 +64,9 @@ endif
 libstream_out_raop_plugin_la_SOURCES = raop.c
 libstream_out_raop_plugin_la_CFLAGS = $(AM_CFLAGS) $(GCRYPT_CFLAGS)
 libstream_out_raop_plugin_la_LIBADD = $(AM_LIBADD) $(GCRYPT_LIBS) -lgpg-error $(LIBS_stream_out_raop)
+if HAVE_OS2
+libstream_out_raop_plugin_la_LDFLAGS = $(AM_LDFLAGS) -shortname s_o_raop
+endif
 if HAVE_GCRYPT
 libvlc_LTLIBRARIES += libstream_out_raop_plugin.la
 endif
-- 
1.7.3.2




More information about the vlc-devel mailing list