[xserver-commit] xfree86/loader SparcMulDiv.S,1.1,1.2 aout.h,1.8,1.9 aoutloader.c,1.20,1.21 aoutloader.h,1.4,1.5 ar.h,1.4,1.5 coff.h,1.6,1.7 coffloader.c,1.22,1.23 coffloader.h,1.4,1.5 dixsym.c,1.63,1.64 dlloader.c,1.13,1.14 dlloader.h,1.3,1.4 elf.h,1.17,1.18 elfloader.c,1.62,1.63 elfloader.h,1.4,1.5 extsym.c,1.9,1.10 fontsym.c,1.14,1.15 hash.c,1.25,1.26 hash.h,1.3,1.4 loader.c,1.71,1.72 loader.h,1.28,1.29 loaderProcs.h,1.21,1.22 loadext.c,1.8,1.9 loadfont.c,1.4,1.5 loadmod.c,1.73,1.74 misym.c,1.38,1.39 os.c,1.4,1.5 os2funcs.c,1.8,1.9 sym.h,1.7,1.8 xf86sym.c,1.242,1.243

Daniel Stone xserver-commit@pdx.freedesktop.org


Committed by: daniel

Update of /cvs/xserver/xfree86/loader
In directory pdx:/home/daniel/src/xserver/hw/xfree86/loader

Modified Files:
	SparcMulDiv.S aout.h aoutloader.c aoutloader.h ar.h coff.h 
	coffloader.c coffloader.h dixsym.c dlloader.c dlloader.h elf.h 
	elfloader.c elfloader.h extsym.c fontsym.c hash.c hash.h 
	loader.c loader.h loaderProcs.h loadext.c loadfont.c loadmod.c 
	misym.c os.c os2funcs.c sym.h xf86sym.c 
Log Message:
Checkin stage #4: everything else we've changed.

Index: SparcMulDiv.S
===================================================================
RCS file: /cvs/xserver/xfree86/loader/SparcMulDiv.S,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- a/SparcMulDiv.S	2 Nov 2000 19:10:54 -0000	1.1
+++ b/SparcMulDiv.S	19 Feb 2004 03:51:37 -0000	1.2
@@ -22,7 +22,7 @@
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  * IN THE SOFTWARE.
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/SparcMulDiv.S,v 1.1 1999/07/10 07:24:51 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/SparcMulDiv.S,v 1.1 2000/11/02 19:10:54 dawes Exp $ */
 
 	.globl	urem_sparcv89, umul_sparcv89, udiv_sparcv89
 	.globl	rem_sparcv89, mul_sparcv89, div_sparcv89

Index: aout.h
===================================================================
RCS file: /cvs/xserver/xfree86/loader/aout.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- a/aout.h	15 Oct 2003 16:29:02 -0000	1.8
+++ b/aout.h	19 Feb 2004 03:51:37 -0000	1.9
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/aout.h,v 1.7 2002/05/31 18:46:00 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/aout.h,v 1.8 2003/10/15 16:29:02 dawes Exp $ */
 
 /*
  * Borrowed from NetBSD's exec_aout.h

Index: aoutloader.c
===================================================================
RCS file: /cvs/xserver/xfree86/loader/aoutloader.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- a/aoutloader.c	15 Oct 2003 17:46:00 -0000	1.20
+++ b/aoutloader.c	19 Feb 2004 03:51:37 -0000	1.21
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/aoutloader.c,v 1.19 2003/10/15 16:58:34 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/aoutloader.c,v 1.20 2003/10/15 17:46:00 dawes Exp $ */
 
 /*
  *

Index: aoutloader.h
===================================================================
RCS file: /cvs/xserver/xfree86/loader/aoutloader.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- a/aoutloader.h	15 Oct 2003 16:29:02 -0000	1.4
+++ b/aoutloader.h	19 Feb 2004 03:51:37 -0000	1.5
@@ -19,7 +19,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/aoutloader.h,v 1.3 1998/09/20 14:41:03 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/aoutloader.h,v 1.4 2003/10/15 16:29:02 dawes Exp $ */
 
 #ifndef _AOUTLOADER_H
 #define _AOUTLOADER_H

