.\" -*- 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 juin 2020" GNU "Manuel du programmeur Linux" .SH NOM confstr \- Lire une chaîne de caractères dépendant de la configuration .SH SYNOPSIS .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 Exigences de macros de test de fonctionnalités pour la glibc (consulter \fBfeature_test_macros\fP(7))\ : .RE .PP \fBconfstr\fP()\ : _POSIX_C_SOURCE\ >=\ 2 || _XOPEN_SOURCE .SH DESCRIPTION La fonction \fBconfstr\fP() fournit la valeur d'une chaîne de caractères dépendante de la configuration. .PP L'argument \fIname\fP est la variable système réclamée. Les variables suivantes sont supportées\ : .TP \fB_CS_GNU_LIBC_VERSION\fP (Bibliothèque GNU C seulement\ ; depuis la 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 (Bibliothèque GNU C seulement\ ; depuis la 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 Une valeur de la variable \fBPATH\fP indiquant les emplacements où les utilitaires standard POSIX.2 peuvent être trouvés. .PP Si \fIbuf\fP n'est pas NULL, et si \fIlen\fP est différent de 0, alors \fBconfstr\fP() copie la valeur de la chaîne dans le tampon \fIbuf\fP, en limitant la longueur à \fIlen \- 1\fP octets si nécessaire, terminée par un octet nul («\ \e0\ »). On peut détecter la troncature de la chaîne en comparant le résultat de \fBconfstr\fP() avec le paramètre \fIlen\fP. .PP Si \fIlen\fP est nulle, et si \fIbuf\fP vaut NULL, alors \fBconfstr\fP() renvoie simplement la valeur définie ci\-dessus. .SH "VALEUR RENVOYÉE" Si \fIname\fP est une variable de configuration valide, \fBconfstr\fP() renvoie le nombre d'octets (incluant le caractère nul) qui doit être utilisé pour enregistrer la variable. Cette valeur peut être plus grande que \fIlen\fP, ce qui signifie que la valeur de \fIbuf\fP est tronquée. .PP Si \fIname\fP est une variable de configuration valable sans valeur, alors \fBconfstr\fP() renvoie 0. Si \fIname\fP ne correspond pas à une variable de configuration valable, \fBconfstr\fP() renvoie 0 et \fIerrno\fP est définie à \fBEINVAL\fP. .SH ERREURS .TP \fBEINVAL\fP La valeur de \fIname\fP n'est pas valable. .SH ATTRIBUTS Pour une explication des termes utilisés dans cette section, consulter \fBattributes\fP(7). .TS allbox; lb lb lb l l l. Interface Attribut Valeur T{ \fBconfstr\fP() T} Sécurité des threads MT\-Safe .TE .SH CONFORMITÉ POSIX.1\-2001, POSIX.1\-2008. .SH EXEMPLES Le fragment de code ci\-dessous détermine le chemin d'accès aux utilitaires 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 "VOIR AUSSI" \fBgetconf\fP(1), \fBsh\fP(1), \fBexec\fP(3), \fBfpathconf\fP(3), \fBpathconf\fP(3), \fBsysconf\fP(3), \fBsystem\fP(3) .SH COLOPHON Cette page fait partie de la publication\ 5.10 du projet \fIman\-pages\fP Linux. Une description du projet et des instructions pour signaler des anomalies et la dernière version de cette page peuvent être trouvées à l'adresse \%https://www.kernel.org/doc/man\-pages/. .SH TRADUCTION La traduction française de cette page de manuel a été créée par Christophe Blaess , Stéphan Rafin , Thierry Vignaud , François Micaux, Alain Portal , Jean-Philippe Guérard , Jean-Luc Coulon (f5ibh) , Julien Cristau , Thomas Huriaux , Nicolas François , Florentin Duneau , Simon Paillard , Denis Barbier et David Prévot . Cette traduction est une documentation libre ; veuillez vous reporter à la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License version 3 .UE concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE. Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à .MT debian-l10n-french@lists.debian.org .ME .