.\" -*- coding: UTF-8 -*- .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" 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 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 "9 junho 2020" GNU "Manual do Programador do Linux" .SH NOME confstr \- ler seqüencias de dependentes da configuração .SH SINOPSE .nf \fB#include \fP .PP \fBsize_t confstr(int \fP\fIname\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fIlen\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(): _POSIX_C_SOURCE\ >=\ 2 || _XOPEN_SOURCE .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 \fIlen\fP is not zero, \fBconfstr\fP() copies the value of the string to \fIbuf\fP truncated to \fIlen \- 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 \fIlen\fP. .PP Se \fIlen\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 \fIlen\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; lb lb lb l l l. Interface Atributo Valor T{ \fBconfstr\fP() T} Thread safety MT\-Safe .TE .SH "DE ACORDO COM" POSIX.1\-2001, POSIX.1\-2008. .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) .SH COLOFÃO Esta página faz parte da versão 5.10 do projeto Linux \fIman\-pages\fP. Uma descrição do projeto, informações sobre relatórios de bugs e a versão mais recente desta página podem ser encontradas em \%https://www.kernel.org/doc/man\-pages/. .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 .