Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2018-12-07 19:36:40 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2018-12-07 21:28:08 +0300
commit6a5e8096973f701363a36eb07a096ff8ca784342 (patch)
tree9beebb681abd93e080e8e98e9658a4576d951132 /source/blender/blenlib/BLI_system.h
parentde491abf996281785391b18b3547d1bff305355f (diff)
Move static `get_hostname()` to `BLI_hostname()` in `system.c`
This makes the `#include <Windows.h>` use more localised and out of the `image.c` file. Reviewers: LazyDodo Reviewed by: LazyDodo Differential revision: https://developer.blender.org/D4049
Diffstat (limited to 'source/blender/blenlib/BLI_system.h')
-rw-r--r--source/blender/blenlib/BLI_system.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_system.h b/source/blender/blenlib/BLI_system.h
index 7f88f8a18b1..3bb47a4a5b7 100644
--- a/source/blender/blenlib/BLI_system.h
+++ b/source/blender/blenlib/BLI_system.h
@@ -34,6 +34,18 @@ void BLI_system_backtrace(FILE *fp);
/* Get CPU brand, result is to be MEM_freeN()-ed. */
char *BLI_cpu_brand_string(void);
+/**
+ * Obtain the hostname from the system.
+ *
+ * This simply determines the host's name, and doesn't do any DNS lookup of any
+ * IP address of the machine. As such, it's only usable for identification
+ * purposes, and not for reachability over a network.
+ *
+ * @param buffer Character buffer to write the hostname into.
+ * @param bufsize Size of the character buffer, including trailing '\0'.
+ */
+void BLI_hostname_get(char *buffer, size_t bufsize);
+
/* getpid */
#ifdef WIN32
# define BLI_SYSTEM_PID_H <process.h>