.\" -*- coding: UTF-8 -*- '\" t .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" Modified Sat Jul 24 19:53:02 1993 by Rik Faith (faith@cs.unc.edu) .\" .\" FIXME Many more values for 'name' are supported, some of which .\" are documented under 'info libc confstr'. .\" See for the rest. .\" These should all be added to this page. .\" See also the POSIX.1-2001 specification of confstr() .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH confstr 3 "20 julho 2023" "Linux man\-pages 6.05.01" .SH NOME confstr \- ler seqüencias de dependentes da configuração .SH BIBLIOTECA Biblioteca C Padrão (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSE .nf \fB#include \fP .PP \fBsize_t confstr(int \fP\fIname\fP\fB, char \fP\fIbuf\fP\fB[.\fP\fIsize\fP\fB], size_t \fP\fIsize\fP\fB);\fP .fi .PP .RS -4 Requisitos de macro de teste de recursos para o glibc (consulte \fBfeature_test_macros\fP(7)): .RE .PP \fBconfstr\fP(): .nf _POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE .fi .SH DESCRIÇÃO \fBconfstr\fP() lê os valores de variáveis dependentes da configuração. .PP O argumento \fIname\fP indica a variável do sistema a ser retornada. As seguintes variáveis são suportadas: .TP \fB_CS_GNU_LIBC_VERSION\fP (GNU C library only; since glibc 2.3.2) A string which identifies the GNU C library version on this system (e.g., "glibc 2.3.4"). .TP \fB_CS_GNU_LIBPTHREAD_VERSION\fP (GNU C library only; since glibc 2.3.2) A string which identifies the POSIX implementation supplied by this C library (e.g., "NPTL 2.3.4" or "linuxthreads\-0.10"). .TP \fB_CS_PATH\fP Valor da variável \fBPATH\fP, que indica onde podem ser encontrados os utilitários padrão POSIX.2. .PP If \fIbuf\fP is not NULL and \fIsize\fP is not zero, \fBconfstr\fP() copies the value of the string to \fIbuf\fP truncated to \fIsize \- 1\fP bytes if necessary, with a null byte (\[aq]\e0\[aq]) as terminator. This can be detected by comparing the return value of \fBconfstr\fP() against \fIsize\fP. .PP Se \fIsize\fP for zero e \fIbuf\fP for NULL, \fBconfstr\fP() retornará o valor definido abaixo. .SH "VALOR DE RETORNO" If \fIname\fP is a valid configuration variable, \fBconfstr\fP() returns the number of bytes (including the terminating null byte) that would be required to hold the entire value of that variable. This value may be greater than \fIsize\fP, which means that the value in \fIbuf\fP is truncated. .PP If \fIname\fP is a valid configuration variable, but that variable does not have a value, then \fBconfstr\fP() returns 0. If \fIname\fP does not correspond to a valid configuration variable, \fBconfstr\fP() returns 0, and \fIerrno\fP is set to \fBEINVAL\fP. .SH ERROS .TP \fBEINVAL\fP The value of \fIname\fP is invalid. .SH ATRIBUTOS Para uma explicação dos termos usados nesta seção, consulte \fBattributes\fP(7). .TS allbox; lbx lb lb l l l. Interface Atributo Valor T{ .na .nh \fBconfstr\fP() T} Thread safety MT\-Safe .TE .sp 1 .SH PADRÕES POSIX.1\-2008. .SH HISTÓRICO POSIX.1\-2001. .SH EXEMPLOS O código abaixo localiza o caminho onde estão os utilitários POSIX.2. .PP .in +4n .EX char *pathbuf; size_t n; \& n = confstr(_CS_PATH, NULL, (size_t) 0); pathbuf = malloc(n); if (pathbuf == NULL) abort(); confstr(_CS_PATH, pathbuf, n); .EE .in .SH "VEJA TAMBÉM" \fBgetconf\fP(1), \fBsh\fP(1), \fBexec\fP(3), \fBfpathconf\fP(3), \fBpathconf\fP(3), \fBsysconf\fP(3), \fBsystem\fP(3) .PP .SH TRADUÇÃO A tradução para português brasileiro desta página man foi criada por Paulo César Mendes e André Luiz Fassone . .PP Esta tradução é uma documentação livre; leia a .UR https://www.gnu.org/licenses/gpl-3.0.html Licença Pública Geral GNU Versão 3 .UE ou posterior para as condições de direitos autorais. Nenhuma responsabilidade é aceita. .PP Se você encontrar algum erro na tradução desta página de manual, envie um e-mail para .MT debian-l10n-portuguese@lists.debian.org a lista de discussão de tradutores .ME .