Skip to content

Conversation

0-wiz-0
Copy link
Contributor

@0-wiz-0 0-wiz-0 commented Feb 10, 2015

If _XOPEN_SOURCE is defined to 600, NetBSD does not provide strtoll
and other stuff.
Sent upstream as
cesanta/mongoose#466
and committed as
cesanta/mongoose@bef3f85

Signed-off-by: Thomas Klausner wiz@NetBSD.org

If _XOPEN_SOURCE is defined to 600, NetBSD does not provide strtoll
and other stuff.
Sent upstream as
cesanta/mongoose#466
and committed as
cesanta/mongoose@bef3f85

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
@couriersud
Copy link
Contributor

Instead of a "#ifdef linux" a "#if !defined(SDLMAME_NETBSD)" would be safer.
SDLMAME_NETBSD is defined in sdlprefix.h along the following lines

#elif defined(FreeBSD)
#define SDLMAME_FREEBSD 1
#elif defined(DragonFly)
#define SDLMAME_DRAGONFLY 1
#elif defined(OpenBSD)
#define SDLMAME_OPENBSD 1
#elif defined(NetBSD)
#define SDLMAME_NETBSD 1

@0-wiz-0
Copy link
Contributor Author

0-wiz-0 commented Feb 10, 2015

Sure, I can do that. But it probably still should have the same logic, Linux is the odd one out here.

On the other hand, I expected that you wouldn't want to diverge from upstream, and that's the diff that was applied there.

@balr0g
Copy link
Contributor

balr0g commented Feb 11, 2015

