Internal APIs from cutils.c and other utility functions should be made static in the amalgamated source to prevent name clashes with the project it is linked to.
Suggested solutions:
- 
use the preprocessor with a JS_INTERNALstorage class for such symbols that would expand to nothing in the regular case and tostaticin the amalgamated source
 
- 
add the statickeyword on all symbols not explicitly tagged asJS_EXTERNwhen amalgamating sources
 
Originally posted by @chqrlie in #936 (comment) with light editing by yours truly