Index: ar.h
===================================================================
RCS file: /cvs/xserver/xfree86/loader/ar.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- a/ar.h	15 Oct 2003 16:29:02 -0000	1.4
+++ b/ar.h	19 Feb 2004 03:51:37 -0000	1.5
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/ar.h,v 1.3 1998/07/25 16:56:12 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/ar.h,v 1.4 2003/10/15 16:29:02 dawes Exp $ */
 
 #ifndef _AR_H
 #define _AR_H

Index: coff.h
===================================================================
RCS file: /cvs/xserver/xfree86/loader/coff.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- a/coff.h	15 Oct 2003 16:29:02 -0000	1.6
+++ b/coff.h	19 Feb 2004 03:51:37 -0000	1.7
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/coff.h,v 1.5 1998/07/25 16:56:12 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/coff.h,v 1.6 2003/10/15 16:29:02 dawes Exp $ */
 
 /* This file was implemented from the information in the book
    Understanding and Using COFF

Index: coffloader.c
===================================================================
RCS file: /cvs/xserver/xfree86/loader/coffloader.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- a/coffloader.c	22 Dec 2003 17:48:11 -0000	1.22
+++ b/coffloader.c	19 Feb 2004 03:51:37 -0000	1.23
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/coffloader.c,v 1.21tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/coffloader.c,v 1.22 2003/12/22 17:48:11 tsi Exp $ */
 
 /*
  *

Index: coffloader.h
===================================================================
RCS file: /cvs/xserver/xfree86/loader/coffloader.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- a/coffloader.h	15 Oct 2003 16:29:02 -0000	1.4
+++ b/coffloader.h	19 Feb 2004 03:51:37 -0000	1.5
@@ -21,7 +21,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/coffloader.h,v 1.3 1998/09/20 14:41:04 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/coffloader.h,v 1.4 2003/10/15 16:29:02 dawes Exp $ */
 
 #ifndef _COFFLOADER_H
 #define _COFFLOADER_H

Index: dixsym.c
===================================================================
RCS file: /cvs/xserver/xfree86/loader/dixsym.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- a/dixsym.c	3 Dec 2003 17:11:29 -0000	1.63
+++ b/dixsym.c	19 Feb 2004 03:51:37 -0000	1.64
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.62tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.63 2003/12/03 17:11:29 tsi Exp $ */
 
 /*
  * Copyright 1995-1998 by Metro Link, Inc.
@@ -70,20 +70,16 @@
 #include "swaprep.h"
 #include "swapreq.h"
 #include "inputstr.h"
-#include "XIproto.h"
+#include <X11/extensions/XIproto.h>
 #include "exevents.h"
 #include "extinit.h"
-#ifdef XV
 #include "xvmodproc.h"
-#endif
 #include "dgaproc.h"
 #ifdef RENDER
 #include "mipict.h"
 #endif
 #include "selection.h"
-#ifdef XKB
 #include <X11/extensions/XKBsrv.h>
-#endif
 
 extern Selection *CurrentSelections;
 extern int NumCurrentSelections;

Index: dlloader.c
===================================================================
RCS file: /cvs/xserver/xfree86/loader/dlloader.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- a/dlloader.c	15 Oct 2003 16:29:02 -0000	1.13
+++ b/dlloader.c	19 Feb 2004 03:51:37 -0000	1.14
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dlloader.c,v 1.12 2003/08/24 17:37:01 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dlloader.c,v 1.13 2003/10/15 16:29:02 dawes Exp $ */
 
 /*
  *
@@ -29,7 +29,7 @@
 #include <stdlib.h>
 #include <dlfcn.h>
 
-#include "Xos.h"
+#include <X11/Xos.h>
 #include "os.h"
 
 #include "sym.h"

Index: dlloader.h
===================================================================
RCS file: /cvs/xserver/xfree86/loader/dlloader.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- a/dlloader.h	20 Sep 1998 14:41:04 -0000	1.3
+++ b/dlloader.h	19 Feb 2004 03:51:37 -0000	1.4
@@ -19,7 +19,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dlloader.h,v 1.2 1998/07/25 16:56:14 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dlloader.h,v 1.3 1998/09/20 14:41:04 dawes Exp $ */
 
 #ifndef _DLLOADER_H
 #define _DLLOADER_H

Index: elf.h
===================================================================
RCS file: /cvs/xserver/xfree86/loader/elf.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- a/elf.h	15 Oct 2003 16:29:02 -0000	1.17
+++ b/elf.h	19 Feb 2004 03:51:37 -0000	1.18
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elf.h,v 1.16 2003/06/12 14:12:34 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elf.h,v 1.17 2003/10/15 16:29:02 dawes Exp $ */
 
 typedef unsigned int Elf32_Addr;
 typedef unsigned short Elf32_Half;

Index: elfloader.c
===================================================================
RCS file: /cvs/xserver/xfree86/loader/elfloader.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- a/elfloader.c	6 Nov 2003 18:38:13 -0000	1.62
+++ b/elfloader.c	19 Feb 2004 03:51:37 -0000	1.63
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.61tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.62 2003/11/06 18:38:13 tsi Exp $ */
 
 /*
  *
@@ -45,7 +45,7 @@
 # define Xfree(size) free(size)
 #endif
 
-#include "Xos.h"
+#include <X11/Xos.h>
 #include "os.h"
 #include "elf.h"
 
@@ -400,7 +400,7 @@
 #else /* MergeSectionAlloc */
 # define ELFLoaderSectToMem(elffile,align,offset,size,label)	\
 _LoaderFileToMem((elffile)->fd,offset,size,label)
-# define ELFLoaderSectCalloc(elffile,align,size) xf86loadercalloc(1,size)
+# define ELFLoaderSectCalloc(elffile,align,size) xcalloc(1,size)
 #endif
 
 /*
@@ -423,7 +423,7 @@
 {
     ELFRelocPtr reloc;
 
-    if ((reloc = xf86loadermalloc(sizeof(ELFRelocRec))) == NULL) {
+    if ((reloc = malloc(sizeof(ELFRelocRec))) == NULL) {
 	ErrorF("ElfDelayRelocation() Unable to allocate memory!!!!\n");
 	return 0;
     }
@@ -457,7 +457,7 @@
 {
     ELFCommonPtr common;
 
-    if ((common = xf86loadermalloc(sizeof(ELFCommonRec))) == NULL) {
+    if ((common = malloc(sizeof(ELFCommonRec))) == NULL) {
 	ErrorF("ElfAddCOMMON() Unable to allocate memory!!!!\n");
 	return 0;
     }
@@ -521,7 +521,7 @@
     }
 
     if (DebuggerPresent) {
-	ldrCommons = xf86loadermalloc(numsyms * sizeof(LDRCommon));
+	ldrCommons = malloc(numsyms * sizeof(LDRCommon));
 	nCommons = numsyms;
     }
 
@@ -534,11 +534,8 @@
      */
     while (listCOMMON) {
 	common = listCOMMON;
-	/* this is xstrdup because is should be more efficient. it is freed
-	 * with xf86loaderfree
-	 */
 	pLookup[l].symName =
-		xf86loaderstrdup(ElfGetString(elffile, common->sym->st_name));
+		xstrdup(ElfGetString(elffile, common->sym->st_name));
 	pLookup[l].offset = (funcptr) (elffile->common + offset);
 #ifdef ELFDEBUG
 	ELFDEBUG("Adding common %p %s\n",
@@ -561,7 +558,7 @@
       defined(__sparcv9)))
 	offset = (offset + 7) & ~0x7;
 #endif
-	xf86loaderfree(common);
+	xfree(common);
 	l++;
     }
     /* listCOMMON == 0 */
@@ -825,7 +822,7 @@
 	return;
     }
 
-    if ((gotent = xf86loadermalloc(sizeof(ELFGotEntryRec))) == NULL) {
+    if ((gotent = malloc(sizeof(ELFGotEntryRec))) == NULL) {
 	ErrorF("ElfAddGOT() Unable to allocate memory!!!!\n");
 	return;
     }
@@ -899,7 +896,7 @@
     gotsize += 16383 + sizeof(ELFGotRec);
 # endif	/*MergeSectionAlloc */
 
-    if ((elffile->got = xf86loadermalloc(gotsize)) == NULL) {
+    if ((elffile->got = malloc(gotsize)) == NULL) {
 	ErrorF("ELFCreateGOT() Unable to allocate memory!!!!\n");
 	return FALSE;
     }
@@ -913,10 +910,10 @@
     }
 
     if (!gotsize) {
-	xf86loaderfree(elffile->got);
+	xfree(elffile->got);
 #  if !defined(DoMMAPedMerge)
 	elffile->basesize += 8 + elffile->gotsize;
-	elffile->base = xf86loaderrealloc(elffile->base, elffile->basesize);
+	elffile->base = xrealloc(elffile->base, elffile->basesize);
 	if (elffile->base == NULL) {
 	    ErrorF("ELFCreateGOT() Unable to reallocate memory!!!!\n");
 	    return FALSE;
@@ -993,7 +990,7 @@
 		return;
     }
 
-    if ((opdent = xf86loadermalloc(sizeof(ELFOpdRec))) == NULL) {
+    if ((opdent = malloc(sizeof(ELFOpdRec))) == NULL) {
 	ErrorF("ElfAddOPD() Unable to allocate memory!!!!\n");
 	return;
     }
@@ -1064,7 +1061,7 @@
 	return;
     }
 
-    if ((pltent = xf86loadermalloc(sizeof(ELFPltEntryRec))) == NULL) {
+    if ((pltent = malloc(sizeof(ELFPltEntryRec))) == NULL) {
 	ErrorF("ElfAddPLT() Unable to allocate memory!!!!\n");
 	return;
     }
@@ -2429,7 +2426,7 @@
 	    ELFDEBUG("R_ARM_REL32 %s\t",
 		     namestr =
 		     ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
-	    xf86loaderfree(namestr);
+	    xfree(namestr);
 	    ELFDEBUG("secp=%x\t", secp);
 	    ELFDEBUG("symval=%lx\t", symval);
 	    ELFDEBUG("dest32=%x\t", dest32);
@@ -2536,12 +2533,12 @@
     sect = &(elffile->sections[elffile->symndx]);
     numsyms = sect->sh_size / sect->sh_entsize;
 
-    if ((lookup = xf86loadermalloc((numsyms + 1) * sizeof(LOOKUP))) == NULL)
+    if ((lookup = malloc((numsyms + 1) * sizeof(LOOKUP))) == NULL)
 	return 0;
 
     if ((secttable =
-	 xf86loadercalloc(sizeof(unsigned short), (numsyms + 1))) == NULL) {
-	xf86loaderfree(lookup);
+	 xcalloc(sizeof(unsigned short), (numsyms + 1))) == NULL) {
+	xfree(lookup);
 	return 0;
     }
     *psecttable = secttable;
@@ -2590,7 +2587,7 @@
 		break;
 	    default:
 		lookup[l].symName =
-			xf86loaderstrdup(ElfGetString
+			xstrdup(ElfGetString
 					 (elffile, syms[i].st_name));
 		lookup[l].offset = (funcptr) syms[i].st_value;
 		secttable[l] = syms[i].st_shndx;
@@ -2730,7 +2727,7 @@
 	    continue;
 	}
 
-	elffile->lsection = xf86loaderrealloc(elffile->lsection,
+	elffile->lsection = xrealloc(elffile->lsection,
 					      (j + 1) * sizeof(LoadSection));
 	if (!(flags & RELOC_SECTION)) {
 	    if (flags & LOADED_SECTION) {
@@ -2803,7 +2800,7 @@
 #ifdef ELFDEBUG
     ELFDEBUG("Loading %s %s\n", modrec->name, modrec->cname);
 #endif
-    if ((elffile = xf86loadercalloc(1, sizeof(ELFModuleRec))) == NULL) {
+    if ((elffile = xcalloc(1, sizeof(ELFModuleRec))) == NULL) {
 	ErrorF("Unable to allocate ELFModuleRec\n");
 	return NULL;
     }
@@ -2843,10 +2840,10 @@
     elffile->numsh = header->e_shnum;
     elffile->secsize = (header->e_shentsize * header->e_shnum);
     elffile->sections =
-	    xf86loaderrealloc(elffile->sections, elffile->secsize);
+	    xrealloc(elffile->sections, elffile->secsize);
 #endif /*defined(__alpha__) || defined(__ia64__) */
     elffile->saddr =
-	    xf86loadercalloc(elffile->numsh, sizeof(unsigned char *));
+	    xcalloc(elffile->numsh, sizeof(unsigned char *));
 
 #if defined(__alpha__) || defined(__ia64__)
     /*
@@ -2953,7 +2950,7 @@
     elffile->basesize = totalsize + maxalign;
 
 # if !defined(DoMMAPedMerge)
-    elffile->base = xf86loadermalloc(elffile->basesize);
+    elffile->base = malloc(elffile->basesize);
     if (elffile->base == NULL) {
 	ErrorF("Unable to allocate ELF sections\n");
 	return NULL;
@@ -3003,7 +3000,7 @@
 		     (void *)pLookup[i].offset, pLookup[i].symName);
 #endif
 	}
-    xf86loaderfree(secttable);
+    xfree(secttable);
 
 #if defined(__ia64__)
     ELFCreateOPD(elffile);
@@ -3014,8 +3011,8 @@
 
     /* Record info for gdb - if we can't allocate the loader record fail
      * silently (the user will find out soon enough that there's no VM left */
-    if ((elfmod = xf86loadercalloc(1, sizeof(LDRModuleRec))) != NULL) {
-	elfmod->name = strdup(modrec->name);
+    if ((elfmod = xcalloc(1, sizeof(LDRModuleRec))) != NULL) {
+	elfmod->name = xstrdup(modrec->name);
 	elfmod->namelen = strlen(modrec->name);
 	elfmod->version = 1;
 	for (i = 0; i < elffile->lsectidx; i++) {
@@ -3066,7 +3063,7 @@
 	}
 	tmp = p;
 	p = p->next;
-	xf86loaderfree(tmp);
+	xfree(tmp);
     }
     _LoaderGetRelocations(mod)->elf_reloc = newlist;
 }
@@ -3113,7 +3110,7 @@
 	    *brelptr = relptr->next;	/* take it out of the list */
 	    reltptr = relptr;	/* save pointer to this node */
 	    relptr = relptr->next;	/* advance the pointer */
-	    xf86loaderfree(reltptr);	/* free the node */
+	    xfree(reltptr);	/* free the node */
 	} else {
 	    brelptr = &(relptr->next);
 	    relptr = relptr->next;	/* advance the pointer */
@@ -3130,7 +3127,7 @@
  * Free the sections that were allocated.
  */
 #if !defined (DoMMAPedMerge)
-# define CheckandFree(ptr,size)  if(ptr) xf86loaderfree(ptr)
+# define CheckandFree(ptr,size)  if(ptr) xfree(ptr)
 #else
 # define CheckandFree(ptr,size) if (ptr) munmap(ptr,size)
 #endif
@@ -3148,7 +3145,7 @@
 		pgot = &(*pgot)->next;
 	    if (*pgot)
 		*pgot = elffile->shared_got->next;
-	    xf86loaderfree(elffile->shared_got);
+	    xfree(elffile->shared_got);
 	}
     }
 # endif
@@ -3167,7 +3164,7 @@
 
 	while ((gotent = elffile->got_entries)) {
 	    elffile->got_entries = gotent->next;
-	    xf86loaderfree(gotent);
+	    xfree(gotent);
 	}
     }
 #endif
@@ -3177,7 +3174,7 @@
 
 	while ((pltent = elffile->plt_entries)) {
 	    elffile->plt_entries = pltent->next;
-	    xf86loaderfree(pltent);
+	    xfree(pltent);
 	}
     }
     {
@@ -3185,7 +3182,7 @@
 
 	while ((opdent = elffile->opd_entries)) {
 	    elffile->opd_entries = opdent->next;
-	    xf86loaderfree(opdent);
+	    xfree(opdent);
 	}
     }
 #endif
@@ -3203,20 +3200,20 @@
 			 elffile->lsection[i].size);
 	}
     }
-    xf86loaderfree(elffile->lsection);
+    xfree(elffile->lsection);
 
 /*
  * Free the section table, section pointer array, and section names
  */
     _LoaderFreeFileMem(elffile->sections, elffile->secsize);
-    xf86loaderfree(elffile->saddr);
+    xfree(elffile->saddr);
     _LoaderFreeFileMem(elffile->header, sizeof(Elf_Ehdr));
     _LoaderFreeFileMem(elffile->shstraddr, elffile->shstrsize);
 
 /*
  * Free the ELFModuleRec
  */
-    xf86loaderfree(elffile);
+    xfree(elffile);
 
     return;
 }

Index: elfloader.h
===================================================================
RCS file: /cvs/xserver/xfree86/loader/elfloader.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- a/elfloader.h	15 Oct 2003 16:29:03 -0000	1.4
+++ b/elfloader.h	19 Feb 2004 03:51:37 -0000	1.5
@@ -21,7 +21,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elfloader.h,v 1.3 1998/09/20 14:41:05 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elfloader.h,v 1.4 2003/10/15 16:29:03 dawes Exp $ */
 
 #ifndef _ELFLOADER_H
 #define _ELFLOADER_H

Index: extsym.c
===================================================================
RCS file: /cvs/xserver/xfree86/loader/extsym.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- a/extsym.c	15 Oct 2003 16:29:03 -0000	1.9
+++ b/extsym.c	19 Feb 2004 03:51:37 -0000	1.10
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.8 2003/08/24 17:37:01 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.9 2003/10/15 16:29:03 dawes Exp $ */
 
 /*
  *

Index: fontsym.c
===================================================================
RCS file: /cvs/xserver/xfree86/loader/fontsym.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- a/fontsym.c	20 Dec 2003 20:04:34 -0000	1.14
+++ b/fontsym.c	19 Feb 2004 03:51:37 -0000	1.15
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/fontsym.c,v 1.13 2003/10/15 16:29:04 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/fontsym.c,v 1.14 2003/12/20 20:04:34 dawes Exp $ */
 /*
  * Copyright (c) 1998-2002 by The XFree86 Project, Inc.
  *

Index: hash.c
===================================================================
RCS file: /cvs/xserver/xfree86/loader/hash.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- a/hash.c	23 Nov 2003 00:57:56 -0000	1.25
+++ b/hash.c	19 Feb 2004 03:51:37 -0000	1.26
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/hash.c,v 1.24 2003/11/17 22:20:40 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/hash.c,v 1.25 2003/11/23 00:57:56 dawes Exp $ */
 
 /*
  *
@@ -24,7 +24,7 @@
  */
 
 #include "os.h"
