Revision: 55200
          http://brlcad.svn.sourceforge.net/brlcad/?rev=55200&view=rev
Author:   r_weiss
Date:     2013-04-19 21:43:40 +0000 (Fri, 19 Apr 2013)
Log Message:
-----------
Update to libregex library, for Windows 64bit, to fix issues with type "long" 
versus "ptrdiff_t" and "ssize_t". Reorganized the headers for libregex to use 
the "_WIN64" definition and build without dependencies on BRL-CAD headers. More 
testing is needed with these changes.  

Modified Paths:
--------------
    brlcad/trunk/src/other/libregex/regcomp.c
    brlcad/trunk/src/other/libregex/regerror.c
    brlcad/trunk/src/other/libregex/regex.h
    brlcad/trunk/src/other/libregex/regexec.c
    brlcad/trunk/src/other/libregex/regfree.c

Modified: brlcad/trunk/src/other/libregex/regcomp.c
===================================================================
--- brlcad/trunk/src/other/libregex/regcomp.c   2013-04-19 21:38:30 UTC (rev 
55199)
+++ brlcad/trunk/src/other/libregex/regcomp.c   2013-04-19 21:43:40 UTC (rev 
55200)
@@ -40,13 +40,6 @@
 #endif
 #endif /* LIBC_SCCS and not lint */
 
-#include <sys/types.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <limits.h>
-#include <stdlib.h>
-
 #include "regex.h"
 #include "./utils.h"
 #include "./regex2.h"

Modified: brlcad/trunk/src/other/libregex/regerror.c
===================================================================
--- brlcad/trunk/src/other/libregex/regerror.c  2013-04-19 21:38:30 UTC (rev 
55199)
+++ brlcad/trunk/src/other/libregex/regerror.c  2013-04-19 21:43:40 UTC (rev 
55200)
@@ -40,13 +40,6 @@
 #endif
 #endif /* LIBC_SCCS and not lint */
 
-#include <sys/types.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <limits.h>
-#include <stdlib.h>
-
 #include "regex.h"
 #include "./utils.h"
 

Modified: brlcad/trunk/src/other/libregex/regex.h
===================================================================
--- brlcad/trunk/src/other/libregex/regex.h     2013-04-19 21:38:30 UTC (rev 
55199)
+++ brlcad/trunk/src/other/libregex/regex.h     2013-04-19 21:43:40 UTC (rev 
55200)
@@ -35,8 +35,49 @@
 #ifndef _REGEX_H_
 #define        _REGEX_H_
 
-#include "common.h"
+#if defined (_WIN32)
+#  include <BaseTsd.h>
+#endif
 
+#include <limits.h>
+#include <stddef.h>
+
+#if !defined(ssize_t)
+#  if defined(_WIN32)
+     typedef SSIZE_T ssize_t;
+#  else
+     typedef ptrdiff_t ssize_t;
+#  endif
+#  define HAVE_SSIZE_T 1
+#endif
+
+
+#if !defined(off_t)
+#  if defined(_WIN32)
+     typedef SSIZE_T off_t;
+#    define _OFF_T_DEFINED 1
+#  else
+     typedef ptrdiff_t ssize_t;
+#  endif
+#endif
+
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdlib.h>
+
+
+#ifdef __cplusplus
+#  define __BEGIN_DECLS   extern "C" {
+#  define __END_DECLS     }
+#else
+#  define __BEGIN_DECLS
+#  define __END_DECLS
+#endif
+
+
 #ifndef REGEX_EXPORT
 #  if defined(_WIN32) && !defined(__CYGWIN__) && defined(BRLCAD_DLL)
 #    ifdef REGEX_EXPORT_DLL
@@ -49,16 +90,8 @@
 #  endif
 #endif
 
-#include <sys/types.h>
-
 /* types */
 
-/* ugly hack to make non-MS windows compilers work */
-#if defined(_WIN32) && !defined(_MSC_VER) && !defined(_OFF_T_)
-#define _OFF_T_
-typedef ssize_t off_t;
-#endif
-
 typedef off_t regoff_t;
 
 typedef struct {

Modified: brlcad/trunk/src/other/libregex/regexec.c
===================================================================
--- brlcad/trunk/src/other/libregex/regexec.c   2013-04-19 21:38:30 UTC (rev 
55199)
+++ brlcad/trunk/src/other/libregex/regexec.c   2013-04-19 21:43:40 UTC (rev 
55200)
@@ -47,12 +47,6 @@
  * macros that code uses.  This lets the same code operate on two different
  * representations for state sets.
  */
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <ctype.h>
 
 #include "regex.h"
 #include "./utils.h"

Modified: brlcad/trunk/src/other/libregex/regfree.c
===================================================================
--- brlcad/trunk/src/other/libregex/regfree.c   2013-04-19 21:38:30 UTC (rev 
55199)
+++ brlcad/trunk/src/other/libregex/regfree.c   2013-04-19 21:43:40 UTC (rev 
55200)
@@ -40,10 +40,6 @@
 #endif
 #endif /* LIBC_SCCS and not lint */
 
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-
 #include "regex.h"
 #include "./utils.h"
 #include "./regex2.h"

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to