Skip to content

Commit

Permalink
merging RELEASE branch to STABLE branch, r75561 through r75757
Browse files Browse the repository at this point in the history
svn:revision:75758
svn:branch:STABLE
svn:account:starseeker
  • Loading branch information
starseeker committed May 8, 2020
2 parents 1c6f874 + 021ac04 commit 4919858
Show file tree
Hide file tree
Showing 95 changed files with 993 additions and 391 deletions.
117 changes: 117 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,120 @@
2020-05-05 18:39 starseeker

* [r75697] src/other/libregex/regex.h:
libregex doesn't appear to use lseek and it's making VS2019
unhappy to redefine it.

2020-05-04 17:35 starseeker

* [r75687] include/bu/vls.h:
don't need stdio.h here

2020-05-04 16:11 starseeker

* [r75685] misc/attributes/gen-attributes-file.cpp:
ditto gen-attributes-file.cpp - needs off_t update

2020-05-04 16:09 starseeker

* [r75684] src/other/stepcode/src/clstepcore/complexSupport.h:
stepcode needs the same off_t bit

2020-05-04 15:52 starseeker

* [r75682] src/libpkg/pkg.c:
Use bio.h here

2020-05-04 15:45 starseeker

* [r75681] src/other/libregex/regex.h:
ws

2020-05-04 15:44 starseeker

* [r75680] src/other/libregex/regex.h:
Update our bundled regex.h to use the same type of off_t
definition as bio.h

2020-05-04 15:23 starseeker

* [r75679] ., include/bu/glob.h, include/bu/vls.h:
Cherrypick r75678

2020-05-04 14:08 starseeker

* [r75677] ., include/bio.h, include/config_win.h.in,
src/conv/intaval/tgf-g.cpp, src/conv/k-g.cpp,
src/conv/raw/raw-g.cpp, src/libanalyze/nirt.cpp,
src/libgcv/plugins/fastgen4/fastgen4_write.cpp,
src/libgcv/plugins/vrml/vrml_read/file_util.cpp,
src/nirt/main.cpp:
Cherrypick r75077, r75078 and r75084 - off_t fixes

2020-05-04 13:34 starseeker

* [r75676] ., src/gtools/gchecker.cpp:
Cherrypick r75675

2020-05-04 13:07 starseeker

* [r75674] ., bench/pixcmp.c, include/bio.h, include/bu/file.h,
include/bu/ptbl.h, include/bu/time.h, include/common.h,
include/rt/db_fullpath.h, include/rt/db_instance.h,
include/rt/db_io.h, include/rt/directory.h, include/rt/mater.h,
include/rt/mem.h, src/conv/asc/asc2g.c, src/conv/conv-vg2g.c,
src/conv/dxf/dxf-g.c, src/conv/fast4-g.c, src/conv/g-acad.c,
src/conv/g-obj.c, src/conv/iges/findp.c, src/conv/iges/g-iges.c,
src/conv/iges/readrec.c, src/conv/iges/recsize.c,
src/conv/intaval/tgf-g.cpp, src/conv/k-g.cpp,
src/conv/nastran-g.c, src/conv/raw/raw-g.cpp,
src/conv/vdeck/vdeck.c, src/conv/vdeck/vextern.h, src/fb/bw-fb.c,
src/fb/pix-fb.c, src/fb/tests/fbthreadtest.c,
src/gtools/gdiff/gdiff.c, src/libanalyze/nirt.cpp, src/libbu,
src/libbu/file.c, src/libbu/mappedfile.c, src/libbu/vfont.c,
src/libbu/vfont.h, src/libbu/vls.c, src/libfb/fb_generic.c,
src/libfb/if_X24.c, src/libfb/if_disk.c,
src/libgcv/plugins/fastgen4/fastgen4_read.c,
src/libgcv/plugins/fastgen4/fastgen4_write.cpp,
src/libgcv/plugins/obj/obj_write.c,
src/libgcv/plugins/vrml/vrml_read/file_util.cpp,
src/libged/dup.c, src/libged/ged.c, src/libged/tables.c,
src/libicv/rot.c, src/liboptical/oslexec_pvt.h,
src/librt/db5_alloc.c, src/librt/db5_scan.c,
src/librt/db_alloc.c, src/librt/db_corrupt.c,
src/librt/db_fullpath.c, src/librt/db_inmem.c, src/librt/db_io.c,
src/librt/db_lookup.c, src/librt/db_open.c, src/librt/db_scan.c,
src/librt/librt_private.h, src/librt/mater.c,
src/librt/memalloc.c, src/librt/primitives/primitive_util.c,
src/mged/edsol.c, src/mged/wdb_obj.c, src/nirt/main.cpp,
src/rt/do.c, src/rt/view.c, src/util/ap-pix.c, src/util/bwcrop.c,
src/util/bwhisteq.c, src/util/bwrot.c, src/util/bwscale.c,
src/util/pixbustup.c, src/util/pixcrop.c, src/util/pixrot.c,
src/util/pixscale.c, src/util/plot3rot.c:
Cherrypick r75063 - switch to b_off_t for newer MSVC 64 bit
offsets.

2020-05-04 12:59 starseeker

* [r75673] ., regress/gchecker/CMakeLists.txt:
Cherrypick r75672 - dependencies for regress-gchecker

2020-05-04 12:52 starseeker

* [r75671] ., NEWS, regress/CMakeLists.txt, regress/gchecker,
src/gtools/CMakeLists.txt, src/gtools/gchecker.cpp:
Cherrypick cross-platform generator of overlap outputs from trunk

2020-05-04 12:50 starseeker

* [r75670] src/libbu, src/libbu/dir.c:
Cherrypick r75000 from trunk - bu_dir fix for ext and libext

2020-04-22 20:02 starseeker

* [r75551] ChangeLog:
update changelog


2020-04-22 20:01 starseeker

* [r75550] ., src/libged/draw.c, src/libged/vdraw.c,
Expand Down
3 changes: 2 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ descriptive text that emphasizes or further describes significant
changes made. See document footer for additional details.

----------------------------------------------------------------------
--- 2020-04-22 Release 7.30.8 ---
--- 2020-05-08 Release 7.30.8 ---
----------------------------------------------------------------------

* added gchecker tool to generate MGED overlap inputs - Cliff Yapp
* improved behavior of MGED overlap checker GUI - Nick Reed
* fixed startup dimensions of overlap checker window - Nick Reed
* fixed rtedge line drawing color when using -W flag - Cliff Yapp
Expand Down
4 changes: 2 additions & 2 deletions bench/pixcmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ main(int argc, char *argv[])
}

