]> granicus.if.org Git - clang/commit
Be more conservative about gethostname()'s truncating behaviour
authorBen Langmuir <blangmuir@apple.com>
Mon, 9 Feb 2015 21:55:44 +0000 (21:55 +0000)
committerBen Langmuir <blangmuir@apple.com>
Mon, 9 Feb 2015 21:55:44 +0000 (21:55 +0000)
commitc6957806f1a3c34b1c6838b387083eb65436f69a
tree4386ae582ef7a192f033581834de615e9114a3d1
parent2e42451bb704c5eafcb9d1b3766ede37de794db6
Be more conservative about gethostname()'s truncating behaviour

Don't assume it will provide an error or null-terminate the string on
truncation, since POSIX doesn't guarantee either behaviour (although
Linux and Darwin at least will do the 'right thing').

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@228613 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Frontend/CompilerInvocation.cpp