changed long to unsigned long in SYSTEM.h and SYSTEM.c0 to silence clang
warnings