Debian Codegraph @

templates/man2/gethostname.2.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:25+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, no-wrap
23 msgid "gethostname"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
28 #: opensuse-tumbleweed
29 #, no-wrap
30 msgid "2026-02-08"
31 msgstr ""
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, no-wrap
36 msgid "Linux man-pages 6.18"
37 msgstr ""
38
39 #. type: SH
40 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
41 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
42 #, no-wrap
43 msgid "NAME"
44 msgstr ""
45
46 #. type: Plain text
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 msgid "gethostname, sethostname - get/set hostname"
50 msgstr ""
51
52 #. type: SH
53 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
54 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
55 #, no-wrap
56 msgid "LIBRARY"
57 msgstr ""
58
59 #. type: Plain text
60 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
61 #: opensuse-leap-16-1 opensuse-tumbleweed
62 msgid "Standard C library (I<libc>,\\ I<-lc>)"
63 msgstr ""
64
65 #. type: SH
66 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
67 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
68 #, no-wrap
69 msgid "SYNOPSIS"
70 msgstr ""
71
72 #. type: Plain text
73 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
74 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
75 #, no-wrap
76 msgid "B<#include E<lt>unistd.hE<gt>>\n"
77 msgstr ""
78
79 #. type: Plain text
80 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
81 #: opensuse-leap-16-1 opensuse-tumbleweed
82 #, no-wrap
83 msgid ""
84 "B<int gethostname(char *>I<name>B<, size_t >I<size>B<);>\n"
85 "B<int sethostname(const char *>I<name>B<, size_t >I<size>B<);>\n"
86 msgstr ""
87
88 #. type: Plain text
89 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
90 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
91 msgid ""
92 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
93 msgstr ""
94
95 #. type: Plain text
96 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
97 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
98 msgid "B<gethostname>():"
99 msgstr ""
100
101 #. The above is something of a simplification
102 #. also before glibc 2.3 there was a bit churn
103 #. type: Plain text
104 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
105 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
106 #, no-wrap
107 msgid ""
108 " _XOPEN_SOURCE E<gt>= 500 || _POSIX_C_SOURCE E<gt>= 200112L\n"
109 " || /* glibc 2.19 and earlier */ _BSD_SOURCE\n"
110 msgstr ""
111
112 #. type: Plain text
113 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
114 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
115 msgid "B<sethostname>():"
116 msgstr ""
117
118 #. commit 266865c0e7b79d4196e2cc393693463f03c90bd8
119 #. type: Plain text
120 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
121 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
122 #, no-wrap
123 msgid ""
124 " Since glibc 2.21:\n"
125 " _DEFAULT_SOURCE\n"
126 " In glibc 2.19 and 2.20:\n"
127 " _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE E<lt> 500)\n"
128 " Up to and including glibc 2.19:\n"
129 " _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE E<lt> 500)\n"
130 msgstr ""
131
132 #. type: SH
133 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
134 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
135 #, no-wrap
136 msgid "DESCRIPTION"
137 msgstr ""
138
139 #. type: Plain text
140 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
141 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
142 msgid ""
143 "These system calls are used to access or to change the system hostname. "
144 "More precisely, they operate on the hostname associated with the calling "
145 "process's UTS namespace."
146 msgstr ""
147
148 #. type: Plain text
149 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
150 #: opensuse-leap-16-1 opensuse-tumbleweed
151 msgid ""
152 "B<sethostname>() sets the hostname to the value given in the character "
153 "array I<name>. The I<size> argument specifies the number of bytes in "
154 "I<name>. (Thus, I<name> does not require a terminating null byte.)"
155 msgstr ""
156
157 #. type: Plain text
158 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
159 #: opensuse-leap-16-1 opensuse-tumbleweed
160 msgid ""
161 "B<gethostname>() returns the null-terminated hostname in the character "
162 "array I<name>, which has a size of I<size> bytes. If the null-terminated "
163 "hostname is too large to fit, then the name is truncated, and no error is "
164 "returned (but see VERSIONS below). POSIX.1 says that if such truncation "
165 "occurs, then it is unspecified whether the returned buffer includes a "
166 "terminating null byte."
167 msgstr ""
168
169 #. type: SH
170 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
171 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
172 #, no-wrap
173 msgid "RETURN VALUE"
174 msgstr ""
175
176 #. type: Plain text
177 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
178 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
179 msgid ""
180 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
181 "to indicate the error."
182 msgstr ""
183
184 #. type: SH
185 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
186 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
187 #, no-wrap
188 msgid "ERRORS"
189 msgstr ""
190
191 #. type: TP
192 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
193 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
194 #, no-wrap
195 msgid "B<EFAULT>"
196 msgstr ""
197
198 #. type: Plain text
199 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
200 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
201 msgid "I<name> is an invalid address."
202 msgstr ""
203
204 #. type: TP
205 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
206 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
207 #, no-wrap
208 msgid "B<EINVAL>"
209 msgstr ""
210
211 #. Can't occur for gethostbyname() wrapper, since 'size' has an
212 #. unsigned type; can occur for the underlying system call.
213 #. type: Plain text
214 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
215 #: opensuse-leap-16-1 opensuse-tumbleweed
216 msgid ""
217 "I<size> is negative or, for B<sethostname>(), I<size> is larger than the "
218 "maximum allowed size."
219 msgstr ""
220
221 #. type: TP
222 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
223 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
224 #, no-wrap
225 msgid "B<ENAMETOOLONG>"
226 msgstr ""
227
228 #. type: Plain text
229 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
230 #: opensuse-leap-16-1 opensuse-tumbleweed
231 msgid ""
232 "(glibc B<gethostname>()) I<size> is smaller than the actual size. (Before "
233 "glibc 2.1, glibc uses B<EINVAL> for this case.)"
234 msgstr ""
235
236 #. type: TP
237 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
238 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
239 #, no-wrap
240 msgid "B<EPERM>"
241 msgstr ""
242
243 #. type: Plain text
244 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
245 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
246 msgid ""
247 "For B<sethostname>(), the caller did not have the B<CAP_SYS_ADMIN> "
248 "capability in the user namespace associated with its UTS namespace (see "
249 "B<namespaces>(7))."
250 msgstr ""
251
252 #. type: SH
253 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
254 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
255 #, no-wrap
256 msgid "VERSIONS"
257 msgstr ""
258
259 #. type: Plain text
260 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
261 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
262 msgid ""
263 "SUSv2 guarantees that \"Host names are limited to 255 bytes\". POSIX.1 "
264 "guarantees that \"Host names (not including the terminating null byte) are "
265 "limited to B<HOST_NAME_MAX> bytes\". On Linux, B<HOST_NAME_MAX> is defined "
266 "with the value 64, which has been the limit since Linux 1.0 (earlier kernels "
267 "imposed a limit of 8 bytes)."
268 msgstr ""
269
270 #. type: SS
271 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
272 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
273 #, no-wrap
274 msgid "C library/kernel differences"
275 msgstr ""
276
277 #. type: Plain text
278 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
279 #: opensuse-leap-16-1 opensuse-tumbleweed
280 msgid ""
281 "The GNU C library does not employ the B<gethostname>() system call; "
282 "instead, it implements B<gethostname>() as a library function that calls "
283 "B<uname>(2) and copies up to I<size> bytes from the returned I<nodename> "
284 "field into I<name>. Having performed the copy, the function then checks if "
285 "the length of the I<nodename> was greater than or equal to I<size>, and if "
286 "it is, then the function returns -1 with I<errno> set to B<ENAMETOOLONG>; in "
287 "this case, a terminating null byte is not included in the returned I<name>."
288 msgstr ""
289
290 #. type: SH
291 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
292 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
293 #, no-wrap
294 msgid "STANDARDS"
295 msgstr ""
296
297 #. type: TP
298 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
299 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
300 #, no-wrap
301 msgid "B<gethostname>()"
302 msgstr ""
303
304 #. type: Plain text
305 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
306 #: opensuse-tumbleweed
307 msgid "POSIX.1-2024."
308 msgstr ""
309
310 #. type: TP
311 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
312 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
313 #, no-wrap
314 msgid "B<sethostname>()"
315 msgstr ""
316
317 #. type: Plain text
318 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
319 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
320 msgid "None."
321 msgstr ""
322
323 #. type: SH
324 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
325 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
326 #, no-wrap
327 msgid "HISTORY"
328 msgstr ""
329
330 #. type: Plain text
331 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
332 #: opensuse-tumbleweed
333 msgid "4.2BSD, SVr4, POSIX.1-2001."
334 msgstr ""
335
336 #. type: Plain text
337 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
338 #: opensuse-tumbleweed
339 msgid "4.2BSD, SVr4."
340 msgstr ""
341
342 #. At least glibc 2.0 and glibc 2.1, older versions not checked
343 #. type: Plain text
344 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
345 #: opensuse-leap-16-1 opensuse-tumbleweed
346 msgid ""
347 "Versions of glibc before glibc 2.2 handle the case where the length of the "
348 "I<nodename> was greater than or equal to I<size> differently: nothing is "
349 "copied into I<name> and the function returns -1 with I<errno> set to "
350 "B<ENAMETOOLONG>."
351 msgstr ""
352
353 #. type: SH
354 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
355 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
356 #, no-wrap
357 msgid "SEE ALSO"
358 msgstr ""
359
360 #. type: Plain text
361 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
362 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
363 msgid ""
364 "B<hostname>(1), B<getdomainname>(2), B<setdomainname>(2), B<uname>(2), "
365 "B<uts_namespaces>(7)"
366 msgstr ""
367
368 #. type: TH
369 #: debian-trixie
370 #, no-wrap
371 msgid "2024-05-02"
372 msgstr ""
373
374 #. type: TH
375 #: debian-trixie
376 #, no-wrap
377 msgid "Linux man-pages 6.9.1"
378 msgstr ""
379
380 #. type: Plain text
381 #: debian-trixie
382 msgid "Standard C library (I<libc>, I<-lc>)"
383 msgstr ""
384
385 #. type: Plain text
386 #: debian-trixie
387 #, no-wrap
388 msgid ""
389 "B<int gethostname(char *>I<name>B<, size_t >I<len>B<);>\n"
390 "B<int sethostname(const char *>I<name>B<, size_t >I<len>B<);>\n"
391 msgstr ""
392
393 #. type: Plain text
394 #: debian-trixie
395 msgid ""
396 "B<sethostname>() sets the hostname to the value given in the character "
397 "array I<name>. The I<len> argument specifies the number of bytes in "
398 "I<name>. (Thus, I<name> does not require a terminating null byte.)"
399 msgstr ""
400
401 #. type: Plain text
402 #: debian-trixie
403 msgid ""
404 "B<gethostname>() returns the null-terminated hostname in the character "
405 "array I<name>, which has a length of I<len> bytes. If the null-terminated "
406 "hostname is too large to fit, then the name is truncated, and no error is "
407 "returned (but see NOTES below). POSIX.1 says that if such truncation "
408 "occurs, then it is unspecified whether the returned buffer includes a "
409 "terminating null byte."
410 msgstr ""
411
412 #. Can't occur for gethostbyname() wrapper, since 'len' has an
413 #. unsigned type; can occur for the underlying system call.
414 #. type: Plain text
415 #: debian-trixie
416 msgid ""
417 "I<len> is negative or, for B<sethostname>(), I<len> is larger than the "
418 "maximum allowed size."
419 msgstr ""
420
421 #. type: Plain text
422 #: debian-trixie
423 msgid ""
424 "(glibc B<gethostname>()) I<len> is smaller than the actual size. (Before "
425 "glibc 2.1, glibc uses B<EINVAL> for this case.)"
426 msgstr ""
427
428 #. type: Plain text
429 #: debian-trixie
430 msgid ""
431 "The GNU C library does not employ the B<gethostname>() system call; "
432 "instead, it implements B<gethostname>() as a library function that calls "
433 "B<uname>(2) and copies up to I<len> bytes from the returned I<nodename> "
434 "field into I<name>. Having performed the copy, the function then checks if "
435 "the length of the I<nodename> was greater than or equal to I<len>, and if it "
436 "is, then the function returns -1 with I<errno> set to B<ENAMETOOLONG>; in "
437 "this case, a terminating null byte is not included in the returned I<name>."
438 msgstr ""
439
440 #. type: Plain text
441 #: debian-trixie fedora-44 fedora-rawhide
442 msgid "POSIX.1-2008."
443 msgstr ""
444
445 #. type: Plain text
446 #: debian-trixie fedora-44 fedora-rawhide
447 msgid ""
448 "SVr4, 4.4BSD (these interfaces first appeared in 4.2BSD). POSIX.1-2001 and "
449 "POSIX.1-2008 specify B<gethostname>() but not B<sethostname>()."
450 msgstr ""
451
452 #. At least glibc 2.0 and glibc 2.1, older versions not checked
453 #. type: Plain text
454 #: debian-trixie
455 msgid ""
456 "Versions of glibc before glibc 2.2 handle the case where the length of the "
457 "I<nodename> was greater than or equal to I<len> differently: nothing is "
458 "copied into I<name> and the function returns -1 with I<errno> set to "
459 "B<ENAMETOOLONG>."
460 msgstr ""
461
462 #. type: TH
463 #: fedora-44 fedora-rawhide
464 #, no-wrap
465 msgid "2024-11-17"
466 msgstr ""
467
468 #. type: TH
469 #: fedora-44 fedora-rawhide
470 #, no-wrap
471 msgid "Linux man-pages 6.13"
472 msgstr ""
473
474 #. type: TH
475 #: mageia-cauldron
476 #, no-wrap
477 msgid "Linux man-pages 6.17"
478 msgstr ""
479
480 #. type: TH
481 #: opensuse-leap-16-1 opensuse-tumbleweed
482 #, no-wrap
483 msgid "Linux man-pages (unreleased)"
484 msgstr ""