[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: different CVS_SERVER for different hosts

From: Paul Edwards
Subject: Re: different CVS_SERVER for different hosts
Date: Sat, 01 Nov 2003 07:22:38 GMT

"Derek Robert Price" <address@hidden> wrote in message news:address@hidden
> Submitting a config.h is not the most elegant solution.  It would
> require extra documentation and users would need to copy the config.h
> into a usable location to compile.

I don't mind this.  Something that says "If you have a POSIX
compliant compiler/library, but you are unable to run
'config' for some reason, then you need to copy posix/config.h
to ./config.h, then if you have a make program that is compatible
with gnu make version 1.35 you can type 'make', otherwise you
need to compile all the files listed in compile.bat".

> configure generates a config.h from
> config.h.in and config.h.in is generated directly from configure.   The
> most elegant solution is to patch the CVS code to default to using the
> POSIX function when no config.h was generated.  In other words, instead of
> ~    #if defined(HAVE_NANOSLEEP)
> ~        ... do nanosleep stuff ...
> ~    #elif defined (HAVE_USLEEP)
> ~        ... do usleep stuff ...
> ~    #elif defined (HAVE_SELECT)
> ~        ... do select stuff ...
> ~    #else
> ~        ... use sleep ...
> ~    #endif
> you would need to
> ~    #if defined(HAVE_NANOSLEEP) || !defined(HAVE_SLEEP) &&
> !defined(HAVE_USLEEP) && !defined(HAVE_SELECT)
> ~        ... do nanosleep stuff ...
> ~    #elif defined (HAVE_USLEEP)
> ~        ... do usleep stuff ...
> ~    #elif defined (HAVE_SELECT)
> ~        ... do select stuff ...
> ~    #elif defined (HAVE_SLEEP)
> ~        ... use sleep ...
> ~    #endif

I don't think that is more elegant.  If NANOSLEEP is part of
the Posix specification then there's nothing wrong with having
a big:

#ifdef POSIX

somewhere.  Or simply have a posix-specific config file.

You may have a source file that is not Posix-specific, it
will work on any C89 compiler, so it is silly to make
source code posix-dependant when it doesn't need to be.

That should actually be the ultimate

If you have no way to sleep, in fact, C89 provides no such
facility, then what do you expect to happen on such an
environment where the ability to sleep does not exist?

> |When I realised the EMX directory existed, I tried using
> |that, by copying it into multiple directories (the instructions
> |were not correct), but that still didn't work, complaining
> |about fnmatch.h or something.
> configure creates a link from lib/fnmatch.h to lib/fnmatch.h.in when

BTW, I tried running configure again using that new method,
and it hung my computer again, and I lost the message I was
writing (this message is a rewrite).

> necessary.  If EMX does not provide the POSIX.2 fnmatch function and
> fnmatch.h header, it should have been necessary to create the link or
> copy the file to lib/fnmatch.h.  Otherwise just define HAVE_FNMATCH in
> emx/config.h.
> I've made a note about Cygwin in the INSTALL file for both stable and
> feature.

Ok, good news!  I've been able to compile it!  Here is what I
have in mind.

A directory called "posix" and in it, a README file, plus a
compile.bat and a config.h, both below:

copy config.h ..

cd ..\lib
copy fnmatch.h.in fnmatch.h
gcc -c -I. -I.. -DHAVE_CONFIG_H dup2.c
gcc -c -I. -I.. -DHAVE_CONFIG_H fncase.c
gcc -c -I. -I.. -DHAVE_CONFIG_H fnmatch.c
rem gcc -c -I. -I.. -DHAVE_CONFIG_H ftruncate.c
gcc -c -I. -I.. -DHAVE_CONFIG_H getdate.c
gcc -c -I. -I.. -DHAVE_CONFIG_H gethostname.c
rem gcc -c -I. -I.. -DHAVE_CONFIG_H memmove.c
rem gcc -c -I. -I.. -DHAVE_CONFIG_H mkdir.c
rem gcc -c -I. -I.. -DHAVE_CONFIG_H rename.c
rem gcc -c -I. -I.. -DHAVE_CONFIG_H strerror.c
rem gcc -c -I. -I.. -DHAVE_CONFIG_H strstr.c
rem gcc -c -I. -I.. -DHAVE_CONFIG_H strtoul.c
gcc -c -I. -I.. -DHAVE_CONFIG_H valloc.c
gcc -c -I. -I.. -DHAVE_CONFIG_H waitpid.c
gcc -c -I. -I.. -DHAVE_CONFIG_H argmatch.c
gcc -c -I. -I.. -DHAVE_CONFIG_H getline.c
gcc -c -I. -I.. -DHAVE_CONFIG_H getopt.c
gcc -c -I. -I.. -DHAVE_CONFIG_H getopt1.c
gcc -c -I. -I.. -DHAVE_CONFIG_H getpass.c
gcc -c -I. -I.. -DHAVE_CONFIG_H md5.c
gcc -c -I. -I.. -DHAVE_CONFIG_H regex.c
gcc -c -I. -I.. -DHAVE_CONFIG_H -I. -I../src savecwd.c
gcc -c -I. -I.. -DHAVE_CONFIG_H sighandle.c
gcc -c -I. -I.. -DHAVE_CONFIG_H stripslash.c
gcc -c -I. -I.. -DHAVE_CONFIG_H xgetwd.c
gcc -c -I. -I.. -DHAVE_CONFIG_H yesno.c

cd ..\diff
gcc -c -I. -I.. -I../lib diff.c
gcc -c -I. -I.. -I../lib diff3.c
gcc -c -I. -I.. -I../lib analyze.c
gcc -c -I. -I.. -I../lib cmpbuf.c
gcc -c -I. -I.. -I../lib io.c
gcc -c -I. -I.. -I../lib context.c
gcc -c -I. -I.. -I../lib ed.c
gcc -c -I. -I.. -I../lib normal.c
gcc -c -I. -I.. -I../lib ifdef.c
gcc -c -I. -I.. -I../lib util.c
gcc -c -I. -I.. -I../lib dir.c
gcc -c -I. -I.. -I../lib version.c
gcc -c -I. -I.. -I../lib side.c

cd ..\zlib
gcc -c -I. adler32.c
gcc -c -I. compress.c
gcc -c -I. crc32.c
gcc -c -I. deflate.c
rem gcc -c -I. example.c
gcc -c -I. gzio.c
gcc -c -I. infblock.c
gcc -c -I. infcodes.c
gcc -c -I. inffast.c
gcc -c -I. inflate.c
gcc -c -I. inftrees.c
gcc -c -I. infutil.c
rem gcc -c -I. maketree.c
rem gcc -c -I. minigzip.c
gcc -c -I. trees.c
gcc -c -I. uncompr.c
gcc -c -I. zutil.c

cd ..\src

gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib main.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib add.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib admin.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib annotate.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib buffer.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib checkin.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib checkout.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib classify.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib client.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib commit.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib create_adm.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib cvsrc.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib diff.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib edit.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib entries.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib error.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib expand_path.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib fileattr.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib filesubr.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib find_names.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib hardlink.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib hash.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib history.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib ignore.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib import.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib lock.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib log.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib login.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib logmsg.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib mkmodules.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib modules.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib myndbm.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib no_diff.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib parseinfo.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib patch.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib rcs.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib rcscmds.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib recurse.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib release.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib remove.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib repos.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib root.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib run.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib root.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib scramble.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib server.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib status.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib subr.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib tag.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib update.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib version.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib vers_ts.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib watch.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib wrapper.c
gcc -c -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff -I../zlib zlib.c

gcc -o cvs *.o ../zlib/*.o ../lib/*.o ../diff/*.o

/* config.h --- configuration file for an arbitrary Posix system */
/* based on one from EMX */

/* This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   GNU General Public License for more details.  */

#include <io.h>
#include <sys/types.h>
#include <sys/stat.h>

/* Define if on AIX 3.
   System headers sometimes define this.
   We just want to avoid a redefinition error message.  */
#ifndef _ALL_SOURCE
/* #undef _ALL_SOURCE */

/* Define to empty if the keyword does not work.  */
#undef const

/* Define to `int' if <sys/types.h> doesn't define.  */
/* #undef gid_t */

/* Define if you support file names longer than 14 characters.  */

/* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
#define HAVE_SYS_WAIT_H 1

/* Define if utime(file, NULL) sets file's timestamp to the present.  */

/* Define if on MINIX.  */
/* #undef _MINIX */

/* Define to `int' if <sys/types.h> doesn't define.  */
/* #undef mode_t */

/* Define to `int' if <sys/types.h> doesn't define.  */
/* #undef pid_t */

/* Define if the system does not provide POSIX.1 features except
   with this defined.  */
/* #undef _POSIX_1_SOURCE */

/* Define if you need to in order for stat and other things to work.  */
/* #undef _POSIX_SOURCE */

/* Define as the return type of signal handlers (int or void).  */
#define RETSIGTYPE void

/* Define to `unsigned' if <sys/types.h> doesn't define.  */
/* #undef size_t */

/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly.  */

/* Define if you have the ANSI C header files.  */
#define STDC_HEADERS 1

/* Define if you can safely include both <sys/time.h> and <time.h>.  */

/* Define to `int' if <sys/types.h> doesn't define.  */
/* #undef uid_t */

/* Define if you have MIT Kerberos version 4 available.  */

/* Define if you want CVS to be able to be a remote repository client.  */

#if 0
/* This doesn't work yet, and I'm sure I don't want the hassles of seeing
   whether it will compile.  */
/* Define if you want CVS to be able to serve repositories to remote
   clients.  */

/* Define if you want to use the password authenticated server.  */
#endif /* 0 */

/* Define if you want encryption support.  */
/* #undef ENCRYPTION */

/* Define if you have the connect function.  */
#define HAVE_CONNECT 1

/* Define if you have the crypt function.  */
#define HAVE_CRYPT 1

/* Define if you have the fchdir function.  */
/* #define HAVE_FCHDIR */

/* Define if you have the fchmod function.  */
/* #define HAVE_FCHMOD */

/* Define if you have the fsync function.  */
#define HAVE_FSYNC 1

/* Define if you have the ftime function.  */
#define HAVE_FTIME 1

/* Define if you have the ftruncate function.  */

/* Define if you have the getpagesize function.  */

/* Define if you have the getspnam function.  */
/* #define HAVE_GETSPNAM */

/* Define if you have the initgroups function.  */
/* #define HAVE_INITGROUPS */

/* Define if you have the krb_get_err_text function.  */
/* #undef HAVE_KRB_GET_ERR_TEXT */

/* Define if you have the putenv function.  */
#define HAVE_PUTENV 1

/* Define if you have the readlink function.  */
/* #define HAVE_READLINK */

/* Define if you have the sigaction function.  */

/* Define if you have the sigblock function.  */
/* #undef HAVE_SIGBLOCK */

/* Define if you have the sigprocmask function.  */

/* Define if you have the sigsetmask function.  */
/* #undef HAVE_SIGSETMASK */

/* Define if you have the sigvec function.  */
/* #undef HAVE_SIGVEC */

/* Define if you have the timezone function.  */

/* Define if you have the tzset function.  */
#define HAVE_TZSET 1

/* Define if you have the vfork function.  */
/* #undef HAVE_VFORK */

/* Define if you have the vprintf function.  */
#define HAVE_VPRINTF 1

/* Define if you have the <direct.h> header file.  */
/* #undef HAVE_DIRECT_H */

/* Define if you have the <dirent.h> header file.  */
#define HAVE_DIRENT_H 1

/* Define if you have the <errno.h> header file.  */
#define HAVE_ERRNO_H 1

/* Define if you have the <fcntl.h> header file.  */
#define HAVE_FCNTL_H 1

/* Define if you have the <io.h> header file.  */
#define HAVE_IO_H 1

/* Define if you have the <memory.h> header file.  */
#define HAVE_MEMORY_H 1

/* Define if you have the <ndbm.h> header file.  */
/* #undef HAVE_NDBM_H 1 */

/* Define if you have the <ndir.h> header file.  */
/* #undef HAVE_NDIR_H */

/* Define if you have the <string.h> header file.  */
#define HAVE_STRING_H 1

/* Define if you have the <sys/bsdtypes.h> header file.  */
/* #undef HAVE_SYS_BSDTYPES_H */

/* Define if you have the <sys/dir.h> header file.  */
#define HAVE_SYS_DIR_H 1

/* Define if you have the <sys/ndir.h> header file.  */
/* #undef HAVE_SYS_NDIR_H */

/* Define if you have the <sys/param.h> header file.  */
#define HAVE_SYS_PARAM_H 1

/* Define if you have the <sys/resource.h> header file.  */

/* Define if you have the <sys/select.h> header file.  */

/* Define if you have the <sys/time.h> header file.  */
#define HAVE_SYS_TIME_H 1

/* Define if you have the <sys/timeb.h> header file.  */
#define HAVE_SYS_TIMEB_H 1

/* Define if you have the <unistd.h> header file.  */
#define HAVE_UNISTD_H 1

/* Define if you have the <utime.h> header file.  */
#define HAVE_UTIME_H 1

/* Define if you have the crypt library (-lcrypt).  */

/* Define if you have the inet library (-linet).  */
/* #undef HAVE_LIBINET */

/* Define if you have the nsl library (-lnsl).  */
#define HAVE_LIBNSL 1

/* Define if you have the nsl_s library (-lnsl_s).  */
/* #undef HAVE_LIBNSL_S */

/* Define if you have the sec library (-lsec).  */
/* #undef HAVE_LIBSEC 1 */

/* Define if you have the socket library (-lsocket).  */

/*#define ISDIRSEP(c) (((c) == '/') || ((c) == '\\'))*/

/* This is where old bits go to die under OS/2 as well as WinNT.  */
#define DEVNULL "/dev/null"

/* We actually do have a transparent rsh, whew. */
/* But it won't be transparent unless we ask it nicely! */

/* Pipes need to be put into binary mode using setmode ().  */

/* The reason for this is that we don't know whether to pass -b to
   rsh.  The system-supplied rsh on OS/2 wants it.  Some other rsh
   replacement might not accept it.  Historically, the NT port of CVS
   has not passed -b, and the OS/2 port has.  What a mess.  If we can
   get away with just not accepting :ext: until we can figure out how
   we should deal with this, then it will avoid having people rely on
   behaviors which will need to change.  */
#define NO_EXT_METHOD 1

/* See above; we can't use rsh without -b.  */

/* See discussion at xchmod in filesubr.c.  */
#define CHMOD_BROKEN 1

 * The following configuration options used to be defined in options.h.

 * When committing a permanent change, CVS and RCS make a log entry of
 * who committed the change.  If you are committing the change logged in
 * as "root" (not under "su" or other root-priv giving program), CVS/RCS
 * cannot determine who is actually making the change.
 * As such, by default, CVS disallows changes to be committed by users
 * logged in as "root".  You can disable this option by commenting
 * out the lines below.
 * Under Windows NT, privileges are associated with groups, not users,
 * so the case in which someone has logged in as root does not occur.
 * Thus, there is no need for this hack.
 * todo: I don't know why emx had CVS_BADROOT commented out too, but
 * historically it has been in the obsolete options.h file.  -DRP

 * For portability and heterogeneity reasons, CVS is shipped by
 * default using my own text-file version of the ndbm database library
 * in the src/myndbm.c file.  If you want better performance and are
 * not concerned about heterogeneous hosts accessing your modules
 * file, turn this option off.
#ifndef MY_NDBM
#define MY_NDBM

/* Directory used for storing temporary files, if not overridden by
   environment variables or the -T global option.  There should be little
   need to change this (-T is a better mechanism if you need to use a
   different directory for temporary files).  */
#define TMPDIR_DFLT "/tmp"

 * The default editor to use, if one does not specify the "-e" option
 * to cvs, or does not have an EDITOR environment variable.  I set
 * this to just "vi", and use the shell to find where "vi" actually
 * is.  This allows sites with /usr/bin/vi or /usr/ucb/vi to work
 * equally well (assuming that your PATH is reasonable).
#define EDITOR_DFLT "e"

 * The default umask to use when creating or otherwise setting file or
 * directory permissions in the repository.  Must be a value in the
 * range of 0 through 0777.  For example, a value of 002 allows group
 * rwx access and world rx access; a value of 007 allows group rwx
 * access but no world access.  This value is overridden by the value
 * of the CVSUMASK environment variable, which is interpreted as an
 * octal number.
#ifndef UMASK_DFLT
#define UMASK_DFLT 002

 * The cvs admin command is restricted to the members of the group
 * CVS_ADMIN_GROUP.  If this group does not exist, all users are
 * allowed to run cvs admin.  To disable the cvs admin for all users,
 * create an empty group CVS_ADMIN_GROUP.  To disable access control
 * for cvs admin, comment out the define below.
#define CVS_ADMIN_GROUP "cvsadmin"

 * When committing or importing files, you must enter a log message.
 * Normally, you can do this either via the -m flag on the command
 * line or an editor will be started for you.  If you like to use
 * logging templates (the rcsinfo file within the $CVSROOT/CVSROOT
 * directory), you might want to force people to use the editor even
 * if they specify a message with -m.  Enabling FORCE_USE_EDITOR will
 * cause the -m message to be appended to the temp file when the
 * editor is started.
/* #define  FORCE_USE_EDITOR */

/* #define CVS_FUDGELOCKS */

 * Should we build the password-authenticating client?  Whether to
 * include the password-authenticating _server_, on the other hand, is
 * set in config.h.

 * If you are working with a large remote repository and a 'cvs
 * checkout' is swamping your network and memory, define these to
 * enable flow control.  You will end up with even less probability of
 * a consistent checkout (see Concurrency in cvs.texinfo), but CVS
 * doesn't try to guarantee that anyway.  The master server process
 * will monitor how far it is getting behind, if it reaches the high
 * water mark, it will signal the child process to stop generating
 * data when convenient (ie: no locks are held, currently at the
 * beginning of a new directory).  Once the buffer has drained
 * sufficiently to reach the low water mark, it will be signalled to
 * start again.  You may override the default hi/low watermarks here
 * too.
#define SERVER_HI_WATER (2 * 1024 * 1024)
#define SERVER_LO_WATER (1 * 1024 * 1024)

#define PACKAGE_STRING "unknown"

/* #define POSIX_SIGNALS */
#define _REGEX_RE_COMP 1

/* End of CVS options.h section */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]