Skip to content
Tcl Source Code Artifact [f047dcfe88]
Login

Artifact [f047dcfe88]

Artifact f047dcfe88722a24c1ca2549b015b7b77f15563fb075957ddfa15faae263680b:


---
CommandName: Tcl_GetHostName
ManualSection: 3
Version: 8.3
TclPart: Tcl
TclDescription: Tcl Library Procedures
Keywords:
 - hostname
Copyright:
 - Copyright (c) 1998-2000 Scriptics Corporation.
---

# Name

Tcl\_GetHostName - get the name of the local host

# Synopsis

::: {.synopsis} :::
**#include <tcl.h>**
[const char \*]{.ret} [Tcl\_GetHostName]{.ccmd}[]{.cargs}
:::

# Description

**Tcl\_GetHostName** is a utility procedure used by some of the Tcl commands.  It returns a pointer to a string containing the name for the current machine, or an empty string if the name cannot be determined.  The string is statically allocated, and the caller must not modify of free it.