[xiph-cvs] cvs commit: vorbis/lib registry.c vorbisenc.c

Chris Wolf cwolf at xiph.org
Fri Sep 7 01:42:30 PDT 2001



cwolf       01/09/07 01:42:30

  Modified:    lib      registry.c vorbisenc.c
  Log:
  Fix access violation for win32 vorbisenc

Revision  Changes    Path
1.10      +10 -1     vorbis/lib/registry.c

Index: registry.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/registry.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- registry.c	2001/08/13 01:36:57	1.9
+++ registry.c	2001/09/07 08:42:30	1.10
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: registry for time, floor, res backends and channel mappings
- last mod: $Id: registry.c,v 1.9 2001/08/13 01:36:57 xiphmont Exp $
+ last mod: $Id: registry.c,v 1.10 2001/09/07 08:42:30 cwolf Exp $
 
  ********************************************************************/
 
@@ -20,6 +20,7 @@
 #include "registry.h"
 #include "misc.h"
 
+
 /* seems like major overkill now; the backend numbers will grow into
    the infrastructure soon enough */
 
@@ -50,3 +51,11 @@
   &mapping0_exportbundle,
 };
 
+  /*
+   * For win32 only, the following code needs to be appended to this file 
+   * because the "sizeof" operator can only evaluate the sizes
+   * of statically initialized arrays in the same compilation unit.
+   */ 
+#if defined(_MSC_VER) && defined(STANDALONE_VORBISENC_DLL)
+# include "shmmap_c.h"
+#endif

1.15      +14 -1     vorbis/lib/vorbisenc.c

Index: vorbisenc.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/vorbisenc.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- vorbisenc.c	2001/09/01 06:14:50	1.14
+++ vorbisenc.c	2001/09/07 08:42:30	1.15
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: simple programmatic interface for encoder mode setup
- last mod: $Id: vorbisenc.c,v 1.14 2001/09/01 06:14:50 xiphmont Exp $
+ last mod: $Id: vorbisenc.c,v 1.15 2001/09/07 08:42:30 cwolf Exp $
 
  ********************************************************************/
 
@@ -29,6 +29,19 @@
 #include "os.h"
 #include "misc.h"
 
+/*
+ * If this module gets built into a separate shared library 
+ * on win32 (DLL), then the backend mappings from registry.c
+ * need to be referenced from a file-mapped shared memory segment.
+ */
+#if defined(_MSC_VER) && defined(STANDALONE_VORBISENC_DLL)
+# include "shmmap.h"
+
+# define _time_P    g_shared_map->p_time_P
+# define _floor_P   g_shared_map->p_floor_P
+# define _residue_P g_shared_map->p_residue_P
+# define _mapping_P g_shared_map->p_mapping_P
+#endif
 
 /* deepcopy all but the codebooks; in this usage, they're static
    (don't copy as they could be big) */

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list