-#include "Xos.h"
+#include <X11/Xos.h>
 #undef abs
 #include <stdlib.h>
 #include "sym.h"

Index: hash.h
===================================================================
RCS file: /cvs/xserver/xfree86/loader/hash.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- a/hash.h	25 Jul 1998 16:56:16 -0000	1.3
+++ b/hash.h	19 Feb 2004 03:51:37 -0000	1.4
@@ -21,7 +21,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/hash.h,v 1.2.2.2 1998/07/04 13:32:45 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/hash.h,v 1.3 1998/07/25 16:56:16 dawes Exp $ */
 
 #ifndef _HASH_H
 #define _HASH_H

Index: loader.c
===================================================================
RCS file: /cvs/xserver/xfree86/loader/loader.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- a/loader.c	6 Nov 2003 18:38:13 -0000	1.71
+++ b/loader.c	19 Feb 2004 03:51:37 -0000	1.72
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loader.c,v 1.70tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loader.c,v 1.71 2003/11/06 18:38:13 tsi Exp $ */
 
 /*
  * Copyright 1995-1998 by Metro Link, Inc.

Index: loader.h
===================================================================
RCS file: /cvs/xserver/xfree86/loader/loader.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- a/loader.h	6 Nov 2003 18:38:14 -0000	1.28
+++ b/loader.h	19 Feb 2004 03:51:37 -0000	1.29
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loader.h,v 1.27tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loader.h,v 1.28 2003/11/06 18:38:14 tsi Exp $ */
 
 /*
  *
@@ -151,18 +151,6 @@
 extern int nCommons;
 
 /*
- * The loader uses loader specific alloc/calloc/free functions that
- * are mapped to either to the regular Xserver functions, or in a couple
- * of special cases, mapped to the C library functions.
- */
-#if !defined(PowerMAX_OS) && !(defined(linux) && (defined(__alpha__) || defined(__powerpc__) || defined(__ia64__))) && 0
-#define xf86loadermalloc(size) xalloc(size)
-#define xf86loaderrealloc(ptr,size) xrealloc(ptr,size)
-#define xf86loadercalloc(num,size) xcalloc(num,size)
-#define xf86loaderfree(ptr) xfree(ptr)
-#define xf86loaderstrdup(ptr) xstrdup(ptr)
-#else
-/*
  * On Some OSes, xalloc() et al uses mmap to allocate space for large
  * allocation. This has the effect of placing the text section of some
  * modules very far away from the rest which are placed on the heap.
@@ -181,7 +169,6 @@
 #define xf86loadercalloc(num,size) calloc(num,size)
 #define xf86loaderfree(ptr) free(ptr)
 #define xf86loaderstrdup(ptr) strdup(ptr)
-#endif
 
 typedef struct _loader *loaderPtr;
 

Index: loaderProcs.h
===================================================================
RCS file: /cvs/xserver/xfree86/loader/loaderProcs.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- a/loaderProcs.h	15 Oct 2003 16:29:04 -0000	1.21
+++ b/loaderProcs.h	19 Feb 2004 03:51:37 -0000	1.22
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loaderProcs.h,v 1.20 2003/08/24 17:37:01 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loaderProcs.h,v 1.21 2003/10/15 16:29:04 dawes Exp $ */
 
 /*
  *
@@ -54,7 +54,7 @@
 
 #define IN_LOADER
 #include "xf86Module.h"
-#include "fontmod.h"
+#include <X11/fonts/fontmod.h>
 
 typedef struct module_desc {
     struct module_desc *child;

Index: loadext.c
===================================================================
RCS file: /cvs/xserver/xfree86/loader/loadext.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- a/loadext.c	15 Oct 2003 16:29:04 -0000	1.8
+++ b/loadext.c	19 Feb 2004 03:51:37 -0000	1.9
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loadext.c,v 1.7 2003/08/24 17:37:01 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loadext.c,v 1.8 2003/10/15 16:29:04 dawes Exp $ */
 /*
  * Copyright (c) 2000 by The XFree86 Project, Inc.
  *

Index: loadfont.c
===================================================================
RCS file: /cvs/xserver/xfree86/loader/loadfont.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- a/loadfont.c	15 Oct 2003 16:29:04 -0000	1.4
+++ b/loadfont.c	19 Feb 2004 03:51:37 -0000	1.5
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loadfont.c,v 1.3 2003/08/24 17:37:01 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loadfont.c,v 1.4 2003/10/15 16:29:04 dawes Exp $ */
 /*
  * Copyright (c) 1998 by The XFree86 Project, Inc.
  *

Index: loadmod.c
===================================================================
RCS file: /cvs/xserver/xfree86/loader/loadmod.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- a/loadmod.c	3 Nov 2003 05:11:51 -0000	1.73
+++ b/loadmod.c	19 Feb 2004 03:51:37 -0000	1.74
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loadmod.c,v 1.72tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loadmod.c,v 1.73 2003/11/03 05:11:51 tsi Exp $ */
 
 /*
  *
@@ -58,9 +58,7 @@
 #include "misc.h"
 #include "xf86.h"
 #include "xf86Priv.h"
-#ifdef XINPUT
 #include "xf86Xinput.h"
-#endif
 #include "loader.h"
 #include "xf86Optrec.h"
 

Index: misym.c
===================================================================
RCS file: /cvs/xserver/xfree86/loader/misym.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- a/misym.c	15 Oct 2003 16:29:04 -0000	1.38
+++ b/misym.c	19 Feb 2004 03:51:37 -0000	1.39
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/misym.c,v 1.37 2003/08/24 17:37:02 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/misym.c,v 1.38 2003/10/15 16:29:04 dawes Exp $ */
 
 /*
  *

Index: os.c
===================================================================
RCS file: /cvs/xserver/xfree86/loader/os.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- a/os.c	15 Oct 2003 16:29:04 -0000	1.4
+++ b/os.c	19 Feb 2004 03:51:37 -0000	1.5
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/os.c,v 1.3 2003/08/24 17:37:02 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/os.c,v 1.4 2003/10/15 16:29:04 dawes Exp $ */
 
 /*
  * Copyright (c) 1999-2002 by The XFree86 Project, Inc.
@@ -28,39 +28,7 @@
  */
 
 #include "loaderProcs.h"
