aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/util.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r--src/libutil/util.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index 2e5f4ca4e..ca0b5737c 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -35,7 +35,7 @@ extern const std::string nativeSystem;
/* Return an environment variable. */
-string getEnv(const string & key, const string & def = "");
+std::optional<std::string> getEnv(const std::string & key);
/* Get the entire environment. */
std::map<std::string, std::string> getEnv();
@@ -158,7 +158,7 @@ void readFull(int fd, unsigned char * buf, size_t count);
void writeFull(int fd, const unsigned char * buf, size_t count, bool allowInterrupts = true);
void writeFull(int fd, const string & s, bool allowInterrupts = true);
-MakeError(EndOfFile, Error)
+MakeError(EndOfFile, Error);
/* Read a file descriptor until EOF occurs. */
@@ -339,10 +339,10 @@ void inline checkInterrupt()
_interrupted();
}
-MakeError(Interrupted, BaseError)
+MakeError(Interrupted, BaseError);
-MakeError(FormatError, Error)
+MakeError(FormatError, Error);
/* String tokenizer. */