/* skip requested pixels/bytes in FILE1 */
if (f1_skip && bu_fseek(f1, f1_skip, SEEK_SET)) {
if (f1_skip && fseek(f1, f1_skip, SEEK_SET)) {
bu_log("ERROR: Unable to seek %zd %s%s in FILE1\n",
f1_skip,
print_bytes?"byte":"pixel",
Expand All @@ -224,7 +224,7 @@ main(int argc, char *argv[])
}

/* skip requested pixels in FILE2 */
if (f2_skip && bu_fseek(f2, f2_skip, SEEK_SET)) {
if (f2_skip && fseek(f2, f2_skip, SEEK_SET)) {
bu_log("ERROR: Unable to seek %zd %s%s in FILE2\n",
f1_skip,
print_bytes?"byte":"pixel",
Expand Down
29 changes: 29 additions & 0 deletions include/bio.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,35 @@ extern int fileno(FILE *stream);
# define S_ISDIR(_st_mode) (((_st_mode) & S_IFMT) == S_IFDIR)
#endif

/* We want 64 bit (large file) I/O capabilities whenever they are available.
* Always define this before we include sys/types.h */
#ifndef _FILE_OFFSET_BITS
# define _FILE_OFFSET_BITS 64
#endif
#include <sys/types.h>

/* off_t is 32 bit size even on 64 bit Windows. In the past we have tried to
* force off_t to be 64 bit but this is failing on newer Windows/Visual Studio
* verions in 2020 - therefore, we instead introduce the b_off_t define to
* properly substitute the correct numerical type for the correct platform. */
#if defined(_WIN64)
# include <sys/stat.h>
# define b_off_t __int64
# define fseek _fseeki64
# define ftell _ftelli64
# define fstat _fstati64
# define lseek _lseeki64
# define stat _stati64
#elif defined (_WIN32)
# include <sys/stat.h>
# define b_off_t _off_t
# define fstat _fstat
# define lseek _lseek
# define stat _stat
#else
# define b_off_t off_t
#endif

#endif /* BIO_H */

/** @} */
Expand Down
18 changes: 0 additions & 18 deletions include/bu/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "common.h"

#include <stdio.h> /* for FILE */
#include <sys/types.h> /* for off_t */
#include <stddef.h> /* for size_t */
#include <stdlib.h> /* for getenv */

Expand Down Expand Up @@ -165,23 +164,6 @@ BU_EXPORT extern size_t bu_file_list(const char *path, const char *pattern, char
*/
BU_EXPORT extern char *bu_file_realpath(const char *path, char *resolved_path);


/**
* This wrapper appears to be necessary (at least on Visual Studio) to handle
* situations where 32 and 64 bit versions of this function have different
* function signatures (a simple define of the 32 bit version to the 64 bit
* version will produce compile errors.)
*/
BU_EXPORT extern int bu_fseek(FILE *stream, off_t offset, int origin);

/**
* This wrapper appears to be necessary (at least on Visual Studio) to handle
* situations where 32 and 64 bit versions of this function have different
* function signatures (a simple define of the 32 bit version to the 64 bit
* version will produce compile errors.)
*/
BU_EXPORT extern off_t bu_ftell(FILE *stream);

/** @} */

__END_DECLS
Expand Down
4 changes: 2 additions & 2 deletions include/bu/glob.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "common.h"

#include <sys/types.h> /* for off_t */
#include "bio.h" /* for b_off_t */

#include "bu/defines.h"
#include "bu/vls.h"
Expand Down Expand Up @@ -58,7 +58,7 @@ struct bu_dirent {
*/
struct bu_stat {
struct bu_vls name;
off_t size;
b_off_t size;
void *data;
};

Expand Down
2 changes: 1 addition & 1 deletion include/bu/ptbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "common.h"

#include <stddef.h> /* for size_t */
#include <sys/types.h> /* for off_t */
#include "bio.h" /* for b_off_t */

#include "bu/defines.h"
#include "bu/magic.h"
Expand Down
3 changes: 1 addition & 2 deletions include/bu/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@

#include "common.h"

#include <stdio.h> /* For FILE */
#include <sys/types.h> /* for off_t */
#include <stddef.h> /* for size_t */
#include <stdlib.h> /* for getenv */
#include "bio.h" /* for b_off_t */

#include "bu/defines.h"
#include "bu/vls.h"
Expand Down
6 changes: 3 additions & 3 deletions include/bu/vls.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
#define BU_VLS_H

#include "common.h"
#include <stdio.h> /* For FILE */
#include <sys/types.h> /* for off_t */
#include <stddef.h> /* for size_t */
#include <stdarg.h> /* For va_list */

#include "bio.h" /* for FILE and off_t */

#include "bu/defines.h"
#include "bu/magic.h"

Expand Down Expand Up @@ -166,7 +166,7 @@ BU_EXPORT extern void bu_vls_trunc(struct bu_vls *vp,
* un-nibbled.
*/
BU_EXPORT extern void bu_vls_nibble(struct bu_vls *vp,
off_t len);
b_off_t len);

/**
* Releases the memory used for the string buffer.
Expand Down
16 changes: 0 additions & 16 deletions include/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,6 @@ extern int snprintf(char *str, size_t size, const char *format, ...);
# define FMIN(a, b) (((a)<(b))?(a):(b))
#endif

/* If we've got the wrong off_t size, do something about it (*before*
we include sys/types.h, which can hold the incorrect definition.)
Also set any other related defines that might be needed. */
#if defined(OFF_T_SIZE_MISMATCH)
/*# pragma message("Fixing off_t definition")*/
# ifdef off_t
# undef off_t
# endif
typedef ptrdiff_t off_t;
# ifdef _off_t
# undef _off_t
# endif
typedef ptrdiff_t _off_t;
# define _OFF_T_DEFINED
#endif

/* make sure the old bsd types are defined for portability */
#if !defined(HAVE_U_TYPES)
typedef unsigned char u_char;
Expand Down
23 changes: 0 additions & 23 deletions include/config_win.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -202,29 +202,6 @@
# define strtoll _strtoi64
#endif

/* set up stat */
#if defined(SIZEOF_VOID_P) && SIZEOF_VOID_P == 8
# define stat _stati64
#else
# define stat _stat
#endif

/* set up fstat */
#if defined(SIZEOF_VOID_P) && SIZEOF_VOID_P == 8
# define fstat _fstati64
#else
# define fstat _fstat
#endif

/* set up lseek */
#ifndef HAVE_LSEEK
# if defined(SIZEOF_VOID_P) && SIZEOF_VOID_P == 8
# define lseek _lseeki64
# else
# define lseek _lseek
# endif
#endif

#cmakedefine fmax __max
#define ioctl ioctlsocket

Expand Down
3 changes: 2 additions & 1 deletion include/rt/db_fullpath.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define RT_DB_FULLPATH_H

#include "common.h"
#include "bio.h" /* for b_off_t */
#include "bu/vls.h"
#include "rt/defines.h"

Expand Down Expand Up @@ -93,7 +94,7 @@ RT_EXPORT extern void db_append_full_path(struct db_full_path *dest,
*/
RT_EXPORT extern void db_dup_path_tail(struct db_full_path *newp,
const struct db_full_path *oldp,
off_t start);
b_off_t start);


/**
Expand Down
3 changes: 2 additions & 1 deletion include/rt/db_instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#define RT_DB_INSTANCE_H

#include "common.h"
#include "bio.h" /* for b_off_t */

/* interface headers */
#include "bu/magic.h"
Expand Down Expand Up @@ -76,7 +77,7 @@ struct db_i {

struct directory * dbi_Head[RT_DBNHASH]; /** @brief PRIVATE: object hash table */
FILE * dbi_fp; /**< @brief PRIVATE: standard file pointer */
off_t dbi_eof; /**< @brief PRIVATE: End+1 pos after db_scan() */
b_off_t dbi_eof; /**< @brief PRIVATE: End+1 pos after db_scan() */
size_t dbi_nrec; /**< @brief PRIVATE: # records after db_scan() */
int dbi_uses; /**< @brief PRIVATE: # of uses of this struct */
struct mem_map * dbi_freep; /**< @brief PRIVATE: map of free granules */
Expand Down
Loading

0 comments on commit 4919858

Please sign in to comment.