-
-/*
- * OSNAME is a standard form of the OS name that may be used by the
- * loader and by OS-specific modules.
- */
-
-#if defined(__linux__)
-#define OSNAME "linux"
-#elif defined(__FreeBSD__)
-#define OSNAME "freebsd"
-#elif defined(__NetBSD__)
-#define OSNAME "netbsd"
-#elif defined(__OpenBSD__)
-#define OSNAME "openbsd"
-#elif defined(Lynx)
-#define OSNAME "lynxos"
-#elif defined(__GNU__)
-#define OSNAME "hurd"
-#elif defined(SCO)
-#define OSNAME "sco"
-#elif defined(DGUX)
-#define OSNAME "dgux"
-#elif defined(ISC)
-#define OSNAME "isc"
-#elif defined(SVR4) && defined(sun)
-#define OSNAME "solaris"
-#elif defined(SVR4)
-#define OSNAME "svr4"
-#elif defined(__UNIXOS2__)
-#define OSNAME "os2"
-#else
-#define OSNAME "unknown"
-#endif
+#include "xf86.h"
 
 /* Return the OS name, and run-time OS version */
 

Index: os2funcs.c
===================================================================
RCS file: /cvs/xserver/xfree86/loader/os2funcs.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- a/os2funcs.c	15 Oct 2003 16:29:04 -0000	1.8
+++ b/os2funcs.c	19 Feb 2004 03:51:37 -0000	1.9
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/os2funcs.c,v 1.7 2003/03/25 04:18:22 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/os2funcs.c,v 1.8 2003/10/15 16:29:04 dawes Exp $ */
 /*
  * (c) Copyright 1997 by Sebastien Marineau
  *                      <marineau@genie.uottawa.ca>

Index: sym.h
===================================================================
RCS file: /cvs/xserver/xfree86/loader/sym.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- a/sym.h	15 Oct 2003 16:29:04 -0000	1.7
+++ b/sym.h	19 Feb 2004 03:51:37 -0000	1.8
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/sym.h,v 1.6 2000/10/24 00:06:55 anderson Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/sym.h,v 1.7 2003/10/15 16:29:04 dawes Exp $ */
 
 /*
  *

Index: xf86sym.c
===================================================================
RCS file: /cvs/xserver/xfree86/loader/xf86sym.c,v
retrieving revision 1.242
retrieving revision 1.243
diff -u -d -r1.242 -r1.243
--- a/xf86sym.c	27 Oct 2003 20:51:16 -0000	1.242
+++ b/xf86sym.c	19 Feb 2004 03:51:37 -0000	1.243
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/xf86sym.c,v 1.241 2003/10/26 12:17:17 herrb Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/xf86sym.c,v 1.242 2003/10/27 20:51:16 herrb Exp $ */
 
 /*
  *