Portability

- Moved stdio.h to be (almost) first in the include order, to prevent and other
  include from in turn including stdio.h without first defining _WITH_GETLINE.
This commit is contained in:
Paul Beckingham 2014-08-31 00:05:08 -04:00
parent 60260fb813
commit ebd7bf99f0

View file

@ -25,6 +25,13 @@
////////////////////////////////////////////////////////////////////////////////
#include <cmake.h>
// If <iostream> is included, put it after <stdio.h>, because it includes
// <stdio.h>, and therefore would ignore the _WITH_GETLINE.
#ifdef FREEBSD
#define _WITH_GETLINE
#endif
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <limits>
#include <sstream>
@ -38,13 +45,6 @@
#include <fcntl.h>
#include <unistd.h>
#include <math.h>
// If <iostream> is included, put it after <stdio.h>, because it includes
// <stdio.h>, and therefore would ignore the _WITH_GETLINE.
#ifdef FREEBSD
#define _WITH_GETLINE
#endif
#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <string.h>
#include <pwd.h>