Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
9f3b1f13
Commit
9f3b1f13
authored
Jul 01, 2003
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* configure.ac: Added a compiler check for __attribute__((__packed__)).
parent
1fb282c6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
8 deletions
+34
-8
configure.ac
configure.ac
+11
-1
include/codecs.h
include/codecs.h
+10
-3
modules/mux/ogg.c
modules/mux/ogg.c
+13
-4
No files found.
configure.ac
View file @
9f3b1f13
dnl Autoconf settings for vlc
dnl $Id: configure.ac,v 1.1
8
2003/07/01 1
5:06:36
sam Exp $
dnl $Id: configure.ac,v 1.1
9
2003/07/01 1
7:14:58
sam Exp $
AC_INIT(vlc,0.6.0)
...
...
@@ -719,6 +719,16 @@ if test "${ac_cv_c_attribute_format}" != "no"; then
AC_DEFINE(HAVE_ATTRIBUTE_FORMAT, 1, Support for __attribute__((format())) with function pointers)
fi
dnl Check for __attribute__(())
AC_CACHE_CHECK([for __attribute__((packed))],
[ac_cv_c_attribute_packed],
[ac_cv_c_attribute_packed=no
AC_TRY_COMPILE(, [struct __attribute__((__packed__)) foo { int a; } b;],
[ac_cv_c_attribute_packed=yes])])
if test "${ac_cv_c_attribute_packed}" = "no"; then
AC_DEFINE(HAVE_ATTRIBUTE_PACKED, 1, Support for __attribute__((packed)) for structs)
fi
dnl
dnl Check the CPU
dnl
...
...
include/codecs.h
View file @
9f3b1f13
...
...
@@ -2,7 +2,7 @@
* codecs.h: codec related structures needed by the demuxers and decoders
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: codecs.h,v 1.
3
200
2/12
/0
3
17:
00:15 fenrir
Exp $
* $Id: codecs.h,v 1.
4
200
3/07
/0
1
17:
14:58 sam
Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -28,7 +28,11 @@
#ifndef _WAVEFORMATEX_
#define _WAVEFORMATEX_
typedef
struct
__attribute__
((
__packed__
))
_WAVEFORMATEX
{
typedef
struct
#ifdef HAVE_ATTRIBUTE_PACKED
__attribute__
((
__packed__
))
#endif
_WAVEFORMATEX
{
uint16_t
wFormatTag
;
uint16_t
nChannels
;
uint32_t
nSamplesPerSec
;
...
...
@@ -41,7 +45,10 @@ typedef struct __attribute__((__packed__)) _WAVEFORMATEX {
#if !defined(_BITMAPINFOHEADER_) && !defined(WIN32)
#define _BITMAPINFOHEADER_
typedef
struct
__attribute__
((
__packed__
))
typedef
struct
#ifdef HAVE_ATTRIBUTE_PACKED
__attribute__
((
__packed__
))
#endif
{
uint32_t
biSize
;
uint32_t
biWidth
;
...
...
modules/mux/ogg.c
View file @
9f3b1f13
...
...
@@ -2,7 +2,7 @@
* ogg.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: ogg.c,v 1.
7
2003/0
6/29 20:58:16 gbazin
Exp $
* $Id: ogg.c,v 1.
8
2003/0
7/01 17:14:58 sam
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
...
...
@@ -69,20 +69,29 @@ vlc_module_end();
#define PACKET_IS_SYNCPOINT 0x08
typedef
struct
__attribute__
((
__packed__
))
typedef
struct
#ifdef HAVE_ATTRIBUTE_PACKED
__attribute__
((
__packed__
))
#endif
{
int32_t
i_width
;
int32_t
i_height
;
}
ogg_stream_header_video_t
;
typedef
struct
__attribute__
((
__packed__
))
typedef
struct
#ifdef HAVE_ATTRIBUTE_PACKED
__attribute__
((
__packed__
))
#endif
{
int16_t
i_channels
;
int16_t
i_block_align
;
int32_t
i_avgbytespersec
;
}
ogg_stream_header_audio_t
;
typedef
struct
__attribute__
((
__packed__
))
typedef
struct
#ifdef HAVE_ATTRIBUTE_PACKED
__attribute__
((
__packed__
))
#endif
{
uint8_t
i_packet_type
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment