Index: /trunk/psLib/configure.ac
===================================================================
--- /trunk/psLib/configure.ac	(revision 4818)
+++ /trunk/psLib/configure.ac	(revision 4819)
@@ -12,11 +12,19 @@
 AC_SUBST(PSLIB_LT_VERSION,$PSLIB_LT_VERSION)
 
+dnl Determine the location of GNU sed
+AC_CHECK_PROGS([SED],[gsed sed])
+if test "${SED}" == ""
+then
+  AC_MSG_ERROR([GNU SED is required.])
+fi
+AC_SUBST(SED,[${SED}])
+
 SUBDIR="etc src test" dnl don't include 'swig', as it is optional
 
 SRCPATH="`pwd`/src"
 SRCDIRS="sys astro db fft fits imageops math mathtypes types xml"
-SRCINC=`echo "${SRCDIRS=}" | sed "s|\(\\w\+\)|-I\${SRCPATH=}/\1|g"`
-
-SRCSUBLIBS=`echo "${SRCDIRS=}" | sed "s|\(\\w\+\)|\1/libpslib\1.la|g"`
+SRCINC=`echo "${SRCDIRS=}" | ${SED} "s|\(\\w\+\)|-I\${SRCPATH=}/\1|g"`
+
+SRCSUBLIBS=`echo "${SRCDIRS=}" | ${SED} "s|\(\\w\+\)|\1/libpslib\1.la|g"`
 AC_SUBST(SRCSUBLIBS,${SRCSUBLIBS=})
 CFLAGS="${CFLAGS=} -I${SRCPATH=} ${SRCINC=}"
@@ -37,5 +45,6 @@
 case $host in
   *-apple-darwin*)
-    CFLAGS="${CFLAGS=} -Wno-long-double"
+dnl    CFLAGS="${CFLAGS=} -Wno-long-double"
+dnl GCC 4.0 on OSX seems to hate that.
     ;;
 esac
@@ -193,4 +202,5 @@
 PSLIB_LIBS="${PSLIB_LIBS=} `${XML_CONFIG} --libs`"
 PSLIB_CFLAGS="${PSLIB_CFLAGS=} `${XML_CONFIG} --cflags`"
+
 
 dnl ------------------- SWIG options ---------------------
