Remove build_atomic_ops.sh

* Makefile.am (EXTRA_DIST): Remove build_atomic_ops.sh,
build_atomic_ops.sh.cygwin entries.
* Makefile.direct (OTHER_MAKEFILES): Likewise.
* Makefile.direct (AO_SRC_DIR): Update comment.
* Makefile.direct (AO_INSTALL_DIR): Remove variable.
* Makefile.direct (CFLAGS_EXTRA): New variable (empty by default).
* Makefile.direct (CFLAGS, SPECIALCFLAGS): Replace
"$(AO_INSTALL_DIR)/include" with "$(AO_SRC_DIR)/src" include folder.
* Makefile.direct (CFLAGS): Add $(CFLAGS_EXTRA).
* Makefile.direct (OBJS): Add atomic_ops.o, atomic_ops_sysdeps.o
entries.
* Makefile.direct (AO_INSTALL_DIR): Remove rule (build essential .o
files of libatomic_ops directly instead of configure and make).
* Makefile.direct (atomic_ops.o, atomic_ops_sysdeps.o): Add rule.
* Makefile.direct (tests/test.o, setjmp_test): Remove dependency on
$(AO_INSTALL_DIR).
* Makefile.direct (gc.a): Do not copy contents of libatomic_ops.a to
gc.a.
* Makefile.direct (sunos5gc.so): Do not link with libatomic_ops.a.
* Makefile.direct (gc.tar): Do not make libatomic_ops.
* build_atomic_ops.sh: Remove file.
* build_atomic_ops.sh.cygwin: Likewise.
Fix unresolved vsnprintf in misc.c and snprintf in cordtest (DJGPP, VC)

* cord/tests/cordtest.c (GC_SNPRINTF, GC_SNPRINTF_BUFSZ_ARG): New
macro to workaround snprintf() missing in DJGPP and MS VC.
* cord/tests/cordtest.c (test_printf): Replace snprintf() with
GC_SNPRINTF and GC_SNPRINTF_BUFSZ_ARG.
* misc.c (GC_VSNPRINTF): Test DJGPP instead of NO_VSNPRINTF; refine
comment.
Remove Makefile.dj (and README.dj) in favor of configure (DJGPP)

* Makefile.am (EXTRA_DIST): Remove Makefile.dj entry.
* Makefile.direct (OTHER_MAKEFILES): Likewise.
* Makefile.direct (DOC_FILES): Remove doc/README.dj entry.
* doc/doc.am (dist_pkgdata_DATA): Likewise.
* Makefile.dj: Remove file ("configure" is to be used to build libgc,
no special options needed).
* doc/README.dj: Likewise.
Fix 'cord' headers path in EMX_MAKEFILE and README.QUICK

