Skip to content

Commit 2a00bed

Browse files
author
Pip Cet
committed
Fix build on Solaris 10 (bug#75451)
* autogen.sh: Avoid bashism. * configure.ac (AC_PROG_AWK): Use. * src/Makefile.in (AWK): Set. (dmpstruct.h): Use "$(AWK)", not "awk". * src/dired.c (DT_UNKNOWN, DT_DIR, DT_LNK): Define all three constants or none of them.
1 parent 91b2b36 commit 2a00bed

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

autogen.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ do_check=true
115115
do_autoconf=false
116116
do_git=false
117117

118-
for arg; do
118+
for arg in "$@"; do
119119
case $arg in
120120
--help)
121121
exec echo "$0: usage: $0 [--no-check] [target...]

configure.ac

+2
Original file line numberDiff line numberDiff line change
@@ -2004,6 +2004,8 @@ ARCH_INDEPENDENT_CONFIG_FILES([src/verbose.mk])
20042004

20052005
dnl Some other nice autoconf tests.
20062006
AC_PROG_INSTALL
2007+
dnl use "gawk" where possible
2008+
AC_PROG_AWK
20072009
dnl These are commented out, since gl_EARLY and/or Autoconf already does them.
20082010
dnl AC_PROG_MKDIR_P
20092011
dnl if test "x$RANLIB" = x; then

src/Makefile.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ LDFLAGS = @LDFLAGS@
6060
EXEEXT = @EXEEXT@
6161
version = @version@
6262
MKDIR_P = @MKDIR_P@
63+
AWK = @AWK@
6364
# Don't use LIBS. configure puts stuff in it that either shouldn't be
6465
# linked with Emacs or is duplicated by the other stuff below.
6566
# LIBS = @LIBS@
@@ -543,7 +544,7 @@ pdumper.o: dmpstruct.h
543544
endif
544545
dmpstruct.h: $(srcdir)/dmpstruct.awk
545546
dmpstruct.h: $(libsrc)/make-fingerprint$(EXEEXT) $(dmpstruct_headers)
546-
$(AM_V_GEN)POSIXLY_CORRECT=1 awk -f $(srcdir)/dmpstruct.awk \
547+
$(AM_V_GEN)POSIXLY_CORRECT=1 $(AWK) -f $(srcdir)/dmpstruct.awk \
547548
$(dmpstruct_headers) > $@
548549

549550
AUTO_DEPEND = @AUTO_DEPEND@

src/dired.c

+11-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,17 @@ dirent_namelen (struct dirent *dp)
7979
}
8080

8181
#ifndef HAVE_STRUCT_DIRENT_D_TYPE
82-
enum { DT_UNKNOWN, DT_DIR, DT_LNK };
82+
#if !defined (DT_UNKNOWN) && !defined (DT_DIR) && !defined (DT_LNK)
83+
enum {
84+
DT_UNKNOWN,
85+
DT_DIR,
86+
DT_LNK,
87+
};
88+
#elif defined (DT_UNKNOWN) && defined (DT_DIR) && defined (DT_LNK)
89+
/* Nothing to do here, all three are defined as macros. */
90+
#elif defined (DT_UNKNOWN) || defined (DT_DIR) || defined (DT_LNK)
91+
#error "Cannot determine DT_UNKNOWN, DT_DIR, DT_LNK"
92+
#endif
8393
#endif
8494

8595
/* Return the file type of DP. */

0 commit comments

Comments
 (0)