diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2016-02-20 13:40:01 -0500 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2016-02-20 13:40:01 -0500 |
commit | 750e1c41e97cd9b53da3f6a64938c528951d358b (patch) | |
tree | 5480a3437c939e9672d4f3b025a3a96ed30b179e | |
parent | c743c7f8a871e0bff340db732e2a3203c5ae7f17 (diff) |
Include what you use
-rw-r--r-- | src/encoding.cc | 1 | ||||
-rw-r--r-- | src/operations.cc | 5 | ||||
-rw-r--r-- | src/posix_extras.cc | 4 | ||||
-rw-r--r-- | src/posix_extras.h | 1 | ||||
-rw-r--r-- | src/scoville.cc | 8 |
5 files changed, 10 insertions, 9 deletions
diff --git a/src/encoding.cc b/src/encoding.cc index 93773a6..620a821 100644 --- a/src/encoding.cc +++ b/src/encoding.cc @@ -16,6 +16,7 @@ #include <array> #include <cstdlib> +#include <ios> #include <sstream> #include <string> diff --git a/src/operations.cc b/src/operations.cc index a69b591..326f2a5 100644 --- a/src/operations.cc +++ b/src/operations.cc @@ -15,12 +15,10 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see <http://www.gnu.org/licenses/>. -#define BSD_SOURCE -#define _POSIX_C_SOURCE 201602L - #include "operations.h" #include <cerrno> +#include <cstdint> #include <cstring> #include <experimental/optional> #include <memory> @@ -33,7 +31,6 @@ #include <glog/logging.h> #include <sys/stat.h> #include <sys/types.h> -#include <unistd.h> #include "posix_extras.h" diff --git a/src/posix_extras.cc b/src/posix_extras.cc index 07b459e..6013b9b 100644 --- a/src/posix_extras.cc +++ b/src/posix_extras.cc @@ -12,8 +12,7 @@ // License for the specific language governing permissions and limitations under // the License. -#define _BSD_SOURCE 1 -#define _POSIX_C_SOURCE 201502L +#define _XOPEN_SOURCE 700 #undef _GNU_SOURCE #include "posix_extras.h" @@ -21,6 +20,7 @@ #include <cerrno> #include <experimental/optional> #include <stdexcept> +#include <string> #include <vector> #include <dirent.h> diff --git a/src/posix_extras.h b/src/posix_extras.h index 9aea47d..840b448 100644 --- a/src/posix_extras.h +++ b/src/posix_extras.h @@ -23,7 +23,6 @@ #include <dirent.h> #include <sys/stat.h> #include <sys/types.h> -#include <unistd.h> namespace scoville { diff --git a/src/scoville.cc b/src/scoville.cc index b572b5f..78a29ae 100644 --- a/src/scoville.cc +++ b/src/scoville.cc @@ -14,9 +14,11 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see <http://www.gnu.org/licenses/>. -#include <iostream> #include <memory> +#define FUSE_USE_VERSION 26 +#include <fcntl.h> +#include <fuse/fuse.h> #include <gflags/gflags.h> #include <glog/logging.h> @@ -33,7 +35,9 @@ int main(int argc, char* argv[]) { google::ParseCommandLineFlags(&argc, &argv, true); google::InitGoogleLogging(argv[0]); - // Open an FD to the underlying file system so we can still do operations on + // This is an overlay file system, which means once we start FUSE, the + // underlying file system will be inaccessible through normal means. Open a + // file descriptor to the underlying root now so we can still do operations on // it while it's overlayed. std::unique_ptr<scoville::File> root; const char* const root_path = argv[argc - 1]; |