* EMX_MAKEFILE (CORD_INCLUDE_FILES): Replace cord/*.h files with
include/*.h ones (all "cord" header files moved in gc4.8).
* EMX_MAKEFILE (cords): Do not copy cord/*.h files to "include"
folder.
* README.QUICK: Replace cord/cord.h with include/cord.h; move sentence
about cord.h to the relevant paragraph.
Fix 'implicit declaration of vsnprintf' GCC warning (if strict ANSI mode)

* cord/tests/cordtest.c (GC_SNPRINTF): Redirect to sprintf also in
case of __STRICT_ANSI__ (i.e., if -ansi compiler option specified).
* misc.c (GC_VSNPRINTF): Redirect to vsprintf also in case of
__STRICT_ANSI__.
Fix EMX_MAKEFILE (adjust path to header files, add -I option)

* EMX_MAKEFILE: Remove comment about renaming to Makefile.
* EMX_MAKEFILE (CFLAGS, SPECIALCFLAGS): Add "-I include" option.
* EMX_MAKEFILE (CXXFLAGS): New variable (set to CFLAGS value).
* EMX_MAKEFILE (CORD_INCLUDE_FILES, test.o, setjmp_test.exe): Adjust
path to gc.h.
* EMX_MAKEFILE (SHELL): Remove special variable (not needed for EMX).
* EMX_MAKEFILE (test.o): Adjust path to dependencies (gc_priv.h,
gc_hdrs.h, gcconfig.h, gc_typed.h).
* EMX_MAKEFILE (gc_cpp.o, c++): Adjust path to gc_cpp.h.
* EMX_MAKEFILE (gc_cpp.o): Use CXXFLAGS value instead of "-O".
* EMX_MAKEFILE (c++): Do not copy gc_cpp.h to "include" folder.
Update TODO file (regarding Makefile.dj, build_atomic_ops.sh)
Fix vsprintf_args initialization/cleanup in CORD_vsprintf for EMX

* cord/cordprnt.c (CORD_vsprintf): Do not use va_copy and va_end if
EMX (as the primitives are missing).
Add support for emscripten platform
Code refactoring of Emscripten platform support (single-threaded)

* alloc.c (min_bytes_allocd): Test STACK_NOT_SCANNED macro instead
of __EMSCRIPTEN__ (stack size to scan is zero if STACK_NOT_SCANNED).
* include/private/gcconfig.h (ALIGNMENT): Remove duplicate definition
for _EMSCRIPTEN__.
* include/private/gcconfig.h (STACK_NOT_SCANNED): New macro defined
for __EMSCRIPTEN__ target (in addition to  OS_TYPE, CPP_WORDSZ,
ALIGNMENT, DATASTART, DATAEND).
* mach_dep.c (GC_push_regs): Test STACK_NOT_SCANNED macro instead
of __EMSCRIPTEN__ (push nothing if STACK_NOT_SCANNED).
* mark_rts.c (GC_push_roots): Test STACK_NOT_SCANNED macro instead
of __EMSCRIPTEN__ (do not call GC_push_regs_and_stack if
STACK_NOT_SCANNED); mark cold_gc_frame argument as potentially unused.
* misc.c (GC_clear_stack): Test STACK_NOT_SCANNED macro instead
of __EMSCRIPTEN__ (do not clear stack if STACK_NOT_SCANNED).
* misc.c (GC_clear_stack): Reformat code.
Update AUTHORS file
Merge branch 'Unity-Technologies-upstreaming/emscripten'
Fix Unicode Win32 API calls in cord de_win

* cord/tests/de_win.c (FullAppName): Remove global variable.
* cord/tests/de_win.c (szAppName): Turn into macro; use TEXT().
* cord/tests/de_win.c (de_error): Force calling ANSI version of
MessageBox; remove casts to LPSTR.
* cord/tests/de_win.c (WinMain): Use TEXT() for lpszMenuName field and
for CreateWindow agrument.
* cord/tests/de_win.c (WndProc): Use TEXT() for DialogBox argument;
force calling ANSI version of TextOut.
Add support for OpenRISC/or1k

* include/private/gcconfig.h (OR1K, mach_type_known, CPP_WORDSZ,
MACH_TYPE, OS_TYPE, DYNAMIC_LOADING, _end, DATAEND, __data_start,
DATASTART, ALIGNMENT, HBLKSIZE, LINUX_STACKBOTTOM): Define for __or1k__.
Update AUTHORS file
Fix pthreads-win32 name in comments and documentation

* configure.ac (GC_WIN32_PTHREADS): Fix pthreads-win32 name.
* doc/README.macros (GC_WIN32_PTHREADS): Likewise.
* doc/README.win32: Likewise.
* include/gc.h (GC_WIN32_THREADS): Likewise.
* include/gc_config_macros.h (GC_WIN32_PTHREADS): Likewise.
* include/private/gc_locks.h (NUMERIC_THREAD_ID): Likewise.
* win32_threads.c (GC_pthread_join): Likewise.
* doc/README.win32: Add information how to build for Win32 with
pthreads-win32 using configure.
* include/private/gc_locks.h (NUMERIC_THREAD_ID): Adjust comment
(capitalize 1st word of a sentence, add dot at sentence end).
* win32_threads.c (GC_pthread_join): Join adjacent GC_WIN32_PTHREADS
checks; refine comment about pthreads-win32 id.
Fix assertion on mark_lock_holder for non-unique NUMERIC_THREAD_ID

* pthread_support.c (GC_acquire_mark_lock): Avoid assertion that
GC_mark_lock_holder != NUMERIC_THREAD_ID(pthread_self()) unless
NUMERIC_THREAD_ID_UNIQUE.
* win32_threads.c (GC_acquire_mark_lock): Likewise.
* win32_threads.c (NUMERIC_THREAD_ID): Add comment.
Support winpthreads

Winpthreads is a different pthread implementation for MinGW-w64.
This patch redefines GC_WIN32_PTHREADS to mean either pthreads-win32
or winpthreads.

* configure.ac (GC_WIN32_PTHREADS): Improve description to cover
"winpthreads" library.
* doc/README.macros (GC_WIN32_PTHREADS): Likewise.
* doc/README.win32: Likewise.
* include/gc_config_macros.h (GC_WIN32_THREADS): Mention "winpthreads"
library in comment.
* win32_threads.c (GC_pthread_join): Likewise.
* include/private/gc_locks.h (NUMERIC_THREAD_ID, THREAD_EQUAL,
NUMERIC_THREAD_ID_UNIQUE): Define to support winpthreads properly (if
GC_WIN32_PTHREADS).
* win32_threads.c (GC_PTHREAD_PTRVAL): Likewise.
Update AUTHORS file (update email for Peter Wang)
Fix getcontext usage on OpenRISC/or1k

* include/private/gcconfig.h (NO_GETCONTEXT): Do not use getcontext(2)
on OpenRISC 1000 (or1k) as it is not implemented yet.