What other stuff is not provided by NetBSD if _XOPEN_SOURCE is defined to 600?
It appears that strtoll() is a C++11/C99 feature and should not be tied to _XOPEN_SOURCE at all. I don't have a full (installed) set of NetBSD headers handy, though, so it's not easy for me to check right now (if you can point me to one online I'd appreciate it).

@0-wiz-0
Copy link
Contributor Author

0-wiz-0 commented Feb 11, 2015

When you define _XOPEN_SOURCE on NetBSD (and Solaris), you get exactly what's in that namespace, nothing else.
Contrast that to Linux, which adds what's in that namespace to the other available functions.
You can get the NetBSD-6.1.5 headers at
ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-6.1.5/amd64/binary/sets/comp.tgz

rb6502 added a commit that referenced this pull request Feb 16, 2015
3rdparty/mongoose: Fix build on NetBSD and possibly Solaris.
@rb6502 rb6502 merged commit 70cdc5d into mamedev:master Feb 16, 2015
Zoltan45 pushed a commit to Zoltan45/mame-mkp that referenced this pull request Jun 28, 2021
ICEknigh7 added a commit to ICEknigh7/mame that referenced this pull request Jun 8, 2022
- Balalín (type-in, MicroHobby mamedev#125) [Ignacio Prini]
- Magnus Zone (type-in, MicroHobby mamedev#126) [Ignacio Prini]
- Oráculo Egipcio (type-in, MicroHobby mamedev#127) [Ignacio Prini]
- Demolition (type-in, MicroHobby mamedev#128) [Ignacio Prini]
- Basket Trainer (type-in, MicroHobby mamedev#129) [Ignacio Prini]
- Galaxy Fun (type-in, MicroHobby mamedev#130) [Ignacio Prini]
- Micro Draw (type-in, MicroHobby mamedev#131, mamedev#132) [Ignacio Prini]
- El Alambrista (type-in, MicroHobby mamedev#133) [Ignacio Prini]
- Ranamirez (type-in, MicroHobby mamedev#134) [Ignacio Prini]
- Fórmula Suicida (type-in, MicroHobby mamedev#135) [Ignacio Prini]
- Phantasmas (type-in, MicroHobby mamedev#136) [Ignacio Prini]
- Dardos (type-in, MicroHobby mamedev#137) [Ignacio Prini]
- S.E.M.I.S.I.S. (type-in, MicroHobby mamedev#138, mamedev#139) [Ignacio Prini]
- Alley's Gun (type-in, MicroHobby mamedev#140) [Ignacio Prini]
- Kleingeld (type-in, MicroHobby mamedev#141, mamedev#142) [Ignacio Prini]
- Caribe’s Day (type-in, MicroHobby mamedev#143) [Ignacio Prini]
- Rally (type-in, MicroHobby mamedev#144) [Ignacio Prini]
- La Profecía (type-in, MicroHobby mamedev#145) [Ignacio Prini]
- Mine Alert (type-in, MicroHobby mamedev#146, mamedev#147) [Ignacio Prini]
- Freddy (type-in, MicroHobby mamedev#148) [Ignacio Prini]
- Russian's Attack (type-in, MicroHobby mamedev#149, mamedev#150) [Ignacio Prini]
- En Ruta (type-in, MicroHobby mamedev#151) [Ignacio Prini]
- Zinco (type-in, MicroHobby mamedev#152) [Ignacio Prini]
- Ruffo’s Dream (type-in, MicroHobby mamedev#153) [Ignacio Prini]
- Crozet (type-in, MicroHobby mamedev#154) [Ignacio Prini]
- Rock Animation (type-in, MicroHobby mamedev#155) [Ignacio Prini]
- Bunker (type-in, MicroHobby mamedev#156) [Ignacio Prini]
- Telepuzzle (type-in, MicroHobby mamedev#157) [Ignacio Prini]
- Golfo Pérsico (type-in, MicroHobby mamedev#158) [Ignacio Prini]
- Mad Drivers (type-in, MicroHobby mamedev#159) [Ignacio Prini]
- Bowling Star (type-in, MicroHobby mamedev#160) [Ignacio Prini]
- Gas-Car (type-in, MicroHobby mamedev#161) [Ignacio Prini]
- Ghost Like (type-in, MicroHobby mamedev#162) [Ignacio Prini]
- Sky Invaders (type-in, MicroHobby mamedev#163) [Ignacio Prini]
- Perico Jones (type-in, MicroHobby mamedev#164) [Ignacio Prini]
- Brad Zotes (type-in, MicroHobby mamedev#165) [Ignacio Prini]
- Striker (type-in, MicroHobby mamedev#166) [Ignacio Prini]
- Indy (type-in, MicroHobby mamedev#167) [Ignacio Prini]
- Topin (type-in, MicroHobby mamedev#168) [Ignacio Prini]
- Starlike (type-in, MicroHobby mamedev#169) [Ignacio Prini]
- Tres en Raya (type-in, MicroHobby mamedev#170) [Ignacio Prini]
- Goteras (type-in, MicroHobby mamedev#171) [Ignacio Prini]
- Parvision (type-in, MicroHobby mamedev#172) [Ignacio Prini]
- Furax (type-in, MicroHobby mamedev#173) [Ignacio Prini]
- Duck Shooting (type-in, MicroHobby mamedev#174) [Ignacio Prini]
- Nomen Rosae (type-in, MicroHobby mamedev#175) [Ignacio Prini]
- PunkyMan (type-in, MicroHobby mamedev#176) [Ignacio Prini]
- El Retorno del Yedi (type-in, MicroHobby mamedev#177) [Ignacio Prini]
- Sky Warrior (type-in, MicroHobby mamedev#178) [Ignacio Prini]
- Reptkon (type-in, MicroHobby mamedev#179) [Ignacio Prini]
- Intro (type-in, MicroHobby mamedev#180) [Ignacio Prini]
- Keops (type-in, MicroHobby mamedev#181) [Ignacio Prini]
- Sir Gawain (type-in, MicroHobby mamedev#182) [Ignacio Prini]
- Snake (type-in, MicroHobby mamedev#183) [Ignacio Prini]
- Microbowl (type-in, MicroHobby mamedev#184) [Ignacio Prini]
- God Save the Punk (type-in, MicroHobby mamedev#185) [Ignacio Prini]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants