summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/history.h24
-rw-r--r--include/version.h2
2 files changed, 25 insertions, 1 deletions
diff --git a/include/history.h b/include/history.h
index 460524bd7b87..13f6dc6e985c 100644
--- a/include/history.h
+++ b/include/history.h
@@ -120,6 +120,30 @@ typedef struct BcHistory
extern const char bc_history_editrc[];
extern const size_t bc_history_editrc_len;
+#ifdef __APPLE__
+
+/**
+ * Returns true if the line is a valid line, false otherwise.
+ * @param line The line.
+ * @param len The length of the line.
+ * @return True if the line is valid, false otherwise.
+ */
+#define BC_HISTORY_INVALID_LINE(line, len) \
+ ((line) == NULL && ((len) == -1 || errno == EINTR))
+
+#else // __APPLE__
+
+/**
+ * Returns true if the line is a valid line, false otherwise.
+ * @param line The line.
+ * @param len The length of the line.
+ * @return True if the line is valid, false otherwise.
+ */
+#define BC_HISTORY_INVALID_LINE(line, len) \
+ ((line) == NULL && (len) == -1 && errno == EINTR)
+
+#endif // __APPLE__
+
#else // BC_ENABLE_EDITLINE
#if BC_ENABLE_READLINE
diff --git a/include/version.h b/include/version.h
index 4d2f6acfb433..a4fb8def5024 100644
--- a/include/version.h
+++ b/include/version.h
@@ -37,6 +37,6 @@
#define BC_VERSION_H
/// The current version.
-#define VERSION 7.0.1
+#define VERSION 7.0.2
#endif // BC_VERSION_H