aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/os')
-rw-r--r--src/nvim/os/dl.c2
-rw-r--r--src/nvim/os/env.c4
-rw-r--r--src/nvim/os/time.c4
-rw-r--r--src/nvim/os/win_defs.h8
4 files changed, 13 insertions, 5 deletions
diff --git a/src/nvim/os/dl.c b/src/nvim/os/dl.c
index b4a35e203e..fef02cc784 100644
--- a/src/nvim/os/dl.c
+++ b/src/nvim/os/dl.c
@@ -63,7 +63,7 @@ bool os_libcall(const char *libname,
// call the library and save the result
// TODO(aktau): catch signals and use jmp (if available) to handle
- // exceptions. jmp's on UNIX seem to interact trickily with signals as
+ // exceptions. jmp's on Unix seem to interact trickily with signals as
// well. So for now we only support those libraries that are well-behaved.
if (str_out) {
str_str_fn sfn = (str_str_fn) fn;
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c
index a791dca39c..c1804067e9 100644
--- a/src/nvim/os/env.c
+++ b/src/nvim/os/env.c
@@ -142,7 +142,7 @@ void os_get_hostname(char *hostname, size_t len)
/// - go to that directory
/// - do os_dirname() to get the real name of that directory.
/// This also works with mounts and links.
-/// Don't do this for MS-DOS, it will change the "current dir" for a drive.
+/// Don't do this for Windows, it will change the "current dir" for a drive.
static char_u *homedir = NULL;
void init_homedir(void)
@@ -290,7 +290,7 @@ void expand_env_esc(char_u *srcp, char_u *dst, int dstlen, bool esc, bool one,
}
#if defined(UNIX)
- // Verify that we have found the end of a UNIX ${VAR} style variable
+ // Verify that we have found the end of a Unix ${VAR} style variable
if (src[1] == '{' && *tail != '}') {
var = NULL;
} else {
diff --git a/src/nvim/os/time.c b/src/nvim/os/time.c
index ba1dcf631a..188f0802c9 100644
--- a/src/nvim/os/time.c
+++ b/src/nvim/os/time.c
@@ -93,7 +93,7 @@ struct tm *os_localtime_r(const time_t *restrict clock,
#endif
}
-/// Obtains the current UNIX timestamp and adjusts it to local time
+/// Obtains the current Unix timestamp and adjusts it to local time.
///
/// @param result Pointer to a 'struct tm' where the result should be placed
/// @return A pointer to a 'struct tm' in the current time zone (the 'result'
@@ -104,7 +104,7 @@ struct tm *os_get_localtime(struct tm *result) FUNC_ATTR_NONNULL_ALL
return os_localtime_r(&rawtime, result);
}
-/// Obtains the current UNIX timestamp
+/// Obtains the current Unix timestamp.
///
/// @return Seconds since epoch.
Timestamp os_time(void)
diff --git a/src/nvim/os/win_defs.h b/src/nvim/os/win_defs.h
index 2ce74c9818..ba96347a12 100644
--- a/src/nvim/os/win_defs.h
+++ b/src/nvim/os/win_defs.h
@@ -5,6 +5,10 @@
#include <sys/stat.h>
#include <stdio.h>
+// Windows does not have S_IFLNK but libuv defines it
+// and sets the flag for us when calling uv_fs_stat.
+#include <uv.h>
+
#define NAME_MAX _MAX_PATH
#define TEMP_DIR_NAMES {"$TMP", "$TEMP", "$USERPROFILE", ""}
@@ -50,6 +54,10 @@ typedef SSIZE_T ssize_t;
# endif
#endif
+#ifndef O_NOFOLLOW
+# define O_NOFOLLOW 0
+#endif
+
#if !defined(S_ISDIR) && defined(S_IFDIR)
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif