Commit Graph

105 Commits

Author SHA1 Message Date
Simon Wilkinson
36524b2ed7 Rationalise our include paths
Our include paths are a bit of a mess. Fix these so that they're
more rational, and more in line with normal coding style.

In particular:
   *) Don't include all of the subdirectories of our top level
      include directory. If a file wants afs/file.h, it should
      include that, not "file.h"
   *) Try to avoid including '.' in the search path (although
      objdir builds make this harder)
   *) Don't blindly include other directories from the code tree
      in the search path. If a package wants another packages header,
      then it should get it from the include directory
   *) Use the convention that quoted includes ("") pick up local
      headers. Bracketed includes (<>) pick up ones from the top level
      include dir
   *) In directories which pull in files from multiple packages, don't
      blindly put all of the package directories in the search path.
      Specifically include the file's package directory when required

The big change here is that it's no longer possible to hide a system
include by placing a header of the same name in include/afs. The most
common case where this was happening was for 'assert.h'

Change-Id: I0796fabcf83ffcd74e533624c64e138a160dd632
Reviewed-on: http://gerrit.openafs.org/834
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-11-17 13:12:57 -08:00
Simon Wilkinson
e854e26ef1 Update warning inhibition
A number of recent changes haven't caught all of the locations where
warning inhibition can be removed. This patch updates all of the
inhibitions to reflect the current state of the tree when built with
gcc4.2

Change-Id: I7bad4fee1258f4e37fd729cda84711fed66acbc9
Reviewed-on: http://gerrit.openafs.org/813
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-11-11 09:17:56 -08:00
Simon Wilkinson
b9eaf43bbe Don't cast the pointer past to memset
memset() takes a void * as it's first argument. Don't explicitly cast
what we're passing in to (char *), as this may mask other errors.

Reviewed-on: http://gerrit.openafs.org/701
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-10-21 11:34:12 -07:00
matt@linuxbox.com
5d5d180716 Make typedefs of AFS_UCRED and AFS_PROC with renaming
Make typedefs of AFS_UCRED and AFS_PROC, with a corresponding name change.
The names afs_ucred_t and afs_proc_t are chosen since these appear to be
the best available choices.  The names cannot actually collide with anything
which POSIX might later introduce.  For UKERNEL, the preprocessor is used
to redirect references.  This seems not easily avoidable at present.

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/645
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-10-21 11:08:15 -07:00
Andrew Deason
1fa650cee2 Fix unitialized variable warning in cfghost.c
Initialize cellentry. It does not appear to be possible to actually hit
code that references an uninitialized cellentry, but the compiler can
still complain.

Reviewed-on: http://gerrit.openafs.org/665
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-10-15 05:03:29 -07:00
Simon Wilkinson
6d51ebd6c8 Add support for warning checked builds
This patch adds a '--enable-checking' configuration option. When this
option is supplied, and gcc is in use, the compiler will treat any
warnings as errors. This will hopefully help stop new warnings from
creeping into the tree.

In order to still be able to build, all of the currently existing
warnings are accepted (these are documented in README.WARNINGS). With
this set of warning inhibitions, the tree is known to build on 32bit
Leopard - other systems may vary. Warning inhibition may be disabled
by supplying --enable-checking=all - in this case the tree will
definitely not build!

If --enabled-checking is not specified, the existing compilation
behaviour is maintained, so there is no user-visible change.

Gcc 4.2, or later, is required to use the pragma sets contained within
this patch. Again, they are not visible unless --enable-checking is
given.

Reviewed-on: http://gerrit.openafs.org/526
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 05:00:04 -07:00
Simon Wilkinson
a53732ef5f Miscellaneous warning cleanup
Assorted warning cleanup, that it didn't seem to make sense having one
patch per file for.

This patch
    - Adds some casting for syscall pointers
    - ANSIfies SRXAFSCB_GetDE in fsprobe
    - Loads sys/ioctl.h on some more platforms in usd
    - Includes some missing header files
    - Removes unused variables
    - Makes it clear that VIsSalvager does handle all enumerated types
    - Adds some more prototypes

Reviewed-on: http://gerrit.openafs.org/508
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 01:58:16 -07:00
Jeffrey Altman
1c12747818 Windows: Permit build system to update symbol store
Microsoft Debugging Tools for Windows, Visual Studio Debugger,
and SysInternals tools can all make use of a Symbol Server.
  http://msdn.microsoft.com/en-us/magazine/cc163563.aspx
