[AD] [ alleg-Feature Requests-3302567 ] [4.x]Make pack_fopen a weak symbol, add __allegro_pack_fopen |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: noreply@xxxxxxxxxx
- Subject: [AD] [ alleg-Feature Requests-3302567 ] [4.x]Make pack_fopen a weak symbol, add __allegro_pack_fopen
- From: "SourceForge.net" <noreply@xxxxxxxxxx>
- Date: Sun, 15 May 2011 22:19:07 +0200
Feature Requests item #3302567, was opened at 2011-05-15 22:19
Message generated for change (Tracker Item Submitted) made by bero
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=355665&aid=3302567&group_id=5665
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Bernhard Rosenkraenzer (bero)
Assigned to: Nobody/Anonymous (nobody)
Summary: [4.x]Make pack_fopen a weak symbol, add __allegro_pack_fopen
Initial Comment:
When porting AGS to Linux, I noticed they copied src/file.c from allegro in order to rename pack_fopen to __old_pack_fopen and override it with a new pack_fopen that handles looking inside another file (and then falls back to calling __old_pack_fopen).
Since this is a relatively dirty hack and doesn't work with static linking at all (and I can see valid reasons to do it), I'd propose to rename pack_fopen to __allegro_pack_fopen and adding a pack_fopen that just calls __allegro_pack_fopen, but is declared a weak symbol.
This way:
- "Normal" applications using allegro will keep working just fine
- AGS and others wanting to do the same thing can override pack_fopen without having to duplicate code
- Overridden pack_fopen functions can call the original (because it's available unconditionally through the __allegro_pack_fopen symbol)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=355665&aid=3302567&group_id=5665