Closed Bug 1155263 Opened 4 years ago Closed 4 years ago

missing <stdint.h> header in rulebrk.c

Categories

(Core :: Internationalization, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: fabrice, Assigned: fabrice)

Details

Attachments

(1 file)

With a slightly non standard config, I was hitting this build error:
In file included from /home/fabrice/dev/b2g-inbound/intl/lwbrk/rulebrk.c:8:0:
/home/fabrice/dev/b2g-inbound/intl/lwbrk/th_char.h:25:1: error: unknown type name ‘uint16_t’
 typedef uint16_t th_char;
 ^

In the directory  /home/fabrice/dev/builds/obj-fx/intl/lwbrk
The following command failed to execute properly:
/usr/bin/ccache gcc -o rulebrk.o -c -I../../dist/system_wrappers -include /home/fabrice/dev/b2g-inbound/config/gcc_hidden.h -DSTATIC_EXPORTABLE_JS_API -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DMOZ_GLUE_IN_PROGRAM -DAB_CD=en-US -DNO_NSPR_10_SUPPORT -I/home/fabrice/dev/b2g-inbound/intl/lwbrk -I. -I../../dist/include -I/home/fabrice/dev/builds/obj-b2g/dist/include/nspr -I/home/fabrice/dev/builds/obj-b2g/dist/include/nss -fPIC -include ../../mozilla-config.h -DMOZILLA_CLIENT -MD -MP -MF .deps/rulebrk.o.pp -Wall -Wdeclaration-after-statement -Wempty-body -Wpointer-to-int-cast -Wsign-compare -Wtype-limits -Wno-unused -Wcast-align -std=gnu99 -fgnu89-inline -fno-strict-aliasing -fno-math-errno -pthread -pipe -DNDEBUG -DTRIMMED -g -freorder-blocks -Os -fomit-frame-pointer /home/fabrice/dev/b2g-inbound/intl/lwbrk/rulebrk.c
make[5]: *** [rulebrk.o] Error 1
make[5]: Leaving directory `/home/fabrice/dev/builds/obj-b2g/intl/lwbrk'

This is fixed by including <stdint.h>
Attached patch intl.patchSplinter Review
Attachment #8593459 - Flags: review?(dholbert)
Comment on attachment 8593459 [details] [diff] [review]
intl.patch

Looks like this is mozilla code (based on the license header at least), so it seems reasonable to tweak it.  It's just been moved around since the CVS --> HG migration, and the changes in CVS era were minimal:
ttp://bonsai.mozilla.org/cvslog.cgi?file=mozilla/intl/lwbrk/src/rulebrk.c&rev=HEAD&mark=1.4

So, I'm relatively sure we're not stepping on anyone's toes. And it's a clearly-correct fix (modulo whether the include belongs in this .c file or in the header -- but this is fine, particularly given that the header only uses this type when it's included from C code).

So, r+.
Attachment #8593459 - Flags: review?(dholbert) → review+
https://hg.mozilla.org/mozilla-central/rev/4435419342eb
Status: NEW → RESOLVED
Closed: 4 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.