diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-16 17:03:38 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-16 17:03:38 (GMT) |
commit | 4dd4557d1b695615fc7b2122831f95b116c887d2 (patch) | |
tree | 51fd20cd58ec0115ff58a3ca6900942406f1aed3 /generic | |
parent | 0250f4eaf6c19305f26f4ef4c5809e5c5cefd155 (diff) | |
parent | 4cc51af268b4295514a5dec61769b273320d0e93 (diff) | |
download | tk-4dd4557d1b695615fc7b2122831f95b116c887d2.zip tk-4dd4557d1b695615fc7b2122831f95b116c887d2.tar.gz tk-4dd4557d1b695615fc7b2122831f95b116c887d2.tar.bz2 |
Forbid Tk_Offset when building Tk itself. Don't worry about offsetof() any more.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tk.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/generic/tk.h b/generic/tk.h index d59d3af..8965b08 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -277,13 +277,9 @@ typedef struct Tk_ObjCustomOption { * Computes number of bytes from beginning of structure to a given field. */ -#ifndef TK_NO_DEPRECATED +#if !defined(TK_NO_DEPRECATED) && (TK_MAJOR_VERSION < 9) && !defined(BUILD_tk) # define Tk_Offset(type, field) ((int) offsetof(type, field)) #endif -/* Workaround for platforms missing offsetof(), e.g. VC++ 6.0 */ -#ifndef offsetof -# define offsetof(type, field) ((size_t) ((char *) &((type *) 0)->field)) -#endif /* * The following two structures are used for error handling. When config |