The file 'safe-read.c' include the lib 'config.h', where is placed this file?
I've found many files with this name in the libs, but I don't know what the right one.
UPDATE
I've my file with:
...
#include <safe-read.h>
#include <safe-read.c>
...
in the file safe-read.c there's this include block
#include <config.h> //line 19
/* Specification. */
#ifdef SAFE_WRITE
# include "safe-write.h"
#else
# include "safe-read.h"
#endif
/* Get ssize_t. */
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#ifdef EINTR
# define IS_EINTR(x) ((x) == EINTR)
#else
# define IS_EINTR(x) 0
#endif
#include <limits.h>
#ifdef SAFE_WRITE
# define safe_rw safe_write
# define rw write
#else
# define safe_rw safe_read
# define rw read
# undef const
# define const /* empty */
#endif
When I compile my file I've the following error:
file: X/Y/gnulib/lib/safe-read.c line: 19 message: fatal error: config.h: No such file or directory
You’re probably missing the libconfig-dev package from your system. Simply run the following command and it’ll fix it:
sudo apt-get install libconfig-dev
config.h
is normally generated by the ./configure
script to reflect the target system's characteristics. In your case, it's tied into the whole gnulib "let's replace all the system's library functions with out own hacks" mess, so a lot of what's in a gnulib project config.h
is stuff that gnulib's portion of configure
generated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With