About: Errno.h

An Entity of Type: software, from Named Graph: http://dbpedia.org, within Data Space: dbpedia.org

errno.h is a header file in the standard library of the C programming language. It defines macros for reporting and retrieving error conditions using the symbol errno (short for "error number"). errno acts like an integer variable. A value (the error number) is stored in errno by certain library functions when they detect errors. At program startup, the value stored is zero. Library functions store only values greater than zero. Any library function can alter the value stored before return, whether or not they detect errors. Most functions indicate that they detected an error by returning a special value, typically NULL for functions that return pointers, and -1 for functions that return integers. A few functions require the caller to preset errno to zero and test it afterwards to see if a

Property Value
dbo:abstract
  • Το errno.h είναι ένα αρχείο κεφαλίδας (header file) στην τυπική βιβλιοθήκη της γλώσσας προγραμματισμού C. Πολλές συναρτήσεις της πρότυπης βιβλιοθήκης θέτουν δείκτες καταστάσεως αν προκύψει κάποιο σφάλμα κατά την ανάγνωση ή εγγραφή αρχείων και αν φτάσουν στο τέλος του αρχείου. Αυτό το αρχείο κεφαλίδας δηλώνει μερικές συναρτήσεις με τις οποίες μπορούμε να ελέγξουμε και να καθαρίσουμε αυτούς τους δείκτες. Επίσης, δηλώνει έναν ακέραιο errno, που μπορεί να εμπεριέχει περισσότερες πληροφορίες για το ποιο πρόσφατο σφάλμα. (el)
  • errno.h is a header file in the standard library of the C programming language. It defines macros for reporting and retrieving error conditions using the symbol errno (short for "error number"). errno acts like an integer variable. A value (the error number) is stored in errno by certain library functions when they detect errors. At program startup, the value stored is zero. Library functions store only values greater than zero. Any library function can alter the value stored before return, whether or not they detect errors. Most functions indicate that they detected an error by returning a special value, typically NULL for functions that return pointers, and -1 for functions that return integers. A few functions require the caller to preset errno to zero and test it afterwards to see if an error was detected. The errno macro expands to an lvalue with type int, sometimes with the extern and/or volatile type specifiers depending upon the platform. Originally this was a static memory location, but macros are almost always used today to allow for multi-threading, so that each thread will see its own thread-local error number. The header file also defines macros that expand to integer constants that represent the error codes. The C standard library only requires three to be defined: EDOM Results from a parameter outside a function's domain, e.g. <span class="n">sqrt</span><span class="p">(</span><span class="mi">-1</span><span class="p">)</span><span class="w"></span> ERANGE Results from a result outside a function's range, e.g. <span class="n">strtol</span><span class="p">(</span><span class="s">"0xfffffffff"</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"></span> on systems with a 32-bit wide long EILSEQ (Required since 1994 Amendment 1 to C89 standard) Results from an illegal byte sequence, e.g. <span class="n">mbstowcs</span><span class="p">(</span><span class="n">buf</span><span class="p">,</span><span class="w"> </span><span class="s">"</span><span class="se">\xff</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"></span> on systems that use UTF-8. POSIX compliant operating systems like AIX, Linux or Solaris include many other error values, many of which are used much more often than the above ones, such as EACCES for when a file cannot be opened for reading. C++11 additionally defines many of the same values found within the POSIX specification. Traditionally, the first page of Unix system manuals, named intro(2), lists all errno.h macros, but this is not the case with Linux, where these macros are instead listed in the errno(3). An errno can be translated to a descriptive string using strerror (defined in string.h) or a BSD extension called sys_errlist. The translation can be printed directly to the standard error stream using perror (defined in stdio.h). As strerror in many Unix-like systems is not thread-safe, a thread-safe version strerror_r is used, but conflicting definitions from POSIX and GNU makes it even less portable than the sys_errlist table. (en)
  • errno.h es un archivo de cabecera en la biblioteca estándar del lenguaje de programación C. En ella se definen las macros que presentan un informe de error a través de códigos de error. La macro errno se expande a un L-value con tipo int, que contiene el último código de error generado en cualquiera de las funciones utilizando la instalación de errno. Tres macros para ampliar entero constantes que representan los códigos de error: * Edom: resultados de un parámetro fuera de una función de dominio, por ejemplo, sqrt (-1) * ERANGE: el resultado de un resultado fuera de una función de la gama, por ejemplo strtol ( "0xfffffffff", NULL, 0) * EILSEQ: resultados de una secuencia de carácter ilegal, por ejemplo wcstombs (str, L "\ xffff", 2) Sistemas operativos compatibles con POSIX como UNIX o Linux podrán incluir otras macros para representar a otros números de código de error del sistema operativo. El 19 de diciembre de 2003 el grupo de SCO publicó avisos de DMCA a las compañías seleccionadas de la Fortune 1000, alegando el archivo de errno.h fue copiado de UNIX en Linux sin la autorización. Linus Torvalds, el creador y sostenedor de la marca registrada de Linux, ha negado la demanda de SCO, diciendo que él mismo escribió el código para la versión de Linux. Vea los códigos de error en Linux para los . (es)
  • est l'en-tête de la bibliothèque standard du C, du langage C, qui contient les définitions des macros et des constantes utilisées pour signaler une erreur, ou vérifier s'il y en a une qui s'est produite. Cela se fait à travers des codes d'erreur enregistré dans une variable statique appelé errno (forme raccourcie de error number). Une valeur (le code d'erreur) est enregistrée dans errno par quelques fonctions lorsque celles-ci détectent une erreur. Au démarrage du programme, cette variable contient la valeur zéro. Les fonctions des bibliothèques standard n'y stockent que des valeurs positives. N'importe quelle fonction peut en modifier la valeur au cours de son exécution, si un problème a eu lieu. Traditionnellement, errno utilisait un emplacement mémoire statique, mais des macros sont presque toujours utilisées de nos jours pour permettre l'usage de multiples threads ; ainsi, chaque thread peut voir ses propres codes d'erreur. Ce fichier définit également des constantes qui représentent des codes d'erreurs couramment utilisés. La bibliothèque standard du C requiert seulement les trois suivantes : EDOMLorsqu'un paramètre donné est hors du domaine de définition de la fonction, par exemple sqrt(-1).ERANGERésultat d'une fonction hors de son domaine de définition, par exemple strtol("0xfffffffff",NULL,0) sur un système avec des long de 32 bits.EILSEQ (Requis depuis l'amendement 1 de 1994 au standard C89)Résultat d'une séquence de bytes non autorisée, par exemple mbstowcs(buf,"\xff", 1) sur un système basé sur UTF-8. Des systèmes d'exploitation compatibles POSIX comme Linux, Solaris ou AIX incluent plusieurs autres codes d'erreurs, souvent bien plus utilisés que ceux ci-dessus, comme EACCES qui indique un problème d'ouverture d'un fichier. (fr)
  • errno.h는 C의 표준 라이브러리 내의 헤더 파일이다. errno (오류 번호 ("error number")의 줄임말) 라는 정적 메모리 위치에 저장된 오류 코드를 통해 오류 상태를 보고 및 검색하기 위한 매크로를 정의한다. 한 값 (오류 번호)은 에러를 감지 했을 때 특정 에 의해 errno에 저장된다. 프로그램 시작시, 이 값에는 0이 저장된다. 라이브러리 함수들은 오직 0보다 큰 값을 저장한다. 모든 라이브러리 함수는 오류를 감지하는 지 여부와 상관없이 반환 전에 저장된 값을 대체할 수 있다. 대부분 함수들은 특별한 값, 보통 포인터를 반환하는 함수의 경우 NULL 및 함수의 경우 -1을 반환하여 오류를 감지했음을 나타낸다. 몇 가지 함수는 호출자가 사전에 errno으로 설정하고 이후에 오류를 감지했는지 그 다음 오류를 감지했는지 확인하기 위해 테스트를 해야 한다. 대부분의 함수는 특별한 값, 보통 포인터를 반환하는 함수의 경우 NULL 및 정수를 반환하는 함수의 경우 -1을 반환하여 오류를 감지했음을 나타냅니다. errno 매크로는 유형이 int인 lvalue으로 확장되며, 플랫폼에 따라 extern 및/혹은 volatile 유형 지정자와 함께 errno 기능을 사용하는 함수에서마지막으로 생성 된 오류 코드가 포함된다. 본래 이는 정적 메모리 위치이지만 오늘날 매크로는 멀티 스레딩을 허용하기 위해 거의 항상 매크로가 사용되어 각 스레드에 자체 오류 번호를 볼 수 있도록 되어 있다. 이 헤더 파일은 에러 코드를 나타내기 위한 정수형 상수를 나타내는 매크로도 정의한다. 이 C 표준 라이브러리는 아래 3개의 매크로로 정의되는 데 필요하다. EDOM 함수 도메인의 바깥의 파라미터의 결과. 예 - sqrt(-1) ERANGE 함수의 범위 바깥 결과로부터 나온 결과. 예 - 32비트 길이의 시스템에서 strtol("0xfffffffff",NULL,0) EILSEQ (1에서 C89으로 1994년 개정된 표준을 필요로 함) 잘못된 바이트 시퀀스의 결과. 예 - UTF-8를 쓰는 시스템 상의 mbstowcs(buf,"\xff", 1). AIX, 리눅스 혹은 솔라리스와 같은 POSIX 호환 운영 체제에는 파일을 열 수 없는 경우를 위한 EACCES와 같은 것 외에 위의 것 보다 훨씬 더 많은 오류 값을 포함된다. C++11 추가적으로 POSIX 사양에서 발견되는 많은 동일한 값을 정의한다. 전통적으로, intro(2)라는 이름으로 지어진 유닉스 시스템 메뉴얼의 첫번째 페이지에 모든 errno.h 매크로가 게시되어 있으나 리눅스는 errno(3)에 매크로들이 게시되어 있다. (ko)
  • errno.h è l'header file della libreria standard del C che contiene definizioni di macro per la gestione delle situazioni di errore. La libreria funziona in questo modo: ogni volta che una funzione matematica (definite in math.h) incappa in un errore, restituisce un valore significativo e documentato per segnalare genericamente la situazione. Contemporaneamente, imposta errno (un lvalue modificabile, cioè, semplificando, una variabile), definito in questa libreria, al valore che indica lo specifico errore occorso. Il valore di errno è zero all'avvio del programma ed è garantito che nessuna funzione di libreria lo azzeri: il programmatore, quindi, dovrebbe, nella funzione chiamante quella matematica che potrebbe generare l'errore, azzerare il valore di errno prima della chiamata e, successivamente ad essa, verificarne il valore, prima di richiamare altre funzioni che potrebbero modificare errno. Altri sistemi operativi conformi a POSIX, come Unix o Linux, potrebbero includere altre macro per rappresentare ulteriori situazioni di errore (vedere anche i collegamenti esterni). Il 19 dicembre 2003 lo SCO Group citò in giudizio svariate aziende (incluse in Fortune 1000 e ), ritenendo che parti del kernel di Unix, tra cui il file errno.h, fossero state illecitamente ricopiate nei sorgenti di Linux. Linus Torvalds, il creatore e detentore del marchio registrato Linux, ha negato le pretese della SCO, affermando di aver scritto di proprio pugno il codice in questione. (it)
  • errno – uniksowy mechanizm zgłaszania błędów przez funkcje libc, a w szczególności jądra. Jeśli funkcja zakończy się błędem, sygnalizuje to zwracając zwykle -1 lub, w przypadku funkcji zwracających wskaźnik, NULL. Program powinien wtedy zajrzeć do zmiennej globalnej errno, żeby dowiedzieć się, jaki dokładnie błąd wystąpił. Jeśli funkcja zakończy się pomyślnie, zawartość errno nie jest zdefiniowana – w szczególności może tam znajdować się kod błędu niezwiązany z ostatnim wywołaniem danej funkcji. Ma to miejsce np. w przypadku, gdy funkcja foo wywoła funkcję bar, przy czym ta druga zwróci błąd, co jednak nie przeszkodzi pierwszej w pomyślnym wykonaniu. Może się też zdarzyć, że pomyślne wywołanie funkcji potencjalnie modyfikującej errno nie zmieni poprzedniej wartości tej zmiennej. Zmienna errno jest zdefiniowana w nagłówku errno.h. Popularne kody błędów to: * EACCES – odmowa dostępu * EAGAIN – zasób tymczasowo niedostępny * EBADF – niepoprawny deskryptor plików * <a href="/w/index.php?title=EINTR&action=edit&redlink=1" class="new" title="EINTR (strona nie istnieje)">EINTR</a> – podczas wykonywania funkcji nastąpiło przerwanie * EINVAL – błędny argument * ENOTSUP – operacja nie jest zaimplementowana * EPERM – operacja niedozwolona * EPIPE – przerwany potok Opis błędu w odpowiednim dla danego locale języku można otrzymać za pomocą funkcji: char *strerror(int errnum); Niestety nie jest ona bezpieczna w programach wielowątkowych, gdzie należy korzystać z trudniejszej w użyciu: int strerror_r(int errnum, char *buf, size_t n); (pl)
  • errno.h é um arquivo cabeçalho da biblioteca padrão da linguagem de programação C que fornece macros para identificar e relatar erros de execução através de . Os erros podem ser obtidos através da macro errno que fornece um número inteiro positivo contendo o último código de erro fornecido por alguma função ou biblioteca que faz uso do errno. Há definições para nomes simbólicos que facilitam o reconhecimento dos erros. Por exemplo, a função sqrt altera o valor de errno para o valor simbolizado por EDOM caso o argumento seja um número negativo e a função altera o valor de errno para o valor simbolizado por EROFS caso o arquivo fornecido como argumento esteja em um sistema de arquivos que permite apenas leitura. Duas funções que usualmente acompanham o uso da macro errno são definida em stdio.h para impressão da mensagem associada ao erro na e definida em string.h que fornece a string de caracteres com a mensagem de erro. (pt)
  • errno.h — заголовочный файл стандартной библиотеки языка программирования С, содержащий объявление макроса для идентификации ошибок через их код. POSIX-совместимые операционные системы, наподобие Unix и Linux, могут включать другие макросы для определения ошибок через собственные коды errno. Значение errno имеет смысл только тогда, когда системный вызов или функция возвращает признак ошибки. (ru)
  • errno.h是C語言C標準函式庫裡的標頭檔,定義了透過來回報錯誤資訊的巨集: * errno巨集定義為一個int型態的左值, 包含任何函式使用errno功能所產生的上一個錯誤碼。 * 一些表示錯誤碼,定義為整數值的巨集: * EDOM源自函式的參數超出範圍,例如sqrt(-1) * ERANGE源自函式的結果超出範圍,例如strtol("0xfffffffff",NULL,0) * EILSEQ源自不合法的字元順序,例如wcstombs(str, L"\xffff", 2) POSIX相容的作業系統像是UNIX或Linux或許會包含其他巨集來表示其他作業系統的錯誤碼 2003年12月29日,SCO Group對被選上的發布DMCA公告,宣稱errno.h在未授權的狀況下從UNIX系統複製到了Linux系統。Linux的製作者兼商標擁有者Linus Torvalds否認SCO的指控,說是他自己寫了Linux版本的程式。 (zh)
  • errno.h — заголовний файл стандартної бібліотеки мови програмування С. Містить оголошення макросу для ідентифікації помилок через їхній код. POSIX-сумісні операційні системи, на кшталт, Unix та Linux можуть включати інші макроси для визначення помилок через власні коди помилок. (uk)
dbo:wikiPageExternalLink
dbo:wikiPageID
  • 412660 (xsd:integer)
dbo:wikiPageLength
  • 5007 (xsd:nonNegativeInteger)
dbo:wikiPageRevisionID
  • 1062327987 (xsd:integer)
dbo:wikiPageWikiLink
dbp:wikiPageUsesTemplate
dcterms:subject
gold:hypernym
rdf:type
rdfs:comment
  • Το errno.h είναι ένα αρχείο κεφαλίδας (header file) στην τυπική βιβλιοθήκη της γλώσσας προγραμματισμού C. Πολλές συναρτήσεις της πρότυπης βιβλιοθήκης θέτουν δείκτες καταστάσεως αν προκύψει κάποιο σφάλμα κατά την ανάγνωση ή εγγραφή αρχείων και αν φτάσουν στο τέλος του αρχείου. Αυτό το αρχείο κεφαλίδας δηλώνει μερικές συναρτήσεις με τις οποίες μπορούμε να ελέγξουμε και να καθαρίσουμε αυτούς τους δείκτες. Επίσης, δηλώνει έναν ακέραιο errno, που μπορεί να εμπεριέχει περισσότερες πληροφορίες για το ποιο πρόσφατο σφάλμα. (el)
  • errno.h — заголовочный файл стандартной библиотеки языка программирования С, содержащий объявление макроса для идентификации ошибок через их код. POSIX-совместимые операционные системы, наподобие Unix и Linux, могут включать другие макросы для определения ошибок через собственные коды errno. Значение errno имеет смысл только тогда, когда системный вызов или функция возвращает признак ошибки. (ru)
  • errno.h是C語言C標準函式庫裡的標頭檔,定義了透過來回報錯誤資訊的巨集: * errno巨集定義為一個int型態的左值, 包含任何函式使用errno功能所產生的上一個錯誤碼。 * 一些表示錯誤碼,定義為整數值的巨集: * EDOM源自函式的參數超出範圍,例如sqrt(-1) * ERANGE源自函式的結果超出範圍,例如strtol("0xfffffffff",NULL,0) * EILSEQ源自不合法的字元順序,例如wcstombs(str, L"\xffff", 2) POSIX相容的作業系統像是UNIX或Linux或許會包含其他巨集來表示其他作業系統的錯誤碼 2003年12月29日,SCO Group對被選上的發布DMCA公告,宣稱errno.h在未授權的狀況下從UNIX系統複製到了Linux系統。Linux的製作者兼商標擁有者Linus Torvalds否認SCO的指控,說是他自己寫了Linux版本的程式。 (zh)
  • errno.h — заголовний файл стандартної бібліотеки мови програмування С. Містить оголошення макросу для ідентифікації помилок через їхній код. POSIX-сумісні операційні системи, на кшталт, Unix та Linux можуть включати інші макроси для визначення помилок через власні коди помилок. (uk)
  • errno.h is a header file in the standard library of the C programming language. It defines macros for reporting and retrieving error conditions using the symbol errno (short for "error number"). errno acts like an integer variable. A value (the error number) is stored in errno by certain library functions when they detect errors. At program startup, the value stored is zero. Library functions store only values greater than zero. Any library function can alter the value stored before return, whether or not they detect errors. Most functions indicate that they detected an error by returning a special value, typically NULL for functions that return pointers, and -1 for functions that return integers. A few functions require the caller to preset errno to zero and test it afterwards to see if a (en)
  • errno.h es un archivo de cabecera en la biblioteca estándar del lenguaje de programación C. En ella se definen las macros que presentan un informe de error a través de códigos de error. La macro errno se expande a un L-value con tipo int, que contiene el último código de error generado en cualquiera de las funciones utilizando la instalación de errno. Tres macros para ampliar entero constantes que representan los códigos de error: Sistemas operativos compatibles con POSIX como UNIX o Linux podrán incluir otras macros para representar a otros números de código de error del sistema operativo. (es)
  • est l'en-tête de la bibliothèque standard du C, du langage C, qui contient les définitions des macros et des constantes utilisées pour signaler une erreur, ou vérifier s'il y en a une qui s'est produite. Cela se fait à travers des codes d'erreur enregistré dans une variable statique appelé errno (forme raccourcie de error number). Traditionnellement, errno utilisait un emplacement mémoire statique, mais des macros sont presque toujours utilisées de nos jours pour permettre l'usage de multiples threads ; ainsi, chaque thread peut voir ses propres codes d'erreur. (fr)
  • errno.h è l'header file della libreria standard del C che contiene definizioni di macro per la gestione delle situazioni di errore. La libreria funziona in questo modo: ogni volta che una funzione matematica (definite in math.h) incappa in un errore, restituisce un valore significativo e documentato per segnalare genericamente la situazione. Contemporaneamente, imposta errno (un lvalue modificabile, cioè, semplificando, una variabile), definito in questa libreria, al valore che indica lo specifico errore occorso. Il valore di errno è zero all'avvio del programma ed è garantito che nessuna funzione di libreria lo azzeri: il programmatore, quindi, dovrebbe, nella funzione chiamante quella matematica che potrebbe generare l'errore, azzerare il valore di errno prima della chiamata e, successiv (it)
  • errno.h는 C의 표준 라이브러리 내의 헤더 파일이다. errno (오류 번호 ("error number")의 줄임말) 라는 정적 메모리 위치에 저장된 오류 코드를 통해 오류 상태를 보고 및 검색하기 위한 매크로를 정의한다. 한 값 (오류 번호)은 에러를 감지 했을 때 특정 에 의해 errno에 저장된다. 프로그램 시작시, 이 값에는 0이 저장된다. 라이브러리 함수들은 오직 0보다 큰 값을 저장한다. 모든 라이브러리 함수는 오류를 감지하는 지 여부와 상관없이 반환 전에 저장된 값을 대체할 수 있다. 대부분 함수들은 특별한 값, 보통 포인터를 반환하는 함수의 경우 NULL 및 함수의 경우 -1을 반환하여 오류를 감지했음을 나타낸다. 몇 가지 함수는 호출자가 사전에 errno으로 설정하고 이후에 오류를 감지했는지 그 다음 오류를 감지했는지 확인하기 위해 테스트를 해야 한다. 대부분의 함수는 특별한 값, 보통 포인터를 반환하는 함수의 경우 NULL 및 정수를 반환하는 함수의 경우 -1을 반환하여 오류를 감지했음을 나타냅니다. EDOM 함수 도메인의 바깥의 파라미터의 결과. 예 - sqrt(-1) ERANGE (ko)
  • errno – uniksowy mechanizm zgłaszania błędów przez funkcje libc, a w szczególności jądra. Jeśli funkcja zakończy się błędem, sygnalizuje to zwracając zwykle -1 lub, w przypadku funkcji zwracających wskaźnik, NULL. Program powinien wtedy zajrzeć do zmiennej globalnej errno, żeby dowiedzieć się, jaki dokładnie błąd wystąpił. Jeśli funkcja zakończy się pomyślnie, zawartość errno nie jest zdefiniowana – w szczególności może tam znajdować się kod błędu niezwiązany z ostatnim wywołaniem danej funkcji. Ma to miejsce np. w przypadku, gdy funkcja foo wywoła funkcję bar, przy czym ta druga zwróci błąd, co jednak nie przeszkodzi pierwszej w pomyślnym wykonaniu. Może się też zdarzyć, że pomyślne wywołanie funkcji potencjalnie modyfikującej errno nie zmieni poprzedniej wartości tej zmiennej. (pl)
  • errno.h é um arquivo cabeçalho da biblioteca padrão da linguagem de programação C que fornece macros para identificar e relatar erros de execução através de . Os erros podem ser obtidos através da macro errno que fornece um número inteiro positivo contendo o último código de erro fornecido por alguma função ou biblioteca que faz uso do errno. Há definições para nomes simbólicos que facilitam o reconhecimento dos erros. (pt)
rdfs:label
  • Errno.h (el)
  • Errno.h (es)
  • Errno.h (en)
  • Errno.h (it)
  • Errno.h (fr)
  • Errno.h (ko)
  • Errno (pl)
  • Errno.h (ru)
  • Errno.h (pt)
  • Errno.h (uk)
  • Errno.h (zh)
owl:sameAs
prov:wasDerivedFrom
foaf:isPrimaryTopicOf
is dbo:wikiPageRedirects of
is dbo:wikiPageWikiLink of
is foaf:primaryTopic of
Powered by OpenLink Virtuoso    This material is Open Knowledge     W3C Semantic Web Technology     This material is Open Knowledge    Valid XHTML + RDFa
This content was extracted from Wikipedia and is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License