Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What mean file with extension "h.in"?

Tags:

c

header-files

I am studying the C language, and I saw a new extension that I had not seen before.

What do files with the extension like library.h.in mean?

Is it as the simple header with extension ".h"? What's the difference?

like image 662
Anderson Carniel Avatar asked Jan 10 '13 00:01

Anderson Carniel


People also ask

What is the extension of h?

What is an H file? A file saved with h file extension is a header file used in C/C++ files to include the declaration of variables, constants, and functions. These are referred by the C++ implementation files that contain the actual implementation of these functions.

What is a Type H file?

The inttypes. h file is a C header file that is part of the C standard library and API. It was added with the 1999 version of the ISO C standard (known as C99). It includes the stdint.

What are h files written in?

h extension are called header files in C. These header files generally contain function declarations which we can be used in our main C program, like for e.g. there is need to include stdio.


2 Answers

These files are usually the input for autoconf which will generate final .h files.

Here's an example from PCRE:

#define PCRE_MAJOR          @PCRE_MAJOR@ #define PCRE_MINOR          @PCRE_MINOR@ #define PCRE_PRERELEASE     @PCRE_PRERELEASE@ #define PCRE_DATE           @PCRE_DATE@ 

Autoconf will replace all variables (@…@) with the respective values and the result will be a .h file.

like image 144
Vladimir Kolesnikov Avatar answered Oct 14 '22 11:10

Vladimir Kolesnikov


Typically, a .h.in file is a header template that is filled in to become the actual header by a configure script based on the outcome of several tests for features present on the target platform.

like image 31
Daniel Fischer Avatar answered Oct 14 '22 12:10

Daniel Fischer