Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#342 closed defect (fixed)

vo_sdl.c and ao_sdl.c redefine setenv() when Solaris 10 defines it in stdlib.h

Reported by: chrisalbertson90278@… Owned by: diego@…
Priority: normal Component: build system
Version: 1.0pre7 Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

There is a no longer valid test in two files, vo_sdl.c and ao_sdl.c
The test assumes setenv() is undefined if the OS is Solaris. Solaris 10
defines setenv() in stdlib.h

The correct fix would be to check for setenv() in the configure script
then use #if HAVESETENV in the above two .c files. I used a quick hack
and edited the two source files to red "#if 0" and got MPlayer to build
on Solaris 10.

defined(MINGW32)
defined(HPUX) defined(sgi) (defined(sun) &&

defined(svr4))
/* setenv is missing on win32, solaris, IRIX and HPUX */

Also the exact same code used to define setenv()is in both vo_sdl.c and ao_sdl.c
this maybe should be moved to a common place. I don't know MPlayer well enough
to suggest where

Attachments (2)

setenv.patch (2.7 KB) - added by diego@… 14 years ago.
setenv implementation in osdep/
setenv.2.patch (3.6 KB) - added by diego@… 14 years ago.
correct version of patch

Download all attachments as: .zip

Change History (7)

comment:1 Changed 14 years ago by diego@…

  • Component changed from ao to build system
  • Owner changed from alex@… to diego@…

comment:2 Changed 14 years ago by diego@…

  • Status changed from new to assigned

Changed 14 years ago by diego@…

setenv implementation in osdep/

comment:3 Changed 14 years ago by diego@…

Please check if the attached patch fixes your problem.

Changed 14 years ago by diego@…

correct version of patch

comment:4 Changed 14 years ago by diego@…

  • attachments.isobsolete changed from 0 to 1

The last patch was missing a hunk, try this one instead.

comment:5 Changed 14 years ago by diego@…

  • Resolution set to fixed
  • Status changed from assigned to closed

An equivalent patch was applied to CVS, this should be fixed now.

Note: See TracTickets for help on using tickets.