The commit adds functionality to the build system to automatically
add binaries and symbols to a symbol store during the build.
This functionality is only enabled if two environment variables
are defined:

  SYMSTORE_EXE  - specifies the location of symstore.exe
  SYMSTORE_ROOT - specifies the location of the symbol store

an optional environment variable permits an arbitrary comment
to be added to the symbol store history file.

  SYMSTORE_COMMENT - arbitrary text to be added to the history

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/324
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2009-08-19 10:19:43 -07:00
Simon Wilkinson
967abaf29b Make rxgen emit prototype for ExecuteRequest
Make rxgen provide a prototype in its header file for _ExecuteRequest, and
remove all of the adhoc prototypes from the tree.

Reviewed-on: http://gerrit.openafs.org/247
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-29 18:42:47 -07:00
Simon Wilkinson
479ce49e9c Further warning cleanup for the libadmin directory
More code cleanup for libadmin, including additional header inclusion,
better prototyping, and signed/unsigned and const fixes

Reviewed-on: http://gerrit.openafs.org/228
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-27 15:16:31 -07:00
Marc Dionne
581ec9f06a Eliminate some "implicit function declaration" warnings
Include appropriate header files to eliminate some warnings for
implicit function declarations.  These are simple cases that don't
generate new warnings because of the prototypes.
Use grp.h if it exists to get setgroups() definition.

Reviewed-on: http://gerrit.openafs.org/233
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-27 10:55:35 -07:00
Marc Dionne
d82e9c851c Unused variable cleanup
Eliminate some warnings for unused variables.  In most cases the
variables are not used at all and are removed; in a few cases the
declarations need to be ifdef'ed to follow the code that uses them.
For a typical build here this removes 24 warnings.

Reviewed-on: http://gerrit.openafs.org/232
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-27 07:56:07 -07:00
Jeffrey Altman
6a68be71da RXAFSCB_GetCellServDB takes a serverList not an array of afs_int32
Reported by Marcus Watts

ListCellsRPC calls RXAFSCB_GetCellServDB which takes a serverList
and not an array of afs_int32.  Add the serverList and copy the
resulting server addresses into the array of afs_int32 address
values.

Include afs/afscbint.h instead of afs/afsint.h in order to obtain
prototypes for RXAFSCB_ functions.

Reviewed-on: http://gerrit.openafs.org/89
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
2009-07-15 01:31:22 -06:00
Simon Wilkinson
d58dc56d99 Add system headers
There are a number of places in the tree which are missing system
headers such as <unistd.h> <ctype.h> and <dirent.h>. Add these.

Reviewed-on: http://gerrit.openafs.org/62
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-12 17:49:32 -06:00
Simon Wilkinson
ac3e0ed031 Rename printf cast helpers and clean up format string warnings
Some confusion had ensued about the usage of our printf cast helper
functions. Rename these to attempt to allay that confusion, and restore
the functions themselves to their original definitions.

Essentially, afs_printable_int32_ld() and friends are helpers to go
from afs specifc types to things that can be emitted by printf without
causing compiler warnings.

Also clean up some additional warnings from type mismatches between
escapes in printf format strings and the variables being printed.

Reviewed-on: http://gerrit.openafs.org/50
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
2009-07-10 18:28:02 -06:00
Simon Wilkinson
d34017c9ed Warning cleanup for the libadmin directory
Where we can, include headers from the include directory
Resolve a load of const char* /char * issues
Mark some Windows only variables as such
Fix prototypes

Reviewed-on: http://gerrit.openafs.org/49
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-10 17:57:24 -06:00
Simon Wilkinson
3bb5fa5f1b Remove the RCSID macro
The move to git means that we can no longer populate the RCSID
macro in the way that it was used with CVS. This patch simply
removes the macro from every file, except where it contains
information from upstream (and it's in a comment).

Reviewed-on: http://gerrit.openafs.org/14
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-09 22:58:37 -06:00
Simon Wilkinson
d5081f264d Remove CVS ignore files
Now we're in git we don't need any cvsignore files any more...

Reviewed-on: http://gerrit.openafs.org/1
Verified-by: Derrick Brashear <shadow@gmail.com>
Reviewed-by: Derrick Brashear <shadow@gmail.com>
2009-07-06 11:03:16 -06:00
Simon Wilkinson
c41a467741 gitignore-20090615
LICENSE IPL10

make gitignore files
2009-06-15 23:29:29 +00:00
Asanka Herath
4e9bd3bd0e windows-make-cygwin-libs-20090519
LICENSE MIT

Unless NOCYGWIN is defined create cygwin .a import libraries
for each OpenAFS DLL that is constructed.
2009-05-20 06:03:09 +00:00
Derrick Brashear
63b0d495cf fd-t-definition-fun-20090323
LICENSE IPL10

make FD_t be defined everywhere we need it
2009-03-24 04:31:13 +00:00
Jeffrey Altman
1d4542f93b libadmin-vos-ihandle-20090323
LICENSE IPL10

include afs/ihandle.h in order to gain access to the FD_t definition
2009-03-23 22:38:16 +00:00
Jeffrey Altman
c39d016155 volid-unsigned-int32-20090323
LICENSE IPL10
FIXES 124510

assume volume ids are always unsigned 32 bit values
2009-03-23 18:18:44 +00:00
Jeffrey Altman
b2db1e83c1 libadmin-client-prototype-20090320
LICENSE IPL10

correct the prototype for afsclient_RXDebugOpenPort
2009-03-20 17:21:51 +00:00
Jeffrey Altman
64c451cec0 libadmin-vos-windows-exports-20090320
LICENSE IPL10

do not export function name arrays that are already
exported by other libraries.
2009-03-20 11:51:55 +00:00
Jeffrey Altman
5eea839b63 libadmin-client-prototypes-20090320
LICENSE IPL10

fix the prototype for afsclient_RPCStatOpenPort and afsclient_CMStatOpenPort
2009-03-20 11:49:27 +00:00
Jeffrey Altman
14a6075495 libadmin-windows-socket-20090320
LICENSE IPL10

a socket on Windows is type SOCKET not HANDLE
2009-03-20 11:47:00 +00:00
Simon Wilkinson
cff2da10d6 libadmin-prototypes-20090316
LICENSE IPL10
FIXES 124246

prototype the libadmin directory
2009-03-16 13:26:20 +00:00
Simon Wilkinson
f27165f137 kill-uninitialized-variable-warnings-20081026
LICENSE IPL10

kill lots of compiler warnings
2008-10-27 23:41:02 +00:00
Jeffrey Altman
7a4041f940 rename-rx-stats-20080925
LICENSE IPL10

avoid using the same name for the struct and the global so the windows debugger works usefully

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
LICENSE IPL10

avoid using the same name for the struct and the global so the windows debugger
works usefully

====================
LICENSE IPL10

avoid using the same name for the struct and the global so the windows debugger
works usefully
2008-09-25 18:15:41 +00:00
Jeffrey Altman
65bf7cdb6d windows-code-signing-20080702
LICENSE MIT

Add code signing with signtool.exe to the build process.
If all three of the required CODESIGN_xxxx environment
variables are defined, signtool will be used to sign each
exe, dll, and installer as they are built.

The three environment variables are:

  CODESIGN_DESC = <description of application>
  CODESIGN_TIMESTAMP = <url of certificate authority timestamp server>
  CODESIGN_URL = <end user help URL>

The default signing certificate is the one that will be used by
signtool.  If these environment variables are not defined, code
signing will be skipped.
2008-07-02 13:41:07 +00:00
Derrick Brashear
8bf142ae2a libadmin-vos-irix-fixes-20080421
LICENSE IPL10

irix is cranky about missing prototypes
2008-04-21 20:40:22 +00:00
Jeffrey Altman
502aca9e8c windows-libadmin-closesocket-20080228
LICENSE MIT

On Windows close() does not apply to sockets, use closesocket()
instead.
2008-02-29 01:26:45 +00:00
Jeffrey Altman
d094c65f14 windows-cellservdb-location-20080202
LICENSE MIT

Modify the search order for determining the location of CellServDB
and other client configuration files.

1. AFSCONF environment variable
2. registry setting
3. NEW - use All Users\AppData\OpenAFS\Client only if CellServDB exists
4. use Program Files\OpenAFS\Client
2008-02-02 13:38:50 +00:00
Jeffrey Altman
753ba70cf2 windows-more-cellservdb-consolidation-20080201
LICENSE MIT

Merge cellconfig.c and the afsreg library.
Redefine the location of the client cellservdb directory in dirpath
in terms of the cellservdb direction and not the install directory.
(although they point at the same thing now by default.)

Future changes to the location of the cellservdb directory should
be made in afsreg.
2008-02-02 02:46:16 +00:00
Derrick Brashear
6a7461e6f8 make-avoid-double-slash-20080121
LICENSE IPL10

avoid having double / in make commands
2008-01-21 18:36:02 +00:00
Christof Hanke
da18bb147b assorted-warning-cleanup-20071126
add missignheader files, missing return values, correct a few calls to printf
2007-11-26 21:03:31 +00:00
Simon Wilkinson
855e644261 openafs-void-star-pointers-20071031
convert anonymous pointers from char* to void*
2007-10-31 04:05:27 +00:00
Simon Wilkinson
7d05bd439e openafs-string-header-cleanup-20071030
include only what we need
2007-10-30 15:10:37 +00:00
Jeffrey Altman
a7abca15b0 libadmin-minimize-dns-lookups-20071003
Some cells have a large number of servers listed in the vldb that
no longer exist and/or do not have PTR records in DNS.  The algorithm
used to obtain the "server names" from IP addresses involves opening
a cell handle, creating an iterator of all servers, and then iterating
over them until a match is found for the IP address.  This is done for
every server reference.  Each time the iterator was constructed the
vldb would be queried and gethostbyaddr() would be called on every listed
ip address.

This patch stores a copy of the server list in the cell handle along with
an expiration time generated from a 10 minute TTL.  This significant
reduces but does not eliminate the number of times that the caller is
blocked on reverse dns lookups.
2007-10-03 16:27:53 +00:00
Cesar Garcia
ef76695bb9 libadmin-deubikcall-cleanup-20070718
remove bogus extra arg
2007-07-18 15:21:12 +00:00
Jeffrey Altman
82cb8884c8 libadmin-ubik_call-20070715
replace all calls to ubik_Call(FOO, ...) with ubik_FOO(...)

correct the incorrect parameter lists for ubik_FOO()
2007-07-16 00:58:52 +00:00
Derrick Brashear
e0fa8ff72f comerr-rename-20070410
nag nag nag
2007-04-10 19:58:13 +00:00
Jeffrey Altman
644cd83dbd windows-libadmin-vos-registry-20070403
Move the session data from TransarcCorporation to OpenAFS.
2007-04-03 14:34:19 +00:00
Marcus Watts
9dd8d7f817 auth-cleanup-20070208
FIXES 53208

remove unneeded includes of auth.h
2007-02-09 00:57:39 +00:00
Russ Allbery
3a34d8cb4f autoconf-likes-relative-paths-20060802
When using the install-sh that ships with the source tree, Autoconf
substitutes in a relative path just to be annoying.  Define the INSTALL
variables in each individual Makefile so that they find the proper file.
Remove the definitions from Makefile.config so that no one will
accidentally get the wrong ones.
2006-08-03 03:37:12 +00:00
Russ Allbery
8df5dcbc91 death-to-pinstall-20060801
Delete pinstall and convert the entire tree to use the install program
found by configure (falling back on install-sh in the local tree).  This
means that we have to pre-create directories with install -d.  Also redo
the install and dest rules to be lists of install rules rather than
dependencies driving separate make rules so that running make install will
always update the target directory with the current code, even if there are
files in the install area that are newer.

Stop installing libafssetpag; we're about to kill it in favor of a
different library.  Remove some djgpp rules.
2006-08-01 21:03:54 +00:00
Jeffrey Altman
941ac04165 ubik-call-sucks-20060704
make ubik_Call removal work on Windows.

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

another fix for Windows
2006-07-04 22:22:35 +00:00
Jeffrey Altman
b02d80508f windows-64-bit-type-safety-20051105
64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

more corrections for use of 64-bit types on Windows

====================

64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler

====================

64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler

====================

64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler

====================

64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler

====================

64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler

====================

64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler

====================

64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler

====================

64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler
2005-11-06 09:29:36 +00:00
Derrick Brashear
834507571e tbutc-solaris-and-vos-api-fixes-20051024
FIXES 22063

as tested for this and 22316

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
FIXES 22316

the rest of this, since i forgot to apply the other file earlier
oops
2005-10-25 07:30:52 +00:00