.\" -*- 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 ​​Julio 2023" "Páginas de manual de Linux 6.05.01" .SH NOMBRE confstr \- obtiene variables cadena dependientes de la configuración .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSIS .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 Macros de Prueba de Características para glibc (véase \fBfeature_test_macros\fP(7)): .RE .PP \fBconfstr\fP(): .nf _POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE .fi .SH DESCRIPCIÓN \fBconfstr\fP() obtiene el valor de una variable cadena dependiente de la configuración. .PP El argumento \fIname\fP es la variable del sistema a ser examinada. Se admiten las siguientes variables: .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 Un valor para la variable \fBPATH\fP que indica dónde pueden ser encontradas todas las utilidades POSIX.2 estándar. .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 Si \fIsize\fP es cero y \fIbuf\fP es NULL, \fBconfstr\fP() sólo devuelve el valor como se define más abajo. .SH "VALOR DEVUELTO" 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 ERRORES .TP \fBEINVAL\fP The value of \fIname\fP is invalid. .SH ATRIBUTOS Para obtener una explicación de los términos usados en esta sección, véase \fBattributes\fP(7). .TS allbox; lbx lb lb l l l. Interfaz Atributo Valor T{ .na .nh \fBconfstr\fP() T} Seguridad del hilo Multi\-hilo seguro .TE .sp 1 .SH ESTÁNDARES POSIX.1\-2008. .SH HISTORIAL POSIX.1\-2001. .SH EJEMPLOS El siguiente fragmento de código determina el camino donde se encuentran las utilidades de sistema 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 "VÉASE TAMBIÉN" \fBgetconf\fP(1), \fBsh\fP(1), \fBexec\fP(3), \fBfpathconf\fP(3), \fBpathconf\fP(3), \fBsysconf\fP(3), \fBsystem\fP(3) .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Sebastian Desimone y Gerardo Aburruzaga García . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .