.\" -*- 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 Junio 2020" GNU "Manual del Programador de Linux" .SH NOMBRE confstr \- obtiene variables cadena dependientes de la configuración .SH SINOPSIS .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 Macros de Prueba de Características para glibc (véase \fBfeature_test_macros\fP(7)): .RE .PP \fBconfstr\fP(): _POSIX_C_SOURCE\ >=\ 2 || _XOPEN_SOURCE .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 \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 Si \fIlen\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 \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 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; lb lb lb l l l. Interfaz Atributo Valor T{ \fBconfstr\fP() T} Seguridad del hilo Multi\-hilo seguro .TE .SH "CONFORME A" POSIX.1\-2001, POSIX.1\-2008. .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) .SH COLOFÓN Esta página es parte de la versión 5.10 del proyecto Linux \fIman\-pages\fP. Puede encontrar una descripción del proyecto, información sobre cómo informar errores y la última versión de esta página en \%https://www.kernel.org/doc/man\-pages/. .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 .