Index: /trunk/psLib/src/types/psBitSet.c
===================================================================
--- /trunk/psLib/src/types/psBitSet.c	(revision 4818)
+++ /trunk/psLib/src/types/psBitSet.c	(revision 4819)
@@ -11,6 +11,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-15 02:33:54 $
+ *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-19 00:31:42 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -95,5 +95,5 @@
                       long bit)
 {
-    char *byte = NULL;
+    unsigned char *byte = NULL;
 
     if (bitSet == NULL) {
@@ -118,5 +118,5 @@
                         long bit)
 {
-    char *byte = NULL;
+    unsigned char *byte = NULL;
 
     if (bitSet == NULL) {
@@ -141,5 +141,5 @@
                   long bit)
 {
-    char *byte = NULL;
+    unsigned char *byte = NULL;
 
     if (bitSet == NULL) {
@@ -167,7 +167,7 @@
     psS32 i = 0;
     psS32 n = 0;
-    char* outBits = NULL;
-    char* inBits1 = NULL;
-    char* inBits2 = NULL;
+    unsigned char* outBits = NULL;
+    unsigned char* inBits1 = NULL;
+    unsigned char* inBits2 = NULL;
     psS32 op = UNKNOWN_OP;
 
Index: /trunk/psLib/src/xml/psXML.c
===================================================================
--- /trunk/psLib/src/xml/psXML.c	(revision 4818)
+++ /trunk/psLib/src/xml/psXML.c	(revision 4819)
@@ -10,6 +10,6 @@
 *  @author David Robbins, MHPCC
 *
-*  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-08-16 20:13:20 $
+*  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-08-19 00:31:42 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -61,5 +61,5 @@
     if( root == NULL ) {
         *XML = xmlNewDoc((const xmlChar*)"1.0");
-        root = xmlNewDocNode(*XML, NULL, (const xmlChar*)"metadata", "\n");
+        root = xmlNewDocNode(*XML, NULL, (const xmlChar*)"metadata", (const xmlChar*)"\n");
         xmlDocSetRootElement(*XML, root);
     }
@@ -75,40 +75,40 @@
         switch (type) {
         case PS_DATA_BOOL:
-            cur_node = xmlNewChild(root, NULL, "item", "\n");
-            prop = xmlNewProp(cur_node, "name", item->name);
-            prop = xmlNewProp(cur_node, "psType", "BOOL");
+            cur_node = xmlNewChild(root, NULL, (const xmlChar*)"item", (const xmlChar*)"\n");
+            prop = xmlNewProp(cur_node, (const xmlChar*)"name", (const xmlChar*)item->name);
+            prop = xmlNewProp(cur_node, (const xmlChar*)"psType", (const xmlChar*)"BOOL");
             if ( item->data.B )
                 strncpy(content, "TRUE", MAXSTR);
             else
                 strncpy(content, "FALSE", MAXSTR);
-            prop = xmlNewProp(cur_node, "value", content);
+            prop = xmlNewProp(cur_node, (const xmlChar*)"value", (const xmlChar*)content);
             break;
         case PS_DATA_S32:
             snprintf(content, MAXSTR, "%d", item->data.S32);
-            cur_node = xmlNewChild(root, NULL, "item", "\n");
-            prop = xmlNewProp(cur_node, "name", item->name);
-            prop = xmlNewProp(cur_node, "psType", "S32");
-            prop = xmlNewProp(cur_node, "value", content);
+            cur_node = xmlNewChild(root, NULL, (const xmlChar*)"item", (const xmlChar*)"\n");
+            prop = xmlNewProp(cur_node, (const xmlChar*)"name", (const xmlChar*)item->name);
+            prop = xmlNewProp(cur_node, (const xmlChar*)"psType", (const xmlChar*)"S32");
+            prop = xmlNewProp(cur_node, (const xmlChar*)"value", (const xmlChar*)content);
             break;
         case PS_DATA_F32:
             snprintf(content, MAXSTR, "%f", item->data.F32);
-            cur_node = xmlNewChild(root, NULL, "item", "\n");
-            prop = xmlNewProp(cur_node, "name", item->name);
-            prop = xmlNewProp(cur_node, "psType", "F32");
-            prop = xmlNewProp(cur_node, "value", content);
+            cur_node = xmlNewChild(root, NULL, (const xmlChar*)"item", (const xmlChar*)"\n");
+            prop = xmlNewProp(cur_node, (const xmlChar*)"name", (const xmlChar*)item->name);
+            prop = xmlNewProp(cur_node, (const xmlChar*)"psType", (const xmlChar*)"F32");
+            prop = xmlNewProp(cur_node, (const xmlChar*)"value", (const xmlChar*)content);
             break;
         case PS_DATA_F64:
             snprintf(content, MAXSTR, "%lf", item->data.F64);
-            cur_node = xmlNewChild(root, NULL, "item", "\n");
-            prop = xmlNewProp(cur_node, "name", item->name);
-            prop = xmlNewProp(cur_node, "psType", "F64");
-            prop = xmlNewProp(cur_node, "value", content);
+            cur_node = xmlNewChild(root, NULL, (const xmlChar*)"item", (const xmlChar*)"\n");
+            prop = xmlNewProp(cur_node, (const xmlChar*)"name", (const xmlChar*)item->name);
+            prop = xmlNewProp(cur_node, (const xmlChar*)"psType", (const xmlChar*)"F64");
+            prop = xmlNewProp(cur_node, (const xmlChar*)"value", (const xmlChar*)content);
             break;
         case PS_DATA_STRING:
-            cur_node = xmlNewChild(root, NULL, "item", "\n");
-            prop = xmlNewProp(cur_node, "name", item->name);
-            prop = xmlNewProp(cur_node, "psType", "STR");
+            cur_node = xmlNewChild(root, NULL, (const xmlChar*)"item", (const xmlChar*)"\n");
+            prop = xmlNewProp(cur_node, (const xmlChar*)"name", (const xmlChar*)item->name);
+            prop = xmlNewProp(cur_node, (const xmlChar*)"psType", (const xmlChar*)"STR");
             strncpy(content, ((char *)(item->data.V)), MAXSTR);
-            prop = xmlNewProp(cur_node, "value", content);
+            prop = xmlNewProp(cur_node, (const xmlChar*)"value", (const xmlChar*)content);
             break;
         case PS_DATA_METADATA:
@@ -119,17 +119,17 @@
             newDoc = psMetadataToXMLDoc(item->data.md);
             new_root = xmlDocGetRootElement(*newDoc);
-            prop = xmlNewProp(new_root, "name", item->name);
-            prop = xmlNewProp(new_root, "psType", "METADATA");
+            prop = xmlNewProp(new_root, (const xmlChar*)"name", (const xmlChar*)item->name);
+            prop = xmlNewProp(new_root, (const xmlChar*)"psType", (const xmlChar*)"METADATA");
             new_node = xmlAddSibling(cur_node, new_root);
             psFree(newDoc);
             break;
         case PS_DATA_VECTOR:
-            cur_node = xmlNewChild(root, NULL, "vector", "\n");
-            prop = xmlNewProp(cur_node, "name", item->name);
+            cur_node = xmlNewChild(root, NULL, (const xmlChar*)"vector", (const xmlChar*)"\n");
+            prop = xmlNewProp(cur_node, (const xmlChar*)"name", (const xmlChar*)item->name);
             type = ((psVector*)(item->data.V))->type.type;
             strncpy(vec, "", MAXSTR);
             switch (type) {
             case PS_DATA_S32:
-                prop = xmlNewProp(cur_node, "psType", "S32");
+                prop = xmlNewProp(cur_node, (const xmlChar*)"psType", (const xmlChar*)"S32");
                 for (i = 0; ((psVector*)(item->data.V))->data.S32[i] != 0; i++) {
                     snprintf(content, MAXSTR, "%d",
@@ -143,5 +143,5 @@
                 break;
             case PS_DATA_F32:
-                prop = xmlNewProp(cur_node, "psType", "F32");
+                prop = xmlNewProp(cur_node, (const xmlChar*)"psType", (const xmlChar*)"F32");
                 for (i = 0; ((psVector*)(item->data.V))->data.F32[i] != 0; i++) {
                     snprintf(content, MAXSTR, "%f",
@@ -154,5 +154,5 @@
                 break;
             case PS_DATA_F64:
-                prop = xmlNewProp(cur_node, "psType", "F64");
+                prop = xmlNewProp(cur_node, (const xmlChar*)"psType", (const xmlChar*)"F64");
                 for (i = 0; ((psVector*)(item->data.V))->data.F64[i] != 0; i++) {
                     snprintf(content, MAXSTR, "%lf",
@@ -172,5 +172,5 @@
                 return NULL;
             }
-            prop = xmlNewProp(cur_node, "value", vec);
+            prop = xmlNewProp(cur_node, (const xmlChar*)"value", (const xmlChar*)vec);
             break;
         case PS_DATA_UNKNOWN:
@@ -271,10 +271,10 @@
     //NEED TO CHECK CONTENTS OF EACH ITEM/NODE //
     //if item then,
-    if(!strncmp(node->name, "item", MAXSTR) || !strncmp(node->name, "ITEM", MAXSTR)) {
+    if(!strncmp((const char*)node->name, "item", MAXSTR) || !strncmp((const char*)node->name, "ITEM", MAXSTR)) {
         if (node->properties != NULL && node->properties->name != NULL
                 && node->properties->next != NULL && node->properties->next->name != NULL
                 && node->properties->next->next != NULL
                 && node->properties->next->next->name != NULL) {
-            psDataType type = getType(node->properties->next->children->content);
+            psDataType type = getType((const char*)node->properties->next->children->content);
             return type;
         } else {
@@ -285,5 +285,5 @@
     }
     //if vector then,
-    if(!strncmp(node->name, "vector", MAXSTR) || !strncmp(node->name, "VECTOR", MAXSTR)) {
+    if(!strncmp((const char*)node->name, "vector", MAXSTR) || !strncmp((const char*)node->name, "VECTOR", MAXSTR)) {
         if (node->properties != NULL && node->properties->name != NULL
                 && node->properties->next != NULL && node->properties->next->name != NULL
@@ -299,5 +299,5 @@
     }
     //if metadata then,
-    if(!strncmp(node->name, "metadata", MAXSTR)) {
+    if(!strncmp((const char*)node->name, "metadata", MAXSTR)) {
         if (node->properties != NULL && node->properties->name
                 && node->properties->next != NULL && node->properties->next->name != NULL) {
@@ -331,5 +331,5 @@
         if ( cur_node->type == XML_ELEMENT_NODE ) {
             //if the root node isn't a metadata//
-            if ( nodeNum == 0 && strncmp(cur_node->name, "metadata", MAXSTR) ) {
+            if ( nodeNum == 0 && strncmp((const char*)cur_node->name, "metadata", MAXSTR) ) {
                 psError(PS_ERR_BAD_PARAMETER_VALUE, true,
                         PS_ERRORTEXT_psXML_INVALID_CONTENT);
@@ -351,25 +351,25 @@
                     break;
                 case PS_DATA_F32:
-                    strncpy(name, cur_node->properties->children->content, MAXSTR);
+                    strncpy(name, (const char*)cur_node->properties->children->content, MAXSTR);
                     strncpy(content,
-                            cur_node->properties->next->next->children->content, MAXSTR);
+                            (const char*)cur_node->properties->next->next->children->content, MAXSTR);
                     psMetadataAddF32(meta, PS_LIST_TAIL, name, "", strtof(content, NULL));
                     break;
                 case PS_DATA_F64:
-                    strncpy(name, cur_node->properties->children->content, MAXSTR);
+                    strncpy(name, (const char*)cur_node->properties->children->content, MAXSTR);
                     strncpy(content,
-                            cur_node->properties->next->next->children->content, MAXSTR);
+                            (const char*)cur_node->properties->next->next->children->content, MAXSTR);
                     psMetadataAddF64(meta, PS_LIST_TAIL, name, "", strtod(content, NULL));
                     break;
                 case PS_DATA_STRING:
-                    strncpy(name, cur_node->properties->children->content, MAXSTR);
+                    strncpy(name, (const char*)cur_node->properties->children->content, MAXSTR);
                     psMetadataAddStr(meta, PS_LIST_TAIL, name, "",
-                                     cur_node->properties->next->next->children->content);
+                                     (const char*)cur_node->properties->next->next->children->content);
                     break;
                 case PS_DATA_VECTOR:
-                    strncpy(name, cur_node->properties->children->content, MAXSTR);
+                    strncpy(name, (const char*)cur_node->properties->children->content, MAXSTR);
                     strncpy(content,
-                            cur_node->properties->next->next->children->content, MAXSTR);
-                    elemType = getType(cur_node->properties->next->children->content);
+                            (const char*)cur_node->properties->next->next->children->content, MAXSTR);
+                    elemType = getType((const char*)cur_node->properties->next->children->content);
                     if (elemType == PS_DATA_UNKNOWN || elemType == PS_DATA_STRING
                             || elemType == PS_DATA_BOOL) {
@@ -386,5 +386,5 @@
                     break;
                 case PS_DATA_METADATA:
-                    strncpy(name, cur_node->properties->children->content, MAXSTR);
+                    strncpy(name, (const char*)cur_node->properties->children->content, MAXSTR);
                     //                        psMetadata *temp = psMetadataAlloc();
                     psMetadata *temp = NULL;
@@ -394,7 +394,7 @@
                     break;
                 case PS_DATA_BOOL:
-                    strncpy(name, cur_node->properties->children->content, MAXSTR);
+                    strncpy(name, (const char*)cur_node->properties->children->content, MAXSTR);
                     strncpy(content,
-                            cur_node->properties->next->next->children->content, MAXSTR);
+                            (const char*)cur_node->properties->next->next->children->content, MAXSTR);
                     if ( !strncmp(content, "true", MAXSTR) ||
                             !strncmp(content, "TRUE", MAXSTR) ||
@@ -504,5 +504,5 @@
         return false;
     }
-    strncpy(buffer, buff, MAXVEC);
+    strncpy(buffer, (const char*)buff, MAXVEC);
     xmlFree(buff);
 
