converting this to full C99 standards in gcc