Just a minor nit.

The examples file fdflags.c uses flag O_CLOEXEC which of course does not
exist on Solaris or any linux previous to 2.6.23 so of course install
blows up a bit.  Trivial hack solution is I remove fdflags from the
examples install phase and life goes on neatly.

Sure we have :

/*
 * POSIX constants
 */

#define O_ACCMODE       3       /* Mask for file access modes */
#define FD_CLOEXEC      1       /* close on exec flag */

In the /usr/include/sys/fcntl.h and I see in ./include/bash/include/filecntl.h this :

#if !defined (_FILECNTL_H_)
#define _FILECNTL_H_

#include <fcntl.h>

/* Definitions to set file descriptors to close-on-exec, the Posix way. */
#if !defined (FD_CLOEXEC)
#define FD_CLOEXEC     1
#endif

#define FD_NCLOEXEC    0

#define SET_CLOSE_ON_EXEC(fd)  (fcntl ((fd), F_SETFD, FD_CLOEXEC))
#define SET_OPEN_ON_EXEC(fd)   (fcntl ((fd), F_SETFD, FD_NCLOEXEC))

etc etc

Most likely we need a check for the existence of O_CLOEXEC during the
configure stage and then adjust ./examples/loadables/Makefile.in to
remove or skip the example file.

--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional

Reply via email to