Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c415c13

Browse files
committed
Build src/port/dirmod.c only on Windows.
Since commit ba7c597, port/dirmod.c has contained only Windows-specific functions. Most platforms don't seem to mind uselessly building an empty file, but OS X for one issues warnings. Hence, treat dirmod.c as a Windows-specific file selected by configure rather than one that's always built. We can revert this change if dirmod.c ever gains any non-Windows functionality again. Back-patch to 9.4 where the mentioned commit appeared.
1 parent f50b5c7 commit c415c13

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

configure

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11989,6 +11989,12 @@ esac
1198911989
fi
1199011990

1199111991

11992+
case " $LIBOBJS " in
11993+
*" dirmod.$ac_objext "* ) ;;
11994+
*) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
11995+
;;
11996+
esac
11997+
1199211998
case " $LIBOBJS " in
1199311999
*" kill.$ac_objext "* ) ;;
1199412000
*) LIBOBJS="$LIBOBJS kill.$ac_objext"

configure.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,6 +1454,7 @@ fi
14541454
# Win32 support
14551455
if test "$PORTNAME" = "win32"; then
14561456
AC_REPLACE_FUNCS(gettimeofday)
1457+
AC_LIBOBJ(dirmod)
14571458
AC_LIBOBJ(kill)
14581459
AC_LIBOBJ(open)
14591460
AC_LIBOBJ(system)

src/include/port.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ extern void get_man_path(const char *my_exec_path, char *ret_path);
6161
extern bool get_home_path(char *ret_path);
6262
extern void get_parent_directory(char *path);
6363

64-
/* port/dirmod.c */
64+
/* common/pgfnames.c */
6565
extern char **pgfnames(const char *path);
6666
extern void pgfnames_cleanup(char **filenames);
6767

src/port/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ include $(top_builddir)/src/Makefile.global
3030
override CPPFLAGS := -I$(top_builddir)/src/port -DFRONTEND $(CPPFLAGS)
3131
LIBS += $(PTHREAD_LIBS)
3232

33-
OBJS = $(LIBOBJS) chklocale.o dirmod.o erand48.o fls.o inet_net_ntop.o \
33+
OBJS = $(LIBOBJS) chklocale.o erand48.o fls.o inet_net_ntop.o \
3434
noblock.o path.o pgcheckdir.o pg_crc.o pgmkdirp.o pgsleep.o \
3535
pgstrcasecmp.o pqsignal.o \
3636
qsort.o qsort_arg.o quotes.o sprompt.o tar.o thread.o

0 commit comments

Comments
 (0)