summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2004-04-23 18:42:00 +0000
committerEgbert Eich <eich@suse.de>2004-04-23 18:42:00 +0000
commite825f4eabd82155a1327c42f16a6e3bcba96b311 (patch)
tree1d577f6979d917c6aa8a3aec5ddb456a228dc778
parentfa8f86352aab5825ca289969cfd11d90e56eb579 (diff)
Merging XORG-CURRENT into trunkXACE-SELINUX-MERGE
-rw-r--r--cleanlinks.man5
-rw-r--r--imake.c170
-rw-r--r--imake.man2
-rw-r--r--imakemdep.h16
-rw-r--r--makeg.man2
-rw-r--r--mdepend.cpp2
-rw-r--r--mergelib.man2
-rw-r--r--mkdirhier.man2
-rw-r--r--mkhtmlindex.man8
-rw-r--r--mkhtmlindex.pl19
-rw-r--r--mkhtmlindex.sh6
-rw-r--r--revpath.man2
-rw-r--r--xmkmf.cpp2
-rw-r--r--xmkmf.man2
14 files changed, 153 insertions, 87 deletions
diff --git a/cleanlinks.man b/cleanlinks.man
index 403710c..d550ef5 100644
--- a/cleanlinks.man
+++ b/cleanlinks.man
@@ -21,8 +21,9 @@ directory.
.BR lndir (1).
.SH AUTHOR
.PP
-David Dawes wrote the
+The version of the
.I cleanlinks
-program for XFree86.
+included in this X.Org Foundation release was originally written
+by David Dawes wrote as a part of XFree86.
.PP
Colin Watson wrote this manual page, originally for the Debian Project.
diff --git a/imake.c b/imake.c
index 0a13425..49867cc 100644
--- a/imake.c
+++ b/imake.c
@@ -7,7 +7,7 @@
* be passed to the template file. *
* *
***************************************************************************/
-/* $XFree86: xc/config/imake/imake.c,v 3.64 2003/03/26 20:43:47 tsi Exp $ */
+/* $XFree86: xc/config/imake/imake.c,v 3.63tsi Exp $ */
/*
*
@@ -1178,67 +1178,133 @@ get_binary_format(FILE *inFile)
#endif
#if defined(sun) && defined(__SVR4)
+/* Runs Sun compiler command and parses output - this is a bit of a hack
+ * as it depends on the particular output format of the -V flag, but it's
+ * worked for many releases.
+ *
+ * Input : cmd - command to run (called with -V flag)
+ * path - path to command to run (use $PATH if NULL)
+ * Output: cmajor & cminor - major and minor versions if found
+ * Returns: 0 if successful, -1 if not.
+ */
+static int
+ask_sun_compiler_for_versions(const char *cmd, const char *path,
+ int *cmajor, int *cminor)
+{
+ char buf[BUFSIZ];
+ char cmdtorun[PATH_MAX];
+ char* vptr;
+ FILE* ccproc;
+ const char vflag[] = " -V 2>&1";
+ int retval = -1;
+
+ int len = strlen(cmd) + sizeof(vflag);
+
+ if (path != NULL) {
+ len += strlen(path) + 1;
+ }
+
+ if (len < sizeof(cmdtorun)) {
+ if (path != NULL) {
+ sprintf(cmdtorun, "%s/%s %s", path, cmd, vflag);
+ } else {
+ sprintf(cmdtorun, "%s %s", cmd, vflag);
+ }
+
+ if ((ccproc = popen (cmdtorun, "r")) != NULL) {
+ if (fgets (buf, sizeof(buf), ccproc) != NULL) {
+ vptr = strrchr (buf, 'C');
+ if (vptr) {
+ for (; (*vptr != '\0') && !isdigit(*vptr); vptr++) {
+ /* Do nothing - just scanning for first digit */
+ }
+ if (*vptr != '\0') {
+ if (sscanf (vptr, "%d.%d", cmajor, cminor) == 2) {
+ retval = 0;
+ }
+ }
+ }
+ if (retval != 0) {
+ fprintf(stderr,
+ "warning: could not parse version number in output of:\n"
+ " %s\n", cmdtorun);
+ }
+ while (fgets (buf, sizeof(buf), ccproc) != NULL) {};
+ }
+ pclose (ccproc);
+ }
+ }
+ return retval;
+}
+
+/* Find Sun compilers and their versions if present */
static void
get_sun_compiler_versions (FILE *inFile)
{
- char buf[PATH_MAX];
- char cmd[PATH_MAX];
- static char* sunpro_cc = "/opt/SUNWspro/bin/cc";
- static char* sunpro_CC = "/opt/SUNWspro/bin/CC";
- int cmajor, cminor;
- char* vptr;
+ const char* sunpro_path = "/opt/SUNWspro/bin";
+ int cmajor, cminor, found = 0;
struct stat sb;
- FILE* ccproc;
+
+ /* If cross-compiling, only check CrossCompilerDir for compilers.
+ * If not cross-compiling, first check cc in users $PATH,
+ * then try /opt/SUNWspro if not found in the users $PATH
+ */
#if defined CROSSCOMPILE
if (CrossCompiling) {
- int len = strlen(CrossCompileDir);
- len += 3;
- sunpro_cc = (char *) malloc(len);
- sunpro_CC = (char *) malloc(len);
- strcpy(sunpro_cc,CrossCompileDir);
- strcpy(sunpro_CC,CrossCompileDir);
- strcat(sunpro_cc,"/cc");
- strcat(sunpro_CC,"/CC");
- }
-#endif
- if (lstat (sunpro_cc, &sb) == 0) {
- strcpy (cmd, sunpro_cc);
- strcat (cmd, " -V 2>&1");
- if ((ccproc = popen (cmd, "r")) != NULL) {
- if (fgets (buf, PATH_MAX, ccproc) != NULL) {
- vptr = strrchr (buf, 'C');
- for (; !isdigit(*vptr); vptr++);
- (void) sscanf (vptr, "%d.%d", &cmajor, &cminor);
- fprintf (inFile,
- "#define DefaultSunProCCompilerMajorVersion %d\n",
- cmajor);
- fprintf (inFile,
- "#define DefaultSunProCCompilerMinorVersion %d\n",
- cminor);
+ if (ask_sun_compiler_for_versions("cc", CrossCompileDir,
+ &cmajor, &cminor) == 0) {
+ found = 1;
+ }
+ }
+ else
+#endif
+ {
+ if (ask_sun_compiler_for_versions("cc", NULL, &cmajor, &cminor) == 0) {
+ found = 1;
+ } else if (ask_sun_compiler_for_versions("cc", sunpro_path,
+ &cmajor, &cminor) == 0) {
+ found = 1;
+ fprintf(inFile, "#define DefaultSunProCCompilerDir %s", sunpro_path);
}
- while (fgets (buf, PATH_MAX, ccproc) != NULL) {};
- pclose (ccproc);
- }
}
- if (lstat (sunpro_CC, &sb) == 0) {
- strcpy (cmd, sunpro_CC);
- strcat (cmd, " -V 2>&1");
- if ((ccproc = popen (cmd, "r")) != NULL) {
- if (fgets (buf, PATH_MAX, ccproc) != NULL) {
- vptr = strrchr (buf, 'C');
- for (; !isdigit(*vptr); vptr++);
- (void) sscanf (vptr, "%d.%d", &cmajor, &cminor);
- fprintf (inFile,
- "#define DefaultSunProCplusplusCompilerMajorVersion %d\n",
- cmajor);
- fprintf (inFile,
- "#define DefaultSunProCplusplusCompilerMinorVersion %d\n",
- cminor);
+
+ if (found) {
+ fprintf (inFile,
+ "#define DefaultSunProCCompilerMajorVersion %d\n", cmajor);
+ fprintf (inFile,
+ "#define DefaultSunProCCompilerMinorVersion %d\n", cminor);
+ }
+
+ /* Now do it again for C++ compiler (CC) */
+ found = 0;
+#if defined CROSSCOMPILE
+ if (CrossCompiling) {
+ if (ask_sun_compiler_for_versions("CC", CrossCompileDir,
+ &cmajor, &cminor) == 0) {
+ found = 1;
}
- while (fgets (buf, PATH_MAX, ccproc) != NULL) {};
- pclose (ccproc);
- }
+ }
+ else
+#endif
+ {
+ if (ask_sun_compiler_for_versions("CC", NULL, &cmajor, &cminor) == 0) {
+ found = 1;
+ } else if (ask_sun_compiler_for_versions("CC", sunpro_path,
+ &cmajor, &cminor) == 0) {
+ found = 1;
+ fprintf(inFile,
+ "#define DefaultSunProCplusplusCompilerDir %s", sunpro_path);
+ }
+ }
+
+ if (found) {
+ fprintf (inFile,
+ "#define DefaultSunProCplusplusCompilerMajorVersion %d\n",
+ cmajor);
+ fprintf (inFile,
+ "#define DefaultSunProCplusplusCompilerMinorVersion %d\n",
+ cminor);
}
}
#endif
diff --git a/imake.man b/imake.man
index a3b47bf..34d5b94 100644
--- a/imake.man
+++ b/imake.man
@@ -23,7 +23,7 @@
.\" other dealings in this Software without prior written authorization
.\" from The Open Group.
.\"
-.\" $XFree86: xc/config/imake/imake.man,v 1.9 2002/11/20 21:48:46 herrb Exp $
+.\" $XFree86: imake.man,v 1.8 2001/12/14 19:53:19 dawes Exp $
.\"
.TH IMAKE 1 __xorgversion__
.SH NAME
diff --git a/imakemdep.h b/imakemdep.h
index f272429..38a6d95 100644
--- a/imakemdep.h
+++ b/imakemdep.h
@@ -24,7 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
-/* $XFree86: xc/config/imake/imakemdep.h,v 3.72 2003/12/30 01:53:52 tsi Exp $ */
+/* $XFree86: xc/config/imake/imakemdep.h,v 3.71 2003/06/12 14:12:26 eich Exp $ */
/*
@@ -371,11 +371,11 @@ char *cpp_argv[ARGUMENTS] = {
# ifdef __ia64__
"-D__ia64__",
# endif
-# ifdef __AMD64__
- "-D__AMD64__",
+# ifdef __amd64__
+ "-D__amd64__",
# endif
# ifdef __x86_64__
- "-D__AMD64__",
+ "-D__amd64__",
# endif
# ifdef __s390__
"-D__s390__",
@@ -1264,12 +1264,12 @@ struct symtab predefs[] = {
# ifdef __ia64__
{"__ia64__", "1"},
# endif
-# if defined (AMD64) || defined (x86_64)
- {"AMD64", "1"},
+# if defined (amd64) || defined (x86_64)
+ {"amd64", "1"},
{"x86_64", "1"},
# endif
-# if defined (__AMD64__) || defined (__x86_64__)
- {"__AMD64__", "1"},
+# if defined (__amd64__) || defined (__x86_64__)
+ {"__amd64__", "1"},
{"__x86_64__", "1"},
# endif
# ifdef __i386
diff --git a/makeg.man b/makeg.man
index 1259d43..815031d 100644
--- a/makeg.man
+++ b/makeg.man
@@ -24,7 +24,7 @@
.\" from The Open Group.
.\"
.\"
-.\" $XFree86: xc/config/util/makeg.man,v 1.3 2001/12/14 19:53:22 dawes Exp $
+.\" $XFree86: xc/config/util/makeg.man,v 1.2 2001/01/27 18:19:55 dawes Exp $
.\"
.TH MAKEG 1 __xorgversion__
.SH NAME
diff --git a/mdepend.cpp b/mdepend.cpp
index 617051b..3d5a252 100644
--- a/mdepend.cpp
+++ b/mdepend.cpp
@@ -22,7 +22,7 @@ XCOMM work on both USG and BSD systems. However, when System V.4 comes out,
XCOMM USG users will probably have to change "silent" to "-s" instead of
XCOMM "-" (at least, that is what the documentation implies).
XCOMM
-XCOMM $XFree86: xc/config/util/mdepend.cpp,v 3.10 2001/08/17 13:27:50 dawes Exp $
+XCOMM $XFree86: xc/config/util/mdepend.cpp,v 3.9 2001/04/26 20:55:10 dawes Exp $
XCOMM
CC=PREPROC
diff --git a/mergelib.man b/mergelib.man
index 1bc4bb9..7685166 100644
--- a/mergelib.man
+++ b/mergelib.man
@@ -1,4 +1,4 @@
-.\" $XFree86: xc/config/util/mergelib.man,v 1.2 2003/04/07 22:03:49 herrb Exp $
+.\" $XFree86$
.\" shorthand for double quote that works everywhere.
.ds q \N'34'
.TH MERGELIB 1 __xorgversion__
diff --git a/mkdirhier.man b/mkdirhier.man
index 0fd893b..4ad475e 100644
--- a/mkdirhier.man
+++ b/mkdirhier.man
@@ -23,7 +23,7 @@
.\" dealing in this Software without prior written authorization from The
.\" Open Group.
.\"
-.\" $XFree86: xc/config/util/mkdirhier.man,v 1.3 2001/12/14 19:53:22 dawes Exp $
+.\" $XFree86: xc/config/util/mkdirhier.man,v 1.2 2001/01/27 18:19:55 dawes Exp $
.\"
.TH MKDIRHIER 1 __xorgversion__
.SH NAME
diff --git a/mkhtmlindex.man b/mkhtmlindex.man
index c673e94..fc8a427 100644
--- a/mkhtmlindex.man
+++ b/mkhtmlindex.man
@@ -20,13 +20,13 @@ section of each page.
.I mkhtmlindex
takes only one argument: the directory to process.
.SH NOTES
-This utility is currently rather specific to XFree86.
+This utility is currently rather specific to X manual pages.
In particular, the format of the index files it outputs is not configurable,
nor is the HTML formatting it expects of manual pages.
.SH AUTHOR
-.PP
-David Dawes wrote the
+The version of the
.I mkhtmlindex
-program for XFree86.
+included in this X.Org Foundation release was originally written
+by David Dawes wrote as a part of XFree86.
.PP
Colin Watson wrote this manual page, originally for the Debian Project.
diff --git a/mkhtmlindex.pl b/mkhtmlindex.pl
index fba2f79..e0c6b78 100644
--- a/mkhtmlindex.pl
+++ b/mkhtmlindex.pl
@@ -1,9 +1,8 @@
#!/usr/bin/perl
#
-# $XFree86: xc/config/util/mkhtmlindex.pl,v 1.4 2004/03/01 17:56:25 dawes Exp $
+# $XFree86: xc/config/util/mkhtmlindex.pl,v 1.2 2001/03/15 19:02:31 dawes Exp $
#
# Copyright © 2000,2001 by VA Linux Systems, Inc.
-# Copyright © 2004 by David H. Dawes.
#
# Generate index files for HTML man pages.
#
@@ -44,29 +43,29 @@ foreach $vol (@vollist) {
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
-<TITLE>XFree86[tm] Manual pages: Section $vol</TITLE>
+<TITLE>X.Org Manual pages: Section $vol</TITLE>
</HEAD>
<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<H1>XFree86[tm] Manual pages: Section $vol</H1>
+<H1>X.Org Manual pages: Section $vol</H1>
<P>
<UL>
EOF
foreach $file (sort readdir dir) {
- if ($file =~ /\.$vol\.html/) {
+ if ($file =~ "\.$vol\.html") {
open(file, "<$dir/$file") || die "Can't open $dir/$file";
while (<file>) {
chop;
- if (/^<H2>/i) {
- if (! /<\/H2>$/i) {
- while (<file> && ! /<\/H2>$/i) {
+ if (/^<[hH]2>/) {
+ if (! /<\/[hH]2>$/) {
+ while (<file> && ! /<\/[hH]2>$/) {
;
}
}
$heading = "";
while (<file>) {
- if (/^<H2>/i) {
+ if (/^<[hH]2>/) {
last;
}
$heading = "$heading" . "$_";
@@ -77,7 +76,7 @@ EOF
($name, $descr) = split(/-/, $heading, 2);
$file =~ /(.*)\.$vol\.html/;
$fname = $1;
- $descr =~ s/<[Pp]>//g;
+ $descr =~ s/<[pP]>//g;
print mindex
"<LI><A href=\"$file\">$fname</A> - $descr</LI>";
}
diff --git a/mkhtmlindex.sh b/mkhtmlindex.sh
index d5ba1cd..fb3a437 100644
--- a/mkhtmlindex.sh
+++ b/mkhtmlindex.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $XFree86: xc/config/util/mkhtmlindex.sh,v 1.5 2003/08/11 17:41:28 eich Exp $
+# $XFree86: xc/config/util/mkhtmlindex.sh,v 1.3 2000/08/26 04:30:49 dawes Exp $
#
# Copyright © 2000 by Precision Insight, Inc.
#
@@ -34,11 +34,11 @@ for s in $VOLLIST; do
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
-<TITLE>XFree86[tm] Manual pages: Section $s</TITLE>
+<TITLE>X.Org Manual pages: Section $s</TITLE>
</HEAD>
<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
-<H1>XFree86[tm] Manual pages: Section $s</H1>
+<H1>X.Org Manual pages: Section $s</H1>
<P>
<UL>
EOF
diff --git a/revpath.man b/revpath.man
index 7d9cc94..5b9cace 100644
--- a/revpath.man
+++ b/revpath.man
@@ -1,4 +1,4 @@
-.\" $XFree86: xc/config/util/revpath.man,v 1.2 2001/01/27 18:19:55 dawes Exp $
+.\" $XFree86: xc/config/util/revpath.man,v 1.1 1999/01/03 03:58:14 dawes Exp $
.TH REVPATH 1 __vendorversion__
.SH NAME
revpath \- generate a relative path that can be used to undo a change-directory
diff --git a/xmkmf.cpp b/xmkmf.cpp
index 7baf0ea..3d03bde 100644
--- a/xmkmf.cpp
+++ b/xmkmf.cpp
@@ -1,6 +1,6 @@
XCOMM!/bin/sh
-XCOMM $XFree86: xc/config/util/xmkmf.cpp,v 1.4 2001/01/17 16:39:02 dawes Exp $
+XCOMM $XFree86: xc/config/util/xmkmf.cpp,v 1.3 2000/11/06 21:57:10 dawes Exp $
XCOMM
XCOMM make a Makefile from an Imakefile from inside or outside the sources
XCOMM
diff --git a/xmkmf.man b/xmkmf.man
index bd018d6..8a4f234 100644
--- a/xmkmf.man
+++ b/xmkmf.man
@@ -23,7 +23,7 @@
.\" dealing in this Software without prior written authorization from The
.\" Open Group.
.\"
-.\" $XFree86: xc/config/util/xmkmf.man,v 1.3 2001/12/14 19:53:22 dawes Exp $
+.\" $XFree86: xc/config/util/xmkmf.man,v 1.2 2001/01/27 18:19:55 dawes Exp $
.\"
.TH XMKMF 1 __xorgversion__
.SH NAME