-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2011-06-25 Pace Willisson <[email protected]>
* V267 * created fortify_workaround.[ch] to quiet 100+ new compiler warnings from the new FORTIFY_SORUCE feature now enabled by default in ubuntu * added put-data script which figures out if the data files are in the development configuration (siblings to the source directory) or in the distribution tar file configuration (children of the source directory). Then, it installs them in in DATA_DIR * updated DEVELOPER notes for compiling on linux
- Loading branch information
pace
committed
Jun 25, 2011
1 parent
c4ad344
commit 7713859
Showing
9 changed files
with
187 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
2011-06-22 Pace Willisson [email protected]> | ||
2011-06-25 Pace Willisson <[email protected]> | ||
|
||
* V267 | ||
|
||
* created fortify_workaround.[ch] to quiet 100+ new compiler | ||
warnings from the new FORTIFY_SORUCE feature now enabled by | ||
default in ubuntu | ||
|
||
* added put-data script which figures out if the data files are | ||
in the development configuration (siblings to the source | ||
directory) or in the distribution tar file configuration (children | ||
of the source directory). Then, it installs them in in DATA_DIR | ||
|
||
* updated DEVELOPER notes for compiling on linux | ||
|
||
2011-06-22 Pace Willisson <[email protected]> | ||
|
||
* add gamedata files to make install-data | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include <stdio.h> | ||
#include "fortify_workaround.h" | ||
|
||
#if _FORTIFY_SOURCE > 0 | ||
|
||
#undef fread | ||
size_t | ||
fread_fortify_workaround (void *buf, | ||
size_t size, size_t n, FILE *stream) | ||
{ | ||
return (fread (buf, size, n, stream)); | ||
} | ||
|
||
#endif /* _FORTIFY_SOURCE */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef _FORTIFY_WORKAROUND_ | ||
#define _FORTIFY_WORKAROUND_ | ||
|
||
/* | ||
* there are over 100 places that call fread without checking the | ||
* return value, and they all make warnings with the new | ||
* _FORTIFY_SOURCE feature in gcc. Until someone wants to put error | ||
* handlers in each place, this workaround will preserve the existing | ||
* runtime behavor (that is, hope for the best), at the negligible | ||
* cost of one extra function call per fread, while cleaning up the | ||
* compiler output so we can notice the real warnings | ||
*/ | ||
#if _FORTIFY_SOURCE > 0 | ||
#define fread fread_fortify_workaround | ||
#endif | ||
|
||
size_t fread_fortify_workaround (void *buf, | ||
size_t size, size_t n, FILE *stream); | ||
|
||
#endif /* _FORTIFY_WORKAROUND_ */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
#! /bin/sh | ||
|
||
# development directory configuration: | ||
# | ||
# DEVDIR/race/*.c, *.h, etc | ||
# DEVDIR/gamedat/gamedata-files | ||
# DEVDIR/avdata/avdata-files | ||
# DEVDIR/avdata/audio/ | ||
# DEVDIR/avdata/video/ | ||
# | ||
# when everything is packaged in one tar, and then used to build | ||
# the .deb file, the directory configuration is | ||
# | ||
# raceintospace-1.0/*.c, *.h, etc | ||
# raceintospace-1.0/gamedata-files | ||
# raceintospace-1.0/gamedata/ | ||
# raceintospace-1.0/avdata-files | ||
# raceintospace-1.0/audio/ | ||
# raceintospace-1.0/video/ | ||
# | ||
# this script tracks down the gamedata and avdata locations, and copies | ||
# the files to the runtime location (/usr/local/share/raceintospace) | ||
|
||
if [ $# != 1 ] | ||
then | ||
echo "usage: put-data DATA_DIR" | ||
exit 1 | ||
fi | ||
|
||
DATA_DIR=$1 | ||
|
||
mkdir -p ${DATA_DIR} | ||
|
||
# ================================================================ | ||
# install gamedata | ||
# careful: the source repository is "gamedat", but most uses are "gamedata" | ||
|
||
if [ -r gamedata/gamedata-files ] | ||
then | ||
echo "installing gamedata from working directory" | ||
gamedata_dir=. | ||
elif [ -r ../gamedat/gamedata-files ] | ||
then | ||
echo "installing gamedata from ../gamedata" | ||
gamedata_dir=../gamedat | ||
else | ||
echo "put-data: can't find gamedata directory" | ||
echo "" | ||
echo "if you're trying to do development, you probably want" | ||
echo "something like this:" | ||
echo "" | ||
|
||
cdir=`pwd` | ||
pdir=`dirname $cdir` | ||
echo "\$ cd $pdir" | ||
echo "\$ cvs checkout -d:ext:raceintospace.cvs.sourceforge.net:/cvsroot/raceintospace co gamedat" | ||
echo "" | ||
echo "which will make the gamedat module a sibling" | ||
echo "to the main source directory" | ||
exit 1 | ||
fi | ||
|
||
( | ||
cd ${gamedata_dir} | ||
mkdir -p ${DATA_DIR}/gamedata | ||
cp --parents `cat gamedata-files` ${DATA_DIR}/gamedata | ||
sed "s:^:${DATA_DIR}/gamedata/:" < gamedata-files | xargs chmod a=r,u+w | ||
) | ||
|
||
# ================================================================ | ||
# install avdata | ||
|
||
if [ -r avdata-files ] | ||
then | ||
echo "installing avdata files from working directory" | ||
avdata_dir=. | ||
elif [ -r ../avdata/avdata-files ] | ||
then | ||
echo "installing avdata files from ../avdata" | ||
avdata_dir=../avdata | ||
else | ||
echo "put-data: can't find avdata directory" | ||
echo "" | ||
echo "if you're trying to do development, you probably want" | ||
echo "something like this:" | ||
echo "" | ||
|
||
cdir=`pwd` | ||
pdir=`dirname $cdir` | ||
echo "\$ cd $pdir" | ||
echo "\$ git clone ssh://raceintospace.git.sourceforge.net/gitroot/raceintospace/avdata" | ||
echo "" | ||
echo "which will make the avdata module a sibling" | ||
echo "to the main source directory" | ||
|
||
exit 1 | ||
fi | ||
|
||
( | ||
cd ${avdata_dir} | ||
cp --parents `cat avdata-files` ${DATA_DIR} | ||
sed "s:^:${DATA_DIR}/:" < avdata-files | xargs chmod a=r,u+w | ||
) | ||
|
||
echo "done" | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
266 | ||
267 |