mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
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:
parent
60260fb813
commit
ebd7bf99f0
1 changed files with 7 additions and 7 deletions
14
src/util.cpp
14
src/util.cpp
|
@ -25,6 +25,13 @@
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include <cmake.h>
|
#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 <fstream>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
@ -38,13 +45,6 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <math.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 <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue