*** ./src/imlib.c.ORIG Wed Mar 7 09:02:53 2012 --- ./src/imlib.c Wed Mar 7 09:04:47 2012 *************** *** 246,251 **** --- 246,255 ---- return(1); } + #ifdef _AIX + # define NAME_MAX MAXNAMLEN + #endif + static char *feh_magick_load_image(char *filename) { char argv_fd[12]; *** ./src/winwidget.c.ORIG Wed Mar 7 09:05:43 2012 --- ./src/winwidget.c Wed Mar 7 09:06:30 2012 *************** *** 33,38 **** --- 33,44 ---- static void winwidget_register(winwidget win); static winwidget winwidget_allocate(void); + #if defined(_AIX51) && !defined(_AIX52) + long int lround(double x) + { + return( (long int) (x + 0.5) ); + } + #endif int window_num = 0; /* For window list */ winwidget *windows = NULL; /* List of windows to loop though */ *** ./src/winwidget.c.ORIG Thu Jan 5 15:48:30 2017 --- ./src/winwidget.c Thu Jan 5 15:50:58 2017 *************** *** 148,153 **** --- 148,159 ---- return(ret); } + #ifdef _AIX + # ifndef HOST_NAME_MAX + # define HOST_NAME_MAX 256 + # endif + #endif + void winwidget_create_window(winwidget ret, int w, int h) { XSetWindowAttributes attr; *** ./src/Makefile.ORIG Tue Jun 12 19:12:51 2018 --- ./src/Makefile Tue Jun 12 19:13:20 2018 *************** *** 40,46 **** I_SRCS = ${shell echo *.raw} I_DSTS = ${I_SRCS:.raw=.inc} ! feh: deps.mk ${OBJECTS} ${I_DSTS} ${CC} ${LDFLAGS} ${CFLAGS} -o $@ ${OBJECTS} ${LDLIBS} include deps.mk --- 40,46 ---- I_SRCS = ${shell echo *.raw} I_DSTS = ${I_SRCS:.raw=.inc} ! feh: ${OBJECTS} ${I_DSTS} ${CC} ${LDFLAGS} ${CFLAGS} -o $@ ${OBJECTS} ${LDLIBS} include deps.mk *************** *** 53,59 **** # CFLAGS might contain include paths needed to resolve includes in headers deps.mk: ${TARGETS} ${I_DSTS} ! ${CC} ${CFLAGS} -MM ${TARGETS} > $@ clean: rm -f feh *.o *.inc --- 53,59 ---- # CFLAGS might contain include paths needed to resolve includes in headers deps.mk: ${TARGETS} ${I_DSTS} ! echo "" > $@ clean: rm -f feh *.o *.inc *** ./config.mk.ORIG Tue Jun 12 23:06:34 2018 --- ./config.mk Tue Jun 12 23:14:24 2018 *************** *** 7,14 **** debug ?= 0 exif ?= 0 help ?= 0 ! verscmp ?= 1 ! xinerama ?= 1 # Prefix for all installed files PREFIX ?= /usr/local --- 7,14 ---- debug ?= 0 exif ?= 0 help ?= 0 ! verscmp ?= 0 ! xinerama ?= 0 # Prefix for all installed files PREFIX ?= /usr/local *************** *** 23,29 **** # Directories for manuals, executables, docs, data, etc. main_dir = ${DESTDIR}${PREFIX} ! man_dir = ${main_dir}/share/man bin_dir = ${main_dir}/bin doc_dir = ${main_dir}/share/doc/feh image_dir = ${main_dir}/share/feh/images --- 23,29 ---- # Directories for manuals, executables, docs, data, etc. main_dir = ${DESTDIR}${PREFIX} ! man_dir = ${main_dir}/man bin_dir = ${main_dir}/bin doc_dir = ${main_dir}/share/doc/feh image_dir = ${main_dir}/share/feh/images *************** *** 36,45 **** # default CFLAGS CFLAGS ?= -g -O2 - CFLAGS += -Wall -Wextra -pedantic # Settings for glibc >= 2.19 - may need to be adjusted for other systems ! CFLAGS += -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 ifeq (${curl},1) CFLAGS += -DHAVE_LIBCURL --- 36,44 ---- # default CFLAGS CFLAGS ?= -g -O2 # Settings for glibc >= 2.19 - may need to be adjusted for other systems ! CFLAGS += -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 ifeq (${curl},1) CFLAGS += -DHAVE_LIBCURL *** ./src/imlib.c.ORIG Tue Jun 12 23:21:29 2018 --- ./src/imlib.c Tue Jun 12 23:22:35 2018 *************** *** 302,307 **** --- 302,324 ---- # define NAME_MAX MAXNAMLEN #endif + /* + * On some platforms (e.g. Solaris, AIX) mkdtemp is not available. + */ + #ifndef __MKDTEMP__ + #define __MKDTEMP__ + + static char* mkdtemp(char *template) + { + if( ! mktemp(template) ) + return NULL; + if( mkdir(template, 0700) ) + return NULL; + return template; + } + + #endif + static char *feh_magick_load_image(char *filename) { char *argv_fn; *** ./config.mk.ORIG Tue Jun 12 23:39:44 2018 --- ./config.mk Tue Jun 12 23:39:53 2018 *************** *** 11,17 **** xinerama ?= 0 # Prefix for all installed files ! PREFIX ?= /usr/local ICON_PREFIX ?= ${DESTDIR}${PREFIX}/share/icons # icons in /usr/share/local/icons (and other prefixes != /usr) are not --- 11,17 ---- xinerama ?= 0 # Prefix for all installed files ! PREFIX = /opt/freeware ICON_PREFIX ?= ${DESTDIR}${PREFIX}/share/icons # icons in /usr/share/local/icons (and other prefixes != /usr) are not