Skip to content

Commit

Permalink
Now using the -W compiler flag for stricter code checking. Corrected
Browse files Browse the repository at this point in the history
the ESRCH error value to not be the same as ESPIPE.
Replaced the Python module 'pysvn' with 'svn', which is hopefully
available on more platforms per default.


git-svn-id: https://freenos.googlecode.com/svn/trunk@134 824000e8-63cf-11de-a6e1-e33d94ba4d19
  • Loading branch information
nlinnenbank committed Jun 23, 2009
1 parent 86f55b7 commit 9f34918
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 20 deletions.
14 changes: 7 additions & 7 deletions lib/libc/errno.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,25 +264,25 @@ extern C char *error_map[];
#define ESPIPE -74

/** No such process. */
#define ESRCH -74
#define ESRCH -75

/** Reserved. */
#define ESTALE -75
#define ESTALE -76

/** Stream ioctl() timeout. */
#define ETIME -76
#define ETIME -77

/** Connection timed out. */
#define ETIMEDOUT -77
#define ETIMEDOUT -78

/** Text file busy. */
#define ETXTBSY -78
#define ETXTBSY -79

/** Operation would block (may be the same value as [EAGAIN]). */
#define EWOULDBLOCK -79
#define EWOULDBLOCK -80

/** Cross-device link. */
#define EXDEV -80
#define EXDEV -81

/** Last defined error value (do not use). */
#define ELAST EXDEV
Expand Down
13 changes: 10 additions & 3 deletions site_scons/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@
('CC', 'Set the target C compiler to use', cross + 'gcc'),
('CXX', 'Set the target C++ compiler to use', cross + 'g++'),
('LINK', 'Set the target linker to use', cross + 'ld'),
('CCFLAGS', 'Change target C compiler flags',
[ '-O0', '-g3', '-nostdinc', '-Wall', '-Werror', '-fno-builtin' ]),
('CCFLAGS', 'Change target C compiler flags'),
('CXXFLAGS', 'Change target C++ compiler flags',
[ '-fno-rtti', '-fno-exceptions', '-nostdinc' ]),
[ '-fno-rtti', '-fno-exceptions' ]),
('CPPFLAGS', 'Change target C preprocessor flags', '-Iinclude'),
('LINKFLAGS', 'Change the flags for the target linker',
[ '--whole-archive', '-nostdlib', '-T', 'kernel/X86/user.ld' ])
Expand Down Expand Up @@ -69,6 +68,14 @@
#
if not target.GetOption('clean'):

configure.TryCCFlag(target, '-O0')
configure.TryCCFlag(target, '-g3')
configure.TryCCFlag(target, '-Wall')
configure.TryCCFlag(target, '-W')
configure.TryCCFlag(target, '-Wno-unused-parameter')
configure.TryCCFlag(target, '-Werror')
configure.TryCCFlag(target, '-fno-builtin')
configure.TryCCFlag(target, '-nostdinc')
configure.TryCCFlag(target, '-fno-stack-protector')
configure.TryCCFlag(target, '-Wno-write-strings')

Expand Down
39 changes: 29 additions & 10 deletions site_scons/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,29 @@
#

import datetime
import pysvn
import svn
import svn.core
import svn.client
import os
import platform
import re
import SCons
import build

#
# Retrieves Subversion information.
#
def info_receiver(path, info, pool):

global currentRev, url

currentRev = current + "-r" + str(info.rev)
url = str(info.URL)

# Read current version.
current = open("VERSION").read().strip()
expr = re.compile("\.")
version = expr.split(current)
current = open("VERSION").read().strip()
expr = re.compile("\.")
version = expr.split(current)
versionCode = 0
versionPower = 16

Expand All @@ -37,9 +49,16 @@

# Include subversion revision.
try:
svnClient = pysvn.Client()
svnInfo = svnClient.info(".")
currentRev = current + "-r" + str(svnInfo.revision.number)
context = svn.client.svn_client_create_context()
rev = svn.core.svn_opt_revision_t()
rev.king = svn.core.svn_opt_revision_head
path = os.getcwd()
currentRev = None
url = None

svn.client.info(path, rev, rev, info_receiver, False, context)

# Not a SVN repository.
except:
currentRev = current + "-local"

Expand Down Expand Up @@ -87,9 +106,9 @@ def regenerateHeader():
'#define BUILDPATH "' + escape(os.getcwd()) + '"\n')

# Include SVN repository, if available.
try:
out.write('#define BUILDURL "' + escape(svnInfo.url) + '"\n')
except:
if url is not None:
out.write('#define BUILDURL "' + escape(url) + '"\n')
else:
out.write('#define BUILDURL BUILDPATH\n')

# Terminate #ifndef.
Expand Down

0 comments on commit 9f34918

Please sign in to comment.