mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
3fa3f9abb9
Fixes --with-static-linked-ext. Patch by Google Inc. [ruby-core:45073]. * Makefile.in (ENCOBJS, EXTOBJS): New variables to specify static linked libraries. Also reintroduces extinit.o, introduces encinit.o introduces encinit.o * common.mk: Builds static libraries rather than shared objects if specified. * configure.in (LD): new substitution. Avoids PIE if s * enc/depend: Supports static linked libraries (libencs, libenc, libtrans): New target. * enc/encinit.c.erb: new template to generate the initialization of statically linked encodings. * enc/make_encmake.rb (--module): new flag to specify whether static or dynamic. * transcode_data.h (TRANS_INIT): New macro to get rid of the name collision of encoding initializers and transcoder initializers. * ext/extmk.rb: Fixes the behavior on $extstatic is true. * lib/mkmf.rb (clean-static): new target to clean up static linked libraries. * ruby.c (process_options): New initializes statically linked encodings here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
36 lines
1,009 B
Text
36 lines
1,009 B
Text
#include "transcode_data.h"
|
|
|
|
<%
|
|
require 'emoji-exchange-tbl'
|
|
|
|
nomap_table = [
|
|
["{00-7f}", :nomap],
|
|
["{c2-df}{80-bf}", :nomap0],
|
|
["e0{a0-bf}{80-bf}", :nomap0],
|
|
["{e1-ec}{80-bf}{80-bf}", :nomap0],
|
|
["ed{80-9f}{80-bf}", :nomap0],
|
|
["{ee-ef}{80-bf}{80-bf}", :nomap0],
|
|
["f0{90-bf}{80-bf}{80-bf}", :nomap0],
|
|
["{f1-f3}{80-bf}{80-bf}{80-bf}", :nomap0],
|
|
["f4{80-8f}{80-bf}{80-bf}", :nomap0],
|
|
]
|
|
|
|
companies = %w(DoCoMo KDDI SoftBank Unicode)
|
|
companies.each do |from_company|
|
|
companies.each do |to_company|
|
|
next if from_company == to_company
|
|
from_encoding = (from_company == "Unicode") ? "UTF-8" : "UTF8-"+from_company
|
|
to_encoding = (to_company == "Unicode") ? "UTF-8" : "UTF8-"+to_company
|
|
|
|
strict_mapping = EMOJI_EXCHANGE_TBL[from_encoding][to_encoding]
|
|
transcode_tblgen(from_encoding, to_encoding, strict_mapping + nomap_table, nil)
|
|
end
|
|
end
|
|
%>
|
|
|
|
<%= transcode_generated_code %>
|
|
|
|
TRANS_INIT(emoji)
|
|
{
|
|
<%= transcode_register_code %>
|
|
}
|