runrev/livecode — pull request #1487 by peter-b (2014-11-17 10:12:13+00:00)
Title: [[ Bug 14029 ]] Read server scripts even when not memory mapped.

In the original implementation of the server script loader, it was
assumed that:

1) if a file is memory mapped, MCSystemFileHandle::GetFilePointer()
returns the address of the memory mapped buffer.

2) if a file was not successfully memory mapped,
MCSystemFileHandle::GetFilePointer() returns NULL.

Assumption 1 is correct. Assumption 2 is not; in that case,
GetFilePointer() returns a FILE *.

In almost all cases, a local file *can* be memory mapped, and so the
fallback case is not ever used. However, the Linux kernel (correctly)
refuses to map a zero-length file.

This patch changes the server script loader to use
MCS_loadbinaryfile(), since this is a clean way to obtain the raw
contents of a file.