diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-CVE-2011-1679+1680.diff b/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-CVE-2011-1679+1680.diff deleted file mode 100644 index e080e07..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-CVE-2011-1679+1680.diff +++ /dev/null @@ -1,54 +0,0 @@ -diff -Naur ncpfs-2.2.6.orig/sutil/ncpumount.c ncpfs-2.2.6/sutil/ncpumount.c ---- ncpfs-2.2.6.orig/sutil/ncpm_common.c 2012-08-31 11:12:54.372652698 +0400 -+++ ncpfs-2.2.6/sutil/ncpm_common.c 2012-08-31 11:13:12.235236366 +0400 -@@ -1446,6 +1446,7 @@ - struct mntent ment; - int fd; - FILE* mtab; -+ off_t goodoffset; - - if (check_name(mount_name) == -1 || check_name(mpnt) == -1) - errexit(107, _("Illegal character in mount entry\n")); -@@ -1480,14 +1481,25 @@ - - if ((mtab = setmntent(MOUNTED, "a+")) == NULL) - { -+ unlink(MOUNTED "~"); - errexit(59, _("Can't open %s\n"), MOUNTED); - } -+ fseek (mtab, 0, SEEK_END); -+ goodoffset = ftell(mtab); - if (addmntent(mtab, &ment) == 1) - { -+ /* restore good state */ -+ ftruncate(fileno(mtab), goodoffset); -+ endmntent(mtab); -+ unlink(MOUNTED "~"); - errexit(60, _("Can't write mount entry\n")); - } - if (fchmod(fileno(mtab), 0644) == -1) - { -+ /* restore good state */ -+ ftruncate(fileno(mtab), goodoffset); -+ endmntent(mtab); -+ unlink(MOUNTED "~"); - errexit(61, _("Can't set perms on %s\n"), MOUNTED); - } - endmntent(mtab); -diff -Naur ncpfs-2.2.6.orig/sutil/ncpumount.c ncpfs-2.2.6/sutil/ncpumount.c ---- ncpfs-2.2.6.orig/sutil/ncpumount.c 2012-08-31 11:12:54.372652698 +0400 -+++ ncpfs-2.2.6/sutil/ncpumount.c 2012-08-31 11:13:12.235236366 +0400 -@@ -163,7 +163,12 @@ - i++; - } - if (!found) { -- addmntent(new_mtab, mnt); -+ if (addmntent(new_mtab, mnt)) { -+ eprintf(_("Can't addmntent to %s: %s\n"), MOUNTED_TMP, -+ strerror(errno)); -+ endmntent(mtab); -+ return 1; -+ } - } - } - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-align-fix.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-align-fix.patch deleted file mode 100644 index 49d3c38..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-align-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naurp ncpfs-2.2.6.orig/lib/ndslib.c ncpfs-2.2.6/lib/ndslib.c ---- a/lib/ndslib.c.orig 2005-01-27 12:35:59.000000000 -0500 -+++ b/lib/ndslib.c 2014-08-12 21:07:35.559190454 -0400 -@@ -957,7 +957,7 @@ static NWDSCCODE nds_beginauth2( - NWDSCCODE err; - int n1, n3; - u_int16_t n3a; -- char rpb_b[DEFAULT_MESSAGE_LEN]; -+ char rpb_b[DEFAULT_MESSAGE_LEN] __attribute__ ((aligned (4))); - Buf_T rpb; - size_t k1tl; - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-drop-kernel-check.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-drop-kernel-check.patch deleted file mode 100644 index 9348c08..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-drop-kernel-check.patch +++ /dev/null @@ -1,31 +0,0 @@ -Description: Drop kernel version check -Author: Bastian Blank -Bug-Debian: http://bugs.debian.org/692472 - ---- a/sutil/ncpm_common.c.orig -+++ b/sutil/ncpm_common.c -@@ -243,23 +243,6 @@ static int load_ncpfs(void) - #endif /* MOUNT2 */ - - static int getmountver(void) { -- struct utsname name; -- int maj, mid, rev; -- int ver; -- -- if (uname(&name)) { -- errexit(1, _("Cannot get kernel release\n")); -- } -- if (sscanf(name.release, "%d.%d.%d", &maj, &mid, &rev) != 3) { -- errexit(2, _("Cannot convert kernel release \"%s\" to number\n"), name.release); -- } -- ver = maj*0x10000 + mid*0x100 + rev; -- if (ver < 0x20100) -- return 2; -- if (ver < 0x20328) -- return 3; -- if (ver < 0x2051F) -- return 4; - return 5; - } - - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-getuid-fix.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-getuid-fix.patch deleted file mode 100644 index 64193c2..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-getuid-fix.patch +++ /dev/null @@ -1,124 +0,0 @@ -diff -Naurp ncpfs-2.2.6.orig/contrib/tcl-utils/chgpwd.c ncpfs-2.2.6/contrib/tcl-utils/chgpwd.c ---- a/contrib/tcl-utils/chgpwd.c.orig 2005-01-27 12:35:59.000000000 -0500 -+++ b/contrib/tcl-utils/chgpwd.c 2014-08-12 21:08:25.779190155 -0400 -@@ -292,12 +292,12 @@ int main(int argc, char *argv[]) { - } - } else { - if (!treeName[0]) { -- NWCXGetPreferredDSTree(treeName,sizeof(treeName)); -+ dserr=NWCXGetPreferredDSTree(treeName,sizeof(treeName)); - - } - if (!treeName[0]) { - fprintf(stderr,"failed: You must specify a server or a tree\n"); -- dserr=114; -+ /*dserr=114;*/ - goto finished; - } - -diff -Naurp ncpfs-2.2.6.orig/contrib/tcl-utils/ncplist.c ncpfs-2.2.6/contrib/tcl-utils/ncplist.c ---- ncpfs-2.2.6.orig/contrib/tcl-utils/ncplist.c 2005-01-27 12:35:59.000000000 -0500 -+++ ncpfs-2.2.6/contrib/tcl-utils/ncplist.c 2014-08-12 21:08:25.779190155 -0400 -@@ -299,7 +299,12 @@ int main(int argc, char *argv[]) { - }else { - - if (!treeName[0]) { -- NWCXGetPreferredDSTree(treeName,sizeof(treeName)); -+ dserr=NWCXGetPreferredDSTree(treeName,sizeof(treeName)); -+ if (dserr){ -+ fprintf(stderr, "failed: Cannot get preffered DS tree: %s\n", -+ strnwerror(dserr); -+ exit(106); -+ } - - } - if (!treeName[0]) { -diff -Naurp ncpfs-2.2.6.orig/contrib/tcl-utils/ncpreadprop.c ncpfs-2.2.6/contrib/tcl-utils/ncpreadprop.c ---- ncpfs-2.2.6.orig/contrib/tcl-utils/ncpreadprop.c 2005-01-27 12:35:59.000000000 -0500 -+++ ncpfs-2.2.6/contrib/tcl-utils/ncpreadprop.c 2014-08-12 21:08:25.779190155 -0400 -@@ -470,7 +470,7 @@ main(int argc, char *argv[]) - } - } else { - if (!treeName[0]) { -- NWCXGetPreferredDSTree(treeName,sizeof(treeName)); -+ dserr=NWCXGetPreferredDSTree(treeName,sizeof(treeName)); - - } - if (!treeName[0]) { -diff -Naurp ncpfs-2.2.6.orig/contrib/tcl-utils/ncpreadprops.c ncpfs-2.2.6/contrib/tcl-utils/ncpreadprops.c ---- ncpfs-2.2.6.orig/contrib/tcl-utils/ncpreadprops.c 2005-01-27 12:35:59.000000000 -0500 -+++ ncpfs-2.2.6/contrib/tcl-utils/ncpreadprops.c 2014-08-12 21:08:25.779190155 -0400 -@@ -507,7 +507,7 @@ main(int argc, char *argv[]) - } - } else { - if (!treeName[0]) { -- NWCXGetPreferredDSTree(treeName,sizeof(treeName)); -+ dserr=NWCXGetPreferredDSTree(treeName,sizeof(treeName)); - - } - if (!treeName[0]) { -diff -Naurp ncpfs-2.2.6.orig/lib/nwclient.c ncpfs-2.2.6/lib/nwclient.c ---- ncpfs-2.2.6.orig/lib/nwclient.c 2005-01-27 12:35:59.000000000 -0500 -+++ ncpfs-2.2.6/lib/nwclient.c 2014-08-12 21:08:25.779190155 -0400 -@@ -481,6 +481,10 @@ static char* readnwinfosfile (char * use - *err = EACCES; - return NULL; - } -+ if (st.st_uid != getuid()) { -+ *err = EACCES; -+ return NULL; -+ } - if ((st.st_mode & (S_IRWXO | S_IRWXG)) != 0) { - *err = NCPLIB_INVALID_MODE; - return NULL; -@@ -560,7 +564,7 @@ NWDSCCODE NWCXGetPreferredDSTree (NWD - if (!res) - res=readnwinfosfile (NULL,NDS_PREFERRED_TREE,NULL, &err); - if (!res) -- return -1; -+ return err; - if (strlen (res)+1 >maxLen) - return NWE_BUFFER_OVERFLOW; - strcpy(preferTree,res); -@@ -581,7 +585,7 @@ NWDSCCODE NWCXGetDefaultNameContext (con - if (!res) - res=readnwinfosfile (NULL,NDS_PREFERRED_NAME_CTX,forTree,&err); - if (!res) -- return -1; -+ return err; - if (strlen (res)+1 >maxLen) - return NWE_BUFFER_OVERFLOW; - strcpy(nameContext,res); -@@ -603,7 +607,7 @@ NWDSCCODE NWCXGetPreferredServer (con - - res=readnwinfosfile (NULL, NDS_PREFERRED_SERVER, forTree, &err); - if (!res) { -- return -1; -+ return err; - } - } - /* test that this server DO belongs to tree forTree*/ -@@ -644,7 +648,7 @@ NWDSCCODE NWCXGetDefaultUserName (const - if (!res) - res=readnwinfosfile (NULL,NDS_USER,forTree, &err); - if (!res) -- return -1; -+ return err; - if (strlen (res)+1 >maxLen) - return NWE_BUFFER_OVERFLOW; - strcpy(defaultName,res); -diff -Naurp ncpfs-2.2.6.orig/sutil/ncplogin.c ncpfs-2.2.6/sutil/ncplogin.c ---- ncpfs-2.2.6.orig/sutil/ncplogin.c 2005-01-27 12:35:59.000000000 -0500 -+++ ncpfs-2.2.6/sutil/ncplogin.c 2014-08-12 21:08:25.779190155 -0400 -@@ -588,7 +588,10 @@ main(int argc, char *argv[]) - int flags = 0; - - if (!info.tree) { -- NWCXGetPreferredDSTree(ntree, sizeof(ntree)); -+ err=NWCXGetPreferredDSTree(ntree, sizeof(ntree)); -+ if (err){ -+ errexit(104, _("Cannot get preffered DS tree: %s\n"),strnwerror(err)); -+ } - info.tree = ntree; - } - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-makefile-fix-soname-link.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-makefile-fix-soname-link.patch deleted file mode 100644 index ece9fc7..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-makefile-fix-soname-link.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Naurp ncpfs-2.2.6.orig/lib/Makefile.in ncpfs-2.2.6/lib/Makefile.in ---- a/lib/Makefile.in.orig 2014-08-12 23:23:27.149141996 -0400 -+++ b/lib/Makefile.in 2014-08-12 23:23:55.969141824 -0400 -@@ -99,9 +99,10 @@ distclean: mrproper - install_shared: $(SHARED_NCPLIB_BIN) - $(INSTALL) -d $(DESTDIR)$(libsodir) - $(INSTALL) $(SHARED_NCPLIB_BIN) $(DESTDIR)$(libsodir) -+ ln -sf $(SHARED_NCPLIB_BIN) $(DESTDIR)$(libsodir)/$(SHARED_NCPLIB) -+ ln -sf $(SHARED_NCPLIB_BIN) $(DESTDIR)$(libsodir)/$(SHARED_NCPLIB_SONAME) - - install-dev: install_shared install_static -- ln -sf $(SHARED_NCPLIB_SONAME) $(DESTDIR)$(libsodir)/$(SHARED_NCPLIB) - $(INSTALL) -d $(DESTDIR)$(includedir)/ncp - $(INSTALL) -d $(DESTDIR)$(includedir)/ncp/ext - $(INSTALL) -d $(DESTDIR)$(includedir)/ncp/kernel diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-missing-includes.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-missing-includes.patch deleted file mode 100644 index 1125825..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-missing-includes.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -ruN ncpfs-2.2.6/contrib/pam/pam_ncp_auth.c ncpfs-2.2.6-fixed/contrib/pam/pam_ncp_auth.c ---- a/contrib/pam/pam_ncp_auth.c.orig 2005-01-27 18:35:59.000000000 +0100 -+++ a/contrib/pam/pam_ncp_auth.c 2007-05-11 21:38:05.143474750 +0200 -@@ -257,6 +257,7 @@ - #include - #include - #include -+#include - #include - #include - #include -diff -ruN ncpfs-2.2.6/sutil/ncpm_common.c ncpfs-2.2.6-fixed/sutil/ncpm_common.c ---- ncpfs-2.2.6/sutil/ncpm_common.c 2005-01-27 18:35:59.000000000 +0100 -+++ ncpfs-2.2.6-fixed/sutil/ncpm_common.c 2007-05-11 21:38:29.609003750 +0200 -@@ -82,6 +82,7 @@ - - #include "ncpm_common.h" - -+#include - #include - #include - #include diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-mount-issue-ver2.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-mount-issue-ver2.patch deleted file mode 100644 index 65ea688..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-mount-issue-ver2.patch +++ /dev/null @@ -1,329 +0,0 @@ -Index: ncpfs-2.2.6/sutil/ncpm_common.c -=================================================================== ---- ncpfs-2.2.6.orig/sutil/ncpm_common.c -+++ ncpfs-2.2.6/sutil/ncpm_common.c -@@ -444,7 +444,7 @@ static int ncp_mount_v2(const char* moun - } - datav2.file_mode = data->file_mode; - datav2.dir_mode = data->dir_mode; -- err = proc_ncpm_mount(mount_name, data->mount_point, "ncpfs", flags, (void*) &datav2); -+ err = proc_ncpm_mount(mount_name, ".", "ncpfs", flags, (void*) &datav2); - if (err) - return errno; - return 0; -@@ -508,7 +508,7 @@ static int ncp_mount_v3(const char* moun - exit(0); /* Should not return from process_connection */ - } - close(pp[0]); -- err=proc_ncpm_mount(mount_name, data->mount_point, "ncpfs", flags, (void*) &datav3); -+ err=proc_ncpm_mount(mount_name, ".", "ncpfs", flags, (void*) &datav3); - if (err) { - err = errno; - /* Mount unsuccesful so we have to kill daemon */ -@@ -559,7 +559,7 @@ static int ncp_mount_v4(const char* moun - sprintf(mountopts, "version=%u,flags=%u,owner=%u,uid=%u,gid=%u,mode=%u,dirmode=%u,timeout=%u,retry=%u,wdogpid=%u,ncpfd=%u,infofd=%u", - NCP_MOUNT_VERSION_V5, ncpflags, data->mounted_uid, data->uid, data->gid, data->file_mode, - data->dir_mode, data->time_out, data->retry_count, wdog_pid, data->ncp_fd, pp[1]); -- err=proc_ncpm_mount(mount_name, data->mount_point, "ncpfs", flags, mountopts); -+ err=proc_ncpm_mount(mount_name, ".", "ncpfs", flags, mountopts); - } else { - err=-1; - } -@@ -577,7 +577,7 @@ static int ncp_mount_v4(const char* moun - datav4.file_mode = data->file_mode; - datav4.dir_mode = data->dir_mode; - datav4.wdog_pid = wdog_pid; -- err = proc_ncpm_mount(mount_name, data->mount_point, "ncpfs", flags, (void*)&datav4); -+ err = proc_ncpm_mount(mount_name, ".", "ncpfs", flags, (void*)&datav4); - if (err) { - err = errno; - /* Mount unsuccesful so we have to kill daemon */ -@@ -1395,6 +1395,17 @@ process_connection (const struct ncp_mou - } - #endif /* MOUNT3 */ - -+static int check_name(const char *name) -+{ -+ char *s; -+ for (s = "\n\t\\"; *s; s++) { -+ if (strchr(name, *s)) { -+ return -1; -+ } -+ } -+ return 0; -+} -+ - static const struct smntflags { - unsigned int flag; - const char* name; -@@ -1416,6 +1427,9 @@ void add_mnt_entry(char* mount_name, cha - int fd; - FILE* mtab; - -+ if (check_name(mount_name) == -1 || check_name(mpnt) == -1) -+ errexit(107, _("Illegal character in mount entry\n")); -+ - ment.mnt_fsname = mount_name; - ment.mnt_dir = mpnt; - ment.mnt_type = (char*)"ncpfs"; -Index: ncpfs-2.2.6/sutil/ncpmount.c -=================================================================== ---- ncpfs-2.2.6.orig/sutil/ncpmount.c -+++ ncpfs-2.2.6/sutil/ncpmount.c -@@ -359,11 +359,17 @@ main(int argc, char *argv[]) - usage(); - return -1; - } -+ - realpath(argv[optind], mount_point); - -- if (stat(mount_point, &st) == -1) -+ if (chdir(mount_point)) -+ { -+ errexit(31, _("Could not change directory into mount target %s: %s\n"), -+ mount_point, strerror(errno)); -+ } -+ if (stat(".", &st) == -1) - { -- errexit(31, _("Could not find mount point %s: %s\n"), -+ errexit(31, _("Mount point %s does not exist: %s\n"), - mount_point, strerror(errno)); - } - if (mount_ok(&st) != 0) -Index: ncpfs-2.2.6/sutil/ncpumount.c -=================================================================== ---- ncpfs-2.2.6.orig/sutil/ncpumount.c -+++ ncpfs-2.2.6/sutil/ncpumount.c -@@ -61,6 +61,8 @@ - #include - #include - #include -+#include -+#include - - #include - #include -@@ -70,10 +72,19 @@ - #include - #include - -+#include -+ - #include "private/libintl.h" - - #define _(X) X - -+#ifndef MS_REC -+#define MS_REC 16384 -+#endif -+#ifndef MS_SLAVE -+#define MS_SLAVE (1<<19) -+#endif -+ - static char *progname; - static int is_ncplogout = 0; - -@@ -229,11 +240,188 @@ static int clearMtab (const char* mount_ - return err; - } - -+ -+int ncp_mnt_umount(const char *abs_mnt, const char *rel_mnt) -+{ -+ if (umount(rel_mnt) != 0) { -+ eprintf(_("Could not umount %s: %s\n"), -+ abs_mnt, strerror(errno)); -+ return -1; -+ } -+ return 0; -+} -+ -+ -+static int check_is_mount_child(void *p) -+{ -+ const char **a = p; -+ const char *last = a[0]; -+ const char *mnt = a[1]; -+ int res; -+ const char *procmounts = "/proc/mounts"; -+ int found; -+ FILE *fp; -+ struct mntent *entp; -+ -+ res = mount("", "/", "", MS_SLAVE | MS_REC, NULL); -+ if (res == -1) { -+ eprintf(_("Failed to mark mounts slave: %s\n"), -+ strerror(errno)); -+ return 1; -+ } -+ -+ res = mount(".", "/tmp", "", MS_BIND | MS_REC, NULL); -+ if (res == -1) { -+ eprintf(_("Failed to bind parent to /tmp: %s\n"), -+ strerror(errno)); -+ return 1; -+ } -+ -+ fp = setmntent(procmounts, "r"); -+ if (fp == NULL) { -+ eprintf(_("Failed to open %s: %s\n"), -+ procmounts, strerror(errno)); -+ return 1; -+ } -+ -+ found = 0; -+ while ((entp = getmntent(fp)) != NULL) { -+ if (strncmp(entp->mnt_dir, "/tmp/", 5) == 0 && -+ strcmp(entp->mnt_dir + 5, last) == 0) { -+ found = 1; -+ break; -+ } -+ } -+ endmntent(fp); -+ -+ if (!found) { -+ eprintf(_("%s not mounted\n"), mnt); -+ return 1; -+ } -+ -+ return 0; -+} -+ -+ -+static int check_is_mount(const char *last, const char *mnt) -+{ -+ char buf[131072]; -+ pid_t pid, p; -+ int status; -+ const char *a[2] = { last, mnt }; -+ -+ pid = clone(check_is_mount_child, buf + 65536, CLONE_NEWNS, (void *) a); -+ if (pid == (pid_t) -1) { -+ eprintf(_("Failed to clone namespace: %s\n"), -+ strerror(errno)); -+ return -1; -+ } -+ p = waitpid(pid, &status, __WCLONE); -+ if (p == (pid_t) -1) { -+ eprintf(_("Waitpid failed: %s\n"), -+ strerror(errno)); -+ return -1; -+ } -+ if (!WIFEXITED(status)) { -+ eprintf(_("Child terminated abnormally (status %i)\n"), -+ status); -+ return -1; -+ } -+ if (WEXITSTATUS(status) != 0) -+ return -1; -+ -+ return 0; -+} -+ -+ -+static int chdir_to_parent(char *copy, const char **lastp, int *currdir_fd) -+{ -+ char *tmp; -+ const char *parent; -+ char buf[PATH_MAX]; -+ int res; -+ -+ tmp = strrchr(copy, '/'); -+ if (tmp == NULL || tmp[1] == '\0') { -+ eprintf(_("Internal error: invalid abs path: <%s>\n"), -+ copy); -+ return -1; -+ } -+ if (tmp != copy) { -+ *tmp = '\0'; -+ parent = copy; -+ *lastp = tmp + 1; -+ } else if (tmp[1] != '\0') { -+ *lastp = tmp + 1; -+ parent = "/"; -+ } else { -+ *lastp = "."; -+ parent = "/"; -+ } -+ *currdir_fd = open(".", O_RDONLY); -+ if (*currdir_fd == -1) { -+ eprintf(_("Failed to open current directory: %s\n"), -+ strerror(errno)); -+ return -1; -+ } -+ res = chdir(parent); -+ if (res == -1) { -+ eprintf(_("Failed to chdir to %s: %s\n"), -+ parent, strerror(errno)); -+ return -1; -+ } -+ if (getcwd(buf, sizeof(buf)) == NULL) { -+ eprintf(_("Failed to obtain current directory: %s\n"), -+ strerror(errno)); -+ return -1; -+ } -+ if (strcmp(buf, parent) != 0) { -+ eprintf(_("Mountpoint moved (%s -> %s)\n"), -+ parent, buf); -+ return -1; -+ -+ } -+ -+ return 0; -+} -+ -+ -+static int unmount_ncp(const char *mount_point) -+{ -+ int currdir_fd = -1; -+ char *copy; -+ const char *last; -+ int res; -+ -+ copy = strdup(mount_point); -+ if (copy == NULL) { -+ eprintf(_("Failed to allocate memory\n")); -+ return -1; -+ } -+ res = chdir_to_parent(copy, &last, &currdir_fd); -+ if (res == -1) -+ goto out; -+ res = check_is_mount(last, mount_point); -+ if (res == -1) -+ goto out; -+ res = ncp_mnt_umount(mount_point, last); -+ -+out: -+ free(copy); -+ if (currdir_fd != -1) { -+ fchdir(currdir_fd); -+ close(currdir_fd); -+ } -+ -+ return res; -+} -+ - static int - do_umount(const char *mount_point) - { - int fid = open(mount_point, O_RDONLY, 0); - uid_t mount_uid; -+ int res; - - if (fid == -1) { - eprintf(_("Could not open %s: %s\n"), -@@ -253,12 +441,8 @@ do_umount(const char *mount_point) - return -1; - } - close(fid); -- if (umount(mount_point) != 0) { -- eprintf(_("Could not umount %s: %s\n"), -- mount_point, strerror(errno)); -- return -1; -- } -- return 0; -+ res = unmount_ncp(mount_point); -+ return res; - } - - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-no-suid-root.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-no-suid-root.patch deleted file mode 100644 index 050de30..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-no-suid-root.patch +++ /dev/null @@ -1,16 +0,0 @@ -Description: Don't install utils as suid root -Author: Bastian Blank -Bug-Debian: http://bugs.debian.org/692929 - ---- ncpfs-2.2.6.orig/sutil/Makefile.in -+++ ncpfs-2.2.6/sutil/Makefile.in -@@ -51,7 +51,7 @@ all: $(UTILS) - install: all - ${INSTALL} -d $(DESTDIR)$(bindir) - ${INSTALL} -d $(DESTDIR)/sbin -- ${INSTALL} -m 4755 $(UTILS) $(DESTDIR)$(bindir) -+ ${INSTALL} $(UTILS) $(DESTDIR)$(bindir) - ifeq ($(USE_KERNEL),1) - ln -sf $(bindir)/ncpmount $(DESTDIR)/sbin/mount.ncp - ln -sf $(bindir)/ncpmount $(DESTDIR)/sbin/mount.ncpfs - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-pam_ncp_auth-fix.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-pam_ncp_auth-fix.patch deleted file mode 100644 index 2a9e0ed..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-pam_ncp_auth-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naurp ncpfs-2.2.6.orig/contrib/pam/pam_ncp_auth.c ncpfs-2.2.6/contrib/pam/pam_ncp_auth.c ---- ncpfs-2.2.6.orig/contrib/pam/pam_ncp_auth.c 2005-01-27 12:35:59.000000000 -0500 -+++ ncpfs-2.2.6/contrib/pam/pam_ncp_auth.c 2014-08-12 21:02:33.229192251 -0400 -@@ -2534,7 +2534,7 @@ nw_retrieve_nds_user_info(struct nw_user - bailoutctx:; - NWDSFreeContext(ctx); - bailout:; -- if (!err & (ui->qflag & QF_DEBUG)) -+ if ((!err) && (ui->qflag & QF_DEBUG)) - syslog(LOG_NOTICE, "%u %u %s %s %s\n", ui->uid, ui->gid, ui->dir, ui->gecos, ui->shell); - return err; - } diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-r6-drop-mtab-support.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-r6-drop-mtab-support.patch deleted file mode 100644 index 8d90c0b..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-r6-drop-mtab-support.patch +++ /dev/null @@ -1,286 +0,0 @@ -diff '--color=auto' -uNr ncpfs-2.2.6.orig/sutil/ncplogin.c ncpfs-2.2.6/sutil/ncplogin.c ---- ncpfs-2.2.6.orig/sutil/ncplogin.c 2026-04-20 09:34:55.755759467 +0200 -+++ ncpfs-2.2.6/sutil/ncplogin.c 2026-04-20 09:35:09.639058852 +0200 -@@ -111,7 +111,6 @@ - #include - #include - #include --#include - #include - #include - #ifdef CONFIG_NATIVE_UNIX -@@ -935,12 +934,6 @@ - } - NWCCCloseConn(conn); - NWDSFreeContext(ctx); -- /* ncpmap, ncplogin must write in /etc/mtab */ -- { -- block_sigs(); -- add_mnt_entry(mount_name, mount_point, info.flags); -- unblock_sigs(); -- } - free(mount_name); - if (info.echo_mnt_pnt) { - printf(_("mounted on:%s\n"),mount_point); -diff '--color=auto' -uNr ncpfs-2.2.6.orig/sutil/ncpm_common.c ncpfs-2.2.6/sutil/ncpm_common.c ---- ncpfs-2.2.6.orig/sutil/ncpm_common.c 2026-04-20 09:34:55.755759467 +0200 -+++ ncpfs-2.2.6/sutil/ncpm_common.c 2026-04-20 09:36:33.722507846 +0200 -@@ -104,7 +104,6 @@ - #include - #include - #include --#include - #include - #include - #if MOUNT3 -@@ -1423,80 +1422,6 @@ - {MS_NODIRATIME, "nodiratime"}, - {0, NULL}}; - --void add_mnt_entry(char* mount_name, char* mpnt, unsigned long flags) { -- const struct smntflags* sf; -- char mnt_opts[80]; -- char* p; -- struct mntent ment; -- int fd; -- FILE* mtab; -- off_t goodoffset; -- -- if (check_name(mount_name) == -1 || check_name(mpnt) == -1) -- errexit(107, _("Illegal character in mount entry\n")); -- -- ment.mnt_fsname = mount_name; -- ment.mnt_dir = mpnt; -- ment.mnt_type = (char*)"ncpfs"; -- ment.mnt_opts = mnt_opts; -- ment.mnt_freq = 0; -- ment.mnt_passno = 0; -- -- p = mnt_opts; -- *p++ = 'r'; -- *p++ = (flags & MS_RDONLY)?'o':'w'; -- for (sf = mntflags; sf->flag; sf++) { -- if (flags & sf->flag) { -- *p++ = ','; -- strcpy(p, sf->name); -- p += strlen(p); -- } -- } -- *p = 0; -- -- if (ncpm_suser()) { -- errexit(91, _("Cannot switch to superuser: %s\n"), strerror(errno)); -- } -- if ((fd = open(MOUNTED "~", O_RDWR | O_CREAT | O_EXCL, 0600)) == -1) -- { -- errexit(58, _("Can't get %s~ lock file\n"), MOUNTED); -- } -- close(fd); -- -- if ((mtab = setmntent(MOUNTED, "a+")) == NULL) -- { -- unlink(MOUNTED "~"); -- errexit(59, _("Can't open %s\n"), MOUNTED); -- } -- fseek (mtab, 0, SEEK_END); -- goodoffset = ftell(mtab); -- if (addmntent(mtab, &ment) == 1) -- { -- /* restore good state */ -- ftruncate(fileno(mtab), goodoffset); -- endmntent(mtab); -- unlink(MOUNTED "~"); -- errexit(60, _("Can't write mount entry\n")); -- } -- if (fchmod(fileno(mtab), 0644) == -1) -- { -- /* restore good state */ -- ftruncate(fileno(mtab), goodoffset); -- endmntent(mtab); -- unlink(MOUNTED "~"); -- errexit(61, _("Can't set perms on %s\n"), MOUNTED); -- } -- endmntent(mtab); -- -- if (unlink(MOUNTED "~") == -1) -- { -- errexit(62, _("Can't remove %s~\n"), MOUNTED); -- } -- if (ncpm_normal()) { -- errexit(90, _("Cannot relinquish superuser rights: %s\n"), strerror(EPERM)); -- } --} -- - static int __proc_option(const struct optinfo* opts, struct ncp_mount_info* info, const char* opt, const char* param) { - const struct optinfo* optr; - -diff '--color=auto' -uNr ncpfs-2.2.6.orig/sutil/ncpm_common.h ncpfs-2.2.6/sutil/ncpm_common.h ---- ncpfs-2.2.6.orig/sutil/ncpm_common.h 2026-04-20 09:34:55.755759467 +0200 -+++ ncpfs-2.2.6/sutil/ncpm_common.h 2026-04-20 09:35:09.639471098 +0200 -@@ -60,7 +60,6 @@ - int ncp_mount_specific(struct ncp_conn* conn, int pathNS, const unsigned char* NWpath, int pathlen); - int mount_ok(struct stat *st); - void mycom_err(int, const char*, ...); --void add_mnt_entry(char* mount_name, char* mpoint, unsigned long flags); - - struct ncp_mount_info { - struct ncp_mount_data_independent mdata; -diff '--color=auto' -uNr ncpfs-2.2.6.orig/sutil/ncpmount.c ncpfs-2.2.6/sutil/ncpmount.c ---- ncpfs-2.2.6.orig/sutil/ncpmount.c 2026-04-20 09:34:55.755759467 +0200 -+++ ncpfs-2.2.6/sutil/ncpmount.c 2026-04-20 09:35:09.639544688 +0200 -@@ -114,7 +114,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -719,11 +718,6 @@ - } - ncp_close(conn); - -- if (!opt_n) { -- block_sigs(); -- add_mnt_entry(mount_name, mount_point, info.flags); -- unblock_sigs(); -- } - return 0; - } - -diff '--color=auto' -uNr ncpfs-2.2.6.orig/sutil/ncpumount.c ncpfs-2.2.6/sutil/ncpumount.c ---- ncpfs-2.2.6.orig/sutil/ncpumount.c 2026-04-20 09:34:55.755759467 +0200 -+++ ncpfs-2.2.6/sutil/ncpumount.c 2026-04-20 09:38:20.648618497 +0200 -@@ -184,113 +184,6 @@ - sigprocmask(SIG_UNBLOCK, &sa.sa_mask, NULL); - } - --static int __clearMtab (const char* mount_points[], unsigned int numEntries) { --// main logic from ncpumount.c -- struct mntent *mnt; -- FILE *mtab; -- FILE *new_mtab; -- --#define MOUNTED_TMP MOUNTED".tmp" -- -- if ((mtab = setmntent(MOUNTED, "r")) == NULL){ -- eprintf(_("Can't open %s: %s\n"), MOUNTED, -- strerror(errno)); -- return 1; -- } -- -- if ((new_mtab = setmntent(MOUNTED_TMP, "w")) == NULL){ -- eprintf(_("Can't open %s: %s\n"), MOUNTED_TMP, -- strerror(errno)); -- endmntent(mtab); -- return 1; -- } -- while ((mnt = getmntent(mtab)) != NULL) { -- unsigned int i=0; -- int found=0; -- -- while (imnt_dir, mount_points[i]); -- i++; -- } -- if (!found) { -- if (addmntent(new_mtab, mnt)) { -- eprintf(_("Can't addmntent to %s: %s\n"), MOUNTED_TMP, -- strerror(errno)); -- endmntent(mtab); -- return 1; -- } -- } -- } -- -- endmntent(mtab); -- -- if (fchmod(fileno(new_mtab), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) < 0){ -- eprintf(_("Error changing mode of %s: %s\n"), -- MOUNTED_TMP, strerror(errno)); -- return 1; -- } -- endmntent(new_mtab); -- -- if (rename(MOUNTED_TMP, MOUNTED) < 0){ -- eprintf(_("Cannot rename %s to %s: %s\n"), -- MOUNTED, MOUNTED_TMP, strerror(errno)); -- return 1; -- } -- return 0; --} -- --static int clearMtab (const char* mount_points[], unsigned int numEntries) { -- int fd; -- int err; -- int retries = 10; -- -- if (!numEntries) -- return 0; /* don't waste time ! */ -- -- block_sigs(); -- -- while ((fd = open(MOUNTED "~", O_RDWR | O_CREAT | O_EXCL, 0600)) == -1) { -- struct timespec tm; -- -- if (errno != EEXIST || retries == 0) { -- unblock_sigs(); -- eprintf(_("Can't get %s~ lock file: %s\n"), MOUNTED, strerror(errno)); -- return 1; -- } -- fd = open(MOUNTED "~", O_RDWR); -- if (fd != -1) { -- alarm(10); -- err = lockf(fd, F_LOCK, 0); -- alarm(0); -- close(fd); -- if (err) { -- unblock_sigs(); -- eprintf(_("Can't lock lock file %s~: %s\n"), MOUNTED, _("Lock timed out")); -- return 1; -- } -- tm.tv_sec = 0; -- tm.tv_nsec = 20000000; -- nanosleep(&tm, NULL); -- } -- retries--; -- } -- alarm(1); -- lockf(fd, F_LOCK, 0); -- alarm(0); -- close(fd); -- -- err = __clearMtab(mount_points, numEntries); -- -- if ((unlink(MOUNTED "~") == -1) && (err == 0)){ -- unblock_sigs(); -- eprintf(_("Can't remove %s~"), MOUNTED); -- return 1; -- } -- unblock_sigs(); -- return err; --} -- -- - int ncp_mnt_umount(const char *abs_mnt, const char *rel_mnt) - { - if (umount(rel_mnt) != 0) { -@@ -627,10 +520,6 @@ - ret = 1; - continue; - } -- if (clearMtab(&mount_point, 1)) { -- ret = 1; -- continue; -- } - } - return ret; - } -@@ -749,7 +638,6 @@ - if (serverName || allConns) { - processBindServers(conns,curEntries,serverName,umountTable,&mountEntries); - } -- clearMtab(umountTable, mountEntries); - } else if (treeName) { - eprintf(_("No NCP connections to tree %s.\n"),treeName); - } else if (serverName) { diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-r6-ldflags-support.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-r6-ldflags-support.patch deleted file mode 100644 index 0308440..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-r6-ldflags-support.patch +++ /dev/null @@ -1,153 +0,0 @@ -diff '--color=auto' -uNr ncpfs-2.2.6.orig/contrib/pam/Makefile.in ncpfs-2.2.6/contrib/pam/Makefile.in ---- ncpfs-2.2.6.orig/contrib/pam/Makefile.in 2026-04-20 08:53:18.696719714 +0200 -+++ ncpfs-2.2.6/contrib/pam/Makefile.in 2026-04-20 08:53:35.912413754 +0200 -@@ -17,6 +17,7 @@ - PAM_OBJECTS = pam_ncp_auth.do support.do - - CFLAGS_pam_ncp_auth.do := -DNCPMOUNT_PATH=\"$(bindir)/ncpmount\" -DNCPUMOUNT_PATH=\"$(bindir)/ncpumount\" -+LDFLAGS = @LDFLAGS@ - - .PHONY : all install install-dev dep clean mrproper distclean - .PHONY : default -@@ -45,7 +46,7 @@ - - - $(PAM_LIBRARY): $(PAM_OBJECTS) -- $(CC) $(CFLAGS) -shared -o $@ $(PAM_OBJECTS) -L$(NCPLIB_DIR) -lncp -lpam ${LIBS} -+ $(CC) $(CFLAGS) -shared $(LDFLAGS) -o $@ $(PAM_OBJECTS) -L$(NCPLIB_DIR) -lncp -lpam ${LIBS} - - dep: - -diff '--color=auto' -uNr ncpfs-2.2.6.orig/ipx-1.0/Makefile.in ncpfs-2.2.6/ipx-1.0/Makefile.in ---- ncpfs-2.2.6.orig/ipx-1.0/Makefile.in 2026-04-20 08:53:18.706476360 +0200 -+++ ncpfs-2.2.6/ipx-1.0/Makefile.in 2026-04-20 08:53:35.912536606 +0200 -@@ -9,6 +9,7 @@ - vpath %.8 ${this_srcdir} - - LIBS = @INTLLIBS@ @LIBS@ -+LDFLAGS = @LDFLAGS@ - - O_UTILS = ipx_configure.o ipx_cmd.o - O_UTIIPX = ipx_interface.o ipx_internal_net.o ipx_route.o -@@ -33,7 +34,7 @@ - [ -s $@ ] || rm -f $@ - - $(UTIIPX): %: %.o ipxutil.o -- $(CC) $(CFLAGS) -o $@ $(addsuffix .o,$@) ipxutil.o ${LIBS} -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(addsuffix .o,$@) ipxutil.o ${LIBS} - - $(UTILS): %: %.o - $(CC) $(CFLAGS) -o $@ $(addsuffix .o,$@) ${LIBS} -diff '--color=auto' -uNr ncpfs-2.2.6.orig/ipxdump/Makefile.in ncpfs-2.2.6/ipxdump/Makefile.in ---- ncpfs-2.2.6.orig/ipxdump/Makefile.in 2026-04-20 08:53:18.707193602 +0200 -+++ ncpfs-2.2.6/ipxdump/Makefile.in 2026-04-20 08:53:35.912613993 +0200 -@@ -11,6 +11,7 @@ - OBJECTS= ipxutil.o - - ALL_OBJECTS := $(EXEC:%=%.o) $(OBJECTS) -+LDFLAGS = @LDFLAGS@ - - .PHONY : all install dep clean mrproper distclean - .PHONY : dist tgz -@@ -24,7 +25,7 @@ - ifeq ($(ncp_if_ether_support),yes) - - $(EXEC): %: %.o $(OBJECTS) -- $(CC) $(CFLAGS) -o $@ $(addsuffix .o,$@) $(OBJECTS) -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(addsuffix .o,$@) $(OBJECTS) - - else - .PHONY ipxdump ipxparse -diff '--color=auto' -uNr ncpfs-2.2.6.orig/lib/Makefile.in ncpfs-2.2.6/lib/Makefile.in ---- ncpfs-2.2.6.orig/lib/Makefile.in 2026-04-20 08:53:18.705915997 +0200 -+++ ncpfs-2.2.6/lib/Makefile.in 2026-04-20 08:53:35.912711256 +0200 -@@ -24,6 +24,7 @@ - PIE_FLAGS := -fpie - PIC_FLAGS := -fPIC - NWCOMPAT := 1 -+LDFLAGS := @LDFLAGS@ - - SHARED_VLINK := - SHARED_VLINK_CFLAGS := -@@ -128,7 +129,7 @@ - ln -sf $< $@ - - $(SHARED_NCPLIB_BIN): $(SHARED_O_OBJ) ${this_srcdir}/libncp.vers -- $(CC) -shared -o $@ -Wl,-soname=$(SHARED_NCPLIB_SONAME) $(SHARED_VLINK) $(SHARED_O_OBJ) ${LIBS} -+ $(CC) -shared -o $@ -Wl,-soname=$(SHARED_NCPLIB_SONAME) $(LDFLAGS) $(SHARED_VLINK) $(SHARED_O_OBJ) ${LIBS} - - install_static: $(STATIC_NCPLIB_BIN) - $(INSTALL) -d $(DESTDIR)$(libadir) -diff '--color=auto' -uNr ncpfs-2.2.6.orig/Make.rules.in ncpfs-2.2.6/Make.rules.in ---- ncpfs-2.2.6.orig/Make.rules.in 2026-04-20 08:53:18.707387153 +0200 -+++ ncpfs-2.2.6/Make.rules.in 2026-04-20 08:53:35.912827011 +0200 -@@ -43,6 +43,7 @@ - CFLAGS_DEFINES := -DN_PLAT_LINUX -DLOCALEDIR=\"${localedir}\" -DNCPFS_VERSION=\"${VERSION}\" -DNCPFS_PACKAGE=\"${PACKAGE}\" - - CCFLAGS := $(CFLAGS_DEFINES) $(CFLAGS_OPTIONS) $(INCLUDES) -+LDFLAGS := @LDFLAGS@ - - # If your system is ELF, either also do a 'make install', or append the util/ - # directory where the dynamic library resides to the environment -diff '--color=auto' -uNr ncpfs-2.2.6.orig/sutil/Makefile.in ncpfs-2.2.6/sutil/Makefile.in ---- ncpfs-2.2.6.orig/sutil/Makefile.in 2026-04-20 08:53:18.703038614 +0200 -+++ ncpfs-2.2.6/sutil/Makefile.in 2026-04-20 08:56:37.504553558 +0200 -@@ -14,6 +14,7 @@ - NDS_SUPPORT = @NDS_SUPPORT@ - - LIBS = @INTLLIBS@ @LIBICONV@ @LIBS@ -+LDFLAGS := @LDFLAGS@ - - # environ in ncpmount - CCFLAGS += -D_GNU_SOURCE -@@ -73,7 +74,7 @@ - ncpmap: ncpm_common.o - - ncpmap.o: %.o: ncplogin.c -- $(CC) $(CFLAGS) $(CCFLAGS) $(CFLAGS_$@) $(PIE_CFLAGS) -o $@ -c $< -+ $(CC) $(CFLAGS) $(LDFLAGS) $(CCFLAGS) $(CFLAGS_$@) $(PIE_CFLAGS) -o $@ -c $< - - ncpmap.d: %.d: ncplogin.c - set -e; $(CC) -M $(CFLAGS) $(CCFLAGS) $(CFLAGS_$(@:.d=.o)) $< \ -@@ -89,7 +90,7 @@ - [ -s $@ ] || rm -f $@ - - $(UTILS): %: %.o ../lib/libncp.$(libext) -- $(CC) @GC_SECTIONS@-o $@ $^ $(PIE_LDFLAGS) ${LIBS} -+ $(CC) @GC_SECTIONS@-o $@ $^ $(LDFLAGS) $(PIE_LDFLAGS) ${LIBS} - - ../lib/libncp.$(libext): - make -C ../lib libncp.$(libext) -diff '--color=auto' -uNr ncpfs-2.2.6.orig/util/Makefile.in ncpfs-2.2.6/util/Makefile.in ---- ncpfs-2.2.6.orig/util/Makefile.in 2026-04-20 08:53:18.695846760 +0200 -+++ ncpfs-2.2.6/util/Makefile.in 2026-04-20 08:57:24.020465257 +0200 -@@ -15,6 +15,7 @@ - MOUNT2 = @MOUNT2@ - - LIBS = @INTLLIBS@ @LIBICONV@ @LIBS@ -+LDFLAGS = @LDFLAGS@ - - O_OTHER = dsqueue.o - O_USERUTILS = slist.o pqlist.o nwfsinfo.o pserver.o nprint.o nsend.o \ -@@ -81,7 +82,7 @@ - make -C $(NCPLIB_DIR) libncp.$(shlibext) - - $(O_USERUTILS) $(O_SBINUTILS) $(O_OTHER) ncptest.o: %.o: %.c -- $(CC) $(CFLAGS) $(CCFLAGS) $(CFLAGS_$@) -o $@ -c $< -+ $(CC) $(CFLAGS) $(LDFLAGS) $(CCFLAGS) $(CFLAGS_$@) -o $@ -c $< - - %.d: %.c - set -e; $(CC) -M $(CFLAGS) $(CCFLAGS) $(CFLAGS_$(@:.d=.o)) $< \ -@@ -92,10 +93,10 @@ - pqstat nwpqjob nprint: dsqueue.o - - $(UTILS): %: %.o $(LIBDEP) -- $(CC) $(CFLAGS) -o $@ $(addsuffix .o,$@) $(ADDOBJS_$@) -L$(NCPLIB_DIR) -lncp ${LIBS} -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(addsuffix .o,$@) $(ADDOBJS_$@) -L$(NCPLIB_DIR) -lncp ${LIBS} - - ipx_probe: ipx_probe.c -- $(CC) $(CFLAGS) $(CCFLAGS) -o ipx_probe ipx_probe.c ${LIBS} -+ $(CC) $(CFLAGS) $(LDFLAGS) $(CCFLAGS) -o ipx_probe ipx_probe.c ${LIBS} - - dep: - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-r6-servername-array-fix.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-r6-servername-array-fix.patch deleted file mode 100644 index 51afba1..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-r6-servername-array-fix.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff '--color=auto' -uNr ncpfs-2.2.6.orig/include/ncp/ncplib.h ncpfs-2.2.6/include/ncp/ncplib.h ---- ncpfs-2.2.6.orig/include/ncp/ncplib.h 2026-04-20 08:16:19.372014966 +0200 -+++ ncpfs-2.2.6/include/ncp/ncplib.h 2026-04-20 08:16:31.492427392 +0200 -@@ -500,9 +500,9 @@ - - struct ncp_file_server_info_2 { - #ifdef SWIG -- fixedArray ServerName[49]; -+ fixedArray ServerName[50]; - #else -- char ServerName[49]; -+ char ServerName[50]; - #endif - u_int8_t FileServiceVersion; - u_int8_t FileServiceSubVersion; diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-r6.ebuild b/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-r6.ebuild deleted file mode 100644 index ace3beb..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-r6.ebuild +++ /dev/null @@ -1,163 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit pam - -DESCRIPTION="Provides access to Netware services using the NCP protocol" -HOMEPAGE="ftp://platan.vc.cvut.cz/pub/linux/ncpfs/" -SRC_URI="ftp://platan.vc.cvut.cz/pub/linux/${PN}/${P}.tar.gz - https://old-releases.ubuntu.com/ubuntu/pool/universe/n/ncpfs/ncpfs_${PV}.orig.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~mips ~ppc ~ppc64 ~x86" -IUSE="nls pam php" - -DEPEND=" - nls? ( sys-devel/gettext ) - pam? ( sys-libs/pam ) - php? ( dev-lang/php:* )" - -RDEPEND="${DEPEND} - net-fs/ncpfs-modules - net-misc/ipx-utils" - -PATCHES=( - "${FILESDIR}"/ncpfs-hg-commit-403.patch - "${FILESDIR}"/ncpfs-hg-commit-404.patch - "${FILESDIR}"/ncpfs-hg-commit-405.patch - "${FILESDIR}"/ncpfs-hg-commit-406.patch - "${FILESDIR}"/ncpfs-hg-commit-407.patch - "${FILESDIR}"/ncpfs-hg-commit-408.patch - "${FILESDIR}"/ncpfs-hg-commit-409.patch - "${FILESDIR}"/ncpfs-hg-commit-410.patch - "${FILESDIR}"/ncpfs-hg-commit-411.patch - "${FILESDIR}"/ncpfs-hg-commit-412.patch - "${FILESDIR}"/ncpfs-hg-commit-413.patch - "${FILESDIR}"/ncpfs-hg-commit-414.patch - "${FILESDIR}"/ncpfs-hg-commit-415.patch - "${FILESDIR}"/ncpfs-hg-commit-416.patch - "${FILESDIR}"/ncpfs-hg-commit-417.patch - "${FILESDIR}"/ncpfs-hg-commit-419.patch - "${FILESDIR}"/ncpfs-hg-commit-420.patch - "${FILESDIR}"/ncpfs-hg-commit-421.patch - "${FILESDIR}"/ncpfs-hg-commit-422.patch - "${FILESDIR}"/ncpfs-hg-commit-423.patch - "${FILESDIR}"/ncpfs-hg-commit-424.patch - "${FILESDIR}"/ncpfs-hg-commit-425.patch - "${FILESDIR}"/ncpfs-hg-commit-426.patch - "${FILESDIR}"/ncpfs-hg-commit-427.patch - "${FILESDIR}"/ncpfs-hg-commit-428.patch - "${FILESDIR}"/ncpfs-hg-commit-429.patch - "${FILESDIR}"/ncpfs-hg-commit-430.patch - "${FILESDIR}"/ncpfs-hg-commit-431.patch - "${FILESDIR}"/ncpfs-hg-commit-432.patch - "${FILESDIR}"/ncpfs-hg-commit-433.patch - "${FILESDIR}"/ncpfs-hg-commit-434.patch - "${FILESDIR}"/ncpfs-hg-commit-435.patch - "${FILESDIR}"/ncpfs-hg-commit-436.patch - "${FILESDIR}"/ncpfs-hg-commit-437.patch - "${FILESDIR}"/ncpfs-hg-commit-438.patch - "${FILESDIR}"/ncpfs-hg-commit-439.patch - "${FILESDIR}"/ncpfs-hg-commit-440.patch - "${FILESDIR}"/ncpfs-hg-commit-441.patch - "${FILESDIR}"/ncpfs-hg-commit-442.patch - "${FILESDIR}"/ncpfs-hg-commit-443.patch - "${FILESDIR}"/ncpfs-hg-commit-444.patch - "${FILESDIR}"/ncpfs-hg-commit-445.patch - "${FILESDIR}"/ncpfs-hg-commit-446.patch - "${FILESDIR}"/ncpfs-hg-commit-447.patch - "${FILESDIR}"/ncpfs-hg-commit-448.patch - "${FILESDIR}"/ncpfs-hg-commit-449.patch - "${FILESDIR}"/ncpfs-hg-commit-450.patch - "${FILESDIR}"/ncpfs-hg-commit-451.patch - "${FILESDIR}"/ncpfs-hg-commit-452.patch - "${FILESDIR}"/ncpfs-hg-commit-453.patch - "${FILESDIR}"/ncpfs-hg-commit-454.patch - "${FILESDIR}"/ncpfs-hg-commit-455.patch - "${FILESDIR}"/ncpfs-hg-commit-456.patch - "${FILESDIR}"/ncpfs-hg-commit-457.patch - "${FILESDIR}"/ncpfs-hg-commit-458.patch - "${FILESDIR}"/ncpfs.LDFLAGS.patch - "${FILESDIR}"/ncpfs.pam_ncp_auth.syslog.patch - "${FILESDIR}"/ncpfs.offsetof.patch - "${FILESDIR}"/ncpfs.mount_hang.patch - "${FILESDIR}"/ncpfs-2.2.6-mount-issue-ver2.patch - "${FILESDIR}"/ncpfs-2_2_6_partial.patch - "${FILESDIR}"/ncpfs-2.2.6-CVE-2011-1679+1680.diff - - # Build fixes. - "${FILESDIR}"/${P}-missing-includes.patch - - # Misc patches borrowed from Mageia. - "${FILESDIR}"/${P}-align-fix.patch - "${FILESDIR}"/${P}-getuid-fix.patch - "${FILESDIR}"/${P}-pam_ncp_auth-fix.patch - "${FILESDIR}"/${P}-r6-servername-array-fix.patch - - # Misc patches borrowed from Debian. - # Fixes Bug #497278 - "${FILESDIR}"/${P}-drop-kernel-check.patch - "${FILESDIR}"/${P}-r6-drop-mtab-support.patch - "${FILESDIR}"/${P}-no-suid-root.patch - "${FILESDIR}"/${P}-remove-libncp_atomic-header.patch - - # Support LDFLAGS. - "${FILESDIR}"/${P}-r6-ldflags-support.patch - - # Bug 446696. This might need re-diffing if additional Makefile - # fixes are added. - "${FILESDIR}"/${P}-makefile-fix-soname-link.patch - - "${FILESDIR}"/${P}-usr-merge.patch - - "${FILESDIR}"/${P}-fix-build-with-gcc14.patch - - "${FILESDIR}"/${P}-php5x.patch - "${FILESDIR}"/${P}-php_auth_nds-php8.patch - "${FILESDIR}"/${P}-php-install-root.patch - - "${FILESDIR}"/${P}-r5-nds-null-name.patch - -) - -DOCS=( FAQ README ) - -src_prepare() { - # Bug #273484. - sed -i '/ldconfig/d' lib/Makefile.in || die - append-cflags -fcommon -Wincompatible-pointer-types - - default -} - -src_configure() { - # PHP integration no longer supported in Gentoo, per Bug #582516. - econf \ - --prefix="${EPREFIX}/usr" \ - $(use_enable nls) \ - $(use_enable pam pam "$(getpam_mod_dir)") \ - $(use_enable php) \ - --disable-ipx-tools \ - --enable-ipx -} - -src_install() { - dodir $(getpam_mod_dir) /usr/sbin - - # Install main software and headers. - emake DESTDIR="${D}" install - emake DESTDIR="${D}" install-dev - - einstalldocs -} - -pkg_postinst() { - if use php; then - elog "The bundled PHP extension php_auth_nds was built and installed." - elog "Make sure the matching PHP slot is installed and selected so that" - elog "the built module path matches your active php-config." - fi -} diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-remove-libncp_atomic-header.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-remove-libncp_atomic-header.patch deleted file mode 100644 index 2276881..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-2.2.6-remove-libncp_atomic-header.patch +++ /dev/null @@ -1,15 +0,0 @@ -Description: Remove another generated file -Author: Bastian Blank -Bug-Debian: http://bugs.debian.org/692471 - ---- ncpfs-2.2.6.orig/Makefile.in -+++ ncpfs-2.2.6/Makefile.in -@@ -71,6 +71,7 @@ distclean: - rm -f intl/Makefile po/Makefile po/Makefile.in - rm -f lib/Makefile man/Makefile sutil/Makefile util/Makefile - rm -f include/config.h -+ rm -f include/private/libncp-atomic.h - rm -f include/ncp/ext/socket.h include/ncp/ext/stdint.h - rm -f include/ncp/kernel/fs.h - rm -f include/ncp/kernel/if.h include/ncp/kernel/route.h include/ncp/kernel/types.h - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-2_2_6_partial.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-2_2_6_partial.patch deleted file mode 100644 index 5f9cd9d..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-2_2_6_partial.patch +++ /dev/null @@ -1,203 +0,0 @@ -Index: ncpfs-2.2.6/sutil/ncplogin.c -=================================================================== ---- ncpfs-2.2.6.orig/sutil/ncplogin.c -+++ ncpfs-2.2.6/sutil/ncplogin.c -@@ -934,7 +934,9 @@ ncpipx:; - NWDSFreeContext(ctx); - /* ncpmap, ncplogin must write in /etc/mtab */ - { -+ block_sigs(); - add_mnt_entry(mount_name, mount_point, info.flags); -+ unblock_sigs(); - } - free(mount_name); - if (info.echo_mnt_pnt) { -Index: ncpfs-2.2.6/sutil/ncpm_common.c -=================================================================== ---- ncpfs-2.2.6.orig/sutil/ncpm_common.c -+++ ncpfs-2.2.6/sutil/ncpm_common.c -@@ -360,7 +360,7 @@ void verify_argv(int argc, char* argv[]) - #endif - - static inline int ncpm_suser(void) { -- return setreuid(-1, 0); -+ return setresuid(0, 0, myuid); - } - - static int ncpm_normal(void) { -@@ -368,11 +368,31 @@ static int ncpm_normal(void) { - int v; - - e = errno; -- v = setreuid(-1, myuid); -+ v = setresuid(myuid, myuid, 0); - errno = e; - return v; - } - -+void block_sigs(void) { -+ -+ sigset_t mask, orig_mask; -+ sigfillset(&mask); -+ -+ if(sigprocmask(SIG_SETMASK, &mask, &orig_mask) < 0) { -+ errexit(-1, _("Blocking signals failed.\n")); -+ } -+} -+ -+void unblock_sigs(void) { -+ -+ sigset_t mask, orig_mask; -+ sigemptyset(&mask); -+ -+ if (sigprocmask(SIG_SETMASK, &mask, &orig_mask) < 0) { -+ errexit(-1, _("Un-blocking signals failed.\n")); -+ } -+} -+ - static int proc_ncpm_mount(const char* source, const char* target, const char* filesystem, unsigned long mountflags, const void* data) { - int v; - int e; -Index: ncpfs-2.2.6/sutil/ncpm_common.h -=================================================================== ---- ncpfs-2.2.6.orig/sutil/ncpm_common.h -+++ ncpfs-2.2.6/sutil/ncpm_common.h -@@ -121,6 +121,9 @@ int proc_buildconn(struct ncp_mount_info - int proc_aftermount(const struct ncp_mount_info* info, NWCONN_HANDLE* conn); - int proc_ncpm_umount(const char* dir); - -+void block_sigs(void); -+void unblock_sigs(void); -+ - #define UNUSED(x) x __attribute__((unused)) - #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) - -Index: ncpfs-2.2.6/sutil/ncpmount.c -=================================================================== ---- ncpfs-2.2.6.orig/sutil/ncpmount.c -+++ ncpfs-2.2.6/sutil/ncpmount.c -@@ -720,7 +720,9 @@ ncpipx:; - ncp_close(conn); - - if (!opt_n) { -+ block_sigs(); - add_mnt_entry(mount_name, mount_point, info.flags); -+ unblock_sigs(); - } - return 0; - } -Index: ncpfs-2.2.6/sutil/ncpumount.c -=================================================================== ---- ncpfs-2.2.6.orig/sutil/ncpumount.c -+++ ncpfs-2.2.6/sutil/ncpumount.c -@@ -86,6 +86,8 @@ - static char *progname; - static int is_ncplogout = 0; - -+uid_t uid; -+ - static void - usage(void) - { -@@ -126,6 +128,40 @@ static void eprintf(const char* message, - va_end(ap); - } - -+/* Mostly copied from ncpm_common.c */ -+void block_sigs(void) { -+ -+ sigset_t mask, orig_mask; -+ sigfillset(&mask); -+ sigdelset(&mask, SIGALRM); /* Need SIGALRM for ncpumount */ -+ -+ if(setresuid(0, 0, uid) < 0) { -+ eprintf("Failed to raise privileges.\n"); -+ exit(-1); -+ } -+ -+ if(sigprocmask(SIG_SETMASK, &mask, &orig_mask) < 0) { -+ eprintf("Blocking signals failed.\n"); -+ exit(-1); -+ } -+} -+ -+void unblock_sigs(void) { -+ -+ sigset_t mask, orig_mask; -+ sigemptyset(&mask); -+ -+ if(setresuid(uid, uid, 0) < 0) { -+ eprintf("Failed to drop privileges.\n"); -+ exit(-1); -+ } -+ -+ if(sigprocmask(SIG_SETMASK, &mask, &orig_mask) < 0) { -+ eprintf("Un-blocking signals failed.\n"); -+ exit(-1); -+ } -+} -+ - static void alarmSignal(int sig) { - (void)sig; - } -@@ -201,10 +237,13 @@ static int clearMtab (const char* mount_ - if (!numEntries) - return 0; /* don't waste time ! */ - -+ block_sigs(); -+ - while ((fd = open(MOUNTED "~", O_RDWR | O_CREAT | O_EXCL, 0600)) == -1) { - struct timespec tm; - - if (errno != EEXIST || retries == 0) { -+ unblock_sigs(); - eprintf(_("Can't get %s~ lock file: %s\n"), MOUNTED, strerror(errno)); - return 1; - } -@@ -215,6 +254,7 @@ static int clearMtab (const char* mount_ - alarm(0); - close(fd); - if (err) { -+ unblock_sigs(); - eprintf(_("Can't lock lock file %s~: %s\n"), MOUNTED, _("Lock timed out")); - return 1; - } -@@ -232,9 +272,11 @@ static int clearMtab (const char* mount_ - err = __clearMtab(mount_points, numEntries); - - if ((unlink(MOUNTED "~") == -1) && (err == 0)){ -+ unblock_sigs(); - eprintf(_("Can't remove %s~"), MOUNTED); - return 1; - } -+ unblock_sigs(); - return err; - } - -@@ -422,13 +464,13 @@ do_umount(const char *mount_point) - int res; - - if (fid == -1) { -- eprintf(_("Could not open %s: %s\n"), -- mount_point, strerror(errno)); -+ eprintf(_("Invalid or unauthorized mountpoint %s\n"), -+ mount_point); - return -1; - } - if (ncp_get_mount_uid(fid, &mount_uid) != 0) { - close(fid); -- eprintf(_("%s probably not ncp-filesystem\n"), -+ eprintf(_("Invalid or unauthorized mountpoint %s\n"), - mount_point); - return -1; - } -@@ -591,7 +633,8 @@ main(int argc, char *argv[]) - int allConns = 0; - const char *serverName = NULL; - const char *treeName = NULL; -- uid_t uid = getuid(); -+ -+ uid = getuid(); - - progname = strrchr(argv[0], '/'); - if (progname) { diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-403.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-403.patch deleted file mode 100644 index 399daf1..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-403.patch +++ /dev/null @@ -1,21 +0,0 @@ -changeset: 403:08f41478a208 -user: Petr Vandrovec -date: Sun Apr 10 10:36:35 2005 +0000 -files: man/ncpmount.8 -description: -Change charset from iso-8859-1 to iso8859-1 in ncpmount manpage. - - -diff -r 722e35906cab -r 08f41478a208 man/ncpmount.8 ---- a/man/ncpmount.8 Thu Jan 27 16:35:36 2005 +0000 -+++ b/man/ncpmount.8 Sun Apr 10 10:36:35 2005 +0000 -@@ -282,7 +282,7 @@ You can specify character translation ru - You can specify character translation rules for converting names from - unicode to your desktop (it works together with \fB-p\fP). - .I iocharset --is charset name, for example \fIiso-8859-1\fP. -+is charset name, for example \fIiso8859-1\fP. - .RE - - .B -p - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-404.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-404.patch deleted file mode 100644 index 77a700b..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-404.patch +++ /dev/null @@ -1,691 +0,0 @@ -changeset: 404:fc77f4249198 -user: Scott Bentley -date: Wed May 11 20:46:55 2005 +0000 -files: BitKeeper/etc/ignore include/ncp/ncplib.h lib/filemgmt.c lib/libncp.vers lib/ltrace/ncplib.conf util/Makefile.in util/nwlistsalvage.c util/nwsalvage.c -description: -Add ncp_ns_scan_salvageable_file2 and ncp_ns_salvage_file to libncp. -Add nwlistsalvage and nwsalvage utilities. By Scott Bentley. - - -diff -r 08f41478a208 -r fc77f4249198 include/ncp/ncplib.h ---- a/include/ncp/ncplib.h Sun Apr 10 10:36:35 2005 +0000 -+++ b/include/ncp/ncplib.h Wed May 11 20:46:55 2005 +0000 -@@ -2,6 +2,7 @@ - ncplib.h - Copyright (C) 1995, 1996 by Volker Lendecke - Copyright (C) 1997-2001 Petr Vandrovec -+ Copyright (C) 2005 Scott Bentley - - 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 -@@ -51,6 +52,10 @@ - 1.05 2001, December 12 Hans Grobler - Added NCP_PERM_ALL, ncp_ns_delete_entry and full NET_ADDRESS_TYPE - definition. -+ -+ 1.06 2005, May Scott Bentley -+ Added ncp_ns_scan_salvageable_file2(). -+ Added ncp_ns_salvage_file(). - - */ - -@@ -1124,6 +1129,10 @@ ncp_ns_scan_salvageable_file(NWCONN_HAND - const unsigned char* encpath, int pathlen, - struct ncp_deleted_file* finfo, - char* retname, int retname_maxlen); -+ -+long -+ncp_ns_salvage_file(NWCONN_HANDLE conn, u_int8_t src_ns, const struct ncp_deleted_file* finfo, -+ const char* newfname); - - long - ncp_ns_purge_file(NWCONN_HANDLE conn, const struct ncp_deleted_file* finfo); -@@ -1341,6 +1350,17 @@ struct nw_info_struct3 { - size_t len; - void* data; - }; -+ -+long -+ncp_ns_scan_salvageable_file2(NWCONN_HANDLE conn, u_int8_t src_ns, -+ int dirstyle, u_int8_t vol_num, -+ u_int32_t dir_base, -+ const unsigned char* encpath, int pathlen, -+ struct ncp_deleted_file* finfo, -+ struct NSI_Change* dinfo,/* Defined above */ -+ u_int32_t rim, -+ void* target, size_t sizeoftarget); -+ - - struct ncp_dos_info_rights { - u_int16_t Grant; -diff -r 08f41478a208 -r fc77f4249198 lib/filemgmt.c ---- a/lib/filemgmt.c Sun Apr 10 10:36:35 2005 +0000 -+++ b/lib/filemgmt.c Wed May 11 20:46:55 2005 +0000 -@@ -3,6 +3,7 @@ - Copyright (C) 1995, 1996 by Volker Lendecke - Copyright (C) 1999-2001 Petr Vandrovec - Copyright (C) 1999 Roumen Petrov -+ Copyright (C) 2005 Scott Bentley - - 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 -@@ -70,6 +71,9 @@ - Added NULL parameter checks. - Added checks for legal reply sizes from server. - -+ 1.11 2005, May Scott Bentley -+ Added ncp_ns_scan_salvageable_file2. -+ Added ncp_ns_salvage_file. - */ - - #include "config.h" -@@ -1698,6 +1702,34 @@ quit:; - memcpy(name, ncp_reply_data(conn, 0x61), namelen); - name[namelen] = 0; - } -+ ncp_unlock_conn(conn); -+ return result; -+} -+ -+long -+ncp_ns_salvage_file(struct ncp_conn* conn, -+ u_int8_t src_ns, -+ const struct ncp_deleted_file* finfo, -+ const char* newfname) -+{ -+ long result; -+ -+ if (!finfo) { -+ return ERR_NULL_POINTER; -+ } -+ -+ ncp_init_request(conn); -+ ncp_add_byte(conn, 17); //subfunction: Recover Salvageable File -+ ncp_add_byte(conn, src_ns); //Namespace to use -+ ncp_add_byte(conn, 0); //Reserved -+ ncp_add_dword_lh(conn, finfo->seq);//File id -+ ncp_add_dword_lh(conn, finfo->vol);//Volume id -+ ncp_add_dword_lh(conn, finfo->base);//Directory id -+ ncp_add_pstring(conn, newfname); -+ -+ //ncp_add_pstring(conn, newfname);//Not used because it has 255 char limit -+ /* fn: 87 , subfn: 17 */ -+ result = ncp_request(conn, 87); - ncp_unlock_conn(conn); - return result; - } -@@ -2514,6 +2546,56 @@ static NWCCODE ncp_ns_extract_file_info( - dest); - } - return NWE_BUFFER_INVALID_LEN; -+} -+ -+long -+ncp_ns_scan_salvageable_file2(struct ncp_conn* conn, u_int8_t src_ns, -+ int dirstyle, -+ u_int8_t vol_num, u_int32_t dir_base, -+ const unsigned char *encpath, int pathlen, -+ struct ncp_deleted_file* finfo, -+ struct NSI_Change* dinfo, -+ u_int32_t rim, -+ void *target, size_t sizeoftarget) -+{ -+ long result; -+ NWCCODE err; -+ -+ ncp_init_request(conn); -+ ncp_add_byte(conn, 0x10); -+ ncp_add_byte(conn, src_ns); -+ ncp_add_byte(conn, 0); -+ ncp_add_dword_lh(conn, rim); -+ ncp_add_dword_lh(conn, finfo->seq); -+ result = ncp_add_handle_path2(conn, vol_num, dir_base, dirstyle, encpath, pathlen); -+ if (result) { -+ ncp_unlock_conn(conn); -+ return result; -+ } -+ result = ncp_request(conn, 0x57); -+ if (result) { -+ ncp_unlock_conn(conn); -+ return result; -+ } -+ if (conn->ncp_reply_size < 0x61) { -+ ncp_unlock_conn(conn); -+ return NWE_INVALID_NCP_PACKET_LENGTH; -+ } -+ -+ finfo->seq = ncp_reply_dword_lh(conn, 0x00); -+ finfo->vol = ncp_reply_dword_lh(conn, 0x0C); -+ finfo->base = ncp_reply_dword_lh(conn, 0x10); -+ -+ dinfo->Time = ncp_reply_word_lh(conn, 0x04); -+ dinfo->Date = ncp_reply_word_lh(conn, 0x06); -+ dinfo->ID = ncp_reply_dword_hl(conn, 0x08); -+ -+ err = ncp_ns_extract_file_info(NULL, rim, -+ ncp_reply_data(conn, 20), conn->ncp_reply_size - 20, -+ target, sizeoftarget); -+ -+ ncp_unlock_conn(conn); -+ return result; - } - - static const size_t field_sizes[32] = { -diff -r 08f41478a208 -r fc77f4249198 lib/libncp.vers ---- a/lib/libncp.vers Sun Apr 10 10:36:35 2005 +0000 -+++ b/lib/libncp.vers Wed May 11 20:46:55 2005 +0000 -@@ -617,3 +617,8 @@ NCPFS_2.2.4 { - NCPFS_2.2.4 { - ncp_change_job_position; - }; -+ -+NCPFS_2.2.7 { -+ ncp_ns_salvage_file; -+ ncp_ns_scan_salvageable_file2; -+}; -diff -r 08f41478a208 -r fc77f4249198 lib/ltrace/ncplib.conf ---- a/lib/ltrace/ncplib.conf Sun Apr 10 10:36:35 2005 +0000 -+++ b/lib/ltrace/ncplib.conf Wed May 11 20:46:55 2005 +0000 -@@ -94,6 +94,8 @@ int ncp_get_effective_dir_rights(addr, a - int ncp_get_effective_dir_rights(addr, addr, addr); - int ncp_add_trustee_set(addr, uint, uint, uint, int, addr); - int ncp_ns_scan_salvageable_file(addr, uint, int, uint, uint, addr, uint, addr, addr, uint); -+int ncp_ns_scan_salvageable_file2(addr, uint, int, uint, uint, addr, int, addr, addr, uint, addr, uint); -+int ncp_ns_salvage_file(addr, uint, addr, addr); - int ncp_ns_purge_file(addr, addr); - int ncp_ns_get_full_name(addr, uint, uint, int, uint, uint, addr, uint, addr, uint); - int ncp_get_conn_type(addr); -diff -r 08f41478a208 -r fc77f4249198 util/Makefile.in ---- a/util/Makefile.in Sun Apr 10 10:36:35 2005 +0000 -+++ b/util/Makefile.in Wed May 11 20:46:55 2005 +0000 -@@ -22,7 +22,7 @@ O_USERUTILS = slist.o pqlist.o nwfsinfo. - pqstat.o nwpqjob.o nwbpcreate.o nwbprm.o nwbpvalues.o nwbpadd.o \ - nwbpset.o nwgrant.o nwrevoke.o nwuserlist.o nwauth.o \ - nwfstime.o nwvolinfo.o nwtrustee.o nwdir.o \ -- nwfsctrl.o nwpjmv.o -+ nwfsctrl.o nwpjmv.o nwsalvage.o nwlistsalvage.o - O_SBINUTILS = - ifeq ($(USE_KERNEL),1) - O_USERUTILS += ncopy.o nwtrustee2.o nwpurge.o nwrights.o -diff -r 08f41478a208 -r fc77f4249198 util/nwlistsalvage.c ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/util/nwlistsalvage.c Wed May 11 20:46:55 2005 +0000 -@@ -0,0 +1,302 @@ -+/* -+ nwlistsalvage.c - Utility to list information about salvageagle files -+ on NetWare volumes -+ Copyright (c) 2005 Scott Bentley -+ -+ 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 of the License, 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ -+ Revision history: -+ -+ 0.00 2005 Scott Bentley -+ Initial revision. -+ */ -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include "private/libintl.h" -+#define _(X) gettext(X) -+ -+#ifdef N_PLAT_DOS -+#ifndef NTYPES_H -+typedef unsigned int nuint16; -+#endif -+typedef unsigned long nuint32; -+typedef unsigned int nuint; -+#else -+#endif -+ -+static inline size_t my_strftime(char *s, size_t max, const char *fmt, const struct tm *tm) { -+ return strftime(s, max, fmt, tm); -+} -+ -+static void doID(NWCONN_HANDLE conn, nuint32 id) { -+ NWCCODE err; -+ char user[MAX_DN_BYTES]; -+ nuint16 type; -+ -+ if (!id) { -+ printf(_("Nobody")); -+ } else { -+#ifdef N_PLAT_DOS -+ id = ntohl(id); -+#endif -+ err = NWGetObjectName(conn, id, user, &type); -+ if (err) { -+ NWDSContextHandle ctx; -+ -+ sprintf(user, _("Unknown:N/A")); -+ err = NWDSCreateContextHandle(&ctx); -+ if (!err) { -+ NWDSAddConnection(ctx, conn); -+ err = NWDSMapIDToName(ctx, conn, id, user); -+ if (err) -+ sprintf(user, _("Unknown:<%s>"), strnwerror(err)); -+ NWDSFreeContext(ctx); -+ } -+ } else { -+ switch (type) { -+ case OT_USER: printf(_("User:"));break; -+ case OT_USER_GROUP: printf(_("Group:"));break; -+ case OT_FILE_SERVER:printf(_("FileServer:"));break; -+ default: printf(_("Unknown(%04X):"), type);break; -+ } -+ } -+ printf("%s", user); -+ } -+} -+ -+static void dodate(nuint date) { -+ static const time_t zero_time_t = 0; -+ struct tm* tm; -+ char text[100]; -+ -+ tm = gmtime(&zero_time_t); -+ tm->tm_year = (date>>9)+80; -+ tm->tm_mon = ((date>>5) & 0xF) - 1; -+ tm->tm_mday = date & 0x1F; -+ tm->tm_isdst = 0; -+ my_strftime(text, sizeof(text), "%x", tm); -+ printf("%s", text); -+} -+ -+static void dotime(nuint dtime) { -+ static const time_t zero_time_t = 0; -+ struct tm* tm; -+ char text[100]; -+ -+ tm = gmtime(&zero_time_t); -+ tm->tm_hour = dtime >> 11; -+ tm->tm_min = (dtime >> 5) & 0x3F; -+ tm->tm_sec = (dtime << 1) & 0x3F; -+ tm->tm_isdst = 0; -+ my_strftime(text, sizeof(text), "%X", tm); -+ printf("%s", text); -+} -+ -+static void dodatesTimesID(NWCONN_HANDLE conn, nuint dtime, nuint date, nuint32 id) { -+ if (dtime || date) { -+ dodate(date); -+ printf(" "); -+ dotime(dtime); -+ } else { -+ printf("%-17s", _("never")); -+ } -+ if (id) { -+ printf("%10s",""); -+ doID(conn, id); -+ } -+ printf("\n"); -+} -+ -+static void usage(void) { -+ printf(_( -+"usage: nwlistsalvage [options] [directory]\n" -+"\n" -+"-h Print this help text\n" -+"-n Namespace for file access.\n" -+" DOS\n" -+" LONG - Default\n" -+" MAC\n" -+" NFS\n" -+" FTAM\n" -+"-v Verbose\n" -+"\n" -+"directory Directory to examine for salvageable files. Default is ./\n" -+"\n" -+)); -+} -+ -+static int g_verbose = 0; -+static int g_files = 0; -+static int g_nwns = NW_NS_LONG; -+ -+static void print_file_info(NWCONN_HANDLE conn, const struct ncp_deleted_file info, const struct NSI_Change deleted, const struct nw_info_struct3* vinfo) { -+ NWCCODE err; -+ struct NSI_Attributes attr; -+ struct NSI_Name name; -+ struct NSI_Modify modify; -+ struct NSI_Change created; -+ const char* type; -+ -+ //Get attributes -+ err = ncp_ns_extract_info_field(vinfo,NSIF_ATTRIBUTES,&attr,sizeof(attr)); -+ if (err) { -+ printf("Cannot retrieve file attributes: %s\n",strnwerror(err)); -+ return; -+ } -+ if (attr.Attributes & A_DIRECTORY) { -+ type = "D"; -+ } else { -+ type = "F"; -+ } -+ -+ //Get name -+ err = ncp_ns_extract_info_field(vinfo,NSIF_NAME,&name,sizeof(name)); -+ if (err) { -+ printf(_("Cannot retrieve file name: %s\n"),strnwerror(err)); -+ return; -+ } -+ -+ // Show standard set of info -+ printf("%2s%s %d %s\n", "", type, info.seq, name.Name); -+ -+ // Show verbose info -+ if(g_verbose) { -+ printf("%5sDeleted:\t\t",""); -+ dodatesTimesID(conn,deleted.Time,deleted.Date,deleted.ID); -+ -+ printf("%5sCreated:\t\t",""); -+ err = ncp_ns_extract_info_field(vinfo,NSIF_CREATION,&created,sizeof(created)); -+ if (err) { -+ printf(_("Cannot retrieve creation info: %s\n"),strnwerror(err)); -+ return; -+ } else { -+ dodatesTimesID(conn,created.Time,created.Date,created.ID); -+ } -+ -+ printf("%5sLast Modified:\t",""); -+ err = ncp_ns_extract_info_field(vinfo,NSIF_MODIFY,&modify,sizeof(modify)); -+ if (err) { -+ printf(_("Cannot retrieve modified info: %s\n"),strnwerror(err)); -+ return; -+ } else { -+ dodatesTimesID(conn,modify.Modify.Time,modify.Modify.Date,modify.Modify.ID); -+ } -+ } -+} -+ -+static void list_salvageable_files(struct ncp_conn* conn, int volume, u_int32_t directory_id) { -+ struct ncp_deleted_file info;//file info -+ struct nw_info_struct3 vinfo;//verbose file info -+ struct NSI_Change deleted; -+ -+ vinfo.len =0; -+ vinfo.data = NULL; -+ -+ info.seq = -1;//Initialize the file id to start with first file -+ while (!ncp_ns_scan_salvageable_file2(conn, g_nwns, -+ 1, volume, directory_id, NULL, 0, -+ &info, &deleted, -+ IM_ALL, &vinfo, sizeof(vinfo) -+ )) { -+ -+ print_file_info(conn,info,deleted,&vinfo); -+ -+ vinfo.len = 0; -+ free(vinfo.data); -+ vinfo.data = NULL; -+ -+ g_files++; -+ } -+ printf("\n"); -+} -+ -+int main(int argc, char* argv[]) { -+ struct NWCCRootEntry root; -+ const char* mount_path; -+ const char* opt_n; -+ struct ncp_conn* conn; -+ int err; -+ int c; -+ -+ setlocale(LC_ALL, ""); -+ bindtextdomain(NCPFS_PACKAGE, LOCALEDIR); -+ textdomain(NCPFS_PACKAGE); -+ -+ while ((c = getopt(argc, argv, "hnv")) != -1) { -+ switch (c) { -+ case '?': -+ case ':': -+ case 'h':usage(); exit(2); -+ case 'n': -+ opt_n = argv[optind++]; -+ if (strcasecmp(opt_n, "DOS") == 0) { -+ g_nwns = NW_NS_DOS; -+ } else if (strcasecmp(opt_n, "MAC") == 0) { -+ g_nwns = NW_NS_MAC; -+ } else if (strcasecmp(opt_n, "NFS") == 0) { -+ g_nwns = NW_NS_NFS; -+ } else if (strcasecmp(opt_n, "FTAM") == 0) { -+ g_nwns = NW_NS_FTAM; -+ } else if (strcasecmp(opt_n, "LONG") == 0) { -+ g_nwns = NW_NS_LONG; -+ } else { -+ fprintf(stderr, _("Unrecognized namespace for option '-%c'\n"), c); -+ exit(1); -+ } -+ break; -+ case 'v':g_verbose = 1; -+ break; -+ default: fprintf(stderr, _("Unexpected option `-%c'\n"), c); -+ break; -+ } -+ } -+ if (optind < argc) { -+ mount_path = argv[optind++]; -+ } else { -+ mount_path = "."; -+ } -+ err = ncp_open_mount(mount_path, &conn); -+ if (err) { -+ com_err("nwlistsalvage", err, _("in ncp_open_mount")); -+ exit(1); -+ } -+ err = NWCCGetConnInfo(conn, NWCC_INFO_ROOT_ENTRY, sizeof(root), &root); -+ if (err) { -+ com_err("nwlistsalvage", err, _("when retrieving root entry")); -+ ncp_close(conn); -+ return 0; -+ } -+ -+ list_salvageable_files(conn, root.volume, root.dirEnt); -+ -+ if (!g_files) { -+ printf(_("No salvageable files were found.\n")); -+ } else if (g_files == 1) { -+ printf(_("1 salvageable file was found.\n")); -+ } else { -+ printf(_("%d salvageable files were found.\n"), g_files); -+ } -+ -+ ncp_close(conn); -+ return 0; -+} -+ -diff -r 08f41478a208 -r fc77f4249198 util/nwsalvage.c ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/util/nwsalvage.c Wed May 11 20:46:55 2005 +0000 -@@ -0,0 +1,171 @@ -+/* -+ nwsalvage.c - Utility for salvaging deleted files from NetWare volumes -+ Copyright (c) 2005 Scott Bentley -+ -+ 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 of the License, 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ -+ Revision history: -+ -+ 0.00 2005 Scott Bentley -+ Initial revision. -+ */ -+ -+#include -+#include -+#include -+#include -+ -+#include "private/libintl.h" -+#define _(X) gettext(X) -+ -+static void usage(void) { -+ printf(_( -+"usage: nwsalvage [options] directory file_id\n" -+"\n" -+"-h Print this help text.\n" -+"-s Silent mode.\n" -+"-n Namespace for accessing files\n" -+" DOS\n" -+" LONG - Default\n" -+" MAC\n" -+" FTAM\n" -+" NFS\n" -+"\n" -+"directory Directory in which salvageable file(s) resides.\n" -+" Default is current directory.\n" -+"\n" -+"file_id The file identified by file_id will be salvaged.\n" -+" Numeric file_id is obtained from nwlistsalvage.\n" -+"\n" -+)); -+} -+ -+static int g_silent = 0; -+static int g_nwns = NW_NS_LONG; -+ -+static void process_salvage(struct ncp_conn* conn, int volume, u_int32_t directory_id, int file_id) { -+ struct ncp_deleted_file info; -+ int found; -+ char dirname[1024]; -+ char filename[1024]; -+ char name[1024]; -+ -+ if (!ncp_ns_get_full_name(conn, g_nwns, g_nwns, -+ 1, volume, directory_id, NULL, 0, -+ dirname, sizeof(dirname))) { -+ } -+ strcat(dirname,"/"); -+ -+ NWCCODE err; -+ -+ found = 0; -+ info.seq = -1; -+ while (!ncp_ns_scan_salvageable_file(conn, g_nwns, -+ 1, volume, directory_id, NULL, 0, -+ &info, filename, sizeof(filename))){ -+ -+ strcpy(name,dirname); -+ strcat(name,filename); -+ -+ if (info.seq == file_id) { -+ found++; -+ if ((err = ncp_ns_salvage_file(conn, g_nwns, &info, name)) != 0) { -+ if (!g_silent) { -+ if (err == 0x89FE) { -+ printf(_("%8s%d -- failed (File already exists, or path inaccessible)\n"), "", info.seq); -+ } else { -+ printf(_("%8s%d %s -- failed (%s)\n"), "", info.seq, name, strnwerror(err)); -+ } -+ } -+ } else { -+ if (!g_silent) { -+ printf(_("%8s%d %s -- salvaged \n"), "", info.seq, name); -+ } -+ } -+ break; -+ } -+ } -+ if (!found) { -+ printf(_("%8sFile with scan ID '%d' was not found in directory '%s'."), "", file_id, dirname); -+ } -+ printf("\n"); -+} -+ -+int main(int argc, char* argv[]) { -+ struct NWCCRootEntry root; -+ const char* mount_path; -+ int file_id; -+ struct ncp_conn* conn; -+ int err; -+ int c; -+ char* opt_n; -+ -+ setlocale(LC_ALL, ""); -+ bindtextdomain(NCPFS_PACKAGE, LOCALEDIR); -+ textdomain(NCPFS_PACKAGE); -+ -+ while ((c = getopt(argc, argv, "hsn")) != -1) { -+ switch (c) { -+ case '?': -+ case ':':break; -+ case 'h':usage(); exit(2); -+ case 's':g_silent=1; -+ break; -+ case 'n': -+ opt_n = argv[optind++]; -+ if (strcasecmp(opt_n, "DOS") == 0) { -+ g_nwns = NW_NS_DOS; -+ } else if (strcasecmp(opt_n, "MAC") == 0) { -+ g_nwns = NW_NS_MAC; -+ } else if (strcasecmp(opt_n, "NFS") == 0) { -+ g_nwns = NW_NS_NFS; -+ } else if (strcasecmp(opt_n, "FTAM") == 0) { -+ g_nwns = NW_NS_FTAM; -+ } else if (strcasecmp(opt_n, "LONG") == 0) { -+ g_nwns = NW_NS_LONG; -+ } else { -+ fprintf(stderr, _("Unrecognized namespace for option '-%c'\n"), c); -+ exit(1); -+ } -+ break; -+ default: fprintf(stderr, _("Unexpected option `-%c'\n"), c); -+ break; -+ } -+ } -+ if (optind < argc) { -+ mount_path = argv[optind++]; -+ file_id = atoi(argv[optind++]); -+ } else { -+ usage(); -+ exit(2); -+ } -+ err = ncp_open_mount(mount_path, &conn); -+ if (err) { -+ com_err("nwsalvage", err, _("in ncp_open_mount")); -+ exit(1); -+ } -+ err = NWCCGetConnInfo(conn, NWCC_INFO_ROOT_ENTRY, sizeof(root), &root); -+ if (err) { -+ com_err("nwsalvage", err, _("when retrieving root entry")); -+ ncp_close(conn); -+ return 0; -+ } -+ -+ process_salvage(conn, root.volume, root.dirEnt, file_id); -+ -+ ncp_close(conn); -+ return 0; -+} -+ - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-405.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-405.patch deleted file mode 100644 index 2cdef47..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-405.patch +++ /dev/null @@ -1,133 +0,0 @@ -changeset: 405:8aededcd3e6a -user: Scott Bentley -date: Sun May 22 23:35:00 2005 +0000 -files: man/Makefile.in man/nwlistsalvage.1 man/nwsalvage.1 -description: -Add nwsalvage and nwlistsalvage manpages. - - -diff -r fc77f4249198 -r 8aededcd3e6a man/Makefile.in ---- a/man/Makefile.in Wed May 11 20:46:55 2005 +0000 -+++ b/man/Makefile.in Sun May 22 23:35:00 2005 +0000 -@@ -16,7 +16,8 @@ MAN1 := nprint.1 nsend.1 nwauth.1 nwbols - MAN1 := nprint.1 nsend.1 nwauth.1 nwbols.1 nwboprops.1 nwbpset.1 \ - nwbpvalues.1 nwdir.1 nwfsinfo.1 nwfstime.1 nwpasswd.1 nwpurge.1 \ - nwrights.1 nwsfind.1 nwtrustee.1 nwuserlist.1 nwvolinfo.1 pqlist.1 \ -- nwpqjob.1 pqstat.1 pserver.1 slist.1 nwpjmv.1 -+ nwpqjob.1 pqstat.1 pserver.1 slist.1 nwpjmv.1 \ -+ nwsalvage.1 nwlistsalvage.1 - MAN3 := $(notdir $(wildcard ${this_srcdir}/*.3ncp)) - MAN5 := nwclient.5 - MAN8 := nwbocreate.8 nwborm.8 nwbpadd.8 nwbpcreate.8 nwbprm.8 nwfsctrl.8 \ -diff -r fc77f4249198 -r 8aededcd3e6a man/nwlistsalvage.1 ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/man/nwlistsalvage.1 Sun May 22 23:35:00 2005 +0000 -@@ -0,0 +1,49 @@ -+.TH NWLISTSALVAGE 1 11/05/2005 nwlistsalvage nwlistsalvage -+.SH NAME -+nwlistsalvage -+.SH SYNOPSIS -+.B nwlistsalvage -+[ \fB-h\fP ] [ \fB-n\fP \fInamespace\fP ] [ \fB-v\fP ] \fBdirectory\fP -+ -+.SH DESCRIPTION -+.B nwlistsalvage -+lists all salvageable files in the specified NetWare directory. -+ -+.SH OPTIONS -+ -+.B -h -+.RS 3 -+Print out a short help text. -+.RE -+ -+.B -n -+.RS 3 -+Specify a different NetWare file namespace. Possible options include DOS, -+MAC, NFS, FTAM, LONG. Default is LONG. -+.RE -+ -+.B -v -+.RS 3 -+List verbose file information. -+.RE -+ -+.B directory -+.RS 3 -+The directory to scan for salvageable files. Current -+working directory is used by default. You have to specify path in -+Linux format, not in NetWare format. -+.RE -+ -+.SH EXAMPLES -+ -+nwlistsalvage /mnt/NetWare/server/volume/directory/ -+ -+This example will return the file-type, file-id (see \fBnwsalvage\fP) -+and file-name of all salvageable files found in /mnt/NetWare/server/volume/directory/ -+ -+.SH AUTHORS -+nwlistsalvage was written by Scott Bentley. See the Changes file of ncpfs -+for other contributors. -+ -+.SH SEE ALSO -+nwsalvage -diff -r fc77f4249198 -r 8aededcd3e6a man/nwsalvage.1 ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/man/nwsalvage.1 Sun May 22 23:35:00 2005 +0000 -@@ -0,0 +1,54 @@ -+.TH NWSALVAGE 1 11/05/2005 nwsalvage nwsalvage -+.SH NAME -+nwsalvage -+.SH SYNOPSIS -+.B nwsalvage -+[ \fB-h\fP ] [ \fB-s\fP ] [ \fB-n\fP \fInamespace\fP ] [ \fBdirectory\fP ] [ \fBfile_id\fP ] -+ -+.SH DESCRIPTION -+.B nwsalvage -+recovers a file from the specified NetWare directory. -+ -+.SH OPTIONS -+ -+.B -h -+.RS 3 -+Print out a short help text. -+.RE -+ -+.B -n -+.RS 3 -+Specify a different NetWare file namespace. Possible options include DOS, -+MAC, NFS, FTAM, LONG. Default is LONG. -+.RE -+ -+.B -s -+.RS 3 -+Silent mode -+.RE -+ -+.B directory -+.RS 3 -+The directory from which the file to be salvaged was deleted. Current -+working directory is used by default. You have to specify path in -+Linux format, not in NetWare format. -+.RE -+ -+.B file_id -+.RS 3 -+The numeric file identifier specifying the file you want to salvage. -+This number is obtained from \fBnwlistsalvage\fP. -+ -+.SH EXAMPLES -+ -+nwsalvage /mnt/NetWare/server/volume/directory/ 123456 -+ -+With this example, the file identified by 123456 deleted from the -+directory /mnt/NetWare/server/volume/directory/ will be recovered. -+ -+.SH AUTHORS -+nwsalvage was written by Scott Bentley. See the Changes file of ncpfs -+for other contributors. -+ -+.SH SEE ALSO -+nwlistsalvage - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-406.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-406.patch deleted file mode 100644 index b387f1c..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-406.patch +++ /dev/null @@ -1,86 +0,0 @@ -changeset: 406:6af6a89be103 -user: Scott Bentley -date: Sun May 22 23:37:08 2005 +0000 -files: util/nwsalvage.c -description: -Do not use absolute path in nwsalvage. Salvage limits filename to -256 characters. - - -diff -r 8aededcd3e6a -r 6af6a89be103 util/nwsalvage.c ---- a/util/nwsalvage.c Sun May 22 23:35:00 2005 +0000 -+++ b/util/nwsalvage.c Sun May 22 23:37:08 2005 +0000 -@@ -23,7 +23,6 @@ - */ - - #include --#include - #include - #include - -@@ -58,15 +57,8 @@ static void process_salvage(struct ncp_c - static void process_salvage(struct ncp_conn* conn, int volume, u_int32_t directory_id, int file_id) { - struct ncp_deleted_file info; - int found; -- char dirname[1024]; -- char filename[1024]; -- char name[1024]; -- -- if (!ncp_ns_get_full_name(conn, g_nwns, g_nwns, -- 1, volume, directory_id, NULL, 0, -- dirname, sizeof(dirname))) { -- } -- strcat(dirname,"/"); -+ char oldfilename[256]; -+ char newfilename[256]; - - NWCCODE err; - -@@ -74,31 +66,29 @@ static void process_salvage(struct ncp_c - info.seq = -1; - while (!ncp_ns_scan_salvageable_file(conn, g_nwns, - 1, volume, directory_id, NULL, 0, -- &info, filename, sizeof(filename))){ -- -- strcpy(name,dirname); -- strcat(name,filename); -+ &info, oldfilename, sizeof(oldfilename))) { - - if (info.seq == file_id) { -+ strcpy(newfilename, oldfilename); - found++; -- if ((err = ncp_ns_salvage_file(conn, g_nwns, &info, name)) != 0) { -+ if ((err = ncp_ns_salvage_file(conn, g_nwns, &info, newfilename)) != 0) { - if (!g_silent) { - if (err == 0x89FE) { - printf(_("%8s%d -- failed (File already exists, or path inaccessible)\n"), "", info.seq); - } else { -- printf(_("%8s%d %s -- failed (%s)\n"), "", info.seq, name, strnwerror(err)); -+ printf(_("%8s%d %s -- failed (%s)\n"), "", info.seq, newfilename, strnwerror(err)); - } - } - } else { - if (!g_silent) { -- printf(_("%8s%d %s -- salvaged \n"), "", info.seq, name); -+ printf(_("%8s%d %s -- salvaged \n"), "", info.seq, newfilename); - } - } - break; - } - } - if (!found) { -- printf(_("%8sFile with scan ID '%d' was not found in directory '%s'."), "", file_id, dirname); -+ printf(_("%8sFile with scan ID '%d' was not found."), "", file_id); - } - printf("\n"); - } -@@ -121,7 +111,7 @@ int main(int argc, char* argv[]) { - case '?': - case ':':break; - case 'h':usage(); exit(2); -- case 's':g_silent=1; -+ case 's':g_silent = 1; - break; - case 'n': - opt_n = argv[optind++]; - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-407.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-407.patch deleted file mode 100644 index c03db9e..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-407.patch +++ /dev/null @@ -1,110 +0,0 @@ -changeset: 407:8a41f32f7288 -user: Scott Bentley -date: Sun May 22 23:50:08 2005 +0000 -files: util/nwsalvage.c -description: -Add `-r' option for renaming file while salvaging it. - - -diff -r 6af6a89be103 -r 8a41f32f7288 util/nwsalvage.c ---- a/util/nwsalvage.c Sun May 22 23:37:08 2005 +0000 -+++ b/util/nwsalvage.c Sun May 22 23:50:08 2005 +0000 -@@ -35,14 +35,15 @@ static void usage(void) { - "\n" - "-h Print this help text.\n" - "-s Silent mode.\n" --"-n Namespace for accessing files\n" -+"-n Namespace for accessing files.\n" - " DOS\n" - " LONG - Default\n" - " MAC\n" - " FTAM\n" - " NFS\n" -+"-r Rename the salvaged file. 255 chars max." - "\n" --"directory Directory in which salvageable file(s) resides.\n" -+"directory Directory in which salvageable file resides.\n" - " Default is current directory.\n" - "\n" - "file_id The file identified by file_id will be salvaged.\n" -@@ -52,13 +53,14 @@ static void usage(void) { - } - - static int g_silent = 0; -+static int g_rename = 0; -+static char* g_newname; - static int g_nwns = NW_NS_LONG; - - static void process_salvage(struct ncp_conn* conn, int volume, u_int32_t directory_id, int file_id) { - struct ncp_deleted_file info; - int found; -- char oldfilename[256]; -- char newfilename[256]; -+ char filename[256]; - - NWCCODE err; - -@@ -66,22 +68,26 @@ static void process_salvage(struct ncp_c - info.seq = -1; - while (!ncp_ns_scan_salvageable_file(conn, g_nwns, - 1, volume, directory_id, NULL, 0, -- &info, oldfilename, sizeof(oldfilename))) { -+ &info, filename, sizeof(filename))) { - - if (info.seq == file_id) { -- strcpy(newfilename, oldfilename); - found++; -- if ((err = ncp_ns_salvage_file(conn, g_nwns, &info, newfilename)) != 0) { -+ -+ if (g_rename) { -+ strcpy(filename, g_newname); -+ } -+ -+ if ((err = ncp_ns_salvage_file(conn, g_nwns, &info, filename)) != 0) { - if (!g_silent) { - if (err == 0x89FE) { - printf(_("%8s%d -- failed (File already exists, or path inaccessible)\n"), "", info.seq); - } else { -- printf(_("%8s%d %s -- failed (%s)\n"), "", info.seq, newfilename, strnwerror(err)); -+ printf(_("%8s%d %s -- failed (%s)\n"), "", info.seq, filename, strnwerror(err)); - } - } - } else { - if (!g_silent) { -- printf(_("%8s%d %s -- salvaged \n"), "", info.seq, newfilename); -+ printf(_("%8s%d %s -- salvaged \n"), "", info.seq, filename); - } - } - break; -@@ -101,12 +107,13 @@ int main(int argc, char* argv[]) { - int err; - int c; - char* opt_n; -+ char* opt_r; - - setlocale(LC_ALL, ""); - bindtextdomain(NCPFS_PACKAGE, LOCALEDIR); - textdomain(NCPFS_PACKAGE); - -- while ((c = getopt(argc, argv, "hsn")) != -1) { -+ while ((c = getopt(argc, argv, "hsnr")) != -1) { - switch (c) { - case '?': - case ':':break; -@@ -130,6 +137,15 @@ int main(int argc, char* argv[]) { - exit(1); - } - break; -+ case 'r': -+ opt_r = argv[optind++]; -+ if (strlen(opt_r) > 255 || strlen(opt_r) < 1) { -+ fprintf(stderr, _("Filename for option '-%c' has invalid length."), c); -+ exit(1); -+ } -+ g_rename = 1; -+ g_newname = opt_r; -+ break; - default: fprintf(stderr, _("Unexpected option `-%c'\n"), c); - break; - } - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-408.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-408.patch deleted file mode 100644 index 3b3e4b6..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-408.patch +++ /dev/null @@ -1,22 +0,0 @@ -changeset: 408:3ad605e1e151 -user: Petr Vandrovec -date: Sat May 28 13:36:26 2005 +0000 -files: contrib/php/php_auth_nds.c -description: -There are no localized strings in php_auth_nds, so no need for -including . - - -diff -r 8a41f32f7288 -r 3ad605e1e151 contrib/php/php_auth_nds.c ---- a/contrib/php/php_auth_nds.c Sun May 22 23:50:08 2005 +0000 -+++ b/contrib/php/php_auth_nds.c Sat May 28 13:36:26 2005 +0000 -@@ -110,8 +110,6 @@ for more examples see /contrib/php/site - #include - #include - #include --#include --#define _(X) gettext(X) - - static int is_member_of_group_bind( char* errstr,NWCONN_HANDLE conn,const char* user,const char* group) { - int err; - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-409.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-409.patch deleted file mode 100644 index 489fb86..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-409.patch +++ /dev/null @@ -1,186 +0,0 @@ -changeset: 409:0cc3f7f08de0 -user: Petr Vandrovec -date: Sat May 28 13:38:37 2005 +0000 -files: mkinstalldirs -description: -New mkinstalldirs. - - -diff -r 3ad605e1e151 -r 0cc3f7f08de0 mkinstalldirs ---- a/mkinstalldirs Sat May 28 13:36:26 2005 +0000 -+++ b/mkinstalldirs Sat May 28 13:38:37 2005 +0000 -@@ -1,40 +1,150 @@ - #! /bin/sh - # mkinstalldirs --- make directory hierarchy --# Author: Noah Friedman -+ -+scriptversion=2004-02-15.20 -+ -+# Original author: Noah Friedman - # Created: 1993-05-16 --# Public domain -- --# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $ -+# Public domain. -+# -+# This file is maintained in Automake, please report -+# bugs to or send patches to -+# . - - errstatus=0 -+dirmode="" -+ -+usage="\ -+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... -+ -+Create each directory DIR (with mode MODE, if specified), including all -+leading file name components. -+ -+Report bugs to ." -+ -+# process command line arguments -+while test $# -gt 0 ; do -+ case $1 in -+ -h | --help | --h*) # -h for help -+ echo "$usage" -+ exit 0 -+ ;; -+ -m) # -m PERM arg -+ shift -+ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } -+ dirmode=$1 -+ shift -+ ;; -+ --version) -+ echo "$0 $scriptversion" -+ exit 0 -+ ;; -+ --) # stop option processing -+ shift -+ break -+ ;; -+ -*) # unknown option -+ echo "$usage" 1>&2 -+ exit 1 -+ ;; -+ *) # first non-opt arg -+ break -+ ;; -+ esac -+done - - for file - do -- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` -- shift -+ if test -d "$file"; then -+ shift -+ else -+ break -+ fi -+done - -- pathcomp= -- for d -- do -- pathcomp="$pathcomp$d" -- case "$pathcomp" in -- -* ) pathcomp=./$pathcomp ;; -- esac -+case $# in -+ 0) exit 0 ;; -+esac - -- if test ! -d "$pathcomp"; then -- echo "mkdir $pathcomp" -+# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and -+# mkdir -p a/c at the same time, both will detect that a is missing, -+# one will create a, then the other will try to create a and die with -+# a "File exists" error. This is a problem when calling mkinstalldirs -+# from a parallel make. We use --version in the probe to restrict -+# ourselves to GNU mkdir, which is thread-safe. -+case $dirmode in -+ '') -+ if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then -+ echo "mkdir -p -- $*" -+ exec mkdir -p -- "$@" -+ else -+ # On NextStep and OpenStep, the `mkdir' command does not -+ # recognize any option. It will interpret all options as -+ # directories to create, and then abort because `.' already -+ # exists. -+ test -d ./-p && rmdir ./-p -+ test -d ./--version && rmdir ./--version -+ fi -+ ;; -+ *) -+ if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && -+ test ! -d ./--version; then -+ echo "mkdir -m $dirmode -p -- $*" -+ exec mkdir -m "$dirmode" -p -- "$@" -+ else -+ # Clean up after NextStep and OpenStep mkdir. -+ for d in ./-m ./-p ./--version "./$dirmode"; -+ do -+ test -d $d && rmdir $d -+ done -+ fi -+ ;; -+esac - -- mkdir "$pathcomp" || lasterr=$? -+for file -+do -+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` -+ shift - -- if test ! -d "$pathcomp"; then -- errstatus=$lasterr -- fi -- fi -+ pathcomp= -+ for d -+ do -+ pathcomp="$pathcomp$d" -+ case $pathcomp in -+ -*) pathcomp=./$pathcomp ;; -+ esac - -- pathcomp="$pathcomp/" -- done -+ if test ! -d "$pathcomp"; then -+ echo "mkdir $pathcomp" -+ -+ mkdir "$pathcomp" || lasterr=$? -+ -+ if test ! -d "$pathcomp"; then -+ errstatus=$lasterr -+ else -+ if test ! -z "$dirmode"; then -+ echo "chmod $dirmode $pathcomp" -+ lasterr="" -+ chmod "$dirmode" "$pathcomp" || lasterr=$? -+ -+ if test ! -z "$lasterr"; then -+ errstatus=$lasterr -+ fi -+ fi -+ fi -+ fi -+ -+ pathcomp="$pathcomp/" -+ done - done - - exit $errstatus - --# mkinstalldirs ends here -+# Local Variables: -+# mode: shell-script -+# sh-indentation: 2 -+# eval: (add-hook 'write-file-hooks 'time-stamp) -+# time-stamp-start: "scriptversion=" -+# time-stamp-format: "%:y-%02m-%02d.%02H" -+# time-stamp-end: "$" -+# End: - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-410.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-410.patch deleted file mode 100644 index 171e50f..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-410.patch +++ /dev/null @@ -1,55 +0,0 @@ -changeset: 410:4216c218ee44 -user: Petr Vandrovec -date: Sat May 28 13:40:15 2005 +0000 -files: include/ncp/ncplib.h -description: -Prefer off_t over __off_t unless _FILE_OFFSET_BITS=64 is defined. Needed -for building on Darwin. - - -diff -r 0cc3f7f08de0 -r 4216c218ee44 include/ncp/ncplib.h ---- a/include/ncp/ncplib.h Sat May 28 13:38:37 2005 +0000 -+++ b/include/ncp/ncplib.h Sat May 28 13:40:15 2005 +0000 -@@ -94,6 +94,13 @@ typedef enum NET_ADDRESS_TYPE { - NT_URL = 13, - NT_COUNT = 14 - } NET_ADDRESS_TYPE; -+ -+#if !defined(_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64 -+typedef off_t ncp_off_t; -+#else -+/* Maintain unchanged ABI - these functions use 32bit off_t... */ -+typedef __off_t ncp_off_t; -+#endif - - #ifdef SWIG - /* ncp_off64_t is defined to double by Perl interface */ -@@ -872,11 +879,11 @@ long - #ifdef SWIG - long - ncp_read(NWCONN_HANDLE conn, const char fileHandle[6], -- __off_t offset, size_t count, char *RETBUFFER_LENPREV); -+ ncp_off_t offset, size_t count, char *RETBUFFER_LENPREV); - - long - ncp_write(NWCONN_HANDLE conn, const char fileHandle[6], -- __off_t offset, size_t IGNORE, const char *STRING_LENPREV); -+ ncp_off_t offset, size_t IGNORE, const char *STRING_LENPREV); - - long - ncp_copy_file(NWCONN_HANDLE conn, -@@ -889,11 +896,11 @@ long - #else - long - ncp_read(NWCONN_HANDLE conn, const char fileHandle[6], -- __off_t offset, size_t count, char *target); -+ ncp_off_t offset, size_t count, char *target); - - long - ncp_write(NWCONN_HANDLE conn, const char fileHandle[6], -- __off_t offset, size_t count, const char *source); -+ ncp_off_t offset, size_t count, const char *source); - - NWCCODE ncp_read64(NWCONN_HANDLE conn, const char fileHandle[6], - ncp_off64_t offset, size_t count, void *target, size_t *bytesread); - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-411.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-411.patch deleted file mode 100644 index bdea196..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-411.patch +++ /dev/null @@ -1,11057 +0,0 @@ -changeset: 411:e04165992166 -user: Petr Vandrovec -date: Sat May 28 13:45:22 2005 +0000 -files: include/private/libintl.h intl/ChangeLog intl/Makefile.in intl/VERSION intl/bindtextdom.c intl/config.charset intl/dcgettext.c intl/dcigettext.c intl/dcngettext.c intl/dgettext.c intl/dngettext.c intl/eval-plural.h intl/explodename.c intl/finddomain.c intl/gettext.c intl/gettextP.h intl/gmo.h intl/hash-string.h intl/intl-compat.c intl/l10nflist.c intl/langprefs.c intl/libgnuintl.h.in intl/loadinfo.h intl/loadmsgcat.c intl/localcharset.c intl/localcharset.h intl/locale.alias intl/localealias.c intl/localename.c intl/log.c intl/ngettext.c intl/plural-exp.c intl/plural-exp.h intl/plural.c intl/plural.y intl/printf-args.c intl/printf-args.h intl/printf-parse.c intl/printf-parse.h intl/printf.c intl/relocatable.c intl/relocatable.h intl/textdomain.c intl/vasnprintf.c intl/vasnprintf.h intl/vasnwprintf.h intl/wprintf-parse.h intl/xsize.h po/Makefile.in.in po/Makevars -description: -Update gettext to version 0.14.4. - - -diff -r 4216c218ee44 -r e04165992166 include/private/libintl.h ---- a/include/private/libintl.h Sat May 28 13:40:15 2005 +0000 -+++ b/include/private/libintl.h Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Convenience header for conditional use of GNU . -- Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. -+ Copyright (C) 1995-1998, 2000-2002, 2004 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -22,7 +22,7 @@ - #include "config.h" - - /* NLS can be disabled through the configure --disable-nls option. */ --#if ENABLE_NLS -+#if defined(ENABLE_NLS) && ENABLE_NLS - - /* Get declarations of GNU message catalog functions. */ - # include -@@ -37,6 +37,16 @@ - is OK. */ - #if defined(__sun) - # include -+#endif -+ -+/* Many header files from the libstdc++ coming with g++ 3.3 or newer include -+ , which chokes if dcgettext is defined as a macro. So include -+ it now, to make later inclusions of a NOP. */ -+#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) -+# include -+# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H -+# include -+# endif - #endif - - /* Disabled NLS. -diff -r 4216c218ee44 -r e04165992166 intl/ChangeLog ---- a/intl/ChangeLog Sat May 28 13:40:15 2005 +0000 -+++ b/intl/ChangeLog Sat May 28 13:45:22 2005 +0000 -@@ -1,4 +1,4 @@ 2002-08-06 GNU -+2005-04-11 GNU - -- * Version 0.11.5 released. -+ * Version 0.14.4 released. - -diff -r 4216c218ee44 -r e04165992166 intl/Makefile.in ---- a/intl/Makefile.in Sat May 28 13:40:15 2005 +0000 -+++ b/intl/Makefile.in Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ --# Makefile for directory with message catalog handling in GNU NLS Utilities. --# Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. -+# Makefile for directory with message catalog handling library of GNU gettext -+# Copyright (C) 1995-1998, 2000-2005 Free Software Foundation, Inc. - # - # This program is free software; you can redistribute it and/or modify it - # under the terms of the GNU Library General Public License as published -@@ -24,7 +24,7 @@ srcdir = @srcdir@ - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ - top_builddir = .. --VPATH = @srcdir@ -+VPATH = $(srcdir) - - prefix = @prefix@ - exec_prefix = @exec_prefix@ -@@ -40,7 +40,7 @@ INSTALL = @INSTALL@ - INSTALL = @INSTALL@ - INSTALL_DATA = @INSTALL_DATA@ - MKINSTALLDIRS = @MKINSTALLDIRS@ --mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac` -+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) - - l = @INTL_LIBTOOL_SUFFIX_PREFIX@ - -@@ -52,89 +52,205 @@ YFLAGS = --name-prefix=__gettext - YFLAGS = --name-prefix=__gettext - - DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \ ---DLIBDIR=\"$(libdir)\" -DIN_LIBINTL @DEFS@ -+-DLIBDIR=\"$(libdir)\" -DIN_LIBINTL \ -+-DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \ -+-Dset_relocation_prefix=libintl_set_relocation_prefix \ -+-Drelocate=libintl_relocate \ -+-DDEPENDS_ON_LIBICONV=1 @DEFS@ - CPPFLAGS = @CPPFLAGS@ - CFLAGS = @CFLAGS@ - LDFLAGS = @LDFLAGS@ -+LIBS = @LIBS@ - - COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) - --HEADERS = $(COMHDRS) libgnuintl.h loadinfo.h --COMHDRS = gmo.h gettextP.h hash-string.h plural-exp.h eval-plural.h os2compat.h --SOURCES = $(COMSRCS) intl-compat.c --COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \ --finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \ --explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \ --plural-exp.c localcharset.c localename.c osdep.c os2compat.c --OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \ --finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \ --explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \ --plural.$lo plural-exp.$lo localcharset.$lo localename.$lo osdep.$lo --GETTOBJS = intl-compat.$lo -+HEADERS = \ -+ gmo.h \ -+ gettextP.h \ -+ hash-string.h \ -+ loadinfo.h \ -+ plural-exp.h \ -+ eval-plural.h \ -+ localcharset.h \ -+ relocatable.h \ -+ xsize.h \ -+ printf-args.h printf-args.c \ -+ printf-parse.h wprintf-parse.h printf-parse.c \ -+ vasnprintf.h vasnwprintf.h vasnprintf.c \ -+ os2compat.h \ -+ libgnuintl.h.in -+SOURCES = \ -+ bindtextdom.c \ -+ dcgettext.c \ -+ dgettext.c \ -+ gettext.c \ -+ finddomain.c \ -+ loadmsgcat.c \ -+ localealias.c \ -+ textdomain.c \ -+ l10nflist.c \ -+ explodename.c \ -+ dcigettext.c \ -+ dcngettext.c \ -+ dngettext.c \ -+ ngettext.c \ -+ plural.y \ -+ plural-exp.c \ -+ localcharset.c \ -+ relocatable.c \ -+ langprefs.c \ -+ localename.c \ -+ log.c \ -+ printf.c \ -+ osdep.c \ -+ os2compat.c \ -+ intl-compat.c -+OBJECTS = \ -+ bindtextdom.$lo \ -+ dcgettext.$lo \ -+ dgettext.$lo \ -+ gettext.$lo \ -+ finddomain.$lo \ -+ loadmsgcat.$lo \ -+ localealias.$lo \ -+ textdomain.$lo \ -+ l10nflist.$lo \ -+ explodename.$lo \ -+ dcigettext.$lo \ -+ dcngettext.$lo \ -+ dngettext.$lo \ -+ ngettext.$lo \ -+ plural.$lo \ -+ plural-exp.$lo \ -+ localcharset.$lo \ -+ relocatable.$lo \ -+ langprefs.$lo \ -+ localename.$lo \ -+ log.$lo \ -+ printf.$lo \ -+ osdep.$lo \ -+ intl-compat.$lo - DISTFILES.common = Makefile.in \ - config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES) - DISTFILES.generated = plural.c - DISTFILES.normal = VERSION --DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc -+DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \ -+libgnuintl.h_vms Makefile.vms \ -+libgnuintl.h.msvc-static libgnuintl.h.msvc-shared README.woe32 Makefile.msvc - DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \ --COPYING.LIB-2 gettext.h libgettext.h plural-eval.c -+COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h -+ -+all: all-@USE_INCLUDED_LIBINTL@ -+all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed -+all-no: all-no-@BUILD_INCLUDED_LIBINTL@ -+all-no-yes: libgnuintl.$la -+all-no-no: -+ -+libintl.a libgnuintl.a: $(OBJECTS) -+ rm -f $@ -+ $(AR) cru $@ $(OBJECTS) -+ $(RANLIB) $@ -+ -+libintl.la libgnuintl.la: $(OBJECTS) -+ $(LIBTOOL) --mode=link \ -+ $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \ -+ $(OBJECTS) @LTLIBICONV@ @INTL_MACOSX_LIBS@ $(LIBS) -lc \ -+ -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \ -+ -rpath $(libdir) \ -+ -no-undefined - - # Libtool's library version information for libintl. - # Before making a gettext release, the gettext maintainer must change this - # according to the libtool documentation, section "Library interface versions". - # Maintainers of other packages that include the intl directory must *not* - # change these values. --LTV_CURRENT=4 --LTV_REVISION=0 --LTV_AGE=2 -+LTV_CURRENT=7 -+LTV_REVISION=3 -+LTV_AGE=4 - - .SUFFIXES: - .SUFFIXES: .c .y .o .lo .sin .sed -+ - .c.o: - $(COMPILE) $< --.c.lo: -- $(LIBTOOL) --mode=compile $(COMPILE) $< - - .y.c: - $(YACC) $(YFLAGS) --output $@ $< - rm -f $*.h - --.sin.sed: -- sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@ -- mv t-$@ $@ -- --INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I../include -- --all: all-@USE_INCLUDED_LIBINTL@ --all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed --all-no: all-no-@BUILD_INCLUDED_LIBINTL@ --all-no-yes: libgnuintl.$la --all-no-no: -- --libintl.a libgnuintl.a: $(OBJECTS) -- rm -f $@ -- $(AR) cru $@ $(OBJECTS) -- $(RANLIB) $@ -- --libintl.la libgnuintl.la: $(OBJECTS) -- $(LIBTOOL) --mode=link \ -- $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \ -- $(OBJECTS) @LTLIBICONV@ -lc \ -- -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \ -- -rpath $(libdir) \ -- -no-undefined -+bindtextdom.lo: $(srcdir)/bindtextdom.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c -+dcgettext.lo: $(srcdir)/dcgettext.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c -+dgettext.lo: $(srcdir)/dgettext.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c -+gettext.lo: $(srcdir)/gettext.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c -+finddomain.lo: $(srcdir)/finddomain.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c -+loadmsgcat.lo: $(srcdir)/loadmsgcat.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c -+localealias.lo: $(srcdir)/localealias.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c -+textdomain.lo: $(srcdir)/textdomain.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c -+l10nflist.lo: $(srcdir)/l10nflist.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c -+explodename.lo: $(srcdir)/explodename.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c -+dcigettext.lo: $(srcdir)/dcigettext.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c -+dcngettext.lo: $(srcdir)/dcngettext.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c -+dngettext.lo: $(srcdir)/dngettext.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c -+ngettext.lo: $(srcdir)/ngettext.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c -+plural.lo: $(srcdir)/plural.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c -+plural-exp.lo: $(srcdir)/plural-exp.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c -+localcharset.lo: $(srcdir)/localcharset.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c -+relocatable.lo: $(srcdir)/relocatable.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c -+langprefs.lo: $(srcdir)/langprefs.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/langprefs.c -+localename.lo: $(srcdir)/localename.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c -+log.lo: $(srcdir)/log.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c -+printf.lo: $(srcdir)/printf.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/printf.c -+osdep.lo: $(srcdir)/osdep.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c -+intl-compat.lo: $(srcdir)/intl-compat.c -+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c -+ -+ref-add.sed: $(srcdir)/ref-add.sin -+ sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed -+ mv t-ref-add.sed ref-add.sed -+ref-del.sed: $(srcdir)/ref-del.sin -+ sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed -+ mv t-ref-del.sed ref-del.sed -+ -+INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -+ -+libgnuintl.h: $(srcdir)/libgnuintl.h.in -+ sed -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \ -+ -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \ -+ -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \ -+ -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \ -+ < $(srcdir)/libgnuintl.h.in > libgnuintl.h - - libintl.h: libgnuintl.h -- cp $(srcdir)/libgnuintl.h libintl.h -- --charset.alias: config.charset -+ cp libgnuintl.h libintl.h -+ -+charset.alias: $(srcdir)/config.charset - $(SHELL) $(srcdir)/config.charset '@host@' > t-$@ - mv t-$@ $@ - - check: all -- --# This installation goal is only used in GNU gettext. Packages which --# only use the library should use install instead. - - # We must not install the libintl.h/libintl.a files if we are on a - # system which has the GNU gettext() function in its C library or in a -@@ -143,12 +259,31 @@ check: all - # package, you have to use `configure --with-included-gettext'. - install: install-exec install-data - install-exec: all -- if test "$(PACKAGE)" = "gettext" \ -- && test '@INTLOBJS@' = '$(GETTOBJS)'; then \ -+ if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ -+ && test '@USE_INCLUDED_LIBINTL@' = yes; then \ - $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ - $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \ - $(LIBTOOL) --mode=install \ - $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \ -+ if test "@RELOCATABLE@" = yes; then \ -+ dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \ -+ if test -n "$$dependencies"; then \ -+ rm -f $(DESTDIR)$(libdir)/libintl.la; \ -+ fi; \ -+ fi; \ -+ else \ -+ : ; \ -+ fi -+ if test "$(PACKAGE)" = "gettext-tools" \ -+ && test '@USE_INCLUDED_LIBINTL@' = no \ -+ && test @GLIBC2@ != no; then \ -+ $(mkinstalldirs) $(DESTDIR)$(libdir); \ -+ $(LIBTOOL) --mode=install \ -+ $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \ -+ rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \ -+ $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \ -+ $(LIBTOOL) --mode=uninstall \ -+ rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \ - else \ - : ; \ - fi -@@ -182,7 +317,7 @@ install-exec: all - : ; \ - fi - install-data: all -- if test "$(PACKAGE)" = "gettext"; then \ -+ if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ - $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \ - $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \ -@@ -209,9 +344,16 @@ install-strip: install - install-strip: install - - installdirs: -- if test "$(PACKAGE)" = "gettext" \ -- && test '@INTLOBJS@' = '$(GETTOBJS)'; then \ -+ if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ -+ && test '@USE_INCLUDED_LIBINTL@' = yes; then \ - $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ -+ else \ -+ : ; \ -+ fi -+ if test "$(PACKAGE)" = "gettext-tools" \ -+ && test '@USE_INCLUDED_LIBINTL@' = no \ -+ && test @GLIBC2@ != no; then \ -+ $(mkinstalldirs) $(DESTDIR)$(libdir); \ - else \ - : ; \ - fi -@@ -221,7 +363,7 @@ installdirs: - else \ - : ; \ - fi -- if test "$(PACKAGE)" = "gettext"; then \ -+ if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ - else \ - : ; \ -@@ -231,11 +373,18 @@ installcheck: - installcheck: - - uninstall: -- if test "$(PACKAGE)" = "gettext" \ -- && test '@INTLOBJS@' = '$(GETTOBJS)'; then \ -+ if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ -+ && test '@USE_INCLUDED_LIBINTL@' = yes; then \ - rm -f $(DESTDIR)$(includedir)/libintl.h; \ - $(LIBTOOL) --mode=uninstall \ - rm -f $(DESTDIR)$(libdir)/libintl.$la; \ -+ else \ -+ : ; \ -+ fi -+ if test "$(PACKAGE)" = "gettext-tools" \ -+ && test '@USE_INCLUDED_LIBINTL@' = no \ -+ && test @GLIBC2@ != no; then \ -+ rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \ - else \ - : ; \ - fi -@@ -265,7 +414,7 @@ uninstall: - else \ - : ; \ - fi -- if test "$(PACKAGE)" = "gettext"; then \ -+ if test "$(PACKAGE)" = "gettext-tools"; then \ - for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \ - rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ -@@ -273,20 +422,28 @@ uninstall: - : ; \ - fi - --info dvi: -- --$(OBJECTS): ../include/config.h libgnuintl.h --bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: gettextP.h gmo.h loadinfo.h --dcigettext.$lo: hash-string.h --explodename.$lo l10nflist.$lo: loadinfo.h --dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: plural-exp.h --dcigettext.$lo: eval-plural.h -+info dvi ps pdf html: -+ -+$(OBJECTS): $(top_builddir)/include/config.h libgnuintl.h -+bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h -+dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h -+explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h -+dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h -+dcigettext.$lo: $(srcdir)/eval-plural.h -+localcharset.$lo: $(srcdir)/localcharset.h -+localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h -+printf.$lo: $(srcdir)/printf-args.h $(srcdir)/printf-args.c $(srcdir)/printf-parse.h $(srcdir)/wprintf-parse.h $(srcdir)/xsize.h $(srcdir)/printf-parse.c $(srcdir)/vasnprintf.h $(srcdir)/vasnwprintf.h $(srcdir)/vasnprintf.c - - tags: TAGS - - TAGS: $(HEADERS) $(SOURCES) - here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) - -+ctags: CTAGS -+ -+CTAGS: $(HEADERS) $(SOURCES) -+ here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES) -+ - id: ID - - ID: $(HEADERS) $(SOURCES) -@@ -294,15 +451,15 @@ ID: $(HEADERS) $(SOURCES) - - - mostlyclean: -- rm -f *.a *.la *.o *.lo core core.* -- rm -f libintl.h charset.alias ref-add.sed ref-del.sed -+ rm -f *.a *.la *.o *.obj *.lo core core.* -+ rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed - rm -f -r .libs _libs - - clean: mostlyclean - - distclean: clean - rm -f Makefile ID TAGS -- if test "$(PACKAGE)" = gettext; then \ -+ if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \ - rm -f ChangeLog.inst $(DISTFILES.normal); \ - else \ - : ; \ -@@ -317,20 +474,26 @@ maintainer-clean: distclean - # other files which should not be distributed in other packages. - distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) - dist distdir: Makefile -- if test "$(PACKAGE)" = gettext; then \ -- additional="$(DISTFILES.gettext)"; \ -- else \ -- additional="$(DISTFILES.normal)"; \ -- fi; \ -- $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \ -- for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \ -- if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ -- cp -p $$dir/$$file $(distdir); \ -- done -- --Makefile: Makefile.in ../config.status -- cd .. \ -- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status -+ if test "$(PACKAGE)" = "gettext-tools"; then \ -+ : ; \ -+ else \ -+ if test "$(PACKAGE)" = "gettext-runtime"; then \ -+ additional="$(DISTFILES.gettext)"; \ -+ else \ -+ additional="$(DISTFILES.normal)"; \ -+ fi; \ -+ $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \ -+ for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \ -+ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ -+ cp -p $$dir/$$file $(distdir) || test $$file = Makefile.in || exit 1; \ -+ done; \ -+ fi -+ -+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -+ cd $(top_builddir) && $(SHELL) ./config.status -+# This would be more efficient, but doesn't work any more with autoconf-2.57, -+# when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used. -+# cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - - # Tell versions [3.59,3.63) of GNU make not to export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. -diff -r 4216c218ee44 -r e04165992166 intl/VERSION ---- a/intl/VERSION Sat May 28 13:40:15 2005 +0000 -+++ b/intl/VERSION Sat May 28 13:45:22 2005 +0000 -@@ -1,1 +1,1 @@ GNU gettext library from gettext-0.11.5 --GNU gettext library from gettext-0.11.5 -+GNU gettext library from gettext-0.14.4 -diff -r 4216c218ee44 -r e04165992166 intl/bindtextdom.c ---- a/intl/bindtextdom.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/bindtextdom.c Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Implementation of the bindtextdomain(3) function -- Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc. -+ Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -58,6 +58,11 @@ - - /* Contains the default location of the message catalogs. */ - extern const char _nl_default_dirname[]; -+#ifdef _LIBC -+extern const char _nl_default_dirname_internal[] attribute_hidden; -+#else -+# define INTUSE(name) name -+#endif - - /* List with bindings of specific domains. */ - extern struct binding *_nl_domain_bindings; -@@ -80,11 +85,6 @@ __libc_rwlock_define (extern, _nl_state_ - # define BINDTEXTDOMAIN libintl_bindtextdomain - # define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset - #endif -- --/* Prototypes for local functions. */ --static void set_binding_values PARAMS ((const char *domainname, -- const char **dirnamep, -- const char **codesetp)); - - /* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP - to be used for the DOMAINNAME message catalog. -@@ -93,10 +93,8 @@ static void set_binding_values PARAMS (( - If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither - modified nor returned. */ - static void --set_binding_values (domainname, dirnamep, codesetp) -- const char *domainname; -- const char **dirnamep; -- const char **codesetp; -+set_binding_values (const char *domainname, -+ const char **dirnamep, const char **codesetp) - { - struct binding *binding; - int modified; -@@ -146,8 +144,8 @@ set_binding_values (domainname, dirnamep - char *result = binding->dirname; - if (strcmp (dirname, result) != 0) - { -- if (strcmp (dirname, _nl_default_dirname) == 0) -- result = (char *) _nl_default_dirname; -+ if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0) -+ result = (char *) INTUSE(_nl_default_dirname); - else - { - #if defined _LIBC || defined HAVE_STRDUP -@@ -162,7 +160,7 @@ set_binding_values (domainname, dirnamep - - if (__builtin_expect (result != NULL, 1)) - { -- if (binding->dirname != _nl_default_dirname) -+ if (binding->dirname != INTUSE(_nl_default_dirname)) - free (binding->dirname); - - binding->dirname = result; -@@ -216,7 +214,7 @@ set_binding_values (domainname, dirnamep - { - /* Simply return the default values. */ - if (dirnamep) -- *dirnamep = _nl_default_dirname; -+ *dirnamep = INTUSE(_nl_default_dirname); - if (codesetp) - *codesetp = NULL; - } -@@ -238,11 +236,11 @@ set_binding_values (domainname, dirnamep - - if (dirname == NULL) - /* The default value. */ -- dirname = _nl_default_dirname; -+ dirname = INTUSE(_nl_default_dirname); - else - { -- if (strcmp (dirname, _nl_default_dirname) == 0) -- dirname = _nl_default_dirname; -+ if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0) -+ dirname = INTUSE(_nl_default_dirname); - else - { - char *result; -@@ -265,7 +263,7 @@ set_binding_values (domainname, dirnamep - } - else - /* The default value. */ -- new_binding->dirname = (char *) _nl_default_dirname; -+ new_binding->dirname = (char *) INTUSE(_nl_default_dirname); - - new_binding->codeset_cntr = 0; - -@@ -321,7 +319,7 @@ set_binding_values (domainname, dirnamep - if (0) - { - failed_codeset: -- if (new_binding->dirname != _nl_default_dirname) -+ if (new_binding->dirname != INTUSE(_nl_default_dirname)) - free (new_binding->dirname); - failed_dirname: - free (new_binding); -@@ -343,9 +341,7 @@ set_binding_values (domainname, dirnamep - /* Specify that the DOMAINNAME message catalog will be found - in DIRNAME rather than in the system locale data base. */ - char * --BINDTEXTDOMAIN (domainname, dirname) -- const char *domainname; -- const char *dirname; -+BINDTEXTDOMAIN (const char *domainname, const char *dirname) - { - set_binding_values (domainname, &dirname, NULL); - return (char *) dirname; -@@ -354,9 +350,7 @@ BINDTEXTDOMAIN (domainname, dirname) - /* Specify the character encoding in which the messages from the - DOMAINNAME message catalog will be returned. */ - char * --BIND_TEXTDOMAIN_CODESET (domainname, codeset) -- const char *domainname; -- const char *codeset; -+BIND_TEXTDOMAIN_CODESET (const char *domainname, const char *codeset) - { - set_binding_values (domainname, NULL, &codeset); - return (char *) codeset; -diff -r 4216c218ee44 -r e04165992166 intl/config.charset ---- a/intl/config.charset Sat May 28 13:40:15 2005 +0000 -+++ b/intl/config.charset Sat May 28 13:45:22 2005 +0000 -@@ -1,7 +1,7 @@ - #! /bin/sh - # Output a system dependent table of character encoding aliases. - # --# Copyright (C) 2000-2002 Free Software Foundation, Inc. -+# Copyright (C) 2000-2004 Free Software Foundation, Inc. - # - # This program is free software; you can redistribute it and/or modify it - # under the terms of the GNU Library General Public License as published -@@ -30,77 +30,77 @@ - # MIME charset name is preferred. - # The current list of GNU canonical charset names is as follows. - # --# name used by which systems a MIME name? --# ASCII, ANSI_X3.4-1968 glibc solaris freebsd --# ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes --# ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes --# ISO-8859-3 glibc solaris yes --# ISO-8859-4 osf solaris freebsd yes --# ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes --# ISO-8859-6 glibc aix hpux solaris yes --# ISO-8859-7 glibc aix hpux irix osf solaris yes --# ISO-8859-8 glibc aix hpux osf solaris yes --# ISO-8859-9 glibc aix hpux irix osf solaris yes --# ISO-8859-13 glibc --# ISO-8859-14 glibc --# ISO-8859-15 glibc aix osf solaris freebsd --# KOI8-R glibc solaris freebsd yes --# KOI8-U glibc freebsd yes --# KOI8-T glibc --# CP437 dos --# CP775 dos --# CP850 aix osf dos --# CP852 dos --# CP855 dos --# CP856 aix --# CP857 dos --# CP861 dos --# CP862 dos --# CP864 dos --# CP865 dos --# CP866 freebsd dos --# CP869 dos --# CP874 woe32 dos --# CP922 aix --# CP932 aix woe32 dos --# CP943 aix --# CP949 osf woe32 dos --# CP950 woe32 dos --# CP1046 aix --# CP1124 aix --# CP1125 dos --# CP1129 aix --# CP1250 woe32 --# CP1251 glibc woe32 --# CP1252 aix woe32 --# CP1253 woe32 --# CP1254 woe32 --# CP1255 glibc woe32 --# CP1256 woe32 --# CP1257 woe32 --# GB2312 glibc aix hpux irix solaris freebsd yes --# EUC-JP glibc aix hpux irix osf solaris freebsd yes --# EUC-KR glibc aix hpux irix osf solaris freebsd yes --# EUC-TW glibc aix hpux irix osf solaris --# BIG5 glibc aix hpux osf solaris freebsd yes --# BIG5-HKSCS glibc solaris --# GBK glibc aix osf solaris woe32 dos --# GB18030 glibc solaris --# SHIFT_JIS hpux osf solaris freebsd yes --# JOHAB glibc solaris woe32 --# TIS-620 glibc aix hpux osf solaris --# VISCII glibc yes --# TCVN5712-1 glibc --# GEORGIAN-PS glibc --# HP-ROMAN8 hpux --# HP-ARABIC8 hpux --# HP-GREEK8 hpux --# HP-HEBREW8 hpux --# HP-TURKISH8 hpux --# HP-KANA8 hpux --# DEC-KANJI osf --# DEC-HANYU osf --# UTF-8 glibc aix hpux osf solaris yes -+# name MIME? used by which systems -+# ASCII, ANSI_X3.4-1968 glibc solaris freebsd darwin -+# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd darwin -+# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd darwin -+# ISO-8859-3 Y glibc solaris -+# ISO-8859-4 Y osf solaris freebsd darwin -+# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd darwin -+# ISO-8859-6 Y glibc aix hpux solaris -+# ISO-8859-7 Y glibc aix hpux irix osf solaris darwin -+# ISO-8859-8 Y glibc aix hpux osf solaris -+# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin -+# ISO-8859-13 glibc darwin -+# ISO-8859-14 glibc -+# ISO-8859-15 glibc aix osf solaris freebsd darwin -+# KOI8-R Y glibc solaris freebsd darwin -+# KOI8-U Y glibc freebsd darwin -+# KOI8-T glibc -+# CP437 dos -+# CP775 dos -+# CP850 aix osf dos -+# CP852 dos -+# CP855 dos -+# CP856 aix -+# CP857 dos -+# CP861 dos -+# CP862 dos -+# CP864 dos -+# CP865 dos -+# CP866 freebsd darwin dos -+# CP869 dos -+# CP874 woe32 dos -+# CP922 aix -+# CP932 aix woe32 dos -+# CP943 aix -+# CP949 osf woe32 dos -+# CP950 woe32 dos -+# CP1046 aix -+# CP1124 aix -+# CP1125 dos -+# CP1129 aix -+# CP1250 woe32 -+# CP1251 glibc solaris darwin woe32 -+# CP1252 aix woe32 -+# CP1253 woe32 -+# CP1254 woe32 -+# CP1255 glibc woe32 -+# CP1256 woe32 -+# CP1257 woe32 -+# GB2312 Y glibc aix hpux irix solaris freebsd darwin -+# EUC-JP Y glibc aix hpux irix osf solaris freebsd darwin -+# EUC-KR Y glibc aix hpux irix osf solaris freebsd darwin -+# EUC-TW glibc aix hpux irix osf solaris -+# BIG5 Y glibc aix hpux osf solaris freebsd darwin -+# BIG5-HKSCS glibc solaris -+# GBK glibc aix osf solaris woe32 dos -+# GB18030 glibc solaris -+# SHIFT_JIS Y hpux osf solaris freebsd darwin -+# JOHAB glibc solaris woe32 -+# TIS-620 glibc aix hpux osf solaris -+# VISCII Y glibc -+# TCVN5712-1 glibc -+# GEORGIAN-PS glibc -+# HP-ROMAN8 hpux -+# HP-ARABIC8 hpux -+# HP-GREEK8 hpux -+# HP-HEBREW8 hpux -+# HP-TURKISH8 hpux -+# HP-KANA8 hpux -+# DEC-KANJI osf -+# DEC-HANYU osf -+# UTF-8 Y glibc aix hpux osf solaris darwin - # - # Note: Names which are not marked as being a MIME name should not be used in - # Internet protocols for information interchange (mail, news, etc.). -@@ -121,6 +121,105 @@ echo "# It was automatically generated f - # List of references, updated during installation: - echo "# Packages using this file: " - case "$os" in -+ linux-gnulibc1*) -+ # Linux libc5 doesn't have nl_langinfo(CODESET); therefore -+ # localcharset.c falls back to using the full locale name -+ # from the environment variables. -+ echo "C ASCII" -+ echo "POSIX ASCII" -+ for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \ -+ en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \ -+ en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \ -+ es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \ -+ et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \ -+ fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \ -+ it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \ -+ sv_FI sv_SE; do -+ echo "$l ISO-8859-1" -+ echo "$l.iso-8859-1 ISO-8859-1" -+ echo "$l.iso-8859-15 ISO-8859-15" -+ echo "$l.iso-8859-15@euro ISO-8859-15" -+ echo "$l@euro ISO-8859-15" -+ echo "$l.cp-437 CP437" -+ echo "$l.cp-850 CP850" -+ echo "$l.cp-1252 CP1252" -+ echo "$l.cp-1252@euro CP1252" -+ #echo "$l.atari-st ATARI-ST" # not a commonly used encoding -+ echo "$l.utf-8 UTF-8" -+ echo "$l.utf-8@euro UTF-8" -+ done -+ for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \ -+ sl_SI sr sr_CS sr_YU; do -+ echo "$l ISO-8859-2" -+ echo "$l.iso-8859-2 ISO-8859-2" -+ echo "$l.cp-852 CP852" -+ echo "$l.cp-1250 CP1250" -+ echo "$l.utf-8 UTF-8" -+ done -+ for l in mk mk_MK ru ru_RU; do -+ echo "$l ISO-8859-5" -+ echo "$l.iso-8859-5 ISO-8859-5" -+ echo "$l.koi8-r KOI8-R" -+ echo "$l.cp-866 CP866" -+ echo "$l.cp-1251 CP1251" -+ echo "$l.utf-8 UTF-8" -+ done -+ for l in ar ar_SA; do -+ echo "$l ISO-8859-6" -+ echo "$l.iso-8859-6 ISO-8859-6" -+ echo "$l.cp-864 CP864" -+ #echo "$l.cp-868 CP868" # not a commonly used encoding -+ echo "$l.cp-1256 CP1256" -+ echo "$l.utf-8 UTF-8" -+ done -+ for l in el el_GR gr gr_GR; do -+ echo "$l ISO-8859-7" -+ echo "$l.iso-8859-7 ISO-8859-7" -+ echo "$l.cp-869 CP869" -+ echo "$l.cp-1253 CP1253" -+ echo "$l.cp-1253@euro CP1253" -+ echo "$l.utf-8 UTF-8" -+ echo "$l.utf-8@euro UTF-8" -+ done -+ for l in he he_IL iw iw_IL; do -+ echo "$l ISO-8859-8" -+ echo "$l.iso-8859-8 ISO-8859-8" -+ echo "$l.cp-862 CP862" -+ echo "$l.cp-1255 CP1255" -+ echo "$l.utf-8 UTF-8" -+ done -+ for l in tr tr_TR; do -+ echo "$l ISO-8859-9" -+ echo "$l.iso-8859-9 ISO-8859-9" -+ echo "$l.cp-857 CP857" -+ echo "$l.cp-1254 CP1254" -+ echo "$l.utf-8 UTF-8" -+ done -+ for l in lt lt_LT lv lv_LV; do -+ #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name -+ echo "$l ISO-8859-13" -+ done -+ for l in ru_UA uk uk_UA; do -+ echo "$l KOI8-U" -+ done -+ for l in zh zh_CN; do -+ #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name -+ echo "$l GB2312" -+ done -+ for l in ja ja_JP ja_JP.EUC; do -+ echo "$l EUC-JP" -+ done -+ for l in ko ko_KR; do -+ echo "$l EUC-KR" -+ done -+ for l in th th_TH; do -+ echo "$l TIS-620" -+ done -+ for l in fa fa_IR; do -+ #echo "$l ISIRI-3342" # a broken encoding -+ echo "$l.utf-8 UTF-8" -+ done -+ ;; - linux* | *-gnu*) - # With glibc-2.1 or newer, we don't need any canonicalization, - # because glibc has iconv and both glibc and libiconv support all -@@ -231,6 +330,7 @@ case "$os" in - echo "ISO8859-9 ISO-8859-9" - echo "ISO8859-15 ISO-8859-15" - echo "koi8-r KOI8-R" -+ echo "ansi-1251 CP1251" - echo "BIG5 BIG5" - echo "Big5-HKSCS BIG5-HKSCS" - echo "gb2312 GB2312" -@@ -295,6 +395,77 @@ case "$os" in - echo "eucTW EUC-TW" - echo "BIG5 BIG5" - echo "SJIS SHIFT_JIS" -+ ;; -+ darwin[56]*) -+ # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore -+ # localcharset.c falls back to using the full locale name -+ # from the environment variables. -+ echo "C ASCII" -+ for l in en_AU en_CA en_GB en_US la_LN; do -+ echo "$l.US-ASCII ASCII" -+ done -+ for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ -+ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \ -+ nl_NL no_NO pt_PT sv_SE; do -+ echo "$l ISO-8859-1" -+ echo "$l.ISO8859-1 ISO-8859-1" -+ echo "$l.ISO8859-15 ISO-8859-15" -+ done -+ for l in la_LN; do -+ echo "$l.ISO8859-1 ISO-8859-1" -+ echo "$l.ISO8859-15 ISO-8859-15" -+ done -+ for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do -+ echo "$l.ISO8859-2 ISO-8859-2" -+ done -+ for l in la_LN lt_LT; do -+ echo "$l.ISO8859-4 ISO-8859-4" -+ done -+ for l in ru_RU; do -+ echo "$l.KOI8-R KOI8-R" -+ echo "$l.ISO8859-5 ISO-8859-5" -+ echo "$l.CP866 CP866" -+ done -+ for l in bg_BG; do -+ echo "$l.CP1251 CP1251" -+ done -+ echo "uk_UA.KOI8-U KOI8-U" -+ echo "zh_TW.BIG5 BIG5" -+ echo "zh_TW.Big5 BIG5" -+ echo "zh_CN.EUC GB2312" -+ echo "ja_JP.EUC EUC-JP" -+ echo "ja_JP.SJIS SHIFT_JIS" -+ echo "ko_KR.EUC EUC-KR" -+ ;; -+ darwin*) -+ # Darwin 7.5 has nl_langinfo(CODESET), but it is useless: -+ # - It returns the empty string when LANG is set to a locale of the -+ # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8 -+ # LC_CTYPE file. -+ # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by -+ # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case. -+ # - The documentation says: -+ # "... all code that calls BSD system routines should ensure -+ # that the const *char parameters of these routines are in UTF-8 -+ # encoding. All BSD system functions expect their string -+ # parameters to be in UTF-8 encoding and nothing else." -+ # It also says -+ # "An additional caveat is that string parameters for files, -+ # paths, and other file-system entities must be in canonical -+ # UTF-8. In a canonical UTF-8 Unicode string, all decomposable -+ # characters are decomposed ..." -+ # but this is not true: You can pass non-decomposed UTF-8 strings -+ # to file system functions, and it is the OS which will convert -+ # them to decomposed UTF-8 before accessing the file system. -+ # - The Apple Terminal application displays UTF-8 by default. -+ # - However, other applications are free to use different encodings: -+ # - xterm uses ISO-8859-1 by default. -+ # - TextEdit uses MacRoman by default. -+ # We prefer UTF-8 over decomposed UTF-8-MAC because one should -+ # minimize the use of decomposed Unicode. Unfortunately, through the -+ # Darwin file system, decomposed UTF-8 strings are leaked into user -+ # space nevertheless. -+ echo "* UTF-8" - ;; - beos*) - # BeOS has a single locale, and it has UTF-8 encoding. -@@ -409,6 +580,7 @@ case "$os" in - echo "sq CP852" - echo "sq_AL CP852" - echo "sr CP852" # CP852 or CP866 or CP855 ?? -+ echo "sr_CS CP852" # CP852 or CP866 or CP855 ?? - echo "sr_YU CP852" # CP852 or CP866 or CP855 ?? - # ISO-8859-3 languages - echo "mt CP850" -diff -r 4216c218ee44 -r e04165992166 intl/dcgettext.c ---- a/intl/dcgettext.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/dcgettext.c Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Implementation of the dcgettext(3) function. -- Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. -+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -44,10 +44,7 @@ - /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY - locale. */ - char * --DCGETTEXT (domainname, msgid, category) -- const char *domainname; -- const char *msgid; -- int category; -+DCGETTEXT (const char *domainname, const char *msgid, int category) - { - return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category); - } -diff -r 4216c218ee44 -r e04165992166 intl/dcigettext.c ---- a/intl/dcigettext.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/dcigettext.c Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Implementation of the internal dcigettext function. -- Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc. -+ Copyright (C) 1995-1999, 2000-2005 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -33,14 +33,19 @@ - # define alloca __builtin_alloca - # define HAVE_ALLOCA 1 - #else --# if defined HAVE_ALLOCA_H || defined _LIBC --# include -+# ifdef _MSC_VER -+# include -+# define alloca _alloca - # else --# ifdef _AIX -+# if defined HAVE_ALLOCA_H || defined _LIBC -+# include -+# else -+# ifdef _AIX - #pragma alloca --# else --# ifndef alloca -+# else -+# ifndef alloca - char *alloca (); -+# endif - # endif - # endif - # endif -@@ -143,13 +148,17 @@ char *getwd (); - char *getwd (); - # define getcwd(buf, max) getwd (buf) - # else -+# if VMS -+# define getcwd(buf, max) (getcwd) (buf, max, 0) -+# else - char *getcwd (); -+# endif - # endif - # ifndef HAVE_STPCPY --static char *stpcpy PARAMS ((char *dest, const char *src)); -+static char *stpcpy (char *dest, const char *src); - # endif - # ifndef HAVE_MEMPCPY --static void *mempcpy PARAMS ((void *dest, const void *src, size_t n)); -+static void *mempcpy (void *dest, const void *src, size_t n); - # endif - #endif - -@@ -191,8 +200,8 @@ static void *mempcpy PARAMS ((void *dest - it may be concatenated to a directory pathname. - IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. - */ --#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ -- /* Win32, OS/2, DOS */ -+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ -+ /* Win32, Cygwin, OS/2, DOS */ - # define ISSLASH(C) ((C) == '/' || (C) == '\\') - # define HAS_DEVICE(P) \ - ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ -@@ -243,11 +252,8 @@ static void *root; - # endif - - /* Function to compare two entries in the table of known translations. */ --static int transcmp PARAMS ((const void *p1, const void *p2)); - static int --transcmp (p1, p2) -- const void *p1; -- const void *p2; -+transcmp (const void *p1, const void *p2) - { - const struct known_translation_t *s1; - const struct known_translation_t *s2; -@@ -271,6 +277,13 @@ transcmp (p1, p2) - } - #endif - -+#ifndef INTVARDEF -+# define INTVARDEF(name) -+#endif -+#ifndef INTUSE -+# define INTUSE(name) name -+#endif -+ - /* Name of the default domain used for gettext(3) prior any call to - textdomain(3). The default value for this is "messages". */ - const char _nl_default_default_domain[] attribute_hidden = "messages"; -@@ -284,6 +297,7 @@ extern const char _nl_default_dirname[]; - extern const char _nl_default_dirname[]; - #else - const char _nl_default_dirname[] = LOCALEDIR; -+INTVARDEF (_nl_default_dirname) - #endif - - /* List with bindings of specific domains created by bindtextdomain() -@@ -291,15 +305,19 @@ struct binding *_nl_domain_bindings; - struct binding *_nl_domain_bindings; - - /* Prototypes for local functions. */ --static char *plural_lookup PARAMS ((struct loaded_l10nfile *domain, -- unsigned long int n, -- const char *translation, -- size_t translation_len)) -+static char *plural_lookup (struct loaded_l10nfile *domain, -+ unsigned long int n, -+ const char *translation, size_t translation_len) - internal_function; --static const char *category_to_name PARAMS ((int category)) internal_function; --static const char *guess_category_value PARAMS ((int category, -- const char *categoryname)) -+static const char *guess_category_value (int category, -+ const char *categoryname) - internal_function; -+#ifdef _LIBC -+# include "../locale/localeinfo.h" -+# define category_to_name(category) _nl_category_names[category] -+#else -+static const char *category_to_name (int category) internal_function; -+#endif - - - /* For those loosing systems which don't have `alloca' we have to add -@@ -406,13 +424,8 @@ static int enable_secure; - CATEGORY locale and, if PLURAL is nonzero, search over string - depending on the plural form determined by N. */ - char * --DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category) -- const char *domainname; -- const char *msgid1; -- const char *msgid2; -- int plural; -- unsigned long int n; -- int category; -+DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2, -+ int plural, unsigned long int n, int category) - { - #ifndef HAVE_ALLOCA - struct block_list *block_list = NULL; -@@ -437,6 +450,15 @@ DCIGETTEXT (domainname, msgid1, msgid2, - if (msgid1 == NULL) - return NULL; - -+#ifdef _LIBC -+ if (category < 0 || category >= __LC_LAST || category == LC_ALL) -+ /* Bogus. */ -+ return (plural == 0 -+ ? (char *) msgid1 -+ /* Use the Germanic plural rule. */ -+ : n == 1 ? (char *) msgid1 : (char *) msgid2); -+#endif -+ - __libc_rwlock_rdlock (_nl_state_lock); - - /* If DOMAINNAME is NULL, we are interested in the default domain. If -@@ -500,7 +522,7 @@ DCIGETTEXT (domainname, msgid1, msgid2, - } - - if (binding == NULL) -- dirname = (char *) _nl_default_dirname; -+ dirname = (char *) INTUSE(_nl_default_dirname); - else if (IS_ABSOLUTE_PATH (binding->dirname)) - dirname = binding->dirname; - else -@@ -528,17 +550,9 @@ DCIGETTEXT (domainname, msgid1, msgid2, - } - - if (ret == NULL) -- { -- /* We cannot get the current working directory. Don't signal an -- error but simply return the default string. */ -- FREE_BLOCKS (block_list); -- __libc_rwlock_unlock (_nl_state_lock); -- __set_errno (saved_errno); -- return (plural == 0 -- ? (char *) msgid1 -- /* Use the Germanic plural rule. */ -- : n == 1 ? (char *) msgid1 : (char *) msgid2); -- } -+ /* We cannot get the current working directory. Don't signal an -+ error but simply return the default string. */ -+ goto return_untranslated; - - stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname); - } -@@ -595,16 +609,7 @@ DCIGETTEXT (domainname, msgid1, msgid2, - domain. Return the MSGID. */ - if (strcmp (single_locale, "C") == 0 - || strcmp (single_locale, "POSIX") == 0) -- { -- FREE_BLOCKS (block_list); -- __libc_rwlock_unlock (_nl_state_lock); -- __set_errno (saved_errno); -- return (plural == 0 -- ? (char *) msgid1 -- /* Use the Germanic plural rule. */ -- : n == 1 ? (char *) msgid1 : (char *) msgid2); -- } -- -+ break; - - /* Find structure describing the message catalog matching the - DOMAINNAME and CATEGORY. */ -@@ -636,7 +641,6 @@ DCIGETTEXT (domainname, msgid1, msgid2, - /* Found the translation of MSGID1 in domain DOMAIN: - starting at RETVAL, RETLEN bytes. */ - FREE_BLOCKS (block_list); -- __set_errno (saved_errno); - #if defined HAVE_TSEARCH || defined _LIBC - if (foundp == NULL) - { -@@ -675,6 +679,8 @@ DCIGETTEXT (domainname, msgid1, msgid2, - (*foundp)->translation_length = retlen; - } - #endif -+ __set_errno (saved_errno); -+ - /* Now deal with plural. */ - if (plural) - retval = plural_lookup (domain, n, retval, retlen); -@@ -684,17 +690,37 @@ DCIGETTEXT (domainname, msgid1, msgid2, - } - } - } -- /* NOTREACHED */ -+ -+ return_untranslated: -+ /* Return the untranslated MSGID. */ -+ FREE_BLOCKS (block_list); -+ __libc_rwlock_unlock (_nl_state_lock); -+#ifndef _LIBC -+ if (!ENABLE_SECURE) -+ { -+ extern void _nl_log_untranslated (const char *logfilename, -+ const char *domainname, -+ const char *msgid1, const char *msgid2, -+ int plural); -+ const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED"); -+ -+ if (logfilename != NULL && logfilename[0] != '\0') -+ _nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural); -+ } -+#endif -+ __set_errno (saved_errno); -+ return (plural == 0 -+ ? (char *) msgid1 -+ /* Use the Germanic plural rule. */ -+ : n == 1 ? (char *) msgid1 : (char *) msgid2); - } - - - char * - internal_function --_nl_find_msg (domain_file, domainbinding, msgid, lengthp) -- struct loaded_l10nfile *domain_file; -- struct binding *domainbinding; -- const char *msgid; -- size_t *lengthp; -+_nl_find_msg (struct loaded_l10nfile *domain_file, -+ struct binding *domainbinding, const char *msgid, -+ size_t *lengthp) - { - struct loaded_domain *domain; - nls_uint32 nstrings; -@@ -1001,11 +1027,8 @@ _nl_find_msg (domain_file, domainbinding - /* Look up a plural variant. */ - static char * - internal_function --plural_lookup (domain, n, translation, translation_len) -- struct loaded_l10nfile *domain; -- unsigned long int n; -- const char *translation; -- size_t translation_len; -+plural_lookup (struct loaded_l10nfile *domain, unsigned long int n, -+ const char *translation, size_t translation_len) - { - struct loaded_domain *domaindata = (struct loaded_domain *) domain->data; - unsigned long int index; -@@ -1038,12 +1061,11 @@ plural_lookup (domain, n, translation, t - return (char *) p; - } - -- -+#ifndef _LIBC - /* Return string representation of locale CATEGORY. */ - static const char * - internal_function --category_to_name (category) -- int category; -+category_to_name (int category) - { - const char *retval; - -@@ -1098,34 +1120,52 @@ category_to_name (category) - - return retval; - } -- --/* Guess value of current locale from value of the environment variables. */ -+#endif -+ -+/* Guess value of current locale from value of the environment variables -+ or system-dependent defaults. */ - static const char * - internal_function --guess_category_value (category, categoryname) -- int category; -- const char *categoryname; -+guess_category_value (int category, const char *categoryname) - { - const char *language; -- const char *retval; -- -- /* The highest priority value is the `LANGUAGE' environment -- variable. But we don't use the value if the currently selected -- locale is the C locale. This is a GNU extension. */ -- language = getenv ("LANGUAGE"); -- if (language != NULL && language[0] == '\0') -- language = NULL; -- -- /* We have to proceed with the POSIX methods of looking to `LC_ALL', -+ const char *locale; -+#ifndef _LIBC -+ const char *language_default; -+ int locale_defaulted; -+#endif -+ -+ /* We use the settings in the following order: -+ 1. The value of the environment variable 'LANGUAGE'. This is a GNU -+ extension. Its value can be a colon-separated list of locale names. -+ 2. The value of the environment variable 'LC_ALL', 'LC_xxx', or 'LANG'. -+ More precisely, the first among these that is set to a non-empty value. -+ This is how POSIX specifies it. The value is a single locale name. -+ 3. A system-dependent preference list of languages. Its value can be a -+ colon-separated list of locale names. -+ 4. A system-dependent default locale name. -+ This way: -+ - System-dependent settings can be overridden by environment variables. -+ - If the system provides both a list of languages and a default locale, -+ the former is used. */ -+ -+ /* Fetch the locale name, through the POSIX method of looking to `LC_ALL', - `LC_xxx', and `LANG'. On some systems this can be done by the - `setlocale' function itself. */ - #ifdef _LIBC -- retval = setlocale (category, NULL); --#else -- retval = _nl_locale_name (category, categoryname); --#endif -- -- /* Ignore LANGUAGE if the locale is set to "C" because -+ locale = __current_locale_name (category); -+#else -+ locale = _nl_locale_name_posix (category, categoryname); -+ locale_defaulted = 0; -+ if (locale == NULL) -+ { -+ locale = _nl_locale_name_default (); -+ locale_defaulted = 1; -+ } -+#endif -+ -+ /* Ignore LANGUAGE and its system-dependent analogon if the locale is set -+ to "C" because - 1. "C" locale usually uses the ASCII encoding, and most international - messages use non-ASCII characters. These characters get displayed - as question marks (if using glibc's iconv()) or as invalid 8-bit -@@ -1133,8 +1173,28 @@ guess_category_value (category, category - characters to ASCII). In any case, the output is ugly. - 2. The precise output of some programs in the "C" locale is specified - by POSIX and should not depend on environment variables like -- "LANGUAGE". We allow such programs to use gettext(). */ -- return language != NULL && strcmp (retval, "C") != 0 ? language : retval; -+ "LANGUAGE" or system-dependent information. We allow such programs -+ to use gettext(). */ -+ if (strcmp (locale, "C") == 0) -+ return locale; -+ -+ /* The highest priority value is the value of the 'LANGUAGE' environment -+ variable. */ -+ language = getenv ("LANGUAGE"); -+ if (language != NULL && language[0] != '\0') -+ return language; -+#ifndef _LIBC -+ /* The next priority value is the locale name, if not defaulted. */ -+ if (locale_defaulted) -+ { -+ /* The next priority value is the default language preferences list. */ -+ language_default = _nl_language_preferences_default (); -+ if (language_default != NULL) -+ return language_default; -+ } -+ /* The least priority value is the locale name, if defaulted. */ -+#endif -+ return locale; - } - - /* @@ begin of epilog @@ */ -@@ -1145,9 +1205,7 @@ guess_category_value (category, category - to be defined. */ - #if !_LIBC && !HAVE_STPCPY - static char * --stpcpy (dest, src) -- char *dest; -- const char *src; -+stpcpy (char *dest, const char *src) - { - while ((*dest++ = *src++) != '\0') - /* Do nothing. */ ; -@@ -1157,10 +1215,7 @@ stpcpy (dest, src) - - #if !_LIBC && !HAVE_MEMPCPY - static void * --mempcpy (dest, src, n) -- void *dest; -- const void *src; -- size_t n; -+mempcpy (void *dest, const void *src, size_t n) - { - return (void *) ((char *) memcpy (dest, src, n) + n); - } -@@ -1170,8 +1225,7 @@ mempcpy (dest, src, n) - #ifdef _LIBC - /* If we want to free all resources we have to do some work at - program's end. */ --static void __attribute__ ((unused)) --free_mem (void) -+libc_freeres_fn (free_mem) - { - void *old; - -@@ -1179,7 +1233,7 @@ free_mem (void) - { - struct binding *oldp = _nl_domain_bindings; - _nl_domain_bindings = _nl_domain_bindings->next; -- if (oldp->dirname != _nl_default_dirname) -+ if (oldp->dirname != INTUSE(_nl_default_dirname)) - /* Yes, this is a pointer comparison. */ - free (oldp->dirname); - free (oldp->codeset); -@@ -1201,6 +1255,4 @@ free_mem (void) - free (old); - } - } -- --text_set_element (__libc_subfreeres, free_mem); --#endif -+#endif -diff -r 4216c218ee44 -r e04165992166 intl/dcngettext.c ---- a/intl/dcngettext.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/dcngettext.c Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Implementation of the dcngettext(3) function. -- Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. -+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -44,18 +44,14 @@ - /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY - locale. */ - char * --DCNGETTEXT (domainname, msgid1, msgid2, n, category) -- const char *domainname; -- const char *msgid1; -- const char *msgid2; -- unsigned long int n; -- int category; -+DCNGETTEXT (const char *domainname, -+ const char *msgid1, const char *msgid2, unsigned long int n, -+ int category) - { - return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category); - } - - #ifdef _LIBC - /* Alias for function name in GNU C Library. */ --INTDEF(__dcngettext) - weak_alias (__dcngettext, dcngettext); - #endif -diff -r 4216c218ee44 -r e04165992166 intl/dgettext.c ---- a/intl/dgettext.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/dgettext.c Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Implementation of the dgettext(3) function. -- Copyright (C) 1995-1997, 2000, 2001, 2002 Free Software Foundation, Inc. -+ Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -20,9 +20,10 @@ - # include - #endif - -+#include "gettextP.h" -+ - #include - --#include "gettextP.h" - #ifdef _LIBC - # include - #else -@@ -46,9 +47,7 @@ - /* Look up MSGID in the DOMAINNAME message catalog of the current - LC_MESSAGES locale. */ - char * --DGETTEXT (domainname, msgid) -- const char *domainname; -- const char *msgid; -+DGETTEXT (const char *domainname, const char *msgid) - { - return DCGETTEXT (domainname, msgid, LC_MESSAGES); - } -diff -r 4216c218ee44 -r e04165992166 intl/dngettext.c ---- a/intl/dngettext.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/dngettext.c Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Implementation of the dngettext(3) function. -- Copyright (C) 1995-1997, 2000, 2001, 2002 Free Software Foundation, Inc. -+ Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -20,9 +20,10 @@ - # include - #endif - -+#include "gettextP.h" -+ - #include - --#include "gettextP.h" - #ifdef _LIBC - # include - #else -@@ -37,7 +38,7 @@ - prefix. So we have to make a difference here. */ - #ifdef _LIBC - # define DNGETTEXT __dngettext --# define DCNGETTEXT INTUSE(__dcngettext) -+# define DCNGETTEXT __dcngettext - #else - # define DNGETTEXT libintl_dngettext - # define DCNGETTEXT libintl_dcngettext -@@ -46,11 +47,8 @@ - /* Look up MSGID in the DOMAINNAME message catalog of the current - LC_MESSAGES locale and skip message according to the plural form. */ - char * --DNGETTEXT (domainname, msgid1, msgid2, n) -- const char *domainname; -- const char *msgid1; -- const char *msgid2; -- unsigned long int n; -+DNGETTEXT (const char *domainname, -+ const char *msgid1, const char *msgid2, unsigned long int n) - { - return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES); - } -diff -r 4216c218ee44 -r e04165992166 intl/eval-plural.h ---- a/intl/eval-plural.h Sat May 28 13:40:15 2005 +0000 -+++ b/intl/eval-plural.h Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Plural expression evaluation. -- Copyright (C) 2000-2002 Free Software Foundation, Inc. -+ Copyright (C) 2000-2003 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -21,16 +21,10 @@ - #endif - - /* Evaluate the plural expression and return an index value. */ --STATIC unsigned long int plural_eval PARAMS ((struct expression *pexp, -- unsigned long int n)) -- internal_function; -- - STATIC - unsigned long int - internal_function --plural_eval (pexp, n) -- struct expression *pexp; -- unsigned long int n; -+plural_eval (struct expression *pexp, unsigned long int n) - { - switch (pexp->nargs) - { -diff -r 4216c218ee44 -r e04165992166 intl/explodename.c ---- a/intl/explodename.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/explodename.c Sat May 28 13:45:22 2005 +0000 -@@ -1,4 +1,4 @@ --/* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc. -+/* Copyright (C) 1995-1998, 2000-2001, 2003 Free Software Foundation, Inc. - Contributed by Ulrich Drepper , 1995. - - This program is free software; you can redistribute it and/or modify it -@@ -38,8 +38,7 @@ - /* @@ end of prolog @@ */ - - char * --_nl_find_language (name) -- const char *name; -+_nl_find_language (const char *name) - { - while (name[0] != '\0' && name[0] != '_' && name[0] != '@' - && name[0] != '+' && name[0] != ',') -@@ -50,17 +49,11 @@ _nl_find_language (name) - - - int --_nl_explode_name (name, language, modifier, territory, codeset, -- normalized_codeset, special, sponsor, revision) -- char *name; -- const char **language; -- const char **modifier; -- const char **territory; -- const char **codeset; -- const char **normalized_codeset; -- const char **special; -- const char **sponsor; -- const char **revision; -+_nl_explode_name (char *name, -+ const char **language, const char **modifier, -+ const char **territory, const char **codeset, -+ const char **normalized_codeset, const char **special, -+ const char **sponsor, const char **revision) - { - enum { undecided, xpg, cen } syntax; - char *cp; -diff -r 4216c218ee44 -r e04165992166 intl/finddomain.c ---- a/intl/finddomain.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/finddomain.c Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Handle list of needed message catalogs -- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. -+ Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc. - Written by Ulrich Drepper , 1995. - - This program is free software; you can redistribute it and/or modify it -@@ -47,11 +47,8 @@ static struct loaded_l10nfile *_nl_loade - established bindings. */ - struct loaded_l10nfile * - internal_function --_nl_find_domain (dirname, locale, domainname, domainbinding) -- const char *dirname; -- char *locale; -- const char *domainname; -- struct binding *domainbinding; -+_nl_find_domain (const char *dirname, char *locale, -+ const char *domainname, struct binding *domainbinding) - { - struct loaded_l10nfile *retval; - const char *language; -@@ -178,8 +175,7 @@ _nl_find_domain (dirname, locale, domain - - - #ifdef _LIBC --static void __attribute__ ((unused)) --free_mem (void) -+libc_freeres_fn (free_mem) - { - struct loaded_l10nfile *runp = _nl_loaded_domains; - -@@ -193,6 +189,4 @@ free_mem (void) - free (here); - } - } -- --text_set_element (__libc_subfreeres, free_mem); - #endif -diff -r 4216c218ee44 -r e04165992166 intl/gettext.c ---- a/intl/gettext.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/gettext.c Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Implementation of gettext(3) function. -- Copyright (C) 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc. -+ Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -52,8 +52,7 @@ - LC_MESSAGES locale. If not found, returns MSGID itself (the default - text). */ - char * --GETTEXT (msgid) -- const char *msgid; -+GETTEXT (const char *msgid) - { - return DCGETTEXT (NULL, msgid, LC_MESSAGES); - } -diff -r 4216c218ee44 -r e04165992166 intl/gettextP.h ---- a/intl/gettextP.h Sat May 28 13:40:15 2005 +0000 -+++ b/intl/gettextP.h Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Header describing internals of libintl library. -- Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc. -+ Copyright (C) 1995-1999, 2000-2005 Free Software Foundation, Inc. - Written by Ulrich Drepper , 1995. - - This program is free software; you can redistribute it and/or modify it -@@ -35,14 +35,6 @@ - #include "gmo.h" /* Get nls_uint32. */ - - /* @@ end of prolog @@ */ -- --#ifndef PARAMS --# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES --# define PARAMS(args) args --# else --# define PARAMS(args) () --# endif --#endif - - #ifndef internal_function - # define internal_function -@@ -159,82 +151,66 @@ extern int _nl_msg_cat_cntr; - extern int _nl_msg_cat_cntr; - - #ifndef _LIBC --const char *_nl_locale_name PARAMS ((int category, const char *categoryname)); --#endif -- --struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname, -- char *__locale, -- const char *__domainname, -- struct binding *__domainbinding)) -- internal_function; --void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain, -- struct binding *__domainbinding)) -- internal_function; --void _nl_unload_domain PARAMS ((struct loaded_domain *__domain)) -- internal_function; --const char *_nl_init_domain_conv PARAMS ((struct loaded_l10nfile *__domain_file, -- struct loaded_domain *__domain, -- struct binding *__domainbinding)) -- internal_function; --void _nl_free_domain_conv PARAMS ((struct loaded_domain *__domain)) -- internal_function; -- --char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file, -- struct binding *domainbinding, -- const char *msgid, size_t *lengthp)) -- internal_function; -- --#ifdef _LIBC --extern char *__gettext PARAMS ((const char *__msgid)); --extern char *__dgettext PARAMS ((const char *__domainname, -- const char *__msgid)); --extern char *__dcgettext PARAMS ((const char *__domainname, -- const char *__msgid, int __category)); --extern char *__ngettext PARAMS ((const char *__msgid1, const char *__msgid2, -- unsigned long int __n)); --extern char *__dngettext PARAMS ((const char *__domainname, -- const char *__msgid1, const char *__msgid2, -- unsigned long int n)); --extern char *__dcngettext PARAMS ((const char *__domainname, -- const char *__msgid1, const char *__msgid2, -- unsigned long int __n, int __category)); --extern char *__dcigettext PARAMS ((const char *__domainname, -- const char *__msgid1, const char *__msgid2, -- int __plural, unsigned long int __n, -- int __category)); --extern char *__textdomain PARAMS ((const char *__domainname)); --extern char *__bindtextdomain PARAMS ((const char *__domainname, -- const char *__dirname)); --extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname, -- const char *__codeset)); --#else --extern char *libintl_gettext PARAMS ((const char *__msgid)); --extern char *libintl_dgettext PARAMS ((const char *__domainname, -- const char *__msgid)); --extern char *libintl_dcgettext PARAMS ((const char *__domainname, -- const char *__msgid, int __category)); --extern char *libintl_ngettext PARAMS ((const char *__msgid1, -- const char *__msgid2, -- unsigned long int __n)); --extern char *libintl_dngettext PARAMS ((const char *__domainname, -- const char *__msgid1, -- const char *__msgid2, -- unsigned long int __n)); --extern char *libintl_dcngettext PARAMS ((const char *__domainname, -- const char *__msgid1, -- const char *__msgid2, -- unsigned long int __n, -- int __category)); --extern char *libintl_dcigettext PARAMS ((const char *__domainname, -- const char *__msgid1, -- const char *__msgid2, -- int __plural, unsigned long int __n, -- int __category)); --extern char *libintl_textdomain PARAMS ((const char *__domainname)); --extern char *libintl_bindtextdomain PARAMS ((const char *__domainname, -- const char *__dirname)); --extern char *libintl_bind_textdomain_codeset PARAMS ((const char *__domainname, -- const char *__codeset)); -+const char *_nl_language_preferences_default (void); -+const char *_nl_locale_name_posix (int category, const char *categoryname); -+const char *_nl_locale_name_default (void); -+const char *_nl_locale_name (int category, const char *categoryname); -+#endif -+ -+struct loaded_l10nfile *_nl_find_domain (const char *__dirname, char *__locale, -+ const char *__domainname, -+ struct binding *__domainbinding) -+ internal_function; -+void _nl_load_domain (struct loaded_l10nfile *__domain, -+ struct binding *__domainbinding) -+ internal_function; -+void _nl_unload_domain (struct loaded_domain *__domain) -+ internal_function; -+const char *_nl_init_domain_conv (struct loaded_l10nfile *__domain_file, -+ struct loaded_domain *__domain, -+ struct binding *__domainbinding) -+ internal_function; -+void _nl_free_domain_conv (struct loaded_domain *__domain) -+ internal_function; -+ -+char *_nl_find_msg (struct loaded_l10nfile *domain_file, -+ struct binding *domainbinding, const char *msgid, -+ size_t *lengthp) -+ internal_function; -+ -+#ifdef _LIBC -+extern char *__gettext (const char *__msgid); -+extern char *__dgettext (const char *__domainname, const char *__msgid); -+extern char *__dcgettext (const char *__domainname, const char *__msgid, -+ int __category); -+extern char *__ngettext (const char *__msgid1, const char *__msgid2, -+ unsigned long int __n); -+extern char *__dngettext (const char *__domainname, -+ const char *__msgid1, const char *__msgid2, -+ unsigned long int n); -+extern char *__dcngettext (const char *__domainname, -+ const char *__msgid1, const char *__msgid2, -+ unsigned long int __n, int __category); -+extern char *__dcigettext (const char *__domainname, -+ const char *__msgid1, const char *__msgid2, -+ int __plural, unsigned long int __n, -+ int __category); -+extern char *__textdomain (const char *__domainname); -+extern char *__bindtextdomain (const char *__domainname, -+ const char *__dirname); -+extern char *__bind_textdomain_codeset (const char *__domainname, -+ const char *__codeset); -+#else -+/* Declare the exported libintl_* functions, in a way that allows us to -+ call them under their real name. */ -+# undef _INTL_REDIRECT_INLINE -+# undef _INTL_REDIRECT_MACROS -+# define _INTL_REDIRECT_MACROS -+# include "libgnuintl.h" -+extern char *libintl_dcigettext (const char *__domainname, -+ const char *__msgid1, const char *__msgid2, -+ int __plural, unsigned long int __n, -+ int __category); - #endif - - /* @@ begin of epilog @@ */ -diff -r 4216c218ee44 -r e04165992166 intl/gmo.h ---- a/intl/gmo.h Sat May 28 13:40:15 2005 +0000 -+++ b/intl/gmo.h Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Description of GNU message catalog format: general file layout. -- Copyright (C) 1995, 1997, 2000-2002 Free Software Foundation, Inc. -+ Copyright (C) 1995, 1997, 2000-2002, 2004 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -29,6 +29,7 @@ - - /* Revision number of the currently used .mo (binary) file format. */ - #define MO_REVISION_NUMBER 0 -+#define MO_REVISION_NUMBER_WITH_SYSDEP_I 1 - - /* The following contortions are an attempt to use the C preprocessor - to determine an unsigned integral type that is 32 bits wide. An -@@ -76,7 +77,7 @@ struct mo_file_header - /* The revision number of the file format. */ - nls_uint32 revision; - -- /* The following are only used in .mo files with major revision 0. */ -+ /* The following are only used in .mo files with major revision 0 or 1. */ - - /* The number of strings pairs. */ - nls_uint32 nstrings; -diff -r 4216c218ee44 -r e04165992166 intl/hash-string.h ---- a/intl/hash-string.h Sat May 28 13:40:15 2005 +0000 -+++ b/intl/hash-string.h Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Description of GNU message catalog format: string hashing function. -- Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. -+ Copyright (C) 1995, 1997-1998, 2000-2003 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -18,14 +18,6 @@ - - /* @@ end of prolog @@ */ - --#ifndef PARAMS --# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES --# define PARAMS(Args) Args --# else --# define PARAMS(Args) () --# endif --#endif -- - /* We assume to have `unsigned long int' value with at least 32 bits. */ - #define HASHWORDBITS 32 - -@@ -33,11 +25,8 @@ - /* Defines the so called `hashpjw' function by P.J. Weinberger - [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, - 1986, 1987 Bell Telephone Laboratories, Inc.] */ --static unsigned long int hash_string PARAMS ((const char *__str_param)); -- - static inline unsigned long int --hash_string (str_param) -- const char *str_param; -+hash_string (const char *str_param) - { - unsigned long int hval, g; - const char *str = str_param; -@@ -47,7 +36,7 @@ hash_string (str_param) - while (*str != '\0') - { - hval <<= 4; -- hval += (unsigned long int) *str++; -+ hval += (unsigned char) *str++; - g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4)); - if (g != 0) - { -diff -r 4216c218ee44 -r e04165992166 intl/intl-compat.c ---- a/intl/intl-compat.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/intl-compat.c Sat May 28 13:45:22 2005 +0000 -@@ -1,6 +1,6 @@ - /* intl-compat.c - Stub functions to call gettext functions from GNU gettext - Library. -- Copyright (C) 1995, 2000-2002 Software Foundation, Inc. -+ Copyright (C) 1995, 2000-2003 Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -21,8 +21,6 @@ - # include - #endif - --#define _INTL_REDIRECT_MACROS --#include "libgnuintl.h" - #include "gettextP.h" - - /* @@ end of prolog @@ */ -@@ -31,7 +29,10 @@ - defined in the included GNU libintl library (with "libintl_" prefix). - It is compiled into libintl in order to make the AM_GNU_GETTEXT test - of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which -- has the redirections primarily in the include file. */ -+ has the redirections primarily in the include file. -+ It is also compiled into libgnuintl so that libgnuintl.so can be used -+ as LD_PRELOADable library on glibc systems, to provide the extra -+ features that the functions in the libc don't have (namely, logging). */ - - - #undef gettext -@@ -45,87 +46,86 @@ - #undef bind_textdomain_codeset - - -+/* When building a DLL, we must export some functions. Note that because -+ the functions are only defined for binary backward compatibility, we -+ don't need to use __declspec(dllimport) in any case. */ -+#if defined _MSC_VER && BUILDING_DLL -+# define DLL_EXPORTED __declspec(dllexport) -+#else -+# define DLL_EXPORTED -+#endif -+ -+ -+DLL_EXPORTED - char * --gettext (msgid) -- const char *msgid; -+gettext (const char *msgid) - { - return libintl_gettext (msgid); - } - - -+DLL_EXPORTED - char * --dgettext (domainname, msgid) -- const char *domainname; -- const char *msgid; -+dgettext (const char *domainname, const char *msgid) - { - return libintl_dgettext (domainname, msgid); - } - - -+DLL_EXPORTED - char * --dcgettext (domainname, msgid, category) -- const char *domainname; -- const char *msgid; -- int category; -+dcgettext (const char *domainname, const char *msgid, int category) - { - return libintl_dcgettext (domainname, msgid, category); - } - - -+DLL_EXPORTED - char * --ngettext (msgid1, msgid2, n) -- const char *msgid1; -- const char *msgid2; -- unsigned long int n; -+ngettext (const char *msgid1, const char *msgid2, unsigned long int n) - { - return libintl_ngettext (msgid1, msgid2, n); - } - - -+DLL_EXPORTED - char * --dngettext (domainname, msgid1, msgid2, n) -- const char *domainname; -- const char *msgid1; -- const char *msgid2; -- unsigned long int n; -+dngettext (const char *domainname, -+ const char *msgid1, const char *msgid2, unsigned long int n) - { - return libintl_dngettext (domainname, msgid1, msgid2, n); - } - - -+DLL_EXPORTED - char * --dcngettext (domainname, msgid1, msgid2, n, category) -- const char *domainname; -- const char *msgid1; -- const char *msgid2; -- unsigned long int n; -- int category; -+dcngettext (const char *domainname, -+ const char *msgid1, const char *msgid2, unsigned long int n, -+ int category) - { - return libintl_dcngettext (domainname, msgid1, msgid2, n, category); - } - - -+DLL_EXPORTED - char * --textdomain (domainname) -- const char *domainname; -+textdomain (const char *domainname) - { - return libintl_textdomain (domainname); - } - - -+DLL_EXPORTED - char * --bindtextdomain (domainname, dirname) -- const char *domainname; -- const char *dirname; -+bindtextdomain (const char *domainname, const char *dirname) - { - return libintl_bindtextdomain (domainname, dirname); - } - - -+DLL_EXPORTED - char * --bind_textdomain_codeset (domainname, codeset) -- const char *domainname; -- const char *codeset; -+bind_textdomain_codeset (const char *domainname, const char *codeset) - { - return libintl_bind_textdomain_codeset (domainname, codeset); - } -diff -r 4216c218ee44 -r e04165992166 intl/l10nflist.c ---- a/intl/l10nflist.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/l10nflist.c Sat May 28 13:45:22 2005 +0000 -@@ -1,4 +1,4 @@ --/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. -+/* Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc. - Contributed by Ulrich Drepper , 1995. - - This program is free software; you can redistribute it and/or modify it -@@ -58,7 +58,7 @@ - # endif - #else - # ifndef HAVE_STPCPY --static char *stpcpy PARAMS ((char *dest, const char *src)); -+static char *stpcpy (char *dest, const char *src); - # endif - #endif - -@@ -67,8 +67,8 @@ static char *stpcpy PARAMS ((char *dest, - IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not, - it may be concatenated to a directory pathname. - */ --#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ -- /* Win32, OS/2, DOS */ -+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ -+ /* Win32, Cygwin, OS/2, DOS */ - # define ISSLASH(C) ((C) == '/' || (C) == '\\') - # define HAS_DEVICE(P) \ - ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ -@@ -84,12 +84,8 @@ static char *stpcpy PARAMS ((char *dest, - - #if !defined _LIBC && !defined HAVE___ARGZ_COUNT - /* Returns the number of strings in ARGZ. */ --static size_t argz_count__ PARAMS ((const char *argz, size_t len)); -- - static size_t --argz_count__ (argz, len) -- const char *argz; -- size_t len; -+argz_count__ (const char *argz, size_t len) - { - size_t count = 0; - while (len > 0) -@@ -112,13 +108,8 @@ argz_count__ (argz, len) - #if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY - /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's - except the last into the character SEP. */ --static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep)); -- - static void --argz_stringify__ (argz, len, sep) -- char *argz; -- size_t len; -- int sep; -+argz_stringify__ (char *argz, size_t len, int sep) - { - while (len > 0) - { -@@ -139,14 +130,8 @@ argz_stringify__ (argz, len, sep) - #endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */ - - #if !defined _LIBC && !defined HAVE___ARGZ_NEXT --static char *argz_next__ PARAMS ((char *argz, size_t argz_len, -- const char *entry)); -- - static char * --argz_next__ (argz, argz_len, entry) -- char *argz; -- size_t argz_len; -- const char *entry; -+argz_next__ (char *argz, size_t argz_len, const char *entry) - { - if (entry) - { -@@ -167,11 +152,8 @@ argz_next__ (argz, argz_len, entry) - - - /* Return number of bits set in X. */ --static int pop PARAMS ((int x)); -- - static inline int --pop (x) -- int x; -+pop (int x) - { - /* We assume that no more than 16 bits are used. */ - x = ((x & ~0x5555) >> 1) + (x & 0x5555); -@@ -184,23 +166,13 @@ pop (x) - - - struct loaded_l10nfile * --_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language, -- territory, codeset, normalized_codeset, modifier, special, -- sponsor, revision, filename, do_allocate) -- struct loaded_l10nfile **l10nfile_list; -- const char *dirlist; -- size_t dirlist_len; -- int mask; -- const char *language; -- const char *territory; -- const char *codeset; -- const char *normalized_codeset; -- const char *modifier; -- const char *special; -- const char *sponsor; -- const char *revision; -- const char *filename; -- int do_allocate; -+_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list, -+ const char *dirlist, size_t dirlist_len, -+ int mask, const char *language, const char *territory, -+ const char *codeset, const char *normalized_codeset, -+ const char *modifier, const char *special, -+ const char *sponsor, const char *revision, -+ const char *filename, int do_allocate) - { - char *abs_filename; - struct loaded_l10nfile **lastp; -@@ -393,9 +365,7 @@ _nl_make_l10nflist (l10nfile_list, dirli - names. The return value is dynamically allocated and has to be - freed by the caller. */ - const char * --_nl_normalize_codeset (codeset, name_len) -- const char *codeset; -- size_t name_len; -+_nl_normalize_codeset (const char *codeset, size_t name_len) - { - int len = 0; - int only_digit = 1; -@@ -442,9 +412,7 @@ _nl_normalize_codeset (codeset, name_len - to be defined. */ - #if !_LIBC && !HAVE_STPCPY - static char * --stpcpy (dest, src) -- char *dest; -- const char *src; -+stpcpy (char *dest, const char *src) - { - while ((*dest++ = *src++) != '\0') - /* Do nothing. */ ; -diff -r 4216c218ee44 -r e04165992166 intl/langprefs.c ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/intl/langprefs.c Sat May 28 13:45:22 2005 +0000 -@@ -0,0 +1,130 @@ -+/* Determine the user's language preferences. -+ Copyright (C) 2004-2005 Free Software Foundation, Inc. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Library 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Library General Public License for more details. -+ -+ You should have received a copy of the GNU Library General Public -+ License along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ USA. */ -+ -+/* Written by Bruno Haible . */ -+ -+#ifdef HAVE_CONFIG_H -+# include -+#endif -+ -+#include -+ -+#if HAVE_CFPREFERENCESCOPYAPPVALUE -+# include -+# include -+# include -+# include -+# include -+extern void _nl_locale_name_canonicalize (char *name); -+#endif -+ -+/* Determine the user's language preferences, as a colon separated list of -+ locale names in XPG syntax -+ language[_territory[.codeset]][@modifier] -+ The result must not be freed; it is statically allocated. -+ The LANGUAGE environment variable does not need to be considered; it is -+ already taken into account by the caller. */ -+ -+const char * -+_nl_language_preferences_default (void) -+{ -+#if HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */ -+ { -+ /* Cache the preferences list, since CoreFoundation calls are expensive. */ -+ static const char *cached_languages; -+ static int cache_initialized; -+ -+ if (!cache_initialized) -+ { -+ CFTypeRef preferences = -+ CFPreferencesCopyAppValue (CFSTR ("AppleLanguages"), -+ kCFPreferencesCurrentApplication); -+ if (preferences != NULL -+ && CFGetTypeID (preferences) == CFArrayGetTypeID ()) -+ { -+ CFArrayRef prefArray = (CFArrayRef)preferences; -+ int n = CFArrayGetCount (prefArray); -+ char buf[256]; -+ size_t size = 0; -+ int i; -+ -+ for (i = 0; i < n; i++) -+ { -+ CFTypeRef element = CFArrayGetValueAtIndex (prefArray, i); -+ if (element != NULL -+ && CFGetTypeID (element) == CFStringGetTypeID () -+ && CFStringGetCString ((CFStringRef)element, -+ buf, sizeof (buf), -+ kCFStringEncodingASCII)) -+ { -+ _nl_locale_name_canonicalize (buf); -+ size += strlen (buf) + 1; -+ /* Most GNU programs use msgids in English and don't ship -+ an en.mo message catalog. Therefore when we see "en" -+ in the preferences list, arrange for gettext() to -+ return the msgid, and ignore all further elements of -+ the preferences list. */ -+ if (strcmp (buf, "en") == 0) -+ break; -+ } -+ else -+ break; -+ } -+ if (size > 0) -+ { -+ char *languages = (char *) malloc (size); -+ -+ if (languages != NULL) -+ { -+ char *p = languages; -+ -+ for (i = 0; i < n; i++) -+ { -+ CFTypeRef element = -+ CFArrayGetValueAtIndex (prefArray, i); -+ if (element != NULL -+ && CFGetTypeID (element) == CFStringGetTypeID () -+ && CFStringGetCString ((CFStringRef)element, -+ buf, sizeof (buf), -+ kCFStringEncodingASCII)) -+ { -+ _nl_locale_name_canonicalize (buf); -+ strcpy (p, buf); -+ p += strlen (buf); -+ *p++ = ':'; -+ if (strcmp (buf, "en") == 0) -+ break; -+ } -+ else -+ break; -+ } -+ *--p = '\0'; -+ -+ cached_languages = languages; -+ } -+ } -+ } -+ cache_initialized = 1; -+ } -+ if (cached_languages != NULL) -+ return cached_languages; -+ } -+#endif -+ -+ return NULL; -+} -diff -r 4216c218ee44 -r e04165992166 intl/libgnuintl.h.in ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/intl/libgnuintl.h.in Sat May 28 13:45:22 2005 +0000 -@@ -0,0 +1,383 @@ -+/* Message catalogs for internationalization. -+ Copyright (C) 1995-1997, 2000-2004 Free Software Foundation, Inc. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Library 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Library General Public License for more details. -+ -+ You should have received a copy of the GNU Library General Public -+ License along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ USA. */ -+ -+#ifndef _LIBINTL_H -+#define _LIBINTL_H 1 -+ -+#include -+ -+/* The LC_MESSAGES locale category is the category used by the functions -+ gettext() and dgettext(). It is specified in POSIX, but not in ANSI C. -+ On systems that don't define it, use an arbitrary value instead. -+ On Solaris, defines __LOCALE_H (or _LOCALE_H in Solaris 2.5) -+ then includes (i.e. this file!) and then only defines -+ LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES -+ in this case. */ -+#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) -+# define LC_MESSAGES 1729 -+#endif -+ -+/* We define an additional symbol to signal that we use the GNU -+ implementation of gettext. */ -+#define __USE_GNU_GETTEXT 1 -+ -+/* Provide information about the supported file formats. Returns the -+ maximum minor revision number supported for a given major revision. */ -+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ -+ ((major) == 0 || (major) == 1 ? 1 : -1) -+ -+/* Resolve a platform specific conflict on DJGPP. GNU gettext takes -+ precedence over _conio_gettext. */ -+#ifdef __DJGPP__ -+# undef gettext -+#endif -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+ -+/* We redirect the functions to those prefixed with "libintl_". This is -+ necessary, because some systems define gettext/textdomain/... in the C -+ library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer). -+ If we used the unprefixed names, there would be cases where the -+ definition in the C library would override the one in the libintl.so -+ shared library. Recall that on ELF systems, the symbols are looked -+ up in the following order: -+ 1. in the executable, -+ 2. in the shared libraries specified on the link command line, in order, -+ 3. in the dependencies of the shared libraries specified on the link -+ command line, -+ 4. in the dlopen()ed shared libraries, in the order in which they were -+ dlopen()ed. -+ The definition in the C library would override the one in libintl.so if -+ either -+ * -lc is given on the link command line and -lintl isn't, or -+ * -lc is given on the link command line before -lintl, or -+ * libintl.so is a dependency of a dlopen()ed shared library but not -+ linked to the executable at link time. -+ Since Solaris gettext() behaves differently than GNU gettext(), this -+ would be unacceptable. -+ -+ The redirection happens by default through macros in C, so that &gettext -+ is independent of the compilation unit, but through inline functions in -+ C++, in order not to interfere with the name mangling of class fields or -+ class methods called 'gettext'. */ -+ -+/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS. -+ If he doesn't, we choose the method. A third possible method is -+ _INTL_REDIRECT_ASM, supported only by GCC. */ -+#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) -+# if __GNUC__ >= 2 && !defined __APPLE_CC__ && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus) -+# define _INTL_REDIRECT_ASM -+# else -+# ifdef __cplusplus -+# define _INTL_REDIRECT_INLINE -+# else -+# define _INTL_REDIRECT_MACROS -+# endif -+# endif -+#endif -+/* Auxiliary macros. */ -+#ifdef _INTL_REDIRECT_ASM -+# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname)) -+# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring -+# define _INTL_STRINGIFY(prefix) #prefix -+#else -+# define _INTL_ASM(cname) -+#endif -+ -+/* Look up MSGID in the current default message catalog for the current -+ LC_MESSAGES locale. If not found, returns MSGID itself (the default -+ text). */ -+#ifdef _INTL_REDIRECT_INLINE -+extern char *libintl_gettext (const char *__msgid); -+static inline char *gettext (const char *__msgid) -+{ -+ return libintl_gettext (__msgid); -+} -+#else -+#ifdef _INTL_REDIRECT_MACROS -+# define gettext libintl_gettext -+#endif -+extern char *gettext (const char *__msgid) -+ _INTL_ASM (libintl_gettext); -+#endif -+ -+/* Look up MSGID in the DOMAINNAME message catalog for the current -+ LC_MESSAGES locale. */ -+#ifdef _INTL_REDIRECT_INLINE -+extern char *libintl_dgettext (const char *__domainname, const char *__msgid); -+static inline char *dgettext (const char *__domainname, const char *__msgid) -+{ -+ return libintl_dgettext (__domainname, __msgid); -+} -+#else -+#ifdef _INTL_REDIRECT_MACROS -+# define dgettext libintl_dgettext -+#endif -+extern char *dgettext (const char *__domainname, const char *__msgid) -+ _INTL_ASM (libintl_dgettext); -+#endif -+ -+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY -+ locale. */ -+#ifdef _INTL_REDIRECT_INLINE -+extern char *libintl_dcgettext (const char *__domainname, const char *__msgid, -+ int __category); -+static inline char *dcgettext (const char *__domainname, const char *__msgid, -+ int __category) -+{ -+ return libintl_dcgettext (__domainname, __msgid, __category); -+} -+#else -+#ifdef _INTL_REDIRECT_MACROS -+# define dcgettext libintl_dcgettext -+#endif -+extern char *dcgettext (const char *__domainname, const char *__msgid, -+ int __category) -+ _INTL_ASM (libintl_dcgettext); -+#endif -+ -+ -+/* Similar to `gettext' but select the plural form corresponding to the -+ number N. */ -+#ifdef _INTL_REDIRECT_INLINE -+extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2, -+ unsigned long int __n); -+static inline char *ngettext (const char *__msgid1, const char *__msgid2, -+ unsigned long int __n) -+{ -+ return libintl_ngettext (__msgid1, __msgid2, __n); -+} -+#else -+#ifdef _INTL_REDIRECT_MACROS -+# define ngettext libintl_ngettext -+#endif -+extern char *ngettext (const char *__msgid1, const char *__msgid2, -+ unsigned long int __n) -+ _INTL_ASM (libintl_ngettext); -+#endif -+ -+/* Similar to `dgettext' but select the plural form corresponding to the -+ number N. */ -+#ifdef _INTL_REDIRECT_INLINE -+extern char *libintl_dngettext (const char *__domainname, const char *__msgid1, -+ const char *__msgid2, unsigned long int __n); -+static inline char *dngettext (const char *__domainname, const char *__msgid1, -+ const char *__msgid2, unsigned long int __n) -+{ -+ return libintl_dngettext (__domainname, __msgid1, __msgid2, __n); -+} -+#else -+#ifdef _INTL_REDIRECT_MACROS -+# define dngettext libintl_dngettext -+#endif -+extern char *dngettext (const char *__domainname, -+ const char *__msgid1, const char *__msgid2, -+ unsigned long int __n) -+ _INTL_ASM (libintl_dngettext); -+#endif -+ -+/* Similar to `dcgettext' but select the plural form corresponding to the -+ number N. */ -+#ifdef _INTL_REDIRECT_INLINE -+extern char *libintl_dcngettext (const char *__domainname, -+ const char *__msgid1, const char *__msgid2, -+ unsigned long int __n, int __category); -+static inline char *dcngettext (const char *__domainname, -+ const char *__msgid1, const char *__msgid2, -+ unsigned long int __n, int __category) -+{ -+ return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category); -+} -+#else -+#ifdef _INTL_REDIRECT_MACROS -+# define dcngettext libintl_dcngettext -+#endif -+extern char *dcngettext (const char *__domainname, -+ const char *__msgid1, const char *__msgid2, -+ unsigned long int __n, int __category) -+ _INTL_ASM (libintl_dcngettext); -+#endif -+ -+ -+/* Set the current default message catalog to DOMAINNAME. -+ If DOMAINNAME is null, return the current default. -+ If DOMAINNAME is "", reset to the default of "messages". */ -+#ifdef _INTL_REDIRECT_INLINE -+extern char *libintl_textdomain (const char *__domainname); -+static inline char *textdomain (const char *__domainname) -+{ -+ return libintl_textdomain (__domainname); -+} -+#else -+#ifdef _INTL_REDIRECT_MACROS -+# define textdomain libintl_textdomain -+#endif -+extern char *textdomain (const char *__domainname) -+ _INTL_ASM (libintl_textdomain); -+#endif -+ -+/* Specify that the DOMAINNAME message catalog will be found -+ in DIRNAME rather than in the system locale data base. */ -+#ifdef _INTL_REDIRECT_INLINE -+extern char *libintl_bindtextdomain (const char *__domainname, -+ const char *__dirname); -+static inline char *bindtextdomain (const char *__domainname, -+ const char *__dirname) -+{ -+ return libintl_bindtextdomain (__domainname, __dirname); -+} -+#else -+#ifdef _INTL_REDIRECT_MACROS -+# define bindtextdomain libintl_bindtextdomain -+#endif -+extern char *bindtextdomain (const char *__domainname, const char *__dirname) -+ _INTL_ASM (libintl_bindtextdomain); -+#endif -+ -+/* Specify the character encoding in which the messages from the -+ DOMAINNAME message catalog will be returned. */ -+#ifdef _INTL_REDIRECT_INLINE -+extern char *libintl_bind_textdomain_codeset (const char *__domainname, -+ const char *__codeset); -+static inline char *bind_textdomain_codeset (const char *__domainname, -+ const char *__codeset) -+{ -+ return libintl_bind_textdomain_codeset (__domainname, __codeset); -+} -+#else -+#ifdef _INTL_REDIRECT_MACROS -+# define bind_textdomain_codeset libintl_bind_textdomain_codeset -+#endif -+extern char *bind_textdomain_codeset (const char *__domainname, -+ const char *__codeset) -+ _INTL_ASM (libintl_bind_textdomain_codeset); -+#endif -+ -+ -+/* Support for format strings with positions in *printf(), following the -+ POSIX/XSI specification. -+ Note: These replacements for the *printf() functions are visible only -+ in source files that #include or #include "gettext.h". -+ Packages that use *printf() in source files that don't refer to _() -+ or gettext() but for which the format string could be the return value -+ of _() or gettext() need to add this #include. Oh well. */ -+ -+#if !@HAVE_POSIX_PRINTF@ -+ -+#include -+#include -+ -+/* Get va_list. */ -+#if __STDC__ || defined __cplusplus || defined _MSC_VER -+# include -+#else -+# include -+#endif -+ -+#undef fprintf -+#define fprintf libintl_fprintf -+extern int fprintf (FILE *, const char *, ...); -+#undef vfprintf -+#define vfprintf libintl_vfprintf -+extern int vfprintf (FILE *, const char *, va_list); -+ -+#undef printf -+#define printf libintl_printf -+extern int printf (const char *, ...); -+#undef vprintf -+#define vprintf libintl_vprintf -+extern int vprintf (const char *, va_list); -+ -+#undef sprintf -+#define sprintf libintl_sprintf -+extern int sprintf (char *, const char *, ...); -+#undef vsprintf -+#define vsprintf libintl_vsprintf -+extern int vsprintf (char *, const char *, va_list); -+ -+#if @HAVE_SNPRINTF@ -+ -+#undef snprintf -+#define snprintf libintl_snprintf -+extern int snprintf (char *, size_t, const char *, ...); -+#undef vsnprintf -+#define vsnprintf libintl_vsnprintf -+extern int vsnprintf (char *, size_t, const char *, va_list); -+ -+#endif -+ -+#if @HAVE_ASPRINTF@ -+ -+#undef asprintf -+#define asprintf libintl_asprintf -+extern int asprintf (char **, const char *, ...); -+#undef vasprintf -+#define vasprintf libintl_vasprintf -+extern int vasprintf (char **, const char *, va_list); -+ -+#endif -+ -+#if @HAVE_WPRINTF@ -+ -+#undef fwprintf -+#define fwprintf libintl_fwprintf -+extern int fwprintf (FILE *, const wchar_t *, ...); -+#undef vfwprintf -+#define vfwprintf libintl_vfwprintf -+extern int vfwprintf (FILE *, const wchar_t *, va_list); -+ -+#undef wprintf -+#define wprintf libintl_wprintf -+extern int wprintf (const wchar_t *, ...); -+#undef vwprintf -+#define vwprintf libintl_vwprintf -+extern int vwprintf (const wchar_t *, va_list); -+ -+#undef swprintf -+#define swprintf libintl_swprintf -+extern int swprintf (wchar_t *, size_t, const wchar_t *, ...); -+#undef vswprintf -+#define vswprintf libintl_vswprintf -+extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list); -+ -+#endif -+ -+#endif -+ -+ -+/* Support for relocatable packages. */ -+ -+/* Sets the original and the current installation prefix of the package. -+ Relocation simply replaces a pathname starting with the original prefix -+ by the corresponding pathname with the current prefix instead. Both -+ prefixes should be directory names without trailing slash (i.e. use "" -+ instead of "/"). */ -+#define libintl_set_relocation_prefix libintl_set_relocation_prefix -+extern void -+ libintl_set_relocation_prefix (const char *orig_prefix, -+ const char *curr_prefix); -+ -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* libintl.h */ -diff -r 4216c218ee44 -r e04165992166 intl/loadinfo.h ---- a/intl/loadinfo.h Sat May 28 13:40:15 2005 +0000 -+++ b/intl/loadinfo.h Sat May 28 13:45:22 2005 +0000 -@@ -1,4 +1,4 @@ --/* Copyright (C) 1996-1999, 2000-2002 Free Software Foundation, Inc. -+/* Copyright (C) 1996-1999, 2000-2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 1996. - -@@ -32,14 +32,6 @@ - in gettextP.h. - */ - --#ifndef PARAMS --# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES --# define PARAMS(args) args --# else --# define PARAMS(args) () --# endif --#endif -- - #ifndef internal_function - # define internal_function - #endif -@@ -89,8 +81,8 @@ struct loaded_l10nfile - names. Normalization allows the user to use any of the common - names. The return value is dynamically allocated and has to be - freed by the caller. */ --extern const char *_nl_normalize_codeset PARAMS ((const char *codeset, -- size_t name_len)); -+extern const char *_nl_normalize_codeset (const char *codeset, -+ size_t name_len); - - /* Lookup a locale dependent file. - *L10NFILE_LIST denotes a pool of lookup results of locale dependent -@@ -107,19 +99,18 @@ extern const char *_nl_normalize_codeset - furthermore its ->successor[] field contains a list of other lookup - results from which this lookup result inherits. */ - extern struct loaded_l10nfile * --_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list, -- const char *dirlist, size_t dirlist_len, int mask, -- const char *language, const char *territory, -- const char *codeset, -- const char *normalized_codeset, -- const char *modifier, const char *special, -- const char *sponsor, const char *revision, -- const char *filename, int do_allocate)); -+_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list, -+ const char *dirlist, size_t dirlist_len, int mask, -+ const char *language, const char *territory, -+ const char *codeset, const char *normalized_codeset, -+ const char *modifier, const char *special, -+ const char *sponsor, const char *revision, -+ const char *filename, int do_allocate); - - /* Lookup the real locale name for a locale alias NAME, or NULL if - NAME is not a locale alias (but possibly a real locale name). - The return value is statically allocated and must not be freed. */ --extern const char *_nl_expand_alias PARAMS ((const char *name)); -+extern const char *_nl_expand_alias (const char *name); - - /* Split a locale name NAME into its pieces: language, modifier, - territory, codeset, special, sponsor, revision. -@@ -139,18 +130,16 @@ extern const char *_nl_expand_alias PARA - CEN_SPONSOR for *SPONSOR, - CEN_REVISION for *REVISION. - */ --extern int _nl_explode_name PARAMS ((char *name, const char **language, -- const char **modifier, -- const char **territory, -- const char **codeset, -- const char **normalized_codeset, -- const char **special, -- const char **sponsor, -- const char **revision)); -+extern int _nl_explode_name (char *name, const char **language, -+ const char **modifier, const char **territory, -+ const char **codeset, -+ const char **normalized_codeset, -+ const char **special, const char **sponsor, -+ const char **revision); - - /* Split a locale name NAME into a leading language part and all the - rest. Return a pointer to the first character after the language, - i.e. to the first byte of the rest. */ --extern char *_nl_find_language PARAMS ((const char *name)); -+extern char *_nl_find_language (const char *name); - - #endif /* loadinfo.h */ -diff -r 4216c218ee44 -r e04165992166 intl/loadmsgcat.c ---- a/intl/loadmsgcat.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/loadmsgcat.c Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Load needed message catalogs. -- Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc. -+ Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -34,17 +34,23 @@ - #include - - #ifdef __GNUC__ -+# undef alloca - # define alloca __builtin_alloca - # define HAVE_ALLOCA 1 - #else --# if defined HAVE_ALLOCA_H || defined _LIBC --# include -+# ifdef _MSC_VER -+# include -+# define alloca _alloca - # else --# ifdef _AIX -+# if defined HAVE_ALLOCA_H || defined _LIBC -+# include -+# else -+# ifdef _AIX - #pragma alloca --# else --# ifndef alloca -+# else -+# ifndef alloca - char *alloca (); -+# endif - # endif - # endif - # endif -@@ -485,11 +491,6 @@ char *alloca (); - #endif - - --/* Prototypes for local functions. Needed to ensure compiler checking of -- function argument counts despite of K&R C function definition syntax. */ --static const char *get_sysdep_segment_value PARAMS ((const char *name)); -- -- - /* We need a sign, whether a new catalog was loaded, which can be associated - with all translations. This is important if the translations are - cached by one of GCC's features. */ -@@ -498,8 +499,7 @@ int _nl_msg_cat_cntr; - - /* Expand a system dependent string segment. Return NULL if unsupported. */ - static const char * --get_sysdep_segment_value (name) -- const char *name; -+get_sysdep_segment_value (const char *name) - { - /* Test for an ISO C 99 section 7.8.1 format string directive. - Syntax: -@@ -748,6 +748,18 @@ get_sysdep_segment_value (name) - } - } - } -+ /* Test for a glibc specific printf() format directive flag. */ -+ if (name[0] == 'I' && name[1] == '\0') -+ { -+#if defined _LIBC || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) -+ /* The 'I' flag, in numeric format directives, replaces ASCII digits -+ with the 'outdigits' defined in the LC_CTYPE locale facet. This is -+ used for Farsi (Persian) and maybe Arabic. */ -+ return "I"; -+#else -+ return ""; -+#endif -+ } - /* Other system dependent strings are not valid. */ - return NULL; - } -@@ -756,10 +768,9 @@ get_sysdep_segment_value (name) - Return the header entry. */ - const char * - internal_function --_nl_init_domain_conv (domain_file, domain, domainbinding) -- struct loaded_l10nfile *domain_file; -- struct loaded_domain *domain; -- struct binding *domainbinding; -+_nl_init_domain_conv (struct loaded_l10nfile *domain_file, -+ struct loaded_domain *domain, -+ struct binding *domainbinding) - { - /* Find out about the character set the file is encoded with. - This can be found (in textual form) in the entry "". If this -@@ -820,10 +831,10 @@ _nl_init_domain_conv (domain_file, domai - if (outcharset == NULL || outcharset[0] == '\0') - { - # ifdef _LIBC -- outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string; -+ outcharset = _NL_CURRENT (LC_CTYPE, CODESET); - # else - # if HAVE_ICONV -- extern const char *locale_charset PARAMS ((void)); -+ extern const char *locale_charset (void); - outcharset = locale_charset (); - # endif - # endif -@@ -875,8 +886,7 @@ _nl_init_domain_conv (domain_file, domai - /* Frees the codeset dependent parts of an opened message catalog. */ - void - internal_function --_nl_free_domain_conv (domain) -- struct loaded_domain *domain; -+_nl_free_domain_conv (struct loaded_domain *domain) - { - if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1) - free (domain->conv_tab); -@@ -896,9 +906,8 @@ _nl_free_domain_conv (domain) - message catalog do nothing. */ - void - internal_function --_nl_load_domain (domain_file, domainbinding) -- struct loaded_l10nfile *domain_file; -- struct binding *domainbinding; -+_nl_load_domain (struct loaded_l10nfile *domain_file, -+ struct binding *domainbinding) - { - int fd; - size_t size; -@@ -1022,10 +1031,11 @@ _nl_load_domain (domain_file, domainbind - - /* Fill in the information about the available tables. */ - revision = W (domain->must_swap, data->revision); -- /* We support only the major revision 0. */ -+ /* We support only the major revisions 0 and 1. */ - switch (revision >> 16) - { - case 0: -+ case 1: - domain->nstrings = W (domain->must_swap, data->nstrings); - domain->orig_tab = (const struct string_desc *) - ((char *) data + W (domain->must_swap, data->orig_tab_offset)); -@@ -1065,12 +1075,13 @@ _nl_load_domain (domain_file, domainbind - const char **sysdep_segment_values; - const nls_uint32 *orig_sysdep_tab; - const nls_uint32 *trans_sysdep_tab; -+ nls_uint32 n_inmem_sysdep_strings; - size_t memneed; - char *mem; - struct sysdep_string_desc *inmem_orig_sysdep_tab; - struct sysdep_string_desc *inmem_trans_sysdep_tab; - nls_uint32 *inmem_hash_tab; -- unsigned int i; -+ unsigned int i, j; - - /* Get the values of the system dependent segments. */ - n_sysdep_segments = -@@ -1105,153 +1116,247 @@ _nl_load_domain (domain_file, domainbind - + W (domain->must_swap, data->trans_sysdep_tab_offset)); - - /* Compute the amount of additional memory needed for the -- system dependent strings and the augmented hash table. */ -- memneed = 2 * n_sysdep_strings -- * sizeof (struct sysdep_string_desc) -- + domain->hash_size * sizeof (nls_uint32); -- for (i = 0; i < 2 * n_sysdep_strings; i++) -+ system dependent strings and the augmented hash table. -+ At the same time, also drop string pairs which refer to -+ an undefined system dependent segment. */ -+ n_inmem_sysdep_strings = 0; -+ memneed = domain->hash_size * sizeof (nls_uint32); -+ for (i = 0; i < n_sysdep_strings; i++) - { -- const struct sysdep_string *sysdep_string = -- (const struct sysdep_string *) -- ((char *) data -- + W (domain->must_swap, -- i < n_sysdep_strings -- ? orig_sysdep_tab[i] -- : trans_sysdep_tab[i - n_sysdep_strings])); -- size_t need = 0; -- const struct segment_pair *p = sysdep_string->segments; -- -- if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END) -- for (p = sysdep_string->segments;; p++) -- { -- nls_uint32 sysdepref; -- -- need += W (domain->must_swap, p->segsize); -- -- sysdepref = W (domain->must_swap, p->sysdepref); -- if (sysdepref == SEGMENTS_END) -- break; -- -- if (sysdepref >= n_sysdep_segments) -+ int valid = 1; -+ size_t needs[2]; -+ -+ for (j = 0; j < 2; j++) -+ { -+ const struct sysdep_string *sysdep_string = -+ (const struct sysdep_string *) -+ ((char *) data -+ + W (domain->must_swap, -+ j == 0 -+ ? orig_sysdep_tab[i] -+ : trans_sysdep_tab[i])); -+ size_t need = 0; -+ const struct segment_pair *p = sysdep_string->segments; -+ -+ if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END) -+ for (p = sysdep_string->segments;; p++) - { -- /* Invalid. */ -- freea (sysdep_segment_values); -- goto invalid; -+ nls_uint32 sysdepref; -+ -+ need += W (domain->must_swap, p->segsize); -+ -+ sysdepref = W (domain->must_swap, p->sysdepref); -+ if (sysdepref == SEGMENTS_END) -+ break; -+ -+ if (sysdepref >= n_sysdep_segments) -+ { -+ /* Invalid. */ -+ freea (sysdep_segment_values); -+ goto invalid; -+ } -+ -+ if (sysdep_segment_values[sysdepref] == NULL) -+ { -+ /* This particular string pair is invalid. */ -+ valid = 0; -+ break; -+ } -+ -+ need += strlen (sysdep_segment_values[sysdepref]); - } - -- need += strlen (sysdep_segment_values[sysdepref]); -- } -- -- memneed += need; -- } -- -- /* Allocate additional memory. */ -- mem = (char *) malloc (memneed); -- if (mem == NULL) -- goto invalid; -- -- domain->malloced = mem; -- inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem; -- mem += n_sysdep_strings * sizeof (struct sysdep_string_desc); -- inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem; -- mem += n_sysdep_strings * sizeof (struct sysdep_string_desc); -- inmem_hash_tab = (nls_uint32 *) mem; -- mem += domain->hash_size * sizeof (nls_uint32); -- -- /* Compute the system dependent strings. */ -- for (i = 0; i < 2 * n_sysdep_strings; i++) -- { -- const struct sysdep_string *sysdep_string = -- (const struct sysdep_string *) -- ((char *) data -- + W (domain->must_swap, -- i < n_sysdep_strings -- ? orig_sysdep_tab[i] -- : trans_sysdep_tab[i - n_sysdep_strings])); -- const char *static_segments = -- (char *) data -- + W (domain->must_swap, sysdep_string->offset); -- const struct segment_pair *p = sysdep_string->segments; -- -- /* Concatenate the segments, and fill -- inmem_orig_sysdep_tab[i] (for i < n_sysdep_strings) and -- inmem_trans_sysdep_tab[i-n_sysdep_strings] (for -- i >= n_sysdep_strings). */ -- -- if (W (domain->must_swap, p->sysdepref) == SEGMENTS_END) -+ needs[j] = need; -+ if (!valid) -+ break; -+ } -+ -+ if (valid) - { -- /* Only one static segment. */ -- inmem_orig_sysdep_tab[i].length = -- W (domain->must_swap, p->segsize); -- inmem_orig_sysdep_tab[i].pointer = static_segments; -- } -- else -- { -- inmem_orig_sysdep_tab[i].pointer = mem; -- -- for (p = sysdep_string->segments;; p++) -- { -- nls_uint32 segsize = -- W (domain->must_swap, p->segsize); -- nls_uint32 sysdepref = -- W (domain->must_swap, p->sysdepref); -- size_t n; -- -- if (segsize > 0) -- { -- memcpy (mem, static_segments, segsize); -- mem += segsize; -- static_segments += segsize; -- } -- -- if (sysdepref == SEGMENTS_END) -- break; -- -- n = strlen (sysdep_segment_values[sysdepref]); -- memcpy (mem, sysdep_segment_values[sysdepref], n); -- mem += n; -- } -- -- inmem_orig_sysdep_tab[i].length = -- mem - inmem_orig_sysdep_tab[i].pointer; -+ n_inmem_sysdep_strings++; -+ memneed += needs[0] + needs[1]; - } - } -- -- /* Compute the augmented hash table. */ -- for (i = 0; i < domain->hash_size; i++) -- inmem_hash_tab[i] = -- W (domain->must_swap_hash_tab, domain->hash_tab[i]); -- for (i = 0; i < n_sysdep_strings; i++) -+ memneed += 2 * n_inmem_sysdep_strings -+ * sizeof (struct sysdep_string_desc); -+ -+ if (n_inmem_sysdep_strings > 0) - { -- const char *msgid = inmem_orig_sysdep_tab[i].pointer; -- nls_uint32 hash_val = hash_string (msgid); -- nls_uint32 idx = hash_val % domain->hash_size; -- nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); -- -- for (;;) -+ unsigned int k; -+ -+ /* Allocate additional memory. */ -+ mem = (char *) malloc (memneed); -+ if (mem == NULL) -+ goto invalid; -+ -+ domain->malloced = mem; -+ inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem; -+ mem += n_inmem_sysdep_strings -+ * sizeof (struct sysdep_string_desc); -+ inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem; -+ mem += n_inmem_sysdep_strings -+ * sizeof (struct sysdep_string_desc); -+ inmem_hash_tab = (nls_uint32 *) mem; -+ mem += domain->hash_size * sizeof (nls_uint32); -+ -+ /* Compute the system dependent strings. */ -+ k = 0; -+ for (i = 0; i < n_sysdep_strings; i++) - { -- if (inmem_hash_tab[idx] == 0) -+ int valid = 1; -+ -+ for (j = 0; j < 2; j++) - { -- /* Hash table entry is empty. Use it. */ -- inmem_hash_tab[idx] = 1 + domain->nstrings + i; -- break; -+ const struct sysdep_string *sysdep_string = -+ (const struct sysdep_string *) -+ ((char *) data -+ + W (domain->must_swap, -+ j == 0 -+ ? orig_sysdep_tab[i] -+ : trans_sysdep_tab[i])); -+ const struct segment_pair *p = -+ sysdep_string->segments; -+ -+ if (W (domain->must_swap, p->sysdepref) -+ != SEGMENTS_END) -+ for (p = sysdep_string->segments;; p++) -+ { -+ nls_uint32 sysdepref; -+ -+ sysdepref = -+ W (domain->must_swap, p->sysdepref); -+ if (sysdepref == SEGMENTS_END) -+ break; -+ -+ if (sysdep_segment_values[sysdepref] == NULL) -+ { -+ /* This particular string pair is -+ invalid. */ -+ valid = 0; -+ break; -+ } -+ } -+ -+ if (!valid) -+ break; - } - -- if (idx >= domain->hash_size - incr) -- idx -= domain->hash_size - incr; -- else -- idx += incr; -+ if (valid) -+ { -+ for (j = 0; j < 2; j++) -+ { -+ const struct sysdep_string *sysdep_string = -+ (const struct sysdep_string *) -+ ((char *) data -+ + W (domain->must_swap, -+ j == 0 -+ ? orig_sysdep_tab[i] -+ : trans_sysdep_tab[i])); -+ const char *static_segments = -+ (char *) data -+ + W (domain->must_swap, sysdep_string->offset); -+ const struct segment_pair *p = -+ sysdep_string->segments; -+ -+ /* Concatenate the segments, and fill -+ inmem_orig_sysdep_tab[k] (for j == 0) and -+ inmem_trans_sysdep_tab[k] (for j == 1). */ -+ -+ struct sysdep_string_desc *inmem_tab_entry = -+ (j == 0 -+ ? inmem_orig_sysdep_tab -+ : inmem_trans_sysdep_tab) -+ + k; -+ -+ if (W (domain->must_swap, p->sysdepref) -+ == SEGMENTS_END) -+ { -+ /* Only one static segment. */ -+ inmem_tab_entry->length = -+ W (domain->must_swap, p->segsize); -+ inmem_tab_entry->pointer = static_segments; -+ } -+ else -+ { -+ inmem_tab_entry->pointer = mem; -+ -+ for (p = sysdep_string->segments;; p++) -+ { -+ nls_uint32 segsize = -+ W (domain->must_swap, p->segsize); -+ nls_uint32 sysdepref = -+ W (domain->must_swap, p->sysdepref); -+ size_t n; -+ -+ if (segsize > 0) -+ { -+ memcpy (mem, static_segments, segsize); -+ mem += segsize; -+ static_segments += segsize; -+ } -+ -+ if (sysdepref == SEGMENTS_END) -+ break; -+ -+ n = strlen (sysdep_segment_values[sysdepref]); -+ memcpy (mem, sysdep_segment_values[sysdepref], n); -+ mem += n; -+ } -+ -+ inmem_tab_entry->length = -+ mem - inmem_tab_entry->pointer; -+ } -+ } -+ -+ k++; -+ } - } -+ if (k != n_inmem_sysdep_strings) -+ abort (); -+ -+ /* Compute the augmented hash table. */ -+ for (i = 0; i < domain->hash_size; i++) -+ inmem_hash_tab[i] = -+ W (domain->must_swap_hash_tab, domain->hash_tab[i]); -+ for (i = 0; i < n_inmem_sysdep_strings; i++) -+ { -+ const char *msgid = inmem_orig_sysdep_tab[i].pointer; -+ nls_uint32 hash_val = hash_string (msgid); -+ nls_uint32 idx = hash_val % domain->hash_size; -+ nls_uint32 incr = -+ 1 + (hash_val % (domain->hash_size - 2)); -+ -+ for (;;) -+ { -+ if (inmem_hash_tab[idx] == 0) -+ { -+ /* Hash table entry is empty. Use it. */ -+ inmem_hash_tab[idx] = 1 + domain->nstrings + i; -+ break; -+ } -+ -+ if (idx >= domain->hash_size - incr) -+ idx -= domain->hash_size - incr; -+ else -+ idx += incr; -+ } -+ } -+ -+ domain->n_sysdep_strings = n_inmem_sysdep_strings; -+ domain->orig_sysdep_tab = inmem_orig_sysdep_tab; -+ domain->trans_sysdep_tab = inmem_trans_sysdep_tab; -+ -+ domain->hash_tab = inmem_hash_tab; -+ domain->must_swap_hash_tab = 0; - } -+ else -+ { -+ domain->n_sysdep_strings = 0; -+ domain->orig_sysdep_tab = NULL; -+ domain->trans_sysdep_tab = NULL; -+ } - - freea (sysdep_segment_values); -- -- domain->n_sysdep_strings = n_sysdep_strings; -- domain->orig_sysdep_tab = inmem_orig_sysdep_tab; -- domain->trans_sysdep_tab = inmem_trans_sysdep_tab; -- -- domain->hash_tab = inmem_hash_tab; -- domain->must_swap_hash_tab = 0; - } - else - { -@@ -1293,8 +1398,7 @@ _nl_load_domain (domain_file, domainbind - #ifdef _LIBC - void - internal_function --_nl_unload_domain (domain) -- struct loaded_domain *domain; -+_nl_unload_domain (struct loaded_domain *domain) - { - if (domain->plural != &__gettext_germanic_plural) - __gettext_free_exp (domain->plural); -diff -r 4216c218ee44 -r e04165992166 intl/localcharset.c ---- a/intl/localcharset.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/localcharset.c Sat May 28 13:45:22 2005 +0000 -@@ -1,6 +1,6 @@ - /* Determine a canonical name for the current locale's character encoding. - -- Copyright (C) 2000-2002 Free Software Foundation, Inc. -+ Copyright (C) 2000-2004 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -22,6 +22,9 @@ - #ifdef HAVE_CONFIG_H - # include - #endif -+ -+/* Specification. */ -+#include "localcharset.h" - - #if HAVE_STDDEF_H - # include -@@ -64,8 +67,14 @@ - # include - #endif - --#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ -- /* Win32, OS/2, DOS */ -+#if ENABLE_RELOCATABLE -+# include "relocatable.h" -+#else -+# define relocate(pathname) (pathname) -+#endif -+ -+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ -+ /* Win32, Cygwin, OS/2, DOS */ - # define ISSLASH(C) ((C) == '/' || (C) == '\\') - #endif - -@@ -77,14 +86,9 @@ - # define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) - #endif - --#ifdef HAVE_GETC_UNLOCKED -+#if HAVE_DECL_GETC_UNLOCKED - # undef getc - # define getc getc_unlocked --#endif -- --#ifdef __cplusplus --/* When compiling with "gcc -x c++", produce a function with C linkage. */ --extern "C" const char * locale_charset (void); - #endif - - /* The following static variable is declared 'volatile' to avoid a -@@ -110,11 +114,17 @@ get_charset_aliases () - cp = charset_aliases; - if (cp == NULL) - { --#if !defined WIN32 -+#if !(defined VMS || defined WIN32) - FILE *fp; -- const char *dir = LIBDIR; -+ const char *dir; - const char *base = "charset.alias"; - char *file_name; -+ -+ /* Make it possible to override the charset.alias location. This is -+ necessary for running the testsuite before "make install". */ -+ dir = getenv ("CHARSETALIASDIR"); -+ if (dir == NULL || dir[0] == '\0') -+ dir = relocate (LIBDIR); - - /* Concatenate dir and base into freshly allocated file_name. */ - { -@@ -137,15 +147,17 @@ get_charset_aliases () - else - { - /* Parse the file's contents. */ -- int c; -- char buf1[50+1]; -- char buf2[50+1]; - char *res_ptr = NULL; - size_t res_size = 0; -- size_t l1, l2; - - for (;;) - { -+ int c; -+ char buf1[50+1]; -+ char buf2[50+1]; -+ size_t l1, l2; -+ char *old_res_ptr; -+ - c = getc (fp); - if (c == EOF) - break; -@@ -166,6 +178,7 @@ get_charset_aliases () - break; - l1 = strlen (buf1); - l2 = strlen (buf2); -+ old_res_ptr = res_ptr; - if (res_size == 0) - { - res_size = l1 + 1 + l2 + 1; -@@ -180,6 +193,8 @@ get_charset_aliases () - { - /* Out of memory. */ - res_size = 0; -+ if (old_res_ptr != NULL) -+ free (old_res_ptr); - break; - } - strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); -@@ -200,11 +215,36 @@ get_charset_aliases () - - #else - -+# if defined VMS -+ /* To avoid the troubles of an extra file charset.alias_vms in the -+ sources of many GNU packages, simply inline the aliases here. */ -+ /* The list of encodings is taken from the OpenVMS 7.3-1 documentation -+ "Compaq C Run-Time Library Reference Manual for OpenVMS systems" -+ section 10.7 "Handling Different Character Sets". */ -+ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" -+ "ISO8859-2" "\0" "ISO-8859-2" "\0" -+ "ISO8859-5" "\0" "ISO-8859-5" "\0" -+ "ISO8859-7" "\0" "ISO-8859-7" "\0" -+ "ISO8859-8" "\0" "ISO-8859-8" "\0" -+ "ISO8859-9" "\0" "ISO-8859-9" "\0" -+ /* Japanese */ -+ "eucJP" "\0" "EUC-JP" "\0" -+ "SJIS" "\0" "SHIFT_JIS" "\0" -+ "DECKANJI" "\0" "DEC-KANJI" "\0" -+ "SDECKANJI" "\0" "EUC-JP" "\0" -+ /* Chinese */ -+ "eucTW" "\0" "EUC-TW" "\0" -+ "DECHANYU" "\0" "DEC-HANYU" "\0" -+ "DECHANZI" "\0" "GB2312" "\0" -+ /* Korean */ -+ "DECKOREAN" "\0" "EUC-KR" "\0"; -+# endif -+ -+# if defined WIN32 - /* To avoid the troubles of installing a separate file in the same - directory as the DLL and of retrieving the DLL's directory at - runtime, simply inline the aliases here. */ - --# if defined WIN32 - cp = "CP936" "\0" "GBK" "\0" - "CP1361" "\0" "JOHAB" "\0" - "CP20127" "\0" "ASCII" "\0" -diff -r 4216c218ee44 -r e04165992166 intl/localcharset.h ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/intl/localcharset.h Sat May 28 13:45:22 2005 +0000 -@@ -0,0 +1,42 @@ -+/* Determine a canonical name for the current locale's character encoding. -+ Copyright (C) 2000-2003 Free Software Foundation, Inc. -+ This file is part of the GNU CHARSET Library. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Library 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Library General Public License for more details. -+ -+ You should have received a copy of the GNU Library General Public -+ License along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ USA. */ -+ -+#ifndef _LOCALCHARSET_H -+#define _LOCALCHARSET_H -+ -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+ -+/* Determine the current locale's character encoding, and canonicalize it -+ into one of the canonical names listed in config.charset. -+ The result must not be freed; it is statically allocated. -+ If the canonical name cannot be determined, the result is a non-canonical -+ name. */ -+extern const char * locale_charset (void); -+ -+ -+#ifdef __cplusplus -+} -+#endif -+ -+ -+#endif /* _LOCALCHARSET_H */ -diff -r 4216c218ee44 -r e04165992166 intl/locale.alias ---- a/intl/locale.alias Sat May 28 13:40:15 2005 +0000 -+++ b/intl/locale.alias Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - # Locale name alias data base. --# Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. -+# Copyright (C) 1996-2001,2003 Free Software Foundation, Inc. - # - # This program is free software; you can redistribute it and/or modify it - # under the terms of the GNU Library General Public License as published -@@ -29,8 +29,8 @@ - - # Packages using this file: - --bokmal no_NO.ISO-8859-1 --bokmål no_NO.ISO-8859-1 -+bokmal nb_NO.ISO-8859-1 -+bokmål nb_NO.ISO-8859-1 - catalan ca_ES.ISO-8859-1 - croatian hr_HR.ISO-8859-2 - czech cs_CZ.ISO-8859-2 -@@ -61,9 +61,9 @@ korean.euc ko_KR.eucKR - korean.euc ko_KR.eucKR - ko_KR ko_KR.eucKR - lithuanian lt_LT.ISO-8859-13 --nb_NO no_NO.ISO-8859-1 --nb_NO.ISO-8859-1 no_NO.ISO-8859-1 --norwegian no_NO.ISO-8859-1 -+no_NO nb_NO.ISO-8859-1 -+no_NO.ISO-8859-1 nb_NO.ISO-8859-1 -+norwegian nb_NO.ISO-8859-1 - nynorsk nn_NO.ISO-8859-1 - polish pl_PL.ISO-8859-2 - portuguese pt_PT.ISO-8859-1 -diff -r 4216c218ee44 -r e04165992166 intl/localealias.c ---- a/intl/localealias.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/localealias.c Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Handle aliases for locale names. -- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. -+ Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -35,17 +35,23 @@ - #include - - #ifdef __GNUC__ -+# undef alloca - # define alloca __builtin_alloca - # define HAVE_ALLOCA 1 - #else --# if defined HAVE_ALLOCA_H || defined _LIBC --# include -+# ifdef _MSC_VER -+# include -+# define alloca _alloca - # else --# ifdef _AIX -+# if defined HAVE_ALLOCA_H || defined _LIBC -+# include -+# else -+# ifdef _AIX - #pragma alloca --# else --# ifndef alloca -+# else -+# ifndef alloca - char *alloca (); -+# endif - # endif - # endif - # endif -@@ -55,6 +61,12 @@ char *alloca (); - #include - - #include "gettextP.h" -+ -+#if ENABLE_RELOCATABLE -+# include "relocatable.h" -+#else -+# define relocate(pathname) (pathname) -+#endif - - /* @@ end of prolog @@ */ - -@@ -98,11 +110,11 @@ __libc_lock_define_initialized (static, - # define freea(p) free (p) - #endif - --#if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED -+#if defined _LIBC_REENTRANT || HAVE_DECL_FGETS_UNLOCKED - # undef fgets - # define fgets(buf, len, s) fgets_unlocked (buf, len, s) - #endif --#if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED -+#if defined _LIBC_REENTRANT || HAVE_DECL_FEOF_UNLOCKED - # undef feof - # define feof(s) feof_unlocked (s) - #endif -@@ -115,25 +127,28 @@ struct alias_map - }; - - --static char *string_space; -+#ifndef _LIBC -+# define libc_freeres_ptr(decl) decl -+#endif -+ -+libc_freeres_ptr (static char *string_space); - static size_t string_space_act; - static size_t string_space_max; --static struct alias_map *map; -+libc_freeres_ptr (static struct alias_map *map); - static size_t nmap; - static size_t maxmap; - - - /* Prototypes for local functions. */ --static size_t read_alias_file PARAMS ((const char *fname, int fname_len)) -+static size_t read_alias_file (const char *fname, int fname_len) - internal_function; --static int extend_alias_table PARAMS ((void)); --static int alias_compare PARAMS ((const struct alias_map *map1, -- const struct alias_map *map2)); -+static int extend_alias_table (void); -+static int alias_compare (const struct alias_map *map1, -+ const struct alias_map *map2); - - - const char * --_nl_expand_alias (name) -- const char *name; -+_nl_expand_alias (const char *name) - { - static const char *locale_alias_path; - struct alias_map *retval; -@@ -156,8 +171,8 @@ _nl_expand_alias (name) - if (nmap > 0) - retval = (struct alias_map *) bsearch (&item, map, nmap, - sizeof (struct alias_map), -- (int (*) PARAMS ((const void *, -- const void *)) -+ (int (*) (const void *, -+ const void *) - ) alias_compare); - else - retval = NULL; -@@ -199,9 +214,7 @@ _nl_expand_alias (name) - - static size_t - internal_function --read_alias_file (fname, fname_len) -- const char *fname; -- int fname_len; -+read_alias_file (const char *fname, int fname_len) - { - FILE *fp; - char *full_fname; -@@ -217,7 +230,7 @@ read_alias_file (fname, fname_len) - memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile); - #endif - -- fp = fopen (full_fname, "r"); -+ fp = fopen (relocate (full_fname), "r"); - freea (full_fname); - if (fp == NULL) - return 0; -@@ -234,8 +247,10 @@ read_alias_file (fname, fname_len) - a) we are only interested in the first two fields - b) these fields must be usable as file names and so must not - be that long -- */ -- char buf[BUFSIZ]; -+ We avoid a multi-kilobyte buffer here since this would use up -+ stack space which we might not have if the program ran out of -+ memory. */ -+ char buf[400]; - char *alias; - char *value; - char *cp; -@@ -243,19 +258,6 @@ read_alias_file (fname, fname_len) - if (FGETS (buf, sizeof buf, fp) == NULL) - /* EOF reached. */ - break; -- -- /* Possibly not the whole line fits into the buffer. Ignore -- the rest of the line. */ -- if (strchr (buf, '\n') == NULL) -- { -- char altbuf[BUFSIZ]; -- do -- if (FGETS (altbuf, sizeof altbuf, fp) == NULL) -- /* Make sure the inner loop will be left. The outer loop -- will exit at the `feof' test. */ -- break; -- while (strchr (altbuf, '\n') == NULL); -- } - - cp = buf; - /* Ignore leading white space. */ -@@ -340,6 +342,14 @@ read_alias_file (fname, fname_len) - ++added; - } - } -+ -+ /* Possibly not the whole line fits into the buffer. Ignore -+ the rest of the line. */ -+ while (strchr (buf, '\n') == NULL) -+ if (FGETS (buf, sizeof buf, fp) == NULL) -+ /* Make sure the inner loop will be left. The outer loop -+ will exit at the `feof' test. */ -+ break; - } - - /* Should we test for ferror()? I think we have to silently ignore -@@ -348,7 +358,7 @@ read_alias_file (fname, fname_len) - - if (added > 0) - qsort (map, nmap, sizeof (struct alias_map), -- (int (*) PARAMS ((const void *, const void *))) alias_compare); -+ (int (*) (const void *, const void *)) alias_compare); - - return added; - } -@@ -373,23 +383,8 @@ extend_alias_table () - } - - --#ifdef _LIBC --static void __attribute__ ((unused)) --free_mem (void) --{ -- if (string_space != NULL) -- free (string_space); -- if (map != NULL) -- free (map); --} --text_set_element (__libc_subfreeres, free_mem); --#endif -- -- - static int --alias_compare (map1, map2) -- const struct alias_map *map1; -- const struct alias_map *map2; -+alias_compare (const struct alias_map *map1, const struct alias_map *map2) - { - #if defined _LIBC || defined HAVE_STRCASECMP - return strcasecmp (map1->alias, map2->alias); -diff -r 4216c218ee44 -r e04165992166 intl/localename.c ---- a/intl/localename.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/localename.c Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Determine the current selected locale. -- Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc. -+ Copyright (C) 1995-1999, 2000-2005 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -18,6 +18,7 @@ - - /* Written by Ulrich Drepper , 1995. */ - /* Win32 code written by Tor Lillqvist . */ -+/* MacOS X code written by Bruno Haible . */ - - #ifdef HAVE_CONFIG_H - # include -@@ -25,6 +26,16 @@ - - #include - #include -+ -+#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE -+# include -+# include -+# if HAVE_CFLOCALECOPYCURRENT -+# include -+# elif HAVE_CFPREFERENCESCOPYAPPVALUE -+# include -+# endif -+#endif - - #if defined _WIN32 || defined __WIN32__ - # undef WIN32 /* avoid warning on mingw32 */ -@@ -34,6 +45,124 @@ - #ifdef WIN32 - # define WIN32_LEAN_AND_MEAN - # include -+/* List of language codes, sorted by value: -+ 0x01 LANG_ARABIC -+ 0x02 LANG_BULGARIAN -+ 0x03 LANG_CATALAN -+ 0x04 LANG_CHINESE -+ 0x05 LANG_CZECH -+ 0x06 LANG_DANISH -+ 0x07 LANG_GERMAN -+ 0x08 LANG_GREEK -+ 0x09 LANG_ENGLISH -+ 0x0a LANG_SPANISH -+ 0x0b LANG_FINNISH -+ 0x0c LANG_FRENCH -+ 0x0d LANG_HEBREW -+ 0x0e LANG_HUNGARIAN -+ 0x0f LANG_ICELANDIC -+ 0x10 LANG_ITALIAN -+ 0x11 LANG_JAPANESE -+ 0x12 LANG_KOREAN -+ 0x13 LANG_DUTCH -+ 0x14 LANG_NORWEGIAN -+ 0x15 LANG_POLISH -+ 0x16 LANG_PORTUGUESE -+ 0x17 LANG_RHAETO_ROMANCE -+ 0x18 LANG_ROMANIAN -+ 0x19 LANG_RUSSIAN -+ 0x1a LANG_CROATIAN == LANG_SERBIAN -+ 0x1b LANG_SLOVAK -+ 0x1c LANG_ALBANIAN -+ 0x1d LANG_SWEDISH -+ 0x1e LANG_THAI -+ 0x1f LANG_TURKISH -+ 0x20 LANG_URDU -+ 0x21 LANG_INDONESIAN -+ 0x22 LANG_UKRAINIAN -+ 0x23 LANG_BELARUSIAN -+ 0x24 LANG_SLOVENIAN -+ 0x25 LANG_ESTONIAN -+ 0x26 LANG_LATVIAN -+ 0x27 LANG_LITHUANIAN -+ 0x28 LANG_TAJIK -+ 0x29 LANG_FARSI -+ 0x2a LANG_VIETNAMESE -+ 0x2b LANG_ARMENIAN -+ 0x2c LANG_AZERI -+ 0x2d LANG_BASQUE -+ 0x2e LANG_SORBIAN -+ 0x2f LANG_MACEDONIAN -+ 0x30 LANG_SUTU -+ 0x31 LANG_TSONGA -+ 0x32 LANG_TSWANA -+ 0x33 LANG_VENDA -+ 0x34 LANG_XHOSA -+ 0x35 LANG_ZULU -+ 0x36 LANG_AFRIKAANS -+ 0x37 LANG_GEORGIAN -+ 0x38 LANG_FAEROESE -+ 0x39 LANG_HINDI -+ 0x3a LANG_MALTESE -+ 0x3b LANG_SAAMI -+ 0x3c LANG_GAELIC -+ 0x3d LANG_YIDDISH -+ 0x3e LANG_MALAY -+ 0x3f LANG_KAZAK -+ 0x40 LANG_KYRGYZ -+ 0x41 LANG_SWAHILI -+ 0x42 LANG_TURKMEN -+ 0x43 LANG_UZBEK -+ 0x44 LANG_TATAR -+ 0x45 LANG_BENGALI -+ 0x46 LANG_PUNJABI -+ 0x47 LANG_GUJARATI -+ 0x48 LANG_ORIYA -+ 0x49 LANG_TAMIL -+ 0x4a LANG_TELUGU -+ 0x4b LANG_KANNADA -+ 0x4c LANG_MALAYALAM -+ 0x4d LANG_ASSAMESE -+ 0x4e LANG_MARATHI -+ 0x4f LANG_SANSKRIT -+ 0x50 LANG_MONGOLIAN -+ 0x51 LANG_TIBETAN -+ 0x52 LANG_WELSH -+ 0x53 LANG_CAMBODIAN -+ 0x54 LANG_LAO -+ 0x55 LANG_BURMESE -+ 0x56 LANG_GALICIAN -+ 0x57 LANG_KONKANI -+ 0x58 LANG_MANIPURI -+ 0x59 LANG_SINDHI -+ 0x5a LANG_SYRIAC -+ 0x5b LANG_SINHALESE -+ 0x5c LANG_CHEROKEE -+ 0x5d LANG_INUKTITUT -+ 0x5e LANG_AMHARIC -+ 0x5f LANG_TAMAZIGHT -+ 0x60 LANG_KASHMIRI -+ 0x61 LANG_NEPALI -+ 0x62 LANG_FRISIAN -+ 0x63 LANG_PASHTO -+ 0x64 LANG_TAGALOG -+ 0x65 LANG_DIVEHI -+ 0x66 LANG_EDO -+ 0x67 LANG_FULFULDE -+ 0x68 LANG_HAUSA -+ 0x69 LANG_IBIBIO -+ 0x6a LANG_YORUBA -+ 0x70 LANG_IGBO -+ 0x71 LANG_KANURI -+ 0x72 LANG_OROMO -+ 0x73 LANG_TIGRINYA -+ 0x74 LANG_GUARANI -+ 0x75 LANG_HAWAIIAN -+ 0x76 LANG_LATIN -+ 0x77 LANG_SOMALI -+ 0x78 LANG_YI -+ 0x79 LANG_PAPIAMENTU -+*/ - /* Mingw headers don't have latest language and sublanguage codes. */ - # ifndef LANG_AFRIKAANS - # define LANG_AFRIKAANS 0x36 -@@ -41,6 +170,9 @@ - # ifndef LANG_ALBANIAN - # define LANG_ALBANIAN 0x1c - # endif -+# ifndef LANG_AMHARIC -+# define LANG_AMHARIC 0x5e -+# endif - # ifndef LANG_ARABIC - # define LANG_ARABIC 0x01 - # endif -@@ -62,12 +194,24 @@ - # ifndef LANG_BENGALI - # define LANG_BENGALI 0x45 - # endif -+# ifndef LANG_BURMESE -+# define LANG_BURMESE 0x55 -+# endif -+# ifndef LANG_CAMBODIAN -+# define LANG_CAMBODIAN 0x53 -+# endif - # ifndef LANG_CATALAN - # define LANG_CATALAN 0x03 - # endif -+# ifndef LANG_CHEROKEE -+# define LANG_CHEROKEE 0x5c -+# endif - # ifndef LANG_DIVEHI - # define LANG_DIVEHI 0x65 - # endif -+# ifndef LANG_EDO -+# define LANG_EDO 0x66 -+# endif - # ifndef LANG_ESTONIAN - # define LANG_ESTONIAN 0x25 - # endif -@@ -77,27 +221,57 @@ - # ifndef LANG_FARSI - # define LANG_FARSI 0x29 - # endif -+# ifndef LANG_FRISIAN -+# define LANG_FRISIAN 0x62 -+# endif -+# ifndef LANG_FULFULDE -+# define LANG_FULFULDE 0x67 -+# endif -+# ifndef LANG_GAELIC -+# define LANG_GAELIC 0x3c -+# endif - # ifndef LANG_GALICIAN - # define LANG_GALICIAN 0x56 - # endif - # ifndef LANG_GEORGIAN - # define LANG_GEORGIAN 0x37 - # endif -+# ifndef LANG_GUARANI -+# define LANG_GUARANI 0x74 -+# endif - # ifndef LANG_GUJARATI - # define LANG_GUJARATI 0x47 - # endif -+# ifndef LANG_HAUSA -+# define LANG_HAUSA 0x68 -+# endif -+# ifndef LANG_HAWAIIAN -+# define LANG_HAWAIIAN 0x75 -+# endif - # ifndef LANG_HEBREW - # define LANG_HEBREW 0x0d - # endif - # ifndef LANG_HINDI - # define LANG_HINDI 0x39 - # endif -+# ifndef LANG_IBIBIO -+# define LANG_IBIBIO 0x69 -+# endif -+# ifndef LANG_IGBO -+# define LANG_IGBO 0x70 -+# endif - # ifndef LANG_INDONESIAN - # define LANG_INDONESIAN 0x21 - # endif -+# ifndef LANG_INUKTITUT -+# define LANG_INUKTITUT 0x5d -+# endif - # ifndef LANG_KANNADA - # define LANG_KANNADA 0x4b - # endif -+# ifndef LANG_KANURI -+# define LANG_KANURI 0x71 -+# endif - # ifndef LANG_KASHMIRI - # define LANG_KASHMIRI 0x60 - # endif -@@ -110,6 +284,12 @@ - # ifndef LANG_KYRGYZ - # define LANG_KYRGYZ 0x40 - # endif -+# ifndef LANG_LAO -+# define LANG_LAO 0x54 -+# endif -+# ifndef LANG_LATIN -+# define LANG_LATIN 0x76 -+# endif - # ifndef LANG_LATVIAN - # define LANG_LATVIAN 0x26 - # endif -@@ -125,6 +305,9 @@ - # ifndef LANG_MALAYALAM - # define LANG_MALAYALAM 0x4c - # endif -+# ifndef LANG_MALTESE -+# define LANG_MALTESE 0x3a -+# endif - # ifndef LANG_MANIPURI - # define LANG_MANIPURI 0x58 - # endif -@@ -140,9 +323,24 @@ - # ifndef LANG_ORIYA - # define LANG_ORIYA 0x48 - # endif -+# ifndef LANG_OROMO -+# define LANG_OROMO 0x72 -+# endif -+# ifndef LANG_PAPIAMENTU -+# define LANG_PAPIAMENTU 0x79 -+# endif -+# ifndef LANG_PASHTO -+# define LANG_PASHTO 0x63 -+# endif - # ifndef LANG_PUNJABI - # define LANG_PUNJABI 0x46 - # endif -+# ifndef LANG_RHAETO_ROMANCE -+# define LANG_RHAETO_ROMANCE 0x17 -+# endif -+# ifndef LANG_SAAMI -+# define LANG_SAAMI 0x3b -+# endif - # ifndef LANG_SANSKRIT - # define LANG_SANSKRIT 0x4f - # endif -@@ -152,18 +350,36 @@ - # ifndef LANG_SINDHI - # define LANG_SINDHI 0x59 - # endif -+# ifndef LANG_SINHALESE -+# define LANG_SINHALESE 0x5b -+# endif - # ifndef LANG_SLOVAK - # define LANG_SLOVAK 0x1b - # endif -+# ifndef LANG_SOMALI -+# define LANG_SOMALI 0x77 -+# endif - # ifndef LANG_SORBIAN - # define LANG_SORBIAN 0x2e - # endif -+# ifndef LANG_SUTU -+# define LANG_SUTU 0x30 -+# endif - # ifndef LANG_SWAHILI - # define LANG_SWAHILI 0x41 - # endif - # ifndef LANG_SYRIAC - # define LANG_SYRIAC 0x5a - # endif -+# ifndef LANG_TAGALOG -+# define LANG_TAGALOG 0x64 -+# endif -+# ifndef LANG_TAJIK -+# define LANG_TAJIK 0x28 -+# endif -+# ifndef LANG_TAMAZIGHT -+# define LANG_TAMAZIGHT 0x5f -+# endif - # ifndef LANG_TAMIL - # define LANG_TAMIL 0x49 - # endif -@@ -176,6 +392,21 @@ - # ifndef LANG_THAI - # define LANG_THAI 0x1e - # endif -+# ifndef LANG_TIBETAN -+# define LANG_TIBETAN 0x51 -+# endif -+# ifndef LANG_TIGRINYA -+# define LANG_TIGRINYA 0x73 -+# endif -+# ifndef LANG_TSONGA -+# define LANG_TSONGA 0x31 -+# endif -+# ifndef LANG_TSWANA -+# define LANG_TSWANA 0x32 -+# endif -+# ifndef LANG_TURKMEN -+# define LANG_TURKMEN 0x42 -+# endif - # ifndef LANG_UKRAINIAN - # define LANG_UKRAINIAN 0x22 - # endif -@@ -185,9 +416,30 @@ - # ifndef LANG_UZBEK - # define LANG_UZBEK 0x43 - # endif -+# ifndef LANG_VENDA -+# define LANG_VENDA 0x33 -+# endif - # ifndef LANG_VIETNAMESE - # define LANG_VIETNAMESE 0x2a - # endif -+# ifndef LANG_WELSH -+# define LANG_WELSH 0x52 -+# endif -+# ifndef LANG_XHOSA -+# define LANG_XHOSA 0x34 -+# endif -+# ifndef LANG_YI -+# define LANG_YI 0x78 -+# endif -+# ifndef LANG_YIDDISH -+# define LANG_YIDDISH 0x3d -+# endif -+# ifndef LANG_YORUBA -+# define LANG_YORUBA 0x6a -+# endif -+# ifndef LANG_ZULU -+# define LANG_ZULU 0x35 -+# endif - # ifndef SUBLANG_ARABIC_SAUDI_ARABIA - # define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 - # endif -@@ -242,6 +494,12 @@ - # ifndef SUBLANG_AZERI_CYRILLIC - # define SUBLANG_AZERI_CYRILLIC 0x02 - # endif -+# ifndef SUBLANG_BENGALI_INDIA -+# define SUBLANG_BENGALI_INDIA 0x00 -+# endif -+# ifndef SUBLANG_BENGALI_BANGLADESH -+# define SUBLANG_BENGALI_BANGLADESH 0x01 -+# endif - # ifndef SUBLANG_CHINESE_MACAU - # define SUBLANG_CHINESE_MACAU 0x05 - # endif -@@ -266,12 +524,54 @@ - # ifndef SUBLANG_ENGLISH_PHILIPPINES - # define SUBLANG_ENGLISH_PHILIPPINES 0x0d - # endif -+# ifndef SUBLANG_ENGLISH_INDONESIA -+# define SUBLANG_ENGLISH_INDONESIA 0x0e -+# endif -+# ifndef SUBLANG_ENGLISH_HONGKONG -+# define SUBLANG_ENGLISH_HONGKONG 0x0f -+# endif -+# ifndef SUBLANG_ENGLISH_INDIA -+# define SUBLANG_ENGLISH_INDIA 0x10 -+# endif -+# ifndef SUBLANG_ENGLISH_MALAYSIA -+# define SUBLANG_ENGLISH_MALAYSIA 0x11 -+# endif -+# ifndef SUBLANG_ENGLISH_SINGAPORE -+# define SUBLANG_ENGLISH_SINGAPORE 0x12 -+# endif - # ifndef SUBLANG_FRENCH_LUXEMBOURG - # define SUBLANG_FRENCH_LUXEMBOURG 0x05 - # endif - # ifndef SUBLANG_FRENCH_MONACO - # define SUBLANG_FRENCH_MONACO 0x06 - # endif -+# ifndef SUBLANG_FRENCH_WESTINDIES -+# define SUBLANG_FRENCH_WESTINDIES 0x07 -+# endif -+# ifndef SUBLANG_FRENCH_REUNION -+# define SUBLANG_FRENCH_REUNION 0x08 -+# endif -+# ifndef SUBLANG_FRENCH_CONGO -+# define SUBLANG_FRENCH_CONGO 0x09 -+# endif -+# ifndef SUBLANG_FRENCH_SENEGAL -+# define SUBLANG_FRENCH_SENEGAL 0x0a -+# endif -+# ifndef SUBLANG_FRENCH_CAMEROON -+# define SUBLANG_FRENCH_CAMEROON 0x0b -+# endif -+# ifndef SUBLANG_FRENCH_COTEDIVOIRE -+# define SUBLANG_FRENCH_COTEDIVOIRE 0x0c -+# endif -+# ifndef SUBLANG_FRENCH_MALI -+# define SUBLANG_FRENCH_MALI 0x0d -+# endif -+# ifndef SUBLANG_FRENCH_MOROCCO -+# define SUBLANG_FRENCH_MOROCCO 0x0e -+# endif -+# ifndef SUBLANG_FRENCH_HAITI -+# define SUBLANG_FRENCH_HAITI 0x0f -+# endif - # ifndef SUBLANG_GERMAN_LUXEMBOURG - # define SUBLANG_GERMAN_LUXEMBOURG 0x04 - # endif -@@ -290,12 +590,30 @@ - # ifndef SUBLANG_NEPALI_INDIA - # define SUBLANG_NEPALI_INDIA 0x02 - # endif -+# ifndef SUBLANG_PUNJABI_INDIA -+# define SUBLANG_PUNJABI_INDIA 0x00 -+# endif -+# ifndef SUBLANG_PUNJABI_PAKISTAN -+# define SUBLANG_PUNJABI_PAKISTAN 0x01 -+# endif -+# ifndef SUBLANG_ROMANIAN_ROMANIA -+# define SUBLANG_ROMANIAN_ROMANIA 0x00 -+# endif -+# ifndef SUBLANG_ROMANIAN_MOLDOVA -+# define SUBLANG_ROMANIAN_MOLDOVA 0x01 -+# endif - # ifndef SUBLANG_SERBIAN_LATIN - # define SUBLANG_SERBIAN_LATIN 0x02 - # endif - # ifndef SUBLANG_SERBIAN_CYRILLIC - # define SUBLANG_SERBIAN_CYRILLIC 0x03 - # endif -+# ifndef SUBLANG_SINDHI_INDIA -+# define SUBLANG_SINDHI_INDIA 0x00 -+# endif -+# ifndef SUBLANG_SINDHI_PAKISTAN -+# define SUBLANG_SINDHI_PAKISTAN 0x01 -+# endif - # ifndef SUBLANG_SPANISH_GUATEMALA - # define SUBLANG_SPANISH_GUATEMALA 0x04 - # endif -@@ -350,6 +668,18 @@ - # ifndef SUBLANG_SWEDISH_FINLAND - # define SUBLANG_SWEDISH_FINLAND 0x02 - # endif -+# ifndef SUBLANG_TAMAZIGHT_ARABIC -+# define SUBLANG_TAMAZIGHT_ARABIC 0x01 -+# endif -+# ifndef SUBLANG_TAMAZIGHT_LATIN -+# define SUBLANG_TAMAZIGHT_LATIN 0x02 -+# endif -+# ifndef SUBLANG_TIGRINYA_ETHIOPIA -+# define SUBLANG_TIGRINYA_ETHIOPIA 0x00 -+# endif -+# ifndef SUBLANG_TIGRINYA_ERITREA -+# define SUBLANG_TIGRINYA_ERITREA 0x01 -+# endif - # ifndef SUBLANG_URDU_PAKISTAN - # define SUBLANG_URDU_PAKISTAN 0x01 - # endif -@@ -362,6 +692,280 @@ - # ifndef SUBLANG_UZBEK_CYRILLIC - # define SUBLANG_UZBEK_CYRILLIC 0x02 - # endif -+#endif -+ -+# if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE -+/* MacOS X 10.2 or newer */ -+ -+/* Canonicalize a MacOS X locale name to a Unix locale name. -+ NAME is a sufficiently large buffer. -+ On input, it contains the MacOS X locale name. -+ On output, it contains the Unix locale name. */ -+void -+_nl_locale_name_canonicalize (char *name) -+{ -+ /* This conversion is based on a posting by -+ Deborah GoldSmith on 2005-03-08, -+ http://lists.apple.com/archives/carbon-dev/2005/Mar/msg00293.html */ -+ -+ /* Convert legacy (NeXTstep inherited) English names to Unix (ISO 639 and -+ ISO 3166) names. Prior to MacOS X 10.3, there is no API for doing this. -+ Therefore we do it ourselves, using a table based on the results of the -+ MacOS X 10.3.8 function -+ CFLocaleCreateCanonicalLocaleIdentifierFromString(). */ -+ typedef struct { const char legacy[21+1]; const char unixy[5+1]; } -+ legacy_entry; -+ static const legacy_entry legacy_table[] = { -+ { "Afrikaans", "af" }, -+ { "Albanian", "sq" }, -+ { "Amharic", "am" }, -+ { "Arabic", "ar" }, -+ { "Armenian", "hy" }, -+ { "Assamese", "as" }, -+ { "Aymara", "ay" }, -+ { "Azerbaijani", "az" }, -+ { "Basque", "eu" }, -+ { "Belarusian", "be" }, -+ { "Belorussian", "be" }, -+ { "Bengali", "bn" }, -+ { "Brazilian Portugese", "pt_BR" }, -+ { "Brazilian Portuguese", "pt_BR" }, -+ { "Breton", "br" }, -+ { "Bulgarian", "bg" }, -+ { "Burmese", "my" }, -+ { "Byelorussian", "be" }, -+ { "Catalan", "ca" }, -+ { "Chewa", "ny" }, -+ { "Chichewa", "ny" }, -+ { "Chinese", "zh" }, -+ { "Chinese, Simplified", "zh_CN" }, -+ { "Chinese, Traditional", "zh_TW" }, -+ { "Chinese, Tradtional", "zh_TW" }, -+ { "Croatian", "hr" }, -+ { "Czech", "cs" }, -+ { "Danish", "da" }, -+ { "Dutch", "nl" }, -+ { "Dzongkha", "dz" }, -+ { "English", "en" }, -+ { "Esperanto", "eo" }, -+ { "Estonian", "et" }, -+ { "Faroese", "fo" }, -+ { "Farsi", "fa" }, -+ { "Finnish", "fi" }, -+ { "Flemish", "nl_BE" }, -+ { "French", "fr" }, -+ { "Galician", "gl" }, -+ { "Gallegan", "gl" }, -+ { "Georgian", "ka" }, -+ { "German", "de" }, -+ { "Greek", "el" }, -+ { "Greenlandic", "kl" }, -+ { "Guarani", "gn" }, -+ { "Gujarati", "gu" }, -+ { "Hawaiian", "haw" }, /* Yes, "haw", not "cpe". */ -+ { "Hebrew", "he" }, -+ { "Hindi", "hi" }, -+ { "Hungarian", "hu" }, -+ { "Icelandic", "is" }, -+ { "Indonesian", "id" }, -+ { "Inuktitut", "iu" }, -+ { "Irish", "ga" }, -+ { "Italian", "it" }, -+ { "Japanese", "ja" }, -+ { "Javanese", "jv" }, -+ { "Kalaallisut", "kl" }, -+ { "Kannada", "kn" }, -+ { "Kashmiri", "ks" }, -+ { "Kazakh", "kk" }, -+ { "Khmer", "km" }, -+ { "Kinyarwanda", "rw" }, -+ { "Kirghiz", "ky" }, -+ { "Korean", "ko" }, -+ { "Kurdish", "ku" }, -+ { "Latin", "la" }, -+ { "Latvian", "lv" }, -+ { "Lithuanian", "lt" }, -+ { "Macedonian", "mk" }, -+ { "Malagasy", "mg" }, -+ { "Malay", "ms" }, -+ { "Malayalam", "ml" }, -+ { "Maltese", "mt" }, -+ { "Manx", "gv" }, -+ { "Marathi", "mr" }, -+ { "Moldavian", "mo" }, -+ { "Mongolian", "mn" }, -+ { "Nepali", "ne" }, -+ { "Norwegian", "nb" }, /* Yes, "nb", not the obsolete "no". */ -+ { "Nyanja", "ny" }, -+ { "Nynorsk", "nn" }, -+ { "Oriya", "or" }, -+ { "Oromo", "om" }, -+ { "Panjabi", "pa" }, -+ { "Pashto", "ps" }, -+ { "Persian", "fa" }, -+ { "Polish", "pl" }, -+ { "Portuguese", "pt" }, -+ { "Portuguese, Brazilian", "pt_BR" }, -+ { "Punjabi", "pa" }, -+ { "Pushto", "ps" }, -+ { "Quechua", "qu" }, -+ { "Romanian", "ro" }, -+ { "Ruanda", "rw" }, -+ { "Rundi", "rn" }, -+ { "Russian", "ru" }, -+ { "Sami", "se_NO" }, /* Not just "se". */ -+ { "Sanskrit", "sa" }, -+ { "Scottish", "gd" }, -+ { "Serbian", "sr" }, -+ { "Simplified Chinese", "zh_CN" }, -+ { "Sindhi", "sd" }, -+ { "Sinhalese", "si" }, -+ { "Slovak", "sk" }, -+ { "Slovenian", "sl" }, -+ { "Somali", "so" }, -+ { "Spanish", "es" }, -+ { "Sundanese", "su" }, -+ { "Swahili", "sw" }, -+ { "Swedish", "sv" }, -+ { "Tagalog", "tl" }, -+ { "Tajik", "tg" }, -+ { "Tajiki", "tg" }, -+ { "Tamil", "ta" }, -+ { "Tatar", "tt" }, -+ { "Telugu", "te" }, -+ { "Thai", "th" }, -+ { "Tibetan", "bo" }, -+ { "Tigrinya", "ti" }, -+ { "Tongan", "to" }, -+ { "Traditional Chinese", "zh_TW" }, -+ { "Turkish", "tr" }, -+ { "Turkmen", "tk" }, -+ { "Uighur", "ug" }, -+ { "Ukrainian", "uk" }, -+ { "Urdu", "ur" }, -+ { "Uzbek", "uz" }, -+ { "Vietnamese", "vi" }, -+ { "Welsh", "cy" }, -+ { "Yiddish", "yi" } -+ }; -+ -+ /* Convert new-style locale names with language tags (ISO 639 and ISO 15924) -+ to Unix (ISO 639 and ISO 3166) names. */ -+ typedef struct { const char langtag[7+1]; const char unixy[12+1]; } -+ langtag_entry; -+ static const langtag_entry langtag_table[] = { -+ /* MacOS X has "az-Arab", "az-Cyrl", "az-Latn". -+ The default script for az on Unix is Latin. */ -+ { "az-Latn", "az" }, -+ /* MacOS X has "ga-dots". Does not yet exist on Unix. */ -+ { "ga-dots", "ga" }, -+ /* MacOS X has "kk-Cyrl". Does not yet exist on Unix. */ -+ /* MacOS X has "mn-Cyrl", "mn-Mong". -+ The default script for mn on Unix is Cyrillic. */ -+ { "mn-Cyrl", "mn" }, -+ /* MacOS X has "ms-Arab", "ms-Latn". -+ The default script for ms on Unix is Latin. */ -+ { "ms-Latn", "ms" }, -+ /* MacOS X has "tg-Cyrl". -+ The default script for tg on Unix is Cyrillic. */ -+ { "tg-Cyrl", "tg" }, -+ /* MacOS X has "tk-Cyrl". Does not yet exist on Unix. */ -+ /* MacOS X has "tt-Cyrl". -+ The default script for tt on Unix is Cyrillic. */ -+ { "tt-Cyrl", "tt" }, -+ /* MacOS X has "zh-Hans", "zh-Hant". -+ Country codes are used to distinguish these on Unix. */ -+ { "zh-Hans", "zh_CN" }, -+ { "zh-Hant", "zh_TW" } -+ }; -+ -+ /* Convert script names (ISO 15924) to Unix conventions. -+ See http://www.unicode.org/iso15924/iso15924-codes.html */ -+ typedef struct { const char script[4+1]; const char unixy[9+1]; } -+ script_entry; -+ static const script_entry script_table[] = { -+ { "Arab", "arabic" }, -+ { "Cyrl", "cyrillic" }, -+ { "Mong", "mongolian" } -+ }; -+ -+ /* Step 1: Convert using legacy_table. */ -+ if (name[0] >= 'A' && name[0] <= 'Z') -+ { -+ unsigned int i1, i2; -+ i1 = 0; -+ i2 = sizeof (legacy_table) / sizeof (legacy_entry); -+ while (i2 - i1 > 1) -+ { -+ /* At this point we know that if name occurs in legacy_table, -+ its index must be >= i1 and < i2. */ -+ unsigned int i = (i1 + i2) >> 1; -+ const legacy_entry *p = &legacy_table[i]; -+ if (strcmp (name, p->legacy) < 0) -+ i2 = i; -+ else -+ i1 = i; -+ } -+ if (strcmp (name, legacy_table[i1].legacy) == 0) -+ { -+ strcpy (name, legacy_table[i1].unixy); -+ return; -+ } -+ } -+ -+ /* Step 2: Convert using langtag_table and script_table. */ -+ if (strlen (name) == 7 && name[2] == '-') -+ { -+ unsigned int i1, i2; -+ i1 = 0; -+ i2 = sizeof (langtag_table) / sizeof (langtag_entry); -+ while (i2 - i1 > 1) -+ { -+ /* At this point we know that if name occurs in langtag_table, -+ its index must be >= i1 and < i2. */ -+ unsigned int i = (i1 + i2) >> 1; -+ const langtag_entry *p = &langtag_table[i]; -+ if (strcmp (name, p->langtag) < 0) -+ i2 = i; -+ else -+ i1 = i; -+ } -+ if (strcmp (name, langtag_table[i1].langtag) == 0) -+ { -+ strcpy (name, langtag_table[i1].unixy); -+ return; -+ } -+ -+ i1 = 0; -+ i2 = sizeof (script_table) / sizeof (script_entry); -+ while (i2 - i1 > 1) -+ { -+ /* At this point we know that if (name + 3) occurs in script_table, -+ its index must be >= i1 and < i2. */ -+ unsigned int i = (i1 + i2) >> 1; -+ const script_entry *p = &script_table[i]; -+ if (strcmp (name + 3, p->script) < 0) -+ i2 = i; -+ else -+ i1 = i; -+ } -+ if (strcmp (name + 3, script_table[i1].script) == 0) -+ { -+ name[2] = '@'; -+ strcpy (name + 3, script_table[i1].unixy); -+ return; -+ } -+ } -+ -+ /* Step 3: Convert new-style dash to Unix underscore. */ -+ { -+ char *p; -+ for (p = name; *p != '\0'; p++) -+ if (*p == '-') -+ *p = '_'; -+ } -+} -+ - #endif - - /* XPG3 defines the result of 'setlocale (category, NULL)' as: -@@ -381,131 +985,183 @@ - The result must not be freed; it is statically allocated. */ - - const char * --_nl_locale_name (category, categoryname) -- int category; -- const char *categoryname; -+_nl_locale_name_posix (int category, const char *categoryname) - { -- const char *retval; -- --#ifndef WIN32 -- - /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'. - On some systems this can be done by the 'setlocale' function itself. */ --# if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL -- retval = setlocale (category, NULL); --# else -- /* Setting of LC_ALL overwrites all other. */ -+#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL -+ return setlocale (category, NULL); -+#else -+ const char *retval; -+ -+ /* Setting of LC_ALL overrides all other. */ - retval = getenv ("LC_ALL"); -- if (retval == NULL || retval[0] == '\0') -- { -- /* Next comes the name of the desired category. */ -- retval = getenv (categoryname); -- if (retval == NULL || retval[0] == '\0') -- { -- /* Last possibility is the LANG environment variable. */ -- retval = getenv ("LANG"); -- if (retval == NULL || retval[0] == '\0') -- /* We use C as the default domain. POSIX says this is -- implementation defined. */ -- retval = "C"; -- } -- } --# endif -- -- return retval; -- --#else /* WIN32 */ -+ if (retval != NULL && retval[0] != '\0') -+ return retval; -+ /* Next comes the name of the desired category. */ -+ retval = getenv (categoryname); -+ if (retval != NULL && retval[0] != '\0') -+ return retval; -+ /* Last possibility is the LANG environment variable. */ -+ retval = getenv ("LANG"); -+ if (retval != NULL && retval[0] != '\0') -+ return retval; -+ -+ return NULL; -+#endif -+} -+ -+const char * -+_nl_locale_name_default (void) -+{ -+ /* POSIX:2001 says: -+ "All implementations shall define a locale as the default locale, to be -+ invoked when no environment variables are set, or set to the empty -+ string. This default locale can be the POSIX locale or any other -+ implementation-defined locale. Some implementations may provide -+ facilities for local installation administrators to set the default -+ locale, customizing it for each location. POSIX:2001 does not require -+ such a facility. */ -+ -+#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined(WIN32)) -+ -+ /* The system does not have a way of setting the locale, other than the -+ POSIX specified environment variables. We use C as default locale. */ -+ return "C"; -+ -+#else - - /* Return an XPG style locale name language[_territory][@modifier]. - Don't even bother determining the codeset; it's not useful in this - context, because message catalogs are not specific to a single - codeset. */ - -- LCID lcid; -- LANGID langid; -- int primary, sub; -- -- /* Let the user override the system settings through environment -- variables, as on POSIX systems. */ -- retval = getenv ("LC_ALL"); -- if (retval != NULL && retval[0] != '\0') -- return retval; -- retval = getenv (categoryname); -- if (retval != NULL && retval[0] != '\0') -- return retval; -- retval = getenv ("LANG"); -- if (retval != NULL && retval[0] != '\0') -- return retval; -- -- /* Use native Win32 API locale ID. */ -- lcid = GetThreadLocale (); -- -- /* Strip off the sorting rules, keep only the language part. */ -- langid = LANGIDFROMLCID (lcid); -- -- /* Split into language and territory part. */ -- primary = PRIMARYLANGID (langid); -- sub = SUBLANGID (langid); -- -- /* Dispatch on language. -- See also http://www.unicode.org/unicode/onlinedat/languages.html . -- For details about languages, see http://www.ethnologue.com/ . */ -- switch (primary) -- { -- case LANG_AFRIKAANS: return "af_ZA"; -- case LANG_ALBANIAN: return "sq_AL"; -- case 0x5e: /* AMHARIC */ return "am_ET"; -- case LANG_ARABIC: -- switch (sub) -- { -- case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA"; -- case SUBLANG_ARABIC_IRAQ: return "ar_IQ"; -- case SUBLANG_ARABIC_EGYPT: return "ar_EG"; -- case SUBLANG_ARABIC_LIBYA: return "ar_LY"; -- case SUBLANG_ARABIC_ALGERIA: return "ar_DZ"; -- case SUBLANG_ARABIC_MOROCCO: return "ar_MA"; -- case SUBLANG_ARABIC_TUNISIA: return "ar_TN"; -- case SUBLANG_ARABIC_OMAN: return "ar_OM"; -- case SUBLANG_ARABIC_YEMEN: return "ar_YE"; -- case SUBLANG_ARABIC_SYRIA: return "ar_SY"; -- case SUBLANG_ARABIC_JORDAN: return "ar_JO"; -- case SUBLANG_ARABIC_LEBANON: return "ar_LB"; -- case SUBLANG_ARABIC_KUWAIT: return "ar_KW"; -- case SUBLANG_ARABIC_UAE: return "ar_AE"; -- case SUBLANG_ARABIC_BAHRAIN: return "ar_BH"; -- case SUBLANG_ARABIC_QATAR: return "ar_QA"; -- } -- return "ar"; -- case LANG_ARMENIAN: return "hy_AM"; -- case LANG_ASSAMESE: return "as_IN"; -- case LANG_AZERI: -- switch (sub) -- { -- /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */ -- case SUBLANG_AZERI_LATIN: return "az_AZ@latin"; -- case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic"; -- } -- return "az"; -- case LANG_BASQUE: -- return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */ -- case LANG_BELARUSIAN: return "be_BY"; -- case LANG_BENGALI: return "bn_IN"; -- case LANG_BULGARIAN: return "bg_BG"; -- case 0x55: /* BURMESE */ return "my_MM"; -- case 0x53: /* CAMBODIAN */ return "km_KH"; -- case LANG_CATALAN: return "ca_ES"; -- case 0x5c: /* CHEROKEE */ return "chr_US"; -- case LANG_CHINESE: -- switch (sub) -- { -- case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW"; -- case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN"; -- case SUBLANG_CHINESE_HONGKONG: return "zh_HK"; -- case SUBLANG_CHINESE_SINGAPORE: return "zh_SG"; -- case SUBLANG_CHINESE_MACAU: return "zh_MO"; -- } -- return "zh"; -- case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN -+# if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE -+ /* MacOS X 10.2 or newer */ -+ { -+ /* Cache the locale name, since CoreFoundation calls are expensive. */ -+ static const char *cached_localename; -+ -+ if (cached_localename == NULL) -+ { -+ char namebuf[256]; -+# if HAVE_CFLOCALECOPYCURRENT /* MacOS X 10.3 or newer */ -+ CFLocaleRef locale = CFLocaleCopyCurrent (); -+ CFStringRef name = CFLocaleGetIdentifier (locale); -+ -+ if (CFStringGetCString (name, namebuf, sizeof(namebuf), -+ kCFStringEncodingASCII)) -+ { -+ _nl_locale_name_canonicalize (namebuf); -+ cached_localename = strdup (namebuf); -+ } -+ CFRelease (locale); -+# elif HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */ -+ CFTypeRef value = -+ CFPreferencesCopyAppValue (CFSTR ("AppleLocale"), -+ kCFPreferencesCurrentApplication); -+ if (value != NULL -+ && CFGetTypeID (value) == CFStringGetTypeID () -+ && CFStringGetCString ((CFStringRef)value, namebuf, sizeof(namebuf), -+ kCFStringEncodingASCII)) -+ { -+ _nl_locale_name_canonicalize (namebuf); -+ cached_localename = strdup (namebuf); -+ } -+# endif -+ if (cached_localename == NULL) -+ cached_localename = "C"; -+ } -+ return cached_localename; -+ } -+ -+# endif -+ -+# if defined(WIN32) /* WIN32 */ -+ { -+ LCID lcid; -+ LANGID langid; -+ int primary, sub; -+ -+ /* Use native Win32 API locale ID. */ -+ lcid = GetThreadLocale (); -+ -+ /* Strip off the sorting rules, keep only the language part. */ -+ langid = LANGIDFROMLCID (lcid); -+ -+ /* Split into language and territory part. */ -+ primary = PRIMARYLANGID (langid); -+ sub = SUBLANGID (langid); -+ -+ /* Dispatch on language. -+ See also http://www.unicode.org/unicode/onlinedat/languages.html . -+ For details about languages, see http://www.ethnologue.com/ . */ -+ switch (primary) -+ { -+ case LANG_AFRIKAANS: return "af_ZA"; -+ case LANG_ALBANIAN: return "sq_AL"; -+ case LANG_AMHARIC: return "am_ET"; -+ case LANG_ARABIC: -+ switch (sub) -+ { -+ case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA"; -+ case SUBLANG_ARABIC_IRAQ: return "ar_IQ"; -+ case SUBLANG_ARABIC_EGYPT: return "ar_EG"; -+ case SUBLANG_ARABIC_LIBYA: return "ar_LY"; -+ case SUBLANG_ARABIC_ALGERIA: return "ar_DZ"; -+ case SUBLANG_ARABIC_MOROCCO: return "ar_MA"; -+ case SUBLANG_ARABIC_TUNISIA: return "ar_TN"; -+ case SUBLANG_ARABIC_OMAN: return "ar_OM"; -+ case SUBLANG_ARABIC_YEMEN: return "ar_YE"; -+ case SUBLANG_ARABIC_SYRIA: return "ar_SY"; -+ case SUBLANG_ARABIC_JORDAN: return "ar_JO"; -+ case SUBLANG_ARABIC_LEBANON: return "ar_LB"; -+ case SUBLANG_ARABIC_KUWAIT: return "ar_KW"; -+ case SUBLANG_ARABIC_UAE: return "ar_AE"; -+ case SUBLANG_ARABIC_BAHRAIN: return "ar_BH"; -+ case SUBLANG_ARABIC_QATAR: return "ar_QA"; -+ } -+ return "ar"; -+ case LANG_ARMENIAN: return "hy_AM"; -+ case LANG_ASSAMESE: return "as_IN"; -+ case LANG_AZERI: -+ switch (sub) -+ { -+ /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */ -+ case SUBLANG_AZERI_LATIN: return "az_AZ@latin"; -+ case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic"; -+ } -+ return "az"; -+ case LANG_BASQUE: -+ switch (sub) -+ { -+ case SUBLANG_DEFAULT: return "eu_ES"; -+ } -+ return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */ -+ case LANG_BELARUSIAN: return "be_BY"; -+ case LANG_BENGALI: -+ switch (sub) -+ { -+ case SUBLANG_BENGALI_INDIA: return "bn_IN"; -+ case SUBLANG_BENGALI_BANGLADESH: return "bn_BD"; -+ } -+ return "bn"; -+ case LANG_BULGARIAN: return "bg_BG"; -+ case LANG_BURMESE: return "my_MM"; -+ case LANG_CAMBODIAN: return "km_KH"; -+ case LANG_CATALAN: return "ca_ES"; -+ case LANG_CHEROKEE: return "chr_US"; -+ case LANG_CHINESE: -+ switch (sub) -+ { -+ case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW"; -+ case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN"; -+ case SUBLANG_CHINESE_HONGKONG: return "zh_HK"; -+ case SUBLANG_CHINESE_SINGAPORE: return "zh_SG"; -+ case SUBLANG_CHINESE_MACAU: return "zh_MO"; -+ } -+ return "zh"; -+ case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN - * What used to be called Serbo-Croatian - * should really now be two separate - * languages because of political reasons. -@@ -513,260 +1169,332 @@ _nl_locale_name (category, categoryname) - * or Croatian.) - * (I can feel those flames coming already.) - */ -- switch (sub) -- { -- case SUBLANG_DEFAULT: return "hr_HR"; -- case SUBLANG_SERBIAN_LATIN: return "sr_YU"; -- case SUBLANG_SERBIAN_CYRILLIC: return "sr_YU@cyrillic"; -- } -- return "hr"; -- case LANG_CZECH: return "cs_CZ"; -- case LANG_DANISH: return "da_DK"; -- case LANG_DIVEHI: return "div_MV"; -- case LANG_DUTCH: -- switch (sub) -- { -- case SUBLANG_DUTCH: return "nl_NL"; -- case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE"; -- } -- return "nl"; -- case 0x66: /* EDO */ return "bin_NG"; -- case LANG_ENGLISH: -- switch (sub) -- { -- /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought -- * English was the language spoken in England. -- * Oh well. -- */ -- case SUBLANG_ENGLISH_US: return "en_US"; -- case SUBLANG_ENGLISH_UK: return "en_GB"; -- case SUBLANG_ENGLISH_AUS: return "en_AU"; -- case SUBLANG_ENGLISH_CAN: return "en_CA"; -- case SUBLANG_ENGLISH_NZ: return "en_NZ"; -- case SUBLANG_ENGLISH_EIRE: return "en_IE"; -- case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA"; -- case SUBLANG_ENGLISH_JAMAICA: return "en_JM"; -- case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */ -- case SUBLANG_ENGLISH_BELIZE: return "en_BZ"; -- case SUBLANG_ENGLISH_TRINIDAD: return "en_TT"; -- case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW"; -- case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH"; -- } -- return "en"; -- case LANG_ESTONIAN: return "et_EE"; -- case LANG_FAEROESE: return "fo_FO"; -- case LANG_FARSI: return "fa_IR"; -- case LANG_FINNISH: return "fi_FI"; -- case LANG_FRENCH: -- switch (sub) -- { -- case SUBLANG_FRENCH: return "fr_FR"; -- case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE"; -- case SUBLANG_FRENCH_CANADIAN: return "fr_CA"; -- case SUBLANG_FRENCH_SWISS: return "fr_CH"; -- case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU"; -- case SUBLANG_FRENCH_MONACO: return "fr_MC"; -- } -- return "fr"; -- case 0x62: /* FRISIAN */ return "fy_NL"; -- case 0x67: /* FULFULDE */ return "ful_NG"; -- case 0x3c: /* GAELIC */ -- switch (sub) -- { -- case 0x01: /* SCOTTISH */ return "gd_GB"; -- case 0x02: /* IRISH */ return "ga_IE"; -- } -- return "C"; -- case LANG_GALICIAN: return "gl_ES"; -- case LANG_GEORGIAN: return "ka_GE"; -- case LANG_GERMAN: -- switch (sub) -- { -- case SUBLANG_GERMAN: return "de_DE"; -- case SUBLANG_GERMAN_SWISS: return "de_CH"; -- case SUBLANG_GERMAN_AUSTRIAN: return "de_AT"; -- case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU"; -- case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI"; -- } -- return "de"; -- case LANG_GREEK: return "el_GR"; -- case 0x74: /* GUARANI */ return "gn_PY"; -- case LANG_GUJARATI: return "gu_IN"; -- case 0x68: /* HAUSA */ return "ha_NG"; -- case 0x75: /* HAWAIIAN */ -- /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers) -- or Hawaii Creole English ("cpe_US", 600000 speakers)? */ -- return "cpe_US"; -- case LANG_HEBREW: return "he_IL"; -- case LANG_HINDI: return "hi_IN"; -- case LANG_HUNGARIAN: return "hu_HU"; -- case 0x69: /* IBIBIO */ return "nic_NG"; -- case LANG_ICELANDIC: return "is_IS"; -- case 0x70: /* IGBO */ return "ibo_NG"; -- case LANG_INDONESIAN: return "id_ID"; -- case 0x5d: /* INUKTITUT */ return "iu_CA"; -- case LANG_ITALIAN: -- switch (sub) -- { -- case SUBLANG_ITALIAN: return "it_IT"; -- case SUBLANG_ITALIAN_SWISS: return "it_CH"; -- } -- return "it"; -- case LANG_JAPANESE: return "ja_JP"; -- case LANG_KANNADA: return "kn_IN"; -- case 0x71: /* KANURI */ return "kau_NG"; -- case LANG_KASHMIRI: -- switch (sub) -- { -- case SUBLANG_DEFAULT: return "ks_PK"; -- case SUBLANG_KASHMIRI_INDIA: return "ks_IN"; -- } -- return "ks"; -- case LANG_KAZAK: return "kk_KZ"; -- case LANG_KONKANI: -- /* FIXME: Adjust this when such locales appear on Unix. */ -- return "kok_IN"; -- case LANG_KOREAN: return "ko_KR"; -- case LANG_KYRGYZ: return "ky_KG"; -- case 0x54: /* LAO */ return "lo_LA"; -- case 0x76: /* LATIN */ return "la_VA"; -- case LANG_LATVIAN: return "lv_LV"; -- case LANG_LITHUANIAN: return "lt_LT"; -- case LANG_MACEDONIAN: return "mk_MK"; -- case LANG_MALAY: -- switch (sub) -- { -- case SUBLANG_MALAY_MALAYSIA: return "ms_MY"; -- case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN"; -- } -- return "ms"; -- case LANG_MALAYALAM: return "ml_IN"; -- case 0x3a: /* MALTESE */ return "mt_MT"; -- case LANG_MANIPURI: -- /* FIXME: Adjust this when such locales appear on Unix. */ -- return "mni_IN"; -- case LANG_MARATHI: return "mr_IN"; -- case LANG_MONGOLIAN: -- return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */ -- case LANG_NEPALI: -- switch (sub) -- { -- case SUBLANG_DEFAULT: return "ne_NP"; -- case SUBLANG_NEPALI_INDIA: return "ne_IN"; -- } -- return "ne"; -- case LANG_NORWEGIAN: -- switch (sub) -- { -- case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO"; -- case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO"; -- } -- return "no"; -- case LANG_ORIYA: return "or_IN"; -- case 0x72: /* OROMO */ return "om_ET"; -- case 0x79: /* PAPIAMENTU */ return "pap_AN"; -- case 0x63: /* PASHTO */ -- return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */ -- case LANG_POLISH: return "pl_PL"; -- case LANG_PORTUGUESE: -- switch (sub) -- { -- case SUBLANG_PORTUGUESE: return "pt_PT"; -- /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT. -- Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */ -- case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR"; -- } -- return "pt"; -- case LANG_PUNJABI: return "pa_IN"; -- case 0x17: /* RHAETO-ROMANCE */ return "rm_CH"; -- case LANG_ROMANIAN: return "ro_RO"; -- case LANG_RUSSIAN: -- return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA". */ -- case 0x3b: /* SAMI */ return "se_NO"; -- case LANG_SANSKRIT: return "sa_IN"; -- case LANG_SINDHI: return "sd"; -- case 0x5b: /* SINHALESE */ return "si_LK"; -- case LANG_SLOVAK: return "sk_SK"; -- case LANG_SLOVENIAN: return "sl_SI"; -- case 0x77: /* SOMALI */ return "so_SO"; -- case LANG_SORBIAN: -- /* FIXME: Adjust this when such locales appear on Unix. */ -- return "wen_DE"; -- case LANG_SPANISH: -- switch (sub) -- { -- case SUBLANG_SPANISH: return "es_ES"; -- case SUBLANG_SPANISH_MEXICAN: return "es_MX"; -- case SUBLANG_SPANISH_MODERN: -- return "es_ES@modern"; /* not seen on Unix */ -- case SUBLANG_SPANISH_GUATEMALA: return "es_GT"; -- case SUBLANG_SPANISH_COSTA_RICA: return "es_CR"; -- case SUBLANG_SPANISH_PANAMA: return "es_PA"; -- case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO"; -- case SUBLANG_SPANISH_VENEZUELA: return "es_VE"; -- case SUBLANG_SPANISH_COLOMBIA: return "es_CO"; -- case SUBLANG_SPANISH_PERU: return "es_PE"; -- case SUBLANG_SPANISH_ARGENTINA: return "es_AR"; -- case SUBLANG_SPANISH_ECUADOR: return "es_EC"; -- case SUBLANG_SPANISH_CHILE: return "es_CL"; -- case SUBLANG_SPANISH_URUGUAY: return "es_UY"; -- case SUBLANG_SPANISH_PARAGUAY: return "es_PY"; -- case SUBLANG_SPANISH_BOLIVIA: return "es_BO"; -- case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV"; -- case SUBLANG_SPANISH_HONDURAS: return "es_HN"; -- case SUBLANG_SPANISH_NICARAGUA: return "es_NI"; -- case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR"; -- } -- return "es"; -- case 0x30: /* SUTU */ return "bnt_TZ"; -- case LANG_SWAHILI: return "sw_KE"; -- case LANG_SWEDISH: -- switch (sub) -- { -- case SUBLANG_DEFAULT: return "sv_SE"; -- case SUBLANG_SWEDISH_FINLAND: return "sv_FI"; -- } -- return "sv"; -- case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */ -- case 0x64: /* TAGALOG */ return "tl_PH"; -- case 0x28: /* TAJIK */ return "tg_TJ"; -- case 0x5f: /* TAMAZIGHT */ return "ber_MA"; -- case LANG_TAMIL: -- return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */ -- case LANG_TATAR: return "tt_RU"; -- case LANG_TELUGU: return "te_IN"; -- case LANG_THAI: return "th_TH"; -- case 0x51: /* TIBETAN */ return "bo_CN"; -- case 0x73: /* TIGRINYA */ return "ti_ET"; -- case 0x31: /* TSONGA */ return "ts_ZA"; -- case LANG_TURKISH: return "tr_TR"; -- case 0x42: /* TURKMEN */ return "tk_TM"; -- case LANG_UKRAINIAN: return "uk_UA"; -- case LANG_URDU: -- switch (sub) -- { -- case SUBLANG_URDU_PAKISTAN: return "ur_PK"; -- case SUBLANG_URDU_INDIA: return "ur_IN"; -- } -- return "ur"; -- case LANG_UZBEK: -- switch (sub) -- { -- /* FIXME: Adjust this when Uzbek locales appear on Unix. */ -- case SUBLANG_UZBEK_LATIN: return "uz_UZ@latin"; -- case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic"; -- } -- return "uz"; -- case 0x33: /* VENDA */ return "ven_ZA"; -- case LANG_VIETNAMESE: return "vi_VN"; -- case 0x52: /* WELSH */ return "cy_GB"; -- case 0x34: /* XHOSA */ return "xh_ZA"; -- case 0x78: /* YI */ return "sit_CN"; -- case 0x3d: /* YIDDISH */ return "yi_IL"; -- case 0x6a: /* YORUBA */ return "yo_NG"; -- case 0x35: /* ZULU */ return "zu_ZA"; -- default: return "C"; -- } -- -+ switch (sub) -+ { -+ case SUBLANG_DEFAULT: return "hr_HR"; -+ case SUBLANG_SERBIAN_LATIN: return "sr_CS"; -+ case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic"; -+ } -+ return "hr"; -+ case LANG_CZECH: return "cs_CZ"; -+ case LANG_DANISH: return "da_DK"; -+ case LANG_DIVEHI: return "dv_MV"; -+ case LANG_DUTCH: -+ switch (sub) -+ { -+ case SUBLANG_DUTCH: return "nl_NL"; -+ case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE"; -+ } -+ return "nl"; -+ case LANG_EDO: return "bin_NG"; -+ case LANG_ENGLISH: -+ switch (sub) -+ { -+ /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought -+ * English was the language spoken in England. -+ * Oh well. -+ */ -+ case SUBLANG_ENGLISH_US: return "en_US"; -+ case SUBLANG_ENGLISH_UK: return "en_GB"; -+ case SUBLANG_ENGLISH_AUS: return "en_AU"; -+ case SUBLANG_ENGLISH_CAN: return "en_CA"; -+ case SUBLANG_ENGLISH_NZ: return "en_NZ"; -+ case SUBLANG_ENGLISH_EIRE: return "en_IE"; -+ case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA"; -+ case SUBLANG_ENGLISH_JAMAICA: return "en_JM"; -+ case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */ -+ case SUBLANG_ENGLISH_BELIZE: return "en_BZ"; -+ case SUBLANG_ENGLISH_TRINIDAD: return "en_TT"; -+ case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW"; -+ case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH"; -+ case SUBLANG_ENGLISH_INDONESIA: return "en_ID"; -+ case SUBLANG_ENGLISH_HONGKONG: return "en_HK"; -+ case SUBLANG_ENGLISH_INDIA: return "en_IN"; -+ case SUBLANG_ENGLISH_MALAYSIA: return "en_MY"; -+ case SUBLANG_ENGLISH_SINGAPORE: return "en_SG"; -+ } -+ return "en"; -+ case LANG_ESTONIAN: return "et_EE"; -+ case LANG_FAEROESE: return "fo_FO"; -+ case LANG_FARSI: return "fa_IR"; -+ case LANG_FINNISH: return "fi_FI"; -+ case LANG_FRENCH: -+ switch (sub) -+ { -+ case SUBLANG_FRENCH: return "fr_FR"; -+ case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE"; -+ case SUBLANG_FRENCH_CANADIAN: return "fr_CA"; -+ case SUBLANG_FRENCH_SWISS: return "fr_CH"; -+ case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU"; -+ case SUBLANG_FRENCH_MONACO: return "fr_MC"; -+ case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */ -+ case SUBLANG_FRENCH_REUNION: return "fr_RE"; -+ case SUBLANG_FRENCH_CONGO: return "fr_CG"; -+ case SUBLANG_FRENCH_SENEGAL: return "fr_SN"; -+ case SUBLANG_FRENCH_CAMEROON: return "fr_CM"; -+ case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI"; -+ case SUBLANG_FRENCH_MALI: return "fr_ML"; -+ case SUBLANG_FRENCH_MOROCCO: return "fr_MA"; -+ case SUBLANG_FRENCH_HAITI: return "fr_HT"; -+ } -+ return "fr"; -+ case LANG_FRISIAN: return "fy_NL"; -+ case LANG_FULFULDE: -+ /* Spoken in Nigeria, Guinea, Senegal, Mali, Niger, Cameroon, Benin. */ -+ return "ff_NG"; -+ case LANG_GAELIC: -+ switch (sub) -+ { -+ case 0x01: /* SCOTTISH */ return "gd_GB"; -+ case 0x02: /* IRISH */ return "ga_IE"; -+ } -+ return "C"; -+ case LANG_GALICIAN: return "gl_ES"; -+ case LANG_GEORGIAN: return "ka_GE"; -+ case LANG_GERMAN: -+ switch (sub) -+ { -+ case SUBLANG_GERMAN: return "de_DE"; -+ case SUBLANG_GERMAN_SWISS: return "de_CH"; -+ case SUBLANG_GERMAN_AUSTRIAN: return "de_AT"; -+ case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU"; -+ case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI"; -+ } -+ return "de"; -+ case LANG_GREEK: return "el_GR"; -+ case LANG_GUARANI: return "gn_PY"; -+ case LANG_GUJARATI: return "gu_IN"; -+ case LANG_HAUSA: return "ha_NG"; -+ case LANG_HAWAIIAN: -+ /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers) -+ or Hawaii Creole English ("cpe_US", 600000 speakers)? */ -+ return "cpe_US"; -+ case LANG_HEBREW: return "he_IL"; -+ case LANG_HINDI: return "hi_IN"; -+ case LANG_HUNGARIAN: return "hu_HU"; -+ case LANG_IBIBIO: return "nic_NG"; -+ case LANG_ICELANDIC: return "is_IS"; -+ case LANG_IGBO: return "ig_NG"; -+ case LANG_INDONESIAN: return "id_ID"; -+ case LANG_INUKTITUT: return "iu_CA"; -+ case LANG_ITALIAN: -+ switch (sub) -+ { -+ case SUBLANG_ITALIAN: return "it_IT"; -+ case SUBLANG_ITALIAN_SWISS: return "it_CH"; -+ } -+ return "it"; -+ case LANG_JAPANESE: return "ja_JP"; -+ case LANG_KANNADA: return "kn_IN"; -+ case LANG_KANURI: return "kr_NG"; -+ case LANG_KASHMIRI: -+ switch (sub) -+ { -+ case SUBLANG_DEFAULT: return "ks_PK"; -+ case SUBLANG_KASHMIRI_INDIA: return "ks_IN"; -+ } -+ return "ks"; -+ case LANG_KAZAK: return "kk_KZ"; -+ case LANG_KONKANI: -+ /* FIXME: Adjust this when such locales appear on Unix. */ -+ return "kok_IN"; -+ case LANG_KOREAN: return "ko_KR"; -+ case LANG_KYRGYZ: return "ky_KG"; -+ case LANG_LAO: return "lo_LA"; -+ case LANG_LATIN: return "la_VA"; -+ case LANG_LATVIAN: return "lv_LV"; -+ case LANG_LITHUANIAN: return "lt_LT"; -+ case LANG_MACEDONIAN: return "mk_MK"; -+ case LANG_MALAY: -+ switch (sub) -+ { -+ case SUBLANG_MALAY_MALAYSIA: return "ms_MY"; -+ case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN"; -+ } -+ return "ms"; -+ case LANG_MALAYALAM: return "ml_IN"; -+ case LANG_MALTESE: return "mt_MT"; -+ case LANG_MANIPURI: -+ /* FIXME: Adjust this when such locales appear on Unix. */ -+ return "mni_IN"; -+ case LANG_MARATHI: return "mr_IN"; -+ case LANG_MONGOLIAN: -+ switch (sub) -+ { -+ case SUBLANG_DEFAULT: return "mn_MN"; -+ } -+ return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */ -+ case LANG_NEPALI: -+ switch (sub) -+ { -+ case SUBLANG_DEFAULT: return "ne_NP"; -+ case SUBLANG_NEPALI_INDIA: return "ne_IN"; -+ } -+ return "ne"; -+ case LANG_NORWEGIAN: -+ switch (sub) -+ { -+ case SUBLANG_NORWEGIAN_BOKMAL: return "nb_NO"; -+ case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO"; -+ } -+ return "no"; -+ case LANG_ORIYA: return "or_IN"; -+ case LANG_OROMO: return "om_ET"; -+ case LANG_PAPIAMENTU: return "pap_AN"; -+ case LANG_PASHTO: -+ return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */ -+ case LANG_POLISH: return "pl_PL"; -+ case LANG_PORTUGUESE: -+ switch (sub) -+ { -+ case SUBLANG_PORTUGUESE: return "pt_PT"; -+ /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT. -+ Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */ -+ case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR"; -+ } -+ return "pt"; -+ case LANG_PUNJABI: -+ switch (sub) -+ { -+ case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */ -+ case SUBLANG_PUNJABI_PAKISTAN: return "pa_PK"; /* Arabic script */ -+ } -+ return "pa"; -+ case LANG_RHAETO_ROMANCE: return "rm_CH"; -+ case LANG_ROMANIAN: -+ switch (sub) -+ { -+ case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO"; -+ case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD"; -+ } -+ return "ro"; -+ case LANG_RUSSIAN: -+ switch (sub) -+ { -+ case SUBLANG_DEFAULT: return "ru_RU"; -+ } -+ return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */ -+ case LANG_SAAMI: /* actually Northern Sami */ return "se_NO"; -+ case LANG_SANSKRIT: return "sa_IN"; -+ case LANG_SINDHI: -+ switch (sub) -+ { -+ case SUBLANG_SINDHI_INDIA: return "sd_IN"; -+ case SUBLANG_SINDHI_PAKISTAN: return "sd_PK"; -+ } -+ return "sd"; -+ case LANG_SINHALESE: return "si_LK"; -+ case LANG_SLOVAK: return "sk_SK"; -+ case LANG_SLOVENIAN: return "sl_SI"; -+ case LANG_SOMALI: return "so_SO"; -+ case LANG_SORBIAN: -+ /* FIXME: Adjust this when such locales appear on Unix. */ -+ return "wen_DE"; -+ case LANG_SPANISH: -+ switch (sub) -+ { -+ case SUBLANG_SPANISH: return "es_ES"; -+ case SUBLANG_SPANISH_MEXICAN: return "es_MX"; -+ case SUBLANG_SPANISH_MODERN: -+ return "es_ES@modern"; /* not seen on Unix */ -+ case SUBLANG_SPANISH_GUATEMALA: return "es_GT"; -+ case SUBLANG_SPANISH_COSTA_RICA: return "es_CR"; -+ case SUBLANG_SPANISH_PANAMA: return "es_PA"; -+ case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO"; -+ case SUBLANG_SPANISH_VENEZUELA: return "es_VE"; -+ case SUBLANG_SPANISH_COLOMBIA: return "es_CO"; -+ case SUBLANG_SPANISH_PERU: return "es_PE"; -+ case SUBLANG_SPANISH_ARGENTINA: return "es_AR"; -+ case SUBLANG_SPANISH_ECUADOR: return "es_EC"; -+ case SUBLANG_SPANISH_CHILE: return "es_CL"; -+ case SUBLANG_SPANISH_URUGUAY: return "es_UY"; -+ case SUBLANG_SPANISH_PARAGUAY: return "es_PY"; -+ case SUBLANG_SPANISH_BOLIVIA: return "es_BO"; -+ case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV"; -+ case SUBLANG_SPANISH_HONDURAS: return "es_HN"; -+ case SUBLANG_SPANISH_NICARAGUA: return "es_NI"; -+ case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR"; -+ } -+ return "es"; -+ case LANG_SUTU: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */ -+ case LANG_SWAHILI: return "sw_KE"; -+ case LANG_SWEDISH: -+ switch (sub) -+ { -+ case SUBLANG_DEFAULT: return "sv_SE"; -+ case SUBLANG_SWEDISH_FINLAND: return "sv_FI"; -+ } -+ return "sv"; -+ case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */ -+ case LANG_TAGALOG: return "tl_PH"; -+ case LANG_TAJIK: return "tg_TJ"; -+ case LANG_TAMAZIGHT: -+ switch (sub) -+ { -+ /* FIXME: Adjust this when Tamazight locales appear on Unix. */ -+ case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic"; -+ case SUBLANG_TAMAZIGHT_LATIN: return "ber_MA@latin"; -+ } -+ return "ber_MA"; -+ case LANG_TAMIL: -+ switch (sub) -+ { -+ case SUBLANG_DEFAULT: return "ta_IN"; -+ } -+ return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */ -+ case LANG_TATAR: return "tt_RU"; -+ case LANG_TELUGU: return "te_IN"; -+ case LANG_THAI: return "th_TH"; -+ case LANG_TIBETAN: return "bo_CN"; -+ case LANG_TIGRINYA: -+ switch (sub) -+ { -+ case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET"; -+ case SUBLANG_TIGRINYA_ERITREA: return "ti_ER"; -+ } -+ return "ti"; -+ case LANG_TSONGA: return "ts_ZA"; -+ case LANG_TSWANA: return "tn_BW"; -+ case LANG_TURKISH: return "tr_TR"; -+ case LANG_TURKMEN: return "tk_TM"; -+ case LANG_UKRAINIAN: return "uk_UA"; -+ case LANG_URDU: -+ switch (sub) -+ { -+ case SUBLANG_URDU_PAKISTAN: return "ur_PK"; -+ case SUBLANG_URDU_INDIA: return "ur_IN"; -+ } -+ return "ur"; -+ case LANG_UZBEK: -+ switch (sub) -+ { -+ case SUBLANG_UZBEK_LATIN: return "uz_UZ"; -+ case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic"; -+ } -+ return "uz"; -+ case LANG_VENDA: return "ve_ZA"; -+ case LANG_VIETNAMESE: return "vi_VN"; -+ case LANG_WELSH: return "cy_GB"; -+ case LANG_XHOSA: return "xh_ZA"; -+ case LANG_YI: return "sit_CN"; -+ case LANG_YIDDISH: return "yi_IL"; -+ case LANG_YORUBA: return "yo_NG"; -+ case LANG_ZULU: return "zu_ZA"; -+ default: return "C"; -+ } -+ } -+# endif - #endif - } -+ -+const char * -+_nl_locale_name (int category, const char *categoryname) -+{ -+ const char *retval; -+ -+ retval = _nl_locale_name_posix (category, categoryname); -+ if (retval != NULL) -+ return retval; -+ -+ return _nl_locale_name_default (); -+} -diff -r 4216c218ee44 -r e04165992166 intl/log.c ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/intl/log.c Sat May 28 13:45:22 2005 +0000 -@@ -0,0 +1,98 @@ -+/* Log file output. -+ Copyright (C) 2003 Free Software Foundation, Inc. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Library 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Library General Public License for more details. -+ -+ You should have received a copy of the GNU Library General Public -+ License along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ USA. */ -+ -+/* Written by Bruno Haible . */ -+ -+#ifdef HAVE_CONFIG_H -+# include -+#endif -+ -+#include -+#include -+#include -+ -+/* Print an ASCII string with quotes and escape sequences where needed. */ -+static void -+print_escaped (FILE *stream, const char *str) -+{ -+ putc ('"', stream); -+ for (; *str != '\0'; str++) -+ if (*str == '\n') -+ { -+ fputs ("\\n\"", stream); -+ if (str[1] == '\0') -+ return; -+ fputs ("\n\"", stream); -+ } -+ else -+ { -+ if (*str == '"' || *str == '\\') -+ putc ('\\', stream); -+ putc (*str, stream); -+ } -+ putc ('"', stream); -+} -+ -+/* Add to the log file an entry denoting a failed translation. */ -+void -+_nl_log_untranslated (const char *logfilename, const char *domainname, -+ const char *msgid1, const char *msgid2, int plural) -+{ -+ static char *last_logfilename = NULL; -+ static FILE *last_logfile = NULL; -+ FILE *logfile; -+ -+ /* Can we reuse the last opened logfile? */ -+ if (last_logfilename == NULL || strcmp (logfilename, last_logfilename) != 0) -+ { -+ /* Close the last used logfile. */ -+ if (last_logfilename != NULL) -+ { -+ if (last_logfile != NULL) -+ { -+ fclose (last_logfile); -+ last_logfile = NULL; -+ } -+ free (last_logfilename); -+ last_logfilename = NULL; -+ } -+ /* Open the logfile. */ -+ last_logfilename = (char *) malloc (strlen (logfilename) + 1); -+ if (last_logfilename == NULL) -+ return; -+ strcpy (last_logfilename, logfilename); -+ last_logfile = fopen (logfilename, "a"); -+ if (last_logfile == NULL) -+ return; -+ } -+ logfile = last_logfile; -+ -+ fprintf (logfile, "domain "); -+ print_escaped (logfile, domainname); -+ fprintf (logfile, "\nmsgid "); -+ print_escaped (logfile, msgid1); -+ if (plural) -+ { -+ fprintf (logfile, "\nmsgid_plural "); -+ print_escaped (logfile, msgid2); -+ fprintf (logfile, "\nmsgstr[0] \"\"\n"); -+ } -+ else -+ fprintf (logfile, "\nmsgstr \"\"\n"); -+ putc ('\n', logfile); -+} -diff -r 4216c218ee44 -r e04165992166 intl/ngettext.c ---- a/intl/ngettext.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/ngettext.c Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Implementation of ngettext(3) function. -- Copyright (C) 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc. -+ Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -44,7 +44,7 @@ - prefix. So we have to make a difference here. */ - #ifdef _LIBC - # define NGETTEXT __ngettext --# define DCNGETTEXT INTUSE(__dcngettext) -+# define DCNGETTEXT __dcngettext - #else - # define NGETTEXT libintl_ngettext - # define DCNGETTEXT libintl_dcngettext -@@ -54,10 +54,7 @@ - LC_MESSAGES locale. If not found, returns MSGID itself (the default - text). */ - char * --NGETTEXT (msgid1, msgid2, n) -- const char *msgid1; -- const char *msgid2; -- unsigned long int n; -+NGETTEXT (const char *msgid1, const char *msgid2, unsigned long int n) - { - return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES); - } -diff -r 4216c218ee44 -r e04165992166 intl/plural-exp.c ---- a/intl/plural-exp.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/plural-exp.c Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Expression parsing for plural form selection. -- Copyright (C) 2000, 2001 Free Software Foundation, Inc. -+ Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc. - Written by Ulrich Drepper , 2000. - - This program is free software; you can redistribute it and/or modify it -@@ -96,10 +96,8 @@ init_germanic_plural () - - void - internal_function --EXTRACT_PLURAL_EXPRESSION (nullentry, pluralp, npluralsp) -- const char *nullentry; -- struct expression **pluralp; -- unsigned long int *npluralsp; -+EXTRACT_PLURAL_EXPRESSION (const char *nullentry, struct expression **pluralp, -+ unsigned long int *npluralsp) - { - if (nullentry != NULL) - { -diff -r 4216c218ee44 -r e04165992166 intl/plural-exp.h ---- a/intl/plural-exp.h Sat May 28 13:40:15 2005 +0000 -+++ b/intl/plural-exp.h Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Expression parsing and evaluation for plural form selection. -- Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. -+ Copyright (C) 2000-2003 Free Software Foundation, Inc. - Written by Ulrich Drepper , 2000. - - This program is free software; you can redistribute it and/or modify it -@@ -19,14 +19,6 @@ - - #ifndef _PLURAL_EXP_H - #define _PLURAL_EXP_H -- --#ifndef PARAMS --# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES --# define PARAMS(args) args --# else --# define PARAMS(args) () --# endif --#endif - - #ifndef internal_function - # define internal_function -@@ -109,18 +101,18 @@ struct parse_args - # define EXTRACT_PLURAL_EXPRESSION extract_plural_expression - #endif - --extern void FREE_EXPRESSION PARAMS ((struct expression *exp)) -+extern void FREE_EXPRESSION (struct expression *exp) - internal_function; --extern int PLURAL_PARSE PARAMS ((void *arg)); -+extern int PLURAL_PARSE (void *arg); - extern struct expression GERMANIC_PLURAL attribute_hidden; --extern void EXTRACT_PLURAL_EXPRESSION PARAMS ((const char *nullentry, -- struct expression **pluralp, -- unsigned long int *npluralsp)) -+extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry, -+ struct expression **pluralp, -+ unsigned long int *npluralsp) - internal_function; - - #if !defined (_LIBC) && !defined (IN_LIBINTL) --extern unsigned long int plural_eval PARAMS ((struct expression *pexp, -- unsigned long int n)); -+extern unsigned long int plural_eval (struct expression *pexp, -+ unsigned long int n); - #endif - - #endif /* _PLURAL_EXP_H */ -diff -r 4216c218ee44 -r e04165992166 intl/plural.c ---- a/intl/plural.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/plural.c Sat May 28 13:45:22 2005 +0000 -@@ -1,6 +1,5 @@ -- --/* A Bison parser, made from plural.y -- by GNU Bison version 1.28 */ -+/* A Bison parser, made from plural.y -+ by GNU bison 1.35. */ - - #define YYBISON 1 /* Identify Bison output. */ - -@@ -11,16 +10,16 @@ - #define yychar __gettextchar - #define yydebug __gettextdebug - #define yynerrs __gettextnerrs --#define EQUOP2 257 --#define CMPOP2 258 --#define ADDOP2 259 --#define MULOP2 260 --#define NUMBER 261 -+# define EQUOP2 257 -+# define CMPOP2 258 -+# define ADDOP2 259 -+# define MULOP2 260 -+# define NUMBER 261 - - #line 1 "plural.y" - - /* Expression parsing for plural form selection. -- Copyright (C) 2000, 2001 Free Software Foundation, Inc. -+ Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc. - Written by Ulrich Drepper , 2000. - - This program is free software; you can redistribute it and/or modify it -@@ -64,36 +63,25 @@ - #define YYPARSE_PARAM arg - - #line 49 "plural.y" -+#ifndef YYSTYPE - typedef union { - unsigned long int num; - enum operator op; - struct expression *exp; --} YYSTYPE; -+} yystype; -+# define YYSTYPE yystype -+# define YYSTYPE_IS_TRIVIAL 1 -+#endif - #line 55 "plural.y" - - /* Prototypes for local functions. */ --static struct expression *new_exp PARAMS ((int nargs, enum operator op, -- struct expression * const *args)); --static inline struct expression *new_exp_0 PARAMS ((enum operator op)); --static inline struct expression *new_exp_1 PARAMS ((enum operator op, -- struct expression *right)); --static struct expression *new_exp_2 PARAMS ((enum operator op, -- struct expression *left, -- struct expression *right)); --static inline struct expression *new_exp_3 PARAMS ((enum operator op, -- struct expression *bexp, -- struct expression *tbranch, -- struct expression *fbranch)); --static int yylex PARAMS ((YYSTYPE *lval, const char **pexp)); --static void yyerror PARAMS ((const char *str)); -+static int yylex (YYSTYPE *lval, const char **pexp); -+static void yyerror (const char *str); - - /* Allocation of expressions. */ - - static struct expression * --new_exp (nargs, op, args) -- int nargs; -- enum operator op; -- struct expression * const *args; -+new_exp (int nargs, enum operator op, struct expression * const *args) - { - int i; - struct expression *newp; -@@ -122,16 +110,13 @@ new_exp (nargs, op, args) - } - - static inline struct expression * --new_exp_0 (op) -- enum operator op; -+new_exp_0 (enum operator op) - { - return new_exp (0, op, NULL); - } - - static inline struct expression * --new_exp_1 (op, right) -- enum operator op; -- struct expression *right; -+new_exp_1 (enum operator op, struct expression *right) - { - struct expression *args[1]; - -@@ -140,10 +125,7 @@ new_exp_1 (op, right) - } - - static struct expression * --new_exp_2 (op, left, right) -- enum operator op; -- struct expression *left; -- struct expression *right; -+new_exp_2 (enum operator op, struct expression *left, struct expression *right) - { - struct expression *args[2]; - -@@ -153,11 +135,8 @@ new_exp_2 (op, left, right) - } - - static inline struct expression * --new_exp_3 (op, bexp, tbranch, fbranch) -- enum operator op; -- struct expression *bexp; -- struct expression *tbranch; -- struct expression *fbranch; -+new_exp_3 (enum operator op, struct expression *bexp, -+ struct expression *tbranch, struct expression *fbranch) - { - struct expression *args[3]; - -@@ -167,12 +146,8 @@ new_exp_3 (op, bexp, tbranch, fbranch) - return new_exp (3, op, args); - } - --#include -- --#ifndef __cplusplus --#ifndef __STDC__ --#define const --#endif -+#ifndef YYDEBUG -+# define YYDEBUG 0 - #endif - - -@@ -181,129 +156,152 @@ new_exp_3 (op, bexp, tbranch, fbranch) - #define YYFLAG -32768 - #define YYNTBASE 16 - -+/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ - #define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 18) - --static const char yytranslate[] = { 0, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 10, 2, 2, 2, 2, 5, 2, 14, -- 15, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 12, 2, 2, -- 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -- 2, 2, 2, 2, 2, 1, 6, 7, 8, 9, -- 11 -+/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ -+static const char yytranslate[] = -+{ -+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 10, 2, 2, 2, 2, 5, 2, -+ 14, 15, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 12, 2, -+ 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 13, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 1, 6, 7, 8, -+ 9, 11 - }; - --#if YYDEBUG != 0 --static const short yyprhs[] = { 0, -- 0, 2, 8, 12, 16, 20, 24, 28, 32, 35, -- 37, 39 -+#if YYDEBUG -+static const short yyprhs[] = -+{ -+ 0, 0, 2, 8, 12, 16, 20, 24, 28, 32, -+ 35, 37, 39 - }; -- --static const short yyrhs[] = { 17, -- 0, 17, 3, 17, 12, 17, 0, 17, 4, 17, -- 0, 17, 5, 17, 0, 17, 6, 17, 0, 17, -- 7, 17, 0, 17, 8, 17, 0, 17, 9, 17, -- 0, 10, 17, 0, 13, 0, 11, 0, 14, 17, -- 15, 0 -+static const short yyrhs[] = -+{ -+ 17, 0, 17, 3, 17, 12, 17, 0, 17, 4, -+ 17, 0, 17, 5, 17, 0, 17, 6, 17, 0, -+ 17, 7, 17, 0, 17, 8, 17, 0, 17, 9, -+ 17, 0, 10, 17, 0, 13, 0, 11, 0, 14, -+ 17, 15, 0 - }; - - #endif - --#if YYDEBUG != 0 --static const short yyrline[] = { 0, -- 174, 182, 186, 190, 194, 198, 202, 206, 210, 214, -- 218, 223 -+#if YYDEBUG -+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -+static const short yyrline[] = -+{ -+ 0, 150, 158, 162, 166, 170, 174, 178, 182, 186, -+ 190, 194, 199 - }; - #endif - - --#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) -- --static const char * const yytname[] = { "$","error","$undefined.","'?'","'|'", --"'&'","EQUOP2","CMPOP2","ADDOP2","MULOP2","'!'","NUMBER","':'","'n'","'('","')'", --"start","exp", NULL -+#if (YYDEBUG) || defined YYERROR_VERBOSE -+ -+/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ -+static const char *const yytname[] = -+{ -+ "$", "error", "$undefined.", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2", -+ "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'", -+ "start", "exp", 0 - }; - #endif - --static const short yyr1[] = { 0, -- 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, -- 17, 17 -+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -+static const short yyr1[] = -+{ -+ 0, 16, 17, 17, 17, 17, 17, 17, 17, 17, -+ 17, 17, 17 - }; - --static const short yyr2[] = { 0, -- 1, 5, 3, 3, 3, 3, 3, 3, 2, 1, -- 1, 3 -+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -+static const short yyr2[] = -+{ -+ 0, 1, 5, 3, 3, 3, 3, 3, 3, 2, -+ 1, 1, 3 - }; - --static const short yydefact[] = { 0, -- 0, 11, 10, 0, 1, 9, 0, 0, 0, 0, -- 0, 0, 0, 0, 12, 0, 3, 4, 5, 6, -- 7, 8, 0, 2, 0, 0, 0 -+/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE -+ doesn't specify something else to do. Zero means the default is an -+ error. */ -+static const short yydefact[] = -+{ -+ 0, 0, 11, 10, 0, 1, 9, 0, 0, 0, -+ 0, 0, 0, 0, 0, 12, 0, 3, 4, 5, -+ 6, 7, 8, 0, 2, 0, 0, 0 - }; - --static const short yydefgoto[] = { 25, -- 5 -+static const short yydefgoto[] = -+{ -+ 25, 5 - }; - --static const short yypact[] = { -9, -- -9,-32768,-32768, -9, 34,-32768, 11, -9, -9, -9, -- -9, -9, -9, -9,-32768, 24, 39, 43, 16, 26, -- -3,-32768, -9, 34, 21, 53,-32768 -+static const short yypact[] = -+{ -+ -9, -9,-32768,-32768, -9, 34,-32768, 11, -9, -9, -+ -9, -9, -9, -9, -9,-32768, 24, 39, 43, 16, -+ 26, -3,-32768, -9, 34, 21, 53,-32768 - }; - --static const short yypgoto[] = {-32768, -- -1 -+static const short yypgoto[] = -+{ -+ -32768, -1 - }; - - - #define YYLAST 53 - - --static const short yytable[] = { 6, -- 1, 2, 7, 3, 4, 14, 16, 17, 18, 19, -- 20, 21, 22, 8, 9, 10, 11, 12, 13, 14, -- 26, 24, 12, 13, 14, 15, 8, 9, 10, 11, -- 12, 13, 14, 13, 14, 23, 8, 9, 10, 11, -- 12, 13, 14, 10, 11, 12, 13, 14, 11, 12, -- 13, 14, 27 -+static const short yytable[] = -+{ -+ 6, 1, 2, 7, 3, 4, 14, 16, 17, 18, -+ 19, 20, 21, 22, 8, 9, 10, 11, 12, 13, -+ 14, 26, 24, 12, 13, 14, 15, 8, 9, 10, -+ 11, 12, 13, 14, 13, 14, 23, 8, 9, 10, -+ 11, 12, 13, 14, 10, 11, 12, 13, 14, 11, -+ 12, 13, 14, 27 - }; - --static const short yycheck[] = { 1, -- 10, 11, 4, 13, 14, 9, 8, 9, 10, 11, -- 12, 13, 14, 3, 4, 5, 6, 7, 8, 9, -- 0, 23, 7, 8, 9, 15, 3, 4, 5, 6, -- 7, 8, 9, 8, 9, 12, 3, 4, 5, 6, -- 7, 8, 9, 5, 6, 7, 8, 9, 6, 7, -- 8, 9, 0 -+static const short yycheck[] = -+{ -+ 1, 10, 11, 4, 13, 14, 9, 8, 9, 10, -+ 11, 12, 13, 14, 3, 4, 5, 6, 7, 8, -+ 9, 0, 23, 7, 8, 9, 15, 3, 4, 5, -+ 6, 7, 8, 9, 8, 9, 12, 3, 4, 5, -+ 6, 7, 8, 9, 5, 6, 7, 8, 9, 6, -+ 7, 8, 9, 0 - }; - #define YYPURE 1 - - /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ --#line 3 "/usr/local/share/bison.simple" --/* This file comes from bison-1.28. */ -+#line 3 "/usr/local/share/bison/bison.simple" - - /* Skeleton output parser for bison, -- Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. -+ -+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software -+ Foundation, Inc. - - 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 -@@ -325,62 +323,131 @@ static const short yycheck[] = { 1, - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - --/* This is the parser code that is written into each bison parser -- when the %semantic_parser declaration is not specified in the grammar. -- It was written by Richard Stallman by simplifying the hairy parser -- used when %semantic_parser is specified. */ -- --#ifndef YYSTACK_USE_ALLOCA --#ifdef alloca --#define YYSTACK_USE_ALLOCA --#else /* alloca not defined */ --#ifdef __GNUC__ --#define YYSTACK_USE_ALLOCA --#define alloca __builtin_alloca --#else /* not GNU C. */ --#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) --#define YYSTACK_USE_ALLOCA --#include --#else /* not sparc */ --/* We think this test detects Watcom and Microsoft C. */ --/* This used to test MSDOS, but that is a bad idea -- since that symbol is in the user namespace. */ --#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) --#if 0 /* No need for malloc.h, which pollutes the namespace; -- instead, just don't use alloca. */ --#include --#endif --#else /* not MSDOS, or __TURBOC__ */ --#if defined(_AIX) --/* I don't know what this was needed for, but it pollutes the namespace. -- So I turned it off. rms, 2 May 1997. */ --/* #include */ -- #pragma alloca --#define YYSTACK_USE_ALLOCA --#else /* not MSDOS, or __TURBOC__, or _AIX */ --#if 0 --#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, -- and on HPUX 10. Eventually we can turn this on. */ --#define YYSTACK_USE_ALLOCA --#define alloca __builtin_alloca --#endif /* __hpux */ --#endif --#endif /* not _AIX */ --#endif /* not MSDOS, or __TURBOC__ */ --#endif /* not sparc */ --#endif /* not GNU C */ --#endif /* alloca not defined */ --#endif /* YYSTACK_USE_ALLOCA not defined */ -- --#ifdef YYSTACK_USE_ALLOCA --#define YYSTACK_ALLOC alloca --#else --#define YYSTACK_ALLOC malloc --#endif -- --/* Note: there must be only one dollar sign in this file. -- It is replaced by the list of actions, each action -- as one case of the switch. */ -+/* This is the parser code that is written into each bison parser when -+ the %semantic_parser declaration is not specified in the grammar. -+ It was written by Richard Stallman by simplifying the hairy parser -+ used when %semantic_parser is specified. */ -+ -+/* All symbols defined below should begin with yy or YY, to avoid -+ infringing on user name space. This should be done even for local -+ variables, as they might otherwise be expanded by user macros. -+ There are some unavoidable exceptions within include files to -+ define necessary library symbols; they are noted "INFRINGES ON -+ USER NAME SPACE" below. */ -+ -+#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) -+ -+/* The parser invokes alloca or malloc; define the necessary symbols. */ -+ -+# if YYSTACK_USE_ALLOCA -+# define YYSTACK_ALLOC alloca -+# else -+# ifndef YYSTACK_USE_ALLOCA -+# if defined (alloca) || defined (_ALLOCA_H) -+# define YYSTACK_ALLOC alloca -+# else -+# ifdef __GNUC__ -+# define YYSTACK_ALLOC __builtin_alloca -+# endif -+# endif -+# endif -+# endif -+ -+# ifdef YYSTACK_ALLOC -+ /* Pacify GCC's `empty if-body' warning. */ -+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -+# else -+# if defined (__STDC__) || defined (__cplusplus) -+# include /* INFRINGES ON USER NAME SPACE */ -+# define YYSIZE_T size_t -+# endif -+# define YYSTACK_ALLOC malloc -+# define YYSTACK_FREE free -+# endif -+#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ -+ -+ -+#if (! defined (yyoverflow) \ -+ && (! defined (__cplusplus) \ -+ || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) -+ -+/* A type that is properly aligned for any stack member. */ -+union yyalloc -+{ -+ short yyss; -+ YYSTYPE yyvs; -+# if YYLSP_NEEDED -+ YYLTYPE yyls; -+# endif -+}; -+ -+/* The size of the maximum gap between one aligned stack and the next. */ -+# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) -+ -+/* The size of an array large to enough to hold all stacks, each with -+ N elements. */ -+# if YYLSP_NEEDED -+# define YYSTACK_BYTES(N) \ -+ ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ -+ + 2 * YYSTACK_GAP_MAX) -+# else -+# define YYSTACK_BYTES(N) \ -+ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ -+ + YYSTACK_GAP_MAX) -+# endif -+ -+/* Copy COUNT objects from FROM to TO. The source and destination do -+ not overlap. */ -+# ifndef YYCOPY -+# if 1 < __GNUC__ -+# define YYCOPY(To, From, Count) \ -+ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -+# else -+# define YYCOPY(To, From, Count) \ -+ do \ -+ { \ -+ register YYSIZE_T yyi; \ -+ for (yyi = 0; yyi < (Count); yyi++) \ -+ (To)[yyi] = (From)[yyi]; \ -+ } \ -+ while (0) -+# endif -+# endif -+ -+/* Relocate STACK from its old location to the new one. The -+ local variables YYSIZE and YYSTACKSIZE give the old and new number of -+ elements in the stack, and YYPTR gives the new location of the -+ stack. Advance YYPTR to a properly aligned location for the next -+ stack. */ -+# define YYSTACK_RELOCATE(Stack) \ -+ do \ -+ { \ -+ YYSIZE_T yynewbytes; \ -+ YYCOPY (&yyptr->Stack, Stack, yysize); \ -+ Stack = &yyptr->Stack; \ -+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ -+ yyptr += yynewbytes / sizeof (*yyptr); \ -+ } \ -+ while (0) -+ -+#endif -+ -+ -+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -+# define YYSIZE_T __SIZE_TYPE__ -+#endif -+#if ! defined (YYSIZE_T) && defined (size_t) -+# define YYSIZE_T size_t -+#endif -+#if ! defined (YYSIZE_T) -+# if defined (__STDC__) || defined (__cplusplus) -+# include /* INFRINGES ON USER NAME SPACE */ -+# define YYSIZE_T size_t -+# endif -+#endif -+#if ! defined (YYSIZE_T) -+# define YYSIZE_T unsigned int -+#endif - - #define yyerrok (yyerrstatus = 0) - #define yyclearin (yychar = YYEMPTY) -@@ -389,131 +456,161 @@ static const short yycheck[] = { 1, - #define YYACCEPT goto yyacceptlab - #define YYABORT goto yyabortlab - #define YYERROR goto yyerrlab1 --/* Like YYERROR except do call yyerror. -- This remains here temporarily to ease the -- transition to the new meaning of YYERROR, for GCC. -+/* Like YYERROR except do call yyerror. This remains here temporarily -+ to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ - #define YYFAIL goto yyerrlab - #define YYRECOVERING() (!!yyerrstatus) --#define YYBACKUP(token, value) \ -+#define YYBACKUP(Token, Value) \ - do \ - if (yychar == YYEMPTY && yylen == 1) \ -- { yychar = (token), yylval = (value); \ -+ { \ -+ yychar = (Token); \ -+ yylval = (Value); \ - yychar1 = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ - goto yybackup; \ - } \ - else \ -- { yyerror ("syntax error: cannot back up"); YYERROR; } \ -+ { \ -+ yyerror ("syntax error: cannot back up"); \ -+ YYERROR; \ -+ } \ - while (0) - - #define YYTERROR 1 - #define YYERRCODE 256 - --#ifndef YYPURE --#define YYLEX yylex() --#endif -- --#ifdef YYPURE --#ifdef YYLSP_NEEDED --#ifdef YYLEX_PARAM --#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) --#else --#define YYLEX yylex(&yylval, &yylloc) --#endif --#else /* not YYLSP_NEEDED */ --#ifdef YYLEX_PARAM --#define YYLEX yylex(&yylval, YYLEX_PARAM) --#else --#define YYLEX yylex(&yylval) --#endif --#endif /* not YYLSP_NEEDED */ --#endif -- --/* If nonreentrant, generate the variables here */ -- --#ifndef YYPURE -- --int yychar; /* the lookahead symbol */ --YYSTYPE yylval; /* the semantic value of the */ -- /* lookahead symbol */ -- --#ifdef YYLSP_NEEDED --YYLTYPE yylloc; /* location data for the lookahead */ -- /* symbol */ --#endif -- --int yynerrs; /* number of parse errors so far */ --#endif /* not YYPURE */ -- --#if YYDEBUG != 0 --int yydebug; /* nonzero means print parse trace */ --/* Since this is uninitialized, it does not stop multiple parsers -- from coexisting. */ --#endif -- --/* YYINITDEPTH indicates the initial size of the parser's stacks */ -- -+ -+/* YYLLOC_DEFAULT -- Compute the default location (before the actions -+ are run). -+ -+ When YYLLOC_DEFAULT is run, CURRENT is set the location of the -+ first token. By default, to implement support for ranges, extend -+ its range to the last symbol. */ -+ -+#ifndef YYLLOC_DEFAULT -+# define YYLLOC_DEFAULT(Current, Rhs, N) \ -+ Current.last_line = Rhs[N].last_line; \ -+ Current.last_column = Rhs[N].last_column; -+#endif -+ -+ -+/* YYLEX -- calling `yylex' with the right arguments. */ -+ -+#if YYPURE -+# if YYLSP_NEEDED -+# ifdef YYLEX_PARAM -+# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) -+# else -+# define YYLEX yylex (&yylval, &yylloc) -+# endif -+# else /* !YYLSP_NEEDED */ -+# ifdef YYLEX_PARAM -+# define YYLEX yylex (&yylval, YYLEX_PARAM) -+# else -+# define YYLEX yylex (&yylval) -+# endif -+# endif /* !YYLSP_NEEDED */ -+#else /* !YYPURE */ -+# define YYLEX yylex () -+#endif /* !YYPURE */ -+ -+ -+/* Enable debugging if requested. */ -+#if YYDEBUG -+ -+# ifndef YYFPRINTF -+# include /* INFRINGES ON USER NAME SPACE */ -+# define YYFPRINTF fprintf -+# endif -+ -+# define YYDPRINTF(Args) \ -+do { \ -+ if (yydebug) \ -+ YYFPRINTF Args; \ -+} while (0) -+/* Nonzero means print parse trace. It is left uninitialized so that -+ multiple parsers can coexist. */ -+int yydebug; -+#else /* !YYDEBUG */ -+# define YYDPRINTF(Args) -+#endif /* !YYDEBUG */ -+ -+/* YYINITDEPTH -- initial size of the parser's stacks. */ - #ifndef YYINITDEPTH --#define YYINITDEPTH 200 --#endif -- --/* YYMAXDEPTH is the maximum size the stacks can grow to -- (effective only if the built-in stack extension method is used). */ -+# define YYINITDEPTH 200 -+#endif -+ -+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only -+ if the built-in stack extension method is used). -+ -+ Do not make this value too large; the results are undefined if -+ SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) -+ evaluated with infinite-precision integer arithmetic. */ - - #if YYMAXDEPTH == 0 --#undef YYMAXDEPTH -+# undef YYMAXDEPTH - #endif - - #ifndef YYMAXDEPTH --#define YYMAXDEPTH 10000 -+# define YYMAXDEPTH 10000 - #endif - --/* Define __yy_memcpy. Note that the size argument -- should be passed with type unsigned int, because that is what the non-GCC -- definitions require. With GCC, __builtin_memcpy takes an arg -- of type size_t, but it can handle unsigned int. */ -- --#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ --#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) --#else /* not GNU C or C++ */ --#ifndef __cplusplus -- --/* This is the most reliable way to avoid incompatibilities -- in available built-in functions on various systems. */ --static void --__yy_memcpy (to, from, count) -- char *to; -- char *from; -- unsigned int count; --{ -- register char *f = from; -- register char *t = to; -- register int i = count; -- -- while (i-- > 0) -- *t++ = *f++; -+#ifdef YYERROR_VERBOSE -+ -+# ifndef yystrlen -+# if defined (__GLIBC__) && defined (_STRING_H) -+# define yystrlen strlen -+# else -+/* Return the length of YYSTR. */ -+static YYSIZE_T -+# if defined (__STDC__) || defined (__cplusplus) -+yystrlen (const char *yystr) -+# else -+yystrlen (yystr) -+ const char *yystr; -+# endif -+{ -+ register const char *yys = yystr; -+ -+ while (*yys++ != '\0') -+ continue; -+ -+ return yys - yystr - 1; - } -- --#else /* __cplusplus */ -- --/* This is the most reliable way to avoid incompatibilities -- in available built-in functions on various systems. */ --static void --__yy_memcpy (char *to, char *from, unsigned int count) --{ -- register char *t = to; -- register char *f = from; -- register int i = count; -- -- while (i-- > 0) -- *t++ = *f++; -+# endif -+# endif -+ -+# ifndef yystpcpy -+# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) -+# define yystpcpy stpcpy -+# else -+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in -+ YYDEST. */ -+static char * -+# if defined (__STDC__) || defined (__cplusplus) -+yystpcpy (char *yydest, const char *yysrc) -+# else -+yystpcpy (yydest, yysrc) -+ char *yydest; -+ const char *yysrc; -+# endif -+{ -+ register char *yyd = yydest; -+ register const char *yys = yysrc; -+ -+ while ((*yyd++ = *yys++) != '\0') -+ continue; -+ -+ return yyd - 1; - } -- --#endif -+# endif -+# endif - #endif - --#line 217 "/usr/local/share/bison.simple" -+#line 315 "/usr/local/share/bison/bison.simple" -+ - - /* The user can define YYPARSE_PARAM as the name of an argument to be passed - into yyparse. The argument should have type void *. -@@ -522,76 +619,121 @@ __yy_memcpy (char *to, char *from, unsig - to the proper pointer type. */ - - #ifdef YYPARSE_PARAM --#ifdef __cplusplus --#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM --#define YYPARSE_PARAM_DECL --#else /* not __cplusplus */ --#define YYPARSE_PARAM_ARG YYPARSE_PARAM --#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; --#endif /* not __cplusplus */ --#else /* not YYPARSE_PARAM */ --#define YYPARSE_PARAM_ARG --#define YYPARSE_PARAM_DECL --#endif /* not YYPARSE_PARAM */ -+# if defined (__STDC__) || defined (__cplusplus) -+# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM -+# define YYPARSE_PARAM_DECL -+# else -+# define YYPARSE_PARAM_ARG YYPARSE_PARAM -+# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; -+# endif -+#else /* !YYPARSE_PARAM */ -+# define YYPARSE_PARAM_ARG -+# define YYPARSE_PARAM_DECL -+#endif /* !YYPARSE_PARAM */ - - /* Prevent warning if -Wstrict-prototypes. */ - #ifdef __GNUC__ --#ifdef YYPARSE_PARAM -+# ifdef YYPARSE_PARAM - int yyparse (void *); -+# else -+int yyparse (void); -+# endif -+#endif -+ -+/* YY_DECL_VARIABLES -- depending whether we use a pure parser, -+ variables are global, or local to YYPARSE. */ -+ -+#define YY_DECL_NON_LSP_VARIABLES \ -+/* The lookahead symbol. */ \ -+int yychar; \ -+ \ -+/* The semantic value of the lookahead symbol. */ \ -+YYSTYPE yylval; \ -+ \ -+/* Number of parse errors so far. */ \ -+int yynerrs; -+ -+#if YYLSP_NEEDED -+# define YY_DECL_VARIABLES \ -+YY_DECL_NON_LSP_VARIABLES \ -+ \ -+/* Location data for the lookahead symbol. */ \ -+YYLTYPE yylloc; - #else --int yyparse (void); --#endif --#endif -+# define YY_DECL_VARIABLES \ -+YY_DECL_NON_LSP_VARIABLES -+#endif -+ -+ -+/* If nonreentrant, generate the variables here. */ -+ -+#if !YYPURE -+YY_DECL_VARIABLES -+#endif /* !YYPURE */ - - int --yyparse(YYPARSE_PARAM_ARG) -+yyparse (YYPARSE_PARAM_ARG) - YYPARSE_PARAM_DECL - { -+ /* If reentrant, generate the variables here. */ -+#if YYPURE -+ YY_DECL_VARIABLES -+#endif /* !YYPURE */ -+ - register int yystate; - register int yyn; -+ int yyresult; -+ /* Number of tokens to shift before error messages enabled. */ -+ int yyerrstatus; -+ /* Lookahead token as an internal (translated) token number. */ -+ int yychar1 = 0; -+ -+ /* Three stacks and their tools: -+ `yyss': related to states, -+ `yyvs': related to semantic values, -+ `yyls': related to locations. -+ -+ Refer to the stacks thru separate pointers, to allow yyoverflow -+ to reallocate them elsewhere. */ -+ -+ /* The state stack. */ -+ short yyssa[YYINITDEPTH]; -+ short *yyss = yyssa; - register short *yyssp; -+ -+ /* The semantic value stack. */ -+ YYSTYPE yyvsa[YYINITDEPTH]; -+ YYSTYPE *yyvs = yyvsa; - register YYSTYPE *yyvsp; -- int yyerrstatus; /* number of tokens to shift before error messages enabled */ -- int yychar1 = 0; /* lookahead token as an internal (translated) token number */ -- -- short yyssa[YYINITDEPTH]; /* the state stack */ -- YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ -- -- short *yyss = yyssa; /* refer to the stacks thru separate pointers */ -- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ -- --#ifdef YYLSP_NEEDED -- YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ -+ -+#if YYLSP_NEEDED -+ /* The location stack. */ -+ YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; -- --#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) -+#endif -+ -+#if YYLSP_NEEDED -+# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) - #else --#define YYPOPSTACK (yyvsp--, yyssp--) --#endif -- -- int yystacksize = YYINITDEPTH; -- int yyfree_stacks = 0; -- --#ifdef YYPURE -- int yychar; -- YYSTYPE yylval; -- int yynerrs; --#ifdef YYLSP_NEEDED -- YYLTYPE yylloc; --#endif --#endif -- -- YYSTYPE yyval; /* the variable used to return */ -- /* semantic values from the action */ -- /* routines */ -- -+# define YYPOPSTACK (yyvsp--, yyssp--) -+#endif -+ -+ YYSIZE_T yystacksize = YYINITDEPTH; -+ -+ -+ /* The variables used to return semantic value and location from the -+ action routines. */ -+ YYSTYPE yyval; -+#if YYLSP_NEEDED -+ YYLTYPE yyloc; -+#endif -+ -+ /* When reducing, the number of symbols on the RHS of the reduced -+ rule. */ - int yylen; - --#if YYDEBUG != 0 -- if (yydebug) -- fprintf(stderr, "Starting parse\n"); --#endif -+ YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; -@@ -603,110 +745,110 @@ yyparse(YYPARSE_PARAM_ARG) - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - -- yyssp = yyss - 1; -+ yyssp = yyss; - yyvsp = yyvs; --#ifdef YYLSP_NEEDED -+#if YYLSP_NEEDED - yylsp = yyls; - #endif -- --/* Push a new state, which is found in yystate . */ --/* In all cases, when you get here, the value and location stacks -- have just been pushed. so pushing a state here evens the stacks. */ --yynewstate: -- -- *++yyssp = yystate; -+ goto yysetstate; -+ -+/*------------------------------------------------------------. -+| yynewstate -- Push a new state, which is found in yystate. | -+`------------------------------------------------------------*/ -+ yynewstate: -+ /* In all cases, when you get here, the value and location stacks -+ have just been pushed. so pushing a state here evens the stacks. -+ */ -+ yyssp++; -+ -+ yysetstate: -+ *yyssp = yystate; - - if (yyssp >= yyss + yystacksize - 1) - { -- /* Give user a chance to reallocate the stack */ -- /* Use copies of these so that the &'s don't force the real ones into memory. */ -- YYSTYPE *yyvs1 = yyvs; -- short *yyss1 = yyss; --#ifdef YYLSP_NEEDED -- YYLTYPE *yyls1 = yyls; --#endif -- - /* Get the current used size of the three stacks, in elements. */ -- int size = yyssp - yyss + 1; -+ YYSIZE_T yysize = yyssp - yyss + 1; - - #ifdef yyoverflow -- /* Each stack pointer address is followed by the size of -- the data in use in that stack, in bytes. */ --#ifdef YYLSP_NEEDED -- /* This used to be a conditional around just the two extra args, -- but that might be undefined if yyoverflow is a macro. */ -- yyoverflow("parser stack overflow", -- &yyss1, size * sizeof (*yyssp), -- &yyvs1, size * sizeof (*yyvsp), -- &yyls1, size * sizeof (*yylsp), -- &yystacksize); --#else -- yyoverflow("parser stack overflow", -- &yyss1, size * sizeof (*yyssp), -- &yyvs1, size * sizeof (*yyvsp), -- &yystacksize); --#endif -- -- yyss = yyss1; yyvs = yyvs1; --#ifdef YYLSP_NEEDED -- yyls = yyls1; --#endif -+ { -+ /* Give user a chance to reallocate the stack. Use copies of -+ these so that the &'s don't force the real ones into -+ memory. */ -+ YYSTYPE *yyvs1 = yyvs; -+ short *yyss1 = yyss; -+ -+ /* Each stack pointer address is followed by the size of the -+ data in use in that stack, in bytes. */ -+# if YYLSP_NEEDED -+ YYLTYPE *yyls1 = yyls; -+ /* This used to be a conditional around just the two extra args, -+ but that might be undefined if yyoverflow is a macro. */ -+ yyoverflow ("parser stack overflow", -+ &yyss1, yysize * sizeof (*yyssp), -+ &yyvs1, yysize * sizeof (*yyvsp), -+ &yyls1, yysize * sizeof (*yylsp), -+ &yystacksize); -+ yyls = yyls1; -+# else -+ yyoverflow ("parser stack overflow", -+ &yyss1, yysize * sizeof (*yyssp), -+ &yyvs1, yysize * sizeof (*yyvsp), -+ &yystacksize); -+# endif -+ yyss = yyss1; -+ yyvs = yyvs1; -+ } - #else /* no yyoverflow */ -+# ifndef YYSTACK_RELOCATE -+ goto yyoverflowlab; -+# else - /* Extend the stack our own way. */ - if (yystacksize >= YYMAXDEPTH) -- { -- yyerror("parser stack overflow"); -- if (yyfree_stacks) -- { -- free (yyss); -- free (yyvs); --#ifdef YYLSP_NEEDED -- free (yyls); --#endif -- } -- return 2; -- } -+ goto yyoverflowlab; - yystacksize *= 2; - if (yystacksize > YYMAXDEPTH) - yystacksize = YYMAXDEPTH; --#ifndef YYSTACK_USE_ALLOCA -- yyfree_stacks = 1; --#endif -- yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); -- __yy_memcpy ((char *)yyss, (char *)yyss1, -- size * (unsigned int) sizeof (*yyssp)); -- yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); -- __yy_memcpy ((char *)yyvs, (char *)yyvs1, -- size * (unsigned int) sizeof (*yyvsp)); --#ifdef YYLSP_NEEDED -- yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); -- __yy_memcpy ((char *)yyls, (char *)yyls1, -- size * (unsigned int) sizeof (*yylsp)); --#endif -+ -+ { -+ short *yyss1 = yyss; -+ union yyalloc *yyptr = -+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); -+ if (! yyptr) -+ goto yyoverflowlab; -+ YYSTACK_RELOCATE (yyss); -+ YYSTACK_RELOCATE (yyvs); -+# if YYLSP_NEEDED -+ YYSTACK_RELOCATE (yyls); -+# endif -+# undef YYSTACK_RELOCATE -+ if (yyss1 != yyssa) -+ YYSTACK_FREE (yyss1); -+ } -+# endif - #endif /* no yyoverflow */ - -- yyssp = yyss + size - 1; -- yyvsp = yyvs + size - 1; --#ifdef YYLSP_NEEDED -- yylsp = yyls + size - 1; --#endif -- --#if YYDEBUG != 0 -- if (yydebug) -- fprintf(stderr, "Stack size increased to %d\n", yystacksize); --#endif -+ yyssp = yyss + yysize - 1; -+ yyvsp = yyvs + yysize - 1; -+#if YYLSP_NEEDED -+ yylsp = yyls + yysize - 1; -+#endif -+ -+ YYDPRINTF ((stderr, "Stack size increased to %lu\n", -+ (unsigned long int) yystacksize)); - - if (yyssp >= yyss + yystacksize - 1) - YYABORT; - } - --#if YYDEBUG != 0 -- if (yydebug) -- fprintf(stderr, "Entering state %d\n", yystate); --#endif -+ YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - goto yybackup; -- yybackup: -+ -+ -+/*-----------. -+| yybackup. | -+`-----------*/ -+yybackup: - - /* Do appropriate processing given the current state. */ - /* Read a lookahead token if we need one and don't already have one. */ -@@ -725,10 +867,7 @@ yynewstate: - - if (yychar == YYEMPTY) - { --#if YYDEBUG != 0 -- if (yydebug) -- fprintf(stderr, "Reading a token: "); --#endif -+ YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - -@@ -739,25 +878,25 @@ yynewstate: - yychar1 = 0; - yychar = YYEOF; /* Don't call YYLEX any more */ - --#if YYDEBUG != 0 -- if (yydebug) -- fprintf(stderr, "Now at end of input.\n"); --#endif -+ YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { -- yychar1 = YYTRANSLATE(yychar); -- --#if YYDEBUG != 0 -+ yychar1 = YYTRANSLATE (yychar); -+ -+#if YYDEBUG -+ /* We have to keep this `#if YYDEBUG', since we use variables -+ which are defined only if `YYDEBUG' is set. */ - if (yydebug) - { -- fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); -- /* Give the individual parser a way to print the precise meaning -- of a token, for further debugging info. */ --#ifdef YYPRINT -+ YYFPRINTF (stderr, "Next token is %d (%s", -+ yychar, yytname[yychar1]); -+ /* Give the individual parser a way to print the precise -+ meaning of a token, for further debugging info. */ -+# ifdef YYPRINT - YYPRINT (stderr, yychar, yylval); --#endif -- fprintf (stderr, ")\n"); -+# endif -+ YYFPRINTF (stderr, ")\n"); - } - #endif - } -@@ -789,177 +928,185 @@ yynewstate: - YYACCEPT; - - /* Shift the lookahead token. */ -- --#if YYDEBUG != 0 -- if (yydebug) -- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); --#endif -+ YYDPRINTF ((stderr, "Shifting token %d (%s), ", -+ yychar, yytname[yychar1])); - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; --#ifdef YYLSP_NEEDED -+#if YYLSP_NEEDED - *++yylsp = yylloc; - #endif - -- /* count tokens shifted since error; after three, turn off error status. */ -- if (yyerrstatus) yyerrstatus--; -+ /* Count tokens shifted since error; after three, turn off error -+ status. */ -+ if (yyerrstatus) -+ yyerrstatus--; - - yystate = yyn; - goto yynewstate; - --/* Do the default action for the current state. */ -+ -+/*-----------------------------------------------------------. -+| yydefault -- do the default action for the current state. | -+`-----------------------------------------------------------*/ - yydefault: -- - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; -- --/* Do a reduction. yyn is the number of a rule to reduce with. */ -+ goto yyreduce; -+ -+ -+/*-----------------------------. -+| yyreduce -- Do a reduction. | -+`-----------------------------*/ - yyreduce: -+ /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; -- if (yylen > 0) -- yyval = yyvsp[1-yylen]; /* implement default value of the action */ -- --#if YYDEBUG != 0 -+ -+ /* If YYLEN is nonzero, implement the default value of the action: -+ `$$ = $1'. -+ -+ Otherwise, the following line sets YYVAL to the semantic value of -+ the lookahead token. This behavior is undocumented and Bison -+ users should not rely upon it. Assigning to YYVAL -+ unconditionally makes the parser a bit smaller, and it avoids a -+ GCC warning that YYVAL may be used uninitialized. */ -+ yyval = yyvsp[1-yylen]; -+ -+#if YYLSP_NEEDED -+ /* Similarly for the default location. Let the user run additional -+ commands if for instance locations are ranges. */ -+ yyloc = yylsp[1-yylen]; -+ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); -+#endif -+ -+#if YYDEBUG -+ /* We have to keep this `#if YYDEBUG', since we use variables which -+ are defined only if `YYDEBUG' is set. */ - if (yydebug) - { -- int i; -- -- fprintf (stderr, "Reducing via rule %d (line %d), ", -- yyn, yyrline[yyn]); -+ int yyi; -+ -+ YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", -+ yyn, yyrline[yyn]); - - /* Print the symbols being reduced, and their result. */ -- for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) -- fprintf (stderr, "%s ", yytname[yyrhs[i]]); -- fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); -- } --#endif -- -+ for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) -+ YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); -+ YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); -+ } -+#endif - - switch (yyn) { - - case 1: --#line 175 "plural.y" -+#line 151 "plural.y" - { - if (yyvsp[0].exp == NULL) - YYABORT; - ((struct parse_args *) arg)->res = yyvsp[0].exp; -- ; -- break;} -+ } -+ break; - case 2: -+#line 159 "plural.y" -+{ -+ yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp); -+ } -+ break; -+case 3: -+#line 163 "plural.y" -+{ -+ yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp); -+ } -+ break; -+case 4: -+#line 167 "plural.y" -+{ -+ yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp); -+ } -+ break; -+case 5: -+#line 171 "plural.y" -+{ -+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); -+ } -+ break; -+case 6: -+#line 175 "plural.y" -+{ -+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); -+ } -+ break; -+case 7: -+#line 179 "plural.y" -+{ -+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); -+ } -+ break; -+case 8: - #line 183 "plural.y" - { -- yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp); -- ; -- break;} --case 3: -+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); -+ } -+ break; -+case 9: - #line 187 "plural.y" - { -- yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp); -- ; -- break;} --case 4: -+ yyval.exp = new_exp_1 (lnot, yyvsp[0].exp); -+ } -+ break; -+case 10: - #line 191 "plural.y" - { -- yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp); -- ; -- break;} --case 5: -+ yyval.exp = new_exp_0 (var); -+ } -+ break; -+case 11: - #line 195 "plural.y" --{ -- yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); -- ; -- break;} --case 6: --#line 199 "plural.y" --{ -- yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); -- ; -- break;} --case 7: --#line 203 "plural.y" --{ -- yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); -- ; -- break;} --case 8: --#line 207 "plural.y" --{ -- yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); -- ; -- break;} --case 9: --#line 211 "plural.y" --{ -- yyval.exp = new_exp_1 (lnot, yyvsp[0].exp); -- ; -- break;} --case 10: --#line 215 "plural.y" --{ -- yyval.exp = new_exp_0 (var); -- ; -- break;} --case 11: --#line 219 "plural.y" - { - if ((yyval.exp = new_exp_0 (num)) != NULL) - yyval.exp->val.num = yyvsp[0].num; -- ; -- break;} -+ } -+ break; - case 12: --#line 224 "plural.y" -+#line 200 "plural.y" - { - yyval.exp = yyvsp[-1].exp; -- ; -- break;} -+ } -+ break; - } -- /* the action file gets copied in in place of this dollarsign */ --#line 543 "/usr/local/share/bison.simple" -+ -+#line 705 "/usr/local/share/bison/bison.simple" -+ - - yyvsp -= yylen; - yyssp -= yylen; --#ifdef YYLSP_NEEDED -+#if YYLSP_NEEDED - yylsp -= yylen; - #endif - --#if YYDEBUG != 0 -+#if YYDEBUG - if (yydebug) - { -- short *ssp1 = yyss - 1; -- fprintf (stderr, "state stack now"); -- while (ssp1 != yyssp) -- fprintf (stderr, " %d", *++ssp1); -- fprintf (stderr, "\n"); -+ short *yyssp1 = yyss - 1; -+ YYFPRINTF (stderr, "state stack now"); -+ while (yyssp1 != yyssp) -+ YYFPRINTF (stderr, " %d", *++yyssp1); -+ YYFPRINTF (stderr, "\n"); - } - #endif - - *++yyvsp = yyval; -- --#ifdef YYLSP_NEEDED -- yylsp++; -- if (yylen == 0) -- { -- yylsp->first_line = yylloc.first_line; -- yylsp->first_column = yylloc.first_column; -- yylsp->last_line = (yylsp-1)->last_line; -- yylsp->last_column = (yylsp-1)->last_column; -- yylsp->text = 0; -- } -- else -- { -- yylsp->last_line = (yylsp+yylen-1)->last_line; -- yylsp->last_column = (yylsp+yylen-1)->last_column; -- } --#endif -- -- /* Now "shift" the result of the reduction. -- Determine what state that goes to, -- based on the state we popped back to -- and the rule number reduced by. */ -+#if YYLSP_NEEDED -+ *++yylsp = yyloc; -+#endif -+ -+ /* Now `shift' the result of the reduction. Determine what state -+ that goes to, based on the state we popped back to and the rule -+ number reduced by. */ - - yyn = yyr1[yyn]; - -@@ -971,10 +1118,13 @@ case 12: - - goto yynewstate; - --yyerrlab: /* here on detecting error */ -- -- if (! yyerrstatus) -- /* If not already recovering from an error, report this error. */ -+ -+/*------------------------------------. -+| yyerrlab -- here on detecting error | -+`------------------------------------*/ -+yyerrlab: -+ /* If not already recovering from an error, report this error. */ -+ if (!yyerrstatus) - { - ++yynerrs; - -@@ -983,102 +1133,121 @@ yyerrlab: /* here on detecting error * - - if (yyn > YYFLAG && yyn < YYLAST) - { -- int size = 0; -- char *msg; -- int x, count; -- -- count = 0; -- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ -- for (x = (yyn < 0 ? -yyn : 0); -- x < (sizeof(yytname) / sizeof(char *)); x++) -- if (yycheck[x + yyn] == x) -- size += strlen(yytname[x]) + 15, count++; -- msg = (char *) malloc(size + 15); -- if (msg != 0) -+ YYSIZE_T yysize = 0; -+ char *yymsg; -+ int yyx, yycount; -+ -+ yycount = 0; -+ /* Start YYX at -YYN if negative to avoid negative indexes in -+ YYCHECK. */ -+ for (yyx = yyn < 0 ? -yyn : 0; -+ yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) -+ if (yycheck[yyx + yyn] == yyx) -+ yysize += yystrlen (yytname[yyx]) + 15, yycount++; -+ yysize += yystrlen ("parse error, unexpected ") + 1; -+ yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); -+ yymsg = (char *) YYSTACK_ALLOC (yysize); -+ if (yymsg != 0) - { -- strcpy(msg, "parse error"); -- -- if (count < 5) -+ char *yyp = yystpcpy (yymsg, "parse error, unexpected "); -+ yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); -+ -+ if (yycount < 5) - { -- count = 0; -- for (x = (yyn < 0 ? -yyn : 0); -- x < (sizeof(yytname) / sizeof(char *)); x++) -- if (yycheck[x + yyn] == x) -+ yycount = 0; -+ for (yyx = yyn < 0 ? -yyn : 0; -+ yyx < (int) (sizeof (yytname) / sizeof (char *)); -+ yyx++) -+ if (yycheck[yyx + yyn] == yyx) - { -- strcat(msg, count == 0 ? ", expecting `" : " or `"); -- strcat(msg, yytname[x]); -- strcat(msg, "'"); -- count++; -+ const char *yyq = ! yycount ? ", expecting " : " or "; -+ yyp = yystpcpy (yyp, yyq); -+ yyp = yystpcpy (yyp, yytname[yyx]); -+ yycount++; - } - } -- yyerror(msg); -- free(msg); -+ yyerror (yymsg); -+ YYSTACK_FREE (yymsg); - } - else -- yyerror ("parse error; also virtual memory exceeded"); -+ yyerror ("parse error; also virtual memory exhausted"); - } - else --#endif /* YYERROR_VERBOSE */ -- yyerror("parse error"); -- } -- -+#endif /* defined (YYERROR_VERBOSE) */ -+ yyerror ("parse error"); -+ } - goto yyerrlab1; --yyerrlab1: /* here on error raised explicitly by an action */ -- -+ -+ -+/*--------------------------------------------------. -+| yyerrlab1 -- error raised explicitly by an action | -+`--------------------------------------------------*/ -+yyerrlab1: - if (yyerrstatus == 3) - { -- /* if just tried and failed to reuse lookahead token after an error, discard it. */ -+ /* If just tried and failed to reuse lookahead token after an -+ error, discard it. */ - - /* return failure if at end of input */ - if (yychar == YYEOF) - YYABORT; -- --#if YYDEBUG != 0 -- if (yydebug) -- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); --#endif -- -+ YYDPRINTF ((stderr, "Discarding token %d (%s).\n", -+ yychar, yytname[yychar1])); - yychar = YYEMPTY; - } - -- /* Else will try to reuse lookahead token -- after shifting the error token. */ -+ /* Else will try to reuse lookahead token after shifting the error -+ token. */ - - yyerrstatus = 3; /* Each real token shifted decrements this */ - - goto yyerrhandle; - --yyerrdefault: /* current state does not do anything special for the error token. */ -- -+ -+/*-------------------------------------------------------------------. -+| yyerrdefault -- current state does not do anything special for the | -+| error token. | -+`-------------------------------------------------------------------*/ -+yyerrdefault: - #if 0 - /* This is wrong; only states that explicitly want error tokens - should shift them. */ -- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ -- if (yyn) goto yydefault; --#endif -- --yyerrpop: /* pop the current state because it cannot handle the error token */ -- -- if (yyssp == yyss) YYABORT; -+ -+ /* If its default is to accept any token, ok. Otherwise pop it. */ -+ yyn = yydefact[yystate]; -+ if (yyn) -+ goto yydefault; -+#endif -+ -+ -+/*---------------------------------------------------------------. -+| yyerrpop -- pop the current state because it cannot handle the | -+| error token | -+`---------------------------------------------------------------*/ -+yyerrpop: -+ if (yyssp == yyss) -+ YYABORT; - yyvsp--; - yystate = *--yyssp; --#ifdef YYLSP_NEEDED -+#if YYLSP_NEEDED - yylsp--; - #endif - --#if YYDEBUG != 0 -+#if YYDEBUG - if (yydebug) - { -- short *ssp1 = yyss - 1; -- fprintf (stderr, "Error: state stack now"); -- while (ssp1 != yyssp) -- fprintf (stderr, " %d", *++ssp1); -- fprintf (stderr, "\n"); -- } --#endif -- -+ short *yyssp1 = yyss - 1; -+ YYFPRINTF (stderr, "Error: state stack now"); -+ while (yyssp1 != yyssp) -+ YYFPRINTF (stderr, " %d", *++yyssp1); -+ YYFPRINTF (stderr, "\n"); -+ } -+#endif -+ -+/*--------------. -+| yyerrhandle. | -+`--------------*/ - yyerrhandle: -- - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yyerrdefault; -@@ -1101,50 +1270,52 @@ yyerrhandle: - if (yyn == YYFINAL) - YYACCEPT; - --#if YYDEBUG != 0 -- if (yydebug) -- fprintf(stderr, "Shifting error token, "); --#endif -+ YYDPRINTF ((stderr, "Shifting error token, ")); - - *++yyvsp = yylval; --#ifdef YYLSP_NEEDED -+#if YYLSP_NEEDED - *++yylsp = yylloc; - #endif - - yystate = yyn; - goto yynewstate; - -- yyacceptlab: -- /* YYACCEPT comes here. */ -- if (yyfree_stacks) -- { -- free (yyss); -- free (yyvs); --#ifdef YYLSP_NEEDED -- free (yyls); --#endif -- } -- return 0; -- -- yyabortlab: -- /* YYABORT comes here. */ -- if (yyfree_stacks) -- { -- free (yyss); -- free (yyvs); --#ifdef YYLSP_NEEDED -- free (yyls); --#endif -- } -- return 1; -+ -+/*-------------------------------------. -+| yyacceptlab -- YYACCEPT comes here. | -+`-------------------------------------*/ -+yyacceptlab: -+ yyresult = 0; -+ goto yyreturn; -+ -+/*-----------------------------------. -+| yyabortlab -- YYABORT comes here. | -+`-----------------------------------*/ -+yyabortlab: -+ yyresult = 1; -+ goto yyreturn; -+ -+/*---------------------------------------------. -+| yyoverflowab -- parser overflow comes here. | -+`---------------------------------------------*/ -+yyoverflowlab: -+ yyerror ("parser stack overflow"); -+ yyresult = 2; -+ /* Fall through. */ -+ -+yyreturn: -+#ifndef yyoverflow -+ if (yyss != yyssa) -+ YYSTACK_FREE (yyss); -+#endif -+ return yyresult; - } --#line 229 "plural.y" -+#line 205 "plural.y" - - - void - internal_function --FREE_EXPRESSION (exp) -- struct expression *exp; -+FREE_EXPRESSION (struct expression *exp) - { - if (exp == NULL) - return; -@@ -1170,9 +1341,7 @@ FREE_EXPRESSION (exp) - - - static int --yylex (lval, pexp) -- YYSTYPE *lval; -- const char **pexp; -+yylex (YYSTYPE *lval, const char **pexp) - { - const char *exp = *pexp; - int result; -@@ -1315,8 +1484,7 @@ yylex (lval, pexp) - - - static void --yyerror (str) -- const char *str; -+yyerror (const char *str) - { - /* Do nothing. We don't print error messages here. */ - } -diff -r 4216c218ee44 -r e04165992166 intl/plural.y ---- a/intl/plural.y Sat May 28 13:40:15 2005 +0000 -+++ b/intl/plural.y Sat May 28 13:45:22 2005 +0000 -@@ -1,6 +1,6 @@ - %{ - /* Expression parsing for plural form selection. -- Copyright (C) 2000, 2001 Free Software Foundation, Inc. -+ Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc. - Written by Ulrich Drepper , 2000. - - This program is free software; you can redistribute it and/or modify it -@@ -54,28 +54,13 @@ - - %{ - /* Prototypes for local functions. */ --static struct expression *new_exp PARAMS ((int nargs, enum operator op, -- struct expression * const *args)); --static inline struct expression *new_exp_0 PARAMS ((enum operator op)); --static inline struct expression *new_exp_1 PARAMS ((enum operator op, -- struct expression *right)); --static struct expression *new_exp_2 PARAMS ((enum operator op, -- struct expression *left, -- struct expression *right)); --static inline struct expression *new_exp_3 PARAMS ((enum operator op, -- struct expression *bexp, -- struct expression *tbranch, -- struct expression *fbranch)); --static int yylex PARAMS ((YYSTYPE *lval, const char **pexp)); --static void yyerror PARAMS ((const char *str)); -+static int yylex (YYSTYPE *lval, const char **pexp); -+static void yyerror (const char *str); - - /* Allocation of expressions. */ - - static struct expression * --new_exp (nargs, op, args) -- int nargs; -- enum operator op; -- struct expression * const *args; -+new_exp (int nargs, enum operator op, struct expression * const *args) - { - int i; - struct expression *newp; -@@ -104,16 +89,13 @@ new_exp (nargs, op, args) - } - - static inline struct expression * --new_exp_0 (op) -- enum operator op; -+new_exp_0 (enum operator op) - { - return new_exp (0, op, NULL); - } - - static inline struct expression * --new_exp_1 (op, right) -- enum operator op; -- struct expression *right; -+new_exp_1 (enum operator op, struct expression *right) - { - struct expression *args[1]; - -@@ -122,10 +104,7 @@ new_exp_1 (op, right) - } - - static struct expression * --new_exp_2 (op, left, right) -- enum operator op; -- struct expression *left; -- struct expression *right; -+new_exp_2 (enum operator op, struct expression *left, struct expression *right) - { - struct expression *args[2]; - -@@ -135,11 +114,8 @@ new_exp_2 (op, left, right) - } - - static inline struct expression * --new_exp_3 (op, bexp, tbranch, fbranch) -- enum operator op; -- struct expression *bexp; -- struct expression *tbranch; -- struct expression *fbranch; -+new_exp_3 (enum operator op, struct expression *bexp, -+ struct expression *tbranch, struct expression *fbranch) - { - struct expression *args[3]; - -@@ -230,8 +206,7 @@ exp: exp '?' exp ':' exp - - void - internal_function --FREE_EXPRESSION (exp) -- struct expression *exp; -+FREE_EXPRESSION (struct expression *exp) - { - if (exp == NULL) - return; -@@ -257,9 +232,7 @@ FREE_EXPRESSION (exp) - - - static int --yylex (lval, pexp) -- YYSTYPE *lval; -- const char **pexp; -+yylex (YYSTYPE *lval, const char **pexp) - { - const char *exp = *pexp; - int result; -@@ -402,8 +375,7 @@ yylex (lval, pexp) - - - static void --yyerror (str) -- const char *str; -+yyerror (const char *str) - { - /* Do nothing. We don't print error messages here. */ - } -diff -r 4216c218ee44 -r e04165992166 intl/printf-args.c ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/intl/printf-args.c Sat May 28 13:45:22 2005 +0000 -@@ -0,0 +1,119 @@ -+/* Decomposed printf argument list. -+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Library 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Library General Public License for more details. -+ -+ You should have received a copy of the GNU Library General Public -+ License along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ USA. */ -+ -+#ifdef HAVE_CONFIG_H -+# include -+#endif -+ -+/* Specification. */ -+#include "printf-args.h" -+ -+#ifdef STATIC -+STATIC -+#endif -+int -+printf_fetchargs (va_list args, arguments *a) -+{ -+ size_t i; -+ argument *ap; -+ -+ for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++) -+ switch (ap->type) -+ { -+ case TYPE_SCHAR: -+ ap->a.a_schar = va_arg (args, /*signed char*/ int); -+ break; -+ case TYPE_UCHAR: -+ ap->a.a_uchar = va_arg (args, /*unsigned char*/ int); -+ break; -+ case TYPE_SHORT: -+ ap->a.a_short = va_arg (args, /*short*/ int); -+ break; -+ case TYPE_USHORT: -+ ap->a.a_ushort = va_arg (args, /*unsigned short*/ int); -+ break; -+ case TYPE_INT: -+ ap->a.a_int = va_arg (args, int); -+ break; -+ case TYPE_UINT: -+ ap->a.a_uint = va_arg (args, unsigned int); -+ break; -+ case TYPE_LONGINT: -+ ap->a.a_longint = va_arg (args, long int); -+ break; -+ case TYPE_ULONGINT: -+ ap->a.a_ulongint = va_arg (args, unsigned long int); -+ break; -+#ifdef HAVE_LONG_LONG -+ case TYPE_LONGLONGINT: -+ ap->a.a_longlongint = va_arg (args, long long int); -+ break; -+ case TYPE_ULONGLONGINT: -+ ap->a.a_ulonglongint = va_arg (args, unsigned long long int); -+ break; -+#endif -+ case TYPE_DOUBLE: -+ ap->a.a_double = va_arg (args, double); -+ break; -+#ifdef HAVE_LONG_DOUBLE -+ case TYPE_LONGDOUBLE: -+ ap->a.a_longdouble = va_arg (args, long double); -+ break; -+#endif -+ case TYPE_CHAR: -+ ap->a.a_char = va_arg (args, int); -+ break; -+#ifdef HAVE_WINT_T -+ case TYPE_WIDE_CHAR: -+ ap->a.a_wide_char = va_arg (args, wint_t); -+ break; -+#endif -+ case TYPE_STRING: -+ ap->a.a_string = va_arg (args, const char *); -+ break; -+#ifdef HAVE_WCHAR_T -+ case TYPE_WIDE_STRING: -+ ap->a.a_wide_string = va_arg (args, const wchar_t *); -+ break; -+#endif -+ case TYPE_POINTER: -+ ap->a.a_pointer = va_arg (args, void *); -+ break; -+ case TYPE_COUNT_SCHAR_POINTER: -+ ap->a.a_count_schar_pointer = va_arg (args, signed char *); -+ break; -+ case TYPE_COUNT_SHORT_POINTER: -+ ap->a.a_count_short_pointer = va_arg (args, short *); -+ break; -+ case TYPE_COUNT_INT_POINTER: -+ ap->a.a_count_int_pointer = va_arg (args, int *); -+ break; -+ case TYPE_COUNT_LONGINT_POINTER: -+ ap->a.a_count_longint_pointer = va_arg (args, long int *); -+ break; -+#ifdef HAVE_LONG_LONG -+ case TYPE_COUNT_LONGLONGINT_POINTER: -+ ap->a.a_count_longlongint_pointer = va_arg (args, long long int *); -+ break; -+#endif -+ default: -+ /* Unknown type. */ -+ return -1; -+ } -+ return 0; -+} -diff -r 4216c218ee44 -r e04165992166 intl/printf-args.h ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/intl/printf-args.h Sat May 28 13:45:22 2005 +0000 -@@ -0,0 +1,137 @@ -+/* Decomposed printf argument list. -+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Library 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Library General Public License for more details. -+ -+ You should have received a copy of the GNU Library General Public -+ License along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ USA. */ -+ -+#ifndef _PRINTF_ARGS_H -+#define _PRINTF_ARGS_H -+ -+/* Get size_t. */ -+#include -+ -+/* Get wchar_t. */ -+#ifdef HAVE_WCHAR_T -+# include -+#endif -+ -+/* Get wint_t. */ -+#ifdef HAVE_WINT_T -+# include -+#endif -+ -+/* Get va_list. */ -+#include -+ -+ -+/* Argument types */ -+typedef enum -+{ -+ TYPE_NONE, -+ TYPE_SCHAR, -+ TYPE_UCHAR, -+ TYPE_SHORT, -+ TYPE_USHORT, -+ TYPE_INT, -+ TYPE_UINT, -+ TYPE_LONGINT, -+ TYPE_ULONGINT, -+#ifdef HAVE_LONG_LONG -+ TYPE_LONGLONGINT, -+ TYPE_ULONGLONGINT, -+#endif -+ TYPE_DOUBLE, -+#ifdef HAVE_LONG_DOUBLE -+ TYPE_LONGDOUBLE, -+#endif -+ TYPE_CHAR, -+#ifdef HAVE_WINT_T -+ TYPE_WIDE_CHAR, -+#endif -+ TYPE_STRING, -+#ifdef HAVE_WCHAR_T -+ TYPE_WIDE_STRING, -+#endif -+ TYPE_POINTER, -+ TYPE_COUNT_SCHAR_POINTER, -+ TYPE_COUNT_SHORT_POINTER, -+ TYPE_COUNT_INT_POINTER, -+ TYPE_COUNT_LONGINT_POINTER -+#ifdef HAVE_LONG_LONG -+, TYPE_COUNT_LONGLONGINT_POINTER -+#endif -+} arg_type; -+ -+/* Polymorphic argument */ -+typedef struct -+{ -+ arg_type type; -+ union -+ { -+ signed char a_schar; -+ unsigned char a_uchar; -+ short a_short; -+ unsigned short a_ushort; -+ int a_int; -+ unsigned int a_uint; -+ long int a_longint; -+ unsigned long int a_ulongint; -+#ifdef HAVE_LONG_LONG -+ long long int a_longlongint; -+ unsigned long long int a_ulonglongint; -+#endif -+ float a_float; -+ double a_double; -+#ifdef HAVE_LONG_DOUBLE -+ long double a_longdouble; -+#endif -+ int a_char; -+#ifdef HAVE_WINT_T -+ wint_t a_wide_char; -+#endif -+ const char* a_string; -+#ifdef HAVE_WCHAR_T -+ const wchar_t* a_wide_string; -+#endif -+ void* a_pointer; -+ signed char * a_count_schar_pointer; -+ short * a_count_short_pointer; -+ int * a_count_int_pointer; -+ long int * a_count_longint_pointer; -+#ifdef HAVE_LONG_LONG -+ long long int * a_count_longlongint_pointer; -+#endif -+ } -+ a; -+} -+argument; -+ -+typedef struct -+{ -+ size_t count; -+ argument *arg; -+} -+arguments; -+ -+ -+/* Fetch the arguments, putting them into a. */ -+#ifdef STATIC -+STATIC -+#else -+extern -+#endif -+int printf_fetchargs (va_list args, arguments *a); -+ -+#endif /* _PRINTF_ARGS_H */ -diff -r 4216c218ee44 -r e04165992166 intl/printf-parse.c ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/intl/printf-parse.c Sat May 28 13:45:22 2005 +0000 -@@ -0,0 +1,537 @@ -+/* Formatted output to strings. -+ Copyright (C) 1999-2000, 2002-2003 Free Software Foundation, Inc. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Library 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Library General Public License for more details. -+ -+ You should have received a copy of the GNU Library General Public -+ License along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ USA. */ -+ -+#ifdef HAVE_CONFIG_H -+# include -+#endif -+ -+/* Specification. */ -+#if WIDE_CHAR_VERSION -+# include "wprintf-parse.h" -+#else -+# include "printf-parse.h" -+#endif -+ -+/* Get size_t, NULL. */ -+#include -+ -+/* Get intmax_t. */ -+#if HAVE_STDINT_H_WITH_UINTMAX -+# include -+#endif -+#if HAVE_INTTYPES_H_WITH_UINTMAX -+# include -+#endif -+ -+/* malloc(), realloc(), free(). */ -+#include -+ -+/* Checked size_t computations. */ -+#include "xsize.h" -+ -+#if WIDE_CHAR_VERSION -+# define PRINTF_PARSE wprintf_parse -+# define CHAR_T wchar_t -+# define DIRECTIVE wchar_t_directive -+# define DIRECTIVES wchar_t_directives -+#else -+# define PRINTF_PARSE printf_parse -+# define CHAR_T char -+# define DIRECTIVE char_directive -+# define DIRECTIVES char_directives -+#endif -+ -+#ifdef STATIC -+STATIC -+#endif -+int -+PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) -+{ -+ const CHAR_T *cp = format; /* pointer into format */ -+ size_t arg_posn = 0; /* number of regular arguments consumed */ -+ size_t d_allocated; /* allocated elements of d->dir */ -+ size_t a_allocated; /* allocated elements of a->arg */ -+ size_t max_width_length = 0; -+ size_t max_precision_length = 0; -+ -+ d->count = 0; -+ d_allocated = 1; -+ d->dir = malloc (d_allocated * sizeof (DIRECTIVE)); -+ if (d->dir == NULL) -+ /* Out of memory. */ -+ return -1; -+ -+ a->count = 0; -+ a_allocated = 0; -+ a->arg = NULL; -+ -+#define REGISTER_ARG(_index_,_type_) \ -+ { \ -+ size_t n = (_index_); \ -+ if (n >= a_allocated) \ -+ { \ -+ size_t memory_size; \ -+ argument *memory; \ -+ \ -+ a_allocated = xtimes (a_allocated, 2); \ -+ if (a_allocated <= n) \ -+ a_allocated = xsum (n, 1); \ -+ memory_size = xtimes (a_allocated, sizeof (argument)); \ -+ if (size_overflow_p (memory_size)) \ -+ /* Overflow, would lead to out of memory. */ \ -+ goto error; \ -+ memory = (a->arg \ -+ ? realloc (a->arg, memory_size) \ -+ : malloc (memory_size)); \ -+ if (memory == NULL) \ -+ /* Out of memory. */ \ -+ goto error; \ -+ a->arg = memory; \ -+ } \ -+ while (a->count <= n) \ -+ a->arg[a->count++].type = TYPE_NONE; \ -+ if (a->arg[n].type == TYPE_NONE) \ -+ a->arg[n].type = (_type_); \ -+ else if (a->arg[n].type != (_type_)) \ -+ /* Ambiguous type for positional argument. */ \ -+ goto error; \ -+ } -+ -+ while (*cp != '\0') -+ { -+ CHAR_T c = *cp++; -+ if (c == '%') -+ { -+ size_t arg_index = ARG_NONE; -+ DIRECTIVE *dp = &d->dir[d->count];/* pointer to next directive */ -+ -+ /* Initialize the next directive. */ -+ dp->dir_start = cp - 1; -+ dp->flags = 0; -+ dp->width_start = NULL; -+ dp->width_end = NULL; -+ dp->width_arg_index = ARG_NONE; -+ dp->precision_start = NULL; -+ dp->precision_end = NULL; -+ dp->precision_arg_index = ARG_NONE; -+ dp->arg_index = ARG_NONE; -+ -+ /* Test for positional argument. */ -+ if (*cp >= '0' && *cp <= '9') -+ { -+ const CHAR_T *np; -+ -+ for (np = cp; *np >= '0' && *np <= '9'; np++) -+ ; -+ if (*np == '$') -+ { -+ size_t n = 0; -+ -+ for (np = cp; *np >= '0' && *np <= '9'; np++) -+ n = xsum (xtimes (n, 10), *np - '0'); -+ if (n == 0) -+ /* Positional argument 0. */ -+ goto error; -+ if (size_overflow_p (n)) -+ /* n too large, would lead to out of memory later. */ -+ goto error; -+ arg_index = n - 1; -+ cp = np + 1; -+ } -+ } -+ -+ /* Read the flags. */ -+ for (;;) -+ { -+ if (*cp == '\'') -+ { -+ dp->flags |= FLAG_GROUP; -+ cp++; -+ } -+ else if (*cp == '-') -+ { -+ dp->flags |= FLAG_LEFT; -+ cp++; -+ } -+ else if (*cp == '+') -+ { -+ dp->flags |= FLAG_SHOWSIGN; -+ cp++; -+ } -+ else if (*cp == ' ') -+ { -+ dp->flags |= FLAG_SPACE; -+ cp++; -+ } -+ else if (*cp == '#') -+ { -+ dp->flags |= FLAG_ALT; -+ cp++; -+ } -+ else if (*cp == '0') -+ { -+ dp->flags |= FLAG_ZERO; -+ cp++; -+ } -+ else -+ break; -+ } -+ -+ /* Parse the field width. */ -+ if (*cp == '*') -+ { -+ dp->width_start = cp; -+ cp++; -+ dp->width_end = cp; -+ if (max_width_length < 1) -+ max_width_length = 1; -+ -+ /* Test for positional argument. */ -+ if (*cp >= '0' && *cp <= '9') -+ { -+ const CHAR_T *np; -+ -+ for (np = cp; *np >= '0' && *np <= '9'; np++) -+ ; -+ if (*np == '$') -+ { -+ size_t n = 0; -+ -+ for (np = cp; *np >= '0' && *np <= '9'; np++) -+ n = xsum (xtimes (n, 10), *np - '0'); -+ if (n == 0) -+ /* Positional argument 0. */ -+ goto error; -+ if (size_overflow_p (n)) -+ /* n too large, would lead to out of memory later. */ -+ goto error; -+ dp->width_arg_index = n - 1; -+ cp = np + 1; -+ } -+ } -+ if (dp->width_arg_index == ARG_NONE) -+ { -+ dp->width_arg_index = arg_posn++; -+ if (dp->width_arg_index == ARG_NONE) -+ /* arg_posn wrapped around. */ -+ goto error; -+ } -+ REGISTER_ARG (dp->width_arg_index, TYPE_INT); -+ } -+ else if (*cp >= '0' && *cp <= '9') -+ { -+ size_t width_length; -+ -+ dp->width_start = cp; -+ for (; *cp >= '0' && *cp <= '9'; cp++) -+ ; -+ dp->width_end = cp; -+ width_length = dp->width_end - dp->width_start; -+ if (max_width_length < width_length) -+ max_width_length = width_length; -+ } -+ -+ /* Parse the precision. */ -+ if (*cp == '.') -+ { -+ cp++; -+ if (*cp == '*') -+ { -+ dp->precision_start = cp - 1; -+ cp++; -+ dp->precision_end = cp; -+ if (max_precision_length < 2) -+ max_precision_length = 2; -+ -+ /* Test for positional argument. */ -+ if (*cp >= '0' && *cp <= '9') -+ { -+ const CHAR_T *np; -+ -+ for (np = cp; *np >= '0' && *np <= '9'; np++) -+ ; -+ if (*np == '$') -+ { -+ size_t n = 0; -+ -+ for (np = cp; *np >= '0' && *np <= '9'; np++) -+ n = xsum (xtimes (n, 10), *np - '0'); -+ if (n == 0) -+ /* Positional argument 0. */ -+ goto error; -+ if (size_overflow_p (n)) -+ /* n too large, would lead to out of memory -+ later. */ -+ goto error; -+ dp->precision_arg_index = n - 1; -+ cp = np + 1; -+ } -+ } -+ if (dp->precision_arg_index == ARG_NONE) -+ { -+ dp->precision_arg_index = arg_posn++; -+ if (dp->precision_arg_index == ARG_NONE) -+ /* arg_posn wrapped around. */ -+ goto error; -+ } -+ REGISTER_ARG (dp->precision_arg_index, TYPE_INT); -+ } -+ else -+ { -+ size_t precision_length; -+ -+ dp->precision_start = cp - 1; -+ for (; *cp >= '0' && *cp <= '9'; cp++) -+ ; -+ dp->precision_end = cp; -+ precision_length = dp->precision_end - dp->precision_start; -+ if (max_precision_length < precision_length) -+ max_precision_length = precision_length; -+ } -+ } -+ -+ { -+ arg_type type; -+ -+ /* Parse argument type/size specifiers. */ -+ { -+ int flags = 0; -+ -+ for (;;) -+ { -+ if (*cp == 'h') -+ { -+ flags |= (1 << (flags & 1)); -+ cp++; -+ } -+ else if (*cp == 'L') -+ { -+ flags |= 4; -+ cp++; -+ } -+ else if (*cp == 'l') -+ { -+ flags += 8; -+ cp++; -+ } -+#ifdef HAVE_INTMAX_T -+ else if (*cp == 'j') -+ { -+ if (sizeof (intmax_t) > sizeof (long)) -+ { -+ /* intmax_t = long long */ -+ flags += 16; -+ } -+ else if (sizeof (intmax_t) > sizeof (int)) -+ { -+ /* intmax_t = long */ -+ flags += 8; -+ } -+ cp++; -+ } -+#endif -+ else if (*cp == 'z' || *cp == 'Z') -+ { -+ /* 'z' is standardized in ISO C 99, but glibc uses 'Z' -+ because the warning facility in gcc-2.95.2 understands -+ only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */ -+ if (sizeof (size_t) > sizeof (long)) -+ { -+ /* size_t = long long */ -+ flags += 16; -+ } -+ else if (sizeof (size_t) > sizeof (int)) -+ { -+ /* size_t = long */ -+ flags += 8; -+ } -+ cp++; -+ } -+ else if (*cp == 't') -+ { -+ if (sizeof (ptrdiff_t) > sizeof (long)) -+ { -+ /* ptrdiff_t = long long */ -+ flags += 16; -+ } -+ else if (sizeof (ptrdiff_t) > sizeof (int)) -+ { -+ /* ptrdiff_t = long */ -+ flags += 8; -+ } -+ cp++; -+ } -+ else -+ break; -+ } -+ -+ /* Read the conversion character. */ -+ c = *cp++; -+ switch (c) -+ { -+ case 'd': case 'i': -+#ifdef HAVE_LONG_LONG -+ if (flags >= 16 || (flags & 4)) -+ type = TYPE_LONGLONGINT; -+ else -+#endif -+ if (flags >= 8) -+ type = TYPE_LONGINT; -+ else if (flags & 2) -+ type = TYPE_SCHAR; -+ else if (flags & 1) -+ type = TYPE_SHORT; -+ else -+ type = TYPE_INT; -+ break; -+ case 'o': case 'u': case 'x': case 'X': -+#ifdef HAVE_LONG_LONG -+ if (flags >= 16 || (flags & 4)) -+ type = TYPE_ULONGLONGINT; -+ else -+#endif -+ if (flags >= 8) -+ type = TYPE_ULONGINT; -+ else if (flags & 2) -+ type = TYPE_UCHAR; -+ else if (flags & 1) -+ type = TYPE_USHORT; -+ else -+ type = TYPE_UINT; -+ break; -+ case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': -+ case 'a': case 'A': -+#ifdef HAVE_LONG_DOUBLE -+ if (flags >= 16 || (flags & 4)) -+ type = TYPE_LONGDOUBLE; -+ else -+#endif -+ type = TYPE_DOUBLE; -+ break; -+ case 'c': -+ if (flags >= 8) -+#ifdef HAVE_WINT_T -+ type = TYPE_WIDE_CHAR; -+#else -+ goto error; -+#endif -+ else -+ type = TYPE_CHAR; -+ break; -+#ifdef HAVE_WINT_T -+ case 'C': -+ type = TYPE_WIDE_CHAR; -+ c = 'c'; -+ break; -+#endif -+ case 's': -+ if (flags >= 8) -+#ifdef HAVE_WCHAR_T -+ type = TYPE_WIDE_STRING; -+#else -+ goto error; -+#endif -+ else -+ type = TYPE_STRING; -+ break; -+#ifdef HAVE_WCHAR_T -+ case 'S': -+ type = TYPE_WIDE_STRING; -+ c = 's'; -+ break; -+#endif -+ case 'p': -+ type = TYPE_POINTER; -+ break; -+ case 'n': -+#ifdef HAVE_LONG_LONG -+ if (flags >= 16 || (flags & 4)) -+ type = TYPE_COUNT_LONGLONGINT_POINTER; -+ else -+#endif -+ if (flags >= 8) -+ type = TYPE_COUNT_LONGINT_POINTER; -+ else if (flags & 2) -+ type = TYPE_COUNT_SCHAR_POINTER; -+ else if (flags & 1) -+ type = TYPE_COUNT_SHORT_POINTER; -+ else -+ type = TYPE_COUNT_INT_POINTER; -+ break; -+ case '%': -+ type = TYPE_NONE; -+ break; -+ default: -+ /* Unknown conversion character. */ -+ goto error; -+ } -+ } -+ -+ if (type != TYPE_NONE) -+ { -+ dp->arg_index = arg_index; -+ if (dp->arg_index == ARG_NONE) -+ { -+ dp->arg_index = arg_posn++; -+ if (dp->arg_index == ARG_NONE) -+ /* arg_posn wrapped around. */ -+ goto error; -+ } -+ REGISTER_ARG (dp->arg_index, type); -+ } -+ dp->conversion = c; -+ dp->dir_end = cp; -+ } -+ -+ d->count++; -+ if (d->count >= d_allocated) -+ { -+ size_t memory_size; -+ DIRECTIVE *memory; -+ -+ d_allocated = xtimes (d_allocated, 2); -+ memory_size = xtimes (d_allocated, sizeof (DIRECTIVE)); -+ if (size_overflow_p (memory_size)) -+ /* Overflow, would lead to out of memory. */ -+ goto error; -+ memory = realloc (d->dir, memory_size); -+ if (memory == NULL) -+ /* Out of memory. */ -+ goto error; -+ d->dir = memory; -+ } -+ } -+ } -+ d->dir[d->count].dir_start = cp; -+ -+ d->max_width_length = max_width_length; -+ d->max_precision_length = max_precision_length; -+ return 0; -+ -+error: -+ if (a->arg) -+ free (a->arg); -+ if (d->dir) -+ free (d->dir); -+ return -1; -+} -+ -+#undef DIRECTIVES -+#undef DIRECTIVE -+#undef CHAR_T -+#undef PRINTF_PARSE -diff -r 4216c218ee44 -r e04165992166 intl/printf-parse.h ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/intl/printf-parse.h Sat May 28 13:45:22 2005 +0000 -@@ -0,0 +1,75 @@ -+/* Parse printf format string. -+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Library 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Library General Public License for more details. -+ -+ You should have received a copy of the GNU Library General Public -+ License along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ USA. */ -+ -+#ifndef _PRINTF_PARSE_H -+#define _PRINTF_PARSE_H -+ -+#include "printf-args.h" -+ -+ -+/* Flags */ -+#define FLAG_GROUP 1 /* ' flag */ -+#define FLAG_LEFT 2 /* - flag */ -+#define FLAG_SHOWSIGN 4 /* + flag */ -+#define FLAG_SPACE 8 /* space flag */ -+#define FLAG_ALT 16 /* # flag */ -+#define FLAG_ZERO 32 -+ -+/* arg_index value indicating that no argument is consumed. */ -+#define ARG_NONE (~(size_t)0) -+ -+/* A parsed directive. */ -+typedef struct -+{ -+ const char* dir_start; -+ const char* dir_end; -+ int flags; -+ const char* width_start; -+ const char* width_end; -+ size_t width_arg_index; -+ const char* precision_start; -+ const char* precision_end; -+ size_t precision_arg_index; -+ char conversion; /* d i o u x X f e E g G c s p n U % but not C S */ -+ size_t arg_index; -+} -+char_directive; -+ -+/* A parsed format string. */ -+typedef struct -+{ -+ size_t count; -+ char_directive *dir; -+ size_t max_width_length; -+ size_t max_precision_length; -+} -+char_directives; -+ -+ -+/* Parses the format string. Fills in the number N of directives, and fills -+ in directives[0], ..., directives[N-1], and sets directives[N].dir_start -+ to the end of the format string. Also fills in the arg_type fields of the -+ arguments and the needed count of arguments. */ -+#ifdef STATIC -+STATIC -+#else -+extern -+#endif -+int printf_parse (const char *format, char_directives *d, arguments *a); -+ -+#endif /* _PRINTF_PARSE_H */ -diff -r 4216c218ee44 -r e04165992166 intl/printf.c ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/intl/printf.c Sat May 28 13:45:22 2005 +0000 -@@ -0,0 +1,371 @@ -+/* Formatted output to strings, using POSIX/XSI format strings with positions. -+ Copyright (C) 2003 Free Software Foundation, Inc. -+ Written by Bruno Haible , 2003. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Library 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Library General Public License for more details. -+ -+ You should have received a copy of the GNU Library General Public -+ License along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ USA. */ -+ -+#ifdef HAVE_CONFIG_H -+# include -+#endif -+ -+#ifdef __GNUC__ -+# define alloca __builtin_alloca -+# define HAVE_ALLOCA 1 -+#else -+# ifdef _MSC_VER -+# include -+# define alloca _alloca -+# else -+# if defined HAVE_ALLOCA_H || defined _LIBC -+# include -+# else -+# ifdef _AIX -+ #pragma alloca -+# else -+# ifndef alloca -+char *alloca (); -+# endif -+# endif -+# endif -+# endif -+#endif -+ -+#include -+ -+#if !HAVE_POSIX_PRINTF -+ -+#include -+#include -+ -+/* When building a DLL, we must export some functions. Note that because -+ the functions are only defined for binary backward compatibility, we -+ don't need to use __declspec(dllimport) in any case. */ -+#if defined _MSC_VER && BUILDING_DLL -+# define DLL_EXPORTED __declspec(dllexport) -+#else -+# define DLL_EXPORTED -+#endif -+ -+#define STATIC static -+ -+/* Define auxiliary functions declared in "printf-args.h". */ -+#include "printf-args.c" -+ -+/* Define auxiliary functions declared in "printf-parse.h". */ -+#include "printf-parse.c" -+ -+/* Define functions declared in "vasnprintf.h". */ -+#define vasnprintf libintl_vasnprintf -+#include "vasnprintf.c" -+#if 0 /* not needed */ -+#define asnprintf libintl_asnprintf -+#include "asnprintf.c" -+#endif -+ -+DLL_EXPORTED -+int -+libintl_vfprintf (FILE *stream, const char *format, va_list args) -+{ -+ if (strchr (format, '$') == NULL) -+ return vfprintf (stream, format, args); -+ else -+ { -+ size_t length; -+ char *result = libintl_vasnprintf (NULL, &length, format, args); -+ int retval = -1; -+ if (result != NULL) -+ { -+ if (fwrite (result, 1, length, stream) == length) -+ retval = length; -+ free (result); -+ } -+ return retval; -+ } -+} -+ -+DLL_EXPORTED -+int -+libintl_fprintf (FILE *stream, const char *format, ...) -+{ -+ va_list args; -+ int retval; -+ -+ va_start (args, format); -+ retval = libintl_vfprintf (stream, format, args); -+ va_end (args); -+ return retval; -+} -+ -+DLL_EXPORTED -+int -+libintl_vprintf (const char *format, va_list args) -+{ -+ return libintl_vfprintf (stdout, format, args); -+} -+ -+DLL_EXPORTED -+int -+libintl_printf (const char *format, ...) -+{ -+ va_list args; -+ int retval; -+ -+ va_start (args, format); -+ retval = libintl_vprintf (format, args); -+ va_end (args); -+ return retval; -+} -+ -+DLL_EXPORTED -+int -+libintl_vsprintf (char *resultbuf, const char *format, va_list args) -+{ -+ if (strchr (format, '$') == NULL) -+ return vsprintf (resultbuf, format, args); -+ else -+ { -+ size_t length = (size_t) ~0 / (4 * sizeof (char)); -+ char *result = libintl_vasnprintf (resultbuf, &length, format, args); -+ if (result != resultbuf) -+ { -+ free (result); -+ return -1; -+ } -+ else -+ return length; -+ } -+} -+ -+DLL_EXPORTED -+int -+libintl_sprintf (char *resultbuf, const char *format, ...) -+{ -+ va_list args; -+ int retval; -+ -+ va_start (args, format); -+ retval = libintl_vsprintf (resultbuf, format, args); -+ va_end (args); -+ return retval; -+} -+ -+#if HAVE_SNPRINTF -+ -+# if HAVE_DECL__SNPRINTF -+ /* Windows. */ -+# define system_vsnprintf _vsnprintf -+# else -+ /* Unix. */ -+# define system_vsnprintf vsnprintf -+# endif -+ -+DLL_EXPORTED -+int -+libintl_vsnprintf (char *resultbuf, size_t length, const char *format, va_list args) -+{ -+ if (strchr (format, '$') == NULL) -+ return system_vsnprintf (resultbuf, length, format, args); -+ else -+ { -+ size_t maxlength = length; -+ char *result = libintl_vasnprintf (resultbuf, &length, format, args); -+ if (result != resultbuf) -+ { -+ if (maxlength > 0) -+ { -+ if (length < maxlength) -+ abort (); -+ memcpy (resultbuf, result, maxlength - 1); -+ resultbuf[maxlength - 1] = '\0'; -+ } -+ free (result); -+ return -1; -+ } -+ else -+ return length; -+ } -+} -+ -+DLL_EXPORTED -+int -+libintl_snprintf (char *resultbuf, size_t length, const char *format, ...) -+{ -+ va_list args; -+ int retval; -+ -+ va_start (args, format); -+ retval = libintl_vsnprintf (resultbuf, length, format, args); -+ va_end (args); -+ return retval; -+} -+ -+#endif -+ -+#if HAVE_ASPRINTF -+ -+DLL_EXPORTED -+int -+libintl_vasprintf (char **resultp, const char *format, va_list args) -+{ -+ size_t length; -+ char *result = libintl_vasnprintf (NULL, &length, format, args); -+ if (result == NULL) -+ return -1; -+ *resultp = result; -+ return length; -+} -+ -+DLL_EXPORTED -+int -+libintl_asprintf (char **resultp, const char *format, ...) -+{ -+ va_list args; -+ int retval; -+ -+ va_start (args, format); -+ retval = libintl_vasprintf (resultp, format, args); -+ va_end (args); -+ return retval; -+} -+ -+#endif -+ -+#if HAVE_FWPRINTF -+ -+#include -+ -+#define WIDE_CHAR_VERSION 1 -+ -+/* Define auxiliary functions declared in "wprintf-parse.h". */ -+#include "printf-parse.c" -+ -+/* Define functions declared in "vasnprintf.h". */ -+#define vasnwprintf libintl_vasnwprintf -+#include "vasnprintf.c" -+#if 0 /* not needed */ -+#define asnwprintf libintl_asnwprintf -+#include "asnprintf.c" -+#endif -+ -+# if HAVE_DECL__SNWPRINTF -+ /* Windows. */ -+# define system_vswprintf _vsnwprintf -+# else -+ /* Unix. */ -+# define system_vswprintf vswprintf -+# endif -+ -+DLL_EXPORTED -+int -+libintl_vfwprintf (FILE *stream, const wchar_t *format, va_list args) -+{ -+ if (wcschr (format, '$') == NULL) -+ return vfwprintf (stream, format, args); -+ else -+ { -+ size_t length; -+ wchar_t *result = libintl_vasnwprintf (NULL, &length, format, args); -+ int retval = -1; -+ if (result != NULL) -+ { -+ size_t i; -+ for (i = 0; i < length; i++) -+ if (fputwc (result[i], stream) == WEOF) -+ break; -+ if (i == length) -+ retval = length; -+ free (result); -+ } -+ return retval; -+ } -+} -+ -+DLL_EXPORTED -+int -+libintl_fwprintf (FILE *stream, const wchar_t *format, ...) -+{ -+ va_list args; -+ int retval; -+ -+ va_start (args, format); -+ retval = libintl_vfwprintf (stream, format, args); -+ va_end (args); -+ return retval; -+} -+ -+DLL_EXPORTED -+int -+libintl_vwprintf (const wchar_t *format, va_list args) -+{ -+ return libintl_vfwprintf (stdout, format, args); -+} -+ -+DLL_EXPORTED -+int -+libintl_wprintf (const wchar_t *format, ...) -+{ -+ va_list args; -+ int retval; -+ -+ va_start (args, format); -+ retval = libintl_vwprintf (format, args); -+ va_end (args); -+ return retval; -+} -+ -+DLL_EXPORTED -+int -+libintl_vswprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, va_list args) -+{ -+ if (wcschr (format, '$') == NULL) -+ return system_vswprintf (resultbuf, length, format, args); -+ else -+ { -+ size_t maxlength = length; -+ wchar_t *result = libintl_vasnwprintf (resultbuf, &length, format, args); -+ if (result != resultbuf) -+ { -+ if (maxlength > 0) -+ { -+ if (length < maxlength) -+ abort (); -+ memcpy (resultbuf, result, (maxlength - 1) * sizeof (wchar_t)); -+ resultbuf[maxlength - 1] = 0; -+ } -+ free (result); -+ return -1; -+ } -+ else -+ return length; -+ } -+} -+ -+DLL_EXPORTED -+int -+libintl_swprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, ...) -+{ -+ va_list args; -+ int retval; -+ -+ va_start (args, format); -+ retval = libintl_vswprintf (resultbuf, length, format, args); -+ va_end (args); -+ return retval; -+} -+ -+#endif -+ -+#endif -diff -r 4216c218ee44 -r e04165992166 intl/relocatable.c ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/intl/relocatable.c Sat May 28 13:45:22 2005 +0000 -@@ -0,0 +1,449 @@ -+/* Provide relocatable packages. -+ Copyright (C) 2003-2004 Free Software Foundation, Inc. -+ Written by Bruno Haible , 2003. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Library 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Library General Public License for more details. -+ -+ You should have received a copy of the GNU Library General Public -+ License along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ USA. */ -+ -+ -+/* Tell glibc's to provide a prototype for getline(). -+ This must come before because may include -+ , and once has been included, it's too late. */ -+#ifndef _GNU_SOURCE -+# define _GNU_SOURCE 1 -+#endif -+ -+#ifdef HAVE_CONFIG_H -+# include "config.h" -+#endif -+ -+/* Specification. */ -+#include "relocatable.h" -+ -+#if ENABLE_RELOCATABLE -+ -+#include -+#include -+#include -+#include -+ -+#ifdef NO_XMALLOC -+# define xmalloc malloc -+#else -+# include "xalloc.h" -+#endif -+ -+#if defined _WIN32 || defined __WIN32__ -+# define WIN32_LEAN_AND_MEAN -+# include -+#endif -+ -+#if DEPENDS_ON_LIBCHARSET -+# include -+#endif -+#if DEPENDS_ON_LIBICONV && HAVE_ICONV -+# include -+#endif -+#if DEPENDS_ON_LIBINTL && ENABLE_NLS -+# include -+#endif -+ -+/* Faked cheap 'bool'. */ -+#undef bool -+#undef false -+#undef true -+#define bool int -+#define false 0 -+#define true 1 -+ -+/* Pathname support. -+ ISSLASH(C) tests whether C is a directory separator character. -+ IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. -+ */ -+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ -+ /* Win32, Cygwin, OS/2, DOS */ -+# define ISSLASH(C) ((C) == '/' || (C) == '\\') -+# define HAS_DEVICE(P) \ -+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ -+ && (P)[1] == ':') -+# define IS_PATH_WITH_DIR(P) \ -+ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P)) -+# define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0) -+#else -+ /* Unix */ -+# define ISSLASH(C) ((C) == '/') -+# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL) -+# define FILE_SYSTEM_PREFIX_LEN(P) 0 -+#endif -+ -+/* Original installation prefix. */ -+static char *orig_prefix; -+static size_t orig_prefix_len; -+/* Current installation prefix. */ -+static char *curr_prefix; -+static size_t curr_prefix_len; -+/* These prefixes do not end in a slash. Anything that will be concatenated -+ to them must start with a slash. */ -+ -+/* Sets the original and the current installation prefix of this module. -+ Relocation simply replaces a pathname starting with the original prefix -+ by the corresponding pathname with the current prefix instead. Both -+ prefixes should be directory names without trailing slash (i.e. use "" -+ instead of "/"). */ -+static void -+set_this_relocation_prefix (const char *orig_prefix_arg, -+ const char *curr_prefix_arg) -+{ -+ if (orig_prefix_arg != NULL && curr_prefix_arg != NULL -+ /* Optimization: if orig_prefix and curr_prefix are equal, the -+ relocation is a nop. */ -+ && strcmp (orig_prefix_arg, curr_prefix_arg) != 0) -+ { -+ /* Duplicate the argument strings. */ -+ char *memory; -+ -+ orig_prefix_len = strlen (orig_prefix_arg); -+ curr_prefix_len = strlen (curr_prefix_arg); -+ memory = (char *) xmalloc (orig_prefix_len + 1 + curr_prefix_len + 1); -+#ifdef NO_XMALLOC -+ if (memory != NULL) -+#endif -+ { -+ memcpy (memory, orig_prefix_arg, orig_prefix_len + 1); -+ orig_prefix = memory; -+ memory += orig_prefix_len + 1; -+ memcpy (memory, curr_prefix_arg, curr_prefix_len + 1); -+ curr_prefix = memory; -+ return; -+ } -+ } -+ orig_prefix = NULL; -+ curr_prefix = NULL; -+ /* Don't worry about wasted memory here - this function is usually only -+ called once. */ -+} -+ -+/* Sets the original and the current installation prefix of the package. -+ Relocation simply replaces a pathname starting with the original prefix -+ by the corresponding pathname with the current prefix instead. Both -+ prefixes should be directory names without trailing slash (i.e. use "" -+ instead of "/"). */ -+void -+set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg) -+{ -+ set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg); -+ -+ /* Now notify all dependent libraries. */ -+#if DEPENDS_ON_LIBCHARSET -+ libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); -+#endif -+#if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109 -+ libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); -+#endif -+#if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix -+ libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); -+#endif -+} -+ -+#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR) -+ -+/* Convenience function: -+ Computes the current installation prefix, based on the original -+ installation prefix, the original installation directory of a particular -+ file, and the current pathname of this file. Returns NULL upon failure. */ -+#ifdef IN_LIBRARY -+#define compute_curr_prefix local_compute_curr_prefix -+static -+#endif -+const char * -+compute_curr_prefix (const char *orig_installprefix, -+ const char *orig_installdir, -+ const char *curr_pathname) -+{ -+ const char *curr_installdir; -+ const char *rel_installdir; -+ -+ if (curr_pathname == NULL) -+ return NULL; -+ -+ /* Determine the relative installation directory, relative to the prefix. -+ This is simply the difference between orig_installprefix and -+ orig_installdir. */ -+ if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix)) -+ != 0) -+ /* Shouldn't happen - nothing should be installed outside $(prefix). */ -+ return NULL; -+ rel_installdir = orig_installdir + strlen (orig_installprefix); -+ -+ /* Determine the current installation directory. */ -+ { -+ const char *p_base = curr_pathname + FILE_SYSTEM_PREFIX_LEN (curr_pathname); -+ const char *p = curr_pathname + strlen (curr_pathname); -+ char *q; -+ -+ while (p > p_base) -+ { -+ p--; -+ if (ISSLASH (*p)) -+ break; -+ } -+ -+ q = (char *) xmalloc (p - curr_pathname + 1); -+#ifdef NO_XMALLOC -+ if (q == NULL) -+ return NULL; -+#endif -+ memcpy (q, curr_pathname, p - curr_pathname); -+ q[p - curr_pathname] = '\0'; -+ curr_installdir = q; -+ } -+ -+ /* Compute the current installation prefix by removing the trailing -+ rel_installdir from it. */ -+ { -+ const char *rp = rel_installdir + strlen (rel_installdir); -+ const char *cp = curr_installdir + strlen (curr_installdir); -+ const char *cp_base = -+ curr_installdir + FILE_SYSTEM_PREFIX_LEN (curr_installdir); -+ -+ while (rp > rel_installdir && cp > cp_base) -+ { -+ bool same = false; -+ const char *rpi = rp; -+ const char *cpi = cp; -+ -+ while (rpi > rel_installdir && cpi > cp_base) -+ { -+ rpi--; -+ cpi--; -+ if (ISSLASH (*rpi) || ISSLASH (*cpi)) -+ { -+ if (ISSLASH (*rpi) && ISSLASH (*cpi)) -+ same = true; -+ break; -+ } -+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ -+ /* Win32, Cygwin, OS/2, DOS - case insignificant filesystem */ -+ if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi) -+ != (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi)) -+ break; -+#else -+ if (*rpi != *cpi) -+ break; -+#endif -+ } -+ if (!same) -+ break; -+ /* The last pathname component was the same. opi and cpi now point -+ to the slash before it. */ -+ rp = rpi; -+ cp = cpi; -+ } -+ -+ if (rp > rel_installdir) -+ /* Unexpected: The curr_installdir does not end with rel_installdir. */ -+ return NULL; -+ -+ { -+ size_t curr_prefix_len = cp - curr_installdir; -+ char *curr_prefix; -+ -+ curr_prefix = (char *) xmalloc (curr_prefix_len + 1); -+#ifdef NO_XMALLOC -+ if (curr_prefix == NULL) -+ return NULL; -+#endif -+ memcpy (curr_prefix, curr_installdir, curr_prefix_len); -+ curr_prefix[curr_prefix_len] = '\0'; -+ -+ return curr_prefix; -+ } -+ } -+} -+ -+#endif /* !IN_LIBRARY || PIC */ -+ -+#if defined PIC && defined INSTALLDIR -+ -+/* Full pathname of shared library, or NULL. */ -+static char *shared_library_fullname; -+ -+#if defined _WIN32 || defined __WIN32__ -+ -+/* Determine the full pathname of the shared library when it is loaded. */ -+ -+BOOL WINAPI -+DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved) -+{ -+ (void) reserved; -+ -+ if (event == DLL_PROCESS_ATTACH) -+ { -+ /* The DLL is being loaded into an application's address range. */ -+ static char location[MAX_PATH]; -+ -+ if (!GetModuleFileName (module_handle, location, sizeof (location))) -+ /* Shouldn't happen. */ -+ return FALSE; -+ -+ if (!IS_PATH_WITH_DIR (location)) -+ /* Shouldn't happen. */ -+ return FALSE; -+ -+ shared_library_fullname = strdup (location); -+ } -+ -+ return TRUE; -+} -+ -+#else /* Unix */ -+ -+static void -+find_shared_library_fullname () -+{ -+#if defined __linux__ && __GLIBC__ >= 2 -+ /* Linux has /proc/self/maps. glibc 2 has the getline() function. */ -+ FILE *fp; -+ -+ /* Open the current process' maps file. It describes one VMA per line. */ -+ fp = fopen ("/proc/self/maps", "r"); -+ if (fp) -+ { -+ unsigned long address = (unsigned long) &find_shared_library_fullname; -+ for (;;) -+ { -+ unsigned long start, end; -+ int c; -+ -+ if (fscanf (fp, "%lx-%lx", &start, &end) != 2) -+ break; -+ if (address >= start && address <= end - 1) -+ { -+ /* Found it. Now see if this line contains a filename. */ -+ while (c = getc (fp), c != EOF && c != '\n' && c != '/') -+ continue; -+ if (c == '/') -+ { -+ size_t size; -+ int len; -+ -+ ungetc (c, fp); -+ shared_library_fullname = NULL; size = 0; -+ len = getline (&shared_library_fullname, &size, fp); -+ if (len >= 0) -+ { -+ /* Success: filled shared_library_fullname. */ -+ if (len > 0 && shared_library_fullname[len - 1] == '\n') -+ shared_library_fullname[len - 1] = '\0'; -+ } -+ } -+ break; -+ } -+ while (c = getc (fp), c != EOF && c != '\n') -+ continue; -+ } -+ fclose (fp); -+ } -+#endif -+} -+ -+#endif /* WIN32 / Unix */ -+ -+/* Return the full pathname of the current shared library. -+ Return NULL if unknown. -+ Guaranteed to work only on Linux and Woe32. */ -+static char * -+get_shared_library_fullname () -+{ -+#if !(defined _WIN32 || defined __WIN32__) -+ static bool tried_find_shared_library_fullname; -+ if (!tried_find_shared_library_fullname) -+ { -+ find_shared_library_fullname (); -+ tried_find_shared_library_fullname = true; -+ } -+#endif -+ return shared_library_fullname; -+} -+ -+#endif /* PIC */ -+ -+/* Returns the pathname, relocated according to the current installation -+ directory. */ -+const char * -+relocate (const char *pathname) -+{ -+#if defined PIC && defined INSTALLDIR -+ static int initialized; -+ -+ /* Initialization code for a shared library. */ -+ if (!initialized) -+ { -+ /* At this point, orig_prefix and curr_prefix likely have already been -+ set through the main program's set_program_name_and_installdir -+ function. This is sufficient in the case that the library has -+ initially been installed in the same orig_prefix. But we can do -+ better, to also cover the cases that 1. it has been installed -+ in a different prefix before being moved to orig_prefix and (later) -+ to curr_prefix, 2. unlike the program, it has not moved away from -+ orig_prefix. */ -+ const char *orig_installprefix = INSTALLPREFIX; -+ const char *orig_installdir = INSTALLDIR; -+ const char *curr_prefix_better; -+ -+ curr_prefix_better = -+ compute_curr_prefix (orig_installprefix, orig_installdir, -+ get_shared_library_fullname ()); -+ if (curr_prefix_better == NULL) -+ curr_prefix_better = curr_prefix; -+ -+ set_relocation_prefix (orig_installprefix, curr_prefix_better); -+ -+ initialized = 1; -+ } -+#endif -+ -+ /* Note: It is not necessary to perform case insensitive comparison here, -+ even for DOS-like filesystems, because the pathname argument was -+ typically created from the same Makefile variable as orig_prefix came -+ from. */ -+ if (orig_prefix != NULL && curr_prefix != NULL -+ && strncmp (pathname, orig_prefix, orig_prefix_len) == 0) -+ { -+ if (pathname[orig_prefix_len] == '\0') -+ /* pathname equals orig_prefix. */ -+ return curr_prefix; -+ if (ISSLASH (pathname[orig_prefix_len])) -+ { -+ /* pathname starts with orig_prefix. */ -+ const char *pathname_tail = &pathname[orig_prefix_len]; -+ char *result = -+ (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1); -+ -+#ifdef NO_XMALLOC -+ if (result != NULL) -+#endif -+ { -+ memcpy (result, curr_prefix, curr_prefix_len); -+ strcpy (result + curr_prefix_len, pathname_tail); -+ return result; -+ } -+ } -+ } -+ /* Nothing to relocate. */ -+ return pathname; -+} -+ -+#endif -diff -r 4216c218ee44 -r e04165992166 intl/relocatable.h ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/intl/relocatable.h Sat May 28 13:45:22 2005 +0000 -@@ -0,0 +1,77 @@ -+/* Provide relocatable packages. -+ Copyright (C) 2003 Free Software Foundation, Inc. -+ Written by Bruno Haible , 2003. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Library 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Library General Public License for more details. -+ -+ You should have received a copy of the GNU Library General Public -+ License along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ USA. */ -+ -+#ifndef _RELOCATABLE_H -+#define _RELOCATABLE_H -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+ -+/* This can be enabled through the configure --enable-relocatable option. */ -+#if ENABLE_RELOCATABLE -+ -+/* When building a DLL, we must export some functions. Note that because -+ this is a private .h file, we don't need to use __declspec(dllimport) -+ in any case. */ -+#if defined _MSC_VER && BUILDING_DLL -+# define RELOCATABLE_DLL_EXPORTED __declspec(dllexport) -+#else -+# define RELOCATABLE_DLL_EXPORTED -+#endif -+ -+/* Sets the original and the current installation prefix of the package. -+ Relocation simply replaces a pathname starting with the original prefix -+ by the corresponding pathname with the current prefix instead. Both -+ prefixes should be directory names without trailing slash (i.e. use "" -+ instead of "/"). */ -+extern RELOCATABLE_DLL_EXPORTED void -+ set_relocation_prefix (const char *orig_prefix, -+ const char *curr_prefix); -+ -+/* Returns the pathname, relocated according to the current installation -+ directory. */ -+extern const char * relocate (const char *pathname); -+ -+/* Memory management: relocate() leaks memory, because it has to construct -+ a fresh pathname. If this is a problem because your program calls -+ relocate() frequently, think about caching the result. */ -+ -+/* Convenience function: -+ Computes the current installation prefix, based on the original -+ installation prefix, the original installation directory of a particular -+ file, and the current pathname of this file. Returns NULL upon failure. */ -+extern const char * compute_curr_prefix (const char *orig_installprefix, -+ const char *orig_installdir, -+ const char *curr_pathname); -+ -+#else -+ -+/* By default, we use the hardwired pathnames. */ -+#define relocate(pathname) (pathname) -+ -+#endif -+ -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* _RELOCATABLE_H */ -diff -r 4216c218ee44 -r e04165992166 intl/textdomain.c ---- a/intl/textdomain.c Sat May 28 13:40:15 2005 +0000 -+++ b/intl/textdomain.c Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - /* Implementation of the textdomain(3) function. -- Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc. -+ Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -77,8 +77,7 @@ __libc_rwlock_define (extern, _nl_state_ - If DOMAINNAME is null, return the current default. - If DOMAINNAME is "", reset to the default of "messages". */ - char * --TEXTDOMAIN (domainname) -- const char *domainname; -+TEXTDOMAIN (const char *domainname) - { - char *new_domain; - char *old_domain; -diff -r 4216c218ee44 -r e04165992166 intl/vasnprintf.c ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/intl/vasnprintf.c Sat May 28 13:45:22 2005 +0000 -@@ -0,0 +1,902 @@ -+/* vsprintf with automatic memory allocation. -+ Copyright (C) 1999, 2002-2005 Free Software Foundation, Inc. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Library 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Library General Public License for more details. -+ -+ You should have received a copy of the GNU Library General Public -+ License along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ USA. */ -+ -+/* Tell glibc's to provide a prototype for snprintf(). -+ This must come before because may include -+ , and once has been included, it's too late. */ -+#ifndef _GNU_SOURCE -+# define _GNU_SOURCE 1 -+#endif -+ -+#ifdef HAVE_CONFIG_H -+# include -+#endif -+#ifndef IN_LIBINTL -+# include -+#endif -+ -+/* Specification. */ -+#if WIDE_CHAR_VERSION -+# include "vasnwprintf.h" -+#else -+# include "vasnprintf.h" -+#endif -+ -+#include /* snprintf(), sprintf() */ -+#include /* abort(), malloc(), realloc(), free() */ -+#include /* memcpy(), strlen() */ -+#include /* errno */ -+#include /* CHAR_BIT, INT_MAX */ -+#include /* DBL_MAX_EXP, LDBL_MAX_EXP */ -+#if WIDE_CHAR_VERSION -+# include "wprintf-parse.h" -+#else -+# include "printf-parse.h" -+#endif -+ -+/* Checked size_t computations. */ -+#include "xsize.h" -+ -+/* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW. */ -+#ifndef EOVERFLOW -+# define EOVERFLOW E2BIG -+#endif -+ -+#ifdef HAVE_WCHAR_T -+# ifdef HAVE_WCSLEN -+# define local_wcslen wcslen -+# else -+ /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid -+ a dependency towards this library, here is a local substitute. -+ Define this substitute only once, even if this file is included -+ twice in the same compilation unit. */ -+# ifndef local_wcslen_defined -+# define local_wcslen_defined 1 -+static size_t -+local_wcslen (const wchar_t *s) -+{ -+ const wchar_t *ptr; -+ -+ for (ptr = s; *ptr != (wchar_t) 0; ptr++) -+ ; -+ return ptr - s; -+} -+# endif -+# endif -+#endif -+ -+#if WIDE_CHAR_VERSION -+# define VASNPRINTF vasnwprintf -+# define CHAR_T wchar_t -+# define DIRECTIVE wchar_t_directive -+# define DIRECTIVES wchar_t_directives -+# define PRINTF_PARSE wprintf_parse -+# define USE_SNPRINTF 1 -+# if HAVE_DECL__SNWPRINTF -+ /* On Windows, the function swprintf() has a different signature than -+ on Unix; we use the _snwprintf() function instead. */ -+# define SNPRINTF _snwprintf -+# else -+ /* Unix. */ -+# define SNPRINTF swprintf -+# endif -+#else -+# define VASNPRINTF vasnprintf -+# define CHAR_T char -+# define DIRECTIVE char_directive -+# define DIRECTIVES char_directives -+# define PRINTF_PARSE printf_parse -+# define USE_SNPRINTF (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) -+# if HAVE_DECL__SNPRINTF -+ /* Windows. */ -+# define SNPRINTF _snprintf -+# else -+ /* Unix. */ -+# define SNPRINTF snprintf -+# endif -+#endif -+ -+CHAR_T * -+VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list args) -+{ -+ DIRECTIVES d; -+ arguments a; -+ -+ if (PRINTF_PARSE (format, &d, &a) < 0) -+ { -+ errno = EINVAL; -+ return NULL; -+ } -+ -+#define CLEANUP() \ -+ free (d.dir); \ -+ if (a.arg) \ -+ free (a.arg); -+ -+ if (printf_fetchargs (args, &a) < 0) -+ { -+ CLEANUP (); -+ errno = EINVAL; -+ return NULL; -+ } -+ -+ { -+ size_t buf_neededlength; -+ CHAR_T *buf; -+ CHAR_T *buf_malloced; -+ const CHAR_T *cp; -+ size_t i; -+ DIRECTIVE *dp; -+ /* Output string accumulator. */ -+ CHAR_T *result; -+ size_t allocated; -+ size_t length; -+ -+ /* Allocate a small buffer that will hold a directive passed to -+ sprintf or snprintf. */ -+ buf_neededlength = -+ xsum4 (7, d.max_width_length, d.max_precision_length, 6); -+#if HAVE_ALLOCA -+ if (buf_neededlength < 4000 / sizeof (CHAR_T)) -+ { -+ buf = (CHAR_T *) alloca (buf_neededlength * sizeof (CHAR_T)); -+ buf_malloced = NULL; -+ } -+ else -+#endif -+ { -+ size_t buf_memsize = xtimes (buf_neededlength, sizeof (CHAR_T)); -+ if (size_overflow_p (buf_memsize)) -+ goto out_of_memory_1; -+ buf = (CHAR_T *) malloc (buf_memsize); -+ if (buf == NULL) -+ goto out_of_memory_1; -+ buf_malloced = buf; -+ } -+ -+ if (resultbuf != NULL) -+ { -+ result = resultbuf; -+ allocated = *lengthp; -+ } -+ else -+ { -+ result = NULL; -+ allocated = 0; -+ } -+ length = 0; -+ /* Invariants: -+ result is either == resultbuf or == NULL or malloc-allocated. -+ If length > 0, then result != NULL. */ -+ -+ /* Ensures that allocated >= needed. Aborts through a jump to -+ out_of_memory if needed is SIZE_MAX or otherwise too big. */ -+#define ENSURE_ALLOCATION(needed) \ -+ if ((needed) > allocated) \ -+ { \ -+ size_t memory_size; \ -+ CHAR_T *memory; \ -+ \ -+ allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \ -+ if ((needed) > allocated) \ -+ allocated = (needed); \ -+ memory_size = xtimes (allocated, sizeof (CHAR_T)); \ -+ if (size_overflow_p (memory_size)) \ -+ goto out_of_memory; \ -+ if (result == resultbuf || result == NULL) \ -+ memory = (CHAR_T *) malloc (memory_size); \ -+ else \ -+ memory = (CHAR_T *) realloc (result, memory_size); \ -+ if (memory == NULL) \ -+ goto out_of_memory; \ -+ if (result == resultbuf && length > 0) \ -+ memcpy (memory, result, length * sizeof (CHAR_T)); \ -+ result = memory; \ -+ } -+ -+ for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++) -+ { -+ if (cp != dp->dir_start) -+ { -+ size_t n = dp->dir_start - cp; -+ size_t augmented_length = xsum (length, n); -+ -+ ENSURE_ALLOCATION (augmented_length); -+ memcpy (result + length, cp, n * sizeof (CHAR_T)); -+ length = augmented_length; -+ } -+ if (i == d.count) -+ break; -+ -+ /* Execute a single directive. */ -+ if (dp->conversion == '%') -+ { -+ size_t augmented_length; -+ -+ if (!(dp->arg_index == ARG_NONE)) -+ abort (); -+ augmented_length = xsum (length, 1); -+ ENSURE_ALLOCATION (augmented_length); -+ result[length] = '%'; -+ length = augmented_length; -+ } -+ else -+ { -+ if (!(dp->arg_index != ARG_NONE)) -+ abort (); -+ -+ if (dp->conversion == 'n') -+ { -+ switch (a.arg[dp->arg_index].type) -+ { -+ case TYPE_COUNT_SCHAR_POINTER: -+ *a.arg[dp->arg_index].a.a_count_schar_pointer = length; -+ break; -+ case TYPE_COUNT_SHORT_POINTER: -+ *a.arg[dp->arg_index].a.a_count_short_pointer = length; -+ break; -+ case TYPE_COUNT_INT_POINTER: -+ *a.arg[dp->arg_index].a.a_count_int_pointer = length; -+ break; -+ case TYPE_COUNT_LONGINT_POINTER: -+ *a.arg[dp->arg_index].a.a_count_longint_pointer = length; -+ break; -+#ifdef HAVE_LONG_LONG -+ case TYPE_COUNT_LONGLONGINT_POINTER: -+ *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length; -+ break; -+#endif -+ default: -+ abort (); -+ } -+ } -+ else -+ { -+ arg_type type = a.arg[dp->arg_index].type; -+ CHAR_T *p; -+ unsigned int prefix_count; -+ int prefixes[2]; -+#if !USE_SNPRINTF -+ size_t tmp_length; -+ CHAR_T tmpbuf[700]; -+ CHAR_T *tmp; -+ -+ /* Allocate a temporary buffer of sufficient size for calling -+ sprintf. */ -+ { -+ size_t width; -+ size_t precision; -+ -+ width = 0; -+ if (dp->width_start != dp->width_end) -+ { -+ if (dp->width_arg_index != ARG_NONE) -+ { -+ int arg; -+ -+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) -+ abort (); -+ arg = a.arg[dp->width_arg_index].a.a_int; -+ width = (arg < 0 ? (unsigned int) (-arg) : arg); -+ } -+ else -+ { -+ const CHAR_T *digitp = dp->width_start; -+ -+ do -+ width = xsum (xtimes (width, 10), *digitp++ - '0'); -+ while (digitp != dp->width_end); -+ } -+ } -+ -+ precision = 6; -+ if (dp->precision_start != dp->precision_end) -+ { -+ if (dp->precision_arg_index != ARG_NONE) -+ { -+ int arg; -+ -+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) -+ abort (); -+ arg = a.arg[dp->precision_arg_index].a.a_int; -+ precision = (arg < 0 ? 0 : arg); -+ } -+ else -+ { -+ const CHAR_T *digitp = dp->precision_start + 1; -+ -+ precision = 0; -+ while (digitp != dp->precision_end) -+ precision = xsum (xtimes (precision, 10), *digitp++ - '0'); -+ } -+ } -+ -+ switch (dp->conversion) -+ { -+ -+ case 'd': case 'i': case 'u': -+# ifdef HAVE_LONG_LONG -+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) -+ tmp_length = -+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT -+ * 0.30103 /* binary -> decimal */ -+ * 2 /* estimate for FLAG_GROUP */ -+ ) -+ + 1 /* turn floor into ceil */ -+ + 1; /* account for leading sign */ -+ else -+# endif -+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT) -+ tmp_length = -+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT -+ * 0.30103 /* binary -> decimal */ -+ * 2 /* estimate for FLAG_GROUP */ -+ ) -+ + 1 /* turn floor into ceil */ -+ + 1; /* account for leading sign */ -+ else -+ tmp_length = -+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT -+ * 0.30103 /* binary -> decimal */ -+ * 2 /* estimate for FLAG_GROUP */ -+ ) -+ + 1 /* turn floor into ceil */ -+ + 1; /* account for leading sign */ -+ break; -+ -+ case 'o': -+# ifdef HAVE_LONG_LONG -+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) -+ tmp_length = -+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT -+ * 0.333334 /* binary -> octal */ -+ ) -+ + 1 /* turn floor into ceil */ -+ + 1; /* account for leading sign */ -+ else -+# endif -+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT) -+ tmp_length = -+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT -+ * 0.333334 /* binary -> octal */ -+ ) -+ + 1 /* turn floor into ceil */ -+ + 1; /* account for leading sign */ -+ else -+ tmp_length = -+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT -+ * 0.333334 /* binary -> octal */ -+ ) -+ + 1 /* turn floor into ceil */ -+ + 1; /* account for leading sign */ -+ break; -+ -+ case 'x': case 'X': -+# ifdef HAVE_LONG_LONG -+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) -+ tmp_length = -+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT -+ * 0.25 /* binary -> hexadecimal */ -+ ) -+ + 1 /* turn floor into ceil */ -+ + 2; /* account for leading sign or alternate form */ -+ else -+# endif -+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT) -+ tmp_length = -+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT -+ * 0.25 /* binary -> hexadecimal */ -+ ) -+ + 1 /* turn floor into ceil */ -+ + 2; /* account for leading sign or alternate form */ -+ else -+ tmp_length = -+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT -+ * 0.25 /* binary -> hexadecimal */ -+ ) -+ + 1 /* turn floor into ceil */ -+ + 2; /* account for leading sign or alternate form */ -+ break; -+ -+ case 'f': case 'F': -+# ifdef HAVE_LONG_DOUBLE -+ if (type == TYPE_LONGDOUBLE) -+ tmp_length = -+ (unsigned int) (LDBL_MAX_EXP -+ * 0.30103 /* binary -> decimal */ -+ * 2 /* estimate for FLAG_GROUP */ -+ ) -+ + 1 /* turn floor into ceil */ -+ + 10; /* sign, decimal point etc. */ -+ else -+# endif -+ tmp_length = -+ (unsigned int) (DBL_MAX_EXP -+ * 0.30103 /* binary -> decimal */ -+ * 2 /* estimate for FLAG_GROUP */ -+ ) -+ + 1 /* turn floor into ceil */ -+ + 10; /* sign, decimal point etc. */ -+ tmp_length = xsum (tmp_length, precision); -+ break; -+ -+ case 'e': case 'E': case 'g': case 'G': -+ case 'a': case 'A': -+ tmp_length = -+ 12; /* sign, decimal point, exponent etc. */ -+ tmp_length = xsum (tmp_length, precision); -+ break; -+ -+ case 'c': -+# if defined HAVE_WINT_T && !WIDE_CHAR_VERSION -+ if (type == TYPE_WIDE_CHAR) -+ tmp_length = MB_CUR_MAX; -+ else -+# endif -+ tmp_length = 1; -+ break; -+ -+ case 's': -+# ifdef HAVE_WCHAR_T -+ if (type == TYPE_WIDE_STRING) -+ { -+ tmp_length = -+ local_wcslen (a.arg[dp->arg_index].a.a_wide_string); -+ -+# if !WIDE_CHAR_VERSION -+ tmp_length = xtimes (tmp_length, MB_CUR_MAX); -+# endif -+ } -+ else -+# endif -+ tmp_length = strlen (a.arg[dp->arg_index].a.a_string); -+ break; -+ -+ case 'p': -+ tmp_length = -+ (unsigned int) (sizeof (void *) * CHAR_BIT -+ * 0.25 /* binary -> hexadecimal */ -+ ) -+ + 1 /* turn floor into ceil */ -+ + 2; /* account for leading 0x */ -+ break; -+ -+ default: -+ abort (); -+ } -+ -+ if (tmp_length < width) -+ tmp_length = width; -+ -+ tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ -+ } -+ -+ if (tmp_length <= sizeof (tmpbuf) / sizeof (CHAR_T)) -+ tmp = tmpbuf; -+ else -+ { -+ size_t tmp_memsize = xtimes (tmp_length, sizeof (CHAR_T)); -+ -+ if (size_overflow_p (tmp_memsize)) -+ /* Overflow, would lead to out of memory. */ -+ goto out_of_memory; -+ tmp = (CHAR_T *) malloc (tmp_memsize); -+ if (tmp == NULL) -+ /* Out of memory. */ -+ goto out_of_memory; -+ } -+#endif -+ -+ /* Construct the format string for calling snprintf or -+ sprintf. */ -+ p = buf; -+ *p++ = '%'; -+ if (dp->flags & FLAG_GROUP) -+ *p++ = '\''; -+ if (dp->flags & FLAG_LEFT) -+ *p++ = '-'; -+ if (dp->flags & FLAG_SHOWSIGN) -+ *p++ = '+'; -+ if (dp->flags & FLAG_SPACE) -+ *p++ = ' '; -+ if (dp->flags & FLAG_ALT) -+ *p++ = '#'; -+ if (dp->flags & FLAG_ZERO) -+ *p++ = '0'; -+ if (dp->width_start != dp->width_end) -+ { -+ size_t n = dp->width_end - dp->width_start; -+ memcpy (p, dp->width_start, n * sizeof (CHAR_T)); -+ p += n; -+ } -+ if (dp->precision_start != dp->precision_end) -+ { -+ size_t n = dp->precision_end - dp->precision_start; -+ memcpy (p, dp->precision_start, n * sizeof (CHAR_T)); -+ p += n; -+ } -+ -+ switch (type) -+ { -+#ifdef HAVE_LONG_LONG -+ case TYPE_LONGLONGINT: -+ case TYPE_ULONGLONGINT: -+ *p++ = 'l'; -+ /*FALLTHROUGH*/ -+#endif -+ case TYPE_LONGINT: -+ case TYPE_ULONGINT: -+#ifdef HAVE_WINT_T -+ case TYPE_WIDE_CHAR: -+#endif -+#ifdef HAVE_WCHAR_T -+ case TYPE_WIDE_STRING: -+#endif -+ *p++ = 'l'; -+ break; -+#ifdef HAVE_LONG_DOUBLE -+ case TYPE_LONGDOUBLE: -+ *p++ = 'L'; -+ break; -+#endif -+ default: -+ break; -+ } -+ *p = dp->conversion; -+#if USE_SNPRINTF -+ p[1] = '%'; -+ p[2] = 'n'; -+ p[3] = '\0'; -+#else -+ p[1] = '\0'; -+#endif -+ -+ /* Construct the arguments for calling snprintf or sprintf. */ -+ prefix_count = 0; -+ if (dp->width_arg_index != ARG_NONE) -+ { -+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) -+ abort (); -+ prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int; -+ } -+ if (dp->precision_arg_index != ARG_NONE) -+ { -+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) -+ abort (); -+ prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int; -+ } -+ -+#if USE_SNPRINTF -+ /* Prepare checking whether snprintf returns the count -+ via %n. */ -+ ENSURE_ALLOCATION (xsum (length, 1)); -+ result[length] = '\0'; -+#endif -+ -+ for (;;) -+ { -+ size_t maxlen; -+ int count; -+ int retcount; -+ -+ maxlen = allocated - length; -+ count = -1; -+ retcount = 0; -+ -+#if USE_SNPRINTF -+# define SNPRINTF_BUF(arg) \ -+ switch (prefix_count) \ -+ { \ -+ case 0: \ -+ retcount = SNPRINTF (result + length, maxlen, buf, \ -+ arg, &count); \ -+ break; \ -+ case 1: \ -+ retcount = SNPRINTF (result + length, maxlen, buf, \ -+ prefixes[0], arg, &count); \ -+ break; \ -+ case 2: \ -+ retcount = SNPRINTF (result + length, maxlen, buf, \ -+ prefixes[0], prefixes[1], arg, \ -+ &count); \ -+ break; \ -+ default: \ -+ abort (); \ -+ } -+#else -+# define SNPRINTF_BUF(arg) \ -+ switch (prefix_count) \ -+ { \ -+ case 0: \ -+ count = sprintf (tmp, buf, arg); \ -+ break; \ -+ case 1: \ -+ count = sprintf (tmp, buf, prefixes[0], arg); \ -+ break; \ -+ case 2: \ -+ count = sprintf (tmp, buf, prefixes[0], prefixes[1],\ -+ arg); \ -+ break; \ -+ default: \ -+ abort (); \ -+ } -+#endif -+ -+ switch (type) -+ { -+ case TYPE_SCHAR: -+ { -+ int arg = a.arg[dp->arg_index].a.a_schar; -+ SNPRINTF_BUF (arg); -+ } -+ break; -+ case TYPE_UCHAR: -+ { -+ unsigned int arg = a.arg[dp->arg_index].a.a_uchar; -+ SNPRINTF_BUF (arg); -+ } -+ break; -+ case TYPE_SHORT: -+ { -+ int arg = a.arg[dp->arg_index].a.a_short; -+ SNPRINTF_BUF (arg); -+ } -+ break; -+ case TYPE_USHORT: -+ { -+ unsigned int arg = a.arg[dp->arg_index].a.a_ushort; -+ SNPRINTF_BUF (arg); -+ } -+ break; -+ case TYPE_INT: -+ { -+ int arg = a.arg[dp->arg_index].a.a_int; -+ SNPRINTF_BUF (arg); -+ } -+ break; -+ case TYPE_UINT: -+ { -+ unsigned int arg = a.arg[dp->arg_index].a.a_uint; -+ SNPRINTF_BUF (arg); -+ } -+ break; -+ case TYPE_LONGINT: -+ { -+ long int arg = a.arg[dp->arg_index].a.a_longint; -+ SNPRINTF_BUF (arg); -+ } -+ break; -+ case TYPE_ULONGINT: -+ { -+ unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint; -+ SNPRINTF_BUF (arg); -+ } -+ break; -+#ifdef HAVE_LONG_LONG -+ case TYPE_LONGLONGINT: -+ { -+ long long int arg = a.arg[dp->arg_index].a.a_longlongint; -+ SNPRINTF_BUF (arg); -+ } -+ break; -+ case TYPE_ULONGLONGINT: -+ { -+ unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint; -+ SNPRINTF_BUF (arg); -+ } -+ break; -+#endif -+ case TYPE_DOUBLE: -+ { -+ double arg = a.arg[dp->arg_index].a.a_double; -+ SNPRINTF_BUF (arg); -+ } -+ break; -+#ifdef HAVE_LONG_DOUBLE -+ case TYPE_LONGDOUBLE: -+ { -+ long double arg = a.arg[dp->arg_index].a.a_longdouble; -+ SNPRINTF_BUF (arg); -+ } -+ break; -+#endif -+ case TYPE_CHAR: -+ { -+ int arg = a.arg[dp->arg_index].a.a_char; -+ SNPRINTF_BUF (arg); -+ } -+ break; -+#ifdef HAVE_WINT_T -+ case TYPE_WIDE_CHAR: -+ { -+ wint_t arg = a.arg[dp->arg_index].a.a_wide_char; -+ SNPRINTF_BUF (arg); -+ } -+ break; -+#endif -+ case TYPE_STRING: -+ { -+ const char *arg = a.arg[dp->arg_index].a.a_string; -+ SNPRINTF_BUF (arg); -+ } -+ break; -+#ifdef HAVE_WCHAR_T -+ case TYPE_WIDE_STRING: -+ { -+ const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; -+ SNPRINTF_BUF (arg); -+ } -+ break; -+#endif -+ case TYPE_POINTER: -+ { -+ void *arg = a.arg[dp->arg_index].a.a_pointer; -+ SNPRINTF_BUF (arg); -+ } -+ break; -+ default: -+ abort (); -+ } -+ -+#if USE_SNPRINTF -+ /* Portability: Not all implementations of snprintf() -+ are ISO C 99 compliant. Determine the number of -+ bytes that snprintf() has produced or would have -+ produced. */ -+ if (count >= 0) -+ { -+ /* Verify that snprintf() has NUL-terminated its -+ result. */ -+ if (count < maxlen && result[length + count] != '\0') -+ abort (); -+ /* Portability hack. */ -+ if (retcount > count) -+ count = retcount; -+ } -+ else -+ { -+ /* snprintf() doesn't understand the '%n' -+ directive. */ -+ if (p[1] != '\0') -+ { -+ /* Don't use the '%n' directive; instead, look -+ at the snprintf() return value. */ -+ p[1] = '\0'; -+ continue; -+ } -+ else -+ { -+ /* Look at the snprintf() return value. */ -+ if (retcount < 0) -+ { -+ /* HP-UX 10.20 snprintf() is doubly deficient: -+ It doesn't understand the '%n' directive, -+ *and* it returns -1 (rather than the length -+ that would have been required) when the -+ buffer is too small. */ -+ size_t bigger_need = -+ xsum (xtimes (allocated, 2), 12); -+ ENSURE_ALLOCATION (bigger_need); -+ continue; -+ } -+ else -+ count = retcount; -+ } -+ } -+#endif -+ -+ /* Attempt to handle failure. */ -+ if (count < 0) -+ { -+ if (!(result == resultbuf || result == NULL)) -+ free (result); -+ if (buf_malloced != NULL) -+ free (buf_malloced); -+ CLEANUP (); -+ errno = EINVAL; -+ return NULL; -+ } -+ -+#if !USE_SNPRINTF -+ if (count >= tmp_length) -+ /* tmp_length was incorrectly calculated - fix the -+ code above! */ -+ abort (); -+#endif -+ -+ /* Make room for the result. */ -+ if (count >= maxlen) -+ { -+ /* Need at least count bytes. But allocate -+ proportionally, to avoid looping eternally if -+ snprintf() reports a too small count. */ -+ size_t n = -+ xmax (xsum (length, count), xtimes (allocated, 2)); -+ -+ ENSURE_ALLOCATION (n); -+#if USE_SNPRINTF -+ continue; -+#endif -+ } -+ -+#if USE_SNPRINTF -+ /* The snprintf() result did fit. */ -+#else -+ /* Append the sprintf() result. */ -+ memcpy (result + length, tmp, count * sizeof (CHAR_T)); -+ if (tmp != tmpbuf) -+ free (tmp); -+#endif -+ -+ length += count; -+ break; -+ } -+ } -+ } -+ } -+ -+ /* Add the final NUL. */ -+ ENSURE_ALLOCATION (xsum (length, 1)); -+ result[length] = '\0'; -+ -+ if (result != resultbuf && length + 1 < allocated) -+ { -+ /* Shrink the allocated memory if possible. */ -+ CHAR_T *memory; -+ -+ memory = (CHAR_T *) realloc (result, (length + 1) * sizeof (CHAR_T)); -+ if (memory != NULL) -+ result = memory; -+ } -+ -+ if (buf_malloced != NULL) -+ free (buf_malloced); -+ CLEANUP (); -+ *lengthp = length; -+ if (length > INT_MAX) -+ goto length_overflow; -+ return result; -+ -+ length_overflow: -+ /* We could produce such a big string, but its length doesn't fit into -+ an 'int'. POSIX says that snprintf() fails with errno = EOVERFLOW in -+ this case. */ -+ if (result != resultbuf) -+ free (result); -+ errno = EOVERFLOW; -+ return NULL; -+ -+ out_of_memory: -+ if (!(result == resultbuf || result == NULL)) -+ free (result); -+ if (buf_malloced != NULL) -+ free (buf_malloced); -+ out_of_memory_1: -+ CLEANUP (); -+ errno = ENOMEM; -+ return NULL; -+ } -+} -+ -+#undef SNPRINTF -+#undef USE_SNPRINTF -+#undef PRINTF_PARSE -+#undef DIRECTIVES -+#undef DIRECTIVE -+#undef CHAR_T -+#undef VASNPRINTF -diff -r 4216c218ee44 -r e04165992166 intl/vasnprintf.h ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/intl/vasnprintf.h Sat May 28 13:45:22 2005 +0000 -@@ -0,0 +1,78 @@ -+/* vsprintf with automatic memory allocation. -+ Copyright (C) 2002-2004 Free Software Foundation, Inc. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Library 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Library General Public License for more details. -+ -+ You should have received a copy of the GNU Library General Public -+ License along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ USA. */ -+ -+#ifndef _VASNPRINTF_H -+#define _VASNPRINTF_H -+ -+/* Get va_list. */ -+#include -+ -+/* Get size_t. */ -+#include -+ -+#ifndef __attribute__ -+/* This feature is available in gcc versions 2.5 and later. */ -+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ -+# define __attribute__(Spec) /* empty */ -+# endif -+/* The __-protected variants of `format' and `printf' attributes -+ are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ -+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) -+# define __format__ format -+# define __printf__ printf -+# endif -+#endif -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+/* Write formatted output to a string dynamically allocated with malloc(). -+ You can pass a preallocated buffer for the result in RESULTBUF and its -+ size in *LENGTHP; otherwise you pass RESULTBUF = NULL. -+ If successful, return the address of the string (this may be = RESULTBUF -+ if no dynamic memory allocation was necessary) and set *LENGTHP to the -+ number of resulting bytes, excluding the trailing NUL. Upon error, set -+ errno and return NULL. -+ -+ When dynamic memory allocation occurs, the preallocated buffer is left -+ alone (with possibly modified contents). This makes it possible to use -+ a statically allocated or stack-allocated buffer, like this: -+ -+ char buf[100]; -+ size_t len = sizeof (buf); -+ char *output = vasnprintf (buf, &len, format, args); -+ if (output == NULL) -+ ... error handling ...; -+ else -+ { -+ ... use the output string ...; -+ if (output != buf) -+ free (output); -+ } -+ */ -+extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) -+ __attribute__ ((__format__ (__printf__, 3, 4))); -+extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) -+ __attribute__ ((__format__ (__printf__, 3, 0))); -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* _VASNPRINTF_H */ -diff -r 4216c218ee44 -r e04165992166 intl/vasnwprintf.h ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/intl/vasnwprintf.h Sat May 28 13:45:22 2005 +0000 -@@ -0,0 +1,46 @@ -+/* vswprintf with automatic memory allocation. -+ Copyright (C) 2002-2003 Free Software Foundation, Inc. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Library 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Library General Public License for more details. -+ -+ You should have received a copy of the GNU Library General Public -+ License along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ USA. */ -+ -+#ifndef _VASNWPRINTF_H -+#define _VASNWPRINTF_H -+ -+/* Get va_list. */ -+#include -+ -+/* Get wchar_t, size_t. */ -+#include -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+/* Write formatted output to a string dynamically allocated with malloc(). -+ You can pass a preallocated buffer for the result in RESULTBUF and its -+ size in *LENGTHP; otherwise you pass RESULTBUF = NULL. -+ If successful, return the address of the string (this may be = RESULTBUF -+ if no dynamic memory allocation was necessary) and set *LENGTHP to the -+ number of resulting bytes, excluding the trailing NUL. Upon error, set -+ errno and return NULL. */ -+extern wchar_t * asnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, ...); -+extern wchar_t * vasnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, va_list args); -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* _VASNWPRINTF_H */ -diff -r 4216c218ee44 -r e04165992166 intl/wprintf-parse.h ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/intl/wprintf-parse.h Sat May 28 13:45:22 2005 +0000 -@@ -0,0 +1,75 @@ -+/* Parse printf format string. -+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Library 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Library General Public License for more details. -+ -+ You should have received a copy of the GNU Library General Public -+ License along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ USA. */ -+ -+#ifndef _WPRINTF_PARSE_H -+#define _WPRINTF_PARSE_H -+ -+#include "printf-args.h" -+ -+ -+/* Flags */ -+#define FLAG_GROUP 1 /* ' flag */ -+#define FLAG_LEFT 2 /* - flag */ -+#define FLAG_SHOWSIGN 4 /* + flag */ -+#define FLAG_SPACE 8 /* space flag */ -+#define FLAG_ALT 16 /* # flag */ -+#define FLAG_ZERO 32 -+ -+/* arg_index value indicating that no argument is consumed. */ -+#define ARG_NONE (~(size_t)0) -+ -+/* A parsed directive. */ -+typedef struct -+{ -+ const wchar_t* dir_start; -+ const wchar_t* dir_end; -+ int flags; -+ const wchar_t* width_start; -+ const wchar_t* width_end; -+ size_t width_arg_index; -+ const wchar_t* precision_start; -+ const wchar_t* precision_end; -+ size_t precision_arg_index; -+ wchar_t conversion; /* d i o u x X f e E g G c s p n U % but not C S */ -+ size_t arg_index; -+} -+wchar_t_directive; -+ -+/* A parsed format string. */ -+typedef struct -+{ -+ size_t count; -+ wchar_t_directive *dir; -+ size_t max_width_length; -+ size_t max_precision_length; -+} -+wchar_t_directives; -+ -+ -+/* Parses the format string. Fills in the number N of directives, and fills -+ in directives[0], ..., directives[N-1], and sets directives[N].dir_start -+ to the end of the format string. Also fills in the arg_type fields of the -+ arguments and the needed count of arguments. */ -+#ifdef STATIC -+STATIC -+#else -+extern -+#endif -+int wprintf_parse (const wchar_t *format, wchar_t_directives *d, arguments *a); -+ -+#endif /* _WPRINTF_PARSE_H */ -diff -r 4216c218ee44 -r e04165992166 intl/xsize.h ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/intl/xsize.h Sat May 28 13:45:22 2005 +0000 -@@ -0,0 +1,109 @@ -+/* xsize.h -- Checked size_t computations. -+ -+ Copyright (C) 2003 Free Software Foundation, Inc. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Library 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Library General Public License for more details. -+ -+ You should have received a copy of the GNU Library General Public -+ License along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ USA. */ -+ -+#ifndef _XSIZE_H -+#define _XSIZE_H -+ -+/* Get size_t. */ -+#include -+ -+/* Get SIZE_MAX. */ -+#include -+#if HAVE_STDINT_H -+# include -+#endif -+ -+/* The size of memory objects is often computed through expressions of -+ type size_t. Example: -+ void* p = malloc (header_size + n * element_size). -+ These computations can lead to overflow. When this happens, malloc() -+ returns a piece of memory that is way too small, and the program then -+ crashes while attempting to fill the memory. -+ To avoid this, the functions and macros in this file check for overflow. -+ The convention is that SIZE_MAX represents overflow. -+ malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc -+ implementation that uses mmap --, it's recommended to use size_overflow_p() -+ or size_in_bounds_p() before invoking malloc(). -+ The example thus becomes: -+ size_t size = xsum (header_size, xtimes (n, element_size)); -+ void *p = (size_in_bounds_p (size) ? malloc (size) : NULL); -+*/ -+ -+/* Convert an arbitrary value >= 0 to type size_t. */ -+#define xcast_size_t(N) \ -+ ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX) -+ -+/* Sum of two sizes, with overflow check. */ -+static inline size_t -+#if __GNUC__ >= 3 -+__attribute__ ((__pure__)) -+#endif -+xsum (size_t size1, size_t size2) -+{ -+ size_t sum = size1 + size2; -+ return (sum >= size1 ? sum : SIZE_MAX); -+} -+ -+/* Sum of three sizes, with overflow check. */ -+static inline size_t -+#if __GNUC__ >= 3 -+__attribute__ ((__pure__)) -+#endif -+xsum3 (size_t size1, size_t size2, size_t size3) -+{ -+ return xsum (xsum (size1, size2), size3); -+} -+ -+/* Sum of four sizes, with overflow check. */ -+static inline size_t -+#if __GNUC__ >= 3 -+__attribute__ ((__pure__)) -+#endif -+xsum4 (size_t size1, size_t size2, size_t size3, size_t size4) -+{ -+ return xsum (xsum (xsum (size1, size2), size3), size4); -+} -+ -+/* Maximum of two sizes, with overflow check. */ -+static inline size_t -+#if __GNUC__ >= 3 -+__attribute__ ((__pure__)) -+#endif -+xmax (size_t size1, size_t size2) -+{ -+ /* No explicit check is needed here, because for any n: -+ max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */ -+ return (size1 >= size2 ? size1 : size2); -+} -+ -+/* Multiplication of a count with an element size, with overflow check. -+ The count must be >= 0 and the element size must be > 0. -+ This is a macro, not an inline function, so that it works correctly even -+ when N is of a wider tupe and N > SIZE_MAX. */ -+#define xtimes(N, ELSIZE) \ -+ ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX) -+ -+/* Check for overflow. */ -+#define size_overflow_p(SIZE) \ -+ ((SIZE) == SIZE_MAX) -+/* Check against overflow. */ -+#define size_in_bounds_p(SIZE) \ -+ ((SIZE) != SIZE_MAX) -+ -+#endif /* _XSIZE_H */ -diff -r 4216c218ee44 -r e04165992166 po/Makefile.in.in ---- a/po/Makefile.in.in Sat May 28 13:40:15 2005 +0000 -+++ b/po/Makefile.in.in Sat May 28 13:45:22 2005 +0000 -@@ -1,5 +1,5 @@ - # Makefile for PO directory in any package using GNU gettext. --# Copyright (C) 1995-1997, 2000-2002 by Ulrich Drepper -+# Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper - # - # This file can be copied and used freely without restrictions. It can - # be used in projects which are not available under the GNU General Public -@@ -7,9 +7,12 @@ - # functionality. - # Please note that the actual code of GNU gettext is covered by the GNU - # General Public License and is *not* in the public domain. -+# -+# Origin: gettext-0.14.4 - - PACKAGE = @PACKAGE@ - VERSION = @VERSION@ -+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ - - SHELL = /bin/sh - @SET_MAKE@ -@@ -27,7 +30,7 @@ INSTALL = @INSTALL@ - INSTALL = @INSTALL@ - INSTALL_DATA = @INSTALL_DATA@ - MKINSTALLDIRS = @MKINSTALLDIRS@ --mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac` -+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) - - GMSGFMT = @GMSGFMT@ - MSGFMT = @MSGFMT@ -@@ -42,9 +45,9 @@ GMOFILES = @GMOFILES@ - GMOFILES = @GMOFILES@ - UPDATEPOFILES = @UPDATEPOFILES@ - DUMMYPOFILES = @DUMMYPOFILES@ --DISTFILES.common = Makefile.in.in Makevars remove-potcdate.sin \ -+DISTFILES.common = Makefile.in.in remove-potcdate.sin \ - $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) --DISTFILES = $(DISTFILES.common) POTFILES.in $(DOMAIN).pot \ -+DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ - $(POFILES) $(GMOFILES) \ - $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) - -@@ -55,7 +58,7 @@ CATALOGS = @CATALOGS@ - # Makevars gets inserted here. (Don't remove this line!) - - .SUFFIXES: --.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update -+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update - - .po.mo: - @echo "$(MSGFMT) -c -o $@ $<"; \ -@@ -74,18 +77,49 @@ CATALOGS = @CATALOGS@ - - all: all-@USE_NLS@ - --all-yes: $(CATALOGS) -+all-yes: stamp-po - all-no: -+ -+# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no -+# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because -+# we don't want to bother translators with empty POT files). We assume that -+# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. -+# In this case, stamp-po is a nop (i.e. a phony target). -+ -+# stamp-po is a timestamp denoting the last time at which the CATALOGS have -+# been loosely updated. Its purpose is that when a developer or translator -+# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, -+# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent -+# invocations of "make" will do nothing. This timestamp would not be necessary -+# if updating the $(CATALOGS) would always touch them; however, the rule for -+# $(POFILES) has been designed to not touch files that don't need to be -+# changed. -+stamp-po: $(srcdir)/$(DOMAIN).pot -+ test ! -f $(srcdir)/$(DOMAIN).pot || \ -+ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) -+ @test ! -f $(srcdir)/$(DOMAIN).pot || { \ -+ echo "touch stamp-po" && \ -+ echo timestamp > stamp-poT && \ -+ mv stamp-poT stamp-po; \ -+ } - - # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', - # otherwise packages like GCC can not be built if only parts of the source - # have been downloaded. - -+# This target rebuilds $(DOMAIN).pot; it is an expensive operation. -+# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. - $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed -+ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ -+ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ -+ else \ -+ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ -+ fi; \ - $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ - --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ - --files-from=$(srcdir)/POTFILES.in \ -- --copyright-holder='$(COPYRIGHT_HOLDER)' -+ --copyright-holder='$(COPYRIGHT_HOLDER)' \ -+ --msgid-bugs-address="$$msgid_bugs_address" - test ! -f $(DOMAIN).po || { \ - if test -f $(srcdir)/$(DOMAIN).pot; then \ - sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ -@@ -101,24 +135,36 @@ all-no: - fi; \ - } - -+# This rule has no dependencies: we don't need to update $(DOMAIN).pot at -+# every "make" invocation, only create it when it is missing. -+# Only "make $(DOMAIN).pot-update" or "make dist" will force an update. - $(srcdir)/$(DOMAIN).pot: - $(MAKE) $(DOMAIN).pot-update - -+# This target rebuilds a PO file if $(DOMAIN).pot has changed. -+# Note that a PO file is not touched if it doesn't need to be changed. - $(POFILES): $(srcdir)/$(DOMAIN).pot - @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ -- test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ -- echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ -- cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot -+ if test -f "$(srcdir)/$${lang}.po"; then \ -+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ -+ echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ -+ cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ -+ else \ -+ $(MAKE) $${lang}.po-create; \ -+ fi - - - install: install-exec install-data - install-exec: - install-data: install-data-@USE_NLS@ -- if test "$(PACKAGE)" = "gettext"; then \ -+ if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ -- for file in $(DISTFILES.common); do \ -+ for file in $(DISTFILES.common) Makevars.template; do \ - $(INSTALL_DATA) $(srcdir)/$$file \ - $(DESTDIR)$(gettextsrcdir)/$$file; \ -+ done; \ -+ for file in Makevars; do \ -+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - else \ - : ; \ -@@ -170,7 +216,7 @@ installdirs: installdirs-exec installdir - installdirs: installdirs-exec installdirs-data - installdirs-exec: - installdirs-data: installdirs-data-@USE_NLS@ -- if test "$(PACKAGE)" = "gettext"; then \ -+ if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ - else \ - : ; \ -@@ -215,8 +261,8 @@ uninstall: uninstall-exec uninstall-data - uninstall: uninstall-exec uninstall-data - uninstall-exec: - uninstall-data: uninstall-data-@USE_NLS@ -- if test "$(PACKAGE)" = "gettext"; then \ -- for file in $(DISTFILES.common); do \ -+ if test "$(PACKAGE)" = "gettext-tools"; then \ -+ for file in $(DISTFILES.common) Makevars.template; do \ - rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - else \ -@@ -235,10 +281,11 @@ uninstall-data-yes: - - check: all - --dvi info tags TAGS ID: -+info dvi ps pdf html tags TAGS ctags CTAGS ID: - - mostlyclean: - rm -f remove-potcdate.sed -+ rm -f stamp-poT - rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po - rm -fr *.o - -@@ -250,35 +297,55 @@ maintainer-clean: distclean - maintainer-clean: distclean - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." -- rm -f $(GMOFILES) -+ rm -f stamp-po $(GMOFILES) - - distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) - dist distdir: - $(MAKE) update-po - @$(MAKE) dist2 - # This is a separate target because 'update-po' must be executed before. --dist2: $(DISTFILES) -+dist2: stamp-po $(DISTFILES) - dists="$(DISTFILES)"; \ -- if test -f $(srcdir)/ChangeLog; then dists="$$dists ChangeLog"; fi; \ -+ if test "$(PACKAGE)" = "gettext-tools"; then \ -+ dists="$$dists Makevars.template"; \ -+ fi; \ -+ if test -f $(srcdir)/$(DOMAIN).pot; then \ -+ dists="$$dists $(DOMAIN).pot stamp-po"; \ -+ fi; \ -+ if test -f $(srcdir)/ChangeLog; then \ -+ dists="$$dists ChangeLog"; \ -+ fi; \ -+ for i in 0 1 2 3 4 5 6 7 8 9; do \ -+ if test -f $(srcdir)/ChangeLog.$$i; then \ -+ dists="$$dists ChangeLog.$$i"; \ -+ fi; \ -+ done; \ - if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ - for file in $$dists; do \ - if test -f $$file; then \ -- cp -p $$file $(distdir); \ -+ cp -p $$file $(distdir) || exit 1; \ - else \ -- cp -p $(srcdir)/$$file $(distdir); \ -+ cp -p $(srcdir)/$$file $(distdir) || exit 1; \ - fi; \ - done - - update-po: Makefile - $(MAKE) $(DOMAIN).pot-update -- $(MAKE) $(UPDATEPOFILES) -+ test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) - $(MAKE) update-gmo -+ -+# General rule for creating PO files. -+ -+.nop.po-create: -+ @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ -+ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ -+ exit 1 - - # General rule for updating PO files. - - .nop.po-update: - @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ -- if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \ -+ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ - tmpdir=`pwd`; \ - echo "$$lang:"; \ - test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ -@@ -305,7 +372,7 @@ update-gmo: Makefile $(GMOFILES) - update-gmo: Makefile $(GMOFILES) - @: - --Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in -+Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ - $(SHELL) ./config.status -diff -r 4216c218ee44 -r e04165992166 po/Makevars ---- a/po/Makevars Sat May 28 13:40:15 2005 +0000 -+++ b/po/Makevars Sat May 28 13:45:22 2005 +0000 -@@ -20,6 +20,22 @@ XGETTEXT_OPTIONS = --keyword=_ --keyword - # their copyright. - COPYRIGHT_HOLDER = Free Software Foundation, Inc. - -+# This is the email address or URL to which the translators shall report -+# bugs in the untranslated strings: -+# - Strings which are not entire sentences, see the maintainer guidelines -+# in the GNU gettext documentation, section 'Preparing Strings'. -+# - Strings which use unclear terms or require additional context to be -+# understood. -+# - Strings which make invalid assumptions about notation of date, time or -+# money. -+# - Pluralisation problems. -+# - Incorrect English spelling. -+# - Incorrect formatting. -+# It can be your email address, or a mailing list address where translators -+# can write to without being subscribed, or the URL of a web page through -+# which the translators can contact you. -+MSGID_BUGS_ADDRESS = -+ - # This is the list of locale categories, beyond LC_MESSAGES, for which the - # message catalogs shall be used. It is usually empty. - EXTRA_LOCALE_CATEGORIES = - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-412.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-412.patch deleted file mode 100644 index 82a9bd4..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-412.patch +++ /dev/null @@ -1,24 +0,0 @@ -changeset: 412:b4b6191b3d97 -user: Petr Vandrovec -date: Sat May 28 13:46:29 2005 +0000 -files: lib/nwclient.c -description: -Define ENOPKG error as ENOSYS if ENOPKG does not exist. Needed for -Darwin. - - -diff -r e04165992166 -r b4b6191b3d97 lib/nwclient.c ---- a/lib/nwclient.c Sat May 28 13:45:22 2005 +0000 -+++ b/lib/nwclient.c Sat May 28 13:46:29 2005 +0000 -@@ -88,6 +88,10 @@ - #endif - #include - #include -+ -+#ifndef ENOPKG -+#define ENOPKG ENOSYS -+#endif - - /*should be in ndslib.h ?*/ - #define NWE_BIND_NO_SUCH_PROP NWE_NCP_NOT_SUPPORTED - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-413.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-413.patch deleted file mode 100644 index 5570ec1..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-413.patch +++ /dev/null @@ -1,21 +0,0 @@ -changeset: 413:94680aa0251a -user: Petr Vandrovec -date: Sat May 28 13:47:31 2005 +0000 -files: lib/rdn.c -description: -Do not include in lib/rdn.h. It is not needed there. - - -diff -r b4b6191b3d97 -r 94680aa0251a lib/rdn.c ---- a/lib/rdn.c Sat May 28 13:46:29 2005 +0000 -+++ b/lib/rdn.c Sat May 28 13:47:31 2005 +0000 -@@ -30,8 +30,6 @@ - #include - #include - #include -- --#include - - #include "nwnet_i.h" - #include "ncplib_i.h" - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-414.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-414.patch deleted file mode 100644 index 166bcd7..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-414.patch +++ /dev/null @@ -1,52 +0,0 @@ -changeset: 414:5e027b02f28c -user: Petr Vandrovec -date: Sat May 28 13:49:58 2005 +0000 -files: lib/resolve.c -description: -Properly wrap sockaddr_ipx accesses with NCP_IPX_SUPPORT and sockaddr_in -with NCP_IN_SUPPORT. Needed on IPX-less architectures. - - -diff -r 94680aa0251a -r 5e027b02f28c lib/resolve.c ---- a/lib/resolve.c Sat May 28 13:47:31 2005 +0000 -+++ b/lib/resolve.c Sat May 28 13:49:58 2005 +0000 -@@ -875,7 +875,9 @@ NWCCODE ncp_find_server_addr(const char - - err = NWCCGetConnInfo(conn, NWCC_INFO_TRAN_ADDR, sizeof(ta), &ta); - if (!err) { -- if (ta.type == NT_IPX) { -+ switch (ta.type) { -+#ifdef NCP_IPX_SUPPORT -+ case NT_IPX: { - struct sockaddr_ipx* ipx = (struct sockaddr_ipx*)addr; - - if (len < sizeof(*ipx)) { -@@ -887,7 +889,12 @@ NWCCODE ncp_find_server_addr(const char - memcpy(&ipx->sipx_port, buffer + 10, 2); - ipx->sipx_type = 0x11; - } -- } else if (ta.type == NT_UDP || ta.type == NT_TCP) { -+ break; -+ } -+#endif -+#ifdef NCP_IN_SUPPORT -+ case NT_UDP: -+ case NT_TCP: { - struct sockaddr_in* in = (struct sockaddr_in*)addr; - - if (len < sizeof(*in)) { -@@ -897,8 +904,12 @@ NWCCODE ncp_find_server_addr(const char - memcpy(&in->sin_addr.s_addr, buffer + 2, 4); - memcpy(&in->sin_port, buffer, 2); - } -- } else { -+ break; -+ } -+#endif -+ default: - err = EINVAL; -+ break; - } - if (!err) { - err = NWGetFileServerName(conn, sname); - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-415.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-415.patch deleted file mode 100644 index da4745c..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-415.patch +++ /dev/null @@ -1,90 +0,0 @@ -changeset: 415:005801e1fd28 -user: Petr Vandrovec -date: Sat May 28 15:07:13 2005 +0000 -files: include/private/list.h lib/ncplib.c lib/nwnet.c -description: -Rename LIST_HEAD to NCP_LIST_HEAD. LIST_HEAD exists on Darwin. - - -diff -r 5e027b02f28c -r 005801e1fd28 include/private/list.h ---- a/include/private/list.h Sat May 28 13:49:58 2005 +0000 -+++ b/include/private/list.h Sat May 28 15:07:13 2005 +0000 -@@ -16,10 +16,10 @@ struct list_head { - struct list_head *next, *prev; - }; - --#define LIST_HEAD(name) \ -+#define NCP_LIST_HEAD(name) \ - struct list_head name = { &name, &name } - --#define INIT_LIST_HEAD(ptr) do { \ -+#define NCP_INIT_LIST_HEAD(ptr) do { \ - (ptr)->next = (ptr); (ptr)->prev = (ptr); \ - } while (0) - -@@ -64,7 +64,7 @@ static __inline__ void list_del(struct l - static __inline__ void list_del(struct list_head *entry) - { - __list_del(entry->prev, entry->next); -- INIT_LIST_HEAD(entry); -+ NCP_INIT_LIST_HEAD(entry); - } - - static __inline__ int list_empty(struct list_head *head) -diff -r 5e027b02f28c -r 005801e1fd28 lib/ncplib.c ---- a/lib/ncplib.c Sat May 28 13:49:58 2005 +0000 -+++ b/lib/ncplib.c Sat May 28 15:07:13 2005 +0000 -@@ -194,7 +194,7 @@ int in_options = 0; - #endif - - static ncpt_mutex_t conn_lock = NCPT_MUTEX_INITIALIZER; --static LIST_HEAD(conn_list); -+static NCP_LIST_HEAD(conn_list); - ncpt_mutex_t nds_ring_lock = NCPT_MUTEX_INITIALIZER; - - /* return number of bytes in packet */ -@@ -775,9 +775,9 @@ static struct ncp_conn *ncp_alloc_conn(v - memset(conn, 0, sizeof(*conn)); - ncpt_atomic_set(&conn->use_count, 1); - ncpt_atomic_set(&conn->store_count, 0); -- INIT_LIST_HEAD(&conn->nds_ring); -+ NCP_INIT_LIST_HEAD(&conn->nds_ring); - // conn->nds_conn = NULL; -- INIT_LIST_HEAD(&conn->conn_ring); -+ NCP_INIT_LIST_HEAD(&conn->conn_ring); - ncpt_mutex_init(&conn->buffer_mutex); - ncpt_mutex_init(&conn->serverInfo.mutex); - // conn->serverInfo.valid = 0; -diff -r 5e027b02f28c -r 005801e1fd28 lib/nwnet.c ---- a/lib/nwnet.c Sat May 28 13:49:58 2005 +0000 -+++ b/lib/nwnet.c Sat May 28 15:07:13 2005 +0000 -@@ -943,8 +943,8 @@ static NWDSCCODE __NWDSCreateDSConnectio - memset(tmp, 0, sizeof(*tmp)); - - tmp->dck.tree_name = NULL; -- INIT_LIST_HEAD(&tmp->contexts); -- INIT_LIST_HEAD(&tmp->conns); -+ NCP_INIT_LIST_HEAD(&tmp->contexts); -+ NCP_INIT_LIST_HEAD(&tmp->conns); - *dsh = tmp; - return 0; - } -@@ -1172,7 +1172,7 @@ NWDSCCODE NWDSCreateContextHandle(NWDSCo - return ERR_NOT_ENOUGH_MEMORY; - } - memset(tmp, 0, sizeof(*tmp)); -- INIT_LIST_HEAD(&tmp->context_ring); -+ NCP_INIT_LIST_HEAD(&tmp->context_ring); - tmp->dck.flags = DCV_DEREF_ALIASES | DCV_XLATE_STRINGS | DCV_CANONICALIZE_NAMES; - tmp->dck.name_form = 0; - tmp->dck.last_connection.conn = NULL; -@@ -1237,7 +1237,7 @@ NWDSCCODE NWDSDuplicateContextHandleInt( - return ERR_NOT_ENOUGH_MEMORY; - - memset(tmp, 0, sizeof(*tmp)); -- INIT_LIST_HEAD(&tmp->context_ring); -+ NCP_INIT_LIST_HEAD(&tmp->context_ring); - /* return typed absolute names */ - tmp->dck.flags = srcctx->dck.flags & ~(DCV_CANONICALIZE_NAMES | DCV_TYPELESS_NAMES); - tmp->dck.name_form = srcctx->dck.name_form; - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-416.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-416.patch deleted file mode 100644 index 231606a..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-416.patch +++ /dev/null @@ -1,303 +0,0 @@ -changeset: 416:48879aeab0b6 -user: Petr Vandrovec -date: Sat May 28 15:42:43 2005 +0000 -files: configure.ac lib/ds/filter.c lib/ds/iterhandle.c lib/ds/request.c lib/ds/search.c lib/ds/setkeys.c lib/fs/eas.c lib/fs/filelock.c lib/ncpext.c lib/ncplib.c lib/ncplib_i.h lib/nwcalls.c lib/nwtime.c lib/queue.c lib/rdn.c -description: -Add support for SO_NOSIGPIPE (Darwin) in addition to MSG_NOSIGNAL. - - -diff -r 005801e1fd28 -r 48879aeab0b6 configure.ac ---- a/configure.ac Sat May 28 15:07:13 2005 +0000 -+++ b/configure.ac Sat May 28 15:42:43 2005 +0000 -@@ -495,6 +495,38 @@ else - socklen_t="typedef $ncp_cv_socklen_t socklen_t;" - fi - AC_SUBST(socklen_t) -+ -+AC_CACHE_CHECK(whether SO_NOSIGPIPE exists, -+ ncp_cv_so_nosigpipe, -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include -+#include ]]], -+ [[[int s; -+ int o = 0; -+ s = socket(0, 0, 0); -+ setsockopt(s, SOL_SOCKET, SO_NOSIGPIPE, &o, sizeof(o))]]])], -+ [ncp_cv_so_nosigpipe="yes"], -+ [ncp_cv_so_nosigpipe="no"] -+ ) -+) -+if test "$ncp_cv_so_nosigpipe" = "yes" -+then -+ AC_DEFINE(HAVE_SO_NOSIGPIPE, 1, [Define when SO_NOSIGPIPE exists]) -+fi -+ -+AC_CACHE_CHECK(whether MSG_NOSIGNAL exists, -+ ncp_cv_msg_nosignal, -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include -+#include -+struct msghdr msg;]]], -+ [[[sendmsg(0, &msg, MSG_NOSIGNAL)]]])], -+ [ncp_cv_msg_nosignal="yes"], -+ [ncp_cv_msg_nosignal="no"] -+ ) -+) -+if test "$ncp_cv_msg_nosignal" = "yes" -+then -+ AC_DEFINE(HAVE_MSG_NOSIGNAL, 1, [Define when MSG_NOSIGNAL exists]) -+fi - - dnl UNICODE - AC_CHECK_TYPE([wchar_t], , [AC_DEFINE([wchar_t], [unsigned int], [Define to 'unsigned int' if wchar_t is not defined.])]) -diff -r 005801e1fd28 -r 48879aeab0b6 lib/ds/filter.c ---- a/lib/ds/filter.c Sat May 28 15:07:13 2005 +0000 -+++ b/lib/ds/filter.c Sat May 28 15:42:43 2005 +0000 -@@ -26,6 +26,8 @@ - Fix coredumps, endless loops and so on in NWDSPutFilter. - - */ -+ -+#include "config.h" - - #include - #include -diff -r 005801e1fd28 -r 48879aeab0b6 lib/ds/iterhandle.c ---- a/lib/ds/iterhandle.c Sat May 28 15:07:13 2005 +0000 -+++ b/lib/ds/iterhandle.c Sat May 28 15:42:43 2005 +0000 -@@ -22,6 +22,8 @@ - Initial release. - - */ -+ -+#include "config.h" - - #include "iterhandle.h" - -diff -r 005801e1fd28 -r 48879aeab0b6 lib/ds/request.c ---- a/lib/ds/request.c Sat May 28 15:07:13 2005 +0000 -+++ b/lib/ds/request.c Sat May 28 15:42:43 2005 +0000 -@@ -22,6 +22,8 @@ - Initial release - - */ -+ -+#include "config.h" - - #include - #include -diff -r 005801e1fd28 -r 48879aeab0b6 lib/ds/search.c ---- a/lib/ds/search.c Sat May 28 15:07:13 2005 +0000 -+++ b/lib/ds/search.c Sat May 28 15:42:43 2005 +0000 -@@ -32,6 +32,8 @@ - to NWDSSearch. - - */ -+ -+#include "config.h" - - #include - #include -diff -r 005801e1fd28 -r 48879aeab0b6 lib/ds/setkeys.c ---- a/lib/ds/setkeys.c Sat May 28 15:07:13 2005 +0000 -+++ b/lib/ds/setkeys.c Sat May 28 15:42:43 2005 +0000 -@@ -35,6 +35,8 @@ - Modified nds_login to use unaliased name in NWDSSetKeys. - - */ -+ -+#include "config.h" - - #include - #include -diff -r 005801e1fd28 -r 48879aeab0b6 lib/fs/eas.c ---- a/lib/fs/eas.c Sat May 28 15:07:13 2005 +0000 -+++ b/lib/fs/eas.c Sat May 28 15:42:43 2005 +0000 -@@ -23,6 +23,7 @@ - - */ - -+#include "config.h" - #include - #include "ncplib_i.h" - -diff -r 005801e1fd28 -r 48879aeab0b6 lib/fs/filelock.c ---- a/lib/fs/filelock.c Sat May 28 15:07:13 2005 +0000 -+++ b/lib/fs/filelock.c Sat May 28 15:42:43 2005 +0000 -@@ -23,6 +23,7 @@ - - */ - -+#include "config.h" - #include "ncplib_i.h" - - #include -diff -r 005801e1fd28 -r 48879aeab0b6 lib/ncpext.c ---- a/lib/ncpext.c Sat May 28 15:07:13 2005 +0000 -+++ b/lib/ncpext.c Sat May 28 15:42:43 2005 +0000 -@@ -22,6 +22,8 @@ - Initial version. - - */ -+ -+#include "config.h" - - #include - #include -diff -r 005801e1fd28 -r 48879aeab0b6 lib/ncplib.c ---- a/lib/ncplib.c Sat May 28 15:07:13 2005 +0000 -+++ b/lib/ncplib.c Sat May 28 15:42:43 2005 +0000 -@@ -460,6 +460,18 @@ restart: - return 0; - } - -+int -+ncp_fd_nosigpipe(UNUSED(int fd)) -+{ -+#ifdef HAVE_SO_NOSIGPIPE -+ static const int one = 1; -+ -+ return setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &one, sizeof(one)); -+#else -+ return 0; -+#endif -+} -+ - #ifdef CONFIG_NATIVE_IPX - static int - exec_nwsfind(const char* request[]) { -@@ -521,8 +533,11 @@ ipx_make_reachable_rip(const struct sock - memset(&rip, 0, sizeof(rip)); - - sock = socket(PF_IPX, SOCK_DGRAM, IPXPROTO_IPX); -- - if (sock == -1) { -+ return errno; -+ } -+ if (ncp_fd_nosigpipe(sock)) { -+ close(sock); - return errno; - } - opt = 1; -@@ -1291,7 +1306,16 @@ ncp_connect_ipx_addr(struct ncp_conn *co - if ((ncp_sock = socket(PF_IPX, SOCK_DGRAM, IPXPROTO_IPX)) == -1) { - return errno; - } -+ if (ncp_fd_nosigpipe(ncp_sock)) { -+ close(ncp_sock); -+ return errno; -+ } - if ((wdog_sock = socket(PF_IPX, SOCK_DGRAM, IPXPROTO_IPX)) == -1) { -+ close(ncp_sock); -+ return errno; -+ } -+ if (ncp_fd_nosigpipe(wdog_sock)) { -+ close(wdog_sock); - close(ncp_sock); - return errno; - } -@@ -1385,6 +1409,10 @@ ncp_connect_in_addr(struct ncp_conn *con - if ((ncp_sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) { - return errno; - } -+ if (ncp_fd_nosigpipe(ncp_sock)) { -+ close(ncp_sock); -+ return errno; -+ } - addr.sin_family = AF_INET; - addr.sin_port = htons(0x0); - addr.sin_addr.s_addr = INADDR_ANY; -@@ -1444,6 +1472,10 @@ ncp_connect_tcp_addr(struct ncp_conn *co - if ((ncp_sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) { - return errno; - } -+ if (ncp_fd_nosigpipe(ncp_sock)) { -+ close(ncp_sock); -+ return errno; -+ } - addr.sin_family = AF_INET; - addr.sin_port = htons(0x0); - addr.sin_addr.s_addr = INADDR_ANY; -@@ -1503,6 +1535,10 @@ ncp_connect_un_addr(struct ncp_conn *con - conn->verbose = 0; - - if ((fd = socket(PF_UNIX, SOCK_DGRAM, 0)) == -1) { -+ return errno; -+ } -+ if (ncp_fd_nosigpipe(fd)) { -+ close(fd); - return errno; - } - addr.sun_family = AF_UNIX; -diff -r 005801e1fd28 -r 48879aeab0b6 lib/ncplib_i.h ---- a/lib/ncplib_i.h Sat May 28 15:07:13 2005 +0000 -+++ b/lib/ncplib_i.h Sat May 28 15:42:43 2005 +0000 -@@ -62,6 +62,10 @@ extern "C" { - #include "private/ncp_fs.h" - - #include -+ -+#ifndef HAVE_MSG_NOSIGNAL -+#define MSG_NOSIGNAL 0 -+#endif - - #define UNUSED(x) x __attribute__((unused)) - -@@ -328,6 +332,8 @@ static inline NWCCODE x_recv(int sock, v - - NWCCODE __NWReadFileServerInfo(struct ncp_conn* conn); - -+int ncp_fd_nosigpipe(int fd); -+ - #ifdef __cplusplus - } - #endif -diff -r 005801e1fd28 -r 48879aeab0b6 lib/nwcalls.c ---- a/lib/nwcalls.c Sat May 28 15:07:13 2005 +0000 -+++ b/lib/nwcalls.c Sat May 28 15:42:43 2005 +0000 -@@ -343,6 +343,10 @@ retryLoop:; - } - fd = socket(PF_UNIX, SOCK_STREAM, 0); - if (fd < 0) { -+ goto errquit; -+ } -+ if (ncp_fd_nosigpipe(fd)) { -+ close(fd); - goto errquit; - } - sunlen = offsetof(struct sockaddr_un, sun_path) + sprintf(sun.sun_path, "%cncpfs.permanent.mount.%lu", 0, -diff -r 005801e1fd28 -r 48879aeab0b6 lib/nwtime.c ---- a/lib/nwtime.c Sat May 28 15:07:13 2005 +0000 -+++ b/lib/nwtime.c Sat May 28 15:42:43 2005 +0000 -@@ -22,6 +22,8 @@ - Initial version - NWGetFileServerUTCTime moved from nwcalls.c. - - */ -+ -+#include "config.h" - - #include - #include -diff -r 005801e1fd28 -r 48879aeab0b6 lib/queue.c ---- a/lib/queue.c Sat May 28 15:07:13 2005 +0000 -+++ b/lib/queue.c Sat May 28 15:42:43 2005 +0000 -@@ -29,6 +29,8 @@ - 1.00 1999, November 20 Petr Vandrovec - Added license. - */ -+ -+#include "config.h" - - #include "ncplib_i.h" - -diff -r 005801e1fd28 -r 48879aeab0b6 lib/rdn.c ---- a/lib/rdn.c Sat May 28 15:07:13 2005 +0000 -+++ b/lib/rdn.c Sat May 28 15:42:43 2005 +0000 -@@ -25,6 +25,8 @@ - DN length check in __NWDSExtractRDN and NWDSRemoveAllTypesW - - */ -+ -+#include "config.h" - - #include - #include - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-417.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-417.patch deleted file mode 100644 index b7a22c7..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-417.patch +++ /dev/null @@ -1,7568 +0,0 @@ -changeset: 417:2ce6ef376b40 -user: Petr Vandrovec -date: Sat May 28 15:45:44 2005 +0000 -files: aclocal.m4 config.guess config.sub configure contrib/php/libtool include/config.h.in po/stamp-po -description: -Regenerate configure. - - -diff -r 48879aeab0b6 -r 2ce6ef376b40 acinclude.m4 ---- a/acinclude.m4 Sat May 28 15:42:43 2005 +0000 -+++ /dev/null Thu Jan 01 00:00:00 1970 +0000 -@@ -1,587 +0,0 @@ --# gettext.m4 serial 17 (gettext-0.11.5) --dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. --dnl This file is free software, distributed under the terms of the GNU --dnl General Public License. As a special exception to the GNU General --dnl Public License, this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. --dnl --dnl This file can can be used in projects which are not available under --dnl the GNU General Public License or the GNU Library General Public --dnl License but which still want to provide support for the GNU gettext --dnl functionality. --dnl Please note that the actual code of the GNU gettext library is covered --dnl by the GNU Library General Public License, and the rest of the GNU --dnl gettext package package is covered by the GNU General Public License. --dnl They are *not* in the public domain. -- --dnl Authors: --dnl Ulrich Drepper , 1995-2000. --dnl Bruno Haible , 2000-2002. -- --dnl Macro to add for using GNU gettext. -- --dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). --dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The --dnl default (if it is not specified or empty) is 'no-libtool'. --dnl INTLSYMBOL should be 'external' for packages with no intl directory, --dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. --dnl If INTLSYMBOL is 'use-libtool', then a libtool library --dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, --dnl depending on --{enable,disable}-{shared,static} and on the presence of --dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library --dnl $(top_builddir)/intl/libintl.a will be created. --dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext --dnl implementations (in libc or libintl) without the ngettext() function --dnl will be ignored. If NEEDSYMBOL is specified and is --dnl 'need-formatstring-macros', then GNU gettext implementations that don't --dnl support the ISO C 99 formatstring macros will be ignored. --dnl INTLDIR is used to find the intl libraries. If empty, --dnl the value `$(top_builddir)/intl/' is used. --dnl --dnl The result of the configuration is one of three cases: --dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled --dnl and used. --dnl Catalog format: GNU --> install in $(datadir) --dnl Catalog extension: .mo after installation, .gmo in source tree --dnl 2) GNU gettext has been found in the system's C library. --dnl Catalog format: GNU --> install in $(datadir) --dnl Catalog extension: .mo after installation, .gmo in source tree --dnl 3) No internationalization, always use English msgid. --dnl Catalog format: none --dnl Catalog extension: none --dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. --dnl The use of .gmo is historical (it was needed to avoid overwriting the --dnl GNU format catalogs when building on a platform with an X/Open gettext), --dnl but we keep it in order not to force irrelevant filename changes on the --dnl maintainers. --dnl --AC_DEFUN([AM_GNU_GETTEXT], --[ -- dnl Argument checking. -- ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , -- [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT --])])])])]) -- ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , -- [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT --])])])]) -- define(gt_included_intl, ifelse([$1], [external], [no], [yes])) -- define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) -- -- AC_REQUIRE([AM_PO_SUBDIRS])dnl -- ifelse(gt_included_intl, yes, [ -- AC_REQUIRE([AM_INTL_SUBDIR])dnl -- ]) -- -- dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. -- AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) -- AC_REQUIRE([AC_LIB_RPATH]) -- -- dnl Sometimes libintl requires libiconv, so first search for libiconv. -- dnl Ideally we would do this search only after the -- dnl if test "$USE_NLS" = "yes"; then -- dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then -- dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT -- dnl the configure script would need to contain the same shell code -- dnl again, outside any 'if'. There are two solutions: -- dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. -- dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. -- dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not -- dnl documented, we avoid it. -- ifelse(gt_included_intl, yes, , [ -- AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) -- ]) -- -- AC_MSG_CHECKING([whether NLS is requested]) -- dnl Default is enabled NLS -- AC_ARG_ENABLE(nls, -- [ --disable-nls do not use Native Language Support], -- USE_NLS=$enableval, USE_NLS=yes) -- AC_MSG_RESULT($USE_NLS) -- AC_SUBST(USE_NLS) -- -- ifelse(gt_included_intl, yes, [ -- BUILD_INCLUDED_LIBINTL=no -- USE_INCLUDED_LIBINTL=no -- ]) -- LIBINTL= -- LTLIBINTL= -- POSUB= -- -- dnl If we use NLS figure out what method -- if test "$USE_NLS" = "yes"; then -- gt_use_preinstalled_gnugettext=no -- ifelse(gt_included_intl, yes, [ -- AC_MSG_CHECKING([whether included gettext is requested]) -- AC_ARG_WITH(included-gettext, -- [ --with-included-gettext use the GNU gettext library included here], -- nls_cv_force_use_gnu_gettext=$withval, -- nls_cv_force_use_gnu_gettext=no) -- AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) -- -- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" -- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then -- ]) -- dnl User does not insist on using GNU NLS library. Figure out what -- dnl to use. If GNU gettext is available we use this. Else we have -- dnl to fall back to GNU NLS library. -- -- dnl Add a version number to the cache macros. -- define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) -- define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) -- define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) -- -- AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, -- [AC_TRY_LINK([#include --]ifelse([$2], [need-formatstring-macros], --[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION --#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) --#endif --changequote(,)dnl --typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; --changequote([,])dnl --], [])[extern int _nl_msg_cat_cntr; --extern int *_nl_domain_bindings;], -- [bindtextdomain ("", ""); --return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], -- gt_cv_func_gnugettext_libc=yes, -- gt_cv_func_gnugettext_libc=no)]) -- -- if test "$gt_cv_func_gnugettext_libc" != "yes"; then -- dnl Sometimes libintl requires libiconv, so first search for libiconv. -- ifelse(gt_included_intl, yes, , [ -- AM_ICONV_LINK -- ]) -- dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL -- dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) -- dnl because that would add "-liconv" to LIBINTL and LTLIBINTL -- dnl even if libiconv doesn't exist. -- AC_LIB_LINKFLAGS_BODY([intl]) -- AC_CACHE_CHECK([for GNU gettext in libintl], -- gt_cv_func_gnugettext_libintl, -- [gt_save_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="$CPPFLAGS $INCINTL" -- gt_save_LIBS="$LIBS" -- LIBS="$LIBS $LIBINTL" -- dnl Now see whether libintl exists and does not depend on libiconv. -- AC_TRY_LINK([#include --]ifelse([$2], [need-formatstring-macros], --[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION --#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) --#endif --changequote(,)dnl --typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; --changequote([,])dnl --], [])[extern int _nl_msg_cat_cntr; --extern --#ifdef __cplusplus --"C" --#endif --const char *_nl_expand_alias ();], -- [bindtextdomain ("", ""); --return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], -- gt_cv_func_gnugettext_libintl=yes, -- gt_cv_func_gnugettext_libintl=no) -- dnl Now see whether libintl exists and depends on libiconv. -- if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then -- LIBS="$LIBS $LIBICONV" -- AC_TRY_LINK([#include --]ifelse([$2], [need-formatstring-macros], --[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION --#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) --#endif --changequote(,)dnl --typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; --changequote([,])dnl --], [])[extern int _nl_msg_cat_cntr; --extern --#ifdef __cplusplus --"C" --#endif --const char *_nl_expand_alias ();], -- [bindtextdomain ("", ""); --return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], -- [LIBINTL="$LIBINTL $LIBICONV" -- LTLIBINTL="$LTLIBINTL $LTLIBICONV" -- gt_cv_func_gnugettext_libintl=yes -- ]) -- fi -- CPPFLAGS="$gt_save_CPPFLAGS" -- LIBS="$gt_save_LIBS"]) -- fi -- -- dnl If an already present or preinstalled GNU gettext() is found, -- dnl use it. But if this macro is used in GNU gettext, and GNU -- dnl gettext is already preinstalled in libintl, we update this -- dnl libintl. (Cf. the install rule in intl/Makefile.in.) -- if test "$gt_cv_func_gnugettext_libc" = "yes" \ -- || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ -- && test "$PACKAGE" != gettext; }; then -- gt_use_preinstalled_gnugettext=yes -- else -- dnl Reset the values set by searching for libintl. -- LIBINTL= -- LTLIBINTL= -- INCINTL= -- fi -- -- ifelse(gt_included_intl, yes, [ -- if test "$gt_use_preinstalled_gnugettext" != "yes"; then -- dnl GNU gettext is not found in the C library. -- dnl Fall back on included GNU gettext library. -- nls_cv_use_gnu_gettext=yes -- fi -- fi -- -- if test "$nls_cv_use_gnu_gettext" = "yes"; then -- dnl Mark actions used to generate GNU NLS library. -- INTLOBJS="\$(GETTOBJS)" -- BUILD_INCLUDED_LIBINTL=yes -- USE_INCLUDED_LIBINTL=yes -- LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" -- LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" -- LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` -- fi -- -- if test "$gt_use_preinstalled_gnugettext" = "yes" \ -- || test "$nls_cv_use_gnu_gettext" = "yes"; then -- dnl Mark actions to use GNU gettext tools. -- CATOBJEXT=.gmo -- fi -- ]) -- -- if test "$gt_use_preinstalled_gnugettext" = "yes" \ -- || test "$nls_cv_use_gnu_gettext" = "yes"; then -- AC_DEFINE(ENABLE_NLS, 1, -- [Define to 1 if translation of program messages to the user's native language -- is requested.]) -- else -- USE_NLS=no -- fi -- fi -- -- if test "$USE_NLS" = "yes"; then -- -- if test "$gt_use_preinstalled_gnugettext" = "yes"; then -- if test "$gt_cv_func_gnugettext_libintl" = "yes"; then -- AC_MSG_CHECKING([how to link with libintl]) -- AC_MSG_RESULT([$LIBINTL]) -- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) -- fi -- -- dnl For backward compatibility. Some packages may be using this. -- AC_DEFINE(HAVE_GETTEXT, 1, -- [Define if the GNU gettext() function is already present or preinstalled.]) -- AC_DEFINE(HAVE_DCGETTEXT, 1, -- [Define if the GNU dcgettext() function is already present or preinstalled.]) -- fi -- -- dnl We need to process the po/ directory. -- POSUB=po -- fi -- -- ifelse(gt_included_intl, yes, [ -- dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL -- dnl to 'yes' because some of the testsuite requires it. -- if test "$PACKAGE" = gettext; then -- BUILD_INCLUDED_LIBINTL=yes -- fi -- -- dnl Make all variables we use known to autoconf. -- AC_SUBST(BUILD_INCLUDED_LIBINTL) -- AC_SUBST(USE_INCLUDED_LIBINTL) -- AC_SUBST(CATOBJEXT) -- AC_SUBST(INTLOBJS) -- -- dnl For backward compatibility. Some configure.ins may be using this. -- nls_cv_header_intl= -- nls_cv_header_libgt= -- -- dnl For backward compatibility. Some Makefiles may be using this. -- DATADIRNAME=share -- AC_SUBST(DATADIRNAME) -- -- dnl For backward compatibility. Some Makefiles may be using this. -- INSTOBJEXT=.mo -- AC_SUBST(INSTOBJEXT) -- -- dnl For backward compatibility. Some Makefiles may be using this. -- GENCAT=gencat -- AC_SUBST(GENCAT) -- -- dnl Enable libtool support if the surrounding package wishes it. -- INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix -- AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) -- ]) -- -- dnl For backward compatibility. Some Makefiles may be using this. -- INTLLIBS="$LIBINTL" -- AC_SUBST(INTLLIBS) -- -- dnl Make all documented variables known to autoconf. -- AC_SUBST(LIBINTL) -- AC_SUBST(LTLIBINTL) -- AC_SUBST(POSUB) --]) -- -- --dnl Checks for all prerequisites of the po subdirectory, --dnl except for USE_NLS. --AC_DEFUN([AM_PO_SUBDIRS], --[ -- AC_REQUIRE([AC_PROG_MAKE_SET])dnl -- AC_REQUIRE([AC_PROG_INSTALL])dnl -- AC_REQUIRE([AM_MKINSTALLDIRS])dnl -- -- dnl Perform the following tests also if --disable-nls has been given, -- dnl because they are needed for "make dist" to work. -- -- dnl Search for GNU msgfmt in the PATH. -- dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. -- dnl The second test excludes FreeBSD msgfmt. -- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, -- [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && -- (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], -- :) -- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) -- -- dnl Search for GNU xgettext 0.11 or newer in the PATH. -- dnl The first test excludes Solaris xgettext and early GNU xgettext versions. -- dnl The second test excludes FreeBSD xgettext. -- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, -- [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && -- (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], -- :) -- dnl Remove leftover from FreeBSD xgettext call. -- rm -f messages.po -- -- dnl Search for GNU msgmerge 0.11 or newer in the PATH. -- AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, -- [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) -- -- dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. -- dnl Test whether we really found GNU msgfmt. -- if test "$GMSGFMT" != ":"; then -- dnl If it is no GNU msgfmt we define it as : so that the -- dnl Makefiles still can work. -- if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && -- (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then -- : ; -- else -- GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` -- AC_MSG_RESULT( -- [found $GMSGFMT program is not GNU msgfmt; ignore it]) -- GMSGFMT=":" -- fi -- fi -- -- dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. -- dnl Test whether we really found GNU xgettext. -- if test "$XGETTEXT" != ":"; then -- dnl If it is no GNU xgettext we define it as : so that the -- dnl Makefiles still can work. -- if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && -- (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then -- : ; -- else -- AC_MSG_RESULT( -- [found xgettext program is not GNU xgettext; ignore it]) -- XGETTEXT=":" -- fi -- dnl Remove leftover from FreeBSD xgettext call. -- rm -f messages.po -- fi -- -- AC_CONFIG_COMMANDS([[gettext]],[[ -- for ac_file in $CONFIG_FILES; do -- # Support "outfile[:infile[:infile...]]" -- case "$ac_file" in -- *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; -- esac -- # PO directories have a Makefile.in generated from Makefile.in.in. -- case "$ac_file" in */Makefile.in) -- # Adjust a relative srcdir. -- ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` -- ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" -- ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` -- # In autoconf-2.13 it is called $ac_given_srcdir. -- # In autoconf-2.50 it is called $srcdir. -- test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" -- case "$ac_given_srcdir" in -- .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; -- /*) top_srcdir="$ac_given_srcdir" ;; -- *) top_srcdir="$ac_dots$ac_given_srcdir" ;; -- esac -- if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then -- rm -f "$ac_dir/POTFILES" -- test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" -- cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" -- # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend -- # on $ac_dir but don't depend on user-specified configuration -- # parameters. -- if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then -- # The LINGUAS file contains the set of available languages. -- if test -n "$ALL_LINGUAS"; then -- test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" -- fi -- ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` -- # Hide the ALL_LINGUAS assigment from automake. -- eval 'ALL_LINGUAS''=$ALL_LINGUAS_' -- fi -- case "$ac_given_srcdir" in -- .) srcdirpre= ;; -- *) srcdirpre='$(srcdir)/' ;; -- esac -- POFILES= -- GMOFILES= -- UPDATEPOFILES= -- DUMMYPOFILES= -- for lang in $ALL_LINGUAS; do -- POFILES="$POFILES $srcdirpre$lang.po" -- GMOFILES="$GMOFILES $srcdirpre$lang.gmo" -- UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" -- DUMMYPOFILES="$DUMMYPOFILES $lang.nop" -- done -- # CATALOGS depends on both $ac_dir and the user's LINGUAS -- # environment variable. -- INST_LINGUAS= -- if test -n "$ALL_LINGUAS"; then -- for presentlang in $ALL_LINGUAS; do -- useit=no -- if test "%UNSET%" != "$LINGUAS"; then -- desiredlanguages="$LINGUAS" -- else -- desiredlanguages="$ALL_LINGUAS" -- fi -- for desiredlang in $desiredlanguages; do -- # Use the presentlang catalog if desiredlang is -- # a. equal to presentlang, or -- # b. a variant of presentlang (because in this case, -- # presentlang can be used as a fallback for messages -- # which are not translated in the desiredlang catalog). -- case "$desiredlang" in -- "$presentlang"*) useit=yes;; -- esac -- done -- if test $useit = yes; then -- INST_LINGUAS="$INST_LINGUAS $presentlang" -- fi -- done -- fi -- CATALOGS= -- if test -n "$INST_LINGUAS"; then -- for lang in $INST_LINGUAS; do -- CATALOGS="$CATALOGS $lang.gmo" -- done -- fi -- test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" -- sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" -- for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do -- if test -f "$f"; then -- case "$f" in -- *.orig | *.bak | *~) ;; -- *) cat "$f" >> "$ac_dir/Makefile" ;; -- esac -- fi -- done -- fi -- ;; -- esac -- done]], -- [# Capture the value of obsolete ALL_LINGUAS because we need it to compute -- # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it -- # from automake. -- eval 'ALL_LINGUAS''="$ALL_LINGUAS"' -- # Capture the value of LINGUAS because we need it to compute CATALOGS. -- LINGUAS="${LINGUAS-%UNSET%}" -- ]) --]) -- -- --dnl Checks for all prerequisites of the intl subdirectory, --dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, --dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. --AC_DEFUN([AM_INTL_SUBDIR], --[ -- AC_REQUIRE([AC_PROG_INSTALL])dnl -- AC_REQUIRE([AM_MKINSTALLDIRS])dnl -- AC_REQUIRE([AC_PROG_CC])dnl -- AC_REQUIRE([AC_CANONICAL_HOST])dnl -- AC_REQUIRE([AC_PROG_RANLIB])dnl -- AC_REQUIRE([AC_ISC_POSIX])dnl -- AC_REQUIRE([AC_HEADER_STDC])dnl -- AC_REQUIRE([AC_C_CONST])dnl -- AC_REQUIRE([AC_C_INLINE])dnl -- AC_REQUIRE([AC_TYPE_OFF_T])dnl -- AC_REQUIRE([AC_TYPE_SIZE_T])dnl -- AC_REQUIRE([AC_FUNC_ALLOCA])dnl -- AC_REQUIRE([AC_FUNC_MMAP])dnl -- AC_REQUIRE([jm_GLIBC21])dnl -- AC_REQUIRE([gt_INTDIV0])dnl -- AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl -- AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl -- AC_REQUIRE([gt_INTTYPES_PRI])dnl -- -- AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ --stdlib.h string.h unistd.h sys/param.h]) -- AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ --geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ --strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) -- -- AM_ICONV -- AM_LANGINFO_CODESET -- if test $ac_cv_header_locale_h = yes; then -- AM_LC_MESSAGES -- fi -- -- dnl intl/plural.c is generated from intl/plural.y. It requires bison, -- dnl because plural.y uses bison specific features. It requires at least -- dnl bison-1.26 because earlier versions generate a plural.c that doesn't -- dnl compile. -- dnl bison is only needed for the maintainer (who touches plural.y). But in -- dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put -- dnl the rule in general Makefile. Now, some people carelessly touch the -- dnl files or have a broken "make" program, hence the plural.c rule will -- dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not -- dnl present or too old. -- AC_CHECK_PROGS([INTLBISON], [bison]) -- if test -z "$INTLBISON"; then -- ac_verc_fail=yes -- else -- dnl Found it, now check the version. -- AC_MSG_CHECKING([version of bison]) --changequote(<<,>>)dnl -- ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` -- case $ac_prog_version in -- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) --changequote([,])dnl -- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; -- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; -- esac -- AC_MSG_RESULT([$ac_prog_version]) -- fi -- if test $ac_verc_fail = yes; then -- INTLBISON=: -- fi --]) -- -- --AC_DEFUN([AM_MKINSTALLDIRS], --[ -- dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly -- dnl find the mkinstalldirs script in another subdir but $(top_srcdir). -- dnl Try to locate is. -- MKINSTALLDIRS= -- if test -n "$ac_aux_dir"; then -- MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" -- fi -- if test -z "$MKINSTALLDIRS"; then -- MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" -- fi -- AC_SUBST(MKINSTALLDIRS) --]) -- -- --dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) --AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) -diff -r 48879aeab0b6 -r 2ce6ef376b40 aclocal.m4 ---- a/aclocal.m4 Sat May 28 15:42:43 2005 +0000 -+++ b/aclocal.m4 Sat May 28 15:45:44 2005 +0000 -@@ -10,601 +10,11 @@ dnl even the implied warranty of MERCHAN - dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A - dnl PARTICULAR PURPOSE. - --# gettext.m4 serial 17 (gettext-0.11.5) --dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. --dnl This file is free software, distributed under the terms of the GNU --dnl General Public License. As a special exception to the GNU General --dnl Public License, this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. --dnl --dnl This file can can be used in projects which are not available under --dnl the GNU General Public License or the GNU Library General Public --dnl License but which still want to provide support for the GNU gettext --dnl functionality. --dnl Please note that the actual code of the GNU gettext library is covered --dnl by the GNU Library General Public License, and the rest of the GNU --dnl gettext package package is covered by the GNU General Public License. --dnl They are *not* in the public domain. -- --dnl Authors: --dnl Ulrich Drepper , 1995-2000. --dnl Bruno Haible , 2000-2002. -- --dnl Macro to add for using GNU gettext. -- --dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). --dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The --dnl default (if it is not specified or empty) is 'no-libtool'. --dnl INTLSYMBOL should be 'external' for packages with no intl directory, --dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. --dnl If INTLSYMBOL is 'use-libtool', then a libtool library --dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, --dnl depending on --{enable,disable}-{shared,static} and on the presence of --dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library --dnl $(top_builddir)/intl/libintl.a will be created. --dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext --dnl implementations (in libc or libintl) without the ngettext() function --dnl will be ignored. If NEEDSYMBOL is specified and is --dnl 'need-formatstring-macros', then GNU gettext implementations that don't --dnl support the ISO C 99 formatstring macros will be ignored. --dnl INTLDIR is used to find the intl libraries. If empty, --dnl the value `$(top_builddir)/intl/' is used. --dnl --dnl The result of the configuration is one of three cases: --dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled --dnl and used. --dnl Catalog format: GNU --> install in $(datadir) --dnl Catalog extension: .mo after installation, .gmo in source tree --dnl 2) GNU gettext has been found in the system's C library. --dnl Catalog format: GNU --> install in $(datadir) --dnl Catalog extension: .mo after installation, .gmo in source tree --dnl 3) No internationalization, always use English msgid. --dnl Catalog format: none --dnl Catalog extension: none --dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. --dnl The use of .gmo is historical (it was needed to avoid overwriting the --dnl GNU format catalogs when building on a platform with an X/Open gettext), --dnl but we keep it in order not to force irrelevant filename changes on the --dnl maintainers. --dnl --AC_DEFUN([AM_GNU_GETTEXT], --[ -- dnl Argument checking. -- ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , -- [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT --])])])])]) -- ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , -- [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT --])])])]) -- define(gt_included_intl, ifelse([$1], [external], [no], [yes])) -- define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) -- -- AC_REQUIRE([AM_PO_SUBDIRS])dnl -- ifelse(gt_included_intl, yes, [ -- AC_REQUIRE([AM_INTL_SUBDIR])dnl -- ]) -- -- dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. -- AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) -- AC_REQUIRE([AC_LIB_RPATH]) -- -- dnl Sometimes libintl requires libiconv, so first search for libiconv. -- dnl Ideally we would do this search only after the -- dnl if test "$USE_NLS" = "yes"; then -- dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then -- dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT -- dnl the configure script would need to contain the same shell code -- dnl again, outside any 'if'. There are two solutions: -- dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. -- dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. -- dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not -- dnl documented, we avoid it. -- ifelse(gt_included_intl, yes, , [ -- AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) -- ]) -- -- AC_MSG_CHECKING([whether NLS is requested]) -- dnl Default is enabled NLS -- AC_ARG_ENABLE(nls, -- [ --disable-nls do not use Native Language Support], -- USE_NLS=$enableval, USE_NLS=yes) -- AC_MSG_RESULT($USE_NLS) -- AC_SUBST(USE_NLS) -- -- ifelse(gt_included_intl, yes, [ -- BUILD_INCLUDED_LIBINTL=no -- USE_INCLUDED_LIBINTL=no -- ]) -- LIBINTL= -- LTLIBINTL= -- POSUB= -- -- dnl If we use NLS figure out what method -- if test "$USE_NLS" = "yes"; then -- gt_use_preinstalled_gnugettext=no -- ifelse(gt_included_intl, yes, [ -- AC_MSG_CHECKING([whether included gettext is requested]) -- AC_ARG_WITH(included-gettext, -- [ --with-included-gettext use the GNU gettext library included here], -- nls_cv_force_use_gnu_gettext=$withval, -- nls_cv_force_use_gnu_gettext=no) -- AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) -- -- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" -- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then -- ]) -- dnl User does not insist on using GNU NLS library. Figure out what -- dnl to use. If GNU gettext is available we use this. Else we have -- dnl to fall back to GNU NLS library. -- -- dnl Add a version number to the cache macros. -- define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) -- define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) -- define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) -- -- AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, -- [AC_TRY_LINK([#include --]ifelse([$2], [need-formatstring-macros], --[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION --#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) --#endif --changequote(,)dnl --typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; --changequote([,])dnl --], [])[extern int _nl_msg_cat_cntr; --extern int *_nl_domain_bindings;], -- [bindtextdomain ("", ""); --return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], -- gt_cv_func_gnugettext_libc=yes, -- gt_cv_func_gnugettext_libc=no)]) -- -- if test "$gt_cv_func_gnugettext_libc" != "yes"; then -- dnl Sometimes libintl requires libiconv, so first search for libiconv. -- ifelse(gt_included_intl, yes, , [ -- AM_ICONV_LINK -- ]) -- dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL -- dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) -- dnl because that would add "-liconv" to LIBINTL and LTLIBINTL -- dnl even if libiconv doesn't exist. -- AC_LIB_LINKFLAGS_BODY([intl]) -- AC_CACHE_CHECK([for GNU gettext in libintl], -- gt_cv_func_gnugettext_libintl, -- [gt_save_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="$CPPFLAGS $INCINTL" -- gt_save_LIBS="$LIBS" -- LIBS="$LIBS $LIBINTL" -- dnl Now see whether libintl exists and does not depend on libiconv. -- AC_TRY_LINK([#include --]ifelse([$2], [need-formatstring-macros], --[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION --#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) --#endif --changequote(,)dnl --typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; --changequote([,])dnl --], [])[extern int _nl_msg_cat_cntr; --extern --#ifdef __cplusplus --"C" --#endif --const char *_nl_expand_alias ();], -- [bindtextdomain ("", ""); --return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], -- gt_cv_func_gnugettext_libintl=yes, -- gt_cv_func_gnugettext_libintl=no) -- dnl Now see whether libintl exists and depends on libiconv. -- if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then -- LIBS="$LIBS $LIBICONV" -- AC_TRY_LINK([#include --]ifelse([$2], [need-formatstring-macros], --[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION --#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) --#endif --changequote(,)dnl --typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; --changequote([,])dnl --], [])[extern int _nl_msg_cat_cntr; --extern --#ifdef __cplusplus --"C" --#endif --const char *_nl_expand_alias ();], -- [bindtextdomain ("", ""); --return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], -- [LIBINTL="$LIBINTL $LIBICONV" -- LTLIBINTL="$LTLIBINTL $LTLIBICONV" -- gt_cv_func_gnugettext_libintl=yes -- ]) -- fi -- CPPFLAGS="$gt_save_CPPFLAGS" -- LIBS="$gt_save_LIBS"]) -- fi -- -- dnl If an already present or preinstalled GNU gettext() is found, -- dnl use it. But if this macro is used in GNU gettext, and GNU -- dnl gettext is already preinstalled in libintl, we update this -- dnl libintl. (Cf. the install rule in intl/Makefile.in.) -- if test "$gt_cv_func_gnugettext_libc" = "yes" \ -- || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ -- && test "$PACKAGE" != gettext; }; then -- gt_use_preinstalled_gnugettext=yes -- else -- dnl Reset the values set by searching for libintl. -- LIBINTL= -- LTLIBINTL= -- INCINTL= -- fi -- -- ifelse(gt_included_intl, yes, [ -- if test "$gt_use_preinstalled_gnugettext" != "yes"; then -- dnl GNU gettext is not found in the C library. -- dnl Fall back on included GNU gettext library. -- nls_cv_use_gnu_gettext=yes -- fi -- fi -- -- if test "$nls_cv_use_gnu_gettext" = "yes"; then -- dnl Mark actions used to generate GNU NLS library. -- INTLOBJS="\$(GETTOBJS)" -- BUILD_INCLUDED_LIBINTL=yes -- USE_INCLUDED_LIBINTL=yes -- LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" -- LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" -- LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` -- fi -- -- if test "$gt_use_preinstalled_gnugettext" = "yes" \ -- || test "$nls_cv_use_gnu_gettext" = "yes"; then -- dnl Mark actions to use GNU gettext tools. -- CATOBJEXT=.gmo -- fi -- ]) -- -- if test "$gt_use_preinstalled_gnugettext" = "yes" \ -- || test "$nls_cv_use_gnu_gettext" = "yes"; then -- AC_DEFINE(ENABLE_NLS, 1, -- [Define to 1 if translation of program messages to the user's native language -- is requested.]) -- else -- USE_NLS=no -- fi -- fi -- -- if test "$USE_NLS" = "yes"; then -- -- if test "$gt_use_preinstalled_gnugettext" = "yes"; then -- if test "$gt_cv_func_gnugettext_libintl" = "yes"; then -- AC_MSG_CHECKING([how to link with libintl]) -- AC_MSG_RESULT([$LIBINTL]) -- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) -- fi -- -- dnl For backward compatibility. Some packages may be using this. -- AC_DEFINE(HAVE_GETTEXT, 1, -- [Define if the GNU gettext() function is already present or preinstalled.]) -- AC_DEFINE(HAVE_DCGETTEXT, 1, -- [Define if the GNU dcgettext() function is already present or preinstalled.]) -- fi -- -- dnl We need to process the po/ directory. -- POSUB=po -- fi -- -- ifelse(gt_included_intl, yes, [ -- dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL -- dnl to 'yes' because some of the testsuite requires it. -- if test "$PACKAGE" = gettext; then -- BUILD_INCLUDED_LIBINTL=yes -- fi -- -- dnl Make all variables we use known to autoconf. -- AC_SUBST(BUILD_INCLUDED_LIBINTL) -- AC_SUBST(USE_INCLUDED_LIBINTL) -- AC_SUBST(CATOBJEXT) -- AC_SUBST(INTLOBJS) -- -- dnl For backward compatibility. Some configure.ins may be using this. -- nls_cv_header_intl= -- nls_cv_header_libgt= -- -- dnl For backward compatibility. Some Makefiles may be using this. -- DATADIRNAME=share -- AC_SUBST(DATADIRNAME) -- -- dnl For backward compatibility. Some Makefiles may be using this. -- INSTOBJEXT=.mo -- AC_SUBST(INSTOBJEXT) -- -- dnl For backward compatibility. Some Makefiles may be using this. -- GENCAT=gencat -- AC_SUBST(GENCAT) -- -- dnl Enable libtool support if the surrounding package wishes it. -- INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix -- AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) -- ]) -- -- dnl For backward compatibility. Some Makefiles may be using this. -- INTLLIBS="$LIBINTL" -- AC_SUBST(INTLLIBS) -- -- dnl Make all documented variables known to autoconf. -- AC_SUBST(LIBINTL) -- AC_SUBST(LTLIBINTL) -- AC_SUBST(POSUB) --]) -- -- --dnl Checks for all prerequisites of the po subdirectory, --dnl except for USE_NLS. --AC_DEFUN([AM_PO_SUBDIRS], --[ -- AC_REQUIRE([AC_PROG_MAKE_SET])dnl -- AC_REQUIRE([AC_PROG_INSTALL])dnl -- AC_REQUIRE([AM_MKINSTALLDIRS])dnl -- -- dnl Perform the following tests also if --disable-nls has been given, -- dnl because they are needed for "make dist" to work. -- -- dnl Search for GNU msgfmt in the PATH. -- dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. -- dnl The second test excludes FreeBSD msgfmt. -- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, -- [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && -- (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], -- :) -- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) -- -- dnl Search for GNU xgettext 0.11 or newer in the PATH. -- dnl The first test excludes Solaris xgettext and early GNU xgettext versions. -- dnl The second test excludes FreeBSD xgettext. -- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, -- [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && -- (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], -- :) -- dnl Remove leftover from FreeBSD xgettext call. -- rm -f messages.po -- -- dnl Search for GNU msgmerge 0.11 or newer in the PATH. -- AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, -- [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) -- -- dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. -- dnl Test whether we really found GNU msgfmt. -- if test "$GMSGFMT" != ":"; then -- dnl If it is no GNU msgfmt we define it as : so that the -- dnl Makefiles still can work. -- if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && -- (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then -- : ; -- else -- GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` -- AC_MSG_RESULT( -- [found $GMSGFMT program is not GNU msgfmt; ignore it]) -- GMSGFMT=":" -- fi -- fi -- -- dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. -- dnl Test whether we really found GNU xgettext. -- if test "$XGETTEXT" != ":"; then -- dnl If it is no GNU xgettext we define it as : so that the -- dnl Makefiles still can work. -- if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && -- (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then -- : ; -- else -- AC_MSG_RESULT( -- [found xgettext program is not GNU xgettext; ignore it]) -- XGETTEXT=":" -- fi -- dnl Remove leftover from FreeBSD xgettext call. -- rm -f messages.po -- fi -- -- AC_CONFIG_COMMANDS([[gettext]],[[ -- for ac_file in $CONFIG_FILES; do -- # Support "outfile[:infile[:infile...]]" -- case "$ac_file" in -- *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; -- esac -- # PO directories have a Makefile.in generated from Makefile.in.in. -- case "$ac_file" in */Makefile.in) -- # Adjust a relative srcdir. -- ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` -- ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" -- ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` -- # In autoconf-2.13 it is called $ac_given_srcdir. -- # In autoconf-2.50 it is called $srcdir. -- test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" -- case "$ac_given_srcdir" in -- .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; -- /*) top_srcdir="$ac_given_srcdir" ;; -- *) top_srcdir="$ac_dots$ac_given_srcdir" ;; -- esac -- if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then -- rm -f "$ac_dir/POTFILES" -- test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" -- cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" -- # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend -- # on $ac_dir but don't depend on user-specified configuration -- # parameters. -- if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then -- # The LINGUAS file contains the set of available languages. -- if test -n "$ALL_LINGUAS"; then -- test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" -- fi -- ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` -- # Hide the ALL_LINGUAS assigment from automake. -- eval 'ALL_LINGUAS''=$ALL_LINGUAS_' -- fi -- case "$ac_given_srcdir" in -- .) srcdirpre= ;; -- *) srcdirpre='$(srcdir)/' ;; -- esac -- POFILES= -- GMOFILES= -- UPDATEPOFILES= -- DUMMYPOFILES= -- for lang in $ALL_LINGUAS; do -- POFILES="$POFILES $srcdirpre$lang.po" -- GMOFILES="$GMOFILES $srcdirpre$lang.gmo" -- UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" -- DUMMYPOFILES="$DUMMYPOFILES $lang.nop" -- done -- # CATALOGS depends on both $ac_dir and the user's LINGUAS -- # environment variable. -- INST_LINGUAS= -- if test -n "$ALL_LINGUAS"; then -- for presentlang in $ALL_LINGUAS; do -- useit=no -- if test "%UNSET%" != "$LINGUAS"; then -- desiredlanguages="$LINGUAS" -- else -- desiredlanguages="$ALL_LINGUAS" -- fi -- for desiredlang in $desiredlanguages; do -- # Use the presentlang catalog if desiredlang is -- # a. equal to presentlang, or -- # b. a variant of presentlang (because in this case, -- # presentlang can be used as a fallback for messages -- # which are not translated in the desiredlang catalog). -- case "$desiredlang" in -- "$presentlang"*) useit=yes;; -- esac -- done -- if test $useit = yes; then -- INST_LINGUAS="$INST_LINGUAS $presentlang" -- fi -- done -- fi -- CATALOGS= -- if test -n "$INST_LINGUAS"; then -- for lang in $INST_LINGUAS; do -- CATALOGS="$CATALOGS $lang.gmo" -- done -- fi -- test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" -- sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" -- for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do -- if test -f "$f"; then -- case "$f" in -- *.orig | *.bak | *~) ;; -- *) cat "$f" >> "$ac_dir/Makefile" ;; -- esac -- fi -- done -- fi -- ;; -- esac -- done]], -- [# Capture the value of obsolete ALL_LINGUAS because we need it to compute -- # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it -- # from automake. -- eval 'ALL_LINGUAS''="$ALL_LINGUAS"' -- # Capture the value of LINGUAS because we need it to compute CATALOGS. -- LINGUAS="${LINGUAS-%UNSET%}" -- ]) --]) -- -- --dnl Checks for all prerequisites of the intl subdirectory, --dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, --dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. --AC_DEFUN([AM_INTL_SUBDIR], --[ -- AC_REQUIRE([AC_PROG_INSTALL])dnl -- AC_REQUIRE([AM_MKINSTALLDIRS])dnl -- AC_REQUIRE([AC_PROG_CC])dnl -- AC_REQUIRE([AC_CANONICAL_HOST])dnl -- AC_REQUIRE([AC_PROG_RANLIB])dnl -- AC_REQUIRE([AC_ISC_POSIX])dnl -- AC_REQUIRE([AC_HEADER_STDC])dnl -- AC_REQUIRE([AC_C_CONST])dnl -- AC_REQUIRE([AC_C_INLINE])dnl -- AC_REQUIRE([AC_TYPE_OFF_T])dnl -- AC_REQUIRE([AC_TYPE_SIZE_T])dnl -- AC_REQUIRE([AC_FUNC_ALLOCA])dnl -- AC_REQUIRE([AC_FUNC_MMAP])dnl -- AC_REQUIRE([jm_GLIBC21])dnl -- AC_REQUIRE([gt_INTDIV0])dnl -- AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl -- AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl -- AC_REQUIRE([gt_INTTYPES_PRI])dnl -- -- AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ --stdlib.h string.h unistd.h sys/param.h]) -- AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ --geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ --strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) -- -- AM_ICONV -- AM_LANGINFO_CODESET -- if test $ac_cv_header_locale_h = yes; then -- AM_LC_MESSAGES -- fi -- -- dnl intl/plural.c is generated from intl/plural.y. It requires bison, -- dnl because plural.y uses bison specific features. It requires at least -- dnl bison-1.26 because earlier versions generate a plural.c that doesn't -- dnl compile. -- dnl bison is only needed for the maintainer (who touches plural.y). But in -- dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put -- dnl the rule in general Makefile. Now, some people carelessly touch the -- dnl files or have a broken "make" program, hence the plural.c rule will -- dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not -- dnl present or too old. -- AC_CHECK_PROGS([INTLBISON], [bison]) -- if test -z "$INTLBISON"; then -- ac_verc_fail=yes -- else -- dnl Found it, now check the version. -- AC_MSG_CHECKING([version of bison]) --changequote(<<,>>)dnl -- ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` -- case $ac_prog_version in -- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) --changequote([,])dnl -- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; -- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; -- esac -- AC_MSG_RESULT([$ac_prog_version]) -- fi -- if test $ac_verc_fail = yes; then -- INTLBISON=: -- fi --]) -- -- --AC_DEFUN([AM_MKINSTALLDIRS], --[ -- dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly -- dnl find the mkinstalldirs script in another subdir but $(top_srcdir). -- dnl Try to locate is. -- MKINSTALLDIRS= -- if test -n "$ac_aux_dir"; then -- MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" -- fi -- if test -z "$MKINSTALLDIRS"; then -- MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" -- fi -- AC_SUBST(MKINSTALLDIRS) --]) -- -- --dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) --AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) -- --# lib-prefix.m4 serial 3 (gettext-0.13) --dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. --dnl This file is free software, distributed under the terms of the GNU --dnl General Public License. As a special exception to the GNU General --dnl Public License, this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. -+# lib-prefix.m4 serial 4 (gettext-0.14.2) -+dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. - - dnl From Bruno Haible. - -@@ -671,7 +81,7 @@ AC_DEFUN([AC_LIB_PREFIX], - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in -- linux*) haveit=yes;; -+ linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi -@@ -754,15 +164,15 @@ AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], - prefix="$acl_save_prefix" - ]) - --# lib-link.m4 serial 4 (gettext-0.12) --dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. --dnl This file is free software, distributed under the terms of the GNU --dnl General Public License. As a special exception to the GNU General --dnl Public License, this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. -+# lib-link.m4 serial 6 (gettext-0.14.3) -+dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. - - dnl From Bruno Haible. -+ -+AC_PREREQ(2.50) - - dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and - dnl the libraries corresponding to explicit and implicit dependencies. -@@ -851,6 +261,8 @@ dnl hardcode_direct, hardcode_minus_L. - dnl hardcode_direct, hardcode_minus_L. - AC_DEFUN([AC_LIB_RPATH], - [ -+ dnl Tell automake >= 1.10 to complain if config.rpath is missing. -+ m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) - AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS - AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld - AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host -@@ -1106,7 +518,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in -- linux*) haveit=yes;; -+ linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi -@@ -1155,7 +567,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], - if test "X$additional_libdir" = "X/usr/local/lib"; then - if test -n "$GCC"; then - case $host_os in -- linux*) haveit=yes;; -+ linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi -@@ -1308,11 +720,9 @@ AC_DEFUN([AC_LIB_APPENDTOVAR], - - # lib-ld.m4 serial 3 (gettext-0.13) - dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. --dnl This file is free software, distributed under the terms of the GNU --dnl General Public License. As a special exception to the GNU General --dnl Public License, this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. - - dnl Subroutines of libtool.m4, - dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision -@@ -1419,13 +829,1136 @@ AC_LIB_PROG_LD_GNU - AC_LIB_PROG_LD_GNU - ]) - -+# gettext.m4 serial 37 (gettext-0.14.4) -+dnl Copyright (C) 1995-2005 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+dnl -+dnl This file can can be used in projects which are not available under -+dnl the GNU General Public License or the GNU Library General Public -+dnl License but which still want to provide support for the GNU gettext -+dnl functionality. -+dnl Please note that the actual code of the GNU gettext library is covered -+dnl by the GNU Library General Public License, and the rest of the GNU -+dnl gettext package package is covered by the GNU General Public License. -+dnl They are *not* in the public domain. -+ -+dnl Authors: -+dnl Ulrich Drepper , 1995-2000. -+dnl Bruno Haible , 2000-2003. -+ -+dnl Macro to add for using GNU gettext. -+ -+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). -+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The -+dnl default (if it is not specified or empty) is 'no-libtool'. -+dnl INTLSYMBOL should be 'external' for packages with no intl directory, -+dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. -+dnl If INTLSYMBOL is 'use-libtool', then a libtool library -+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, -+dnl depending on --{enable,disable}-{shared,static} and on the presence of -+dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library -+dnl $(top_builddir)/intl/libintl.a will be created. -+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext -+dnl implementations (in libc or libintl) without the ngettext() function -+dnl will be ignored. If NEEDSYMBOL is specified and is -+dnl 'need-formatstring-macros', then GNU gettext implementations that don't -+dnl support the ISO C 99 formatstring macros will be ignored. -+dnl INTLDIR is used to find the intl libraries. If empty, -+dnl the value `$(top_builddir)/intl/' is used. -+dnl -+dnl The result of the configuration is one of three cases: -+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled -+dnl and used. -+dnl Catalog format: GNU --> install in $(datadir) -+dnl Catalog extension: .mo after installation, .gmo in source tree -+dnl 2) GNU gettext has been found in the system's C library. -+dnl Catalog format: GNU --> install in $(datadir) -+dnl Catalog extension: .mo after installation, .gmo in source tree -+dnl 3) No internationalization, always use English msgid. -+dnl Catalog format: none -+dnl Catalog extension: none -+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. -+dnl The use of .gmo is historical (it was needed to avoid overwriting the -+dnl GNU format catalogs when building on a platform with an X/Open gettext), -+dnl but we keep it in order not to force irrelevant filename changes on the -+dnl maintainers. -+dnl -+AC_DEFUN([AM_GNU_GETTEXT], -+[ -+ dnl Argument checking. -+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , -+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT -+])])])])]) -+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , -+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT -+])])])]) -+ define([gt_included_intl], ifelse([$1], [external], [no], [yes])) -+ define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) -+ -+ AC_REQUIRE([AM_PO_SUBDIRS])dnl -+ ifelse(gt_included_intl, yes, [ -+ AC_REQUIRE([AM_INTL_SUBDIR])dnl -+ ]) -+ -+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. -+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) -+ AC_REQUIRE([AC_LIB_RPATH]) -+ -+ dnl Sometimes libintl requires libiconv, so first search for libiconv. -+ dnl Ideally we would do this search only after the -+ dnl if test "$USE_NLS" = "yes"; then -+ dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then -+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT -+ dnl the configure script would need to contain the same shell code -+ dnl again, outside any 'if'. There are two solutions: -+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. -+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. -+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not -+ dnl documented, we avoid it. -+ ifelse(gt_included_intl, yes, , [ -+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) -+ ]) -+ -+ dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. -+ gt_INTL_MACOSX -+ -+ dnl Set USE_NLS. -+ AM_NLS -+ -+ ifelse(gt_included_intl, yes, [ -+ BUILD_INCLUDED_LIBINTL=no -+ USE_INCLUDED_LIBINTL=no -+ ]) -+ LIBINTL= -+ LTLIBINTL= -+ POSUB= -+ -+ dnl If we use NLS figure out what method -+ if test "$USE_NLS" = "yes"; then -+ gt_use_preinstalled_gnugettext=no -+ ifelse(gt_included_intl, yes, [ -+ AC_MSG_CHECKING([whether included gettext is requested]) -+ AC_ARG_WITH(included-gettext, -+ [ --with-included-gettext use the GNU gettext library included here], -+ nls_cv_force_use_gnu_gettext=$withval, -+ nls_cv_force_use_gnu_gettext=no) -+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) -+ -+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" -+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then -+ ]) -+ dnl User does not insist on using GNU NLS library. Figure out what -+ dnl to use. If GNU gettext is available we use this. Else we have -+ dnl to fall back to GNU NLS library. -+ -+ dnl Add a version number to the cache macros. -+ define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) -+ define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) -+ define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) -+ -+ AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, -+ [AC_TRY_LINK([#include -+]ifelse([$2], [need-formatstring-macros], -+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION -+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) -+#endif -+changequote(,)dnl -+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; -+changequote([,])dnl -+], [])[extern int _nl_msg_cat_cntr; -+extern int *_nl_domain_bindings;], -+ [bindtextdomain ("", ""); -+return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], -+ gt_cv_func_gnugettext_libc=yes, -+ gt_cv_func_gnugettext_libc=no)]) -+ -+ if test "$gt_cv_func_gnugettext_libc" != "yes"; then -+ dnl Sometimes libintl requires libiconv, so first search for libiconv. -+ ifelse(gt_included_intl, yes, , [ -+ AM_ICONV_LINK -+ ]) -+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL -+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) -+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL -+ dnl even if libiconv doesn't exist. -+ AC_LIB_LINKFLAGS_BODY([intl]) -+ AC_CACHE_CHECK([for GNU gettext in libintl], -+ gt_cv_func_gnugettext_libintl, -+ [gt_save_CPPFLAGS="$CPPFLAGS" -+ CPPFLAGS="$CPPFLAGS $INCINTL" -+ gt_save_LIBS="$LIBS" -+ LIBS="$LIBS $LIBINTL" -+ dnl Now see whether libintl exists and does not depend on libiconv. -+ AC_TRY_LINK([#include -+]ifelse([$2], [need-formatstring-macros], -+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION -+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) -+#endif -+changequote(,)dnl -+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; -+changequote([,])dnl -+], [])[extern int _nl_msg_cat_cntr; -+extern -+#ifdef __cplusplus -+"C" -+#endif -+const char *_nl_expand_alias (const char *);], -+ [bindtextdomain ("", ""); -+return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")], -+ gt_cv_func_gnugettext_libintl=yes, -+ gt_cv_func_gnugettext_libintl=no) -+ dnl Now see whether libintl exists and depends on libiconv. -+ if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then -+ LIBS="$LIBS $LIBICONV" -+ AC_TRY_LINK([#include -+]ifelse([$2], [need-formatstring-macros], -+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION -+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) -+#endif -+changequote(,)dnl -+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; -+changequote([,])dnl -+], [])[extern int _nl_msg_cat_cntr; -+extern -+#ifdef __cplusplus -+"C" -+#endif -+const char *_nl_expand_alias (const char *);], -+ [bindtextdomain ("", ""); -+return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")], -+ [LIBINTL="$LIBINTL $LIBICONV" -+ LTLIBINTL="$LTLIBINTL $LTLIBICONV" -+ gt_cv_func_gnugettext_libintl=yes -+ ]) -+ fi -+ CPPFLAGS="$gt_save_CPPFLAGS" -+ LIBS="$gt_save_LIBS"]) -+ fi -+ -+ dnl If an already present or preinstalled GNU gettext() is found, -+ dnl use it. But if this macro is used in GNU gettext, and GNU -+ dnl gettext is already preinstalled in libintl, we update this -+ dnl libintl. (Cf. the install rule in intl/Makefile.in.) -+ if test "$gt_cv_func_gnugettext_libc" = "yes" \ -+ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ -+ && test "$PACKAGE" != gettext-runtime \ -+ && test "$PACKAGE" != gettext-tools; }; then -+ gt_use_preinstalled_gnugettext=yes -+ else -+ dnl Reset the values set by searching for libintl. -+ LIBINTL= -+ LTLIBINTL= -+ INCINTL= -+ fi -+ -+ ifelse(gt_included_intl, yes, [ -+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then -+ dnl GNU gettext is not found in the C library. -+ dnl Fall back on included GNU gettext library. -+ nls_cv_use_gnu_gettext=yes -+ fi -+ fi -+ -+ if test "$nls_cv_use_gnu_gettext" = "yes"; then -+ dnl Mark actions used to generate GNU NLS library. -+ BUILD_INCLUDED_LIBINTL=yes -+ USE_INCLUDED_LIBINTL=yes -+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" -+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" -+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` -+ fi -+ -+ CATOBJEXT= -+ if test "$gt_use_preinstalled_gnugettext" = "yes" \ -+ || test "$nls_cv_use_gnu_gettext" = "yes"; then -+ dnl Mark actions to use GNU gettext tools. -+ CATOBJEXT=.gmo -+ fi -+ ]) -+ -+ if test -n "$INTL_MACOSX_LIBS"; then -+ if test "$gt_use_preinstalled_gnugettext" = "yes" \ -+ || test "$nls_cv_use_gnu_gettext" = "yes"; then -+ dnl Some extra flags are needed during linking. -+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" -+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" -+ fi -+ fi -+ -+ if test "$gt_use_preinstalled_gnugettext" = "yes" \ -+ || test "$nls_cv_use_gnu_gettext" = "yes"; then -+ AC_DEFINE(ENABLE_NLS, 1, -+ [Define to 1 if translation of program messages to the user's native language -+ is requested.]) -+ else -+ USE_NLS=no -+ fi -+ fi -+ -+ AC_MSG_CHECKING([whether to use NLS]) -+ AC_MSG_RESULT([$USE_NLS]) -+ if test "$USE_NLS" = "yes"; then -+ AC_MSG_CHECKING([where the gettext function comes from]) -+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then -+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then -+ gt_source="external libintl" -+ else -+ gt_source="libc" -+ fi -+ else -+ gt_source="included intl directory" -+ fi -+ AC_MSG_RESULT([$gt_source]) -+ fi -+ -+ if test "$USE_NLS" = "yes"; then -+ -+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then -+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then -+ AC_MSG_CHECKING([how to link with libintl]) -+ AC_MSG_RESULT([$LIBINTL]) -+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) -+ fi -+ -+ dnl For backward compatibility. Some packages may be using this. -+ AC_DEFINE(HAVE_GETTEXT, 1, -+ [Define if the GNU gettext() function is already present or preinstalled.]) -+ AC_DEFINE(HAVE_DCGETTEXT, 1, -+ [Define if the GNU dcgettext() function is already present or preinstalled.]) -+ fi -+ -+ dnl We need to process the po/ directory. -+ POSUB=po -+ fi -+ -+ ifelse(gt_included_intl, yes, [ -+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL -+ dnl to 'yes' because some of the testsuite requires it. -+ if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then -+ BUILD_INCLUDED_LIBINTL=yes -+ fi -+ -+ dnl Make all variables we use known to autoconf. -+ AC_SUBST(BUILD_INCLUDED_LIBINTL) -+ AC_SUBST(USE_INCLUDED_LIBINTL) -+ AC_SUBST(CATOBJEXT) -+ -+ dnl For backward compatibility. Some configure.ins may be using this. -+ nls_cv_header_intl= -+ nls_cv_header_libgt= -+ -+ dnl For backward compatibility. Some Makefiles may be using this. -+ DATADIRNAME=share -+ AC_SUBST(DATADIRNAME) -+ -+ dnl For backward compatibility. Some Makefiles may be using this. -+ INSTOBJEXT=.mo -+ AC_SUBST(INSTOBJEXT) -+ -+ dnl For backward compatibility. Some Makefiles may be using this. -+ GENCAT=gencat -+ AC_SUBST(GENCAT) -+ -+ dnl For backward compatibility. Some Makefiles may be using this. -+ INTLOBJS= -+ if test "$USE_INCLUDED_LIBINTL" = yes; then -+ INTLOBJS="\$(GETTOBJS)" -+ fi -+ AC_SUBST(INTLOBJS) -+ -+ dnl Enable libtool support if the surrounding package wishes it. -+ INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix -+ AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) -+ ]) -+ -+ dnl For backward compatibility. Some Makefiles may be using this. -+ INTLLIBS="$LIBINTL" -+ AC_SUBST(INTLLIBS) -+ -+ dnl Make all documented variables known to autoconf. -+ AC_SUBST(LIBINTL) -+ AC_SUBST(LTLIBINTL) -+ AC_SUBST(POSUB) -+]) -+ -+ -+dnl Checks for all prerequisites of the intl subdirectory, -+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, -+dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. -+AC_DEFUN([AM_INTL_SUBDIR], -+[ -+ AC_REQUIRE([AC_PROG_INSTALL])dnl -+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl -+ AC_REQUIRE([AC_PROG_CC])dnl -+ AC_REQUIRE([AC_CANONICAL_HOST])dnl -+ AC_REQUIRE([gt_GLIBC2])dnl -+ AC_REQUIRE([AC_PROG_RANLIB])dnl -+ AC_REQUIRE([AC_ISC_POSIX])dnl -+ AC_REQUIRE([AC_HEADER_STDC])dnl -+ AC_REQUIRE([AC_C_CONST])dnl -+ AC_REQUIRE([bh_C_SIGNED])dnl -+ AC_REQUIRE([AC_C_INLINE])dnl -+ AC_REQUIRE([AC_TYPE_OFF_T])dnl -+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl -+ AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl -+ AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl -+ AC_REQUIRE([gt_TYPE_WCHAR_T])dnl -+ AC_REQUIRE([gt_TYPE_WINT_T])dnl -+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) -+ AC_REQUIRE([gl_AC_HEADER_STDINT_H]) -+ AC_REQUIRE([gt_TYPE_INTMAX_T]) -+ AC_REQUIRE([gt_PRINTF_POSIX]) -+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl -+ AC_REQUIRE([AC_FUNC_MMAP])dnl -+ AC_REQUIRE([gl_GLIBC21])dnl -+ AC_REQUIRE([gt_INTDIV0])dnl -+ AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl -+ AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl -+ AC_REQUIRE([gt_INTTYPES_PRI])dnl -+ AC_REQUIRE([gl_XSIZE])dnl -+ AC_REQUIRE([gt_INTL_MACOSX])dnl -+ -+ AC_CHECK_TYPE([ptrdiff_t], , -+ [AC_DEFINE([ptrdiff_t], [long], -+ [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) -+ ]) -+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ -+stdlib.h string.h unistd.h sys/param.h]) -+ AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \ -+mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \ -+strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \ -+__fsetlocking]) -+ -+ dnl Use the _snprintf function only if it is declared (because on NetBSD it -+ dnl is defined as a weak alias of snprintf; we prefer to use the latter). -+ gt_CHECK_DECL(_snprintf, [#include ]) -+ gt_CHECK_DECL(_snwprintf, [#include ]) -+ -+ dnl Use the *_unlocked functions only if they are declared. -+ dnl (because some of them were defined without being declared in Solaris -+ dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built -+ dnl on Solaris 2.5.1 to run on Solaris 2.6). -+ dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. -+ gt_CHECK_DECL(feof_unlocked, [#include ]) -+ gt_CHECK_DECL(fgets_unlocked, [#include ]) -+ gt_CHECK_DECL(getc_unlocked, [#include ]) -+ -+ case $gt_cv_func_printf_posix in -+ *yes) HAVE_POSIX_PRINTF=1 ;; -+ *) HAVE_POSIX_PRINTF=0 ;; -+ esac -+ AC_SUBST([HAVE_POSIX_PRINTF]) -+ if test "$ac_cv_func_asprintf" = yes; then -+ HAVE_ASPRINTF=1 -+ else -+ HAVE_ASPRINTF=0 -+ fi -+ AC_SUBST([HAVE_ASPRINTF]) -+ if test "$ac_cv_func_snprintf" = yes; then -+ HAVE_SNPRINTF=1 -+ else -+ HAVE_SNPRINTF=0 -+ fi -+ AC_SUBST([HAVE_SNPRINTF]) -+ if test "$ac_cv_func_wprintf" = yes; then -+ HAVE_WPRINTF=1 -+ else -+ HAVE_WPRINTF=0 -+ fi -+ AC_SUBST([HAVE_WPRINTF]) -+ -+ AM_ICONV -+ AM_LANGINFO_CODESET -+ if test $ac_cv_header_locale_h = yes; then -+ gt_LC_MESSAGES -+ fi -+ -+ if test -n "$INTL_MACOSX_LIBS"; then -+ CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" -+ fi -+ -+ dnl intl/plural.c is generated from intl/plural.y. It requires bison, -+ dnl because plural.y uses bison specific features. It requires at least -+ dnl bison-1.26 because earlier versions generate a plural.c that doesn't -+ dnl compile. -+ dnl bison is only needed for the maintainer (who touches plural.y). But in -+ dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put -+ dnl the rule in general Makefile. Now, some people carelessly touch the -+ dnl files or have a broken "make" program, hence the plural.c rule will -+ dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not -+ dnl present or too old. -+ AC_CHECK_PROGS([INTLBISON], [bison]) -+ if test -z "$INTLBISON"; then -+ ac_verc_fail=yes -+ else -+ dnl Found it, now check the version. -+ AC_MSG_CHECKING([version of bison]) -+changequote(<<,>>)dnl -+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` -+ case $ac_prog_version in -+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -+ 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) -+changequote([,])dnl -+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; -+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; -+ esac -+ AC_MSG_RESULT([$ac_prog_version]) -+ fi -+ if test $ac_verc_fail = yes; then -+ INTLBISON=: -+ fi -+]) -+ -+ -+dnl Checks for special options needed on MacOS X. -+dnl Defines INTL_MACOSX_LIBS. -+AC_DEFUN([gt_INTL_MACOSX], -+[ -+ dnl Check for API introduced in MacOS X 10.2. -+ AC_CACHE_CHECK([for CFPreferencesCopyAppValue], -+ gt_cv_func_CFPreferencesCopyAppValue, -+ [gt_save_CPPFLAGS="$CPPFLAGS" -+ CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" -+ gt_save_LIBS="$LIBS" -+ LIBS="$LIBS -framework CoreFoundation" -+ AC_TRY_LINK([#include ], -+ [CFPreferencesCopyAppValue(NULL, NULL)], -+ [gt_cv_func_CFPreferencesCopyAppValue=yes], -+ [gt_cv_func_CFPreferencesCopyAppValue=no]) -+ CPPFLAGS="$gt_save_CPPFLAGS" -+ LIBS="$gt_save_LIBS"]) -+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then -+ AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, -+ [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) -+ fi -+ dnl Check for API introduced in MacOS X 10.3. -+ AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, -+ [gt_save_CPPFLAGS="$CPPFLAGS" -+ CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" -+ gt_save_LIBS="$LIBS" -+ LIBS="$LIBS -framework CoreFoundation" -+ AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], -+ [gt_cv_func_CFLocaleCopyCurrent=yes], -+ [gt_cv_func_CFLocaleCopyCurrent=no]) -+ CPPFLAGS="$gt_save_CPPFLAGS" -+ LIBS="$gt_save_LIBS"]) -+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then -+ AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, -+ [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) -+ fi -+ INTL_MACOSX_LIBS= -+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then -+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" -+ fi -+ AC_SUBST([INTL_MACOSX_LIBS]) -+]) -+ -+ -+dnl gt_CHECK_DECL(FUNC, INCLUDES) -+dnl Check whether a function is declared. -+AC_DEFUN([gt_CHECK_DECL], -+[ -+ AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, -+ [AC_TRY_COMPILE([$2], [ -+#ifndef $1 -+ char *p = (char *) $1; -+#endif -+], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) -+ if test $ac_cv_have_decl_$1 = yes; then -+ gt_value=1 -+ else -+ gt_value=0 -+ fi -+ AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], -+ [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) -+]) -+ -+ -+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) -+AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) -+ -+# po.m4 serial 7 (gettext-0.14.3) -+dnl Copyright (C) 1995-2005 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+dnl -+dnl This file can can be used in projects which are not available under -+dnl the GNU General Public License or the GNU Library General Public -+dnl License but which still want to provide support for the GNU gettext -+dnl functionality. -+dnl Please note that the actual code of the GNU gettext library is covered -+dnl by the GNU Library General Public License, and the rest of the GNU -+dnl gettext package package is covered by the GNU General Public License. -+dnl They are *not* in the public domain. -+ -+dnl Authors: -+dnl Ulrich Drepper , 1995-2000. -+dnl Bruno Haible , 2000-2003. -+ -+AC_PREREQ(2.50) -+ -+dnl Checks for all prerequisites of the po subdirectory. -+AC_DEFUN([AM_PO_SUBDIRS], -+[ -+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl -+ AC_REQUIRE([AC_PROG_INSTALL])dnl -+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl -+ AC_REQUIRE([AM_NLS])dnl -+ -+ dnl Perform the following tests also if --disable-nls has been given, -+ dnl because they are needed for "make dist" to work. -+ -+ dnl Search for GNU msgfmt in the PATH. -+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. -+ dnl The second test excludes FreeBSD msgfmt. -+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, -+ [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && -+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], -+ :) -+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) -+ -+ dnl Search for GNU xgettext 0.12 or newer in the PATH. -+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions. -+ dnl The second test excludes FreeBSD xgettext. -+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, -+ [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && -+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], -+ :) -+ dnl Remove leftover from FreeBSD xgettext call. -+ rm -f messages.po -+ -+ dnl Search for GNU msgmerge 0.11 or newer in the PATH. -+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, -+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) -+ -+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. -+ dnl Test whether we really found GNU msgfmt. -+ if test "$GMSGFMT" != ":"; then -+ dnl If it is no GNU msgfmt we define it as : so that the -+ dnl Makefiles still can work. -+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && -+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then -+ : ; -+ else -+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` -+ AC_MSG_RESULT( -+ [found $GMSGFMT program is not GNU msgfmt; ignore it]) -+ GMSGFMT=":" -+ fi -+ fi -+ -+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. -+ dnl Test whether we really found GNU xgettext. -+ if test "$XGETTEXT" != ":"; then -+ dnl If it is no GNU xgettext we define it as : so that the -+ dnl Makefiles still can work. -+ if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && -+ (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then -+ : ; -+ else -+ AC_MSG_RESULT( -+ [found xgettext program is not GNU xgettext; ignore it]) -+ XGETTEXT=":" -+ fi -+ dnl Remove leftover from FreeBSD xgettext call. -+ rm -f messages.po -+ fi -+ -+ AC_OUTPUT_COMMANDS([ -+ for ac_file in $CONFIG_FILES; do -+ # Support "outfile[:infile[:infile...]]" -+ case "$ac_file" in -+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; -+ esac -+ # PO directories have a Makefile.in generated from Makefile.in.in. -+ case "$ac_file" in */Makefile.in) -+ # Adjust a relative srcdir. -+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` -+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" -+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` -+ # In autoconf-2.13 it is called $ac_given_srcdir. -+ # In autoconf-2.50 it is called $srcdir. -+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" -+ case "$ac_given_srcdir" in -+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; -+ /*) top_srcdir="$ac_given_srcdir" ;; -+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;; -+ esac -+ # Treat a directory as a PO directory if and only if it has a -+ # POTFILES.in file. This allows packages to have multiple PO -+ # directories under different names or in different locations. -+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then -+ rm -f "$ac_dir/POTFILES" -+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" -+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" -+ POMAKEFILEDEPS="POTFILES.in" -+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend -+ # on $ac_dir but don't depend on user-specified configuration -+ # parameters. -+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then -+ # The LINGUAS file contains the set of available languages. -+ if test -n "$OBSOLETE_ALL_LINGUAS"; then -+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" -+ fi -+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` -+ # Hide the ALL_LINGUAS assigment from automake. -+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_' -+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" -+ else -+ # The set of available languages was given in configure.in. -+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' -+ fi -+ # Compute POFILES -+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) -+ # Compute UPDATEPOFILES -+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) -+ # Compute DUMMYPOFILES -+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) -+ # Compute GMOFILES -+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) -+ case "$ac_given_srcdir" in -+ .) srcdirpre= ;; -+ *) srcdirpre='$(srcdir)/' ;; -+ esac -+ POFILES= -+ UPDATEPOFILES= -+ DUMMYPOFILES= -+ GMOFILES= -+ for lang in $ALL_LINGUAS; do -+ POFILES="$POFILES $srcdirpre$lang.po" -+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" -+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop" -+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo" -+ done -+ # CATALOGS depends on both $ac_dir and the user's LINGUAS -+ # environment variable. -+ INST_LINGUAS= -+ if test -n "$ALL_LINGUAS"; then -+ for presentlang in $ALL_LINGUAS; do -+ useit=no -+ if test "%UNSET%" != "$LINGUAS"; then -+ desiredlanguages="$LINGUAS" -+ else -+ desiredlanguages="$ALL_LINGUAS" -+ fi -+ for desiredlang in $desiredlanguages; do -+ # Use the presentlang catalog if desiredlang is -+ # a. equal to presentlang, or -+ # b. a variant of presentlang (because in this case, -+ # presentlang can be used as a fallback for messages -+ # which are not translated in the desiredlang catalog). -+ case "$desiredlang" in -+ "$presentlang"*) useit=yes;; -+ esac -+ done -+ if test $useit = yes; then -+ INST_LINGUAS="$INST_LINGUAS $presentlang" -+ fi -+ done -+ fi -+ CATALOGS= -+ if test -n "$INST_LINGUAS"; then -+ for lang in $INST_LINGUAS; do -+ CATALOGS="$CATALOGS $lang.gmo" -+ done -+ fi -+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" -+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" -+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do -+ if test -f "$f"; then -+ case "$f" in -+ *.orig | *.bak | *~) ;; -+ *) cat "$f" >> "$ac_dir/Makefile" ;; -+ esac -+ fi -+ done -+ fi -+ ;; -+ esac -+ done], -+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute -+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it -+ # from automake. -+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' -+ # Capture the value of LINGUAS because we need it to compute CATALOGS. -+ LINGUAS="${LINGUAS-%UNSET%}" -+ ]) -+]) -+ -+dnl Postprocesses a Makefile in a directory containing PO files. -+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], -+[ -+ # When this code is run, in config.status, two variables have already been -+ # set: -+ # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, -+ # - LINGUAS is the value of the environment variable LINGUAS at configure -+ # time. -+ -+changequote(,)dnl -+ # Adjust a relative srcdir. -+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` -+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" -+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` -+ # In autoconf-2.13 it is called $ac_given_srcdir. -+ # In autoconf-2.50 it is called $srcdir. -+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" -+ case "$ac_given_srcdir" in -+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; -+ /*) top_srcdir="$ac_given_srcdir" ;; -+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;; -+ esac -+ -+ # Find a way to echo strings without interpreting backslash. -+ if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then -+ gt_echo='echo' -+ else -+ if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then -+ gt_echo='printf %s\n' -+ else -+ echo_func () { -+ cat < "$ac_file.tmp" -+ if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then -+ # Add dependencies that cannot be formulated as a simple suffix rule. -+ for lang in $ALL_LINGUAS; do -+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` -+ cat >> "$ac_file.tmp" < /dev/null; then -+ # Add dependencies that cannot be formulated as a simple suffix rule. -+ for lang in $ALL_LINGUAS; do -+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` -+ cat >> "$ac_file.tmp" <> "$ac_file.tmp" <, 1995-2000. -+dnl Bruno Haible , 2000-2003. -+ -+AC_PREREQ(2.50) -+ -+AC_DEFUN([AM_NLS], -+[ -+ AC_MSG_CHECKING([whether NLS is requested]) -+ dnl Default is enabled NLS -+ AC_ARG_ENABLE(nls, -+ [ --disable-nls do not use Native Language Support], -+ USE_NLS=$enableval, USE_NLS=yes) -+ AC_MSG_RESULT($USE_NLS) -+ AC_SUBST(USE_NLS) -+]) -+ -+AC_DEFUN([AM_MKINSTALLDIRS], -+[ -+ dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing. -+ m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])]) -+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly -+ dnl find the mkinstalldirs script in another subdir but $(top_srcdir). -+ dnl Try to locate it. -+ MKINSTALLDIRS= -+ if test -n "$ac_aux_dir"; then -+ case "$ac_aux_dir" in -+ /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; -+ *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; -+ esac -+ fi -+ if test -z "$MKINSTALLDIRS"; then -+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" -+ fi -+ AC_SUBST(MKINSTALLDIRS) -+]) -+ -+# progtest.m4 serial 4 (gettext-0.14.2) -+dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+dnl -+dnl This file can can be used in projects which are not available under -+dnl the GNU General Public License or the GNU Library General Public -+dnl License but which still want to provide support for the GNU gettext -+dnl functionality. -+dnl Please note that the actual code of the GNU gettext library is covered -+dnl by the GNU Library General Public License, and the rest of the GNU -+dnl gettext package package is covered by the GNU General Public License. -+dnl They are *not* in the public domain. -+ -+dnl Authors: -+dnl Ulrich Drepper , 1996. -+ -+AC_PREREQ(2.50) -+ -+# Search path for a program which passes the given test. -+ -+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, -+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) -+AC_DEFUN([AM_PATH_PROG_WITH_TEST], -+[ -+# Prepare PATH_SEPARATOR. -+# The user is always right. -+if test "${PATH_SEPARATOR+set}" != set; then -+ echo "#! /bin/sh" >conf$$.sh -+ echo "exit 0" >>conf$$.sh -+ chmod +x conf$$.sh -+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then -+ PATH_SEPARATOR=';' -+ else -+ PATH_SEPARATOR=: -+ fi -+ rm -f conf$$.sh -+fi -+ -+# Find out how to test for executable files. Don't use a zero-byte file, -+# as systems may use methods other than mode bits to determine executability. -+cat >conf$$.file <<_ASEOF -+#! /bin/sh -+exit 0 -+_ASEOF -+chmod +x conf$$.file -+if test -x conf$$.file >/dev/null 2>&1; then -+ ac_executable_p="test -x" -+else -+ ac_executable_p="test -f" -+fi -+rm -f conf$$.file -+ -+# Extract the first word of "$2", so it can be a program name with args. -+set dummy $2; ac_word=[$]2 -+AC_MSG_CHECKING([for $ac_word]) -+AC_CACHE_VAL(ac_cv_path_$1, -+[case "[$]$1" in -+ [[\\/]]* | ?:[[\\/]]*) -+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path. -+ ;; -+ *) -+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR -+ for ac_dir in ifelse([$5], , $PATH, [$5]); do -+ IFS="$ac_save_IFS" -+ test -z "$ac_dir" && ac_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then -+ echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD -+ if [$3]; then -+ ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" -+ break 2 -+ fi -+ fi -+ done -+ done -+ IFS="$ac_save_IFS" -+dnl If no 4th arg is given, leave the cache variable unset, -+dnl so AC_PATH_PROGS will keep looking. -+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" -+])dnl -+ ;; -+esac])dnl -+$1="$ac_cv_path_$1" -+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then -+ AC_MSG_RESULT([$]$1) -+else -+ AC_MSG_RESULT(no) -+fi -+AC_SUBST($1)dnl -+]) -+ - # iconv.m4 serial AM4 (gettext-0.11.3) - dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. --dnl This file is free software, distributed under the terms of the GNU --dnl General Public License. As a special exception to the GNU General --dnl Public License, this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. - - dnl From Bruno Haible. - -@@ -1523,105 +2056,42 @@ size_t iconv(); - fi - ]) - --# progtest.m4 serial 3 (gettext-0.12) --dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. --dnl This file is free software, distributed under the terms of the GNU --dnl General Public License. As a special exception to the GNU General --dnl Public License, this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. --dnl --dnl This file can can be used in projects which are not available under --dnl the GNU General Public License or the GNU Library General Public --dnl License but which still want to provide support for the GNU gettext --dnl functionality. --dnl Please note that the actual code of the GNU gettext library is covered --dnl by the GNU Library General Public License, and the rest of the GNU --dnl gettext package package is covered by the GNU General Public License. --dnl They are *not* in the public domain. -- --dnl Authors: --dnl Ulrich Drepper , 1996. -- --# Search path for a program which passes the given test. -- --dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, --dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) --AC_DEFUN([AM_PATH_PROG_WITH_TEST], --[ --# Prepare PATH_SEPARATOR. --# The user is always right. --if test "${PATH_SEPARATOR+set}" != set; then -- echo "#! /bin/sh" >conf$$.sh -- echo "exit 0" >>conf$$.sh -- chmod +x conf$$.sh -- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then -- PATH_SEPARATOR=';' -- else -- PATH_SEPARATOR=: -- fi -- rm -f conf$$.sh --fi -- --# Find out how to test for executable files. Don't use a zero-byte file, --# as systems may use methods other than mode bits to determine executability. --cat >conf$$.file <<_ASEOF --#! /bin/sh --exit 0 --_ASEOF --chmod +x conf$$.file --if test -x conf$$.file >/dev/null 2>&1; then -- ac_executable_p="test -x" --else -- ac_executable_p="test -f" --fi --rm -f conf$$.file -- --# Extract the first word of "$2", so it can be a program name with args. --set dummy $2; ac_word=[$]2 --AC_MSG_CHECKING([for $ac_word]) --AC_CACHE_VAL(ac_cv_path_$1, --[case "[$]$1" in -- [[\\/]]* | ?:[[\\/]]*) -- ac_cv_path_$1="[$]$1" # Let the user override the test with a path. -- ;; -- *) -- ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR -- for ac_dir in ifelse([$5], , $PATH, [$5]); do -- IFS="$ac_save_IFS" -- test -z "$ac_dir" && ac_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then -- if [$3]; then -- ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" -- break 2 -- fi -- fi -- done -- done -- IFS="$ac_save_IFS" --dnl If no 4th arg is given, leave the cache variable unset, --dnl so AC_PATH_PROGS will keep looking. --ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" --])dnl -- ;; --esac])dnl --$1="$ac_cv_path_$1" --if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then -- AC_MSG_RESULT([$]$1) --else -- AC_MSG_RESULT(no) --fi --AC_SUBST($1)dnl --]) -+# glibc2.m4 serial 1 -+dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+# Test for the GNU C Library, version 2.0 or newer. -+# From Bruno Haible. -+ -+AC_DEFUN([gt_GLIBC2], -+ [ -+ AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer, -+ ac_cv_gnu_library_2, -+ [AC_EGREP_CPP([Lucky GNU user], -+ [ -+#include -+#ifdef __GNU_LIBRARY__ -+ #if (__GLIBC__ >= 2) -+ Lucky GNU user -+ #endif -+#endif -+ ], -+ ac_cv_gnu_library_2=yes, -+ ac_cv_gnu_library_2=no) -+ ] -+ ) -+ AC_SUBST(GLIBC2) -+ GLIBC2="$ac_cv_gnu_library_2" -+ ] -+) - - # isc-posix.m4 serial 2 (gettext-0.11.2) - dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. --dnl This file is free software, distributed under the terms of the GNU --dnl General Public License. As a special exception to the GNU General --dnl Public License, this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. - - # This file is not needed with autoconf-2.53 and newer. Remove it in 2005. - -@@ -1642,18 +2112,259 @@ AC_DEFUN([AC_ISC_POSIX], - ] - ) - --# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40) --dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. --dnl This file is free software, distributed under the terms of the GNU --dnl General Public License. As a special exception to the GNU General --dnl Public License, this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. -+# signed.m4 serial 1 (gettext-0.10.40) -+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+ -+AC_DEFUN([bh_C_SIGNED], -+[ -+ AC_CACHE_CHECK([for signed], bh_cv_c_signed, -+ [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)]) -+ if test $bh_cv_c_signed = no; then -+ AC_DEFINE(signed, , -+ [Define to empty if the C compiler doesn't support this keyword.]) -+ fi -+]) -+ -+# longlong.m4 serial 5 -+dnl Copyright (C) 1999-2004 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Paul Eggert. -+ -+# Define HAVE_LONG_LONG if 'long long' works. -+ -+AC_DEFUN([gl_AC_TYPE_LONG_LONG], -+[ -+ AC_CACHE_CHECK([for long long], ac_cv_type_long_long, -+ [AC_TRY_LINK([long long ll = 1LL; int i = 63;], -+ [long long llmax = (long long) -1; -+ return ll << i | ll >> i | llmax / ll | llmax % ll;], -+ ac_cv_type_long_long=yes, -+ ac_cv_type_long_long=no)]) -+ if test $ac_cv_type_long_long = yes; then -+ AC_DEFINE(HAVE_LONG_LONG, 1, -+ [Define if you have the 'long long' type.]) -+ fi -+]) -+ -+# longdouble.m4 serial 1 (gettext-0.12) -+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+dnl Test whether the compiler supports the 'long double' type. -+dnl Prerequisite: AC_PROG_CC -+ -+AC_DEFUN([gt_TYPE_LONGDOUBLE], -+[ -+ AC_CACHE_CHECK([for long double], gt_cv_c_long_double, -+ [if test "$GCC" = yes; then -+ gt_cv_c_long_double=yes -+ else -+ AC_TRY_COMPILE([ -+ /* The Stardent Vistra knows sizeof(long double), but does not support it. */ -+ long double foo = 0.0; -+ /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ -+ int array [2*(sizeof(long double) >= sizeof(double)) - 1]; -+ ], , -+ gt_cv_c_long_double=yes, gt_cv_c_long_double=no) -+ fi]) -+ if test $gt_cv_c_long_double = yes; then -+ AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.]) -+ fi -+]) -+ -+# wchar_t.m4 serial 1 (gettext-0.12) -+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+dnl Test whether has the 'wchar_t' type. -+dnl Prerequisite: AC_PROG_CC -+ -+AC_DEFUN([gt_TYPE_WCHAR_T], -+[ -+ AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t, -+ [AC_TRY_COMPILE([#include -+ wchar_t foo = (wchar_t)'\0';], , -+ gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)]) -+ if test $gt_cv_c_wchar_t = yes; then -+ AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.]) -+ fi -+]) -+ -+# wint_t.m4 serial 1 (gettext-0.12) -+dnl Copyright (C) 2003 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+dnl Test whether has the 'wint_t' type. -+dnl Prerequisite: AC_PROG_CC -+ -+AC_DEFUN([gt_TYPE_WINT_T], -+[ -+ AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t, -+ [AC_TRY_COMPILE([#include -+ wint_t foo = (wchar_t)'\0';], , -+ gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) -+ if test $gt_cv_c_wint_t = yes; then -+ AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.]) -+ fi -+]) -+ -+# inttypes_h.m4 serial 6 -+dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Paul Eggert. -+ -+# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, -+# doesn't clash with , and declares uintmax_t. -+ -+AC_DEFUN([gl_AC_HEADER_INTTYPES_H], -+[ -+ AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h, -+ [AC_TRY_COMPILE( -+ [#include -+#include ], -+ [uintmax_t i = (uintmax_t) -1;], -+ gl_cv_header_inttypes_h=yes, -+ gl_cv_header_inttypes_h=no)]) -+ if test $gl_cv_header_inttypes_h = yes; then -+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, -+ [Define if exists, doesn't clash with , -+ and declares uintmax_t. ]) -+ fi -+]) -+ -+# stdint_h.m4 serial 5 -+dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Paul Eggert. -+ -+# Define HAVE_STDINT_H_WITH_UINTMAX if exists, -+# doesn't clash with , and declares uintmax_t. -+ -+AC_DEFUN([gl_AC_HEADER_STDINT_H], -+[ -+ AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h, -+ [AC_TRY_COMPILE( -+ [#include -+#include ], -+ [uintmax_t i = (uintmax_t) -1;], -+ gl_cv_header_stdint_h=yes, -+ gl_cv_header_stdint_h=no)]) -+ if test $gl_cv_header_stdint_h = yes; then -+ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, -+ [Define if exists, doesn't clash with , -+ and declares uintmax_t. ]) -+ fi -+]) -+ -+# intmax.m4 serial 2 (gettext-0.14.2) -+dnl Copyright (C) 2002-2005 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+dnl Test whether the system has the 'intmax_t' type, but don't attempt to -+dnl find a replacement if it is lacking. -+ -+AC_DEFUN([gt_TYPE_INTMAX_T], -+[ -+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) -+ AC_REQUIRE([gl_AC_HEADER_STDINT_H]) -+ AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t, -+ [AC_TRY_COMPILE([ -+#include -+#include -+#if HAVE_STDINT_H_WITH_UINTMAX -+#include -+#endif -+#if HAVE_INTTYPES_H_WITH_UINTMAX -+#include -+#endif -+], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)]) -+ if test $gt_cv_c_intmax_t = yes; then -+ AC_DEFINE(HAVE_INTMAX_T, 1, -+ [Define if you have the 'intmax_t' type in or .]) -+ fi -+]) -+ -+# printf-posix.m4 serial 2 (gettext-0.13.1) -+dnl Copyright (C) 2003 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+dnl Test whether the printf() function supports POSIX/XSI format strings with -+dnl positions. -+ -+AC_DEFUN([gt_PRINTF_POSIX], -+[ -+ AC_REQUIRE([AC_PROG_CC]) -+ AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings], -+ gt_cv_func_printf_posix, -+ [ -+ AC_TRY_RUN([ -+#include -+#include -+/* The string "%2$d %1$d", with dollar characters protected from the shell's -+ dollar expansion (possibly an autoconf bug). */ -+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; -+static char buf[100]; -+int main () -+{ -+ sprintf (buf, format, 33, 55); -+ return (strcmp (buf, "55 33") != 0); -+}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, -+ [ -+ AC_EGREP_CPP(notposix, [ -+#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ -+ notposix -+#endif -+ ], gt_cv_func_printf_posix="guessing no", -+ gt_cv_func_printf_posix="guessing yes") -+ ]) -+ ]) -+ case $gt_cv_func_printf_posix in -+ *yes) -+ AC_DEFINE(HAVE_POSIX_PRINTF, 1, -+ [Define if your printf() function supports format strings with positions.]) -+ ;; -+ esac -+]) -+ -+# glibc21.m4 serial 3 -+dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. - - # Test for the GNU C Library, version 2.1 or newer. - # From Bruno Haible. - --AC_DEFUN([jm_GLIBC21], -+AC_DEFUN([gl_GLIBC21], - [ - AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, - ac_cv_gnu_library_2_1, -@@ -1677,11 +2388,9 @@ AC_DEFUN([jm_GLIBC21], - - # intdiv0.m4 serial 1 (gettext-0.11.3) - dnl Copyright (C) 2002 Free Software Foundation, Inc. --dnl This file is free software, distributed under the terms of the GNU --dnl General Public License. As a special exception to the GNU General --dnl Public License, this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. - - dnl From Bruno Haible. - -@@ -1748,13 +2457,11 @@ int main () - [Define if integer division by zero raises signal SIGFPE.]) - ]) - --# uintmax_t.m4 serial 7 (gettext-0.12) --dnl Copyright (C) 1997-2003 Free Software Foundation, Inc. --dnl This file is free software, distributed under the terms of the GNU --dnl General Public License. As a special exception to the GNU General --dnl Public License, this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. -+# uintmax_t.m4 serial 9 -+dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. - - dnl From Paul Eggert. - -@@ -1763,12 +2470,12 @@ AC_PREREQ(2.13) - # Define uintmax_t to 'unsigned long' or 'unsigned long long' - # if it is not already defined in or . - --AC_DEFUN([jm_AC_TYPE_UINTMAX_T], --[ -- AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) -- AC_REQUIRE([jm_AC_HEADER_STDINT_H]) -- if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then -- AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) -+AC_DEFUN([gl_AC_TYPE_UINTMAX_T], -+[ -+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) -+ AC_REQUIRE([gl_AC_HEADER_STDINT_H]) -+ if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then -+ AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG]) - test $ac_cv_type_unsigned_long_long = yes \ - && ac_type='unsigned long long' \ - || ac_type='unsigned long' -@@ -1781,77 +2488,17 @@ AC_DEFUN([jm_AC_TYPE_UINTMAX_T], - fi - ]) - --# inttypes_h.m4 serial 5 (gettext-0.12) --dnl Copyright (C) 1997-2003 Free Software Foundation, Inc. --dnl This file is free software, distributed under the terms of the GNU --dnl General Public License. As a special exception to the GNU General --dnl Public License, this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. -+# ulonglong.m4 serial 4 -+dnl Copyright (C) 1999-2004 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. - - dnl From Paul Eggert. - --# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, --# doesn't clash with , and declares uintmax_t. -- --AC_DEFUN([jm_AC_HEADER_INTTYPES_H], --[ -- AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, -- [AC_TRY_COMPILE( -- [#include --#include ], -- [uintmax_t i = (uintmax_t) -1;], -- jm_ac_cv_header_inttypes_h=yes, -- jm_ac_cv_header_inttypes_h=no)]) -- if test $jm_ac_cv_header_inttypes_h = yes; then -- AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, -- [Define if exists, doesn't clash with , -- and declares uintmax_t. ]) -- fi --]) -- --# stdint_h.m4 serial 3 (gettext-0.12) --dnl Copyright (C) 1997-2003 Free Software Foundation, Inc. --dnl This file is free software, distributed under the terms of the GNU --dnl General Public License. As a special exception to the GNU General --dnl Public License, this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. -- --dnl From Paul Eggert. -- --# Define HAVE_STDINT_H_WITH_UINTMAX if exists, --# doesn't clash with , and declares uintmax_t. -- --AC_DEFUN([jm_AC_HEADER_STDINT_H], --[ -- AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h, -- [AC_TRY_COMPILE( -- [#include --#include ], -- [uintmax_t i = (uintmax_t) -1;], -- jm_ac_cv_header_stdint_h=yes, -- jm_ac_cv_header_stdint_h=no)]) -- if test $jm_ac_cv_header_stdint_h = yes; then -- AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, -- [Define if exists, doesn't clash with , -- and declares uintmax_t. ]) -- fi --]) -- --# ulonglong.m4 serial 3 --dnl Copyright (C) 1999-2003 Free Software Foundation, Inc. --dnl This file is free software, distributed under the terms of the GNU --dnl General Public License. As a special exception to the GNU General --dnl Public License, this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. -- --dnl From Paul Eggert. -- - # Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works. - --AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], -+AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG], - [ - AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, - [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;], -@@ -1867,11 +2514,9 @@ AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG] - - # inttypes.m4 serial 1 (gettext-0.11.4) - dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. --dnl This file is free software, distributed under the terms of the GNU --dnl General Public License. As a special exception to the GNU General --dnl Public License, this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. - - dnl From Paul Eggert. - -@@ -1895,11 +2540,9 @@ AC_DEFUN([gt_HEADER_INTTYPES_H], - - # inttypes-pri.m4 serial 1 (gettext-0.11.4) - dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. --dnl This file is free software, distributed under the terms of the GNU --dnl General Public License. As a special exception to the GNU General --dnl Public License, this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. - - dnl From Bruno Haible. - -@@ -1926,13 +2569,85 @@ char *p = PRId32; - fi - ]) - -+# xsize.m4 serial 3 -+dnl Copyright (C) 2003-2004 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+AC_DEFUN([gl_XSIZE], -+[ -+ dnl Prerequisites of lib/xsize.h. -+ AC_REQUIRE([gl_SIZE_MAX]) -+ AC_REQUIRE([AC_C_INLINE]) -+ AC_CHECK_HEADERS(stdint.h) -+]) -+ -+# size_max.m4 serial 2 -+dnl Copyright (C) 2003 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+ -+AC_DEFUN([gl_SIZE_MAX], -+[ -+ AC_CHECK_HEADERS(stdint.h) -+ dnl First test whether the system already has SIZE_MAX. -+ AC_MSG_CHECKING([for SIZE_MAX]) -+ result= -+ AC_EGREP_CPP([Found it], [ -+#include -+#if HAVE_STDINT_H -+#include -+#endif -+#ifdef SIZE_MAX -+Found it -+#endif -+], result=yes) -+ if test -z "$result"; then -+ dnl Define it ourselves. Here we assume that the type 'size_t' is not wider -+ dnl than the type 'unsigned long'. -+ dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr', -+ dnl which is guaranteed to work from LONG_MIN to LONG_MAX. -+ _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi, -+ [#include ], result=?) -+ _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo, -+ [#include ], result=?) -+ _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint, -+ [#include ], result=?) -+ if test "$fits_in_uint" = 1; then -+ dnl Even though SIZE_MAX fits in an unsigned int, it must be of type -+ dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. -+ AC_TRY_COMPILE([#include -+ extern size_t foo; -+ extern unsigned long foo; -+ ], [], fits_in_uint=0) -+ fi -+ if test -z "$result"; then -+ if test "$fits_in_uint" = 1; then -+ result="$res_hi$res_lo"U -+ else -+ result="$res_hi$res_lo"UL -+ fi -+ else -+ dnl Shouldn't happen, but who knows... -+ result='~(size_t)0' -+ fi -+ fi -+ AC_MSG_RESULT([$result]) -+ if test "$result" != yes; then -+ AC_DEFINE_UNQUOTED([SIZE_MAX], [$result], -+ [Define as the maximum value of type 'size_t', if the system doesn't define it.]) -+ fi -+]) -+ - # codeset.m4 serial AM1 (gettext-0.10.40) - dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. --dnl This file is free software, distributed under the terms of the GNU --dnl General Public License. As a special exception to the GNU General --dnl Public License, this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. - - dnl From Bruno Haible. - -@@ -1950,13 +2665,11 @@ AC_DEFUN([AM_LANGINFO_CODESET], - fi - ]) - --# lcmessage.m4 serial 3 (gettext-0.11.3) --dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. --dnl This file is free software, distributed under the terms of the GNU --dnl General Public License. As a special exception to the GNU General --dnl Public License, this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. -+# lcmessage.m4 serial 4 (gettext-0.14.2) -+dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. - dnl - dnl This file can can be used in projects which are not available under - dnl the GNU General Public License or the GNU Library General Public -@@ -1972,12 +2685,12 @@ dnl Ulrich Drepper . - --AC_DEFUN([AM_LC_MESSAGES], --[ -- AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, -+AC_DEFUN([gt_LC_MESSAGES], -+[ -+ AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES, - [AC_TRY_LINK([#include ], [return LC_MESSAGES], -- am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) -- if test $am_cv_val_LC_MESSAGES = yes; then -+ gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)]) -+ if test $gt_cv_val_LC_MESSAGES = yes; then - AC_DEFINE(HAVE_LC_MESSAGES, 1, - [Define if your file defines LC_MESSAGES.]) - fi -diff -r 48879aeab0b6 -r 2ce6ef376b40 config.guess ---- a/config.guess Sat May 28 15:42:43 2005 +0000 -+++ b/config.guess Sat May 28 15:45:44 2005 +0000 -@@ -1,9 +1,9 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -- --timestamp='2004-11-12' -+# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -+ -+timestamp='2005-04-22' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by -@@ -53,7 +53,7 @@ GNU config.guess ($timestamp) - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 - Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO -@@ -804,6 +804,9 @@ EOF - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; -+ amd64:CYGWIN*:*:*) -+ echo x86_64-unknown-cygwin -+ exit 0 ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit 0 ;; -@@ -1137,6 +1140,10 @@ EOF - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit 0 ;; -+ i*86:VOS:*:*) -+ # From Paul.Green@stratus.com. -+ echo ${UNAME_MACHINE}-stratus-vos -+ exit 0 ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos -@@ -1196,6 +1203,9 @@ EOF - exit 0 ;; - *:QNX:*:4*) - echo i386-pc-qnx -+ exit 0 ;; -+ NSE-?:NONSTOP_KERNEL:*:*) -+ echo nse-tandem-nsk${UNAME_RELEASE} - exit 0 ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} -@@ -1413,7 +1423,9 @@ the operating system you are using. It i - the operating system you are using. It is advised that you - download the most up to date version of the config scripts from - -- ftp://ftp.gnu.org/pub/gnu/config/ -+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess -+and -+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub - - If the version you run ($0) is already up to date, please - send the following data and any information you think might be -diff -r 48879aeab0b6 -r 2ce6ef376b40 config.sub ---- a/config.sub Sat May 28 15:42:43 2005 +0000 -+++ b/config.sub Sat May 28 15:45:44 2005 +0000 -@@ -1,9 +1,9 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -- --timestamp='2004-11-30' -+# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -+ -+timestamp='2005-04-22' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software -@@ -70,7 +70,7 @@ version="\ - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 - Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO -@@ -231,13 +231,14 @@ case $basic_machine in - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -+ | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ -- | m32r | m32rle | m68000 | m68k | m88k | mcore \ -+ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ -@@ -262,7 +263,8 @@ case $basic_machine in - | pyramid \ - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ -+ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b \ - | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ -@@ -298,7 +300,7 @@ case $basic_machine in - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ -- | bs2000-* \ -+ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ -@@ -310,7 +312,7 @@ case $basic_machine in - | ip2k-* | iq2000-* \ - | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | mcore-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ -@@ -336,7 +338,8 @@ case $basic_machine in - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ -+ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ -diff -r 48879aeab0b6 -r 2ce6ef376b40 configure ---- a/configure Sat May 28 15:42:43 2005 +0000 -+++ b/configure Sat May 28 15:45:44 2005 +0000 -@@ -313,7 +313,7 @@ ac_includes_default="\ - #endif" - - ac_subdirs_all="$ac_subdirs_all contrib/php" --ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC_WARNINGS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S PACKAGE VERSION MKINSTALLDIRS MSGFMT GMSGFMT XGETTEXT MSGMERGE RANLIB ac_ct_RANLIB CPP EGREP ALLOCA GLIBC21 LIBICONV LTLIBICONV INTLBISON USE_NLS BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT INTLOBJS DATADIRNAME INSTOBJEXT GENCAT INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB localedir ncp_ipx_headers_1 ncp_ipx_headers_2 ncp_ipx_defsiocprotoprivate ncp_ipx_defsiocaipx ncp_sys_mount_h ncp_linux_fs_h ncp_net_if_h ncp_net_route_h ncp_if_ether_support ncp_sys_select_h stdint_types socklen_t wchar_h LIB_PAM_SECURITY php_found REENTRANT_CFLAGS ncphost ELF_TARGET VERSIONED_LINK ncp_in_support ncp_ipx_support NDS_SUPPORT SIGNATURES MOUNT2 MOUNT3 USE_KERNEL ADDON_SUBDIRS ADDON_DEV_SUBDIRS FFUNCTION_SECTIONS GC_SECTIONS subdirs LIBOBJS LTLIBOBJS' -+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC_WARNINGS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S PACKAGE VERSION MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE CPP EGREP GLIBC2 RANLIB ac_ct_RANLIB ALLOCA GLIBC21 INTL_MACOSX_LIBS HAVE_POSIX_PRINTF HAVE_ASPRINTF HAVE_SNPRINTF HAVE_WPRINTF LIBICONV LTLIBICONV INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB localedir ncp_ipx_headers_1 ncp_ipx_headers_2 ncp_ipx_defsiocprotoprivate ncp_ipx_defsiocaipx ncp_sys_mount_h ncp_linux_fs_h ncp_net_if_h ncp_net_route_h ncp_if_ether_support ncp_sys_select_h stdint_types socklen_t wchar_h LIB_PAM_SECURITY php_found REENTRANT_CFLAGS ncphost ELF_TARGET VERSIONED_LINK ncp_in_support ncp_ipx_support NDS_SUPPORT SIGNATURES MOUNT2 MOUNT3 USE_KERNEL ADDON_SUBDIRS ADDON_DEV_SUBDIRS FFUNCTION_SECTIONS GC_SECTIONS subdirs LIBOBJS LTLIBOBJS' - ac_subst_files='' - - # Initialize some variables set by options. -@@ -866,8 +866,8 @@ Optional Features: - --disable-function-sections do not use -ffunction-sections for static libraries - --enable-trace enable trace of ncp calls - --enable-ncp-debug enable builtin debugging support -+ --disable-nls do not use Native Language Support - --disable-rpath do not hardcode runtime library paths -- --disable-nls do not use Native Language Support - - Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] -@@ -2758,13 +2758,31 @@ VERSION="$PACKAGE_VERSION" - VERSION="$PACKAGE_VERSION" - - -+ - MKINSTALLDIRS= - if test -n "$ac_aux_dir"; then -- MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" -+ case "$ac_aux_dir" in -+ /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; -+ *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; -+ esac - fi - if test -z "$MKINSTALLDIRS"; then - MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" - fi -+ -+ -+ -+ echo "$as_me:$LINENO: checking whether NLS is requested" >&5 -+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 -+ # Check whether --enable-nls or --disable-nls was given. -+if test "${enable_nls+set}" = set; then -+ enableval="$enable_nls" -+ USE_NLS=$enableval -+else -+ USE_NLS=yes -+fi; -+ echo "$as_me:$LINENO: result: $USE_NLS" >&5 -+echo "${ECHO_T}$USE_NLS" >&6 - - - -@@ -2817,7 +2835,8 @@ else - test -z "$ac_dir" && ac_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then -- if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && -+ echo "$as_me: trying $ac_dir/$ac_word..." >&5 -+ if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && - (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" - break 2 -@@ -2927,8 +2946,9 @@ else - test -z "$ac_dir" && ac_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then -- if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && -- (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then -+ echo "$as_me: trying $ac_dir/$ac_word..." >&5 -+ if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && -+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" - break 2 - fi -@@ -2998,7 +3018,8 @@ else - test -z "$ac_dir" && ac_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then -- if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then -+ echo "$as_me: trying $ac_dir/$ac_word..." >&5 -+ if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then - ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" - break 2 - fi -@@ -3033,8 +3054,8 @@ echo "${ECHO_T}found $GMSGFMT program is - fi - - if test "$XGETTEXT" != ":"; then -- if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && -- (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then -+ if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && -+ (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - : ; - else - echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 -@@ -3044,7 +3065,296 @@ echo "${ECHO_T}found xgettext program is - rm -f messages.po - fi - -- ac_config_commands="$ac_config_commands gettext" -+ ac_config_commands="$ac_config_commands default-1" -+ -+ -+ -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 -+# On Suns, sometimes $CPP names a directory. -+if test -n "$CPP" && test -d "$CPP"; then -+ CPP= -+fi -+if test -z "$CPP"; then -+ if test "${ac_cv_prog_CPP+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ # Double quotes because CPP needs to be expanded -+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" -+ do -+ ac_preproc_ok=false -+for ac_c_preproc_warn_flag in '' yes -+do -+ # Use a header file that comes with gcc, so configuring glibc -+ # with a fresh cross-compiler works. -+ # Prefer to if __STDC__ is defined, since -+ # exists even on freestanding compilers. -+ # On the NeXT, cc -E runs the code through the compiler's parser, -+ # not just through cpp. "Syntax error" is here to catch this case. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif -+ Syntax error -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ : -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ # Broken: fails on valid input. -+continue -+fi -+rm -f conftest.err conftest.$ac_ext -+ -+ # OK, works on sane cases. Now check whether non-existent headers -+ # can be detected and how. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ # Broken: success on invalid input. -+continue -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ # Passes both tests. -+ac_preproc_ok=: -+break -+fi -+rm -f conftest.err conftest.$ac_ext -+ -+done -+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -+rm -f conftest.err conftest.$ac_ext -+if $ac_preproc_ok; then -+ break -+fi -+ -+ done -+ ac_cv_prog_CPP=$CPP -+ -+fi -+ CPP=$ac_cv_prog_CPP -+else -+ ac_cv_prog_CPP=$CPP -+fi -+echo "$as_me:$LINENO: result: $CPP" >&5 -+echo "${ECHO_T}$CPP" >&6 -+ac_preproc_ok=false -+for ac_c_preproc_warn_flag in '' yes -+do -+ # Use a header file that comes with gcc, so configuring glibc -+ # with a fresh cross-compiler works. -+ # Prefer to if __STDC__ is defined, since -+ # exists even on freestanding compilers. -+ # On the NeXT, cc -E runs the code through the compiler's parser, -+ # not just through cpp. "Syntax error" is here to catch this case. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif -+ Syntax error -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ : -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ # Broken: fails on valid input. -+continue -+fi -+rm -f conftest.err conftest.$ac_ext -+ -+ # OK, works on sane cases. Now check whether non-existent headers -+ # can be detected and how. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ # Broken: success on invalid input. -+continue -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ # Passes both tests. -+ac_preproc_ok=: -+break -+fi -+rm -f conftest.err conftest.$ac_ext -+ -+done -+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -+rm -f conftest.err conftest.$ac_ext -+if $ac_preproc_ok; then -+ : -+else -+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -+See \`config.log' for more details." >&5 -+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; } -+fi -+ -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+ -+ -+echo "$as_me:$LINENO: checking for egrep" >&5 -+echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -+if test "${ac_cv_prog_egrep+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1 -+ then ac_cv_prog_egrep='grep -E' -+ else ac_cv_prog_egrep='egrep' -+ fi -+fi -+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -+echo "${ECHO_T}$ac_cv_prog_egrep" >&6 -+ EGREP=$ac_cv_prog_egrep -+ -+ -+ -+ echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2 or newer" >&5 -+echo $ECHO_N "checking whether we are using the GNU C Library 2 or newer... $ECHO_C" >&6 -+if test "${ac_cv_gnu_library_2+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+#include -+#ifdef __GNU_LIBRARY__ -+ #if (__GLIBC__ >= 2) -+ Lucky GNU user -+ #endif -+#endif -+ -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "Lucky GNU user" >/dev/null 2>&1; then -+ ac_cv_gnu_library_2=yes -+else -+ ac_cv_gnu_library_2=no -+fi -+rm -f conftest* -+ -+ -+ -+fi -+echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2" >&5 -+echo "${ECHO_T}$ac_cv_gnu_library_2" >&6 -+ -+ GLIBC2="$ac_cv_gnu_library_2" - - - if test -n "$ac_tool_prefix"; then -@@ -3126,7 +3436,6 @@ else - else - RANLIB="$ac_cv_prog_RANLIB" - fi -- - - - echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5 -@@ -3196,256 +3505,6 @@ if test $ac_cv_lib_cposix_strerror = yes - LIBS="$LIBS -lcposix" - fi - -- -- --ac_ext=c --ac_cpp='$CPP $CPPFLAGS' --ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_c_compiler_gnu --echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 --echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 --# On Suns, sometimes $CPP names a directory. --if test -n "$CPP" && test -d "$CPP"; then -- CPP= --fi --if test -z "$CPP"; then -- if test "${ac_cv_prog_CPP+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- # Double quotes because CPP needs to be expanded -- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" -- do -- ac_preproc_ok=false --for ac_c_preproc_warn_flag in '' yes --do -- # Use a header file that comes with gcc, so configuring glibc -- # with a fresh cross-compiler works. -- # Prefer to if __STDC__ is defined, since -- # exists even on freestanding compilers. -- # On the NeXT, cc -E runs the code through the compiler's parser, -- # not just through cpp. "Syntax error" is here to catch this case. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#ifdef __STDC__ --# include --#else --# include --#endif -- Syntax error --_ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -- : --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- # Broken: fails on valid input. --continue --fi --rm -f conftest.err conftest.$ac_ext -- -- # OK, works on sane cases. Now check whether non-existent headers -- # can be detected and how. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include --_ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -- # Broken: success on invalid input. --continue --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- # Passes both tests. --ac_preproc_ok=: --break --fi --rm -f conftest.err conftest.$ac_ext -- --done --# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. --rm -f conftest.err conftest.$ac_ext --if $ac_preproc_ok; then -- break --fi -- -- done -- ac_cv_prog_CPP=$CPP -- --fi -- CPP=$ac_cv_prog_CPP --else -- ac_cv_prog_CPP=$CPP --fi --echo "$as_me:$LINENO: result: $CPP" >&5 --echo "${ECHO_T}$CPP" >&6 --ac_preproc_ok=false --for ac_c_preproc_warn_flag in '' yes --do -- # Use a header file that comes with gcc, so configuring glibc -- # with a fresh cross-compiler works. -- # Prefer to if __STDC__ is defined, since -- # exists even on freestanding compilers. -- # On the NeXT, cc -E runs the code through the compiler's parser, -- # not just through cpp. "Syntax error" is here to catch this case. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#ifdef __STDC__ --# include --#else --# include --#endif -- Syntax error --_ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -- : --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- # Broken: fails on valid input. --continue --fi --rm -f conftest.err conftest.$ac_ext -- -- # OK, works on sane cases. Now check whether non-existent headers -- # can be detected and how. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include --_ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -- # Broken: success on invalid input. --continue --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- # Passes both tests. --ac_preproc_ok=: --break --fi --rm -f conftest.err conftest.$ac_ext -- --done --# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. --rm -f conftest.err conftest.$ac_ext --if $ac_preproc_ok; then -- : --else -- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check --See \`config.log' for more details." >&5 --echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } --fi -- --ac_ext=c --ac_cpp='$CPP $CPPFLAGS' --ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_c_compiler_gnu -- -- --echo "$as_me:$LINENO: checking for egrep" >&5 --echo $ECHO_N "checking for egrep... $ECHO_C" >&6 --if test "${ac_cv_prog_egrep+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- if echo a | (grep -E '(a|b)') >/dev/null 2>&1 -- then ac_cv_prog_egrep='grep -E' -- else ac_cv_prog_egrep='egrep' -- fi --fi --echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 --echo "${ECHO_T}$ac_cv_prog_egrep" >&6 -- EGREP=$ac_cv_prog_egrep - - - echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -@@ -3719,6 +3778,67 @@ _ACEOF - - fi - -+ -+ echo "$as_me:$LINENO: checking for signed" >&5 -+echo $ECHO_N "checking for signed... $ECHO_C" >&6 -+if test "${bh_cv_c_signed+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+signed char x; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ bh_cv_c_signed=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+bh_cv_c_signed=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $bh_cv_c_signed" >&5 -+echo "${ECHO_T}$bh_cv_c_signed" >&6 -+ if test $bh_cv_c_signed = no; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define signed -+_ACEOF -+ -+ fi -+ - echo "$as_me:$LINENO: checking for inline" >&5 - echo $ECHO_N "checking for inline... $ECHO_C" >&6 - if test "${ac_cv_c_inline+set}" = set; then -@@ -3989,6 +4109,546 @@ _ACEOF - _ACEOF - - fi -+ -+ -+ echo "$as_me:$LINENO: checking for long long" >&5 -+echo $ECHO_N "checking for long long... $ECHO_C" >&6 -+if test "${ac_cv_type_long_long+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+long long ll = 1LL; int i = 63; -+int -+main () -+{ -+long long llmax = (long long) -1; -+ return ll << i | ll >> i | llmax / ll | llmax % ll; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_type_long_long=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_type_long_long=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 -+echo "${ECHO_T}$ac_cv_type_long_long" >&6 -+ if test $ac_cv_type_long_long = yes; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_LONG_LONG 1 -+_ACEOF -+ -+ fi -+ -+ -+ echo "$as_me:$LINENO: checking for long double" >&5 -+echo $ECHO_N "checking for long double... $ECHO_C" >&6 -+if test "${gt_cv_c_long_double+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test "$GCC" = yes; then -+ gt_cv_c_long_double=yes -+ else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ /* The Stardent Vistra knows sizeof(long double), but does not support it. */ -+ long double foo = 0.0; -+ /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ -+ int array [2*(sizeof(long double) >= sizeof(double)) - 1]; -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ gt_cv_c_long_double=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+gt_cv_c_long_double=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ fi -+fi -+echo "$as_me:$LINENO: result: $gt_cv_c_long_double" >&5 -+echo "${ECHO_T}$gt_cv_c_long_double" >&6 -+ if test $gt_cv_c_long_double = yes; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_LONG_DOUBLE 1 -+_ACEOF -+ -+ fi -+ -+ -+ echo "$as_me:$LINENO: checking for wchar_t" >&5 -+echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6 -+if test "${gt_cv_c_wchar_t+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ wchar_t foo = (wchar_t)'\0'; -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ gt_cv_c_wchar_t=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+gt_cv_c_wchar_t=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5 -+echo "${ECHO_T}$gt_cv_c_wchar_t" >&6 -+ if test $gt_cv_c_wchar_t = yes; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_WCHAR_T 1 -+_ACEOF -+ -+ fi -+ -+ -+ echo "$as_me:$LINENO: checking for wint_t" >&5 -+echo $ECHO_N "checking for wint_t... $ECHO_C" >&6 -+if test "${gt_cv_c_wint_t+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ wint_t foo = (wchar_t)'\0'; -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ gt_cv_c_wint_t=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+gt_cv_c_wint_t=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5 -+echo "${ECHO_T}$gt_cv_c_wint_t" >&6 -+ if test $gt_cv_c_wint_t = yes; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_WINT_T 1 -+_ACEOF -+ -+ fi -+ -+ -+ echo "$as_me:$LINENO: checking for inttypes.h" >&5 -+echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 -+if test "${gl_cv_header_inttypes_h+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+int -+main () -+{ -+uintmax_t i = (uintmax_t) -1; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ gl_cv_header_inttypes_h=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+gl_cv_header_inttypes_h=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $gl_cv_header_inttypes_h" >&5 -+echo "${ECHO_T}$gl_cv_header_inttypes_h" >&6 -+ if test $gl_cv_header_inttypes_h = yes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_INTTYPES_H_WITH_UINTMAX 1 -+_ACEOF -+ -+ fi -+ -+ -+ echo "$as_me:$LINENO: checking for stdint.h" >&5 -+echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6 -+if test "${gl_cv_header_stdint_h+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+int -+main () -+{ -+uintmax_t i = (uintmax_t) -1; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ gl_cv_header_stdint_h=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+gl_cv_header_stdint_h=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $gl_cv_header_stdint_h" >&5 -+echo "${ECHO_T}$gl_cv_header_stdint_h" >&6 -+ if test $gl_cv_header_stdint_h = yes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_STDINT_H_WITH_UINTMAX 1 -+_ACEOF -+ -+ fi -+ -+ -+ -+ -+ echo "$as_me:$LINENO: checking for intmax_t" >&5 -+echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6 -+if test "${gt_cv_c_intmax_t+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+#include -+#include -+#if HAVE_STDINT_H_WITH_UINTMAX -+#include -+#endif -+#if HAVE_INTTYPES_H_WITH_UINTMAX -+#include -+#endif -+ -+int -+main () -+{ -+intmax_t x = -1; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ gt_cv_c_intmax_t=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+gt_cv_c_intmax_t=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $gt_cv_c_intmax_t" >&5 -+echo "${ECHO_T}$gt_cv_c_intmax_t" >&6 -+ if test $gt_cv_c_intmax_t = yes; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_INTMAX_T 1 -+_ACEOF -+ -+ fi -+ -+ -+ -+ echo "$as_me:$LINENO: checking whether printf() supports POSIX/XSI format strings" >&5 -+echo $ECHO_N "checking whether printf() supports POSIX/XSI format strings... $ECHO_C" >&6 -+if test "${gt_cv_func_printf_posix+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ -+ if test "$cross_compiling" = yes; then -+ -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ -+ notposix -+#endif -+ -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "notposix" >/dev/null 2>&1; then -+ gt_cv_func_printf_posix="guessing no" -+else -+ gt_cv_func_printf_posix="guessing yes" -+fi -+rm -f conftest* -+ -+ -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+#include -+#include -+/* The string "%2$d %1$d", with dollar characters protected from the shell's -+ dollar expansion (possibly an autoconf bug). */ -+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; -+static char buf[100]; -+int main () -+{ -+ sprintf (buf, format, 33, 55); -+ return (strcmp (buf, "55 33") != 0); -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ gt_cv_func_printf_posix=yes -+else -+ echo "$as_me: program exited with status $ac_status" >&5 -+echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+gt_cv_func_printf_posix=no -+fi -+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+fi -+ -+fi -+echo "$as_me:$LINENO: result: $gt_cv_func_printf_posix" >&5 -+echo "${ECHO_T}$gt_cv_func_printf_posix" >&6 -+ case $gt_cv_func_printf_posix in -+ *yes) -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_POSIX_PRINTF 1 -+_ACEOF -+ -+ ;; -+ esac - - # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works - # for constant arguments. Useless! -@@ -4910,130 +5570,6 @@ _ACEOF - - - -- echo "$as_me:$LINENO: checking for inttypes.h" >&5 --echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 --if test "${jm_ac_cv_header_inttypes_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include --#include --int --main () --{ --uintmax_t i = (uintmax_t) -1; -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- jm_ac_cv_header_inttypes_h=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --jm_ac_cv_header_inttypes_h=no --fi --rm -f conftest.err conftest.$ac_objext conftest.$ac_ext --fi --echo "$as_me:$LINENO: result: $jm_ac_cv_header_inttypes_h" >&5 --echo "${ECHO_T}$jm_ac_cv_header_inttypes_h" >&6 -- if test $jm_ac_cv_header_inttypes_h = yes; then -- --cat >>confdefs.h <<_ACEOF --#define HAVE_INTTYPES_H_WITH_UINTMAX 1 --_ACEOF -- -- fi -- -- -- echo "$as_me:$LINENO: checking for stdint.h" >&5 --echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6 --if test "${jm_ac_cv_header_stdint_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include --#include --int --main () --{ --uintmax_t i = (uintmax_t) -1; -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- jm_ac_cv_header_stdint_h=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --jm_ac_cv_header_stdint_h=no --fi --rm -f conftest.err conftest.$ac_objext conftest.$ac_ext --fi --echo "$as_me:$LINENO: result: $jm_ac_cv_header_stdint_h" >&5 --echo "${ECHO_T}$jm_ac_cv_header_stdint_h" >&6 -- if test $jm_ac_cv_header_stdint_h = yes; then -- --cat >>confdefs.h <<_ACEOF --#define HAVE_STDINT_H_WITH_UINTMAX 1 --_ACEOF -- -- fi -- -- - echo "$as_me:$LINENO: checking for unsigned long long" >&5 - echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6 - if test "${ac_cv_type_unsigned_long_long+set}" = set; then -@@ -5099,7 +5635,7 @@ _ACEOF - - - -- if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then -+ if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then - - test $ac_cv_type_unsigned_long_long = yes \ - && ac_type='unsigned long long' \ -@@ -5250,6 +5786,1505 @@ _ACEOF - _ACEOF - - fi -+ -+ -+ -+for ac_header in stdint.h -+do -+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo "$as_me:$LINENO: checking for $ac_header" >&5 -+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+fi -+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+else -+ # Is the header compilable? -+echo "$as_me:$LINENO: checking $ac_header usability" >&5 -+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+#include <$ac_header> -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_header_compiler=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_header_compiler=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -+echo "${ECHO_T}$ac_header_compiler" >&6 -+ -+# Is the header present? -+echo "$as_me:$LINENO: checking $ac_header presence" >&5 -+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include <$ac_header> -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ ac_header_preproc=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_preproc=no -+fi -+rm -f conftest.err conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -+echo "${ECHO_T}$ac_header_preproc" >&6 -+ -+# So? What about this header? -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) -+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} -+ ( -+ cat <<\_ASBOX -+## ---------------------------------- ## -+## Report this to vandrove@vc.cvut.cz ## -+## ---------------------------------- ## -+_ASBOX -+ ) | -+ sed "s/^/$as_me: WARNING: /" >&2 -+ ;; -+esac -+echo "$as_me:$LINENO: checking for $ac_header" >&5 -+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ eval "$as_ac_Header=\$ac_header_preproc" -+fi -+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+ -+fi -+if test `eval echo '${'$as_ac_Header'}'` = yes; then -+ cat >>confdefs.h <<_ACEOF -+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+ -+done -+ -+ echo "$as_me:$LINENO: checking for SIZE_MAX" >&5 -+echo $ECHO_N "checking for SIZE_MAX... $ECHO_C" >&6 -+ result= -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+#include -+#if HAVE_STDINT_H -+#include -+#endif -+#ifdef SIZE_MAX -+Found it -+#endif -+ -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "Found it" >/dev/null 2>&1; then -+ result=yes -+fi -+rm -f conftest* -+ -+ if test -z "$result"; then -+ if test "$cross_compiling" = yes; then -+ # Depending upon the size, compute the lo and hi bounds. -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+static int test_array [1 - 2 * !((~(size_t)0 / 10) >= 0)]; -+test_array [0] = 0 -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_lo=0 ac_mid=0 -+ while :; do -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+static int test_array [1 - 2 * !((~(size_t)0 / 10) <= $ac_mid)]; -+test_array [0] = 0 -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_hi=$ac_mid; break -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_lo=`expr $ac_mid + 1` -+ if test $ac_lo -le $ac_mid; then -+ ac_lo= ac_hi= -+ break -+ fi -+ ac_mid=`expr 2 '*' $ac_mid + 1` -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ done -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+static int test_array [1 - 2 * !((~(size_t)0 / 10) < 0)]; -+test_array [0] = 0 -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_hi=-1 ac_mid=-1 -+ while :; do -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+static int test_array [1 - 2 * !((~(size_t)0 / 10) >= $ac_mid)]; -+test_array [0] = 0 -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_lo=$ac_mid; break -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_hi=`expr '(' $ac_mid ')' - 1` -+ if test $ac_mid -le $ac_hi; then -+ ac_lo= ac_hi= -+ break -+ fi -+ ac_mid=`expr 2 '*' $ac_mid` -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ done -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_lo= ac_hi= -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+# Binary search between lo and hi bounds. -+while test "x$ac_lo" != "x$ac_hi"; do -+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+static int test_array [1 - 2 * !((~(size_t)0 / 10) <= $ac_mid)]; -+test_array [0] = 0 -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_hi=$ac_mid -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_lo=`expr '(' $ac_mid ')' + 1` -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+done -+case $ac_lo in -+?*) res_hi=$ac_lo;; -+'') result=? ;; -+esac -+else -+ if test "$cross_compiling" = yes; then -+ { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 -+echo "$as_me: error: internal error: not reached in cross-compile" >&2;} -+ { (exit 1); exit 1; }; } -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+long longval () { return ~(size_t)0 / 10; } -+unsigned long ulongval () { return ~(size_t)0 / 10; } -+#include -+#include -+int -+main () -+{ -+ -+ FILE *f = fopen ("conftest.val", "w"); -+ if (! f) -+ exit (1); -+ if ((~(size_t)0 / 10) < 0) -+ { -+ long i = longval (); -+ if (i != (~(size_t)0 / 10)) -+ exit (1); -+ fprintf (f, "%ld\n", i); -+ } -+ else -+ { -+ unsigned long i = ulongval (); -+ if (i != (~(size_t)0 / 10)) -+ exit (1); -+ fprintf (f, "%lu\n", i); -+ } -+ exit (ferror (f) || fclose (f) != 0); -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ res_hi=`cat conftest.val` -+else -+ echo "$as_me: program exited with status $ac_status" >&5 -+echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+result=? -+fi -+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+fi -+fi -+rm -f conftest.val -+ if test "$cross_compiling" = yes; then -+ # Depending upon the size, compute the lo and hi bounds. -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+static int test_array [1 - 2 * !((~(size_t)0 % 10) >= 0)]; -+test_array [0] = 0 -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_lo=0 ac_mid=0 -+ while :; do -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+static int test_array [1 - 2 * !((~(size_t)0 % 10) <= $ac_mid)]; -+test_array [0] = 0 -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_hi=$ac_mid; break -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_lo=`expr $ac_mid + 1` -+ if test $ac_lo -le $ac_mid; then -+ ac_lo= ac_hi= -+ break -+ fi -+ ac_mid=`expr 2 '*' $ac_mid + 1` -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ done -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+static int test_array [1 - 2 * !((~(size_t)0 % 10) < 0)]; -+test_array [0] = 0 -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_hi=-1 ac_mid=-1 -+ while :; do -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+static int test_array [1 - 2 * !((~(size_t)0 % 10) >= $ac_mid)]; -+test_array [0] = 0 -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_lo=$ac_mid; break -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_hi=`expr '(' $ac_mid ')' - 1` -+ if test $ac_mid -le $ac_hi; then -+ ac_lo= ac_hi= -+ break -+ fi -+ ac_mid=`expr 2 '*' $ac_mid` -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ done -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_lo= ac_hi= -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+# Binary search between lo and hi bounds. -+while test "x$ac_lo" != "x$ac_hi"; do -+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+static int test_array [1 - 2 * !((~(size_t)0 % 10) <= $ac_mid)]; -+test_array [0] = 0 -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_hi=$ac_mid -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_lo=`expr '(' $ac_mid ')' + 1` -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+done -+case $ac_lo in -+?*) res_lo=$ac_lo;; -+'') result=? ;; -+esac -+else -+ if test "$cross_compiling" = yes; then -+ { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 -+echo "$as_me: error: internal error: not reached in cross-compile" >&2;} -+ { (exit 1); exit 1; }; } -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+long longval () { return ~(size_t)0 % 10; } -+unsigned long ulongval () { return ~(size_t)0 % 10; } -+#include -+#include -+int -+main () -+{ -+ -+ FILE *f = fopen ("conftest.val", "w"); -+ if (! f) -+ exit (1); -+ if ((~(size_t)0 % 10) < 0) -+ { -+ long i = longval (); -+ if (i != (~(size_t)0 % 10)) -+ exit (1); -+ fprintf (f, "%ld\n", i); -+ } -+ else -+ { -+ unsigned long i = ulongval (); -+ if (i != (~(size_t)0 % 10)) -+ exit (1); -+ fprintf (f, "%lu\n", i); -+ } -+ exit (ferror (f) || fclose (f) != 0); -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ res_lo=`cat conftest.val` -+else -+ echo "$as_me: program exited with status $ac_status" >&5 -+echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+result=? -+fi -+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+fi -+fi -+rm -f conftest.val -+ if test "$cross_compiling" = yes; then -+ # Depending upon the size, compute the lo and hi bounds. -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= 0)]; -+test_array [0] = 0 -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_lo=0 ac_mid=0 -+ while :; do -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; -+test_array [0] = 0 -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_hi=$ac_mid; break -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_lo=`expr $ac_mid + 1` -+ if test $ac_lo -le $ac_mid; then -+ ac_lo= ac_hi= -+ break -+ fi -+ ac_mid=`expr 2 '*' $ac_mid + 1` -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ done -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) < 0)]; -+test_array [0] = 0 -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_hi=-1 ac_mid=-1 -+ while :; do -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= $ac_mid)]; -+test_array [0] = 0 -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_lo=$ac_mid; break -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_hi=`expr '(' $ac_mid ')' - 1` -+ if test $ac_mid -le $ac_hi; then -+ ac_lo= ac_hi= -+ break -+ fi -+ ac_mid=`expr 2 '*' $ac_mid` -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ done -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_lo= ac_hi= -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+# Binary search between lo and hi bounds. -+while test "x$ac_lo" != "x$ac_hi"; do -+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; -+test_array [0] = 0 -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_hi=$ac_mid -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_lo=`expr '(' $ac_mid ')' + 1` -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+done -+case $ac_lo in -+?*) fits_in_uint=$ac_lo;; -+'') result=? ;; -+esac -+else -+ if test "$cross_compiling" = yes; then -+ { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 -+echo "$as_me: error: internal error: not reached in cross-compile" >&2;} -+ { (exit 1); exit 1; }; } -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+long longval () { return sizeof (size_t) <= sizeof (unsigned int); } -+unsigned long ulongval () { return sizeof (size_t) <= sizeof (unsigned int); } -+#include -+#include -+int -+main () -+{ -+ -+ FILE *f = fopen ("conftest.val", "w"); -+ if (! f) -+ exit (1); -+ if ((sizeof (size_t) <= sizeof (unsigned int)) < 0) -+ { -+ long i = longval (); -+ if (i != (sizeof (size_t) <= sizeof (unsigned int))) -+ exit (1); -+ fprintf (f, "%ld\n", i); -+ } -+ else -+ { -+ unsigned long i = ulongval (); -+ if (i != (sizeof (size_t) <= sizeof (unsigned int))) -+ exit (1); -+ fprintf (f, "%lu\n", i); -+ } -+ exit (ferror (f) || fclose (f) != 0); -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ fits_in_uint=`cat conftest.val` -+else -+ echo "$as_me: program exited with status $ac_status" >&5 -+echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+result=? -+fi -+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+fi -+fi -+rm -f conftest.val -+ if test "$fits_in_uint" = 1; then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ extern size_t foo; -+ extern unsigned long foo; -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ fits_in_uint=0 -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ fi -+ if test -z "$result"; then -+ if test "$fits_in_uint" = 1; then -+ result="$res_hi$res_lo"U -+ else -+ result="$res_hi$res_lo"UL -+ fi -+ else -+ result='~(size_t)0' -+ fi -+ fi -+ echo "$as_me:$LINENO: result: $result" >&5 -+echo "${ECHO_T}$result" >&6 -+ if test "$result" != yes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define SIZE_MAX $result -+_ACEOF -+ -+ fi -+ -+ -+ -+ -+ -+for ac_header in stdint.h -+do -+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo "$as_me:$LINENO: checking for $ac_header" >&5 -+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+fi -+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+else -+ # Is the header compilable? -+echo "$as_me:$LINENO: checking $ac_header usability" >&5 -+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+#include <$ac_header> -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_header_compiler=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_header_compiler=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -+echo "${ECHO_T}$ac_header_compiler" >&6 -+ -+# Is the header present? -+echo "$as_me:$LINENO: checking $ac_header presence" >&5 -+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include <$ac_header> -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ ac_header_preproc=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_preproc=no -+fi -+rm -f conftest.err conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -+echo "${ECHO_T}$ac_header_preproc" >&6 -+ -+# So? What about this header? -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) -+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} -+ ( -+ cat <<\_ASBOX -+## ---------------------------------- ## -+## Report this to vandrove@vc.cvut.cz ## -+## ---------------------------------- ## -+_ASBOX -+ ) | -+ sed "s/^/$as_me: WARNING: /" >&2 -+ ;; -+esac -+echo "$as_me:$LINENO: checking for $ac_header" >&5 -+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ eval "$as_ac_Header=\$ac_header_preproc" -+fi -+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+ -+fi -+if test `eval echo '${'$as_ac_Header'}'` = yes; then -+ cat >>confdefs.h <<_ACEOF -+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+ -+done -+ -+ -+ -+ echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5 -+echo $ECHO_N "checking for CFPreferencesCopyAppValue... $ECHO_C" >&6 -+if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ gt_save_CPPFLAGS="$CPPFLAGS" -+ CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" -+ gt_save_LIBS="$LIBS" -+ LIBS="$LIBS -framework CoreFoundation" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+CFPreferencesCopyAppValue(NULL, NULL) -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ gt_cv_func_CFPreferencesCopyAppValue=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+gt_cv_func_CFPreferencesCopyAppValue=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+ CPPFLAGS="$gt_save_CPPFLAGS" -+ LIBS="$gt_save_LIBS" -+fi -+echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 -+echo "${ECHO_T}$gt_cv_func_CFPreferencesCopyAppValue" >&6 -+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_CFPREFERENCESCOPYAPPVALUE 1 -+_ACEOF -+ -+ fi -+ echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5 -+echo $ECHO_N "checking for CFLocaleCopyCurrent... $ECHO_C" >&6 -+if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ gt_save_CPPFLAGS="$CPPFLAGS" -+ CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" -+ gt_save_LIBS="$LIBS" -+ LIBS="$LIBS -framework CoreFoundation" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+CFLocaleCopyCurrent(); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ gt_cv_func_CFLocaleCopyCurrent=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+gt_cv_func_CFLocaleCopyCurrent=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+ CPPFLAGS="$gt_save_CPPFLAGS" -+ LIBS="$gt_save_LIBS" -+fi -+echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 -+echo "${ECHO_T}$gt_cv_func_CFLocaleCopyCurrent" >&6 -+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_CFLOCALECOPYCURRENT 1 -+_ACEOF -+ -+ fi -+ INTL_MACOSX_LIBS= -+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then -+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" -+ fi -+ - - - if test "X$prefix" = "XNONE"; then -@@ -5380,6 +7415,7 @@ echo "$as_me:$LINENO: result: $acl_cv_pr - echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 - echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 - with_gnu_ld=$acl_cv_prog_gnu_ld -+ - - - -@@ -5628,7 +7664,7 @@ fi; - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in -- linux*) haveit=yes;; -+ linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi -@@ -5672,7 +7708,7 @@ fi; - if test "X$additional_libdir" = "X/usr/local/lib"; then - if test -n "$GCC"; then - case $host_os in -- linux*) haveit=yes;; -+ linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi -@@ -5802,6 +7838,76 @@ fi; - - - -+ echo "$as_me:$LINENO: checking for ptrdiff_t" >&5 -+echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6 -+if test "${ac_cv_type_ptrdiff_t+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+int -+main () -+{ -+if ((ptrdiff_t *) 0) -+ return 0; -+if (sizeof (ptrdiff_t)) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_type_ptrdiff_t=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_type_ptrdiff_t=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5 -+echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6 -+if test $ac_cv_type_ptrdiff_t = yes; then -+ : -+else -+ -+cat >>confdefs.h <<\_ACEOF -+#define ptrdiff_t long -+_ACEOF -+ -+ -+fi -+ -+ -+ -+ -+ - - - -@@ -5978,9 +8084,12 @@ done - - - --for ac_func in feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ --geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ --strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next -+ -+ -+for ac_func in asprintf fwprintf getcwd getegid geteuid getgid getuid \ -+mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \ -+strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \ -+__fsetlocking - do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 -@@ -6082,6 +8191,372 @@ done - - - -+ echo "$as_me:$LINENO: checking whether _snprintf is declared" >&5 -+echo $ECHO_N "checking whether _snprintf is declared... $ECHO_C" >&6 -+if test "${ac_cv_have_decl__snprintf+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+ -+#ifndef _snprintf -+ char *p = (char *) _snprintf; -+#endif -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_have_decl__snprintf=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_have_decl__snprintf=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $ac_cv_have_decl__snprintf" >&5 -+echo "${ECHO_T}$ac_cv_have_decl__snprintf" >&6 -+ if test $ac_cv_have_decl__snprintf = yes; then -+ gt_value=1 -+ else -+ gt_value=0 -+ fi -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_DECL__SNPRINTF $gt_value -+_ACEOF -+ -+ -+ -+ echo "$as_me:$LINENO: checking whether _snwprintf is declared" >&5 -+echo $ECHO_N "checking whether _snwprintf is declared... $ECHO_C" >&6 -+if test "${ac_cv_have_decl__snwprintf+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+ -+#ifndef _snwprintf -+ char *p = (char *) _snwprintf; -+#endif -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_have_decl__snwprintf=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_have_decl__snwprintf=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $ac_cv_have_decl__snwprintf" >&5 -+echo "${ECHO_T}$ac_cv_have_decl__snwprintf" >&6 -+ if test $ac_cv_have_decl__snwprintf = yes; then -+ gt_value=1 -+ else -+ gt_value=0 -+ fi -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_DECL__SNWPRINTF $gt_value -+_ACEOF -+ -+ -+ -+ -+ echo "$as_me:$LINENO: checking whether feof_unlocked is declared" >&5 -+echo $ECHO_N "checking whether feof_unlocked is declared... $ECHO_C" >&6 -+if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+ -+#ifndef feof_unlocked -+ char *p = (char *) feof_unlocked; -+#endif -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_have_decl_feof_unlocked=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_have_decl_feof_unlocked=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5 -+echo "${ECHO_T}$ac_cv_have_decl_feof_unlocked" >&6 -+ if test $ac_cv_have_decl_feof_unlocked = yes; then -+ gt_value=1 -+ else -+ gt_value=0 -+ fi -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_DECL_FEOF_UNLOCKED $gt_value -+_ACEOF -+ -+ -+ -+ echo "$as_me:$LINENO: checking whether fgets_unlocked is declared" >&5 -+echo $ECHO_N "checking whether fgets_unlocked is declared... $ECHO_C" >&6 -+if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+ -+#ifndef fgets_unlocked -+ char *p = (char *) fgets_unlocked; -+#endif -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_have_decl_fgets_unlocked=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_have_decl_fgets_unlocked=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5 -+echo "${ECHO_T}$ac_cv_have_decl_fgets_unlocked" >&6 -+ if test $ac_cv_have_decl_fgets_unlocked = yes; then -+ gt_value=1 -+ else -+ gt_value=0 -+ fi -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_DECL_FGETS_UNLOCKED $gt_value -+_ACEOF -+ -+ -+ -+ echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 -+echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6 -+if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+ -+#ifndef getc_unlocked -+ char *p = (char *) getc_unlocked; -+#endif -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_have_decl_getc_unlocked=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_have_decl_getc_unlocked=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 -+echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6 -+ if test $ac_cv_have_decl_getc_unlocked = yes; then -+ gt_value=1 -+ else -+ gt_value=0 -+ fi -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_DECL_GETC_UNLOCKED $gt_value -+_ACEOF -+ -+ -+ -+ case $gt_cv_func_printf_posix in -+ *yes) HAVE_POSIX_PRINTF=1 ;; -+ *) HAVE_POSIX_PRINTF=0 ;; -+ esac -+ -+ if test "$ac_cv_func_asprintf" = yes; then -+ HAVE_ASPRINTF=1 -+ else -+ HAVE_ASPRINTF=0 -+ fi -+ -+ if test "$ac_cv_func_snprintf" = yes; then -+ HAVE_SNPRINTF=1 -+ else -+ HAVE_SNPRINTF=0 -+ fi -+ -+ if test "$ac_cv_func_wprintf" = yes; then -+ HAVE_WPRINTF=1 -+ else -+ HAVE_WPRINTF=0 -+ fi -+ -+ -+ - - - -@@ -6388,7 +8863,7 @@ _ACEOF - - echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 - echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 --if test "${am_cv_val_LC_MESSAGES+set}" = set; then -+if test "${gt_cv_val_LC_MESSAGES+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF -@@ -6427,19 +8902,19 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- am_cv_val_LC_MESSAGES=yes -+ gt_cv_val_LC_MESSAGES=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --am_cv_val_LC_MESSAGES=no -+gt_cv_val_LC_MESSAGES=no - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 --echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 -- if test $am_cv_val_LC_MESSAGES = yes; then -+echo "$as_me:$LINENO: result: $gt_cv_val_LC_MESSAGES" >&5 -+echo "${ECHO_T}$gt_cv_val_LC_MESSAGES" >&6 -+ if test $gt_cv_val_LC_MESSAGES = yes; then - - cat >>confdefs.h <<\_ACEOF - #define HAVE_LC_MESSAGES 1 -@@ -6447,6 +8922,10 @@ _ACEOF - - fi - -+ fi -+ -+ if test -n "$INTL_MACOSX_LIBS"; then -+ CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" - fi - - for ac_prog in bison -@@ -6522,6 +9001,147 @@ echo "${ECHO_T}$ac_prog_version" >&6 - - - -+ -+ echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5 -+echo $ECHO_N "checking for CFPreferencesCopyAppValue... $ECHO_C" >&6 -+if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ gt_save_CPPFLAGS="$CPPFLAGS" -+ CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" -+ gt_save_LIBS="$LIBS" -+ LIBS="$LIBS -framework CoreFoundation" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+CFPreferencesCopyAppValue(NULL, NULL) -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ gt_cv_func_CFPreferencesCopyAppValue=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+gt_cv_func_CFPreferencesCopyAppValue=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+ CPPFLAGS="$gt_save_CPPFLAGS" -+ LIBS="$gt_save_LIBS" -+fi -+echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 -+echo "${ECHO_T}$gt_cv_func_CFPreferencesCopyAppValue" >&6 -+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_CFPREFERENCESCOPYAPPVALUE 1 -+_ACEOF -+ -+ fi -+ echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5 -+echo $ECHO_N "checking for CFLocaleCopyCurrent... $ECHO_C" >&6 -+if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ gt_save_CPPFLAGS="$CPPFLAGS" -+ CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" -+ gt_save_LIBS="$LIBS" -+ LIBS="$LIBS -framework CoreFoundation" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+CFLocaleCopyCurrent(); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ gt_cv_func_CFLocaleCopyCurrent=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+gt_cv_func_CFLocaleCopyCurrent=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+ CPPFLAGS="$gt_save_CPPFLAGS" -+ LIBS="$gt_save_LIBS" -+fi -+echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 -+echo "${ECHO_T}$gt_cv_func_CFLocaleCopyCurrent" >&6 -+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_CFLOCALECOPYCURRENT 1 -+_ACEOF -+ -+ fi -+ INTL_MACOSX_LIBS= -+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then -+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" -+ fi -+ -+ -+ -+ - echo "$as_me:$LINENO: checking whether NLS is requested" >&5 - echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 - # Check whether --enable-nls or --disable-nls was given. -@@ -6533,6 +9153,7 @@ fi; - fi; - echo "$as_me:$LINENO: result: $USE_NLS" >&5 - echo "${ECHO_T}$USE_NLS" >&6 -+ - - - -@@ -6585,7 +9206,7 @@ main () - main () - { - bindtextdomain ("", ""); --return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings -+return * gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings - ; - return 0; - } -@@ -6837,7 +9458,7 @@ fi; - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in -- linux*) haveit=yes;; -+ linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi -@@ -6881,7 +9502,7 @@ fi; - if test "X$additional_libdir" = "X/usr/local/lib"; then - if test -n "$GCC"; then - case $host_os in -- linux*) haveit=yes;; -+ linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi -@@ -7025,12 +9646,12 @@ extern - #ifdef __cplusplus - "C" - #endif --const char *_nl_expand_alias (); -+const char *_nl_expand_alias (const char *); - int - main () - { - bindtextdomain ("", ""); --return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0) -+return * gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias ("") - ; - return 0; - } -@@ -7079,12 +9700,12 @@ extern - #ifdef __cplusplus - "C" - #endif --const char *_nl_expand_alias (); -+const char *_nl_expand_alias (const char *); - int - main () - { - bindtextdomain ("", ""); --return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0) -+return * gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias ("") - ; - return 0; - } -@@ -7131,7 +9752,8 @@ echo "${ECHO_T}$gt_cv_func_gnugettext1_l - - if test "$gt_cv_func_gnugettext1_libc" = "yes" \ - || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \ -- && test "$PACKAGE" != gettext; }; then -+ && test "$PACKAGE" != gettext-runtime \ -+ && test "$PACKAGE" != gettext-tools; }; then - gt_use_preinstalled_gnugettext=yes - else - LIBINTL= -@@ -7146,20 +9768,28 @@ echo "${ECHO_T}$gt_cv_func_gnugettext1_l - fi - - if test "$nls_cv_use_gnu_gettext" = "yes"; then -- INTLOBJS="\$(GETTOBJS)" -- BUILD_INCLUDED_LIBINTL=yes -+ BUILD_INCLUDED_LIBINTL=yes - USE_INCLUDED_LIBINTL=yes - LIBINTL="\${top_builddir}/intl/libintl.a $LIBICONV" - LTLIBINTL="\${top_builddir}/intl/libintl.a $LTLIBICONV" - LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` - fi - -+ CATOBJEXT= - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - CATOBJEXT=.gmo - fi - - -+ if test -n "$INTL_MACOSX_LIBS"; then -+ if test "$gt_use_preinstalled_gnugettext" = "yes" \ -+ || test "$nls_cv_use_gnu_gettext" = "yes"; then -+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" -+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" -+ fi -+ fi -+ - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - -@@ -7170,6 +9800,26 @@ _ACEOF - else - USE_NLS=no - fi -+ fi -+ -+ echo "$as_me:$LINENO: checking whether to use NLS" >&5 -+echo $ECHO_N "checking whether to use NLS... $ECHO_C" >&6 -+ echo "$as_me:$LINENO: result: $USE_NLS" >&5 -+echo "${ECHO_T}$USE_NLS" >&6 -+ if test "$USE_NLS" = "yes"; then -+ echo "$as_me:$LINENO: checking where the gettext function comes from" >&5 -+echo $ECHO_N "checking where the gettext function comes from... $ECHO_C" >&6 -+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then -+ if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then -+ gt_source="external libintl" -+ else -+ gt_source="libc" -+ fi -+ else -+ gt_source="included intl directory" -+ fi -+ echo "$as_me:$LINENO: result: $gt_source" >&5 -+echo "${ECHO_T}$gt_source" >&6 - fi - - if test "$USE_NLS" = "yes"; then -@@ -7221,7 +9871,7 @@ _ACEOF - fi - - -- if test "$PACKAGE" = gettext; then -+ if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then - BUILD_INCLUDED_LIBINTL=yes - fi - -@@ -7229,7 +9879,6 @@ _ACEOF - - - -- - nls_cv_header_intl= - nls_cv_header_libgt= - -@@ -7240,6 +9889,12 @@ _ACEOF - - - GENCAT=gencat -+ -+ -+ INTLOBJS= -+ if test "$USE_INCLUDED_LIBINTL" = yes; then -+ INTLOBJS="\$(GETTOBJS)" -+ fi - - - INTL_LIBTOOL_SUFFIX_PREFIX= -@@ -9317,6 +11972,138 @@ else - socklen_t="typedef $ncp_cv_socklen_t socklen_t;" - fi - -+ -+echo "$as_me:$LINENO: checking whether SO_NOSIGPIPE exists" >&5 -+echo $ECHO_N "checking whether SO_NOSIGPIPE exists... $ECHO_C" >&6 -+if test "${ncp_cv_so_nosigpipe+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+int -+main () -+{ -+int s; -+ int o = 0; -+ s = socket(0, 0, 0); -+ setsockopt(s, SOL_SOCKET, SO_NOSIGPIPE, &o, sizeof(o)) -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ncp_cv_so_nosigpipe="yes" -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ncp_cv_so_nosigpipe="no" -+ -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+fi -+echo "$as_me:$LINENO: result: $ncp_cv_so_nosigpipe" >&5 -+echo "${ECHO_T}$ncp_cv_so_nosigpipe" >&6 -+if test "$ncp_cv_so_nosigpipe" = "yes" -+then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_SO_NOSIGPIPE 1 -+_ACEOF -+ -+fi -+ -+echo "$as_me:$LINENO: checking whether MSG_NOSIGNAL exists" >&5 -+echo $ECHO_N "checking whether MSG_NOSIGNAL exists... $ECHO_C" >&6 -+if test "${ncp_cv_msg_nosignal+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+struct msghdr msg; -+int -+main () -+{ -+sendmsg(0, &msg, MSG_NOSIGNAL) -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ncp_cv_msg_nosignal="yes" -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ncp_cv_msg_nosignal="no" -+ -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+fi -+echo "$as_me:$LINENO: result: $ncp_cv_msg_nosignal" >&5 -+echo "${ECHO_T}$ncp_cv_msg_nosignal" >&6 -+if test "$ncp_cv_msg_nosignal" = "yes" -+then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_MSG_NOSIGNAL 1 -+_ACEOF -+ -+fi - - echo "$as_me:$LINENO: checking for wchar_t" >&5 - echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6 -@@ -11940,9 +14727,9 @@ cat >>$CONFIG_STATUS <<_ACEOF - # - - # Capture the value of obsolete ALL_LINGUAS because we need it to compute -- # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it -+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it - # from automake. -- eval 'ALL_LINGUAS''="$ALL_LINGUAS"' -+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' - # Capture the value of LINGUAS because we need it to compute CATALOGS. - LINGUAS="${LINGUAS-%UNSET%}" - -@@ -11983,7 +14770,7 @@ do - "include/ncp/kernel/ipx.h.tmp" ) CONFIG_FILES="$CONFIG_FILES include/ncp/kernel/ipx.h.tmp:include/ncp/kernel/ipx.h.in" ;; - "include/ncp/kernel/route.h.tmp" ) CONFIG_FILES="$CONFIG_FILES include/ncp/kernel/route.h.tmp:include/ncp/kernel/route.h.in" ;; - "include/ncp/kernel/types.h.tmp" ) CONFIG_FILES="$CONFIG_FILES include/ncp/kernel/types.h.tmp:include/ncp/kernel/types.h.in" ;; -- "gettext" ) CONFIG_COMMANDS="$CONFIG_COMMANDS gettext" ;; -+ "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; - "include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 - echo "$as_me: error: invalid argument: $ac_config_target" >&2;} -@@ -12094,27 +14881,33 @@ s,@PACKAGE@,$PACKAGE,;t t - s,@PACKAGE@,$PACKAGE,;t t - s,@VERSION@,$VERSION,;t t - s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t -+s,@USE_NLS@,$USE_NLS,;t t - s,@MSGFMT@,$MSGFMT,;t t - s,@GMSGFMT@,$GMSGFMT,;t t - s,@XGETTEXT@,$XGETTEXT,;t t - s,@MSGMERGE@,$MSGMERGE,;t t -+s,@CPP@,$CPP,;t t -+s,@EGREP@,$EGREP,;t t -+s,@GLIBC2@,$GLIBC2,;t t - s,@RANLIB@,$RANLIB,;t t - s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t --s,@CPP@,$CPP,;t t --s,@EGREP@,$EGREP,;t t - s,@ALLOCA@,$ALLOCA,;t t - s,@GLIBC21@,$GLIBC21,;t t -+s,@INTL_MACOSX_LIBS@,$INTL_MACOSX_LIBS,;t t -+s,@HAVE_POSIX_PRINTF@,$HAVE_POSIX_PRINTF,;t t -+s,@HAVE_ASPRINTF@,$HAVE_ASPRINTF,;t t -+s,@HAVE_SNPRINTF@,$HAVE_SNPRINTF,;t t -+s,@HAVE_WPRINTF@,$HAVE_WPRINTF,;t t - s,@LIBICONV@,$LIBICONV,;t t - s,@LTLIBICONV@,$LTLIBICONV,;t t - s,@INTLBISON@,$INTLBISON,;t t --s,@USE_NLS@,$USE_NLS,;t t - s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t - s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t - s,@CATOBJEXT@,$CATOBJEXT,;t t --s,@INTLOBJS@,$INTLOBJS,;t t - s,@DATADIRNAME@,$DATADIRNAME,;t t - s,@INSTOBJEXT@,$INSTOBJEXT,;t t - s,@GENCAT@,$GENCAT,;t t -+s,@INTLOBJS@,$INTLOBJS,;t t - s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t - s,@INTLLIBS@,$INTLLIBS,;t t - s,@LIBINTL@,$LIBINTL,;t t -@@ -12823,7 +15616,7 @@ esac - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 - echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in -- gettext ) -+ default-1 ) - for ac_file in $CONFIG_FILES; do - # Support "outfile[:infile[:infile...]]" - case "$ac_file" in -@@ -12843,35 +15636,51 @@ echo "$as_me: executing $ac_dest command - /*) top_srcdir="$ac_given_srcdir" ;; - *) top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac -+ # Treat a directory as a PO directory if and only if it has a -+ # POTFILES.in file. This allows packages to have multiple PO -+ # directories under different names or in different locations. - if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then - rm -f "$ac_dir/POTFILES" - test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" - cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" -- # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend -+ POMAKEFILEDEPS="POTFILES.in" -+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend - # on $ac_dir but don't depend on user-specified configuration - # parameters. - if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then - # The LINGUAS file contains the set of available languages. -- if test -n "$ALL_LINGUAS"; then -+ if test -n "$OBSOLETE_ALL_LINGUAS"; then - test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" - fi -- ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` -+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assigment from automake. - eval 'ALL_LINGUAS''=$ALL_LINGUAS_' -+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" -+ else -+ # The set of available languages was given in configure.in. -+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' - fi -+ # Compute POFILES -+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) -+ # Compute UPDATEPOFILES -+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) -+ # Compute DUMMYPOFILES -+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) -+ # Compute GMOFILES -+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) - case "$ac_given_srcdir" in - .) srcdirpre= ;; - *) srcdirpre='$(srcdir)/' ;; - esac - POFILES= -- GMOFILES= - UPDATEPOFILES= - DUMMYPOFILES= -+ GMOFILES= - for lang in $ALL_LINGUAS; do - POFILES="$POFILES $srcdirpre$lang.po" -- GMOFILES="$GMOFILES $srcdirpre$lang.gmo" - UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" - DUMMYPOFILES="$DUMMYPOFILES $lang.nop" -+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo" - done - # CATALOGS depends on both $ac_dir and the user's LINGUAS - # environment variable. -@@ -12906,7 +15715,7 @@ echo "$as_me: executing $ac_dest command - done - fi - test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" -- sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" -+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" - for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do - if test -f "$f"; then - case "$f" in -diff -r 48879aeab0b6 -r 2ce6ef376b40 contrib/php/libtool ---- a/contrib/php/libtool Sat May 28 15:42:43 2005 +0000 -+++ b/contrib/php/libtool Sat May 28 15:45:44 2005 +0000 -@@ -44,7 +44,7 @@ available_tags=" CXX" - - # ### BEGIN LIBTOOL CONFIG - --# Libtool was configured on host vana: -+# Libtool was configured on host evon: - - # Shell to use when invoking shell scripts. - SHELL="/bin/sh" -@@ -316,12 +316,11 @@ link_all_deplibs=unknown - link_all_deplibs=unknown - - # Compile-time system search path for libraries --sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux/3.3.5/ /usr/lib/gcc/i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../../i486-linux/lib/i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../../i486-linux/lib/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../ /lib/i486-linux/3.3.5/ /lib/ /usr/lib/i486-linux/3.3.5/ /usr/lib/" -+sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux/3.3.6/ /usr/lib/gcc/i486-linux/3.3.6/ /usr/lib/gcc-lib/i486-linux/3.3.6/../../../../i486-linux/lib/i486-linux/3.3.6/ /usr/lib/gcc-lib/i486-linux/3.3.6/../../../../i486-linux/lib/ /usr/lib/gcc-lib/i486-linux/3.3.6/../../../i486-linux/3.3.6/ /usr/lib/gcc-lib/i486-linux/3.3.6/../../../ /lib/i486-linux/3.3.6/ /lib/ /usr/lib/i486-linux/3.3.6/ /usr/lib/" - - # Run-time system search path for libraries --sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib/Xaw3d --/usr/X11R6/lib --/usr/local/lib -+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib -+ - /usr/lib/libc5-compat - /lib/libc5-compat - /usr/i486-linuxlibc1/lib -@@ -6709,7 +6708,7 @@ build_old_libs=`case $build_libtool_libs - # End: - # ### BEGIN LIBTOOL TAG CONFIG: CXX - --# Libtool was configured on host vana: -+# Libtool was configured on host evon: - - # Shell to use when invoking shell scripts. - SHELL="/bin/sh" -@@ -6882,11 +6881,11 @@ striplib="strip --strip-unneeded" - - # Dependencies to place before the objects being linked to create a - # shared library. --predep_objects="/usr/lib/gcc-lib/i486-linux/3.3.5/../../../crti.o /usr/lib/gcc-lib/i486-linux/3.3.5/crtbeginS.o" -+predep_objects="/usr/lib/gcc-lib/i486-linux/3.3.6/../../../crti.o /usr/lib/gcc-lib/i486-linux/3.3.6/crtbeginS.o" - - # Dependencies to place after the objects being linked to create a - # shared library. --postdep_objects="/usr/lib/gcc-lib/i486-linux/3.3.5/crtendS.o /usr/lib/gcc-lib/i486-linux/3.3.5/../../../crtn.o" -+postdep_objects="/usr/lib/gcc-lib/i486-linux/3.3.6/crtendS.o /usr/lib/gcc-lib/i486-linux/3.3.6/../../../crtn.o" - - # Dependencies to place before the objects being linked to create a - # shared library. -@@ -6898,7 +6897,7 @@ postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc - - # The library search path used internally by the compiler when linking - # a shared library. --compiler_lib_search_path="-L/usr/lib/gcc-lib/i486-linux/3.3.5 -L/usr/lib/gcc-lib/i486-linux/3.3.5/../../.." -+compiler_lib_search_path="-L/usr/lib/gcc-lib/i486-linux/3.3.6 -L/usr/lib/gcc-lib/i486-linux/3.3.6/../../.." - - # Method to check whether dependent libraries are shared objects. - deplibs_check_method="pass_all" -@@ -6978,12 +6977,11 @@ link_all_deplibs=unknown - link_all_deplibs=unknown - - # Compile-time system search path for libraries --sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux/3.3.5/ /usr/lib/gcc/i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../../i486-linux/lib/i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../../i486-linux/lib/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../ /lib/i486-linux/3.3.5/ /lib/ /usr/lib/i486-linux/3.3.5/ /usr/lib/" -+sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux/3.3.6/ /usr/lib/gcc/i486-linux/3.3.6/ /usr/lib/gcc-lib/i486-linux/3.3.6/../../../../i486-linux/lib/i486-linux/3.3.6/ /usr/lib/gcc-lib/i486-linux/3.3.6/../../../../i486-linux/lib/ /usr/lib/gcc-lib/i486-linux/3.3.6/../../../i486-linux/3.3.6/ /usr/lib/gcc-lib/i486-linux/3.3.6/../../../ /lib/i486-linux/3.3.6/ /lib/ /usr/lib/i486-linux/3.3.6/ /usr/lib/" - - # Run-time system search path for libraries --sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib/Xaw3d --/usr/X11R6/lib --/usr/local/lib -+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib -+ - /usr/lib/libc5-compat - /lib/libc5-compat - /usr/i486-linuxlibc1/lib -diff -r 48879aeab0b6 -r 2ce6ef376b40 include/config.h.in ---- a/include/config.h.in Sat May 28 15:42:43 2005 +0000 -+++ b/include/config.h.in Sat May 28 15:45:44 2005 +0000 -@@ -35,22 +35,47 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_ARGZ_H - -+/* Define to 1 if you have the `asprintf' function. */ -+#undef HAVE_ASPRINTF -+ -+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the -+ CoreFoundation framework. */ -+#undef HAVE_CFLOCALECOPYCURRENT -+ -+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in -+ the CoreFoundation framework. */ -+#undef HAVE_CFPREFERENCESCOPYAPPVALUE -+ - /* Define if the GNU dcgettext() function is already present or preinstalled. - */ - #undef HAVE_DCGETTEXT - --/* Define to 1 if you have the `feof_unlocked' function. */ --#undef HAVE_FEOF_UNLOCKED -- --/* Define to 1 if you have the `fgets_unlocked' function. */ --#undef HAVE_FGETS_UNLOCKED -+/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you -+ don't. */ -+#undef HAVE_DECL_FEOF_UNLOCKED -+ -+/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if -+ you don't. */ -+#undef HAVE_DECL_FGETS_UNLOCKED -+ -+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you -+ don't. */ -+#undef HAVE_DECL_GETC_UNLOCKED -+ -+/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you -+ don't. */ -+#undef HAVE_DECL__SNPRINTF -+ -+/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you -+ don't. */ -+#undef HAVE_DECL__SNWPRINTF -+ -+/* Define to 1 if you have the `fwprintf' function. */ -+#undef HAVE_FWPRINTF - - /* Define to 1 if you have the `getcwd' function. */ - #undef HAVE_GETCWD - --/* Define to 1 if you have the `getc_unlocked' function. */ --#undef HAVE_GETC_UNLOCKED -- - /* Define to 1 if you have the `getegid' function. */ - #undef HAVE_GETEGID - -@@ -74,6 +99,9 @@ - - /* Define to 1 if you have the header file. */ - #undef HAVE_ICONV_H -+ -+/* Define if you have the 'intmax_t' type in or . */ -+#undef HAVE_INTMAX_T - - /* Define if exists and doesn't clash with . */ - #undef HAVE_INTTYPES_H -@@ -97,6 +125,12 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_LOCALE_H - -+/* Define if you have the 'long double' type. */ -+#undef HAVE_LONG_DOUBLE -+ -+/* Define if you have the 'long long' type. */ -+#undef HAVE_LONG_LONG -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_MALLOC_H - -@@ -109,6 +143,9 @@ - /* Define to 1 if you have a working `mmap' system call. */ - #undef HAVE_MMAP - -+/* Define when MSG_NOSIGNAL exists */ -+#undef HAVE_MSG_NOSIGNAL -+ - /* Define to 1 if you have the `munmap' function. */ - #undef HAVE_MUNMAP - -@@ -118,6 +155,9 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_NL_TYPES_H - -+/* Define if your printf() function supports format strings with positions. */ -+#undef HAVE_POSIX_PRINTF -+ - /* Define to 1 if you have the `putenv' function. */ - #undef HAVE_PUTENV - -@@ -126,6 +166,12 @@ - - /* Define to 1 if you have the `setlocale' function. */ - #undef HAVE_SETLOCALE -+ -+/* Define to 1 if you have the `snprintf' function. */ -+#undef HAVE_SNPRINTF -+ -+/* Define when SO_NOSIGPIPE exists */ -+#undef HAVE_SO_NOSIGPIPE - - /* Define to 1 if you have the header file. */ - #undef HAVE_STDDEF_H -@@ -185,6 +231,9 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_WCHAR_H - -+/* Define if you have the 'wchar_t' type. */ -+#undef HAVE_WCHAR_T -+ - /* Define to 1 if you have the `wcscasecmp' function. */ - #undef HAVE_WCSCASECMP - -@@ -209,6 +258,9 @@ - /* Define to 1 if you have the `wcsrev' function. */ - #undef HAVE_WCSREV - -+/* Define if you have the 'wint_t' type. */ -+#undef HAVE_WINT_T -+ - /* Define to 1 if you have the `__argz_count' function. */ - #undef HAVE___ARGZ_COUNT - -@@ -217,6 +269,9 @@ - - /* Define to 1 if you have the `__argz_stringify' function. */ - #undef HAVE___ARGZ_STRINGIFY -+ -+/* Define to 1 if you have the `__fsetlocking' function. */ -+#undef HAVE___FSETLOCKING - - /* Define as const if the declaration of iconv() needs const. */ - #undef ICONV_CONST -@@ -272,6 +327,10 @@ - using 2.0.x Linux kernel, make sure that you also applied kernel patches. - Change only through 'configure', copies of this value are in makefiles */ - #undef SIGNATURES -+ -+/* Define as the maximum value of type 'size_t', if the system doesn't define -+ it. */ -+#undef SIZE_MAX - - /* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be -@@ -321,6 +380,13 @@ - /* Define to `int' if does not define. */ - #undef pid_t - -+/* Define as the type of the result of subtracting two pointers, if the system -+ doesn't define it. */ -+#undef ptrdiff_t -+ -+/* Define to empty if the C compiler doesn't support this keyword. */ -+#undef signed -+ - /* Define to `unsigned' if does not define. */ - #undef size_t - -diff -r 48879aeab0b6 -r 2ce6ef376b40 po/stamp-po ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/po/stamp-po Sat May 28 15:45:44 2005 +0000 -@@ -0,0 +1,1 @@ -+timestamp - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-419.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-419.patch deleted file mode 100644 index 5d979ea..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-419.patch +++ /dev/null @@ -1,33 +0,0 @@ -changeset: 419:56ca340a8425 -user: Petr Vandrovec -date: Sat May 28 18:48:12 2005 +0000 -files: sutil/Makefile.in util/Makefile.in -description: -Link utils with LIBICONV in addition to INTLLIBS... - - -diff -r 9bf8cc97936c -r 56ca340a8425 sutil/Makefile.in ---- a/sutil/Makefile.in Sat May 28 15:48:03 2005 +0000 -+++ b/sutil/Makefile.in Sat May 28 18:48:12 2005 +0000 -@@ -13,7 +13,7 @@ USE_KERNEL = @USE_KERNEL@ - USE_KERNEL = @USE_KERNEL@ - NDS_SUPPORT = @NDS_SUPPORT@ - --LIBS = @INTLLIBS@ @LIBS@ -+LIBS = @INTLLIBS@ @LIBICONV@ @LIBS@ - - # environ in ncpmount - CCFLAGS += -D_GNU_SOURCE -diff -r 9bf8cc97936c -r 56ca340a8425 util/Makefile.in ---- a/util/Makefile.in Sat May 28 15:48:03 2005 +0000 -+++ b/util/Makefile.in Sat May 28 18:48:12 2005 +0000 -@@ -14,7 +14,7 @@ NDS_SUPPORT = @NDS_SUPPORT@ - NDS_SUPPORT = @NDS_SUPPORT@ - MOUNT2 = @MOUNT2@ - --LIBS = @INTLLIBS@ @LIBS@ -+LIBS = @INTLLIBS@ @LIBICONV@ @LIBS@ - - O_OTHER = dsqueue.o - O_USERUTILS = slist.o pqlist.o nwfsinfo.o pserver.o nprint.o nsend.o \ - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-420.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-420.patch deleted file mode 100644 index d8b0d3f..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-420.patch +++ /dev/null @@ -1,44 +0,0 @@ -changeset: 420:c7f1c54278c9 -user: Petr Vandrovec -date: Sat May 28 18:54:50 2005 +0000 -files: sutil/Makefile.in -description: -Fix build failure while building with --disable-kernel. - - -diff -r 56ca340a8425 -r c7f1c54278c9 sutil/Makefile.in ---- a/sutil/Makefile.in Sat May 28 18:48:12 2005 +0000 -+++ b/sutil/Makefile.in Sat May 28 18:54:50 2005 +0000 -@@ -36,9 +36,6 @@ CFLAGS_ncpmap.o = -DNCPMAP=1 -DMAKE_NCPL - CFLAGS_ncpmap.o = -DNCPMAP=1 -DMAKE_NCPLIB - CFLAGS_ncplogin.o = -DMAKE_NCPLIB - CFLAGS_ncpm_common.o = -DNWMSG=\"$(sbindir)/nwmsg\" --LDFLAGS_ncpmount = ncpm_common.o mount_login.o --LDFLAGS_ncplogin = ncpm_common.o mount_login.o --LDFLAGS_ncpmap = ncpm_common.o - - .PHONY : all install install-dev dep clean mrproper distclean - .PHONY : default -@@ -68,6 +65,10 @@ install-dev: - | sed 's,\($*\)\.o[ :]*,\1.o \1.do \1.to $@ : ,g' > $@; \ - [ -s $@ ] || rm -f $@ - -+ncpmount: ncpm_common.o mount_login.o -+ncplogin: ncpm_common.o mount_login.o -+ncpmap: ncpm_common.o -+ - ncpmap.o: %.o: ncplogin.c - $(CC) $(CFLAGS) $(CCFLAGS) $(CFLAGS_$@) -o $@ -c $< - -@@ -84,8 +85,8 @@ ncpm_common.d mount_login.d: %.d: %.c - | sed 's,\($*\)\.o[ :]*,\1.o \1.do \1.to $@ : ,g' > $@; \ - [ -s $@ ] || rm -f $@ - --$(UTILS): %: %.o ../lib/libncp.a ncpm_common.o mount_login.o -- $(CC) @GC_SECTIONS@-o $@ $(addsuffix .o,$@) $(LDFLAGS_$@) ../lib/libncp.a ${LIBS} -+$(UTILS): %: %.o ../lib/libncp.a -+ $(CC) @GC_SECTIONS@-o $@ $^ ${LIBS} - - ../lib/libncp.a: - make -C ../lib libncp.a - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-421.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-421.patch deleted file mode 100644 index 60bb2fe..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-421.patch +++ /dev/null @@ -1,31 +0,0 @@ -changeset: 421:50351d213ba9 -user: Petr Vandrovec -date: Sat May 28 18:57:50 2005 +0000 -files: Make.rules.in lib/Makefile.in -description: -Perform ranlib on static library after build. - - -diff -r c7f1c54278c9 -r 50351d213ba9 Make.rules.in ---- a/Make.rules.in Sat May 28 18:54:50 2005 +0000 -+++ b/Make.rules.in Sat May 28 18:57:50 2005 +0000 -@@ -2,6 +2,7 @@ INSTALL := @INSTALL@ - INSTALL := @INSTALL@ - INSTALL_DATA := @INSTALL_DATA@ - CC := @CC@ -+RANLIB := @RANLIB@ - - prefix := @prefix@ - exec_prefix := @exec_prefix@ -diff -r c7f1c54278c9 -r 50351d213ba9 lib/Makefile.in ---- a/lib/Makefile.in Sat May 28 18:54:50 2005 +0000 -+++ b/lib/Makefile.in Sat May 28 18:57:50 2005 +0000 -@@ -130,6 +130,7 @@ install_static: $(STATIC_NCPLIB_BIN) - - $(STATIC_NCPLIB): $(STATIC_O_OBJ) - ar r $@ $(STATIC_O_OBJ) -+ $(RANLIB) $@ - - ifeq ($(NEED_DEP),yes) - include $(STATIC_O_OBJ:.o=.d) - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-422.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-422.patch deleted file mode 100644 index 840612d..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-422.patch +++ /dev/null @@ -1,196 +0,0 @@ -changeset: 422:bda42d4b9cf1 -user: Petr Vandrovec -date: Sat May 28 19:21:17 2005 +0000 -files: Make.rules.in Makefile.in configure configure.ac contrib/tcl-utils/Makefile.in contrib/tknwmsg/Makefile.in lib/Makefile.in util/Makefile.in -description: -Add support for disabling build of shared library with --disable-shared. - - -diff -r 50351d213ba9 -r bda42d4b9cf1 Make.rules.in ---- a/Make.rules.in Sat May 28 18:57:50 2005 +0000 -+++ b/Make.rules.in Sat May 28 19:21:17 2005 +0000 -@@ -48,6 +48,7 @@ CCFLAGS := $(CFLAGS_DEFINES) $(CFLAGS_OP - # directory where the dynamic library resides to the environment - # variable LD_LIBRARY_PATH - HAVE_ELF := @ELF_TARGET@ -+BUILD_SHARED := @BUILD_SHARED@ - - VERSION_SOLIB := 2.3.0 - VERSION_SONAME := 2.3 -diff -r 50351d213ba9 -r bda42d4b9cf1 Makefile.in ---- a/Makefile.in Sat May 28 18:57:50 2005 +0000 -+++ b/Makefile.in Sat May 28 19:21:17 2005 +0000 -@@ -19,11 +19,11 @@ CLEAN_SUBDIRS := lib sutil util man intl - contrib/testing/pp contrib/tests contrib/libtrace contrib/nss64 \ - contrib/tcl-utils contrib/php contrib/pam - --export INCLUDES VERSION HAVE_ELF CFLAGS -+export INCLUDES VERSION BUILD_SHARED CFLAGS - - all: - set -e; for i in $(EXECSUBDIRS); do make -C $$i all; done -- @if [ "$(HAVE_ELF)" = yes ] ;\ -+ @if [ "$(BUILD_SHARED)" = yes ] ;\ - then \ - echo ; echo ; echo ;\ - echo Please add \'`pwd`/lib\' to the environment ; \ -diff -r 50351d213ba9 -r bda42d4b9cf1 configure ---- a/configure Sat May 28 18:57:50 2005 +0000 -+++ b/configure Sat May 28 19:21:17 2005 +0000 -@@ -313,7 +313,7 @@ ac_includes_default="\ - #endif" - - ac_subdirs_all="$ac_subdirs_all contrib/php" --ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC_WARNINGS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S PACKAGE VERSION MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE CPP EGREP GLIBC2 RANLIB ac_ct_RANLIB ALLOCA GLIBC21 INTL_MACOSX_LIBS HAVE_POSIX_PRINTF HAVE_ASPRINTF HAVE_SNPRINTF HAVE_WPRINTF LIBICONV LTLIBICONV INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB localedir ncp_ipx_headers_1 ncp_ipx_headers_2 ncp_ipx_defsiocprotoprivate ncp_ipx_defsiocaipx ncp_sys_mount_h ncp_linux_fs_h ncp_net_if_h ncp_net_route_h ncp_if_ether_support ncp_sys_select_h stdint_types socklen_t wchar_h LIB_PAM_SECURITY php_found REENTRANT_CFLAGS ncphost ELF_TARGET VERSIONED_LINK ncp_in_support ncp_ipx_support NDS_SUPPORT SIGNATURES MOUNT2 MOUNT3 USE_KERNEL ADDON_SUBDIRS ADDON_DEV_SUBDIRS FFUNCTION_SECTIONS GC_SECTIONS subdirs LIBOBJS LTLIBOBJS' -+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC_WARNINGS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S PACKAGE VERSION MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE CPP EGREP GLIBC2 RANLIB ac_ct_RANLIB ALLOCA GLIBC21 INTL_MACOSX_LIBS HAVE_POSIX_PRINTF HAVE_ASPRINTF HAVE_SNPRINTF HAVE_WPRINTF LIBICONV LTLIBICONV INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB localedir ncp_ipx_headers_1 ncp_ipx_headers_2 ncp_ipx_defsiocprotoprivate ncp_ipx_defsiocaipx ncp_sys_mount_h ncp_linux_fs_h ncp_net_if_h ncp_net_route_h ncp_if_ether_support ncp_sys_select_h stdint_types socklen_t wchar_h LIB_PAM_SECURITY php_found REENTRANT_CFLAGS ncphost ELF_TARGET VERSIONED_LINK ncp_in_support ncp_ipx_support NDS_SUPPORT SIGNATURES MOUNT2 MOUNT3 USE_KERNEL ADDON_SUBDIRS ADDON_DEV_SUBDIRS FFUNCTION_SECTIONS GC_SECTIONS BUILD_SHARED subdirs LIBOBJS LTLIBOBJS' - ac_subst_files='' - - # Initialize some variables set by options. -@@ -864,6 +864,7 @@ Optional Features: - --disable-reentrant do not compile threading support into library - --disable-versions do not use version symbols in library - --disable-function-sections do not use -ffunction-sections for static libraries -+ --disable-shared disable build/use of shared libncp - --enable-trace enable trace of ncp calls - --enable-ncp-debug enable builtin debugging support - --disable-nls do not use Native Language Support -@@ -1432,6 +1433,12 @@ fi; - # Check whether --enable-function_sections or --disable-function_sections was given. - if test "${enable_function_sections+set}" = set; then - enableval="$enable_function_sections" -+ -+fi; -+ -+# Check whether --enable-shared or --disable-shared was given. -+if test "${enable_shared+set}" = set; then -+ enableval="$enable_shared" - - fi; - -@@ -14049,6 +14056,16 @@ ELF_TARGET="$ncp_cv_elf_target" - ELF_TARGET="$ncp_cv_elf_target" - - -+BUILD_SHARED="$ELF_TARGET" -+if test "$enable_shared" = "no" -+then -+ BUILD_SHARED="no" -+fi -+if test "$enable_shared" = "yes" -+then -+ BUILD_SHARED="yes" -+fi -+ - FFUNCTION_SECTIONS="" - GC_SECTIONS="" - if test "$function_sections" = "yes" -@@ -14174,6 +14191,7 @@ fi - - - ADDON_SUBDIRS="$ADDON_SUBDIRS $ADDON_DEV_SUBDIRS" -+ - - - -@@ -14944,6 +14962,7 @@ s,@ADDON_DEV_SUBDIRS@,$ADDON_DEV_SUBDIRS - s,@ADDON_DEV_SUBDIRS@,$ADDON_DEV_SUBDIRS,;t t - s,@FFUNCTION_SECTIONS@,$FFUNCTION_SECTIONS,;t t - s,@GC_SECTIONS@,$GC_SECTIONS,;t t -+s,@BUILD_SHARED@,$BUILD_SHARED,;t t - s,@subdirs@,$subdirs,;t t - s,@LIBOBJS@,$LIBOBJS,;t t - s,@LTLIBOBJS@,$LTLIBOBJS,;t t -diff -r 50351d213ba9 -r bda42d4b9cf1 configure.ac ---- a/configure.ac Sat May 28 18:57:50 2005 +0000 -+++ b/configure.ac Sat May 28 19:21:17 2005 +0000 -@@ -50,6 +50,9 @@ AC_ARG_ENABLE(versions, - - AC_ARG_ENABLE(function_sections, - [ --disable-function-sections do not use -ffunction-sections for static libraries]) -+ -+AC_ARG_ENABLE(shared, -+[ --disable-shared disable build/use of shared libncp]) - - AC_ARG_ENABLE(trace, - [ --enable-trace enable trace of ncp calls]) -@@ -892,6 +895,16 @@ ELF_TARGET="$ncp_cv_elf_target" - ELF_TARGET="$ncp_cv_elf_target" - AC_SUBST(ELF_TARGET) - -+BUILD_SHARED="$ELF_TARGET" -+if test "$enable_shared" = "no" -+then -+ BUILD_SHARED="no" -+fi -+if test "$enable_shared" = "yes" -+then -+ BUILD_SHARED="yes" -+fi -+ - FFUNCTION_SECTIONS="" - GC_SECTIONS="" - if test "$function_sections" = "yes" -@@ -999,6 +1012,7 @@ AC_SUBST(ADDON_DEV_SUBDIRS) - AC_SUBST(ADDON_DEV_SUBDIRS) - AC_SUBST(FFUNCTION_SECTIONS) - AC_SUBST(GC_SECTIONS) -+AC_SUBST(BUILD_SHARED) - - AC_CONFIG_FILES([ - Make.rules -diff -r 50351d213ba9 -r bda42d4b9cf1 contrib/tcl-utils/Makefile.in ---- a/contrib/tcl-utils/Makefile.in Sat May 28 18:57:50 2005 +0000 -+++ b/contrib/tcl-utils/Makefile.in Sat May 28 19:21:17 2005 +0000 -@@ -26,7 +26,7 @@ SBINUTILS = $(O_SBINUTILS:%.o=%) - - UTILS = $(USERUTILS) $(SBINUTILS) - --ifeq ($(HAVE_ELF),yes) -+ifeq ($(BUILD_SHARED),yes) - NCP_LIB := libncp.so - else - NCP_LIB := libncp.a -diff -r 50351d213ba9 -r bda42d4b9cf1 contrib/tknwmsg/Makefile.in ---- a/contrib/tknwmsg/Makefile.in Sat May 28 18:57:50 2005 +0000 -+++ b/contrib/tknwmsg/Makefile.in Sat May 28 19:21:17 2005 +0000 -@@ -19,7 +19,7 @@ SBINUTILS = $(O_SBINUTILS:%.o=%) - - UTILS = $(USERUTILS) $(SBINUTILS) - --ifeq ($(HAVE_ELF),yes) -+ifeq ($(BUILD_SHARED),yes) - NCP_LIB = libncp.so - NCPLIB_DIR = ../../lib - LIBDEP = $(NCPLIB_DIR)/$(NCP_LIB) -diff -r 50351d213ba9 -r bda42d4b9cf1 lib/Makefile.in ---- a/lib/Makefile.in Sat May 28 18:57:50 2005 +0000 -+++ b/lib/Makefile.in Sat May 28 19:21:17 2005 +0000 -@@ -63,9 +63,14 @@ SHARED_CFLAGS := $(CFLAGS) $(CCFLAGS) - .PHONY : all dep install install-dev clean mrproper distclean - .PHONY : install_shared install_static install_static_su - -+ -+ifeq ($(BUILD_SHARED),yes) - all: $(STATIC_NCPLIB) $(SHARED_NCPLIB) -- - install: install_shared -+else -+all: $(STATIC_NCPLIB) -+install: -+endif - - %.d: %.c - set -e; $(CC) -M $(STATIC_CFLAGS) $(CFLAGS_$(@:.d=.o)) $(BASE_CFLAGS) $< \ -diff -r 50351d213ba9 -r bda42d4b9cf1 util/Makefile.in ---- a/util/Makefile.in Sat May 28 18:57:50 2005 +0000 -+++ b/util/Makefile.in Sat May 28 19:21:17 2005 +0000 -@@ -37,7 +37,7 @@ SBINUTILS = $(O_SBINUTILS:%.o=%) - - UTILS = $(USERUTILS) $(SBINUTILS) ncptest - --ifeq ($(HAVE_ELF),yes) -+ifeq ($(BUILD_SHARED),yes) - NCP_LIB = libncp.so - NCPLIB_DIR = ../lib - LIBDEP = $(NCPLIB_DIR)/$(NCP_LIB) - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-423.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-423.patch deleted file mode 100644 index eae071d..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-423.patch +++ /dev/null @@ -1,313 +0,0 @@ -changeset: 423:bef6bf5896d3 -user: Petr Vandrovec -date: Sat May 28 19:42:20 2005 +0000 -files: Make.rules.in configure configure.ac contrib/pam/Makefile.in contrib/tcl-utils/Makefile.in contrib/tknwmsg/Makefile.in lib/Makefile.in sutil/Makefile.in util/Makefile.in -description: -Do not hardwire library .a/.so extension. - - -diff -r bda42d4b9cf1 -r bef6bf5896d3 Make.rules.in ---- a/Make.rules.in Sat May 28 19:21:17 2005 +0000 -+++ b/Make.rules.in Sat May 28 19:42:20 2005 +0000 -@@ -50,6 +50,9 @@ HAVE_ELF := @ELF_TARGET@ - HAVE_ELF := @ELF_TARGET@ - BUILD_SHARED := @BUILD_SHARED@ - -+libext := @libext@ -+shlibext := @shlibext@ -+ - VERSION_SOLIB := 2.3.0 - VERSION_SONAME := 2.3 - -diff -r bda42d4b9cf1 -r bef6bf5896d3 configure ---- a/configure Sat May 28 19:21:17 2005 +0000 -+++ b/configure Sat May 28 19:42:20 2005 +0000 -@@ -313,7 +313,7 @@ ac_includes_default="\ - #endif" - - ac_subdirs_all="$ac_subdirs_all contrib/php" --ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC_WARNINGS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S PACKAGE VERSION MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE CPP EGREP GLIBC2 RANLIB ac_ct_RANLIB ALLOCA GLIBC21 INTL_MACOSX_LIBS HAVE_POSIX_PRINTF HAVE_ASPRINTF HAVE_SNPRINTF HAVE_WPRINTF LIBICONV LTLIBICONV INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB localedir ncp_ipx_headers_1 ncp_ipx_headers_2 ncp_ipx_defsiocprotoprivate ncp_ipx_defsiocaipx ncp_sys_mount_h ncp_linux_fs_h ncp_net_if_h ncp_net_route_h ncp_if_ether_support ncp_sys_select_h stdint_types socklen_t wchar_h LIB_PAM_SECURITY php_found REENTRANT_CFLAGS ncphost ELF_TARGET VERSIONED_LINK ncp_in_support ncp_ipx_support NDS_SUPPORT SIGNATURES MOUNT2 MOUNT3 USE_KERNEL ADDON_SUBDIRS ADDON_DEV_SUBDIRS FFUNCTION_SECTIONS GC_SECTIONS BUILD_SHARED subdirs LIBOBJS LTLIBOBJS' -+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC_WARNINGS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S PACKAGE VERSION MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE CPP EGREP GLIBC2 RANLIB ac_ct_RANLIB ALLOCA GLIBC21 INTL_MACOSX_LIBS HAVE_POSIX_PRINTF HAVE_ASPRINTF HAVE_SNPRINTF HAVE_WPRINTF LIBICONV LTLIBICONV INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB localedir ncp_ipx_headers_1 ncp_ipx_headers_2 ncp_ipx_defsiocprotoprivate ncp_ipx_defsiocaipx ncp_sys_mount_h ncp_linux_fs_h ncp_net_if_h ncp_net_route_h ncp_if_ether_support ncp_sys_select_h stdint_types socklen_t wchar_h LIB_PAM_SECURITY php_found REENTRANT_CFLAGS ncphost ELF_TARGET VERSIONED_LINK ncp_in_support ncp_ipx_support NDS_SUPPORT SIGNATURES MOUNT2 MOUNT3 USE_KERNEL ADDON_SUBDIRS ADDON_DEV_SUBDIRS FFUNCTION_SECTIONS GC_SECTIONS BUILD_SHARED shlibext libext subdirs LIBOBJS LTLIBOBJS' - ac_subst_files='' - - # Initialize some variables set by options. -@@ -14106,6 +14106,39 @@ then - GC_SECTIONS="-Wl,--gc-sections " - fi - -+ -+ -+ echo "$as_me:$LINENO: checking for shared library run path origin" >&5 -+echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 -+if test "${acl_cv_rpath+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ -+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ -+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh -+ . ./conftest.sh -+ rm -f ./conftest.sh -+ acl_cv_rpath=done -+ -+fi -+echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 -+echo "${ECHO_T}$acl_cv_rpath" >&6 -+ wl="$acl_cv_wl" -+ libext="$acl_cv_libext" -+ shlibext="$acl_cv_shlibext" -+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" -+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" -+ hardcode_direct="$acl_cv_hardcode_direct" -+ hardcode_minus_L="$acl_cv_hardcode_minus_L" -+ # Check whether --enable-rpath or --disable-rpath was given. -+if test "${enable_rpath+set}" = set; then -+ enableval="$enable_rpath" -+ : -+else -+ enable_rpath=yes -+fi; -+ -+ - if test "$VERSIONED_LINK" = "yes" - then - echo "$as_me:$LINENO: checking for working versioned link" >&5 -@@ -14126,7 +14159,7 @@ void lsym(void) { }; - void lsym(void) { }; - void gsym(void) { }; - EOF -- if ${CC} -shared -Wl,-version-script=conftest.vers -o conftest.so conftest.c -lc >/dev/null 2>&1 -+ if ${CC} -shared -Wl,-version-script=conftest.vers -o conftest.${shlibext} conftest.c -lc >/dev/null 2>&1 - then - ncp_cv_versioned_link=yes - fi -@@ -14134,7 +14167,7 @@ fi - fi - echo "$as_me:$LINENO: result: $ncp_cv_versioned_link" >&5 - echo "${ECHO_T}$ncp_cv_versioned_link" >&6 -- rm -f conftest.c conftest.vers conftest.so -+ rm -f conftest.c conftest.vers conftest.${shlibext} - if test "$ncp_cv_versioned_link" = "no" - then - if test "$versions_forced" = "yes" -@@ -14191,6 +14224,8 @@ fi - - - ADDON_SUBDIRS="$ADDON_SUBDIRS $ADDON_DEV_SUBDIRS" -+ -+ - - - -@@ -14963,6 +14998,8 @@ s,@FFUNCTION_SECTIONS@,$FFUNCTION_SECTIO - s,@FFUNCTION_SECTIONS@,$FFUNCTION_SECTIONS,;t t - s,@GC_SECTIONS@,$GC_SECTIONS,;t t - s,@BUILD_SHARED@,$BUILD_SHARED,;t t -+s,@shlibext@,$shlibext,;t t -+s,@libext@,$libext,;t t - s,@subdirs@,$subdirs,;t t - s,@LIBOBJS@,$LIBOBJS,;t t - s,@LTLIBOBJS@,$LTLIBOBJS,;t t -diff -r bda42d4b9cf1 -r bef6bf5896d3 configure.ac ---- a/configure.ac Sat May 28 19:21:17 2005 +0000 -+++ b/configure.ac Sat May 28 19:42:20 2005 +0000 -@@ -937,6 +937,8 @@ then - GC_SECTIONS="-Wl,--gc-sections " - fi - -+AC_LIB_RPATH -+ - if test "$VERSIONED_LINK" = "yes" - then - AC_CACHE_CHECK(for working versioned link, -@@ -954,12 +956,12 @@ void lsym(void) { }; - void lsym(void) { }; - void gsym(void) { }; - EOF -- if ${CC} -shared -Wl,-version-script=conftest.vers -o conftest.so conftest.c -lc >/dev/null 2>&1 -+ if ${CC} -shared -Wl,-version-script=conftest.vers -o conftest.${shlibext} conftest.c -lc >/dev/null 2>&1 - then - ncp_cv_versioned_link=yes - fi] - ) -- rm -f conftest.c conftest.vers conftest.so -+ rm -f conftest.c conftest.vers conftest.${shlibext} - if test "$ncp_cv_versioned_link" = "no" - then - if test "$versions_forced" = "yes" -@@ -1013,6 +1015,8 @@ AC_SUBST(FFUNCTION_SECTIONS) - AC_SUBST(FFUNCTION_SECTIONS) - AC_SUBST(GC_SECTIONS) - AC_SUBST(BUILD_SHARED) -+AC_SUBST(shlibext) -+AC_SUBST(libext) - - AC_CONFIG_FILES([ - Make.rules -diff -r bda42d4b9cf1 -r bef6bf5896d3 contrib/pam/Makefile.in ---- a/contrib/pam/Makefile.in Sat May 28 19:21:17 2005 +0000 -+++ b/contrib/pam/Makefile.in Sat May 28 19:42:20 2005 +0000 -@@ -10,10 +10,10 @@ LIBS = @INTLLIBS@ @LIBS@ - LIBS = @INTLLIBS@ @LIBS@ - LIB_PAM_SECURITY = @LIB_PAM_SECURITY@ - --NCP_LIB = libncp.so -+NCP_LIB = libncp.$(shlibext) - NCPLIB_DIR = ../../lib - --PAM_LIBRARY = pam_ncp_auth.so -+PAM_LIBRARY = pam_ncp_auth.$(shlibext) - PAM_OBJECTS = pam_ncp_auth.do support.do - - CFLAGS_pam_ncp_auth.do := -DNCPMOUNT_PATH=\"$(bindir)/ncpmount\" -DNCPUMOUNT_PATH=\"$(bindir)/ncpumount\" -diff -r bda42d4b9cf1 -r bef6bf5896d3 contrib/tcl-utils/Makefile.in ---- a/contrib/tcl-utils/Makefile.in Sat May 28 19:21:17 2005 +0000 -+++ b/contrib/tcl-utils/Makefile.in Sat May 28 19:42:20 2005 +0000 -@@ -27,9 +27,9 @@ UTILS = $(USERUTILS) $(SBINUTILS) - UTILS = $(USERUTILS) $(SBINUTILS) - - ifeq ($(BUILD_SHARED),yes) --NCP_LIB := libncp.so -+NCP_LIB := libncp.$(shlibext) - else --NCP_LIB := libncp.a -+NCP_LIB := libncp.$(libext) - endif - NCPLIB_DIR := ${top_builddir}/lib - LIBDEP := $(NCPLIB_DIR)/$(NCP_LIB) -@@ -49,11 +49,11 @@ install: all - - install-dev: - --${NCPLIB_DIR}/libncp.a: -- make -C ${NCPLIB_DIR} libncp.a -+${NCPLIB_DIR}/libncp.$(libext): -+ make -C ${NCPLIB_DIR} libncp.$(libext) - --${NCPLIB_DIR}/libncp.so: -- make -C ${NCPLIB_DIR} libncp.so -+${NCPLIB_DIR}/libncp.$(shlibext): -+ make -C ${NCPLIB_DIR} libncp.$(shlibext) - - $(O_USERUTILS) $(O_SBINUTILS) $(O_OTHER): %.o: %.c - $(CC) $(CFLAGS) $(CCFLAGS) $(CFLAGS_$@) -o $@ -c $< -diff -r bda42d4b9cf1 -r bef6bf5896d3 contrib/tknwmsg/Makefile.in ---- a/contrib/tknwmsg/Makefile.in Sat May 28 19:21:17 2005 +0000 -+++ b/contrib/tknwmsg/Makefile.in Sat May 28 19:42:20 2005 +0000 -@@ -20,14 +20,12 @@ UTILS = $(USERUTILS) $(SBINUTILS) - UTILS = $(USERUTILS) $(SBINUTILS) - - ifeq ($(BUILD_SHARED),yes) --NCP_LIB = libncp.so --NCPLIB_DIR = ../../lib -+NCP_LIB = libncp.$(shlibext) -+else -+NCP_LIB = libncp.$(libext) -+endif -+NCPLIB_DIR = $(top_builddir)/lib - LIBDEP = $(NCPLIB_DIR)/$(NCP_LIB) --else --NCP_LIB = libncp.a --NCPLIB_DIR = ../../lib --LIBDEP = $(NCPLIB_DIR)/$(NCP_LIB) --endif - - .PHONY : all install install-dev dep clean mrproper distclean - .PHONY : default -@@ -46,11 +44,11 @@ install: all - - install-dev: - --../../lib/libncp.a: -- make -C ../../lib libncp.a -+../../lib/libncp.$(libext): -+ make -C ../../lib libncp.$(libext) - --../../lib/libncp.so: -- make -C ../../lib libncp.so -+../../lib/libncp.$(shlibext): -+ make -C ../../lib libncp.$(shlibext) - - $(O_USERUTILS) $(O_SBINUTILS): %.o: %.c - $(CC) $(CFLAGS) $(CCFLAGS) -o $@ -c $< -diff -r bda42d4b9cf1 -r bef6bf5896d3 lib/Makefile.in ---- a/lib/Makefile.in Sat May 28 19:21:17 2005 +0000 -+++ b/lib/Makefile.in Sat May 28 19:42:20 2005 +0000 -@@ -14,10 +14,10 @@ REENTRANT_CFLAGS := @REENTRANT_CFLAGS@ - REENTRANT_CFLAGS := @REENTRANT_CFLAGS@ - VERSIONED_LINK := @VERSIONED_LINK@ - --SHARED_NCPLIB := libncp.so -+SHARED_NCPLIB := libncp.$(shlibext) - SHARED_NCPLIB_BIN := $(SHARED_NCPLIB).$(VERSION_SOLIB) - SHARED_NCPLIB_SONAME := $(SHARED_NCPLIB).$(VERSION_SONAME) --STATIC_NCPLIB := libncp.a -+STATIC_NCPLIB := libncp.$(libext) - STATIC_NCPLIB_BIN := $(STATIC_NCPLIB) - - CCFLAGS += -I. -@@ -93,7 +93,7 @@ dep: - - clean: - rm -f *.o *.do *.to *~ ds/*.o ds/*.do ds/*.to ds/*~ fs/*.o fs/*.do fs/*.to fs/*~ -- rm -f libncp.a libncp.so* libncpsu.* -+ rm -f $(STATIC_NCPLIB) libncp.$(shlibext)* - - mrproper: clean - rm -f $(UTILS) $(DISTFILE) *.d fs/*.d ds/*.d -diff -r bda42d4b9cf1 -r bef6bf5896d3 sutil/Makefile.in ---- a/sutil/Makefile.in Sat May 28 19:21:17 2005 +0000 -+++ b/sutil/Makefile.in Sat May 28 19:42:20 2005 +0000 -@@ -85,11 +85,11 @@ ncpm_common.d mount_login.d: %.d: %.c - | sed 's,\($*\)\.o[ :]*,\1.o \1.do \1.to $@ : ,g' > $@; \ - [ -s $@ ] || rm -f $@ - --$(UTILS): %: %.o ../lib/libncp.a -+$(UTILS): %: %.o ../lib/libncp.$(libext) - $(CC) @GC_SECTIONS@-o $@ $^ ${LIBS} - --../lib/libncp.a: -- make -C ../lib libncp.a -+../lib/libncp.$(libext): -+ make -C ../lib libncp.$(libext) - - dep: - -diff -r bda42d4b9cf1 -r bef6bf5896d3 util/Makefile.in ---- a/util/Makefile.in Sat May 28 19:21:17 2005 +0000 -+++ b/util/Makefile.in Sat May 28 19:42:20 2005 +0000 -@@ -38,14 +38,12 @@ UTILS = $(USERUTILS) $(SBINUTILS) ncptes - UTILS = $(USERUTILS) $(SBINUTILS) ncptest - - ifeq ($(BUILD_SHARED),yes) --NCP_LIB = libncp.so -+NCP_LIB = libncp.$(shlibext) -+else -+NCP_LIB = libncp.$(libext) -+endif - NCPLIB_DIR = ../lib - LIBDEP = $(NCPLIB_DIR)/$(NCP_LIB) --else --NCP_LIB = libncp.a --NCPLIB_DIR = ../lib --LIBDEP = $(NCPLIB_DIR)/$(NCP_LIB) --endif - - CFLAGS_ncopy.o = -D_GNU_SOURCE - ADDOBJS_pqstat = dsqueue.o -@@ -76,11 +74,11 @@ endif - - install-dev: - --../lib/libncp.a: -- make -C ../lib libncp.a -+../lib/libncp.$(libext): -+ make -C $(NCPLIB_DIR) libncp.$(libext) - --../lib/libncp.so: -- make -C ../lib libncp.so -+../lib/libncp.$(shlibext): -+ make -C $(NCPLIB_DIR) libncp.$(shlibext) - - $(O_USERUTILS) $(O_SBINUTILS) $(O_OTHER) ncptest.o: %.o: %.c - $(CC) $(CFLAGS) $(CCFLAGS) $(CFLAGS_$@) -o $@ -c $< - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-424.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-424.patch deleted file mode 100644 index 1575d39..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-424.patch +++ /dev/null @@ -1,30 +0,0 @@ -changeset: 424:81e0853d48a9 -user: Petr Vandrovec -date: Sat May 28 19:59:35 2005 +0000 -files: include/ncp/kernel/types.h.in -description: -Use stdint.h when possible. Fixes problems on Darwin. - - -diff -r bef6bf5896d3 -r 81e0853d48a9 include/ncp/kernel/types.h.in ---- a/include/ncp/kernel/types.h.in Sat May 28 19:42:20 2005 +0000 -+++ b/include/ncp/kernel/types.h.in Sat May 28 19:59:35 2005 +0000 -@@ -7,6 +7,9 @@ - @ncp_in_support@ - @ncp_ipx_support@ - -+#if @stdint_types@ -+#include -+#else - /* FIXME: What about configure?! */ - #ifndef __BIT_TYPES_DEFINED__ - #define __BIT_TYPES_DEFINED__ 1 -@@ -26,6 +29,7 @@ typedef signed long long int64_t; - #endif - - #endif /* __BIT_TYPES_DEFINED__ */ -+#endif - - #if @USE_KERNEL@ - - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-425.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-425.patch deleted file mode 100644 index 0d25acf..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-425.patch +++ /dev/null @@ -1,2802 +0,0 @@ -changeset: 425:8341fcd1dc86 -user: Petr Vandrovec -date: Sat May 28 20:02:00 2005 +0000 -files: configure configure.ac include/config.h.in -description: -Always include before , otherwise build fails -on Darwin. - -Try to use linux/fs.h or sys/mount.h only if we are building kernel -support. - - -diff -r 81e0853d48a9 -r 8341fcd1dc86 configure ---- a/configure Sat May 28 19:59:35 2005 +0000 -+++ b/configure Sat May 28 20:02:00 2005 +0000 -@@ -313,7 +313,7 @@ ac_includes_default="\ - #endif" - - ac_subdirs_all="$ac_subdirs_all contrib/php" --ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC_WARNINGS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S PACKAGE VERSION MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE CPP EGREP GLIBC2 RANLIB ac_ct_RANLIB ALLOCA GLIBC21 INTL_MACOSX_LIBS HAVE_POSIX_PRINTF HAVE_ASPRINTF HAVE_SNPRINTF HAVE_WPRINTF LIBICONV LTLIBICONV INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB localedir ncp_ipx_headers_1 ncp_ipx_headers_2 ncp_ipx_defsiocprotoprivate ncp_ipx_defsiocaipx ncp_sys_mount_h ncp_linux_fs_h ncp_net_if_h ncp_net_route_h ncp_if_ether_support ncp_sys_select_h stdint_types socklen_t wchar_h LIB_PAM_SECURITY php_found REENTRANT_CFLAGS ncphost ELF_TARGET VERSIONED_LINK ncp_in_support ncp_ipx_support NDS_SUPPORT SIGNATURES MOUNT2 MOUNT3 USE_KERNEL ADDON_SUBDIRS ADDON_DEV_SUBDIRS FFUNCTION_SECTIONS GC_SECTIONS BUILD_SHARED shlibext libext subdirs LIBOBJS LTLIBOBJS' -+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC_WARNINGS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S PACKAGE VERSION MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE CPP EGREP GLIBC2 RANLIB ac_ct_RANLIB ALLOCA GLIBC21 INTL_MACOSX_LIBS HAVE_POSIX_PRINTF HAVE_ASPRINTF HAVE_SNPRINTF HAVE_WPRINTF LIBICONV LTLIBICONV INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB localedir ncp_ipx_headers_1 ncp_ipx_headers_2 ncp_ipx_defsiocprotoprivate ncp_ipx_defsiocaipx ncp_net_if_h ncp_net_route_h ncp_if_ether_support ncp_sys_select_h stdint_types ncp_sys_mount_h ncp_linux_fs_h socklen_t wchar_h LIB_PAM_SECURITY php_found REENTRANT_CFLAGS ncphost ELF_TARGET VERSIONED_LINK ncp_in_support ncp_ipx_support NDS_SUPPORT SIGNATURES MOUNT2 MOUNT3 USE_KERNEL ADDON_SUBDIRS ADDON_DEV_SUBDIRS FFUNCTION_SECTIONS GC_SECTIONS BUILD_SHARED shlibext libext subdirs LIBOBJS LTLIBOBJS' - ac_subst_files='' - - # Initialize some variables set by options. -@@ -9918,6 +9918,285 @@ localedir="\${prefix}/$DATADIRNAME/local - localedir="\${prefix}/$DATADIRNAME/locale" - - -+ -+for ac_header in sys/types.h -+do -+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo "$as_me:$LINENO: checking for $ac_header" >&5 -+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+fi -+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+else -+ # Is the header compilable? -+echo "$as_me:$LINENO: checking $ac_header usability" >&5 -+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+#include <$ac_header> -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_header_compiler=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_header_compiler=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -+echo "${ECHO_T}$ac_header_compiler" >&6 -+ -+# Is the header present? -+echo "$as_me:$LINENO: checking $ac_header presence" >&5 -+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include <$ac_header> -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ ac_header_preproc=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_preproc=no -+fi -+rm -f conftest.err conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -+echo "${ECHO_T}$ac_header_preproc" >&6 -+ -+# So? What about this header? -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) -+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} -+ ( -+ cat <<\_ASBOX -+## ---------------------------------- ## -+## Report this to vandrove@vc.cvut.cz ## -+## ---------------------------------- ## -+_ASBOX -+ ) | -+ sed "s/^/$as_me: WARNING: /" >&2 -+ ;; -+esac -+echo "$as_me:$LINENO: checking for $ac_header" >&5 -+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ eval "$as_ac_Header=\$ac_header_preproc" -+fi -+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+ -+fi -+if test `eval echo '${'$as_ac_Header'}'` = yes; then -+ cat >>confdefs.h <<_ACEOF -+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+ -+done -+ -+ -+for ac_header in sys/socket.h -+do -+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -+echo "$as_me:$LINENO: checking for $ac_header" >&5 -+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#if HAVE_SYS_TYPES_H -+#include -+#endif -+ -+ -+#include <$ac_header> -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ eval "$as_ac_Header=yes" -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+eval "$as_ac_Header=no" -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+if test `eval echo '${'$as_ac_Header'}'` = yes; then -+ cat >>confdefs.h <<_ACEOF -+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+ -+done -+ -+ -+for ac_header in net/if.h -+do -+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -+echo "$as_me:$LINENO: checking for $ac_header" >&5 -+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#if HAVE_SYS_TYPES_H -+#include -+#endif -+#if HAVE_SYS_SOCKET_H -+# include -+#endif -+ -+ -+#include <$ac_header> -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ eval "$as_ac_Header=yes" -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+eval "$as_ac_Header=no" -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+if test `eval echo '${'$as_ac_Header'}'` = yes; then -+ cat >>confdefs.h <<_ACEOF -+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+ -+done -+ -+ - echo "$as_me:$LINENO: checking for GNU style IPX support" >&5 - echo $ECHO_N "checking for GNU style IPX support... $ECHO_C" >&6 - if test "${ncp_cv_c_ipx_netipx+set}" = set; then -@@ -9929,7 +10208,12 @@ cat confdefs.h >>conftest.$ac_ext - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#if HAVE_SYS_TYPES_H -+#include -+#endif -+#if HAVE_SYS_SOCKET_H - #include -+#endif - #include - #include - int -@@ -9989,7 +10273,12 @@ cat confdefs.h >>conftest.$ac_ext - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#if HAVE_SYS_TYPES_H -+#include -+#endif -+#if HAVE_SYS_SOCKET_H - #include -+#endif - #include - #include - int -@@ -10493,6 +10782,920 @@ _ACEOF - - fi - -+ -+echo "$as_me:$LINENO: checking for net/if.h" >&5 -+echo $ECHO_N "checking for net/if.h... $ECHO_C" >&6 -+if test "${ac_cv_header_net_if_h+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#if HAVE_SYS_TYPES_H -+#include -+#endif -+#if HAVE_SYS_SOCKET_H -+#include -+#endif -+ -+ -+#include -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_header_net_if_h=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_header_net_if_h=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $ac_cv_header_net_if_h" >&5 -+echo "${ECHO_T}$ac_cv_header_net_if_h" >&6 -+if test $ac_cv_header_net_if_h = yes; then -+ ncp_net_if_h="#include " -+else -+ if test "${ac_cv_header_linux_if_h+set}" = set; then -+ echo "$as_me:$LINENO: checking for linux/if.h" >&5 -+echo $ECHO_N "checking for linux/if.h... $ECHO_C" >&6 -+if test "${ac_cv_header_linux_if_h+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+fi -+echo "$as_me:$LINENO: result: $ac_cv_header_linux_if_h" >&5 -+echo "${ECHO_T}$ac_cv_header_linux_if_h" >&6 -+else -+ # Is the header compilable? -+echo "$as_me:$LINENO: checking linux/if.h usability" >&5 -+echo $ECHO_N "checking linux/if.h usability... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+#include -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_header_compiler=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_header_compiler=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -+echo "${ECHO_T}$ac_header_compiler" >&6 -+ -+# Is the header present? -+echo "$as_me:$LINENO: checking linux/if.h presence" >&5 -+echo $ECHO_N "checking linux/if.h presence... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ ac_header_preproc=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_preproc=no -+fi -+rm -f conftest.err conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -+echo "${ECHO_T}$ac_header_preproc" >&6 -+ -+# So? What about this header? -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) -+ { echo "$as_me:$LINENO: WARNING: linux/if.h: accepted by the compiler, rejected by the preprocessor!" >&5 -+echo "$as_me: WARNING: linux/if.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/if.h: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: linux/if.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { echo "$as_me:$LINENO: WARNING: linux/if.h: present but cannot be compiled" >&5 -+echo "$as_me: WARNING: linux/if.h: present but cannot be compiled" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/if.h: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: linux/if.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/if.h: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: linux/if.h: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/if.h: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: linux/if.h: section \"Present But Cannot Be Compiled\"" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/if.h: proceeding with the preprocessor's result" >&5 -+echo "$as_me: WARNING: linux/if.h: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/if.h: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: linux/if.h: in the future, the compiler will take precedence" >&2;} -+ ( -+ cat <<\_ASBOX -+## ---------------------------------- ## -+## Report this to vandrove@vc.cvut.cz ## -+## ---------------------------------- ## -+_ASBOX -+ ) | -+ sed "s/^/$as_me: WARNING: /" >&2 -+ ;; -+esac -+echo "$as_me:$LINENO: checking for linux/if.h" >&5 -+echo $ECHO_N "checking for linux/if.h... $ECHO_C" >&6 -+if test "${ac_cv_header_linux_if_h+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_cv_header_linux_if_h=$ac_header_preproc -+fi -+echo "$as_me:$LINENO: result: $ac_cv_header_linux_if_h" >&5 -+echo "${ECHO_T}$ac_cv_header_linux_if_h" >&6 -+ -+fi -+if test $ac_cv_header_linux_if_h = yes; then -+ ncp_net_if_h="#include " -+else -+ ncp_net_if_h="/* No interfaces support... */" -+ -+cat >>confdefs.h <<\_ACEOF -+#define NO_NET_IF_SUPPORT 1 -+_ACEOF -+ -+ { echo "$as_me:$LINENO: WARNING: Neither nor does exist" >&5 -+echo "$as_me: WARNING: Neither nor does exist" >&2;} -+ -+fi -+ -+ -+fi -+ -+ -+ -+ -+echo "$as_me:$LINENO: checking for net/route.h" >&5 -+echo $ECHO_N "checking for net/route.h... $ECHO_C" >&6 -+if test "${ac_cv_header_net_route_h+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#if HAVE_SYS_TYPES_H -+#include -+#endif -+#if HAVE_SYS_SOCKET_H -+#include -+#endif -+ -+ -+#include -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_header_net_route_h=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_header_net_route_h=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $ac_cv_header_net_route_h" >&5 -+echo "${ECHO_T}$ac_cv_header_net_route_h" >&6 -+if test $ac_cv_header_net_route_h = yes; then -+ ncp_net_route_h="#include " -+else -+ if test "${ac_cv_header_linux_route_h+set}" = set; then -+ echo "$as_me:$LINENO: checking for linux/route.h" >&5 -+echo $ECHO_N "checking for linux/route.h... $ECHO_C" >&6 -+if test "${ac_cv_header_linux_route_h+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+fi -+echo "$as_me:$LINENO: result: $ac_cv_header_linux_route_h" >&5 -+echo "${ECHO_T}$ac_cv_header_linux_route_h" >&6 -+else -+ # Is the header compilable? -+echo "$as_me:$LINENO: checking linux/route.h usability" >&5 -+echo $ECHO_N "checking linux/route.h usability... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+#include -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_header_compiler=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_header_compiler=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -+echo "${ECHO_T}$ac_header_compiler" >&6 -+ -+# Is the header present? -+echo "$as_me:$LINENO: checking linux/route.h presence" >&5 -+echo $ECHO_N "checking linux/route.h presence... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ ac_header_preproc=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_preproc=no -+fi -+rm -f conftest.err conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -+echo "${ECHO_T}$ac_header_preproc" >&6 -+ -+# So? What about this header? -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) -+ { echo "$as_me:$LINENO: WARNING: linux/route.h: accepted by the compiler, rejected by the preprocessor!" >&5 -+echo "$as_me: WARNING: linux/route.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/route.h: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: linux/route.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { echo "$as_me:$LINENO: WARNING: linux/route.h: present but cannot be compiled" >&5 -+echo "$as_me: WARNING: linux/route.h: present but cannot be compiled" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/route.h: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: linux/route.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/route.h: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: linux/route.h: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/route.h: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: linux/route.h: section \"Present But Cannot Be Compiled\"" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/route.h: proceeding with the preprocessor's result" >&5 -+echo "$as_me: WARNING: linux/route.h: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/route.h: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: linux/route.h: in the future, the compiler will take precedence" >&2;} -+ ( -+ cat <<\_ASBOX -+## ---------------------------------- ## -+## Report this to vandrove@vc.cvut.cz ## -+## ---------------------------------- ## -+_ASBOX -+ ) | -+ sed "s/^/$as_me: WARNING: /" >&2 -+ ;; -+esac -+echo "$as_me:$LINENO: checking for linux/route.h" >&5 -+echo $ECHO_N "checking for linux/route.h... $ECHO_C" >&6 -+if test "${ac_cv_header_linux_route_h+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_cv_header_linux_route_h=$ac_header_preproc -+fi -+echo "$as_me:$LINENO: result: $ac_cv_header_linux_route_h" >&5 -+echo "${ECHO_T}$ac_cv_header_linux_route_h" >&6 -+ -+fi -+if test $ac_cv_header_linux_route_h = yes; then -+ ncp_net_route_h="#include " -+else -+ ncp_net_route_h="/* No route support... */" -+ -+cat >>confdefs.h <<\_ACEOF -+#define NO_NET_ROUTE_SUPPORT 1 -+_ACEOF -+ -+ { { echo "$as_me:$LINENO: error: Neither nor does exist" >&5 -+echo "$as_me: error: Neither nor does exist" >&2;} -+ { (exit 1); exit 1; }; } -+ -+fi -+ -+ -+fi -+ -+ -+ -+ -+ncp_if_ether_support="yes" -+echo "$as_me:$LINENO: checking for netinet/if_ether.h" >&5 -+echo $ECHO_N "checking for netinet/if_ether.h... $ECHO_C" >&6 -+if test "${ac_cv_header_netinet_if_ether_h+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#if HAVE_SYS_TYPES_H -+#include -+#endif -+#if HAVE_SYS_SOCKET_H -+#include -+#endif -+ -+ -+#include -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_header_netinet_if_ether_h=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_header_netinet_if_ether_h=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: $ac_cv_header_netinet_if_ether_h" >&5 -+echo "${ECHO_T}$ac_cv_header_netinet_if_ether_h" >&6 -+ -+ -+if test "$ac_cv_header_netinet_if_ether_h" = "no" -+then -+ if test "${ac_cv_header_linux_if_ether_h+set}" = set; then -+ echo "$as_me:$LINENO: checking for linux/if_ether.h" >&5 -+echo $ECHO_N "checking for linux/if_ether.h... $ECHO_C" >&6 -+if test "${ac_cv_header_linux_if_ether_h+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+fi -+echo "$as_me:$LINENO: result: $ac_cv_header_linux_if_ether_h" >&5 -+echo "${ECHO_T}$ac_cv_header_linux_if_ether_h" >&6 -+else -+ # Is the header compilable? -+echo "$as_me:$LINENO: checking linux/if_ether.h usability" >&5 -+echo $ECHO_N "checking linux/if_ether.h usability... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+#include -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_header_compiler=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_header_compiler=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -+echo "${ECHO_T}$ac_header_compiler" >&6 -+ -+# Is the header present? -+echo "$as_me:$LINENO: checking linux/if_ether.h presence" >&5 -+echo $ECHO_N "checking linux/if_ether.h presence... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ ac_header_preproc=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_preproc=no -+fi -+rm -f conftest.err conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -+echo "${ECHO_T}$ac_header_preproc" >&6 -+ -+# So? What about this header? -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) -+ { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: accepted by the compiler, rejected by the preprocessor!" >&5 -+echo "$as_me: WARNING: linux/if_ether.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: linux/if_ether.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: present but cannot be compiled" >&5 -+echo "$as_me: WARNING: linux/if_ether.h: present but cannot be compiled" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: linux/if_ether.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: linux/if_ether.h: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: linux/if_ether.h: section \"Present But Cannot Be Compiled\"" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: proceeding with the preprocessor's result" >&5 -+echo "$as_me: WARNING: linux/if_ether.h: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: linux/if_ether.h: in the future, the compiler will take precedence" >&2;} -+ ( -+ cat <<\_ASBOX -+## ---------------------------------- ## -+## Report this to vandrove@vc.cvut.cz ## -+## ---------------------------------- ## -+_ASBOX -+ ) | -+ sed "s/^/$as_me: WARNING: /" >&2 -+ ;; -+esac -+echo "$as_me:$LINENO: checking for linux/if_ether.h" >&5 -+echo $ECHO_N "checking for linux/if_ether.h... $ECHO_C" >&6 -+if test "${ac_cv_header_linux_if_ether_h+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_cv_header_linux_if_ether_h=$ac_header_preproc -+fi -+echo "$as_me:$LINENO: result: $ac_cv_header_linux_if_ether_h" >&5 -+echo "${ECHO_T}$ac_cv_header_linux_if_ether_h" >&6 -+ -+fi -+ -+ -+ if test "$ac_cv_header_linux_if_ether_h" = "no" -+ then -+ ncp_if_ether_support="no" -+ fi -+fi -+ -+ -+if test "${ac_cv_header_sys_select_h+set}" = set; then -+ echo "$as_me:$LINENO: checking for sys/select.h" >&5 -+echo $ECHO_N "checking for sys/select.h... $ECHO_C" >&6 -+if test "${ac_cv_header_sys_select_h+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+fi -+echo "$as_me:$LINENO: result: $ac_cv_header_sys_select_h" >&5 -+echo "${ECHO_T}$ac_cv_header_sys_select_h" >&6 -+else -+ # Is the header compilable? -+echo "$as_me:$LINENO: checking sys/select.h usability" >&5 -+echo $ECHO_N "checking sys/select.h usability... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+#include -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_header_compiler=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_header_compiler=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -+echo "${ECHO_T}$ac_header_compiler" >&6 -+ -+# Is the header present? -+echo "$as_me:$LINENO: checking sys/select.h presence" >&5 -+echo $ECHO_N "checking sys/select.h presence... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ ac_header_preproc=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_preproc=no -+fi -+rm -f conftest.err conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -+echo "${ECHO_T}$ac_header_preproc" >&6 -+ -+# So? What about this header? -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) -+ { echo "$as_me:$LINENO: WARNING: sys/select.h: accepted by the compiler, rejected by the preprocessor!" >&5 -+echo "$as_me: WARNING: sys/select.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { echo "$as_me:$LINENO: WARNING: sys/select.h: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: sys/select.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { echo "$as_me:$LINENO: WARNING: sys/select.h: present but cannot be compiled" >&5 -+echo "$as_me: WARNING: sys/select.h: present but cannot be compiled" >&2;} -+ { echo "$as_me:$LINENO: WARNING: sys/select.h: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: sys/select.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: sys/select.h: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: sys/select.h: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: sys/select.h: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: sys/select.h: section \"Present But Cannot Be Compiled\"" >&2;} -+ { echo "$as_me:$LINENO: WARNING: sys/select.h: proceeding with the preprocessor's result" >&5 -+echo "$as_me: WARNING: sys/select.h: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: sys/select.h: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: sys/select.h: in the future, the compiler will take precedence" >&2;} -+ ( -+ cat <<\_ASBOX -+## ---------------------------------- ## -+## Report this to vandrove@vc.cvut.cz ## -+## ---------------------------------- ## -+_ASBOX -+ ) | -+ sed "s/^/$as_me: WARNING: /" >&2 -+ ;; -+esac -+echo "$as_me:$LINENO: checking for sys/select.h" >&5 -+echo $ECHO_N "checking for sys/select.h... $ECHO_C" >&6 -+if test "${ac_cv_header_sys_select_h+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_cv_header_sys_select_h=$ac_header_preproc -+fi -+echo "$as_me:$LINENO: result: $ac_cv_header_sys_select_h" >&5 -+echo "${ECHO_T}$ac_cv_header_sys_select_h" >&6 -+ -+fi -+if test $ac_cv_header_sys_select_h = yes; then -+ ncp_sys_select_h="#include " -+else -+ ncp_sys_select_h="#include " -+ -+fi -+ -+ -+ -+ -+echo "$as_me:$LINENO: checking for C9X integer types" >&5 -+echo $ECHO_N "checking for C9X integer types... $ECHO_C" >&6 -+if test "${ncp_cv_c9x_stdint+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+int_least16_t sl16; -+int_least32_t sl32; -+uint_least16_t ul16; -+uint_least32_t ul32; -+int_fast16_t sf16; -+int_fast32_t sf32; -+uint_fast16_t uf16; -+uint_fast32_t uf32 -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ncp_cv_c9x_stdint="yes" -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ncp_cv_c9x_stdint="no" -+ -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+fi -+echo "$as_me:$LINENO: result: $ncp_cv_c9x_stdint" >&5 -+echo "${ECHO_T}$ncp_cv_c9x_stdint" >&6 -+if test "$ncp_cv_c9x_stdint" = "yes" -+then -+ stdint_types="1" -+else -+ stdint_types="0" -+fi -+ -+ -+if test "$USE_KERNEL" = "1" -+then -+ if test "$ncp_sys_select_h" = "#include " -+ then -+ echo "$as_me:$LINENO: checking whether sys/select.h and linux/posix_types.h may both be included" >&5 -+echo $ECHO_N "checking whether sys/select.h and linux/posix_types.h may both be included... $ECHO_C" >&6 -+if test "${ncp_cv_posix_and_select+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+int -+main () -+{ -+fd_set a; -+select(0, &a, &a, &a, 0) -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ncp_cv_posix_and_select="yes" -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ncp_cv_posix_and_select="no" -+ -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+fi -+echo "$as_me:$LINENO: result: $ncp_cv_posix_and_select" >&5 -+echo "${ECHO_T}$ncp_cv_posix_and_select" >&6 -+ else -+ ncp_cv_posix_and_select="yes" -+ fi -+ if test "$ncp_cv_posix_and_select" = "no" -+ then -+ { echo "$as_me:$LINENO: WARNING: sys/select.h and linux/posix_types.h cannot be included together, will not build kernel support" >&5 -+echo "$as_me: WARNING: sys/select.h and linux/posix_types.h cannot be included together, will not build kernel support" >&2;} -+ USE_KERNEL=0 -+ fi -+fi - - if test "${ac_cv_header_sys_mount_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/mount.h" >&5 -@@ -10632,19 +11835,18 @@ fi - fi - - --if test "$ac_cv_header_sys_mount_h" = "no" -+ncp_sys_mount_h="/* sys/mount.h does not exist */" -+ncp_linux_fs_h="/* linux/fs.h not needed */" -+if test "$USE_KERNEL" = "1" - then -- if test "$USE_KERNEL" = "1" -+ if test "$ac_cv_header_sys_mount_h" = "no" - then - { echo "$as_me:$LINENO: WARNING: Cannot build kernel support because of no sys/mount.h file" >&5 - echo "$as_me: WARNING: Cannot build kernel support because of no sys/mount.h file" >&2;} - USE_KERNEL=0 -- fi -- ncp_sys_mount_h="/* sys/mount.h does not exist */" -- ncp_linux_fs_h="/* linux/fs.h is not needed */" --else -- ncp_sys_mount_h="#include " -- echo "$as_me:$LINENO: checking for mount constants in sys/mount.h" >&5 -+ else -+ ncp_sys_mount_h="#include " -+ echo "$as_me:$LINENO: checking for mount constants in sys/mount.h" >&5 - echo $ECHO_N "checking for mount constants in sys/mount.h... $ECHO_C" >&6 - if test "${ncp_cv_linux_fs_needed+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -10685,12 +11887,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- ncp_cv_linux_fs_needed="yes" -+ ncp_cv_linux_fs_needed="no" - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --ncp_cv_linux_fs_needed="no" -+ncp_cv_linux_fs_needed="yes" - - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -@@ -10698,1179 +11900,14 @@ fi - fi - echo "$as_me:$LINENO: result: $ncp_cv_linux_fs_needed" >&5 - echo "${ECHO_T}$ncp_cv_linux_fs_needed" >&6 -- if test "$ncp_cv_linux_fs_needed" = "yes"; then -- ncp_linux_fs_h="/* linux/fs.h not needed */" -- else -- ncp_linux_fs_h="#include " -+ if test "$ncp_cv_linux_fs_needed" = "yes"; then -+ ncp_linux_fs_h="#include " -+ fi - fi - fi - - - --if test "${ac_cv_header_net_if_h+set}" = set; then -- echo "$as_me:$LINENO: checking for net/if.h" >&5 --echo $ECHO_N "checking for net/if.h... $ECHO_C" >&6 --if test "${ac_cv_header_net_if_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --fi --echo "$as_me:$LINENO: result: $ac_cv_header_net_if_h" >&5 --echo "${ECHO_T}$ac_cv_header_net_if_h" >&6 --else -- # Is the header compilable? --echo "$as_me:$LINENO: checking net/if.h usability" >&5 --echo $ECHO_N "checking net/if.h usability... $ECHO_C" >&6 --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --#include --_ACEOF --rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_header_compiler=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_header_compiler=no --fi --rm -f conftest.err conftest.$ac_objext conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 --echo "${ECHO_T}$ac_header_compiler" >&6 -- --# Is the header present? --echo "$as_me:$LINENO: checking net/if.h presence" >&5 --echo $ECHO_N "checking net/if.h presence... $ECHO_C" >&6 --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include --_ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -- ac_header_preproc=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_header_preproc=no --fi --rm -f conftest.err conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 --echo "${ECHO_T}$ac_header_preproc" >&6 -- --# So? What about this header? --case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -- yes:no: ) -- { echo "$as_me:$LINENO: WARNING: net/if.h: accepted by the compiler, rejected by the preprocessor!" >&5 --echo "$as_me: WARNING: net/if.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: net/if.h: proceeding with the compiler's result" >&5 --echo "$as_me: WARNING: net/if.h: proceeding with the compiler's result" >&2;} -- ac_header_preproc=yes -- ;; -- no:yes:* ) -- { echo "$as_me:$LINENO: WARNING: net/if.h: present but cannot be compiled" >&5 --echo "$as_me: WARNING: net/if.h: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: net/if.h: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: net/if.h: check for missing prerequisite headers?" >&2;} -- { echo "$as_me:$LINENO: WARNING: net/if.h: see the Autoconf documentation" >&5 --echo "$as_me: WARNING: net/if.h: see the Autoconf documentation" >&2;} -- { echo "$as_me:$LINENO: WARNING: net/if.h: section \"Present But Cannot Be Compiled\"" >&5 --echo "$as_me: WARNING: net/if.h: section \"Present But Cannot Be Compiled\"" >&2;} -- { echo "$as_me:$LINENO: WARNING: net/if.h: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: net/if.h: proceeding with the preprocessor's result" >&2;} -- { echo "$as_me:$LINENO: WARNING: net/if.h: in the future, the compiler will take precedence" >&5 --echo "$as_me: WARNING: net/if.h: in the future, the compiler will take precedence" >&2;} -- ( -- cat <<\_ASBOX --## ---------------------------------- ## --## Report this to vandrove@vc.cvut.cz ## --## ---------------------------------- ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -- ;; --esac --echo "$as_me:$LINENO: checking for net/if.h" >&5 --echo $ECHO_N "checking for net/if.h... $ECHO_C" >&6 --if test "${ac_cv_header_net_if_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_cv_header_net_if_h=$ac_header_preproc --fi --echo "$as_me:$LINENO: result: $ac_cv_header_net_if_h" >&5 --echo "${ECHO_T}$ac_cv_header_net_if_h" >&6 -- --fi --if test $ac_cv_header_net_if_h = yes; then -- ncp_net_if_h="#include " --else -- if test "${ac_cv_header_linux_if_h+set}" = set; then -- echo "$as_me:$LINENO: checking for linux/if.h" >&5 --echo $ECHO_N "checking for linux/if.h... $ECHO_C" >&6 --if test "${ac_cv_header_linux_if_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --fi --echo "$as_me:$LINENO: result: $ac_cv_header_linux_if_h" >&5 --echo "${ECHO_T}$ac_cv_header_linux_if_h" >&6 --else -- # Is the header compilable? --echo "$as_me:$LINENO: checking linux/if.h usability" >&5 --echo $ECHO_N "checking linux/if.h usability... $ECHO_C" >&6 --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --#include --_ACEOF --rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_header_compiler=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_header_compiler=no --fi --rm -f conftest.err conftest.$ac_objext conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 --echo "${ECHO_T}$ac_header_compiler" >&6 -- --# Is the header present? --echo "$as_me:$LINENO: checking linux/if.h presence" >&5 --echo $ECHO_N "checking linux/if.h presence... $ECHO_C" >&6 --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include --_ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -- ac_header_preproc=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_header_preproc=no --fi --rm -f conftest.err conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 --echo "${ECHO_T}$ac_header_preproc" >&6 -- --# So? What about this header? --case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -- yes:no: ) -- { echo "$as_me:$LINENO: WARNING: linux/if.h: accepted by the compiler, rejected by the preprocessor!" >&5 --echo "$as_me: WARNING: linux/if.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: linux/if.h: proceeding with the compiler's result" >&5 --echo "$as_me: WARNING: linux/if.h: proceeding with the compiler's result" >&2;} -- ac_header_preproc=yes -- ;; -- no:yes:* ) -- { echo "$as_me:$LINENO: WARNING: linux/if.h: present but cannot be compiled" >&5 --echo "$as_me: WARNING: linux/if.h: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: linux/if.h: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: linux/if.h: check for missing prerequisite headers?" >&2;} -- { echo "$as_me:$LINENO: WARNING: linux/if.h: see the Autoconf documentation" >&5 --echo "$as_me: WARNING: linux/if.h: see the Autoconf documentation" >&2;} -- { echo "$as_me:$LINENO: WARNING: linux/if.h: section \"Present But Cannot Be Compiled\"" >&5 --echo "$as_me: WARNING: linux/if.h: section \"Present But Cannot Be Compiled\"" >&2;} -- { echo "$as_me:$LINENO: WARNING: linux/if.h: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: linux/if.h: proceeding with the preprocessor's result" >&2;} -- { echo "$as_me:$LINENO: WARNING: linux/if.h: in the future, the compiler will take precedence" >&5 --echo "$as_me: WARNING: linux/if.h: in the future, the compiler will take precedence" >&2;} -- ( -- cat <<\_ASBOX --## ---------------------------------- ## --## Report this to vandrove@vc.cvut.cz ## --## ---------------------------------- ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -- ;; --esac --echo "$as_me:$LINENO: checking for linux/if.h" >&5 --echo $ECHO_N "checking for linux/if.h... $ECHO_C" >&6 --if test "${ac_cv_header_linux_if_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_cv_header_linux_if_h=$ac_header_preproc --fi --echo "$as_me:$LINENO: result: $ac_cv_header_linux_if_h" >&5 --echo "${ECHO_T}$ac_cv_header_linux_if_h" >&6 -- --fi --if test $ac_cv_header_linux_if_h = yes; then -- ncp_net_if_h="#include " --else -- ncp_net_if_h="/* No interfaces support... */" -- --cat >>confdefs.h <<\_ACEOF --#define NO_NET_IF_SUPPORT 1 --_ACEOF -- -- { echo "$as_me:$LINENO: WARNING: Neither nor does exist" >&5 --echo "$as_me: WARNING: Neither nor does exist" >&2;} -- --fi -- -- -- --fi -- -- -- -- --if test "${ac_cv_header_net_route_h+set}" = set; then -- echo "$as_me:$LINENO: checking for net/route.h" >&5 --echo $ECHO_N "checking for net/route.h... $ECHO_C" >&6 --if test "${ac_cv_header_net_route_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --fi --echo "$as_me:$LINENO: result: $ac_cv_header_net_route_h" >&5 --echo "${ECHO_T}$ac_cv_header_net_route_h" >&6 --else -- # Is the header compilable? --echo "$as_me:$LINENO: checking net/route.h usability" >&5 --echo $ECHO_N "checking net/route.h usability... $ECHO_C" >&6 --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --#include --_ACEOF --rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_header_compiler=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_header_compiler=no --fi --rm -f conftest.err conftest.$ac_objext conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 --echo "${ECHO_T}$ac_header_compiler" >&6 -- --# Is the header present? --echo "$as_me:$LINENO: checking net/route.h presence" >&5 --echo $ECHO_N "checking net/route.h presence... $ECHO_C" >&6 --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include --_ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -- ac_header_preproc=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_header_preproc=no --fi --rm -f conftest.err conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 --echo "${ECHO_T}$ac_header_preproc" >&6 -- --# So? What about this header? --case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -- yes:no: ) -- { echo "$as_me:$LINENO: WARNING: net/route.h: accepted by the compiler, rejected by the preprocessor!" >&5 --echo "$as_me: WARNING: net/route.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: net/route.h: proceeding with the compiler's result" >&5 --echo "$as_me: WARNING: net/route.h: proceeding with the compiler's result" >&2;} -- ac_header_preproc=yes -- ;; -- no:yes:* ) -- { echo "$as_me:$LINENO: WARNING: net/route.h: present but cannot be compiled" >&5 --echo "$as_me: WARNING: net/route.h: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: net/route.h: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: net/route.h: check for missing prerequisite headers?" >&2;} -- { echo "$as_me:$LINENO: WARNING: net/route.h: see the Autoconf documentation" >&5 --echo "$as_me: WARNING: net/route.h: see the Autoconf documentation" >&2;} -- { echo "$as_me:$LINENO: WARNING: net/route.h: section \"Present But Cannot Be Compiled\"" >&5 --echo "$as_me: WARNING: net/route.h: section \"Present But Cannot Be Compiled\"" >&2;} -- { echo "$as_me:$LINENO: WARNING: net/route.h: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: net/route.h: proceeding with the preprocessor's result" >&2;} -- { echo "$as_me:$LINENO: WARNING: net/route.h: in the future, the compiler will take precedence" >&5 --echo "$as_me: WARNING: net/route.h: in the future, the compiler will take precedence" >&2;} -- ( -- cat <<\_ASBOX --## ---------------------------------- ## --## Report this to vandrove@vc.cvut.cz ## --## ---------------------------------- ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -- ;; --esac --echo "$as_me:$LINENO: checking for net/route.h" >&5 --echo $ECHO_N "checking for net/route.h... $ECHO_C" >&6 --if test "${ac_cv_header_net_route_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_cv_header_net_route_h=$ac_header_preproc --fi --echo "$as_me:$LINENO: result: $ac_cv_header_net_route_h" >&5 --echo "${ECHO_T}$ac_cv_header_net_route_h" >&6 -- --fi --if test $ac_cv_header_net_route_h = yes; then -- ncp_net_route_h="#include " --else -- if test "${ac_cv_header_linux_route_h+set}" = set; then -- echo "$as_me:$LINENO: checking for linux/route.h" >&5 --echo $ECHO_N "checking for linux/route.h... $ECHO_C" >&6 --if test "${ac_cv_header_linux_route_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --fi --echo "$as_me:$LINENO: result: $ac_cv_header_linux_route_h" >&5 --echo "${ECHO_T}$ac_cv_header_linux_route_h" >&6 --else -- # Is the header compilable? --echo "$as_me:$LINENO: checking linux/route.h usability" >&5 --echo $ECHO_N "checking linux/route.h usability... $ECHO_C" >&6 --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --#include --_ACEOF --rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_header_compiler=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_header_compiler=no --fi --rm -f conftest.err conftest.$ac_objext conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 --echo "${ECHO_T}$ac_header_compiler" >&6 -- --# Is the header present? --echo "$as_me:$LINENO: checking linux/route.h presence" >&5 --echo $ECHO_N "checking linux/route.h presence... $ECHO_C" >&6 --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include --_ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -- ac_header_preproc=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_header_preproc=no --fi --rm -f conftest.err conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 --echo "${ECHO_T}$ac_header_preproc" >&6 -- --# So? What about this header? --case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -- yes:no: ) -- { echo "$as_me:$LINENO: WARNING: linux/route.h: accepted by the compiler, rejected by the preprocessor!" >&5 --echo "$as_me: WARNING: linux/route.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: linux/route.h: proceeding with the compiler's result" >&5 --echo "$as_me: WARNING: linux/route.h: proceeding with the compiler's result" >&2;} -- ac_header_preproc=yes -- ;; -- no:yes:* ) -- { echo "$as_me:$LINENO: WARNING: linux/route.h: present but cannot be compiled" >&5 --echo "$as_me: WARNING: linux/route.h: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: linux/route.h: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: linux/route.h: check for missing prerequisite headers?" >&2;} -- { echo "$as_me:$LINENO: WARNING: linux/route.h: see the Autoconf documentation" >&5 --echo "$as_me: WARNING: linux/route.h: see the Autoconf documentation" >&2;} -- { echo "$as_me:$LINENO: WARNING: linux/route.h: section \"Present But Cannot Be Compiled\"" >&5 --echo "$as_me: WARNING: linux/route.h: section \"Present But Cannot Be Compiled\"" >&2;} -- { echo "$as_me:$LINENO: WARNING: linux/route.h: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: linux/route.h: proceeding with the preprocessor's result" >&2;} -- { echo "$as_me:$LINENO: WARNING: linux/route.h: in the future, the compiler will take precedence" >&5 --echo "$as_me: WARNING: linux/route.h: in the future, the compiler will take precedence" >&2;} -- ( -- cat <<\_ASBOX --## ---------------------------------- ## --## Report this to vandrove@vc.cvut.cz ## --## ---------------------------------- ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -- ;; --esac --echo "$as_me:$LINENO: checking for linux/route.h" >&5 --echo $ECHO_N "checking for linux/route.h... $ECHO_C" >&6 --if test "${ac_cv_header_linux_route_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_cv_header_linux_route_h=$ac_header_preproc --fi --echo "$as_me:$LINENO: result: $ac_cv_header_linux_route_h" >&5 --echo "${ECHO_T}$ac_cv_header_linux_route_h" >&6 -- --fi --if test $ac_cv_header_linux_route_h = yes; then -- ncp_net_route_h="#include " --else -- ncp_net_route_h="/* No route support... */" -- --cat >>confdefs.h <<\_ACEOF --#define NO_NET_ROUTE_SUPPORT 1 --_ACEOF -- -- { { echo "$as_me:$LINENO: error: Neither nor does exist" >&5 --echo "$as_me: error: Neither nor does exist" >&2;} -- { (exit 1); exit 1; }; } -- --fi -- -- -- --fi -- -- -- -- --ncp_if_ether_support="yes" --if test "${ac_cv_header_netinet_if_ether_h+set}" = set; then -- echo "$as_me:$LINENO: checking for netinet/if_ether.h" >&5 --echo $ECHO_N "checking for netinet/if_ether.h... $ECHO_C" >&6 --if test "${ac_cv_header_netinet_if_ether_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --fi --echo "$as_me:$LINENO: result: $ac_cv_header_netinet_if_ether_h" >&5 --echo "${ECHO_T}$ac_cv_header_netinet_if_ether_h" >&6 --else -- # Is the header compilable? --echo "$as_me:$LINENO: checking netinet/if_ether.h usability" >&5 --echo $ECHO_N "checking netinet/if_ether.h usability... $ECHO_C" >&6 --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --#include --_ACEOF --rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_header_compiler=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_header_compiler=no --fi --rm -f conftest.err conftest.$ac_objext conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 --echo "${ECHO_T}$ac_header_compiler" >&6 -- --# Is the header present? --echo "$as_me:$LINENO: checking netinet/if_ether.h presence" >&5 --echo $ECHO_N "checking netinet/if_ether.h presence... $ECHO_C" >&6 --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include --_ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -- ac_header_preproc=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_header_preproc=no --fi --rm -f conftest.err conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 --echo "${ECHO_T}$ac_header_preproc" >&6 -- --# So? What about this header? --case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -- yes:no: ) -- { echo "$as_me:$LINENO: WARNING: netinet/if_ether.h: accepted by the compiler, rejected by the preprocessor!" >&5 --echo "$as_me: WARNING: netinet/if_ether.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: netinet/if_ether.h: proceeding with the compiler's result" >&5 --echo "$as_me: WARNING: netinet/if_ether.h: proceeding with the compiler's result" >&2;} -- ac_header_preproc=yes -- ;; -- no:yes:* ) -- { echo "$as_me:$LINENO: WARNING: netinet/if_ether.h: present but cannot be compiled" >&5 --echo "$as_me: WARNING: netinet/if_ether.h: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: netinet/if_ether.h: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: netinet/if_ether.h: check for missing prerequisite headers?" >&2;} -- { echo "$as_me:$LINENO: WARNING: netinet/if_ether.h: see the Autoconf documentation" >&5 --echo "$as_me: WARNING: netinet/if_ether.h: see the Autoconf documentation" >&2;} -- { echo "$as_me:$LINENO: WARNING: netinet/if_ether.h: section \"Present But Cannot Be Compiled\"" >&5 --echo "$as_me: WARNING: netinet/if_ether.h: section \"Present But Cannot Be Compiled\"" >&2;} -- { echo "$as_me:$LINENO: WARNING: netinet/if_ether.h: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: netinet/if_ether.h: proceeding with the preprocessor's result" >&2;} -- { echo "$as_me:$LINENO: WARNING: netinet/if_ether.h: in the future, the compiler will take precedence" >&5 --echo "$as_me: WARNING: netinet/if_ether.h: in the future, the compiler will take precedence" >&2;} -- ( -- cat <<\_ASBOX --## ---------------------------------- ## --## Report this to vandrove@vc.cvut.cz ## --## ---------------------------------- ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -- ;; --esac --echo "$as_me:$LINENO: checking for netinet/if_ether.h" >&5 --echo $ECHO_N "checking for netinet/if_ether.h... $ECHO_C" >&6 --if test "${ac_cv_header_netinet_if_ether_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_cv_header_netinet_if_ether_h=$ac_header_preproc --fi --echo "$as_me:$LINENO: result: $ac_cv_header_netinet_if_ether_h" >&5 --echo "${ECHO_T}$ac_cv_header_netinet_if_ether_h" >&6 -- --fi -- -- --if test "$ac_cv_header_netinet_if_ether_h" = "no" --then -- if test "${ac_cv_header_linux_if_ether_h+set}" = set; then -- echo "$as_me:$LINENO: checking for linux/if_ether.h" >&5 --echo $ECHO_N "checking for linux/if_ether.h... $ECHO_C" >&6 --if test "${ac_cv_header_linux_if_ether_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --fi --echo "$as_me:$LINENO: result: $ac_cv_header_linux_if_ether_h" >&5 --echo "${ECHO_T}$ac_cv_header_linux_if_ether_h" >&6 --else -- # Is the header compilable? --echo "$as_me:$LINENO: checking linux/if_ether.h usability" >&5 --echo $ECHO_N "checking linux/if_ether.h usability... $ECHO_C" >&6 --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --#include --_ACEOF --rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_header_compiler=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_header_compiler=no --fi --rm -f conftest.err conftest.$ac_objext conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 --echo "${ECHO_T}$ac_header_compiler" >&6 -- --# Is the header present? --echo "$as_me:$LINENO: checking linux/if_ether.h presence" >&5 --echo $ECHO_N "checking linux/if_ether.h presence... $ECHO_C" >&6 --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include --_ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -- ac_header_preproc=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_header_preproc=no --fi --rm -f conftest.err conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 --echo "${ECHO_T}$ac_header_preproc" >&6 -- --# So? What about this header? --case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -- yes:no: ) -- { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: accepted by the compiler, rejected by the preprocessor!" >&5 --echo "$as_me: WARNING: linux/if_ether.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: proceeding with the compiler's result" >&5 --echo "$as_me: WARNING: linux/if_ether.h: proceeding with the compiler's result" >&2;} -- ac_header_preproc=yes -- ;; -- no:yes:* ) -- { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: present but cannot be compiled" >&5 --echo "$as_me: WARNING: linux/if_ether.h: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: linux/if_ether.h: check for missing prerequisite headers?" >&2;} -- { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: see the Autoconf documentation" >&5 --echo "$as_me: WARNING: linux/if_ether.h: see the Autoconf documentation" >&2;} -- { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: section \"Present But Cannot Be Compiled\"" >&5 --echo "$as_me: WARNING: linux/if_ether.h: section \"Present But Cannot Be Compiled\"" >&2;} -- { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: linux/if_ether.h: proceeding with the preprocessor's result" >&2;} -- { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: in the future, the compiler will take precedence" >&5 --echo "$as_me: WARNING: linux/if_ether.h: in the future, the compiler will take precedence" >&2;} -- ( -- cat <<\_ASBOX --## ---------------------------------- ## --## Report this to vandrove@vc.cvut.cz ## --## ---------------------------------- ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -- ;; --esac --echo "$as_me:$LINENO: checking for linux/if_ether.h" >&5 --echo $ECHO_N "checking for linux/if_ether.h... $ECHO_C" >&6 --if test "${ac_cv_header_linux_if_ether_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_cv_header_linux_if_ether_h=$ac_header_preproc --fi --echo "$as_me:$LINENO: result: $ac_cv_header_linux_if_ether_h" >&5 --echo "${ECHO_T}$ac_cv_header_linux_if_ether_h" >&6 -- --fi -- -- -- if test "$ac_cv_header_linux_if_ether_h" = "no" -- then -- ncp_if_ether_support="no" -- fi --fi -- -- --if test "${ac_cv_header_sys_select_h+set}" = set; then -- echo "$as_me:$LINENO: checking for sys/select.h" >&5 --echo $ECHO_N "checking for sys/select.h... $ECHO_C" >&6 --if test "${ac_cv_header_sys_select_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --fi --echo "$as_me:$LINENO: result: $ac_cv_header_sys_select_h" >&5 --echo "${ECHO_T}$ac_cv_header_sys_select_h" >&6 --else -- # Is the header compilable? --echo "$as_me:$LINENO: checking sys/select.h usability" >&5 --echo $ECHO_N "checking sys/select.h usability... $ECHO_C" >&6 --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --#include --_ACEOF --rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_header_compiler=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_header_compiler=no --fi --rm -f conftest.err conftest.$ac_objext conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 --echo "${ECHO_T}$ac_header_compiler" >&6 -- --# Is the header present? --echo "$as_me:$LINENO: checking sys/select.h presence" >&5 --echo $ECHO_N "checking sys/select.h presence... $ECHO_C" >&6 --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include --_ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -- ac_header_preproc=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_header_preproc=no --fi --rm -f conftest.err conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 --echo "${ECHO_T}$ac_header_preproc" >&6 -- --# So? What about this header? --case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -- yes:no: ) -- { echo "$as_me:$LINENO: WARNING: sys/select.h: accepted by the compiler, rejected by the preprocessor!" >&5 --echo "$as_me: WARNING: sys/select.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: sys/select.h: proceeding with the compiler's result" >&5 --echo "$as_me: WARNING: sys/select.h: proceeding with the compiler's result" >&2;} -- ac_header_preproc=yes -- ;; -- no:yes:* ) -- { echo "$as_me:$LINENO: WARNING: sys/select.h: present but cannot be compiled" >&5 --echo "$as_me: WARNING: sys/select.h: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: sys/select.h: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: sys/select.h: check for missing prerequisite headers?" >&2;} -- { echo "$as_me:$LINENO: WARNING: sys/select.h: see the Autoconf documentation" >&5 --echo "$as_me: WARNING: sys/select.h: see the Autoconf documentation" >&2;} -- { echo "$as_me:$LINENO: WARNING: sys/select.h: section \"Present But Cannot Be Compiled\"" >&5 --echo "$as_me: WARNING: sys/select.h: section \"Present But Cannot Be Compiled\"" >&2;} -- { echo "$as_me:$LINENO: WARNING: sys/select.h: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: sys/select.h: proceeding with the preprocessor's result" >&2;} -- { echo "$as_me:$LINENO: WARNING: sys/select.h: in the future, the compiler will take precedence" >&5 --echo "$as_me: WARNING: sys/select.h: in the future, the compiler will take precedence" >&2;} -- ( -- cat <<\_ASBOX --## ---------------------------------- ## --## Report this to vandrove@vc.cvut.cz ## --## ---------------------------------- ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -- ;; --esac --echo "$as_me:$LINENO: checking for sys/select.h" >&5 --echo $ECHO_N "checking for sys/select.h... $ECHO_C" >&6 --if test "${ac_cv_header_sys_select_h+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_cv_header_sys_select_h=$ac_header_preproc --fi --echo "$as_me:$LINENO: result: $ac_cv_header_sys_select_h" >&5 --echo "${ECHO_T}$ac_cv_header_sys_select_h" >&6 -- --fi --if test $ac_cv_header_sys_select_h = yes; then -- ncp_sys_select_h="#include " --else -- ncp_sys_select_h="#include " -- --fi -- -- -- -- --echo "$as_me:$LINENO: checking for C9X integer types" >&5 --echo $ECHO_N "checking for C9X integer types... $ECHO_C" >&6 --if test "${ncp_cv_c9x_stdint+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include --int --main () --{ --int_least16_t sl16; --int_least32_t sl32; --uint_least16_t ul16; --uint_least32_t ul32; --int_fast16_t sf16; --int_fast32_t sf32; --uint_fast16_t uf16; --uint_fast32_t uf32 -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ncp_cv_c9x_stdint="yes" --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ncp_cv_c9x_stdint="no" -- --fi --rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -- --fi --echo "$as_me:$LINENO: result: $ncp_cv_c9x_stdint" >&5 --echo "${ECHO_T}$ncp_cv_c9x_stdint" >&6 --if test "$ncp_cv_c9x_stdint" = "yes" --then -- stdint_types="1" --else -- stdint_types="0" --fi -- -- --if test "$USE_KERNEL" = "1" --then -- if test "$ncp_sys_select_h" = "#include " -- then -- echo "$as_me:$LINENO: checking whether sys/select.h and linux/posix_types.h may both be included" >&5 --echo $ECHO_N "checking whether sys/select.h and linux/posix_types.h may both be included... $ECHO_C" >&6 --if test "${ncp_cv_posix_and_select+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include --#include --int --main () --{ --fd_set a; --select(0, &a, &a, &a, 0) -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ncp_cv_posix_and_select="yes" --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ncp_cv_posix_and_select="no" -- --fi --rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -- --fi --echo "$as_me:$LINENO: result: $ncp_cv_posix_and_select" >&5 --echo "${ECHO_T}$ncp_cv_posix_and_select" >&6 -- else -- ncp_cv_posix_and_select="yes" -- fi -- if test "$ncp_cv_posix_and_select" = "no" -- then -- { echo "$as_me:$LINENO: WARNING: sys/select.h and linux/posix_types.h cannot be included together, will not build kernel support" >&5 --echo "$as_me: WARNING: sys/select.h and linux/posix_types.h cannot be included together, will not build kernel support" >&2;} -- USE_KERNEL=0 -- fi --fi - - echo "$as_me:$LINENO: checking for third parameter to accept" >&5 - echo $ECHO_N "checking for third parameter to accept... $ECHO_C" >&6 -@@ -11883,7 +11920,13 @@ cat confdefs.h >>conftest.$ac_ext - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#include -+#if HAVE_SYS_TYPES_H -+#include -+#endif -+#if HAVE_SYS_SOCKET_H - #include -+#endif - int - main () - { -@@ -11925,7 +11968,13 @@ cat confdefs.h >>conftest.$ac_ext - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#include -+#if HAVE_SYS_TYPES_H -+#include -+#endif -+#if HAVE_SYS_SOCKET_H - #include -+#endif - int - main () - { -@@ -11991,8 +12040,12 @@ cat confdefs.h >>conftest.$ac_ext - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#if HAVE_SYS_TYPES_H - #include -+#endif -+#if HAVE_SYS_SOCKET_H - #include -+#endif - int - main () - { -@@ -12058,8 +12111,12 @@ cat confdefs.h >>conftest.$ac_ext - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#if HAVE_SYS_TYPES_H - #include -+#endif -+#if HAVE_SYS_SOCKET_H - #include -+#endif - struct msghdr msg; - int - main () -@@ -14971,13 +15028,13 @@ s,@ncp_ipx_headers_2@,$ncp_ipx_headers_2 - s,@ncp_ipx_headers_2@,$ncp_ipx_headers_2,;t t - s,@ncp_ipx_defsiocprotoprivate@,$ncp_ipx_defsiocprotoprivate,;t t - s,@ncp_ipx_defsiocaipx@,$ncp_ipx_defsiocaipx,;t t --s,@ncp_sys_mount_h@,$ncp_sys_mount_h,;t t --s,@ncp_linux_fs_h@,$ncp_linux_fs_h,;t t - s,@ncp_net_if_h@,$ncp_net_if_h,;t t - s,@ncp_net_route_h@,$ncp_net_route_h,;t t - s,@ncp_if_ether_support@,$ncp_if_ether_support,;t t - s,@ncp_sys_select_h@,$ncp_sys_select_h,;t t - s,@stdint_types@,$stdint_types,;t t -+s,@ncp_sys_mount_h@,$ncp_sys_mount_h,;t t -+s,@ncp_linux_fs_h@,$ncp_linux_fs_h,;t t - s,@socklen_t@,$socklen_t,;t t - s,@wchar_h@,$wchar_h,;t t - s,@LIB_PAM_SECURITY@,$LIB_PAM_SECURITY,;t t -diff -r 81e0853d48a9 -r 8341fcd1dc86 configure.ac ---- a/configure.ac Sat May 28 19:59:35 2005 +0000 -+++ b/configure.ac Sat May 28 20:02:00 2005 +0000 -@@ -245,10 +245,30 @@ localedir="\${prefix}/$DATADIRNAME/local - localedir="\${prefix}/$DATADIRNAME/locale" - AC_SUBST(localedir) - -+AC_CHECK_HEADERS([sys/types.h]) -+AC_CHECK_HEADERS([sys/socket.h], [], [], -+[#if HAVE_SYS_TYPES_H -+#include -+#endif -+]) -+AC_CHECK_HEADERS([net/if.h], [], [], -+[#if HAVE_SYS_TYPES_H -+#include -+#endif -+#if HAVE_SYS_SOCKET_H -+# include -+#endif -+]) -+ - dnl Checks for IPX support style - AC_CACHE_CHECK(for GNU style IPX support, ncp_cv_c_ipx_netipx, - AC_COMPILE_IFELSE( -- [AC_LANG_PROGRAM([[[#include -+ [AC_LANG_PROGRAM([[[#if HAVE_SYS_TYPES_H -+#include -+#endif -+#if HAVE_SYS_SOCKET_H -+#include -+#endif - #include - #include ]]], - [[[((struct sockaddr_ipx*)0)->sipx_family == AF_IPX]]])], -@@ -262,7 +282,12 @@ then - then - AC_CACHE_CHECK(for Linux style IPX support, ncp_cv_c_ipx_linux, - AC_COMPILE_IFELSE( -- [AC_LANG_PROGRAM([[[#include -+ [AC_LANG_PROGRAM([[[#if HAVE_SYS_TYPES_H -+#include -+#endif -+#if HAVE_SYS_SOCKET_H -+#include -+#endif - #include - #include ]]], - [[[((struct sockaddr_ipx*)0)->sipx_family == AF_IPX]]])], -@@ -349,48 +374,23 @@ AC_HEADER_STDC - AC_HEADER_STDC - AC_HEADER_SYS_WAIT - --dnl sys/mount is required by ncpmount --dnl currently code does not work without sys/mount.h --AC_CHECK_HEADER(sys/mount.h) --if test "$ac_cv_header_sys_mount_h" = "no" --then -- if test "$USE_KERNEL" = "1" -- then -- AC_MSG_WARN(Cannot build kernel support because of no sys/mount.h file) -- USE_KERNEL=0 -- fi -- ncp_sys_mount_h="/* sys/mount.h does not exist */" -- ncp_linux_fs_h="/* linux/fs.h is not needed */" --else -- ncp_sys_mount_h="#include " -- AC_CACHE_CHECK(for mount constants in sys/mount.h, ncp_cv_linux_fs_needed, -- AC_COMPILE_IFELSE( -- [AC_LANG_PROGRAM([[[#include ]]], -- [[[mount(0,0,0,MS_RDONLY,0); umount(0)]]])], -- [ncp_cv_linux_fs_needed="yes"], -- [ncp_cv_linux_fs_needed="no"] -- ) -- ) -- if test "$ncp_cv_linux_fs_needed" = "yes"; then -- ncp_linux_fs_h="/* linux/fs.h not needed */" -- else -- ncp_linux_fs_h="#include " -- fi --fi --AC_SUBST(ncp_sys_mount_h) --AC_SUBST(ncp_linux_fs_h) -- - dnl net/if is required by IPX tools - dnl currently code does not work without net/if.h --AC_CHECK_HEADER(net/if.h, -+AC_CHECK_HEADER([net/if.h], - [ncp_net_if_h="#include "], - [AC_CHECK_HEADER(linux/if.h, - [ncp_net_if_h="#include "], - [ncp_net_if_h="/* No interfaces support... */" - AC_DEFINE(NO_NET_IF_SUPPORT, 1, [neither net/if.h nor linux/if.h was found, so ipx_* will not build...]) - AC_MSG_WARN(Neither nor does exist, only partial make configured)] -- )] --) -+ )], -+[#if HAVE_SYS_TYPES_H -+#include -+#endif -+#if HAVE_SYS_SOCKET_H -+#include -+#endif -+]) - AC_SUBST(ncp_net_if_h) - - dnl net/route is required for now in ncplib -@@ -403,14 +403,27 @@ AC_CHECK_HEADER(net/route.h, - AC_DEFINE(NO_NET_ROUTE_SUPPORT, 1, [neither net/route.h nor linux/route.h was found ...]) - dnl In future, {net|linux}/route.h should be required only by ipx code - AC_MSG_ERROR(Neither nor does exist)] -- )] --) -+ )], -+[#if HAVE_SYS_TYPES_H -+#include -+#endif -+#if HAVE_SYS_SOCKET_H -+#include -+#endif -+]) - AC_SUBST(ncp_net_route_h) - - dnl netinet/if_ether.h vs. linux/if_ether.h - dnl required only in ipxdump/ipxparse - ncp_if_ether_support="yes" --AC_CHECK_HEADER(netinet/if_ether.h) -+AC_CHECK_HEADER([netinet/if_ether.h], [], [], -+[#if HAVE_SYS_TYPES_H -+#include -+#endif -+#if HAVE_SYS_SOCKET_H -+#include -+#endif -+]) - if test "$ac_cv_header_netinet_if_ether_h" = "no" - then - AC_CHECK_HEADER(linux/if_ether.h) -@@ -475,14 +488,56 @@ select(0, &a, &a, &a, 0)]]])], - fi - fi - -+dnl sys/mount is required by ncpmount -+dnl currently code does not work without sys/mount.h -+AC_CHECK_HEADER(sys/mount.h) -+ncp_sys_mount_h="/* sys/mount.h does not exist */" -+ncp_linux_fs_h="/* linux/fs.h not needed */" -+if test "$USE_KERNEL" = "1" -+then -+ if test "$ac_cv_header_sys_mount_h" = "no" -+ then -+ AC_MSG_WARN(Cannot build kernel support because of no sys/mount.h file) -+ USE_KERNEL=0 -+ else -+ ncp_sys_mount_h="#include " -+ AC_CACHE_CHECK(for mount constants in sys/mount.h, ncp_cv_linux_fs_needed, -+ AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM([[[#include ]]], -+ [[[mount(0,0,0,MS_RDONLY,0); umount(0)]]])], -+ [ncp_cv_linux_fs_needed="no"], -+ [ncp_cv_linux_fs_needed="yes"] -+ ) -+ ) -+ if test "$ncp_cv_linux_fs_needed" = "yes"; then -+ ncp_linux_fs_h="#include " -+ fi -+ fi -+fi -+AC_SUBST(ncp_sys_mount_h) -+AC_SUBST(ncp_linux_fs_h) -+ -+ - dnl Third parameter to accept is socklen_t or signed int - AC_CACHE_CHECK(for third parameter to accept, - ncp_cv_socklen_t, -- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include ]]], -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include -+#if HAVE_SYS_TYPES_H -+#include -+#endif -+#if HAVE_SYS_SOCKET_H -+#include -+#endif]]], - [[[socklen_t a; - accept(0, NULL, &a)]]])], - [ncp_cv_socklen_t="socklen_t"], -- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include ]]], -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include -+#if HAVE_SYS_TYPES_H -+#include -+#endif -+#if HAVE_SYS_SOCKET_H -+#include -+#endif]]], - [[[int a; - accept(0, NULL, &a)]]])], - [ncp_cv_socklen_t="int"], -@@ -501,8 +556,12 @@ AC_SUBST(socklen_t) - - AC_CACHE_CHECK(whether SO_NOSIGPIPE exists, - ncp_cv_so_nosigpipe, -- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include --#include ]]], -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#if HAVE_SYS_TYPES_H -+#include -+#endif -+#if HAVE_SYS_SOCKET_H -+#include -+#endif]]], - [[[int s; - int o = 0; - s = socket(0, 0, 0); -@@ -518,8 +577,12 @@ fi - - AC_CACHE_CHECK(whether MSG_NOSIGNAL exists, - ncp_cv_msg_nosignal, -- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#if HAVE_SYS_TYPES_H -+#include -+#endif -+#if HAVE_SYS_SOCKET_H - #include -+#endif - struct msghdr msg;]]], - [[[sendmsg(0, &msg, MSG_NOSIGNAL)]]])], - [ncp_cv_msg_nosignal="yes"], -diff -r 81e0853d48a9 -r 8341fcd1dc86 include/config.h.in ---- a/include/config.h.in Sat May 28 19:59:35 2005 +0000 -+++ b/include/config.h.in Sat May 28 20:02:00 2005 +0000 -@@ -152,6 +152,9 @@ - /* Define if you have IPX header netipx/ipx.h */ - #undef HAVE_NETIPX_IPX_H - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_NET_IF_H -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_NL_TYPES_H - -@@ -206,6 +209,9 @@ - - /* Define to 1 if you have the header file. */ - #undef HAVE_SYS_PARAM_H -+ -+/* Define to 1 if you have the header file. */ -+#undef HAVE_SYS_SOCKET_H - - /* Define to 1 if you have the header file. */ - #undef HAVE_SYS_STAT_H - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-426.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-426.patch deleted file mode 100644 index 6d7e12e..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-426.patch +++ /dev/null @@ -1,257 +0,0 @@ -changeset: 426:08cd551d8c1c -user: Petr Vandrovec -date: Sun Jun 05 14:23:57 2005 +0000 -files: include/ncp/ipxlib.h include/ncp/kernel/ncp.h include/ncp/ncplib.h ipx-1.0/Samples/rip.c ipx-1.0/Samples/sap.c ipx-1.0/ipx_cmd.c ipxdump/ipxparse.c lib/ncplib.c -description: -Add __attribute__((packed)) at structure level too. Darwin's gcc-3.3 -needs that, otherwise it (at least) adds one byte to ncp_request_header, -completely mangling sent packet. - - -diff -r 8341fcd1dc86 -r 08cd551d8c1c include/ncp/ipxlib.h ---- a/include/ncp/ipxlib.h Sat May 28 20:02:00 2005 +0000 -+++ b/include/ncp/ipxlib.h Sun Jun 05 14:23:57 2005 +0000 -@@ -73,7 +73,7 @@ struct sap_server_ident - #endif - IPXPort server_port __attribute__((packed)); - u_int16_t intermediate_network __attribute__((packed)); --}; -+} __attribute__((packed)); - - #define IPX_RIP_REQUEST (0x1) - #define IPX_RIP_RESPONSE (0x2) -@@ -82,13 +82,13 @@ struct ipx_rt_def { - u_int32_t network __attribute__((packed)); - u_int16_t hops __attribute__((packed)); - u_int16_t ticks __attribute__((packed)); --}; -+} __attribute__((packed)); - - struct ipx_rip_packet - { - u_int16_t operation __attribute__((packed)); - struct ipx_rt_def rt[1] __attribute__((packed)); --}; -+} __attribute__((packed)); - - #ifdef SWIG - #define IPX_BROADCAST_NODE "\xff\xff\xff\xff\xff\xff" -diff -r 8341fcd1dc86 -r 08cd551d8c1c include/ncp/kernel/ncp.h ---- a/include/ncp/kernel/ncp.h Sat May 28 20:02:00 2005 +0000 -+++ b/include/ncp/kernel/ncp.h Sun Jun 05 14:23:57 2005 +0000 -@@ -59,7 +59,7 @@ struct ncp_request_header { - u_int8_t conn_high __attribute__((packed)); - u_int8_t function __attribute__((packed)); - u_int8_t data[0] __attribute__((packed)); --}; -+} __attribute__((packed)); - - #define NCP_REPLY (0x3333) - #define NCP_POSITIVE_ACK (0x9999) -@@ -73,7 +73,7 @@ struct ncp_reply_header { - u_int8_t completion_code __attribute__((packed)); - u_int8_t connection_state __attribute__((packed)); - u_int8_t data[0] __attribute__((packed)); --}; -+} __attribute__((packed)); - - #define NCP_VOLNAME_LEN (16) - #define NCP_NUMBER_OF_VOLUMES (64) -@@ -232,7 +232,7 @@ struct nw_info_struct { - u_int32_t NSCreator __attribute__((packed)); - u_int8_t nameLen __attribute__((packed)); - u_int8_t entryName[256] __attribute__((packed)); --}; -+} __attribute__((packed)); - #endif - - /* modify mask - use with MODIFY_DOS_INFO structure */ -@@ -265,7 +265,7 @@ struct nw_modify_dos_info { - u_int16_t inheritanceGrantMask __attribute__((packed)); - u_int16_t inheritanceRevokeMask __attribute__((packed)); - u_int32_t maximumSpace __attribute__((packed)); --}; -+} __attribute__((packed)); - - #ifdef SWIG - struct nw_file_info { -@@ -284,13 +284,13 @@ struct nw_file_info { - u_int32_t server_file_handle __attribute__((packed)); - u_int8_t open_create_action __attribute__((packed)); - u_int8_t file_handle[6] __attribute__((packed)); --}; -+} __attribute__((packed)); - #endif - - struct nw_search_sequence { - u_int8_t volNumber __attribute__((packed)); - u_int32_t dirBase __attribute__((packed)); - u_int32_t sequence __attribute__((packed)); --}; -+} __attribute__((packed)); - - #endif /* _LINUX_NCP_H */ -diff -r 8341fcd1dc86 -r 08cd551d8c1c include/ncp/ncplib.h ---- a/include/ncp/ncplib.h Sat May 28 20:02:00 2005 +0000 -+++ b/include/ncp/ncplib.h Sun Jun 05 14:23:57 2005 +0000 -@@ -492,7 +492,7 @@ struct ncp_file_server_info - u_int8_t RestrictionLevel __attribute__((packed)); - u_int8_t InternetBridge __attribute__((packed)); - u_int8_t Reserved[60] __attribute__((packed)); --}; -+} __attribute__((packed)); - #endif - - struct ncp_file_server_info_2 { -@@ -607,7 +607,7 @@ struct ncp_station_addr - u_int8_t Node[6] __attribute__((packed)); - #endif - u_int16_t Socket __attribute__((packed)); --}; -+} __attribute__((packed)); - - struct ncp_prop_login_control - { -@@ -640,7 +640,7 @@ struct ncp_prop_login_control - u_int16_t BadLoginCount __attribute__((packed)); - u_int32_t BadLoginCountDown __attribute__((packed)); - struct ncp_station_addr LastIntruder __attribute__((packed)); --}; -+} __attribute__((packed)); - - NWCCODE NWReadPropertyValue(NWCONN_HANDLE conn, const char *objName, - NWObjectType objType, const char *propertyName, -diff -r 8341fcd1dc86 -r 08cd551d8c1c ipx-1.0/Samples/rip.c ---- a/ipx-1.0/Samples/rip.c Sat May 28 20:02:00 2005 +0000 -+++ b/ipx-1.0/Samples/rip.c Sun Jun 05 14:23:57 2005 +0000 -@@ -5,7 +5,7 @@ struct rip_data - u_int32_t rip_net __attribute__((packed)); - u_int16_t rip_hops __attribute__((packed)); - u_int16_t rip_ticks __attribute__((packed)); --}; -+} __attribute__((packed)); - - int - main(int argc, char **argv) -diff -r 8341fcd1dc86 -r 08cd551d8c1c ipx-1.0/Samples/sap.c ---- a/ipx-1.0/Samples/sap.c Sat May 28 20:02:00 2005 +0000 -+++ b/ipx-1.0/Samples/sap.c Sun Jun 05 14:23:57 2005 +0000 -@@ -8,7 +8,7 @@ struct sap_data - u_int8_t sap_node[6] __attribute__((packed)); - u_int16_t sap_sock __attribute__((packed)); - u_int16_t sap_hops __attribute__((packed)); --}; -+} __attribute__((packed)); - - int - main(int argc, char **argv) -diff -r 8341fcd1dc86 -r 08cd551d8c1c ipx-1.0/ipx_cmd.c ---- a/ipx-1.0/ipx_cmd.c Sat May 28 20:02:00 2005 +0000 -+++ b/ipx-1.0/ipx_cmd.c Sun Jun 05 14:23:57 2005 +0000 -@@ -66,8 +66,8 @@ struct { - u_int8_t dst[6] __attribute__((packed)); - u_int8_t src[6] __attribute__((packed)); - u_int16_t type __attribute__((packed)); -- u_int8_t ipx[16384]; -- } buffer; -+ u_int8_t ipx[16384] __attribute__((packed)); -+ } __attribute__((packed)) buffer; - - static int getiflist(int fd, struct ifconf* ifc) { - int i; -diff -r 8341fcd1dc86 -r 08cd551d8c1c ipxdump/ipxparse.c ---- a/ipxdump/ipxparse.c Sat May 28 20:02:00 2005 +0000 -+++ b/ipxdump/ipxparse.c Sun Jun 05 14:23:57 2005 +0000 -@@ -60,7 +60,7 @@ struct ipx_address - IPXNet net __attribute__((packed)); - IPXNode node __attribute__((packed)); - IPXPort sock __attribute__((packed)); --}; -+} __attribute__((packed)); - - struct ipx_packet - { -@@ -77,7 +77,7 @@ struct ipx_packet - #define IPX_TYPE_PPROP 0x14 /* complicated flood fill brdcast [Not supported] */ - struct ipx_address ipx_dest __attribute__((packed)); - struct ipx_address ipx_source __attribute__((packed)); --}; -+} __attribute__((packed)); - - #define NCP_ALLOC_SLOT_REQUEST (0x1111) - #define NCP_REQUEST (0x2222) -@@ -92,7 +92,7 @@ struct ncp_request_header - u_int8_t conn_high __attribute__((packed)); - u_int8_t function __attribute__((packed)); - u_int8_t data[0] __attribute__((packed)); --}; -+} __attribute__((packed)); - - #define NCP_REPLY (0x3333) - #define NCP_POSITIVE_ACK (0x9999) -@@ -107,7 +107,7 @@ struct ncp_reply_header - u_int8_t completion_code __attribute__((packed)); - u_int8_t connection_state __attribute__((packed)); - u_int8_t data[0] __attribute__((packed)); --}; -+} __attribute__((packed)); - - #define NCP_BURST_PACKET (0x7777) - -@@ -126,7 +126,7 @@ struct ncp_burst_header - u_int32_t data_offset __attribute__((packed)); - u_int16_t data_bytes __attribute__((packed)); - u_int16_t missing_frags __attribute__((packed)); --}; -+} __attribute__((packed)); - - void handle_ipx(unsigned char *buf, int length, char *frame, int no); - void handle_ncp(struct sockaddr_ipx *source, -@@ -149,7 +149,7 @@ typedef struct saps - u_int8_t serverName[SAP_MAX_SERVER_NAME_LENGTH] __attribute__((packed)); - struct ipx_address serverAddress __attribute__((packed)); - u_int16_t serverHops __attribute__((packed)); /* NBO */ --} -+} __attribute__((packed)) - SAPS; - - /* General Service/Nearest Server Response SAP packet */ -@@ -160,14 +160,14 @@ union sap_packet - { - u_int16_t sapOperation __attribute__((packed)); - u_int16_t serverType __attribute__((packed)); -- } -+ } __attribute__((packed)) - query; - struct sap_response - { - u_int16_t sapOperation __attribute__((packed)); - /* each SAP can has a max of SAP_MAX_SAPS_PER_PACKET packets */ - SAPS sap[SAP_MAX_SAPS_PER_PACKET] __attribute__((packed)); -- } -+ } __attribute__((packed)) - response; - }; - -@@ -356,7 +356,7 @@ handle_burst(struct sockaddr_ipx *source - u_int8_t reserved[8] __attribute__((packed)); - u_int32_t file_offset __attribute__((packed)); - u_int32_t number_of_bytes __attribute__((packed)); -- } -+ } __attribute__((packed)) - *brq = (struct ncp_burst_request *) rq; - - printf("Assuming Burst Request:\n"); -diff -r 8341fcd1dc86 -r 08cd551d8c1c lib/ncplib.c ---- a/lib/ncplib.c Sat May 28 20:02:00 2005 +0000 -+++ b/lib/ncplib.c Sun Jun 05 14:23:57 2005 +0000 -@@ -2627,7 +2627,7 @@ struct nw_time_buffer - u_int8_t minute __attribute__((packed)); - u_int8_t second __attribute__((packed)); - u_int8_t wday __attribute__((packed)); --}; -+} __attribute__((packed)); - - static time_t - nw_to_ctime(struct nw_time_buffer *source) - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-427.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-427.patch deleted file mode 100644 index d3ac879..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-427.patch +++ /dev/null @@ -1,94 +0,0 @@ -changeset: 427:225fa587c2d8 -user: Petr Vandrovec -date: Sun Jun 05 14:35:13 2005 +0000 -files: ipx-1.0/Samples/rip.c ipx-1.0/Samples/sap.c -description: -Fix problems in ipx samples when packet with zero or 1 byte received. - - -diff -r 08cd551d8c1c -r 225fa587c2d8 ipx-1.0/Samples/rip.c ---- a/ipx-1.0/Samples/rip.c Sun Jun 05 14:23:57 2005 +0000 -+++ b/ipx-1.0/Samples/rip.c Sun Jun 05 14:35:13 2005 +0000 -@@ -36,6 +36,8 @@ main(int argc, char **argv) - } - while (1) - { -+ size_t rclen; -+ - len = sizeof(sipx); - result = recvfrom(s, msg, sizeof(msg), 0, - (struct sockaddr *) &sipx, &len); -@@ -44,8 +46,12 @@ main(int argc, char **argv) - perror("IPX: recvfrom"); - exit(-1); - } -+ if (result < 2) { -+ fprintf(stderr, "Received packet is too short to be RIP packet (%d bytes)\n", result); -+ continue; -+ } -+ rclen = result - 2; - bptr = msg; -- result -= 2; - printf("RIP packet from: %08X:%02X%02X%02X%02X%02X%02X\n", - (u_int32_t)htonl(sipx.sipx_network), - sipx.sipx_node[0], sipx.sipx_node[1], -@@ -53,11 +59,11 @@ main(int argc, char **argv) - sipx.sipx_node[6], sipx.sipx_node[5]); - bptr += 2; - rp = (struct rip_data *) bptr; -- while (result >= sizeof(struct rip_data)) -+ while (rclen >= sizeof(struct rip_data)) - { - printf("\tNET: %08X HOPS: %d\n", (u_int32_t)ntohl(rp->rip_net), - ntohs(rp->rip_hops)); -- result -= sizeof(struct rip_data); -+ rclen -= sizeof(struct rip_data); - rp++; - } - } -diff -r 08cd551d8c1c -r 225fa587c2d8 ipx-1.0/Samples/sap.c ---- a/ipx-1.0/Samples/sap.c Sun Jun 05 14:23:57 2005 +0000 -+++ b/ipx-1.0/Samples/sap.c Sun Jun 05 14:35:13 2005 +0000 -@@ -47,6 +47,8 @@ main(int argc, char **argv) - } - while (1) - { -+ size_t rclen; -+ - len = 1024; - result = recvfrom(s, msg, sizeof(msg), 0, - (struct sockaddr *) &sipx, &len); -@@ -55,16 +57,20 @@ main(int argc, char **argv) - perror("IPX: recvfrom: "); - exit(-1); - } -+ if (result < 2) { -+ fprintf(stderr, "Received packet is too short to be SAP packet (%d bytes)\n", result); -+ continue; -+ } -+ rclen = result - 2; - bptr = msg; -- result -= 2; - printf("SAP: OP is %x %x\n", bptr[0], bptr[1]); -- printf("Length is %d\n", result); -+ printf("Length is %u\n", rclen); - if (bptr[1] != 2) - continue; - - bptr += 2; - sp = (struct sap_data *) bptr; -- while (result >= sizeof(struct sap_data)) -+ while (rclen >= sizeof(struct sap_data)) - { - int i; - -@@ -83,7 +89,7 @@ main(int argc, char **argv) - sp->sap_node[4], - sp->sap_node[5], - ntohs(sp->sap_sock)); -- result -= sizeof(struct sap_data); -+ rclen -= sizeof(struct sap_data); - sp++; - } - } - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-428.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-428.patch deleted file mode 100644 index b0a5594..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-428.patch +++ /dev/null @@ -1,19 +0,0 @@ -changeset: 428:cccdaf2ce097 -user: Petr Vandrovec -date: Sun Jun 05 14:35:46 2005 +0000 -files: ipx-1.0/Samples/samples.h -description: -Include into samples, to get rid of warning about exit() not -having a prototype. - - -diff -r 225fa587c2d8 -r cccdaf2ce097 ipx-1.0/Samples/samples.h ---- a/ipx-1.0/Samples/samples.h Sun Jun 05 14:35:13 2005 +0000 -+++ b/ipx-1.0/Samples/samples.h Sun Jun 05 14:35:46 2005 +0000 -@@ -1,4 +1,5 @@ - #include -+#include - #include - #include - #include - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-429.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-429.patch deleted file mode 100644 index 9033e10..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-429.patch +++ /dev/null @@ -1,158 +0,0 @@ -changeset: 429:776dc4052e39 -user: Petr Vandrovec -date: Sun Jun 05 14:36:28 2005 +0000 -files: ipxdump/ipxparse.c -description: -Remove warnings about shadowing variables in ipxparse. Also add -__attribute__((packed)) into ipxparse as needed. - - -diff -r cccdaf2ce097 -r 776dc4052e39 ipxdump/ipxparse.c ---- a/ipxdump/ipxparse.c Sun Jun 05 14:35:46 2005 +0000 -+++ b/ipxdump/ipxparse.c Sun Jun 05 14:36:28 2005 +0000 -@@ -636,43 +636,43 @@ handle_ncp(struct sockaddr_ipx *source, - { - struct INPUT - { -- u_int16_t proposed_max_size; -- u_int8_t security_flag; -- } -- *i = (struct INPUT *) data; -+ u_int16_t proposed_max_size __attribute__((packed)); -+ u_int8_t security_flag __attribute__((packed)); -+ } __attribute__((packed)) -+ *d = (struct INPUT *) data; - - printf("fn: %-3d\n", rq->function); - printf("Get Big Packet NCP Max Packet Size\n"); - printf("proposed_max_size: %x\n", -- ntohs(i->proposed_max_size)); -+ ntohs(d->proposed_max_size)); - printf("security_flag: %x\n", -- i->security_flag); -+ d->security_flag); - break; - } - case 101: - { - struct INPUT - { -- u_int32_t local_conn_id; -- u_int32_t local_max_packet_size; -- u_int16_t local_target_socket; -- u_int32_t local_max_send_size; -- u_int32_t local_max_recv_size; -- } -- *i = (struct INPUT *) data; -+ u_int32_t local_conn_id __attribute__((packed)); -+ u_int32_t local_max_packet_size __attribute__((packed)); -+ u_int16_t local_target_socket __attribute__((packed)); -+ u_int32_t local_max_send_size __attribute__((packed)); -+ u_int32_t local_max_recv_size __attribute__((packed)); -+ } __attribute__((packed)) -+ *d = (struct INPUT *) data; - - printf("fn: %-3d\n", rq->function); - printf("Packet Burst Connection Request\n"); - printf("local_conn_id: %x\n", -- (u_int32_t)ntohl(i->local_conn_id)); -+ (u_int32_t)ntohl(d->local_conn_id)); - printf("local_max_packet_size: %x\n", -- (u_int32_t)ntohl(i->local_max_packet_size)); -+ (u_int32_t)ntohl(d->local_max_packet_size)); - printf("local_target_socket: %x\n", -- (u_int32_t)ntohl(i->local_target_socket)); -+ (u_int32_t)ntohl(d->local_target_socket)); - printf("local_max_send_size: %x\n", -- (u_int32_t)ntohl(i->local_max_send_size)); -+ (u_int32_t)ntohl(d->local_max_send_size)); - printf("local_max_recv_size: %x\n", -- (u_int32_t)ntohl(i->local_max_recv_size)); -+ (u_int32_t)ntohl(d->local_max_recv_size)); - } - break; - case 104: -@@ -700,26 +700,26 @@ handle_ncp(struct sockaddr_ipx *source, - { - struct INPUT - { -- u_int8_t subfunction_code; -- u_int32_t fragger_handle; -- u_int32_t max_fragment_size; -- u_int32_t message_size; -- u_int32_t fragment_flag; -- u_int32_t verb; -- } -- *i = (struct INPUT *) data; -+ u_int8_t subfunction_code __attribute__((packed)); -+ u_int32_t fragger_handle __attribute__((packed)); -+ u_int32_t max_fragment_size __attribute__((packed)); -+ u_int32_t message_size __attribute__((packed)); -+ u_int32_t fragment_flag __attribute__((packed)); -+ u_int32_t verb __attribute__((packed)); -+ } __attribute__((packed)) -+ *d = (struct INPUT *) data; - printf("Send NDS Fragment Request/Reply\n"); - printf("fragger_handle: %lx\n", -- (unsigned long) i->fragger_handle); -+ (unsigned long) d->fragger_handle); - printf("max_fragment_size: %lx\n", -- (unsigned long) i->max_fragment_size); -+ (unsigned long) d->max_fragment_size); - printf("message_size: %lx\n", -- (unsigned long) i->message_size); -+ (unsigned long) d->message_size); - printf("fragment_flag: %lx\n", -- (unsigned long) i->fragment_flag); -- printf("verb: %d\n", i->verb); -- -- switch (i->verb) -+ (unsigned long) d->fragment_flag); -+ printf("verb: %d\n", d->verb); -+ -+ switch (d->verb) - { - case 1: - printf("Resolve Name\n"); -@@ -1001,9 +1001,9 @@ handle_ncp(struct sockaddr_ipx *source, - { - struct XDATA - { -- u_int8_t new_directory_handle; -- u_int8_t access_rights_mask; -- } -+ u_int8_t new_directory_handle __attribute__((packed)); -+ u_int8_t access_rights_mask __attribute__((packed)); -+ } __attribute__((packed)) - *x = (struct XDATA *) data; - printf("new_directory_handle: %x\n", - x->new_directory_handle); -@@ -1021,10 +1021,10 @@ handle_ncp(struct sockaddr_ipx *source, - { - struct XDATA - { -- u_int16_t accepted_max_size; -- u_int16_t echo_socket; -- u_int8_t security_flag; -- } -+ u_int16_t accepted_max_size __attribute__((packed)); -+ u_int16_t echo_socket __attribute__((packed)); -+ u_int8_t security_flag __attribute__((packed)); -+ } __attribute__((packed)) - *x = (struct XDATA *) data; - printf("accepted_max_size: %x\n", - ntohs(x->accepted_max_size)); -@@ -1038,9 +1038,9 @@ handle_ncp(struct sockaddr_ipx *source, - { - struct XDATA - { -- u_int8_t completion_code; -- u_int32_t remote_target_id; -- u_int32_t remote_max_packet_size; -+ u_int8_t completion_code __attribute__((packed)); -+ u_int32_t remote_target_id __attribute__((packed)); -+ u_int32_t remote_max_packet_size __attribute__((packed)); - } - *x = (struct XDATA *) data; - printf("completion_code: %x\n", - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-430.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-430.patch deleted file mode 100644 index c65a412..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-430.patch +++ /dev/null @@ -1,21 +0,0 @@ -changeset: 430:3fc1f5c9c744 -user: Petr Vandrovec -date: Sun Jun 05 21:25:42 2005 +0000 -files: lib/ncplib.c -description: -Set tm_isdst to -1 (unknown DST state) when converting date/time from -NetWare to Unix format. It should give better results when DST is active. - - -diff -r 776dc4052e39 -r 3fc1f5c9c744 lib/ncplib.c ---- a/lib/ncplib.c Sun Jun 05 14:36:28 2005 +0000 -+++ b/lib/ncplib.c Sun Jun 05 21:25:42 2005 +0000 -@@ -2641,6 +2641,7 @@ nw_to_ctime(struct nw_time_buffer *sourc - u_time.tm_mday = source->day; - u_time.tm_mon = source->month - 1; - u_time.tm_year = source->year; -+ u_time.tm_isdst = -1; - - if (u_time.tm_year < 80) { - u_time.tm_year += 100; - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-431.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-431.patch deleted file mode 100644 index 7998d87..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-431.patch +++ /dev/null @@ -1,2957 +0,0 @@ -changeset: 431:06020cf028e1 -user: Petr Vandrovec -date: Sat Jun 11 19:59:00 2005 +0000 -files: BitKeeper/etc/ignore contrib/pam/pam_ncp_auth.c contrib/php/libtool contrib/php/php_auth_nds.c contrib/tcl-utils/chgpwd.c contrib/tcl-utils/ncplist.c contrib/tcl-utils/ncplisttrees.c contrib/tcl-utils/ncpreadprop.c contrib/tcl-utils/ncpreadprops.c contrib/tcl-utils/ncpvrest.c contrib/tcl-utils/ncpwhoami.c contrib/tcl-utils/vlist.c contrib/testing/chgpwd.c contrib/testing/cmpattr.c contrib/testing/dirlist2.c contrib/testing/dssearch.c contrib/testing/dsstream.c contrib/testing/effright.c contrib/testing/large.c contrib/testing/mkattr.c contrib/testing/mkclass.c contrib/testing/mkfile.c contrib/testing/mkobj.c contrib/testing/modclass.c contrib/testing/modobj.c contrib/testing/mvobj.c contrib/testing/nwdsgethost.c contrib/testing/nwdsgetstat.c contrib/testing/nwdslist.c contrib/testing/nwdspartjoin.c contrib/testing/nwdspartlist.c contrib/testing/nwdspartrm.c contrib/testing/nwdspartsplit.c contrib/testing/nwdsresetstat.c contrib/testing/nwgettime.c contrib/testing/partroot.c contrib/testing/pp/bcastmd.c contrib/testing/pp/getsynt.c contrib/testing/pp/nwc_next_object.c contrib/testing/pp/nwgetconnlist.c contrib/testing/pp/nwwhoami.c contrib/testing/pp/open_conn_by_name.c contrib/testing/pp/readsdef.c contrib/testing/pp/readsynt.c contrib/testing/pp/return_block_of_tree.c contrib/testing/pp/scantree.c contrib/testing/pp/scanvolr.c contrib/testing/pp/semaphor.c contrib/testing/pp/volres.c contrib/testing/readaddr.c contrib/testing/readadef.c contrib/testing/readattr.c contrib/testing/readcc.c contrib/testing/readcls.c contrib/testing/readsynt.c contrib/testing/renobj.c contrib/testing/replops.c contrib/testing/resint.c contrib/testing/resolve.c contrib/testing/rmattr.c contrib/testing/rmclass.c contrib/testing/rmobj.c contrib/testing/schsync.c contrib/testing/setkeys.c contrib/testing/timeinfo.c contrib/testing/verpwd.c contrib/tests/dsfilter.c contrib/tests/putfilte.c include/ncp/kernel/ncp_fs.h include/ncp/ncp.h include/ncp/ncplib.h include/ncp/nwnet.h.in lib/ds/dsgetstat.c lib/ds/dsstream.c lib/ds/partops.c lib/ds/search.c lib/ds/setkeys.c lib/filemgmt.c lib/fs/filelock.c lib/ncplib.c lib/ncplib_i.h lib/ncpsign.c lib/ndscrypt.c lib/ndscrypt.h lib/ndslib.c lib/nwcrypt.c lib/nwnet.c lib/o_ndslib.c sutil/ncpm_common.h sutil/ncpmount.h util/ncopy.c util/nwbpvalues.c util/nwpasswd.c util/nwpjmv.c util/nwsalvage.c util/pserver.c -description: -Fix signed/unsigned pointer problems pointed out by gcc-4.0. - - -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/pam/pam_ncp_auth.c ---- a/contrib/pam/pam_ncp_auth.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/pam/pam_ncp_auth.c Sat Jun 11 19:59:00 2005 +0000 -@@ -902,7 +902,7 @@ nw_ctx_search(const char *user_cn, NWCON - NWDSContextHandle context; - NWDSCCODE ccode; - nuint32 iterationHandle; -- nint32 countObjectsSearched; -+ nuint32 countObjectsSearched; - nuint32 objCntr; - nuint32 objCount; - char objectName[MAX_DN_CHARS + 1]; -@@ -1472,7 +1472,7 @@ nw_retrieve_bindery_user_info(struct nw_ - if (ui->qflag & QF_DEBUG) - syslog(LOG_NOTICE, "%s:got a full name %s for %s\n ", me, p.value, userName); - -- v = strdup(p.value); -+ v = strdup((char*)p.value); - if (!v) { - syslog(LOG_WARNING, "%s:Not enough memory for strdup()\n", me); - return ENOMEM; -@@ -1490,13 +1490,13 @@ nw_retrieve_bindery_user_info(struct nw_ - err = ncp_read_property_value(conn, NCP_BINDERY_USER, userName, 1, "HOME_DIRECTORY", &p); - if (!err && p.value[0]) { - char *v1; -- char *mark = strchr(p.value, ':'); -+ char *mark = strchr((char*)p.value, ':'); - if (mark && *(mark + 1)) { - if (ui->qflag & QF_DEBUG) - syslog(LOG_NOTICE, "%s:got a home directory %s for %s\n ", me, p.value, userName); - - *mark = 0; -- v = strdup(p.value); -+ v = strdup((char*)p.value); - if (!v) { - syslog(LOG_WARNING, "%s:Not enough memory for strdup()\n", me); - return ENOMEM; -@@ -1793,7 +1793,7 @@ nds_group_name(UNUSED(NWDSContextHandle - syslog(LOG_WARNING, "Not enough memory for strdup()\n"); - return ENOMEM; - } -- f = objname; -+ f = (const unsigned char*)objname; - for (; (c = *f++) != 0; *buff++ = c) { - if (c >= 'a' && c <= 'z') - continue; -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/php/libtool ---- a/contrib/php/libtool Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/php/libtool Sat Jun 11 19:59:00 2005 +0000 -@@ -76,10 +76,10 @@ AR_FLAGS="cru" - AR_FLAGS="cru" - - # A C compiler. --LTCC="gcc" -+LTCC="gcc-4.0" - - # A language-specific compiler. --CC="gcc" -+CC="gcc-4.0" - - # Is the compiler the GNU C compiler? - with_gcc=yes -@@ -316,7 +316,7 @@ link_all_deplibs=unknown - link_all_deplibs=unknown - - # Compile-time system search path for libraries --sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux/3.3.6/ /usr/lib/gcc/i486-linux/3.3.6/ /usr/lib/gcc-lib/i486-linux/3.3.6/../../../../i486-linux/lib/i486-linux/3.3.6/ /usr/lib/gcc-lib/i486-linux/3.3.6/../../../../i486-linux/lib/ /usr/lib/gcc-lib/i486-linux/3.3.6/../../../i486-linux/3.3.6/ /usr/lib/gcc-lib/i486-linux/3.3.6/../../../ /lib/i486-linux/3.3.6/ /lib/ /usr/lib/i486-linux/3.3.6/ /usr/lib/" -+sys_lib_search_path_spec=" /usr/lib/gcc/i486-linux/4.0.1/ /usr/lib/gcc/i486-linux/4.0.1/ /usr/lib/gcc/i486-linux/4.0.1/../../../../i486-linux/lib/i486-linux/4.0.1/ /usr/lib/gcc/i486-linux/4.0.1/../../../../i486-linux/lib/ /usr/lib/gcc/i486-linux/4.0.1/../../../i486-linux/4.0.1/ /usr/lib/gcc/i486-linux/4.0.1/../../../ /lib/i486-linux/4.0.1/ /lib/ /usr/lib/i486-linux/4.0.1/ /usr/lib/" - - # Run-time system search path for libraries - sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib -@@ -6740,7 +6740,7 @@ AR_FLAGS="cru" - AR_FLAGS="cru" - - # A C compiler. --LTCC="gcc" -+LTCC="gcc-4.0" - - # A language-specific compiler. - CC="g++" -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/php/php_auth_nds.c ---- a/contrib/php/php_auth_nds.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/php/php_auth_nds.c Sat Jun 11 19:59:00 2005 +0000 -@@ -388,7 +388,7 @@ static NWDSCCODE nw_ctx_search( - - NWDSCCODE ccode; - nuint32 iterationHandle = NO_MORE_ITERATIONS; -- nint32 countObjectsSearched; -+ nuint32 countObjectsSearched; - nuint32 objCntr; - nuint32 objCount; - char objectName[MAX_DN_CHARS+1]; -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/tcl-utils/chgpwd.c ---- a/contrib/tcl-utils/chgpwd.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/tcl-utils/chgpwd.c Sat Jun 11 19:59:00 2005 +0000 -@@ -62,6 +62,7 @@ typedef u_int32_t Time_T; - - #include - #include -+#include - #include - #include - -@@ -254,7 +255,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/tcl-utils/ncplist.c ---- a/contrib/tcl-utils/ncplist.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/tcl-utils/ncplist.c Sat Jun 11 19:59:00 2005 +0000 -@@ -85,6 +85,7 @@ typedef u_int32_t Time_T; - #include - #include - #include -+#include - #include - #include - -@@ -151,7 +152,7 @@ int main(int argc, char *argv[]) { - nuint32 ih = NO_MORE_ITERATIONS; - Buf_T* buf; - size_t size = DEFAULT_MESSAGE_LEN; -- size_t cnt; -+ size_t ccnt; - - char treeName [MAX_TREE_NAME_CHARS +1]=""; - char serverName [MAX_SCHEMA_NAME_CHARS+1]=""; -@@ -263,7 +264,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -@@ -345,7 +346,7 @@ int main(int argc, char *argv[]) { - case 0:dserr = NWDSList(ctx, objectname, &ih, buf); break; - case 1:dserr = NWDSListContainers(ctx, objectname, &ih, buf); break; - case 2:dserr = NWDSListByClassAndName(ctx, objectname, classname, subjectname, &ih, buf); break; -- case 3:dserr = NWDSGetCountByClassAndName(ctx, objectname, classname, subjectname, &cnt); break; -+ case 3:dserr = NWDSGetCountByClassAndName(ctx, objectname, classname, subjectname, &ccnt); break; - case 4:dserr = NWDSExtSyncList(ctx, objectname, - classname, subjectname, &ih, &ts, - 0, buf); -@@ -413,7 +414,7 @@ int main(int argc, char *argv[]) { - #endif - } else { - if (!quiet) -- printf("%u objects found\n", cnt); -+ printf("%u objects found\n", ccnt); - } - } while ((dserr == 0) && (ih != NO_MORE_ITERATIONS)); - NWCCCloseConn(conn); -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/tcl-utils/ncplisttrees.c ---- a/contrib/tcl-utils/ncplisttrees.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/tcl-utils/ncplisttrees.c Sat Jun 11 19:59:00 2005 +0000 -@@ -204,7 +204,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/tcl-utils/ncpreadprop.c ---- a/contrib/tcl-utils/ncpreadprop.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/tcl-utils/ncpreadprop.c Sat Jun 11 19:59:00 2005 +0000 -@@ -72,7 +72,7 @@ - - static char *progname; - --static void -+static void __attribute__((noreturn)) - usage(void) - { - fprintf(stderr, _("usage: %s [options] \n"), progname); -@@ -197,7 +197,7 @@ static int doPrintOut (NWDSContextHandle - } - break; - case SYN_PO_ADDRESS:{ -- const NWDSChar** pa = (const NWDSChar**)name; -+ const NWDSChar*const* pa = (const NWDSChar*const*)name; - printf("%s:%s:%s:%s:%s:%s\n",pa[0],pa[1],pa[2],pa[3],pa[4],pa[5]); - } - break; -@@ -442,7 +442,7 @@ main(int argc, char *argv[]) - - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/tcl-utils/ncpreadprops.c ---- a/contrib/tcl-utils/ncpreadprops.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/tcl-utils/ncpreadprops.c Sat Jun 11 19:59:00 2005 +0000 -@@ -67,7 +67,7 @@ Ppollet:0 CN=FCPC2_APPS home\ppollet:1 2 - - static char *progname; - --static void -+static void __attribute__((noreturn)) - usage(void) - { - fprintf(stderr, _("usage: %s [options] \n"), progname); -@@ -191,7 +191,7 @@ static int doPrintOut (NWDSContextHandle - } - break; - case SYN_PO_ADDRESS:{ -- const NWDSChar** pa = (const NWDSChar**)name; -+ const NWDSChar*const* pa = (const NWDSChar*const*)name; - printf("%s%c%s%c%s%c%s%c%s%c%s",pa[0],sep,pa[1],sep,pa[2],sep,pa[3],sep,pa[4],sep,pa[5]); - } - break; -@@ -479,7 +479,7 @@ main(int argc, char *argv[]) - - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/tcl-utils/ncpvrest.c ---- a/contrib/tcl-utils/ncpvrest.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/tcl-utils/ncpvrest.c Sat Jun 11 19:59:00 2005 +0000 -@@ -37,6 +37,7 @@ - - #include - #include -+#include - #include - #include - -@@ -148,7 +149,7 @@ int main(int argc, char *argv[]) { - - { - -- int optv=-1; -+ NWVOL_NUM optv; - nuint32 nwuid,rest,inUse; - struct ncp_volume_info target; - -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/tcl-utils/ncpwhoami.c ---- a/contrib/tcl-utils/ncpwhoami.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/tcl-utils/ncpwhoami.c Sat Jun 11 19:59:00 2005 +0000 -@@ -78,7 +78,7 @@ static const char * gUserFields=NULL; - static const char * gUserFields=NULL; - - --static void -+static void __attribute__((noreturn)) - usage(void) - { - fprintf(stderr, _("failed. usage: %s [-options] \n"), progname); -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/tcl-utils/vlist.c ---- a/contrib/tcl-utils/vlist.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/tcl-utils/vlist.c Sat Jun 11 19:59:00 2005 +0000 -@@ -46,7 +46,7 @@ - - static char *progname; - --static void -+static void __attribute__((noreturn)) - usage(void) - { - fprintf(stderr, _("failed. usage: %s [options] servername\n"), progname); -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/chgpwd.c ---- a/contrib/testing/chgpwd.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/chgpwd.c Sat Jun 11 19:59:00 2005 +0000 -@@ -200,7 +200,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/cmpattr.c ---- a/contrib/testing/cmpattr.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/cmpattr.c Sat Jun 11 19:59:00 2005 +0000 -@@ -186,7 +186,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/dirlist2.c ---- a/contrib/testing/dirlist2.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/dirlist2.c Sat Jun 11 19:59:00 2005 +0000 -@@ -30,7 +30,6 @@ - #define MAKE_NCPLIB - #include - #include --#include "../../lib/ncplib_i.h" - - #include - #include -@@ -41,6 +40,8 @@ - - #include "private/libintl.h" - #define _(X) gettext(X) -+ -+#include "../../lib/ncplib_i.h" - - static char *progname; - -@@ -70,7 +71,7 @@ int main(int argc, char *argv[]) { - unsigned int searchattr = SA_ALL; - u_int32_t destns = NW_NS_DOS; - int searchmode = 0; -- const char* sstr = "\xFF*"; -+ const unsigned char* sstr = (const unsigned char*)"\xFF*"; - size_t sslen = 2; - - setlocale(LC_ALL, ""); -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/dssearch.c ---- a/contrib/testing/dssearch.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/dssearch.c Sat Jun 11 19:59:00 2005 +0000 -@@ -554,7 +554,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/dsstream.c ---- a/contrib/testing/dsstream.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/dsstream.c Sat Jun 11 19:59:00 2005 +0000 -@@ -188,7 +188,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/effright.c ---- a/contrib/testing/effright.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/effright.c Sat Jun 11 19:59:00 2005 +0000 -@@ -175,7 +175,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/large.c ---- a/contrib/testing/large.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/large.c Sat Jun 11 19:59:00 2005 +0000 -@@ -244,7 +244,8 @@ int main(int argc, char *argv[]) { - memset(&iii, 0xCC, sizeof(iii)); - - dserr = ncp_ns_open_create_entry(conn, destns, searchattr, NCP_DIRSTYLE_DIRBASE, -- 0, 0, volume, strlen(s) + 2, -1, dowrite ? OC_MODE_CREATE | OC_MODE_TRUNCATE | OC_MODE_OPEN | OC_MODE_OPEN_64BIT_ACCESS : OC_MODE_OPEN | OC_MODE_OPEN_64BIT_ACCESS, -+ 0, 0, (unsigned char*)volume, strlen(s) + 2, -1, -+ dowrite ? OC_MODE_CREATE | OC_MODE_TRUNCATE | OC_MODE_OPEN | OC_MODE_OPEN_64BIT_ACCESS : OC_MODE_OPEN | OC_MODE_OPEN_64BIT_ACCESS, - 0, AR_READ_ONLY|AR_WRITE_ONLY, RIM_ALL, - &iii, sizeof(iii), NULL, NULL, fh); - if (dserr) { -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/mkattr.c ---- a/contrib/testing/mkattr.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/mkattr.c Sat Jun 11 19:59:00 2005 +0000 -@@ -201,7 +201,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/mkclass.c ---- a/contrib/testing/mkclass.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/mkclass.c Sat Jun 11 19:59:00 2005 +0000 -@@ -218,7 +218,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/mkfile.c ---- a/contrib/testing/mkfile.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/mkfile.c Sat Jun 11 19:59:00 2005 +0000 -@@ -221,12 +221,12 @@ int main(int argc, char *argv[]) { - volume[1] = strlen(s); - { - struct nw_info_struct2 iii; -- u_int8_t fh[10]; -+ u_int8_t fh[6]; - - memset(&iii, 0xCC, sizeof(iii)); - - dserr = ncp_ns_open_create_entry(conn, destns, searchattr, NCP_DIRSTYLE_DIRBASE, -- 3, rim, volume, strlen(s) + 2, -1, 0x0B, 0, 0, 0xFF, -+ 3, rim, (unsigned char*)volume, strlen(s) + 2, -1, 0x0B, 0, 0, 0xFF, - &iii, sizeof(iii), NULL, NULL, fh); - if (dserr) { - fprintf(stderr, "Cannot obtain info: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/mkobj.c ---- a/contrib/testing/mkobj.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/mkobj.c Sat Jun 11 19:59:00 2005 +0000 -@@ -202,7 +202,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/modclass.c ---- a/contrib/testing/modclass.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/modclass.c Sat Jun 11 19:59:00 2005 +0000 -@@ -191,7 +191,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/modobj.c ---- a/contrib/testing/modobj.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/modobj.c Sat Jun 11 19:59:00 2005 +0000 -@@ -145,7 +145,7 @@ int main(int argc, char *argv[]) { - dserr = NWDSSetContext(ctx, DCK_CONFIDENCE, &confidence); - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/mvobj.c ---- a/contrib/testing/mvobj.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/mvobj.c Sat Jun 11 19:59:00 2005 +0000 -@@ -180,7 +180,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/nwdsgethost.c ---- a/contrib/testing/nwdsgethost.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/nwdsgethost.c Sat Jun 11 19:59:00 2005 +0000 -@@ -177,7 +177,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/nwdsgetstat.c ---- a/contrib/testing/nwdsgetstat.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/nwdsgetstat.c Sat Jun 11 19:59:00 2005 +0000 -@@ -168,7 +168,7 @@ int main(int argc, char *argv[]) { - } - #ifdef N_PLAT_LINUX - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/nwdslist.c ---- a/contrib/testing/nwdslist.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/nwdslist.c Sat Jun 11 19:59:00 2005 +0000 -@@ -209,7 +209,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/nwdspartjoin.c ---- a/contrib/testing/nwdspartjoin.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/nwdspartjoin.c Sat Jun 11 19:59:00 2005 +0000 -@@ -171,7 +171,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/nwdspartlist.c ---- a/contrib/testing/nwdspartlist.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/nwdspartlist.c Sat Jun 11 19:59:00 2005 +0000 -@@ -184,7 +184,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/nwdspartrm.c ---- a/contrib/testing/nwdspartrm.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/nwdspartrm.c Sat Jun 11 19:59:00 2005 +0000 -@@ -165,7 +165,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/nwdspartsplit.c ---- a/contrib/testing/nwdspartsplit.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/nwdspartsplit.c Sat Jun 11 19:59:00 2005 +0000 -@@ -171,7 +171,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/nwdsresetstat.c ---- a/contrib/testing/nwdsresetstat.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/nwdsresetstat.c Sat Jun 11 19:59:00 2005 +0000 -@@ -167,7 +167,7 @@ int main(int argc, char *argv[]) { - } - #ifdef N_PLAT_LINUX - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/nwgettime.c ---- a/contrib/testing/nwgettime.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/nwgettime.c Sat Jun 11 19:59:00 2005 +0000 -@@ -173,7 +173,7 @@ int main(int argc, char *argv[]) { - } - #ifdef N_PLAT_LINUX - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/partroot.c ---- a/contrib/testing/partroot.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/partroot.c Sat Jun 11 19:59:00 2005 +0000 -@@ -168,7 +168,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/pp/bcastmd.c ---- a/contrib/testing/pp/bcastmd.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/pp/bcastmd.c Sat Jun 11 19:59:00 2005 +0000 -@@ -193,7 +193,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/pp/getsynt.c ---- a/contrib/testing/pp/getsynt.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/pp/getsynt.c Sat Jun 11 19:59:00 2005 +0000 -@@ -175,7 +175,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/pp/nwc_next_object.c ---- a/contrib/testing/pp/nwc_next_object.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/pp/nwc_next_object.c Sat Jun 11 19:59:00 2005 +0000 -@@ -202,7 +202,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/pp/nwgetconnlist.c ---- a/contrib/testing/pp/nwgetconnlist.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/pp/nwgetconnlist.c Sat Jun 11 19:59:00 2005 +0000 -@@ -300,7 +300,7 @@ static void printConn (NWCONN_HANDLE con - } - - static void getAsMuchAsYouCan ( NWCONN_HANDLE conn) { -- char buffer[8192]; -+ unsigned char buffer[8192]; - int len=sizeof(buffer); - - NWCCTranAddr aux; -@@ -335,7 +335,7 @@ static void getAsMuchAsYouCan ( NWCONN_H - printf("NWCC_INFO_SECURITY %s\n",strnwerror(NWCCGetConnInfo(conn,NWCC_INFO_SECURITY, sizeof (int), buffer))); - - -- dump_hex("tranaddr:",(char *)&aux,sizeof(aux)); -+ dump_hex("tranaddr:",(const unsigned char *)&aux,sizeof(aux)); - dump_hex("tranaddr II: ",aux.buffer,12); - - free (aux.buffer); -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/pp/nwwhoami.c ---- a/contrib/testing/pp/nwwhoami.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/pp/nwwhoami.c Sat Jun 11 19:59:00 2005 +0000 -@@ -199,7 +199,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/pp/open_conn_by_name.c ---- a/contrib/testing/pp/open_conn_by_name.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/pp/open_conn_by_name.c Sat Jun 11 19:59:00 2005 +0000 -@@ -186,7 +186,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/pp/readsdef.c ---- a/contrib/testing/pp/readsdef.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/pp/readsdef.c Sat Jun 11 19:59:00 2005 +0000 -@@ -182,7 +182,7 @@ int main(int argc, char *argv[]) { - */ - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/pp/readsynt.c ---- a/contrib/testing/pp/readsynt.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/pp/readsynt.c Sat Jun 11 19:59:00 2005 +0000 -@@ -447,7 +447,7 @@ int main(int argc, char *argv[]) { - */ - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/pp/return_block_of_tree.c ---- a/contrib/testing/pp/return_block_of_tree.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/pp/return_block_of_tree.c Sat Jun 11 19:59:00 2005 +0000 -@@ -184,7 +184,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/pp/scantree.c ---- a/contrib/testing/pp/scantree.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/pp/scantree.c Sat Jun 11 19:59:00 2005 +0000 -@@ -188,7 +188,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/pp/scanvolr.c ---- a/contrib/testing/pp/scanvolr.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/pp/scanvolr.c Sat Jun 11 19:59:00 2005 +0000 -@@ -211,7 +211,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/pp/semaphor.c ---- a/contrib/testing/pp/semaphor.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/pp/semaphor.c Sat Jun 11 19:59:00 2005 +0000 -@@ -188,7 +188,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -@@ -231,7 +231,8 @@ int main(int argc, char *argv[]) { - - { - nuint32 semHandle; -- nuint16 semCurrentCount,semValue,semOpenCount; -+ nuint16 semCurrentCount, semOpenCount; -+ nint16 semValue; - - err=NWOpenSemaphore (conn,semName,maxAccess,&semHandle, &semCurrentCount); - if (err) { -@@ -243,7 +244,7 @@ int main(int argc, char *argv[]) { - printf ("%s is open with handle(%x) for %u max concurrent access. Currently it has %d access\n", - semName,semHandle,maxAccess,semCurrentCount); - -- err=NWExamineSemaphore (conn,semHandle,&semValue,&semOpenCount); -+ err=NWExamineSemaphore(conn, semHandle, &semValue, &semOpenCount); - if (err) { - fprintf(stderr, "NWExamineSemaphore failed with error %s\n", - strnwerror(err)); -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/pp/volres.c ---- a/contrib/testing/pp/volres.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/pp/volres.c Sat Jun 11 19:59:00 2005 +0000 -@@ -209,7 +209,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/readaddr.c ---- a/contrib/testing/readaddr.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/readaddr.c Sat Jun 11 19:59:00 2005 +0000 -@@ -66,7 +66,7 @@ int main(int argc, char *argv[]) { - NWDSContextHandle ctx; - NWCONN_HANDLE conn; - const char* context = "OrgUnit.Org.Country"; -- unsigned char buff[1000]; -+ char buff[1000]; - const char* server = "CDROM"; - int opt; - u_int32_t ctxflag = 0; -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/readadef.c ---- a/contrib/testing/readadef.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/readadef.c Sat Jun 11 19:59:00 2005 +0000 -@@ -201,7 +201,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/readattr.c ---- a/contrib/testing/readattr.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/readattr.c Sat Jun 11 19:59:00 2005 +0000 -@@ -640,7 +640,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/readcc.c ---- a/contrib/testing/readcc.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/readcc.c Sat Jun 11 19:59:00 2005 +0000 -@@ -182,7 +182,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/readcls.c ---- a/contrib/testing/readcls.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/readcls.c Sat Jun 11 19:59:00 2005 +0000 -@@ -223,7 +223,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/readsynt.c ---- a/contrib/testing/readsynt.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/readsynt.c Sat Jun 11 19:59:00 2005 +0000 -@@ -200,7 +200,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/renobj.c ---- a/contrib/testing/renobj.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/renobj.c Sat Jun 11 19:59:00 2005 +0000 -@@ -180,7 +180,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/replops.c ---- a/contrib/testing/replops.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/replops.c Sat Jun 11 19:59:00 2005 +0000 -@@ -217,7 +217,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/resint.c ---- a/contrib/testing/resint.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/resint.c Sat Jun 11 19:59:00 2005 +0000 -@@ -206,7 +206,7 @@ int main(int argc, char *argv[]) { - return 122; - } - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/resolve.c ---- a/contrib/testing/resolve.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/resolve.c Sat Jun 11 19:59:00 2005 +0000 -@@ -142,7 +142,7 @@ int main(int argc, char *argv[]) { - return 122; - } - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/rmattr.c ---- a/contrib/testing/rmattr.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/rmattr.c Sat Jun 11 19:59:00 2005 +0000 -@@ -167,7 +167,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/rmclass.c ---- a/contrib/testing/rmclass.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/rmclass.c Sat Jun 11 19:59:00 2005 +0000 -@@ -167,7 +167,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/rmobj.c ---- a/contrib/testing/rmobj.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/rmobj.c Sat Jun 11 19:59:00 2005 +0000 -@@ -170,7 +170,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/schsync.c ---- a/contrib/testing/schsync.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/schsync.c Sat Jun 11 19:59:00 2005 +0000 -@@ -172,7 +172,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/setkeys.c ---- a/contrib/testing/setkeys.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/setkeys.c Sat Jun 11 19:59:00 2005 +0000 -@@ -172,7 +172,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/timeinfo.c ---- a/contrib/testing/timeinfo.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/timeinfo.c Sat Jun 11 19:59:00 2005 +0000 -@@ -256,7 +256,7 @@ int main(int argc, char *argv[]) { - } - #ifdef N_PLAT_LINUX - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/testing/verpwd.c ---- a/contrib/testing/verpwd.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/testing/verpwd.c Sat Jun 11 19:59:00 2005 +0000 -@@ -192,7 +192,7 @@ int main(int argc, char *argv[]) { - } - #ifndef N_PLAT_MSW4 - { -- static const u_int32_t add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; -+ static const NET_ADDRESS_TYPE add[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - dserr = NWDSSetTransport(ctx, 16, add); - if (dserr) { - fprintf(stderr, "NWDSSetTransport failed: %s\n", -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/tests/dsfilter.c ---- a/contrib/tests/dsfilter.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/tests/dsfilter.c Sat Jun 11 19:59:00 2005 +0000 -@@ -86,7 +86,7 @@ static int searchtest(const char* testna - Buf_T *buf = NULL; - Filter_Cursor_T *cur = NULL; - -- static const u_int32_t add[] = -+ static const NET_ADDRESS_TYPE add[] = - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; - - NWCallsInit (NULL, NULL); -diff -r 3fc1f5c9c744 -r 06020cf028e1 contrib/tests/putfilte.c ---- a/contrib/tests/putfilte.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/contrib/tests/putfilte.c Sat Jun 11 19:59:00 2005 +0000 -@@ -67,7 +67,7 @@ ndsfindusercontext (NWDSContextHandle ct - if ((nwerr = NWDSAddFilterToken (cur, FTOK_EQ, NULL, 0))) - goto out; - -- if ((nwerr = NWDSAddFilterToken (cur, FTOK_AVAL, (char *) ousername, SYN_CI_STRING))) -+ if ((nwerr = NWDSAddFilterToken (cur, FTOK_AVAL, (const char *) ousername, SYN_CI_STRING))) - goto out; - - if ((nwerr = NWDSAddFilterToken (cur, FTOK_RPAREN, NULL, 0))) -@@ -133,7 +133,7 @@ main (int argc, char *argv[]) - NWDSContextHandle ctx; - NWCONN_HANDLE conn; - struct ncp_conn_spec connsp; -- static const u_int32_t add[] = -+ static const NET_ADDRESS_TYPE add[] = - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; - - mtrace (); -diff -r 3fc1f5c9c744 -r 06020cf028e1 include/ncp/kernel/ncp_fs.h ---- a/include/ncp/kernel/ncp_fs.h Sun Jun 05 21:25:42 2005 +0000 -+++ b/include/ncp/kernel/ncp_fs.h Sat Jun 11 19:59:00 2005 +0000 -@@ -50,8 +50,8 @@ - - struct ncp_sign_init - { -- char sign_root[8]; -- char sign_last[16]; -+ unsigned char sign_root[8]; -+ unsigned char sign_last[16]; - }; - - union ncp_sockaddr { -@@ -72,7 +72,7 @@ struct ncp_ioctl_request { - struct ncp_ioctl_request { - unsigned int function; - unsigned int size; -- char *data; -+ unsigned char *data; - }; - - struct ncp_fs_info { -@@ -130,13 +130,13 @@ struct ncp_nls_ioctl_old - struct ncp_nls_ioctl_old - { - int codepage; -- unsigned char iocharset[NCP_IOCSNAME_LEN+1]; -+ char iocharset[NCP_IOCSNAME_LEN+1]; - }; - - struct ncp_nls_ioctl - { -- unsigned char codepage[NCP_IOCSNAME_LEN+1]; -- unsigned char iocharset[NCP_IOCSNAME_LEN+1]; -+ char codepage[NCP_IOCSNAME_LEN+1]; -+ char iocharset[NCP_IOCSNAME_LEN+1]; - }; - - #define NCP_IOC_NCPREQUEST _IOR('n', 1, struct ncp_ioctl_request) -diff -r 3fc1f5c9c744 -r 06020cf028e1 include/ncp/ncp.h ---- a/include/ncp/ncp.h Sun Jun 05 21:25:42 2005 +0000 -+++ b/include/ncp/ncp.h Sat Jun 11 19:59:00 2005 +0000 -@@ -73,7 +73,7 @@ struct ncp_bindery_object { - #ifdef SWIG - fixedCharArray object_name[NCP_BINDERY_NAME_LEN]; - #else -- u_int8_t object_name[NCP_BINDERY_NAME_LEN]; -+ char object_name[NCP_BINDERY_NAME_LEN]; - #endif - u_int8_t object_flags; - u_int8_t object_security; -diff -r 3fc1f5c9c744 -r 06020cf028e1 include/ncp/ncplib.h ---- a/include/ncp/ncplib.h Sun Jun 05 21:25:42 2005 +0000 -+++ b/include/ncp/ncplib.h Sat Jun 11 19:59:00 2005 +0000 -@@ -474,7 +474,7 @@ struct ncp_file_server_info - #else - struct ncp_file_server_info - { -- u_int8_t ServerName[48] __attribute__((packed)); -+ char ServerName[48] __attribute__((packed)); - u_int8_t FileServiceVersion __attribute__((packed)); - u_int8_t FileServiceSubVersion __attribute__((packed)); - u_int16_t MaximumServiceConnections __attribute__((packed)); -@@ -499,7 +499,7 @@ struct ncp_file_server_info_2 { - #ifdef SWIG - fixedArray ServerName[49]; - #else -- u_int8_t ServerName[49]; -+ char ServerName[49]; - #endif - u_int8_t FileServiceVersion; - u_int8_t FileServiceSubVersion; -@@ -560,7 +560,7 @@ long - - long - ncp_get_encryption_key(NWCONN_HANDLE conn, -- char *encryption_key); -+ unsigned char encryption_key[8]); - long - ncp_get_bindery_object_id(NWCONN_HANDLE conn, - NWObjectType object_type, -@@ -710,19 +710,19 @@ long - ncp_login_encrypted(NWCONN_HANDLE conn, - const struct ncp_bindery_object *object, - const unsigned char *key, -- const unsigned char *passwd); -+ const char *passwd); - - long - ncp_login_unencrypted(NWCONN_HANDLE conn, - NWObjectType object_type, const char *object_name, -- const unsigned char *passwd); -+ const char *passwd); - - long - ncp_change_login_passwd(NWCONN_HANDLE conn, - const struct ncp_bindery_object *object, - const unsigned char *key, -- const unsigned char *oldpasswd, -- const unsigned char *newpasswd); -+ const char *oldpasswd, -+ const char *newpasswd); - - #define NCP_GRACE_PERIOD (0xdf) - -@@ -782,8 +782,8 @@ const char* strnwerror(int err); - - long - ncp_login_user(NWCONN_HANDLE conn, -- const unsigned char *username, -- const unsigned char *password); -+ const char *username, -+ const char *password); - - long - ncp_get_volume_info_with_number(NWCONN_HANDLE conn, int n, -@@ -815,7 +815,7 @@ long - int attr, int accessm, - struct ncp_file_info *target); - --long ncp_close_file(NWCONN_HANDLE conn, const char fileHandle[6]); -+long ncp_close_file(NWCONN_HANDLE conn, const unsigned char fileHandle[6]); - - long - ncp_create_newfile(NWCONN_HANDLE conn, -@@ -878,11 +878,11 @@ long - - #ifdef SWIG - long -- ncp_read(NWCONN_HANDLE conn, const char fileHandle[6], -+ ncp_read(NWCONN_HANDLE conn, const unsigned char fileHandle[6], - ncp_off_t offset, size_t count, char *RETBUFFER_LENPREV); - - long -- ncp_write(NWCONN_HANDLE conn, const char fileHandle[6], -+ ncp_write(NWCONN_HANDLE conn, const unsigned char fileHandle[6], - ncp_off_t offset, size_t IGNORE, const char *STRING_LENPREV); - - long -@@ -895,23 +895,23 @@ long - u_int32_t * OUTPUT); - #else - long -- ncp_read(NWCONN_HANDLE conn, const char fileHandle[6], -- ncp_off_t offset, size_t count, char *target); -- --long -- ncp_write(NWCONN_HANDLE conn, const char fileHandle[6], -- ncp_off_t offset, size_t count, const char *source); -- --NWCCODE ncp_read64(NWCONN_HANDLE conn, const char fileHandle[6], -+ ncp_read(NWCONN_HANDLE conn, const unsigned char fileHandle[6], -+ ncp_off_t offset, size_t count, void *target); -+ -+long -+ ncp_write(NWCONN_HANDLE conn, const unsigned char fileHandle[6], -+ ncp_off_t offset, size_t count, const void *source); -+ -+NWCCODE ncp_read64(NWCONN_HANDLE conn, const unsigned char fileHandle[6], - ncp_off64_t offset, size_t count, void *target, size_t *bytesread); - --NWCCODE ncp_write64(NWCONN_HANDLE conn, const char fileHandle[6], -+NWCCODE ncp_write64(NWCONN_HANDLE conn, const unsigned char fileHandle[6], - ncp_off64_t offset, size_t count, const void *source, size_t *byteswritten); - - long - ncp_copy_file(NWCONN_HANDLE conn, -- const char source_file[6], -- const char target_file[6], -+ const unsigned char source_file[6], -+ const unsigned char target_file[6], - u_int32_t source_offset, - u_int32_t target_offset, - u_int32_t count, -@@ -1167,8 +1167,8 @@ long - long - ncp_send_nds_frag(NWCONN_HANDLE conn, - int ndsverb, -- const char *inbuf, size_t inbuflen, -- char *outbuf, size_t outbufsize, size_t *outbuflen); -+ const void *inbuf, size_t inbuflen, -+ void *outbuf, size_t outbufsize, size_t *outbuflen); - - long - ncp_send_nds(NWCONN_HANDLE conn, int fn, -@@ -1423,7 +1423,7 @@ ncp_ns_open_create_entry(NWCONN_HANDLE c - /* struct nw_info_struct2 */ void* target, size_t sizeoftarget, - u_int8_t* oc_action, - u_int8_t* oc_callback, -- char fileHandle[6] /* ?? u_int32_t* or NW_FILE_HANDLE* ?? */ -+ unsigned char fileHandle[6] /* ?? u_int32_t* or NW_FILE_HANDLE* ?? */ - ); - - NWCCODE -@@ -1660,7 +1660,7 @@ NWCCODE - NWCCODE - ncp_get_file_size(NWCONN_HANDLE conn, - /* input */ -- const char fileHandle[6], -+ const unsigned char fileHandle[6], - /* output */ - ncp_off64_t* fileSize); - -@@ -1684,14 +1684,14 @@ const char* ncp_namespace_to_str(char r[ - #define NCP_PHYSREC_EX 0x01 - #define NCP_PHYSREC_SH 0x03 - --NWCCODE ncp_log_physical_record(NWCONN_HANDLE conn, const char fileHandle[6], -+NWCCODE ncp_log_physical_record(NWCONN_HANDLE conn, const unsigned char fileHandle[6], - ncp_off64_t startOffset, u_int64_t length, unsigned int flags, - unsigned int timeout); - --NWCCODE ncp_clear_physical_record(NWCONN_HANDLE conn, const char fileHandle[6], -+NWCCODE ncp_clear_physical_record(NWCONN_HANDLE conn, const unsigned char fileHandle[6], - ncp_off64_t startOffset, u_int64_t length); - --NWCCODE ncp_release_physical_record(NWCONN_HANDLE conn, const char fileHandle[6], -+NWCCODE ncp_release_physical_record(NWCONN_HANDLE conn, const unsigned char fileHandle[6], - ncp_off64_t startOffset, u_int64_t length); - - #ifdef __cplusplus -diff -r 3fc1f5c9c744 -r 06020cf028e1 include/ncp/nwnet.h.in ---- a/include/ncp/nwnet.h.in Sun Jun 05 21:25:42 2005 +0000 -+++ b/include/ncp/nwnet.h.in Sat Jun 11 19:59:00 2005 +0000 -@@ -661,7 +661,7 @@ NWDSCCODE __NWDSCompare(NWDSContextHandl - NWObjectID objectID, Buf_T* buf, nbool8* matched); - NWDSCCODE __NWDSOpenStream(NWDSContextHandle ctx, const NWDSChar* objectName, - const NWDSChar* attrName, nflag32 flags, NWCONN_HANDLE* rconn, -- char fileHandle[6], ncp_off64_t* fileSize); -+ unsigned char fileHandle[6], ncp_off64_t* fileSize); - - NWDSCCODE NWDSAddObject(NWDSContextHandle ctx, const NWDSChar* name, - nuint32* iterHandle, nbool8 more, Buf_T* buf); /* D */ -diff -r 3fc1f5c9c744 -r 06020cf028e1 lib/ds/dsgetstat.c ---- a/lib/ds/dsgetstat.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/lib/ds/dsgetstat.c Sat Jun 11 19:59:00 2005 +0000 -@@ -230,7 +230,7 @@ NWDSCCODE NWDSGetDSVerInfo( - switch (version) { - case 0x00000009: - { -- char asciiName[MAX_TREE_NAME_CHARS + 1]; -+ unsigned char asciiName[MAX_TREE_NAME_CHARS + 1]; - nuint32 asciiNameLen; - - dserr = NWDSBufGetLE32(&buf, &asciiNameLen); -diff -r 3fc1f5c9c744 -r 06020cf028e1 lib/ds/dsstream.c ---- a/lib/ds/dsstream.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/lib/ds/dsstream.c Sat Jun 11 19:59:00 2005 +0000 -@@ -69,7 +69,7 @@ NWDSCCODE __NWDSOpenStream( - const NWDSChar* attrName, - nflag32 flags, - NWCONN_HANDLE* rconn, -- char fh[6], -+ unsigned char fh[6], - ncp_off64_t* size) { - NWDSCCODE err; - char rq_b[DEFAULT_MESSAGE_LEN]; -diff -r 3fc1f5c9c744 -r 06020cf028e1 lib/ds/partops.c ---- a/lib/ds/partops.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/lib/ds/partops.c Sat Jun 11 19:59:00 2005 +0000 -@@ -339,12 +339,12 @@ NWDSCCODE NWDSGetPartitionExtInfoPtr( - } - fields = partitions->dsiFlags; - if (fields & DSP_OUTPUT_FIELDS) { -- *infoPtr = partitions->curPos; -+ *infoPtr = (char*)partitions->curPos; - dserr = NWDSBufGetLE32(partitions, &fields); - if (dserr) - return dserr; - } else { -- *infoPtr = partitions->curPos - 4; -+ *infoPtr = (char*)partitions->curPos - 4; - DSET_LH(partitions->curPos - 4, 0, fields); - } - if (fields & DSP_PARTITION_ID) -@@ -372,7 +372,7 @@ NWDSCCODE NWDSGetPartitionExtInfoPtr( - return NWE_PARAM_INVALID; - if (partitions->curPos > partitions->dataend) - return ERR_BUFFER_EMPTY; -- *infoPtrEnd = partitions->curPos; -+ *infoPtrEnd = (char*)partitions->curPos; - return 0; - } - -diff -r 3fc1f5c9c744 -r 06020cf028e1 lib/ds/search.c ---- a/lib/ds/search.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/lib/ds/search.c Sat Jun 11 19:59:00 2005 +0000 -@@ -166,7 +166,7 @@ struct search_referrals { - struct search_referrals { - struct search_referrals* next; - nuint32 referrals; -- char data[0]; -+ unsigned char data[0]; - }; - - struct SearchIH { -diff -r 3fc1f5c9c744 -r 06020cf028e1 lib/ds/setkeys.c ---- a/lib/ds/setkeys.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/lib/ds/setkeys.c Sat Jun 11 19:59:00 2005 +0000 -@@ -221,10 +221,10 @@ static NWDSCCODE __NWDSGenerateObjectKey - return 0; - } - --static void __NWDSHashPasswordUpper(const nuint8* objectPassword, -- NWObjectID pseudoID, -- size_t pwdLen, -- nuint8 pwdHash[16] -+static void __NWDSHashPasswordUpper(const char* objectPassword, -+ NWObjectID pseudoID, -+ size_t pwdLen, -+ nuint8 pwdHash[16] - ) { - nuint8 newPwd[pwdLen + 1]; - size_t i; -@@ -238,10 +238,10 @@ static void __NWDSHashPasswordUpper(cons - shuffle(tmpID, newPwd, pwdLen, pwdHash); - } - --static void __NWDSHashPassword(const nuint8* objectPassword, -- NWObjectID pseudoID, -- size_t pwdLen, -- nuint8 pwdHash[16] -+static void __NWDSHashPassword(const char* objectPassword, -+ NWObjectID pseudoID, -+ size_t pwdLen, -+ nuint8 pwdHash[16] - ) { - nuint8 tmpID[4]; - -diff -r 3fc1f5c9c744 -r 06020cf028e1 lib/filemgmt.c ---- a/lib/filemgmt.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/lib/filemgmt.c Sat Jun 11 19:59:00 2005 +0000 -@@ -410,7 +410,7 @@ ncp_open_file(struct ncp_conn *conn, - } - - long --ncp_close_file(struct ncp_conn *conn, const char *file_id) -+ncp_close_file(struct ncp_conn *conn, const unsigned char *file_id) - { - long result; - -@@ -630,7 +630,7 @@ ncp_get_trustee(struct ncp_conn *conn, u - } - *contin = ncp_reply_word_hl(conn, 0); - *trustee = ncp_reply_byte(conn, 6); -- strncpy(path, ncp_reply_data(conn, 8), len); -+ memcpy(path, ncp_reply_data(conn, 8), len); - path[len] = 0; - ncp_unlock_conn(conn); - return 0; -@@ -799,7 +799,7 @@ ncp_add_handle_path2(struct ncp_conn *co - ncp_add_byte(conn, dir_style); /* 1 = dir_base, 0xFF = no handle, 0 = handle */ - if (encpath) { - if (pathlen == NCP_PATH_STD) { -- int p = ncp_path_to_NW_format2(encpath, dir_style, conn->current_point, conn->packet + sizeof(conn->packet) - conn->current_point); -+ int p = ncp_path_to_NW_format2((const char*)encpath, dir_style, conn->current_point, conn->packet + sizeof(conn->packet) - conn->current_point); - if (p < 0) { - return p; - } -@@ -823,7 +823,7 @@ ncp_extract_file_info(void *structure, s - memcpy(target, structure, info_struct_size); - name_len = (u_int8_t*)structure + info_struct_size; - target->nameLen = *name_len; -- strncpy(target->entryName, name_len + 1, *name_len); -+ memcpy(target->entryName, name_len + 1, *name_len); - target->entryName[*name_len] = '\0'; - } - return; -@@ -1215,9 +1215,9 @@ ncp_ren_or_mov_file_or_subdir(struct ncp - } - - static int --ncp_do_read(struct ncp_conn *conn, const char *file_id, -+ncp_do_read(struct ncp_conn *conn, const unsigned char *file_id, - u_int32_t offset, u_int16_t to_read, -- char *target, int *bytes_read) -+ void *target, int *bytes_read) - { - long result; - unsigned int off; -@@ -1252,11 +1252,12 @@ ncp_do_read(struct ncp_conn *conn, const - } - - long --ncp_read(struct ncp_conn *conn, const char *file_id, -- off_t offset, size_t count, char *target) -+ncp_read(struct ncp_conn *conn, const unsigned char *file_id, -+ off_t offset, size_t count, void *itarget) - { - int bufsize = conn->i.buffer_size; - size_t already_read = 0; -+ u_int8_t* target = itarget; - - if (!file_id || !target) { - return ERR_NULL_POINTER; -@@ -1290,7 +1291,7 @@ static NWCCODE - static NWCCODE - ncp_do_read_64(struct ncp_conn *conn, u_int32_t fh, - ncp_off64_t offset, size_t to_read, -- void *target, size_t *bytes_read) -+ char *target, size_t *bytes_read) - { - long result; - unsigned int off; -@@ -1367,7 +1368,7 @@ ncp_read_64(struct ncp_conn *conn, u_int - return 0; - } - --NWCCODE ncp_read64(struct ncp_conn *conn, const char file_handle[6], -+NWCCODE ncp_read64(struct ncp_conn *conn, const unsigned char file_handle[6], - ncp_off64_t offset, size_t count, void *target, size_t *readbytes) { - NWCCODE result; - -@@ -1400,9 +1401,9 @@ NWCCODE ncp_read64(struct ncp_conn *conn - } - - static int --ncp_do_write(struct ncp_conn *conn, const char *file_id, -+ncp_do_write(struct ncp_conn *conn, const unsigned char *file_id, - u_int32_t offset, u_int16_t to_write, -- const char *source, int *bytes_written) -+ const void *source, int *bytes_written) - { - long result; - -@@ -1425,11 +1426,12 @@ ncp_do_write(struct ncp_conn *conn, cons - } - - long --ncp_write(struct ncp_conn *conn, const char *file_id, -- off_t offset, size_t count, const char *source) -+ncp_write(struct ncp_conn *conn, const unsigned char *file_id, -+ off_t offset, size_t count, const void *isource) - { - int bufsize = conn->i.buffer_size; - size_t already_written = 0; -+ const u_int8_t* source = isource; - - if (!file_id || !source) { - return ERR_NULL_POINTER; -@@ -1520,7 +1522,7 @@ static NWCCODE ncp_write_64(struct ncp_c - return 0; - } - --NWCCODE ncp_write64(struct ncp_conn *conn, const char file_handle[6], -+NWCCODE ncp_write64(struct ncp_conn *conn, const unsigned char file_handle[6], - ncp_off64_t offset, size_t count, const void *target, size_t *bytes) { - NWCCODE result; - -@@ -1554,8 +1556,8 @@ NWCCODE ncp_write64(struct ncp_conn *con - - long - ncp_copy_file(struct ncp_conn *conn, -- const char source_file[6], -- const char target_file[6], -+ const unsigned char source_file[6], -+ const unsigned char target_file[6], - u_int32_t source_offset, - u_int32_t target_offset, - u_int32_t count, -@@ -2940,7 +2942,7 @@ ncp_ns_open_create_entry(struct ncp_conn - /* struct nw_info_struct2 */ void* target, size_t sizeoftarget, - u_int8_t* oc_action, - u_int8_t* oc_callback, -- char file_handle[6]) -+ unsigned char file_handle[6]) - { - NWCCODE result; - u_int32_t fhandle; -@@ -3484,10 +3486,10 @@ ncp_get_mount_volume_list_compat(struct - unsigned int *itemcnt, - void* b, size_t* blen) { - unsigned int vol; -- unsigned char* buffer = b; -+ char* buffer = b; - unsigned int items = 0; - size_t needSize; -- unsigned char* bend = buffer + *blen; -+ char* bend = buffer + *blen; - - if (flags & 1) { - needSize = 4 + 1 + 17; -@@ -3527,7 +3529,7 @@ ncp_get_mount_volume_list_compat(struct - return NWE_SERVER_FAILURE; - } - *itemcnt = items; -- *blen = buffer - (unsigned char*)b; -+ *blen = buffer - (char*)b; - return 0; - } - -@@ -3667,7 +3669,7 @@ ncp_volume_list_next(NWVOL_HANDLE h, - unsigned int itemcnt; - unsigned char buffer[1024]; - size_t blen = sizeof(buffer); -- char* b; -+ unsigned char* b; - - if (h->err) { - result = h->err; -@@ -3696,7 +3698,7 @@ ncp_volume_list_next(NWVOL_HANDLE h, - } - - /* let's build buffer */ -- b = (char*)malloc(blen); -+ b = malloc(blen); - if (!b) { - result = ENOMEM; - goto quit; -@@ -4018,7 +4020,7 @@ ncp_ns_search_end(NWDIRLIST_HANDLE h) { - - static NWCCODE ncp_get_file_size_32( - NWCONN_HANDLE conn, -- const char fileHandle[6], -+ const unsigned char fileHandle[6], - ncp_off64_t* fileSize) { - NWCCODE result; - -@@ -4069,7 +4071,7 @@ NWCCODE - NWCCODE - ncp_get_file_size( - NWCONN_HANDLE conn, -- const char fileHandle[6], -+ const unsigned char fileHandle[6], - ncp_off64_t* fileSize) { - NWCCODE result; - -diff -r 3fc1f5c9c744 -r 06020cf028e1 lib/fs/filelock.c ---- a/lib/fs/filelock.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/lib/fs/filelock.c Sat Jun 11 19:59:00 2005 +0000 -@@ -29,7 +29,7 @@ - #include - #include - --static NWCCODE ncp_log_physical_record32(NWCONN_HANDLE conn, const char fh[6], -+static NWCCODE ncp_log_physical_record32(NWCONN_HANDLE conn, const unsigned char fh[6], - u_int32_t startOffset, u_int32_t length, unsigned int flags, - unsigned int timeout) { - NWCCODE err; -@@ -62,7 +62,7 @@ static NWCCODE ncp_log_physical_record64 - return err; - } - --NWCCODE ncp_log_physical_record(NWCONN_HANDLE conn, const char file_handle[6], -+NWCCODE ncp_log_physical_record(NWCONN_HANDLE conn, const unsigned char file_handle[6], - ncp_off64_t startOffset, u_int64_t length, unsigned int flags, - unsigned int timeout) { - NWCCODE err; -@@ -93,7 +93,7 @@ NWCCODE ncp_log_physical_record(NWCONN_H - } - - --static NWCCODE ncp_clear_release_physical_record32(NWCONN_HANDLE conn, const char fh[6], -+static NWCCODE ncp_clear_release_physical_record32(NWCONN_HANDLE conn, const unsigned char fh[6], - u_int32_t startOffset, u_int32_t length, int release) { - NWCCODE err; - -@@ -128,7 +128,7 @@ static NWCCODE ncp_clear_release_physica - return err; - } - --static NWCCODE ncp_clear_release_physical_record(NWCONN_HANDLE conn, const char file_handle[6], -+static NWCCODE ncp_clear_release_physical_record(NWCONN_HANDLE conn, const unsigned char file_handle[6], - ncp_off64_t startOffset, u_int64_t length, int release) { - NWCCODE err; - -@@ -154,12 +154,12 @@ static NWCCODE ncp_clear_release_physica - return err; - } - --NWCCODE ncp_clear_physical_record(NWCONN_HANDLE conn, const char file_handle[6], -+NWCCODE ncp_clear_physical_record(NWCONN_HANDLE conn, const unsigned char file_handle[6], - ncp_off64_t startOffset, u_int64_t length) { - return ncp_clear_release_physical_record(conn, file_handle, startOffset, length, 0); - } - --NWCCODE ncp_release_physical_record(NWCONN_HANDLE conn, const char file_handle[6], -+NWCCODE ncp_release_physical_record(NWCONN_HANDLE conn, const unsigned char file_handle[6], - ncp_off64_t startOffset, u_int64_t length) { - return ncp_clear_release_physical_record(conn, file_handle, startOffset, length, 1); - } -diff -r 3fc1f5c9c744 -r 06020cf028e1 lib/ncplib.c ---- a/lib/ncplib.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/lib/ncplib.c Sat Jun 11 19:59:00 2005 +0000 -@@ -216,10 +216,10 @@ ncp_negotiate_size_and_options(struct nc - #endif - - static long -- ncp_login_object(struct ncp_conn *conn, -- const unsigned char *username, -+ncp_login_object(struct ncp_conn *conn, -+ const char *username, - int login_type, -- const unsigned char *password); -+ const char *password); - - static long - ncp_do_close(struct ncp_conn *conn); -@@ -666,7 +666,7 @@ static void run_wdog(struct ncp_conn *co - if (pfd[0].revents & POLLIN) { - struct sockaddr_ipx sender; - int sizeofaddr = sizeof(struct sockaddr_ipx); -- char buf[1024]; -+ unsigned char buf[1024]; - size_t pktsize; - NWCCODE err; - -@@ -1294,7 +1294,7 @@ ncp_connect_ipx_addr(struct ncp_conn *co - int ncp_sock, wdog_sock; - long err; - -- conn->ncp_reply_buffer = (char*)malloc(NCP_PACKET_SIZE); -+ conn->ncp_reply_buffer = malloc(NCP_PACKET_SIZE); - if (!conn->ncp_reply_buffer) { - return ENOMEM; - } -@@ -1397,7 +1397,7 @@ ncp_connect_in_addr(struct ncp_conn *con - int ncp_sock; - long err; - -- conn->ncp_reply_buffer = (char*)malloc(NCP_PACKET_SIZE); -+ conn->ncp_reply_buffer = malloc(NCP_PACKET_SIZE); - if (!conn->ncp_reply_buffer) { - return ENOMEM; - } -@@ -2444,6 +2444,30 @@ ncp_find_conn_spec(const char *server, c - uid, 0, err); - } - -+static int -+ncp_init_get_argument(int *argc, char **argv, int arg_no, const char **target) -+{ -+ int count = 1; -+ -+ if (target != NULL) { -+ if (arg_no + 1 >= *argc) { -+ /* No argument to switch */ -+ errno = EINVAL; -+ return -1; -+ } -+ *target = argv[arg_no + 1]; -+ count = 2; -+ } -+ /* Delete the consumed switch from the argument list -+ and decrement the argument count */ -+ while (count + arg_no < *argc) { -+ argv[arg_no] = argv[arg_no + count]; -+ arg_no += 1; -+ } -+ *argc -= count; -+ return 0; -+} -+ - struct ncp_conn * - ncp_initialize_2(int *argc, char **argv, int login_necessary, - int login_type, long *err, int required) -@@ -2457,28 +2481,6 @@ ncp_initialize_2(int *argc, char **argv, - int i = 1; - NWCCODE nwerr; - -- static int get_argument(int arg_no, const char **target) { -- int count = 1; -- -- if (target != NULL) { -- if (arg_no + 1 >= *argc) { -- /* No argument to switch */ -- errno = EINVAL; -- return -1; -- } -- *target = argv[arg_no + 1]; -- count = 2; -- } -- /* Delete the consumed switch from the argument list -- and decrement the argument count */ -- while (count + arg_no < *argc) { -- argv[arg_no] = argv[arg_no + count]; -- arg_no += 1; -- } -- *argc -= count; -- return 0; -- } -- - *err = EINVAL; - - while (i < *argc) { -@@ -2489,17 +2491,17 @@ ncp_initialize_2(int *argc, char **argv, - } - switch (argv[i][1]) { - case 'S': -- if (get_argument(i, &server) != 0) { -+ if (ncp_init_get_argument(argc, argv, i, &server) != 0) { - return NULL; - } - continue; - case 'U': -- if (get_argument(i, &user) != 0) { -+ if (ncp_init_get_argument(argc, argv, i, &user) != 0) { - return NULL; - } - continue; - case 'P': -- if (get_argument(i, &password) != 0) { -+ if (ncp_init_get_argument(argc, argv, i, &password) != 0) { - return NULL; - } - if (password) { -@@ -2509,14 +2511,14 @@ ncp_initialize_2(int *argc, char **argv, - } - continue; - case 'n': -- if (get_argument(i, NULL) != 0) { -+ if (ncp_init_get_argument(argc, argv, i, NULL) != 0) { - return NULL; - } - password = NWC_NOPASSWORD; - continue; - #ifdef NDS_SUPPORT - case 'b': -- if (get_argument(i, NULL) != 0) { -+ if (ncp_init_get_argument(argc, argv, i, NULL) != 0) { - return NULL; - } - bindery_only = 1; -@@ -2524,7 +2526,7 @@ ncp_initialize_2(int *argc, char **argv, - #endif - #ifdef CONFIG_NATIVE_IP - case 'A': -- if (get_argument(i, &address) != 0) { -+ if (ncp_init_get_argument(argc, argv, i, &address) != 0) { - return NULL; - } - continue; -@@ -3036,7 +3038,7 @@ ncp_send_broadcast2(struct ncp_conn *con - */ - long - ncp_get_encryption_key(struct ncp_conn *conn, -- char *target) -+ unsigned char *target) - { - NW_FRAGMENT rp; - NWCCODE err; -@@ -3529,7 +3531,7 @@ ncp_keyed_verify_password(struct ncp_con - ncp_keyed_verify_password(struct ncp_conn *conn, - const struct ncp_bindery_object *object, - const unsigned char *key, -- const unsigned char *passwd) -+ const char *passwd) - { - dword tmpID = htonl(object->object_id); - unsigned char buf[128]; -@@ -3599,7 +3601,7 @@ ncp_login_encrypted(struct ncp_conn *con - ncp_login_encrypted(struct ncp_conn *conn, - const struct ncp_bindery_object *object, - const unsigned char *key, -- const unsigned char *passwd) -+ const char *passwd) - { - dword tmpID; - unsigned char buf[128]; -@@ -3642,7 +3644,7 @@ long - long - ncp_login_unencrypted(struct ncp_conn *conn, - NWObjectType object_type, const char *object_name, -- const unsigned char *passwd) -+ const char *passwd) - { - long result; - -@@ -3669,8 +3671,8 @@ ncp_change_login_passwd(struct ncp_conn - ncp_change_login_passwd(struct ncp_conn *conn, - const struct ncp_bindery_object *object, - const unsigned char *key, -- const unsigned char *oldpasswd, -- const unsigned char *newpasswd) -+ const char *oldpasswd, -+ const char *newpasswd) - { - long id; - unsigned char cryptkey[8]; -@@ -3687,8 +3689,8 @@ ncp_change_login_passwd(struct ncp_conn - shuffle((byte *) & id, oldpasswd, strlen(oldpasswd), oldpwd); - shuffle((byte *) & id, newpasswd, strlen(newpasswd), newpwd); - nw_encrypt(cryptkey, oldpwd, cryptkey); -- newpassencrypt(oldpwd, newpwd, newpwd); -- newpassencrypt(oldpwd + 8, newpwd + 8, newpwd + 8); -+ newpassencrypt(oldpwd, newpwd); -+ newpassencrypt(oldpwd + 8, newpwd + 8); - if ((len = strlen(newpasswd)) > 63) { - len = 63; - } -@@ -3707,17 +3709,17 @@ ncp_change_login_passwd(struct ncp_conn - - long - ncp_login_user(struct ncp_conn *conn, -- const unsigned char *username, -- const unsigned char *password) -+ const char *username, -+ const char *password) - { - return ncp_login_object(conn, username, NCP_BINDERY_USER, password); - } - - static long - ncp_login_object(struct ncp_conn *conn, -- const unsigned char *username, -+ const char *username, - int login_type, -- const unsigned char *password) -+ const char *password) - { - long result; - unsigned char ncp_key[8]; -@@ -3790,10 +3792,10 @@ ncp_sign_stop(UNUSED(NWCONN_HANDLE conn) - } - - long --ncp_sign_start(struct ncp_conn *conn, const char *sign_root) -+ncp_sign_start(struct ncp_conn *conn, const unsigned char *sign_root) - { - #ifdef SIGNATURES -- static const char init_last[16]= -+ static const unsigned char init_last[16]= - {0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef, - 0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10}; - if (ncp_get_sign_wanted(conn)) { -@@ -3829,8 +3831,8 @@ long - long - ncp_send_nds_frag(struct ncp_conn *conn, - int ndsverb, -- const char *inbuf, size_t inbuflen, -- char *outbuf, size_t outbufsize, size_t *outbuflen) -+ const void *iinbuf, size_t inbuflen, -+ void *ioutbuf, size_t outbufsize, size_t *outbuflen) - { - long result; - size_t sizeleft, i; -@@ -3841,6 +3843,8 @@ ncp_send_nds_frag(struct ncp_conn *conn, - int32_t ndsCode = -399; - size_t replyLen = 0; - size_t fragLen; -+ const nuint8* inbuf = iinbuf; -+ nuint8* outbuf = ioutbuf; - - if (inbuflen && !inbuf) { - return ERR_NULL_POINTER; -diff -r 3fc1f5c9c744 -r 06020cf028e1 lib/ncplib_i.h ---- a/lib/ncplib_i.h Sun Jun 05 21:25:42 2005 +0000 -+++ b/lib/ncplib_i.h Sat Jun 11 19:59:00 2005 +0000 -@@ -110,7 +110,7 @@ struct ncp_conn { - int conn_status; - - /* Fields used to setup ncp requests */ -- char *current_point; -+ unsigned char *current_point; - int has_subfunction; - int verbose; - size_t ncp_reply_size; -@@ -120,9 +120,9 @@ struct ncp_conn { - - int lock; - -- char packet[NCP_PACKET_SIZE]; -- char *ncp_reply; -- char *ncp_reply_buffer; -+ unsigned char packet[NCP_PACKET_SIZE]; -+ unsigned char *ncp_reply; -+ unsigned char *ncp_reply_buffer; - size_t ncp_reply_alloc; - - /* Field used to make packet signatures */ -@@ -244,7 +244,7 @@ static inline int ncp_add_seek(struct nc - - void ncp_add_pstring(struct ncp_conn *conn, const char *s); - --static inline char* ncp_reply_data(struct ncp_conn *conn, int offset) { -+static inline unsigned char* ncp_reply_data(struct ncp_conn *conn, int offset) { - return conn->ncp_reply + sizeof(struct ncp_reply_header) + offset; - } - -@@ -284,21 +284,21 @@ static inline unsigned int min(unsigned - return (a < b) ? a : b; - } - --static inline void ConvertToNWfromDWORD(u_int32_t sfd, char nwhandle[6]) { -+static inline void ConvertToNWfromDWORD(u_int32_t sfd, unsigned char nwhandle[6]) { - DSET_LH(nwhandle, 2, sfd); - WSET_LH(nwhandle, 0, sfd+1); - } - --static inline u_int32_t ConvertToDWORDfromNW(const char nwhandle[6]) { -+static inline u_int32_t ConvertToDWORDfromNW(const unsigned char nwhandle[6]) { - return DVAL_LH(nwhandle, 2); - } - - void ncp_init_request(struct ncp_conn *conn); - void ncp_init_request_s(struct ncp_conn *conn, int subfunction); - --long ncp_sign_start(struct ncp_conn *conn, const char *sign_root); -- --void shuffle(const unsigned char *objid, const unsigned char *pwd, int buflen, unsigned char *out); -+long ncp_sign_start(struct ncp_conn *conn, const unsigned char *sign_root); -+ -+void shuffle(const unsigned char *objid, const void *pwd, size_t buflen, unsigned char *out); - - NWCCODE ncp_set_private_key(struct ncp_conn *conn, const void* pk, size_t pk_len); - NWCCODE ncp_get_private_key(struct ncp_conn *conn, void* pk, size_t* pk_len); -diff -r 3fc1f5c9c744 -r 06020cf028e1 lib/ncpsign.c ---- a/lib/ncpsign.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/lib/ncpsign.c Sat Jun 11 19:59:00 2005 +0000 -@@ -44,12 +44,12 @@ - - #define min(a,b) ((a)<(b)?(a):(b)) - --static void nwsign(const char r_data1[16], char r_data2[64], char outdata[16]) { -+static void nwsign(const unsigned char r_data1[16], unsigned char r_data2[64], unsigned char outdata[16]) { - int i; - unsigned int w0,w1,w2,w3; - static int rbit[4]={0, 2, 1, 3}; - #ifdef __i386__ -- unsigned int *data2=(int *)r_data2; -+ unsigned int *data2=(unsigned int *)r_data2; - #else - unsigned int data2[16]; - for (i=0;i<16;i++) -@@ -92,7 +92,7 @@ void sign_init(const unsigned char *logi - static const unsigned char initlast[16] = - { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10}; -- static const unsigned char *initdata = "Authorized NetWare Client"; -+ static const unsigned char initdata[] = "Authorized NetWare Client"; - unsigned char msg[64]; - unsigned char hash[16]; - -diff -r 3fc1f5c9c744 -r 06020cf028e1 lib/ndscrypt.c ---- a/lib/ndscrypt.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/lib/ndscrypt.c Sat Jun 11 19:59:00 2005 +0000 -@@ -111,7 +111,7 @@ static unsigned char nwhashdata[256] = - 0x4C,0xFF,0x43,0xAB}; - - --void nwencrypt(const unsigned short *cryptbuf, const char *in, char *out) { -+void nwencrypt(const unsigned short *cryptbuf, const unsigned char *in, unsigned char *out) { - int i, j; - register unsigned int i1, i2, i3, i4; - const unsigned short *p; -@@ -141,7 +141,7 @@ void nwencrypt(const unsigned short *cry - WSET_LH(out, 6, i4); - } - --void nwdecrypt(const unsigned short *cryptbuf, const char *in, char *out) { -+void nwdecrypt(const unsigned short *cryptbuf, const unsigned char *in, unsigned char *out) { - int i, j; - const unsigned short *p; - register unsigned int i1, i2, i3, i4; -@@ -171,26 +171,25 @@ void nwdecrypt(const unsigned short *cry - WSET_LH(out, 6, i4); - } - --void nwcryptinit(unsigned short *scryptbuf, const char *key) { -+void nwcryptinit(unsigned short *scryptbuf, const unsigned char *key) { - int i; - unsigned char cryptbuf[128], *p; - - memcpy(cryptbuf, key, 8); - for (i = 0; i < 120; i++) - cryptbuf[i + 8] = -- nwcryptdata[(unsigned char)(cryptbuf[i] + cryptbuf[i + 7]) & 255]; -- cryptbuf[128 - 8] = nwcryptdata[(unsigned char)cryptbuf[128 - 8] & 255]; -+ nwcryptdata[(cryptbuf[i] + cryptbuf[i + 7]) & 255]; -+ cryptbuf[128 - 8] = nwcryptdata[cryptbuf[128 - 8]]; - for (i = 127 - 8; i >= 0; i--) -- cryptbuf[i] = nwcryptdata[(unsigned char)cryptbuf[i + 1] ^ -- (unsigned char)cryptbuf[i + 8]]; -+ cryptbuf[i] = nwcryptdata[cryptbuf[i + 1] ^ cryptbuf[i + 8]]; - for (i = 0, p = cryptbuf; i < 64; i++, p += 2) - scryptbuf[i] = (*p) | (*(p+1)) << 8; - } - --void nwencryptblock(const char *cryptkey, const char *buf, int buflen, -- char *outbuf) { -+void nwencryptblock(const unsigned char *cryptkey, const unsigned char *buf, int buflen, -+ unsigned char *outbuf) { - int i; -- char nhash[8]; -+ unsigned char nhash[8]; - unsigned short cryptbuf[64]; - - nwcryptinit(cryptbuf, cryptkey); -@@ -206,10 +205,10 @@ void nwencryptblock(const char *cryptkey - memset(cryptbuf, 0, sizeof(cryptbuf)); - } - --void nwdecryptblock(const char *cryptkey, const char *buf, int buflen, -- char *outbuf) { -+void nwdecryptblock(const unsigned char *cryptkey, const unsigned char *buf, int buflen, -+ unsigned char *outbuf) { - int i; -- char nhash[16], *p; -+ unsigned char nhash[16], *p; - unsigned short cryptbuf[64]; - - nwcryptinit(cryptbuf, cryptkey); -@@ -227,30 +226,30 @@ void nwdecryptblock(const char *cryptkey - memset(cryptbuf, 0, sizeof(cryptbuf)); - } - --void nwhash1(char *hash, int hashlen, const char *data, int datalen) { -+void nwhash1(unsigned char *hash, int hashlen, const unsigned char *data, int datalen) { - unsigned char *hp, *hp1, *hend, c; - const unsigned char *dp; - -- hp1 = (hp = (unsigned char *)hash) + 1; -+ hp1 = (hp = hash) + 1; - hend = hp + hashlen; -- dp = (const unsigned char *)data; -+ dp = data; - while (datalen--) { - *hp = nwhashdata[*hp1 ^ *hp] ^ *dp++; - hp = hp1++; - if (hp1 == hend) -- hp1 = (unsigned char *)hash; -- } -- while (hp-- > (unsigned char *)hash) { -- hp1 = (unsigned char *)hash; -+ hp1 = hash; -+ } -+ while (hp-- > hash) { -+ hp1 = hash; - c = *hp1++; -- while (*(hp1 - 1) = *hp1, ++hp1 < (unsigned char *)hash + hashlen); -+ while (*(hp1 - 1) = *hp1, ++hp1 < hash + hashlen); - *(hp1 - 1) = c; - } - } - --void nwhash2(char *hashbuf, char c) { -- int i, j; -- char *p = hashbuf + hashbuf[0x40]; -+void nwhash2(unsigned char *hashbuf, unsigned char c) { -+ int i, j; -+ unsigned char *p = hashbuf + hashbuf[0x40]; - - p[0x20] = p[0x00] ^ (p[0x10] = c); - hashbuf[0x41] = (p[0x30] ^= nwhashdata[(unsigned char)(c ^ hashbuf[0x41])]); -@@ -262,12 +261,12 @@ void nwhash2(char *hashbuf, char c) { - } - } - --void nwhash2block(char *hashbuf, const char *data, int datalen) { -+void nwhash2block(unsigned char *hashbuf, const unsigned char *data, size_t datalen) { - while (datalen--) - nwhash2(hashbuf, *data++); - } - --void nwhash2end(char *hashbuf) { -+void nwhash2end(unsigned char *hashbuf) { - int i, j; - - for(j = i = 16 - hashbuf[0x40]; j; j--) -diff -r 3fc1f5c9c744 -r 06020cf028e1 lib/ndscrypt.h ---- a/lib/ndscrypt.h Sun Jun 05 21:25:42 2005 +0000 -+++ b/lib/ndscrypt.h Sat Jun 11 19:59:00 2005 +0000 -@@ -22,20 +22,20 @@ - - #include - --void nwencrypt(const unsigned short *cryptbuf, const char *in, char *out); --void nwdecrypt(const unsigned short *cryptbuf, const char *in, char *out); --void nwcryptinit(unsigned short *scryptbuf, const char *key); --void nwencryptblock(const char *cryptkey, const char *buf, int buflen, -- char *outbuf); --void nwdecryptblock(const char *cryptkey, const char *buf, int buflen, -- char *outbuf); -+void nwencrypt(const unsigned short *cryptbuf, const unsigned char *in, unsigned char *out); -+void nwdecrypt(const unsigned short *cryptbuf, const unsigned char *in, unsigned char *out); -+void nwcryptinit(unsigned short *scryptbuf, const unsigned char *key); -+void nwencryptblock(const unsigned char *cryptkey, const unsigned char *buf, int buflen, -+ unsigned char *outbuf); -+void nwdecryptblock(const unsigned char *cryptkey, const unsigned char *buf, int buflen, -+ unsigned char *outbuf); - - #define nwhash1init(hash, hashlen) memset(hash, 0, hashlen) --void nwhash1(char *hash, int hashlen, const char *data, int datalen); -+void nwhash1(unsigned char *hash, int hashlen, const unsigned char *data, int datalen); - - #define nwhash2init(hashbuf) memset(hashbuf, 0, 0x42) --void nwhash2(char *hashbuf, char c); --void nwhash2block(char *hashbuf, const char *data, int datalen); --void nwhash2end(char *hashbuf); -+void nwhash2(unsigned char *hashbuf, unsigned char c); -+void nwhash2block(unsigned char *hashbuf, const unsigned char *data, size_t datalen); -+void nwhash2end(unsigned char *hashbuf); - - #endif /* _NDSCRYPT_H */ -diff -r 3fc1f5c9c744 -r 06020cf028e1 lib/ndslib.c ---- a/lib/ndslib.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/lib/ndslib.c Sat Jun 11 19:59:00 2005 +0000 -@@ -188,10 +188,10 @@ static char *g_rndp = global_randbuf + R - - static ncpt_mutex_t randbuflock = NCPT_MUTEX_INITIALIZER; - --static void fillrandom(char *buf, int buflen) { -+static void fillrandom(nuint8 *buf, size_t buflen) { - ncpt_mutex_lock(&randbuflock); - do { -- int i; -+ size_t i; - - if (g_rndp == global_randbuf + RANDBUFSIZE) { - int fh; -@@ -206,7 +206,10 @@ static void fillrandom(char *buf, int bu - } - g_rndp = global_randbuf; - } -- if ((i = RANDBUFSIZE - (g_rndp - global_randbuf)) > buflen) i = buflen; -+ i = RANDBUFSIZE - (g_rndp - global_randbuf); -+ if (i > buflen) { -+ i = buflen; -+ } - memcpy(buf, g_rndp, i); - buf += i; - g_rndp += i; -@@ -215,7 +218,7 @@ static void fillrandom(char *buf, int bu - ncpt_mutex_unlock(&randbuflock); - } - #else --static void fillrandom(char *buf, int buflen) { -+static void fillrandom(nuint8 *buf, size_t buflen) { - int fh; - char *p; - -@@ -230,11 +233,11 @@ static void fillrandom(char *buf, int bu - } - #endif - --static int countbits_l(char *buf, int bufsize) { -+static int countbits_l(unsigned char *buf, int bufsize) { - unsigned char b; - - while ((--bufsize) && (!buf[bufsize])); -- b = (unsigned char)buf[bufsize]; -+ b = buf[bufsize]; - bufsize <<= 3; - while (b) { - b >>= 2; bufsize++; -@@ -250,33 +253,33 @@ static void copyfill(void *outbuf, int o - - static char keyprefix[] = {1, 0, 0, 0, 3, 0, 1, 0}; - --static int initkey(const char *key, char **keyptr, size_t *keylen) { /* 1=ok, 0=err */ -+static int initkey(const unsigned char *key, unsigned char **keyptr, size_t *keylen) { /* 1=ok, 0=err */ - if (!memcmp(key, keyprefix, 8)) { - if (keylen) *keylen = WVAL_LH(key, 8); -- if (keyptr) *keyptr = (char*)key + 10; -+ if (keyptr) *keyptr = key + 10; - return 1; - } else - return 0; - } - --static void clearkey(char *key) { -- char *keyptr; -+static void clearkey(unsigned char *key) { -+ unsigned char *keyptr; - size_t keylen; -+ - if (initkey(key, &keyptr, &keylen)) - memset(key, 0, keylen + 10); - } - --static int findchunk(const char *keyptr, int keylen, const char *chunk, -- char **chunkptr) { -- const char *p; -+static int findchunk(const unsigned char *keyptr, size_t keylen, const char *chunk, unsigned char **chunkptr) { -+ const unsigned char *p; - - if ((p = keyptr)) { -- while (p - keyptr < keylen) { -- if ((p[0] != chunk[0]) || (p[1] != chunk[1])) -- p += 4 + (unsigned char)p[2] + (unsigned char)p[3]; -- else { -- if (chunkptr) *chunkptr = (char*)p + 4; -- return (unsigned char)p[2] + (unsigned char)p[3]; -+ while (p < keyptr + keylen) { -+ if ((p[0] != chunk[0]) || (p[1] != chunk[1])) { -+ p += 4 + p[2] + p[3]; -+ } else { -+ if (chunkptr) *chunkptr = (unsigned char*)p + 4; -+ return p[2] + p[3]; - } - } - } -@@ -327,9 +330,9 @@ static void dumpkey(const nuint8 *key, s - } - #endif - --static int checkkey(const char *key) { /* 0 - wrong key, != 0 - key ok */ -- char temp[8]; -- char *keyptr, *p; -+static int checkkey(const unsigned char *key) { /* 0 - wrong key, != 0 - key ok */ -+ unsigned char temp[8]; -+ unsigned char *keyptr, *p; - size_t keylen; - - if ((initkey(key, &keyptr, &keylen)) && -@@ -346,13 +349,13 @@ static int checkkey(const char *key) { / - - static ncpt_mutex_t mpilock = NCPT_MUTEX_INITIALIZER; - --static long modexpkey(const char *s_key, char *buf, char *outbuf, int bufsize) { -- char *s_keyptr; -+static long modexpkey(const unsigned char *s_key, unsigned char *buf, unsigned char *outbuf, int bufsize) { -+ unsigned char *s_keyptr; - size_t s_keylen; - int i, nbits, nblocksize; - int err = -1; - unitptr nmod, nexp, nin, nout; -- char *p; -+ unsigned char *p; - - nmod = nexp = nin = nout = NULL; - -@@ -399,7 +402,7 @@ end1: - - /* ctx must be in WCHAR_T mode, without DCV_CANONICALIZE_NAMES */ - static NWDSCCODE get_public_key(NWDSContextHandle ctx, const wchar_t* objname, nuint8 **key) { -- char *keybuf, *kptr; -+ unsigned char *keybuf, *kptr; - NWDSCCODE err; - size_t keylen, ofs, klen; - Octet_String_T* ost; -@@ -434,7 +437,7 @@ static NWDSCCODE __AlignAndEncryptBlockW - const nuint8* hash, - const nuint8* idata, - size_t ilen, -- char* odata, -+ nuint8* odata, - size_t* olen - ) { - size_t filler; -@@ -472,7 +475,7 @@ NWDSCCODE __NWEncryptWithSK( - for (i = 0; i < 10; i++) { - nwhash1(hash, 8, hashsrc, hashsrclen); - } -- err = __AlignAndEncryptBlockWithSK(hash, idata, ilen, (char*)odata + 12, &len); -+ err = __AlignAndEncryptBlockWithSK(hash, idata, ilen, (nuint8*)odata + 12, &len); - if (err) - return err; - *olen = len + 12; -@@ -492,12 +495,12 @@ NWDSCCODE rsa_crypt2( - Buf_T* output) { - char hashrand[8], temp[8]; - unsigned short cryptbuf[128]; -- char buf2[56]; -+ nuint8 buf2[56]; - NWDSCCODE err; - void* data; - size_t datalen; - nuint8* outp; -- char b2[28]; -+ nuint8 b2[28]; - nuint8* ln1; - nuint8* sp1; - size_t outlen; -@@ -904,7 +907,7 @@ NWDSCCODE __NWDSGetPrivateKey( - p += 8; - - { -- char* tb; -+ unsigned char* tb; - if (!(tb = malloc(n3 + 10))) { - err = ENOMEM; - goto err_exit; -@@ -951,9 +954,9 @@ static NWDSCCODE nds_beginauth2( - NWCONN_HANDLE conn, - NWObjectID user_id, - nuint8 authid[4], -- const char* s_key) { -- char *p, *pend, *n_temp, temp[8], *k1end; -- char randno[4]; -+ const nuint8* s_key) { -+ nuint8 *p, *pend, *n_temp, temp[8], *k1end; -+ nuint8 randno[4]; - NWDSCCODE err; - int n1, n3; - u_int16_t n3a; -@@ -1068,9 +1071,9 @@ err_exit: - return err; - } - --static char *allocfillchunk(const char *keyptr, int keylen, -+static unsigned char *allocfillchunk(const unsigned char *keyptr, int keylen, - const char *chunk, int destsize) { -- char *p, *p2; -+ unsigned char *p, *p2; - int i; - - i = findchunk(keyptr, keylen, chunk, &p); -@@ -1100,12 +1103,12 @@ static NWDSCCODE nds_beginauth( - - static NWDSCCODE gen_auth_data( - Buf_T* outbuf, -- const char *u_key, -- const char *u_priv_key, -+ const unsigned char *u_key, -+ const unsigned char *u_priv_key, - const nuint8* authid, -- char *loginstrc, -+ nuint8 *loginstrc, - int loginstrc_len) { -- char *keyptr; -+ nuint8 *keyptr; - size_t keylen; - int i, j; - int nbits, nblocksize, nbytes, nblocksize_nw; -@@ -1114,9 +1117,9 @@ static NWDSCCODE gen_auth_data( - unitptr n_key_dp, n_key_dq; - unitptr up, up2; - unitptr randbuf; -- char *p; -- char *tempbuf; -- char hashbuf[0x42]; -+ nuint8 *p; -+ nuint8 *tempbuf; -+ nuint8 hashbuf[0x42]; - NWDSCCODE err; - - n_temp = n_mod = n_exp = n_pn = n_qn = n_dp = n_dq = n_cr = n_key = NULL; -@@ -1198,8 +1201,8 @@ static NWDSCCODE gen_auth_data( - - up = randbuf; up2 = (unitptr)(p + 12); - for (i = 3; i; i--) { -- fillrandom((char *)up, nbytes); -- ((char *)up)[nbytes - 1] &= nmask; -+ fillrandom((nuint8 *)up, nbytes); -+ ((nuint8 *)up)[nbytes - 1] &= nmask; - if (!(j = mp_compare(up, n_mod))) { - mp_dec(up); - } else if (j > 0) { -@@ -1251,7 +1254,7 @@ NWDSCCODE NWDSAuthenticateConn( - nuint8 authid[4]; - NWDSCCODE err; - size_t user_name_len; -- char *loginstrc; -+ nuint8 *loginstrc; - size_t loginstrc_len; - nuint8 *u_key; - Buf_T signbuf; -@@ -1260,7 +1263,7 @@ NWDSCCODE NWDSAuthenticateConn( - char keybuf_b[DEFAULT_MESSAGE_LEN]; - wchar_t server_name[MAX_DN_CHARS+1]; - NWObjectID user_id; -- char signkey[8]; -+ unsigned char signkey[8]; - wchar_t* w_user_name; - nuint8* u_priv_key; - nuint8* logindata; -@@ -1363,7 +1366,7 @@ long nds_login_auth(struct ncp_conn *con - const char *pwd) { - long err; - wchar_t user_w[MAX_DN_CHARS+1]; -- char *u_priv_key = NULL; -+ nuint8 *u_priv_key = NULL; - wchar_t server_name[MAX_DN_CHARS+1]; - NWCONN_HANDLE userconn = NULL; - int i; -diff -r 3fc1f5c9c744 -r 06020cf028e1 lib/nwcrypt.c ---- a/lib/nwcrypt.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/lib/nwcrypt.c Sat Jun 11 19:59:00 2005 +0000 -@@ -144,51 +144,46 @@ shuffle1(buf32 temp, unsigned char *targ - - - void --shuffle(const unsigned char *lon, const unsigned char *buf, int buflen, -+shuffle(const unsigned char *lon, const void *ibuf, size_t buflen, - unsigned char *target) - { -- int b2, d, s; -+ size_t b2, d; -+ unsigned int s; - buf32 temp; -+ const unsigned char* buf = ibuf; - - while ((buflen > 0) -- && (buf[buflen - 1] == 0)) -- { -+ && (buf[buflen - 1] == 0)) { - buflen = buflen - 1; - } - -- for (s = 0; s < 32; s++) -- { -+ for (s = 0; s < 32; s++) { - temp[s] = 0; - } - - d = 0; -- while (buflen >= 32) -- { -- for (s = 0; s <= 31; ++s) -- { -- temp[s] = temp[s] ^ buf[d]; -+ while (buflen >= 32) { -+ for (s = 0; s < 32; ++s) { -+ temp[s] ^= buf[d]; - d = d + 1; - } - buflen = buflen - 32; - } - b2 = d; -- if (buflen > 0) -- { -- for (s = 0; s <= 31; ++s) -- { -- if (d + buflen == b2) -- { -+ if (buflen > 0) { -+ for (s = 0; s < 32; ++s) { -+ if (d + buflen == b2) { - b2 = d; -- temp[s] = temp[s] ^ encryptkeys[s]; -- } else -- { -- temp[s] = temp[s] ^ buf[b2]; -+ temp[s] ^= encryptkeys[s]; -+ } else { -+ temp[s] ^= buf[b2]; - b2 = b2 + 1; - } - } - } -- for (s = 0; s <= 31; ++s) -- temp[s] = temp[s] ^ lon[s & 3]; -+ for (s = 0; s < 32; ++s) { -+ temp[s] ^= lon[s & 3]; -+ } - - shuffle1(temp, target); - } -@@ -200,16 +195,18 @@ nw_encrypt(const unsigned char *fra, - unsigned char *til) - { - buf32 k; -- int s; -+ unsigned int s; - - shuffle(&(fra[0]), buf, 16, &(k[0])); - shuffle(&(fra[4]), buf, 16, &(k[16])); - -- for (s = 0; s <= 15; ++s) -- k[s] = k[s] ^ k[31 - s]; -- -- for (s = 0; s <= 7; ++s) -+ for (s = 0; s < 16; ++s) { -+ k[s] ^= k[31 - s]; -+ } -+ -+ for (s = 0; s < 8; ++s) { - til[s] = k[s] ^ k[15 - s]; -+ } - } - - /*****************************************************************************/ -@@ -230,8 +227,8 @@ nw_encrypt(const unsigned char *fra, - old internal password) ^ (second byte of old internal password) - */ - --static char -- newshuffle[256 + 16] = -+static unsigned char -+ newshuffle[256] = - { - 0x0f, 0x08, 0x05, 0x07, 0x0c, 0x02, 0x0e, 0x09, - 0x00, 0x01, 0x06, 0x0d, 0x03, 0x04, 0x0b, 0x0a, -@@ -272,7 +269,9 @@ static char - 0x0d, 0x0b, 0x0c, 0x02, 0x00, 0x0f, 0x06, 0x0a, - 0x09, 0x0a, 0x0b, 0x0d, 0x05, 0x03, 0x0f, 0x00, - 0x01, 0x0c, 0x08, 0x07, 0x06, 0x04, 0x0e, 0x02, -- -+}; -+ -+static const unsigned char final_shuffle[16] = { - 0x03, 0x0e, 0x0f, 0x02, 0x0d, 0x0c, 0x04, 0x05, - 0x09, 0x06, 0x00, 0x01, 0x0b, 0x07, 0x0a, 0x08, - }; -@@ -303,17 +302,17 @@ static char - */ - - static void --newpassencrypt(char *old, char *new, char *out) --{ -- char *p, *bx; -- char copy[8]; -- int i, di, ax; -- char cl, dl, ch; -- -- memcpy(copy, new, 8); -- -- for (i = 0; i < 16; i++) -- { -+newpassencrypt(unsigned char *old, unsigned char *npwd) -+{ -+ int i; -+ -+ for (i = 0; i < 16; i++) { -+ int di, ax; -+ unsigned char *p, *bx; -+ unsigned char cl, dl, ch; -+ unsigned char copy[8]; -+ -+ memcpy(copy, npwd, 8); - for (di = 0, ax = 0, p = old; di < 8; di++, ax += 0x20, p++) - { - cl = newshuffle[(((copy[di] ^ *p) >> 4) & 0x0f) + ax + 0x10] << 4; -@@ -328,17 +327,16 @@ newpassencrypt(char *old, char *new, cha - } - *old = ((ch >> 4) & 0x0f) | (*old) << 4; - -- memset(out, '\0', 8); -+ memset(npwd, 0, 8); - - for (di = 0; di < 16; di++) - { -- if (newshuffle[di + 0x100] & 1) -- ch = ((copy[newshuffle[di + 0x100] / 2] >> 4) & 0x0f); -+ if (final_shuffle[di] & 1) -+ ch = ((copy[final_shuffle[di] / 2] >> 4) & 0x0f); - else -- ch = copy[newshuffle[di + 0x100] / 2] & 0x0f; -- out[di / 2] |= ((di & 1) ? ch << 4 : ch); -- } -- memcpy(copy, out, 8); -- } --} -- -+ ch = copy[final_shuffle[di] / 2] & 0x0f; -+ npwd[di / 2] |= ((di & 1) ? ch << 4 : ch); -+ } -+ } -+} -+ -diff -r 3fc1f5c9c744 -r 06020cf028e1 lib/nwnet.c ---- a/lib/nwnet.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/lib/nwnet.c Sat Jun 11 19:59:00 2005 +0000 -@@ -1205,7 +1205,7 @@ NWDSCCODE NWDSCreateContextHandle(NWDSCo - tmp->dck.rdn.depth = 0; - tmp->dck.namectx = NULL; - { -- static const nuint32 t[] = { -+ static const NET_ADDRESS_TYPE t[] = { - #ifdef NCP_IPX_SUPPORT - NT_IPX, - #endif -@@ -1582,7 +1582,7 @@ void NWDSSetupBuf(Buf_T* buf, void* ptr, - buf->cmdFlags = 0; - buf->dsiFlags = 0; - buf->data = buf->curPos = ptr; -- buf->dataend = buf->allocend = (char*)ptr + len; -+ buf->dataend = buf->allocend = (unsigned char*)ptr + len; - buf->operation = 0; - buf->attrCountPtr = NULL; - buf->valCountPtr = NULL; -@@ -1947,7 +1947,7 @@ static NWDSCCODE NWDSXlateCtxToUni(NWDSC - return err; - if (val & DCV_XLATE_STRINGS) { - NWDSCCODE err2; -- const nuint8* srcEnd; -+ const char* srcEnd; - - ncpt_mutex_lock(&ctx->xlate.fromlock); - __NWULocalInit(ctx->xlate.from); -@@ -1957,7 +1957,7 @@ static NWDSCCODE NWDSXlateCtxToUni(NWDSC - else - ln = strlen(src) + 1; - } -- srcEnd = (const nuint8*)src + ln; -+ srcEnd = (const char*)src + ln; - do { - wchar_t tbuff[128]; - wchar_t* tEnd; -@@ -3760,7 +3760,7 @@ NWDSCCODE NWDSGetObjectNameAndInfo( - return ERR_BAD_VERB; - } - if (info) -- *info = buffer->curPos; -+ *info = (char*)buffer->curPos; - dsiflags = buffer->dsiFlags; - if (dsiflags & DSI_OUTPUT_FIELDS) { - err = NWDSBufGetLE32(buffer, &dsiflags); -diff -r 3fc1f5c9c744 -r 06020cf028e1 lib/o_ndslib.c ---- a/lib/o_ndslib.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/lib/o_ndslib.c Sat Jun 11 19:59:00 2005 +0000 -@@ -150,13 +150,14 @@ long nds_resolve_name(struct ncp_conn *c - case DS_RESOLVE_REPLY_REMOTE_ENTRY: - { - NWObjectID ID; -+ nuint32 dummy; - - err = NWDSBufGetID(rp, &ID); - if (err) - goto q_buf; - if (entry_id) - *entry_id = ID; -- err = NWDSBufGetLE32(rp, &flags); -+ err = NWDSBufGetLE32(rp, &dummy); - if (err) - goto q_buf; - if (remote) -diff -r 3fc1f5c9c744 -r 06020cf028e1 sutil/ncpm_common.h ---- a/sutil/ncpm_common.h Sun Jun 05 21:25:42 2005 +0000 -+++ b/sutil/ncpm_common.h Sat Jun 11 19:59:00 2005 +0000 -@@ -34,9 +34,9 @@ struct ncp_mount_data_independent { - int message_fd; - uid_t mounted_uid; - struct sockaddr_ipx serv_addr; -- unsigned char *server_name; -- unsigned char *mount_point; -- const unsigned char *mounted_vol; -+ char *server_name; -+ char *mount_point; -+ const char *mounted_vol; - unsigned int time_out; - unsigned int retry_count; - struct { -diff -r 3fc1f5c9c744 -r 06020cf028e1 sutil/ncpmount.h ---- a/sutil/ncpmount.h Sun Jun 05 21:25:42 2005 +0000 -+++ b/sutil/ncpmount.h Sat Jun 11 19:59:00 2005 +0000 -@@ -30,10 +30,10 @@ struct ncp_mount_data_v2 { - __ker20_uid_t mounted_uid; /* Who may umount() this filesystem? */ - - struct sockaddr_ipx serv_addr; -- unsigned char server_name[NCP_BINDERY_NAME_LEN]; -+ char server_name[NCP_BINDERY_NAME_LEN]; - -- unsigned char mount_point[PATH_MAX_V20+1]; -- unsigned char mounted_vol[NCP_VOLNAME_LEN+1]; -+ char mount_point[PATH_MAX_V20+1]; -+ char mounted_vol[NCP_VOLNAME_LEN+1]; - - unsigned int time_out; /* How long should I wait after - sending a NCP request? */ -@@ -64,7 +64,7 @@ struct ncp_mount_data_v3 { - __ker21_uid_t mounted_uid; /* Who may umount() this filesystem? */ - __ker21_pid_t wdog_pid; /* Who cares for our watchdog packets? */ - -- unsigned char mounted_vol[NCP_VOLNAME_LEN + 1]; -+ char mounted_vol[NCP_VOLNAME_LEN + 1]; - unsigned int time_out; /* How long should I wait after - sending a NCP request? */ - unsigned int retry_count; /* And how often should I retry? */ -diff -r 3fc1f5c9c744 -r 06020cf028e1 util/ncopy.c ---- a/util/ncopy.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/util/ncopy.c Sat Jun 11 19:59:00 2005 +0000 -@@ -532,10 +532,13 @@ dstDetermined:; - ncopy = 1; - } - } else { -- err = NWCCGetConnInfo(scon, NWCC_INFO_SERVER_NAME, sizeof(saddr), saddr); -- if (!err) err = NWCCGetConnInfo(dcon, NWCC_INFO_SERVER_NAME, sizeof(daddr), daddr); -+ char saddrs[100]; -+ char daddrs[100]; -+ -+ err = NWCCGetConnInfo(scon, NWCC_INFO_SERVER_NAME, sizeof(saddrs), saddrs); -+ if (!err) err = NWCCGetConnInfo(dcon, NWCC_INFO_SERVER_NAME, sizeof(daddrs), daddrs); - if (!err) { -- ncopy = !strcmp(saddr, daddr); -+ ncopy = !strcmp(saddrs, daddrs); - } - } - if (ncopy) { -diff -r 3fc1f5c9c744 -r 06020cf028e1 util/nwbpvalues.c ---- a/util/nwbpvalues.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/util/nwbpvalues.c Sat Jun 11 19:59:00 2005 +0000 -@@ -44,7 +44,7 @@ static char *progname; - static char *progname; - - static void -- print_property(char *prop_name, u_int8_t * val, int segments); -+print_property(char *prop_name, const u_int8_t * val, int segments); - - static void - usage(void) -@@ -265,7 +265,7 @@ main(int argc, char *argv[]) - } - - static void --print_unknown(u_int8_t * val) -+print_unknown(const u_int8_t * val) - { - int j = (128 / 16); - while (1) -@@ -292,9 +292,9 @@ print_unknown(u_int8_t * val) - } - - static void --print_string(u_int8_t * val, int segments) --{ -- puts(val); -+print_string(const u_int8_t * val, int segments) -+{ -+ puts((const char*)val); - (void)segments; - } - -@@ -351,12 +351,12 @@ static inline size_t my_strftime(char *s - - - static void --print_login_control(u_int8_t * val, int segments) -+print_login_control(const u_int8_t * val, int segments) - { - static const time_t zero_time_t = 0; - int i, j, mask; - char buff[32]; -- struct ncp_prop_login_control *a = (struct ncp_prop_login_control *) val; -+ const struct ncp_prop_login_control *a = (const struct ncp_prop_login_control *) val; - - if (a->LastLogin[2] || a->LastLogin[1] || a->LastLogin[0] || - a->LastLogin[3] || a->LastLogin[4] || a->LastLogin[5]) -@@ -495,17 +495,17 @@ print_login_control(u_int8_t * val, int - } - - static void --print_addr(u_int8_t * val, int segments) -+print_addr(const u_int8_t * val, int segments) - { - char buff[50]; - print_station_addr("(%L): %N[%S]", -- (struct ncp_station_addr *) val, buff); -+ (const struct ncp_station_addr *) val, buff); - printf("%s\n", buff); - (void)segments; - } - - static void --print_hex(u_int8_t *val, int segments) { -+print_hex(const u_int8_t *val, int segments) { - int i; - - for (i = 0; i < segments; i++) { -@@ -517,7 +517,7 @@ print_hex(u_int8_t *val, int segments) { - - static const struct - { -- void (*func) (u_int8_t *, int); -+ void (*func)(const u_int8_t *, int); - const char *pname; - } - formats[] = -@@ -534,7 +534,7 @@ formats[] = - }; - - static void --print_property(char *prop_name, u_int8_t * val, int segments) -+print_property(char *prop_name, const u_int8_t * val, int segments) - { - int i; - -diff -r 3fc1f5c9c744 -r 06020cf028e1 util/nwpasswd.c ---- a/util/nwpasswd.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/util/nwpasswd.c Sat Jun 11 19:59:00 2005 +0000 -@@ -65,7 +65,7 @@ main(int argc, char *argv[]) - int object_type = NCP_BINDERY_USER; - unsigned char ncp_key[8]; - struct ncp_bindery_object user; -- unsigned char buf_obj_name[50]; -+ char *buf_obj_name; - long err; - - char *str; -@@ -113,12 +113,14 @@ main(int argc, char *argv[]) - com_err(argv[0], err, _("trying to find server")); - exit(1); - } -- if (!object_name) -- { -+ if (!object_name) { - object_name = spec.user; -- } else -- { -- strcpy(buf_obj_name, object_name); -+ } else { -+ buf_obj_name = strdup(object_name); -+ if (!buf_obj_name) { -+ fprintf(stderr, _("%s: Out of memory!\n"), progname); -+ exit(1); -+ } - object_name = buf_obj_name; - str_upper(object_name); - } -diff -r 3fc1f5c9c744 -r 06020cf028e1 util/nwpjmv.c ---- a/util/nwpjmv.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/util/nwpjmv.c Sat Jun 11 19:59:00 2005 +0000 -@@ -124,6 +124,16 @@ init_queue(struct ncp_conn *conn, char * - } - - -+static char* -+add_string(char *target, char *target_end, const char *str) { -+ size_t len = strlen(str); -+ if (target + len + 1 > target_end) { -+ len = target_end - target - 1; -+ } -+ memcpy(target, str, len); -+ return target + len; -+} -+ - static void - build_command(struct nw_queue *q, struct queue_job *j, - char *target, int target_size, char *user) -@@ -131,26 +141,12 @@ build_command(struct nw_queue *q, struct - char *s = q->command; - char *target_end = target + target_size; - -- static void add_string(const char *str) -- { -- int len = strlen(str); -- if (target + len + 1 > target_end) -- { -- len = target_end - target - 1; -- } -- strncpy(target, str, len); -- target += len; -- } -- - memset(target, 0, target_size); - - while ((*s != 0) && (target < target_end)) - { -- if (*s != '%') -- { -- *target = *s; -- target += 1; -- s += 1; -+ if (*s != '%') { -+ *target++ = *s++; - continue; - } - switch (*(s + 1)) -@@ -160,13 +156,13 @@ build_command(struct nw_queue *q, struct - target += 1; - break; - case 'u': -- add_string(user); -+ target = add_string(target, target_end, user); - break; - case 'd': - if (j->j.JobTextDescription[0]) -- add_string(j->j.JobTextDescription); -+ target = add_string(target, target_end, j->j.JobTextDescription); - else -- add_string(_("No Description")); -+ target = add_string(target, target_end, _("No Description")); - break; - default: - *target = '%'; -diff -r 3fc1f5c9c744 -r 06020cf028e1 util/nwsalvage.c ---- a/util/nwsalvage.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/util/nwsalvage.c Sat Jun 11 19:59:00 2005 +0000 -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include - - #include "private/libintl.h" - #define _(X) gettext(X) -diff -r 3fc1f5c9c744 -r 06020cf028e1 util/pserver.c ---- a/util/pserver.c Sun Jun 05 21:25:42 2005 +0000 -+++ b/util/pserver.c Sat Jun 11 19:59:00 2005 +0000 -@@ -146,49 +146,44 @@ init_queue(struct ncp_conn *conn, char * - } - - -+static char* -+add_string(char* target, char* target_end, const char *str) { -+ size_t len = strlen(str); -+ -+ if (target + len + 1 > target_end) { -+ len = target_end - target - 1; -+ } -+ memcpy(target, str, len); -+ return target + len; -+} -+ - static void - build_command(struct nw_queue *q, struct queue_job *j, -- char *target, int target_size, char *user) -+ char *target, size_t target_size, char *user) - { - char *s = q->command; - char *target_end = target + target_size; - -- static void add_string(const char *str) -- { -- int len = strlen(str); -- if (target + len + 1 > target_end) -- { -- len = target_end - target - 1; -- } -- strncpy(target, str, len); -- target += len; -- } -- - memset(target, 0, target_size); - - while ((*s != 0) && (target < target_end)) - { -- if (*s != '%') -- { -- *target = *s; -- target += 1; -- s += 1; -+ if (*s != '%') { -+ *target++ = *s++; - continue; - } -- switch (*(s + 1)) -- { -+ switch (*(s + 1)) { - case '%': -- *target = '%'; -- target += 1; -+ *target++ = '%'; - break; - case 'u': -- add_string(user); -+ target = add_string(target, target_end, user); - break; - case 'd': - if (j->j.JobTextDescription[0]) -- add_string(j->j.JobTextDescription); -+ target = add_string(target, target_end, j->j.JobTextDescription); - else -- add_string(_("No Description")); -+ target = add_string(target, target_end, _("No Description")); - break; - default: - *target = '%'; - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-432.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-432.patch deleted file mode 100644 index b5941c1..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-432.patch +++ /dev/null @@ -1,83 +0,0 @@ -changeset: 432:93a411983bcc -user: Petr Vandrovec -date: Sun Jul 03 20:34:45 2005 +0100 -files: contrib/php/libtool -description: -Regenerate php's libtool with gcc instead of gcc-4.0 - - -diff -r 06020cf028e1 -r 93a411983bcc contrib/php/libtool ---- a/contrib/php/libtool Sat Jun 11 19:59:00 2005 +0000 -+++ b/contrib/php/libtool Sun Jul 03 20:34:45 2005 +0100 -@@ -76,10 +76,10 @@ AR_FLAGS="cru" - AR_FLAGS="cru" - - # A C compiler. --LTCC="gcc-4.0" -+LTCC="gcc" - - # A language-specific compiler. --CC="gcc-4.0" -+CC="gcc" - - # Is the compiler the GNU C compiler? - with_gcc=yes -@@ -316,11 +316,10 @@ link_all_deplibs=unknown - link_all_deplibs=unknown - - # Compile-time system search path for libraries --sys_lib_search_path_spec=" /usr/lib/gcc/i486-linux/4.0.1/ /usr/lib/gcc/i486-linux/4.0.1/ /usr/lib/gcc/i486-linux/4.0.1/../../../../i486-linux/lib/i486-linux/4.0.1/ /usr/lib/gcc/i486-linux/4.0.1/../../../../i486-linux/lib/ /usr/lib/gcc/i486-linux/4.0.1/../../../i486-linux/4.0.1/ /usr/lib/gcc/i486-linux/4.0.1/../../../ /lib/i486-linux/4.0.1/ /lib/ /usr/lib/i486-linux/4.0.1/ /usr/lib/" -+sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/ /usr/lib/gcc/i486-linux-gnu/3.3.6/ /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/../../../../i486-linux-gnu/lib/i486-linux-gnu/3.3.6/ /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/../../../../i486-linux-gnu/lib/ /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/../../../i486-linux-gnu/3.3.6/ /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/../../../ /lib/i486-linux-gnu/3.3.6/ /lib/ /usr/lib/i486-linux-gnu/3.3.6/ /usr/lib/" - - # Run-time system search path for libraries - sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib -- - /usr/lib/libc5-compat - /lib/libc5-compat - /usr/i486-linuxlibc1/lib -@@ -6740,7 +6739,7 @@ AR_FLAGS="cru" - AR_FLAGS="cru" - - # A C compiler. --LTCC="gcc-4.0" -+LTCC="gcc" - - # A language-specific compiler. - CC="g++" -@@ -6881,11 +6880,11 @@ striplib="strip --strip-unneeded" - - # Dependencies to place before the objects being linked to create a - # shared library. --predep_objects="/usr/lib/gcc-lib/i486-linux/3.3.6/../../../crti.o /usr/lib/gcc-lib/i486-linux/3.3.6/crtbeginS.o" -+predep_objects="/usr/lib/gcc-lib/i486-linux-gnu/3.3.6/../../../crti.o /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/crtbeginS.o" - - # Dependencies to place after the objects being linked to create a - # shared library. --postdep_objects="/usr/lib/gcc-lib/i486-linux/3.3.6/crtendS.o /usr/lib/gcc-lib/i486-linux/3.3.6/../../../crtn.o" -+postdep_objects="/usr/lib/gcc-lib/i486-linux-gnu/3.3.6/crtendS.o /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/../../../crtn.o" - - # Dependencies to place before the objects being linked to create a - # shared library. -@@ -6897,7 +6896,7 @@ postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc - - # The library search path used internally by the compiler when linking - # a shared library. --compiler_lib_search_path="-L/usr/lib/gcc-lib/i486-linux/3.3.6 -L/usr/lib/gcc-lib/i486-linux/3.3.6/../../.." -+compiler_lib_search_path="-L/usr/lib/gcc-lib/i486-linux-gnu/3.3.6 -L/usr/lib/gcc-lib/i486-linux-gnu/3.3.6/../../.." - - # Method to check whether dependent libraries are shared objects. - deplibs_check_method="pass_all" -@@ -6977,11 +6976,10 @@ link_all_deplibs=unknown - link_all_deplibs=unknown - - # Compile-time system search path for libraries --sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux/3.3.6/ /usr/lib/gcc/i486-linux/3.3.6/ /usr/lib/gcc-lib/i486-linux/3.3.6/../../../../i486-linux/lib/i486-linux/3.3.6/ /usr/lib/gcc-lib/i486-linux/3.3.6/../../../../i486-linux/lib/ /usr/lib/gcc-lib/i486-linux/3.3.6/../../../i486-linux/3.3.6/ /usr/lib/gcc-lib/i486-linux/3.3.6/../../../ /lib/i486-linux/3.3.6/ /lib/ /usr/lib/i486-linux/3.3.6/ /usr/lib/" -+sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/ /usr/lib/gcc/i486-linux-gnu/3.3.6/ /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/../../../../i486-linux-gnu/lib/i486-linux-gnu/3.3.6/ /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/../../../../i486-linux-gnu/lib/ /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/../../../i486-linux-gnu/3.3.6/ /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/../../../ /lib/i486-linux-gnu/3.3.6/ /lib/ /usr/lib/i486-linux-gnu/3.3.6/ /usr/lib/" - - # Run-time system search path for libraries - sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib -- - /usr/lib/libc5-compat - /lib/libc5-compat - /usr/i486-linuxlibc1/lib - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-433.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-433.patch deleted file mode 100644 index cbdd93e..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-433.patch +++ /dev/null @@ -1,192 +0,0 @@ -changeset: 433:6a7c398b04a7 -user: Petr Vandrovec -date: Sun Jul 03 20:36:50 2005 +0100 -files: .hgignore -description: -Switch from BitKeeper to Mercurial. Get rid of BitKeeper config -files, and introduce Mercurial's .hgignore. - - -diff -r 93a411983bcc -r 6a7c398b04a7 .hgignore ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/.hgignore Sun Jul 03 20:36:50 2005 +0100 -@@ -0,0 +1,179 @@ -+\.a$ -+\.d$ -+\.do$ -+\.la$ -+\.lo$ -+\.o$ -+\.so$ -+^Make\.rules$ -+^Makefile$ -+^autom4te.cache/ -+^config\.log$ -+^config\.status$ -+^contrib/pam/Makefile$ -+^contrib/php/Makefile$ -+^contrib/php/Makefile\.in$ -+^contrib/php/\.deps$ -+^contrib/php/\.libs/ -+^contrib/php/config\.h$ -+^contrib/php/config\.log$ -+^contrib/php/config\.nice$ -+^contrib/php/config\.status$ -+^contrib/php/config_vars\.mk$ -+^contrib/php/libs\.mk$ -+^contrib/php/php_auth_nds\.slo$ -+^contrib/tcl-utils/Makefile$ -+^contrib/testing/Makefile$ -+^contrib/testing/abbrev$ -+^contrib/testing/canon$ -+^contrib/testing/chgpwd$ -+^contrib/testing/cmpattr$ -+^contrib/testing/copyauth$ -+^contrib/testing/dirlimit$ -+^contrib/testing/dirlist2$ -+^contrib/testing/dssearch$ -+^contrib/testing/dsstream$ -+^contrib/testing/eaops$ -+^contrib/testing/effright$ -+^contrib/testing/fileinfo$ -+^contrib/testing/large$ -+^contrib/testing/lic$ -+^contrib/testing/mkattr$ -+^contrib/testing/mkclass$ -+^contrib/testing/mkfile$ -+^contrib/testing/mkobj$ -+^contrib/testing/modclass$ -+^contrib/testing/modobj$ -+^contrib/testing/mvobj$ -+^contrib/testing/nfssetinfo$ -+^contrib/testing/nsfileinfo$ -+^contrib/testing/nwbcast$ -+^contrib/testing/nwdsgethost$ -+^contrib/testing/nwdsgetstat$ -+^contrib/testing/nwdsgetvi$ -+^contrib/testing/nwdslist$ -+^contrib/testing/nwdspartjoin$ -+^contrib/testing/nwdspartlist$ -+^contrib/testing/nwdspartrm$ -+^contrib/testing/nwdspartsplit$ -+^contrib/testing/nwdsresetstat$ -+^contrib/testing/nwgettime$ -+^contrib/testing/partroot$ -+^contrib/testing/physlock$ -+^contrib/testing/pp/Makefile$ -+^contrib/testing/pp/bcastmd$ -+^contrib/testing/pp/getconn_addr$ -+^contrib/testing/pp/getsynt$ -+^contrib/testing/pp/nwc_next_object$ -+^contrib/testing/pp/nwgetconnlist$ -+^contrib/testing/pp/nwwhoami$ -+^contrib/testing/pp/open_conn_by_name$ -+^contrib/testing/pp/readsdef$ -+^contrib/testing/pp/readsynt$ -+^contrib/testing/pp/return_block_of_tree$ -+^contrib/testing/pp/scantree$ -+^contrib/testing/pp/scanvolr$ -+^contrib/testing/pp/semaphor$ -+^contrib/testing/pp/treelist$ -+^contrib/testing/pp/vlist$ -+^contrib/testing/pp/volres$ -+^contrib/testing/readaddr$ -+^contrib/testing/readadef$ -+^contrib/testing/readattr$ -+^contrib/testing/readcc$ -+^contrib/testing/readcls$ -+^contrib/testing/readsynt$ -+^contrib/testing/reloadds$ -+^contrib/testing/renobj$ -+^contrib/testing/replops$ -+^contrib/testing/resint$ -+^contrib/testing/resolve$ -+^contrib/testing/rmattr$ -+^contrib/testing/rmclass$ -+^contrib/testing/rmobj$ -+^contrib/testing/schsync$ -+^contrib/testing/semaphore$ -+^contrib/testing/setkeys$ -+^contrib/testing/time$ -+^contrib/testing/timegv$ -+^contrib/testing/timeinfo$ -+^contrib/testing/verpwd$ -+^contrib/testing/verunix$ -+^contrib/testing/vollist$ -+^contrib/testing/wcsmbs-tst1$ -+^contrib/tests/Makefile$ -+^contrib/tknwmsg/Makefile$ -+^include/config\.h$ -+^include/ncp/ext/socket\.h$ -+^include/ncp/ext/stdint\.h$ -+^include/ncp/kernel/fs\.h$ -+^include/ncp/kernel/if\.h$ -+^include/ncp/kernel/ipx\.h$ -+^include/ncp/kernel/route\.h$ -+^include/ncp/kernel/types\.h$ -+^include/ncp/nwnet\.h$ -+^intl/Makefile$ -+^ipx-1\.0/.*\.gz$ -+^ipx-1\.0/Makefile$ -+^ipx-1\.0/Samples/Makefile$ -+^ipx-1\.0/Samples/ipxrcv$ -+^ipx-1\.0/Samples/ipxsend$ -+^ipx-1\.0/Samples/rip$ -+^ipx-1\.0/Samples/sap$ -+^ipx-1\.0/ipx_cmd$ -+^ipx-1\.0/ipx_configure$ -+^ipx-1\.0/ipx_interface$ -+^ipx-1\.0/ipx_internal_net$ -+^ipx-1\.0/ipx_route$ -+^ipxdump/Makefile$ -+^lib/Makefile$ -+^lib/libncp\.so\..*$ -+^man/.*\.gz$ -+^man/Makefile$ -+^po/Makefile$ -+^po/Makefile\.in$ -+^po/POTFILES$ -+^sutil/Makefile$ -+^sutil/ncplogin$ -+^sutil/ncpmap$ -+^sutil/ncpmount$ -+^sutil/ncpumount$ -+^sutil/nwsfind$ -+^util/Makefile$ -+^util/ncopy$ -+^util/ncptest$ -+^util/nprint$ -+^util/nsend$ -+^util/nwauth$ -+^util/nwbocreate$ -+^util/nwbols$ -+^util/nwboprops$ -+^util/nwborm$ -+^util/nwbpadd$ -+^util/nwbpcreate$ -+^util/nwbprm$ -+^util/nwbpset$ -+^util/nwbpvalues$ -+^util/nwdir$ -+^util/nwdpvalues$ -+^util/nwfsctrl$ -+^util/nwfsinfo$ -+^util/nwfstime$ -+^util/nwgrant$ -+^util/nwlistsalvage$ -+^util/nwmsg$ -+^util/nwpasswd$ -+^util/nwpjmv$ -+^util/nwpqjob$ -+^util/nwpurge$ -+^util/nwrevoke$ -+^util/nwrights$ -+^util/nwsalvage$ -+^util/nwtrustee$ -+^util/nwtrustee2$ -+^util/nwuserlist$ -+^util/nwvolinfo$ -+^util/pqlist$ -+^util/pqstat$ -+^util/pserver$ -+^util/slist$ diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-434.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-434.patch deleted file mode 100644 index 1e1f598..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-434.patch +++ /dev/null @@ -1,25 +0,0 @@ -changeset: 434:5eb60dbc36bd -user: Petr Vandrovec -date: Sun Jul 03 21:43:04 2005 +0100 -files: include/ncp/ncplib.h -description: -Fix compilation with gcc 3.1 and older - no always_inline attribute -available. - - -diff -r 6a7c398b04a7 -r 5eb60dbc36bd include/ncp/ncplib.h ---- a/include/ncp/ncplib.h Sun Jul 03 20:36:50 2005 +0100 -+++ b/include/ncp/ncplib.h Sun Jul 03 21:43:04 2005 +0100 -@@ -181,7 +181,10 @@ DSET_HL(void * buf, int pos, dword val) - DSET_LH(buf, pos, htonl(val)); - } - --static inline __attribute__((always_inline)) void -+static inline void -+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) -+__attribute__((always_inline)) -+#endif - QSET_HL(void * buf, int pos, u_int64_t val) { - DSET_HL(buf, pos, val >> 32); - DSET_HL(buf, pos + 4, val); - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-435.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-435.patch deleted file mode 100644 index 16553fe..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-435.patch +++ /dev/null @@ -1,42 +0,0 @@ -changeset: 435:12722b2b7268 -user: Petr Vandrovec -date: Sun Jul 03 21:44:37 2005 +0100 -files: util/nwauth.c -description: -Rename daemon to daemon_auth in util/nwauth.c - -Fix a warning in nwauth.c build that global daemon() function -is shadowed by daemon variable in nwauth.c. - - -diff -r 5eb60dbc36bd -r 12722b2b7268 util/nwauth.c ---- a/util/nwauth.c Sun Jul 03 21:43:04 2005 +0100 -+++ b/util/nwauth.c Sun Jul 03 21:44:37 2005 +0100 -@@ -82,7 +82,7 @@ main(int argc, char *argv[]) - char *str; - - int opt; -- int daemon = 0; -+ int daemon_auth = 0; - - setlocale(LC_ALL, ""); - bindtextdomain(NCPFS_PACKAGE, LOCALEDIR); -@@ -114,7 +114,7 @@ main(int argc, char *argv[]) - #endif - break; - case 'D': -- daemon = 1; -+ daemon_auth = 1; - break; - case 'h': - case '?': -@@ -127,7 +127,7 @@ main(int argc, char *argv[]) - } - - err = ncp_find_conn_spec3(server, object_name, "", -- 1, daemon ? ~0U : getuid(), 0, &spec); -+ 1, daemon_auth ? ~0U : getuid(), 0, &spec); - - if (err) - { - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-436.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-436.patch deleted file mode 100644 index a139f8b..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-436.patch +++ /dev/null @@ -1,2931 +0,0 @@ -changeset: 436:9aa9e7b516dd -user: Petr Vandrovec -date: Sun Jul 03 21:49:28 2005 +0100 -files: po/POTFILES.in po/ncpfs.pot -description: -Update POTFILES list and regenerate translation template - -It seems that 'make update-po' is broken for some time. Fix -problem with POTFILES referencing pqrm.c, which does not -exist anymore. And some files with i18n messages were not -listed in POTFILES. So fix both, and regenerate translation -template... - - -diff -r 12722b2b7268 -r 9aa9e7b516dd po/POTFILES.in ---- a/po/POTFILES.in Sun Jul 03 21:44:37 2005 +0100 -+++ b/po/POTFILES.in Sun Jul 03 21:49:28 2005 +0100 -@@ -43,17 +43,20 @@ util/nwfsinfo.c - util/nwfsinfo.c - util/nwfstime.c - util/nwgrant.c -+util/nwlistsalvage.c - util/nwmsg.c - util/nwpasswd.c -+util/nwpjmv.c -+util/nwpqjob.c - util/nwpurge.c - util/nwrevoke.c - util/nwrights.c -+util/nwsalvage.c - util/nwtrustee.c - util/nwtrustee2.c - util/nwuserlist.c - util/nwvolinfo.c - util/pqlist.c --util/pqrm.c - util/pqstat.c - util/pserver.c - util/slist.c -diff -r 12722b2b7268 -r 9aa9e7b516dd po/ncpfs.pot ---- a/po/ncpfs.pot Sun Jul 03 21:44:37 2005 +0100 -+++ b/po/ncpfs.pot Sun Jul 03 21:49:28 2005 +0100 -@@ -7,7 +7,8 @@ msgid "" - msgid "" - msgstr "" - "Project-Id-Version: PACKAGE VERSION\n" --"POT-Creation-Date: 2003-04-23 22:12+0200\n" -+"Report-Msgid-Bugs-To: vandrove@vc.cvut.cz\n" -+"POT-Creation-Date: 2005-07-03 22:05+0200\n" - "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" - "Last-Translator: FULL NAME \n" - "Language-Team: LANGUAGE \n" -@@ -35,6 +36,7 @@ msgstr "" - - #: ipx-1.0/ipx_configure.c:88 ipx-1.0/ipx_interface.c:159 util/ipx_probe.c:207 - #: util/ipx_probe.c:373 -+#, c-format - msgid "Probably you have no IPX support in your kernel\n" - msgstr "" - -@@ -219,84 +221,85 @@ msgid "%s: Network %08lX is directly con - msgid "%s: Network %08lX is directly connected.\n" - msgstr "" - --#: lib/ncplib.c:1034 lib/ncplib.c:1065 lib/ncplib.c:1102 -+#: lib/ncplib.c:1079 lib/ncplib.c:1110 lib/ncplib.c:1147 - #, c-format - msgid "ncp_request_error: %d\n" - msgstr "" - --#: lib/ncplib.c:1641 lib/ncplib.c:3671 sutil/ncpmount.c:560 --#: sutil/ncpmount.c:580 sutil/ncplogin.c:878 sutil/ncplogin.c:896 -+#: lib/ncplib.c:1697 lib/ncplib.c:3746 sutil/ncpmount.c:655 -+#: sutil/ncpmount.c:680 sutil/ncplogin.c:876 sutil/ncplogin.c:895 -+#, c-format - msgid "Your password has expired\n" - msgstr "" - --#: lib/ncplib.c:2333 -+#: lib/ncplib.c:2405 - #, c-format - msgid "Logging into %s as %s\n" - msgstr "" - --#: lib/ncplib.c:2336 -+#: lib/ncplib.c:2408 - msgid "Password: " - msgstr "" - --#: lib/ncplib.c:2583 -+#: lib/ncplib.c:2658 - #, c-format - msgid "ncpfs: string too long: %s\n" - msgstr "" - --#: lib/ncplib.c:3677 sutil/ncpmount.c:586 sutil/ncplogin.c:901 -+#: lib/ncplib.c:3752 sutil/ncpmount.c:686 sutil/ncplogin.c:900 - #, c-format - msgid "You have %d login attempts left\n" - msgstr "" - --#: lib/ncplib.c:3798 -+#: lib/ncplib.c:3875 - msgid "Error in ncp_request\n" - msgstr "" - --#: lib/ncplib.c:3804 -+#: lib/ncplib.c:3881 - msgid "Fragment too short\n" - msgstr "" - --#: lib/ncplib.c:3822 -+#: lib/ncplib.c:3899 - #, c-format - msgid "Fragment too large, len=%d, max=%d\n" - msgstr "" - --#: lib/ncplib.c:3835 -+#: lib/ncplib.c:3912 - msgid "Why next fragment?\n" - msgstr "" - --#: lib/ncplib.c:3841 -+#: lib/ncplib.c:3918 - msgid "Fragmented\n" - msgstr "" - --#: lib/ncplib.c:3845 -+#: lib/ncplib.c:3922 - #, c-format - msgid "InBufLen after request=%d, FirstReply=%d\n" - msgstr "" - --#: lib/ncplib.c:3850 -+#: lib/ncplib.c:3927 - #, c-format - msgid "NDS error %d\n" - msgstr "" - --#: lib/filemgmt.c:127 -+#: lib/filemgmt.c:131 - #, c-format - msgid "ncpfs: volume name too long: %d\n" - msgstr "" - --#: lib/ndslib.c:1344 -+#: lib/ndslib.c:1402 - #, c-format - msgid "" - "User %s not found in current context.\n" - "Trying server context...\n" - msgstr "" - --#: lib/ndslib.c:1366 -+#: lib/ndslib.c:1424 - #, c-format - msgid "error %d logging in\n" - msgstr "" - --#: lib/ndslib.c:1374 -+#: lib/ndslib.c:1432 - #, c-format - msgid "error %d authenticating\n" - msgstr "" -@@ -670,80 +673,89 @@ msgid "Unknown error %d (0x%X)" - msgid "Unknown error %d (0x%X)" - msgstr "" - --#: sutil/ncpmount.c:137 -+#: sutil/ncpmount.c:139 - #, c-format - msgid "Specified tree name `%s' is too long\n" - msgstr "" - --#: sutil/ncpmount.c:283 sutil/ncplogin.c:457 -+#: sutil/ncpmount.c:295 sutil/ncplogin.c:463 - #, c-format - msgid "Unknown namespace \"%s\"\n" - msgstr "" - --#: sutil/ncpmount.c:322 sutil/ncplogin.c:499 -+#: sutil/ncpmount.c:334 sutil/ncplogin.c:505 - #, c-format - msgid "ncpfs version %s\n" - msgstr "" - --#: sutil/ncpmount.c:339 -+#: sutil/ncpmount.c:351 - msgid "Both tree and server name were specified. It is not allowed.\n" - msgstr "" - --#: sutil/ncpmount.c:343 sutil/ncpumount.c:428 sutil/ncplogin.c:343 -+#: sutil/ncpmount.c:355 sutil/ncpumount.c:428 sutil/ncplogin.c:349 - #, c-format - msgid "%s must be installed suid root\n" - msgstr "" - --#: sutil/ncpmount.c:354 sutil/ncplogin.c:705 -+#: sutil/ncpmount.c:366 sutil/ncplogin.c:711 - #, c-format - msgid "Could not find mount point %s: %s\n" - msgstr "" - --#: sutil/ncpmount.c:359 -+#: sutil/ncpmount.c:371 - #, c-format - msgid "Cannot to mount on %s: %s\n" - msgstr "" - --#: sutil/ncpmount.c:367 sutil/ncplogin.c:525 -+#: sutil/ncpmount.c:379 sutil/ncplogin.c:531 - #, c-format - msgid "Cannot impersonate as requested: %s\n" - msgstr "" - --#: sutil/ncpmount.c:378 -+#: sutil/ncpmount.c:389 - msgid "You must specify NDS volume name if you specified tree name.\n" - msgstr "" - --#: sutil/ncpmount.c:382 -+#: sutil/ncpmount.c:393 sutil/ncpmount.c:458 - msgid "in create context" - msgstr "" - --#: sutil/ncpmount.c:394 -+#: sutil/ncpmount.c:405 - msgid "in tree search" - msgstr "" - --#: sutil/ncpmount.c:401 sutil/ncpmount.c:554 -+#: sutil/ncpmount.c:412 sutil/ncpmount.c:644 - msgid "in nds login" - msgstr "" - --#: sutil/ncpmount.c:411 -+#: sutil/ncpmount.c:422 - msgid "in volume search" - msgstr "" - --#: sutil/ncpmount.c:428 sutil/ncplogin.c:176 -+#: sutil/ncpmount.c:441 sutil/ncplogin.c:180 - #, c-format - msgid "Volume path `%s' is invalid: `%s'\n" - msgstr "" - --#: sutil/ncpmount.c:436 sutil/ncplogin.c:184 -+#: sutil/ncpmount.c:450 sutil/ncplogin.c:190 - #, c-format - msgid "Volume name `%s' is too long\n" - msgstr "" - --#: sutil/ncpmount.c:446 sutil/ncplogin.c:723 -+#: sutil/ncpmount.c:467 -+#, c-format -+msgid "opening mount %s" -+msgstr "" -+ -+#: sutil/ncpmount.c:475 -+msgid "retrieving user name" -+msgstr "" -+ -+#: sutil/ncpmount.c:487 sutil/ncplogin.c:729 - msgid "in find_conn_spec" - msgstr "" - --#: sutil/ncpmount.c:483 sutil/ncpmount.c:513 -+#: sutil/ncpmount.c:529 sutil/ncpmount.c:569 - #, c-format - msgid "" - "You already have mounted server %s\n" -@@ -751,55 +763,70 @@ msgid "" - "on mount point %s\n" - msgstr "" - --#: sutil/ncpmount.c:496 sutil/ncplogin.c:766 -+#: sutil/ncpmount.c:546 sutil/ncplogin.c:772 - #, c-format - msgid "Get host address `%s': %s\n" - msgstr "" - --#: sutil/ncpmount.c:520 sutil/ncplogin.c:783 sutil/ncplogin.c:791 -+#: sutil/ncpmount.c:580 sutil/ncplogin.c:791 sutil/ncplogin.c:799 - #, c-format - msgid "when trying to find %s" - msgstr "" - --#: sutil/ncpmount.c:540 -+#: sutil/ncpmount.c:602 sutil/ncplogin.c:816 sutil/ncplogin.c:836 -+#, c-format -+msgid "Cannot allocate memory for mtab entry: %s\n" -+msgstr "" -+ -+#: sutil/ncpmount.c:613 - msgid "in mount(2)" - msgstr "" - --#: sutil/ncpmount.c:555 sutil/ncplogin.c:872 -+#: sutil/ncpmount.c:636 -+msgid "in authenticate connection" -+msgstr "" -+ -+#: sutil/ncpmount.c:645 sutil/ncplogin.c:869 -+#, c-format - msgid "Login denied.\n" - msgstr "" - --#: sutil/ncpmount.c:574 sutil/ncplogin.c:889 -+#: sutil/ncpmount.c:669 sutil/ncplogin.c:887 - msgid "in login" - msgstr "" - --#: sutil/ncpmount.c:575 sutil/ncplogin.c:890 -+#: sutil/ncpmount.c:670 sutil/ncplogin.c:888 -+#, c-format - msgid "Login denied\n" - msgstr "" - --#: sutil/ncpmount.c:597 sutil/ncplogin.c:931 -+#: sutil/ncpmount.c:701 -+msgid "in free context" -+msgstr "" -+ -+#: sutil/ncpmount.c:712 sutil/ncplogin.c:931 - #, c-format - msgid "Cannot access path \"%s\": %s\n" - msgstr "" - --#: sutil/ncpmount.c:609 sutil/ncplogin.c:947 -+#: sutil/ncpmount.c:724 sutil/ncplogin.c:949 - #, c-format - msgid "usage: %s [options] mount-point\n" - msgstr "" - --#: sutil/ncpmount.c:610 sutil/ncplogin.c:951 -+#: sutil/ncpmount.c:725 sutil/ncplogin.c:953 - #, c-format - msgid "Try `%s -h' for more information\n" - msgstr "" - --#: sutil/ncpmount.c:616 sutil/ncplogin.c:961 -+#: sutil/ncpmount.c:731 sutil/ncplogin.c:963 - #, c-format - msgid "" - "\n" - "usage: %s [options] mount-point\n" - msgstr "" - --#: sutil/ncpmount.c:620 -+#: sutil/ncpmount.c:735 - #, c-format - msgid "" - "\n" -@@ -831,17 +858,17 @@ msgid "" - "\n" - msgstr "" - --#: sutil/ncpmount.c:649 -+#: sutil/ncpmount.c:764 - msgid "-b Force bindery login to NDS servers\n" - msgstr "" - --#: sutil/ncpmount.c:655 sutil/ncplogin.c:1003 -+#: sutil/ncpmount.c:770 sutil/ncplogin.c:1005 - msgid "" - "-i level Signature level, 0=never, 1=supported, 2=preferred, " - "3=required\n" - msgstr "" - --#: sutil/ncpumount.c:83 sutil/ncplogin.c:949 util/ipx_probe.c:51 -+#: sutil/ncpumount.c:83 sutil/ncplogin.c:951 util/ipx_probe.c:51 - #: util/ipx_probe.c:61 util/nwauth.c:51 util/nwauth.c:58 util/nwbocreate.c:44 - #: util/nwbocreate.c:51 util/nwbols.c:49 util/nwboprops.c:39 - #: util/nwboprops.c:46 util/nwborm.c:39 util/nwbpadd.c:43 util/nwbpcreate.c:44 -@@ -866,6 +893,7 @@ msgstr "" - msgstr "" - - #: sutil/ncpumount.c:93 -+#, c-format - msgid "" - "\n" - "mount-point Disconnect specified mount-point\n" -@@ -953,6 +981,7 @@ msgstr "" - msgstr "" - - #: sutil/ncpumount.c:351 -+#, c-format - msgid "Successfully logged out from all trees.\n" - msgstr "" - -@@ -1033,6 +1062,7 @@ msgstr "" - msgstr "" - - #: sutil/nwsfind.c:67 -+#, c-format - msgid "" - "\n" - "-t Server type, default: File server\n" -@@ -1046,122 +1076,131 @@ msgid "%s: Server name too long\n" - msgid "%s: Server name too long\n" - msgstr "" - --#: sutil/nwsfind.c:153 util/nwauth.c:144 util/nwauth.c:150 -+#: sutil/nwsfind.c:153 util/nwauth.c:135 util/nwauth.c:141 - msgid "when trying to find server" - msgstr "" - --#: sutil/ncplogin.c:205 -+#: sutil/ncplogin.c:174 -+msgid "Cannot allocate memory for path\n" -+msgstr "" -+ -+#: sutil/ncplogin.c:211 - #, c-format - msgid "Context name `%s' is too long\n" - msgstr "" - --#: sutil/ncplogin.c:486 -+#: sutil/ncplogin.c:492 - #, c-format - msgid "invalid option: %c\n" - msgstr "" - --#: sutil/ncplogin.c:534 -+#: sutil/ncplogin.c:540 - msgid "You must specify a volume to mount using -V option.\n" - msgstr "" - --#: sutil/ncplogin.c:538 -+#: sutil/ncplogin.c:544 - msgid "Cannot have both -T tree and -S server options\n" - msgstr "" - --#: sutil/ncplogin.c:545 -+#: sutil/ncplogin.c:551 - #, c-format - msgid "Unable to open connection to %s.\n" - msgstr "" - --#: sutil/ncplogin.c:550 -+#: sutil/ncplogin.c:556 - #, c-format - msgid "%s is not a NDS server, so background authentication will fail.\n" - msgstr "" - --#: sutil/ncplogin.c:552 -+#: sutil/ncplogin.c:558 - #, c-format - msgid "%s is not a NDS server, so NDS authentication will fail.\n" - msgstr "" - --#: sutil/ncplogin.c:558 sutil/ncplogin.c:591 -+#: sutil/ncplogin.c:564 sutil/ncplogin.c:597 - #, c-format - msgid "Cannot create NDS context handle: %s\n" - msgstr "" - --#: sutil/ncplogin.c:563 -+#: sutil/ncplogin.c:569 - #, c-format - msgid "Server %s belong to tree %s and you are not authenticated to it.\n" - msgstr "" - --#: sutil/ncplogin.c:568 -+#: sutil/ncplogin.c:574 - #, c-format - msgid "Server %s belong to tree %s and you are already authenticated to it.\n" - msgstr "" - --#: sutil/ncplogin.c:596 -+#: sutil/ncplogin.c:602 - #, c-format - msgid "You are not authenticated to tree %s.\n" - msgstr "" - --#: sutil/ncplogin.c:601 -+#: sutil/ncplogin.c:607 - #, c-format - msgid "You are already authenticated to tree %s.\n" - msgstr "" - --#: sutil/ncplogin.c:613 -+#: sutil/ncplogin.c:619 - #, c-format - msgid "NWDSGetContext/NWDSSetContext (DCK_FLAGS) failed: %s.\n" - msgstr "" - --#: sutil/ncplogin.c:622 -+#: sutil/ncplogin.c:628 - #, c-format - msgid "NWDSSetContext(DCK_NAME_CTX) failed: %s\n" - msgstr "" - --#: sutil/ncplogin.c:633 -+#: sutil/ncplogin.c:639 - #, c-format - msgid "Cannot resolve volume name %s on tree %s (using context %s). Err:%s\n" - msgstr "" - --#: sutil/ncplogin.c:647 -+#: sutil/ncplogin.c:653 - #, c-format - msgid "Cannot attach to tree %s. Err:%s\n" - msgstr "" - --#: sutil/ncplogin.c:653 -+#: sutil/ncplogin.c:659 - #, c-format - msgid "Cannot get server name from connection to tree %s. Err:%s\n" - msgstr "" - --#: sutil/ncplogin.c:671 -+#: sutil/ncplogin.c:677 - msgid "No user name found in cmd line nor in env\n" - msgstr "" - --#: sutil/ncplogin.c:696 -+#: sutil/ncplogin.c:702 - #, c-format - msgid "Could not autocreate mount point %s: %s\n" - msgstr "" - --#: sutil/ncplogin.c:712 -+#: sutil/ncplogin.c:718 - #, c-format - msgid "Cannot mount on %s: %s\n" - msgstr "" - --#: sutil/ncplogin.c:841 --#, c-format --msgid "NWDSWhoAmi returned %s\n" --msgstr "" -- --#: sutil/ncplogin.c:850 -+#: sutil/ncplogin.c:825 -+#, c-format -+msgid "Cannot retrieve user identity: %s\n" -+msgstr "" -+ -+#: sutil/ncplogin.c:830 -+#, c-format -+msgid "Cannot parse user name: %s\n" -+msgstr "" -+ -+#: sutil/ncplogin.c:845 - #, c-format - msgid "already mounted:%s\n" - msgstr "" - --#: sutil/ncplogin.c:852 -+#: sutil/ncplogin.c:847 - msgid "failed in mount(2)" - msgstr "" - --#: sutil/ncplogin.c:871 -+#: sutil/ncplogin.c:868 - msgid "failed in nds login" - msgstr "" - -@@ -1175,14 +1214,14 @@ msgid "Cannot authenticate connection: % - msgid "Cannot authenticate connection: %s\n" - msgstr "" - --#: sutil/ncplogin.c:939 -+#: sutil/ncplogin.c:941 - #, c-format - msgid "mounted on:%s\n" - msgstr "" - --#: sutil/ncplogin.c:964 util/ncptest.c:317 util/nwborm.c:45 -+#: sutil/ncplogin.c:966 util/ncptest.c:317 util/nwborm.c:45 - #: util/nwbpcreate.c:50 util/nwbprm.c:46 util/nwbpvalues.c:58 --#: util/nwfsinfo.c:51 util/nwfstime.c:52 util/nwpasswd.c:45 -+#: util/nwfsinfo.c:51 util/nwfstime.c:52 util/nwpasswd.c:45 util/nwpjmv.c:67 - #: util/nwtrustee.c:48 util/nwuserlist.c:80 util/nwvolinfo.c:47 - #: util/pserver.c:65 - #, c-format -@@ -1191,11 +1230,11 @@ msgid "" - "usage: %s [options]\n" - msgstr "" - --#: sutil/ncplogin.c:968 -+#: sutil/ncplogin.c:970 - msgid " mount_point is optional if -a option specified\n" - msgstr "" - --#: sutil/ncplogin.c:972 -+#: sutil/ncplogin.c:974 - #, c-format - msgid "" - "\n" -@@ -1206,7 +1245,8 @@ msgid "" - "-E Echo value of final mount_point\n" - msgstr "" - --#: sutil/ncplogin.c:982 -+#: sutil/ncplogin.c:984 -+#, c-format - msgid "" - "\n" - "-U username Username sent to server\n" -@@ -1221,7 +1261,8 @@ msgid "" - " asked for a password.\n" - msgstr "" - --#: sutil/ncplogin.c:995 -+#: sutil/ncplogin.c:997 -+#, c-format - msgid "" - "\n" - "-V volume Volume to mount\n" -@@ -1230,12 +1271,12 @@ msgid "" - "-R path Path in volume to 'map root'\n" - msgstr "" - --#: sutil/ncplogin.c:1008 -+#: sutil/ncplogin.c:1010 - msgid "" - "-a Autocreate mounting point if needed in ~/ncp/SERVER/VOLUME\n" - msgstr "" - --#: sutil/ncplogin.c:1012 -+#: sutil/ncplogin.c:1014 - #, c-format - msgid "" - "\n" -@@ -1260,184 +1301,206 @@ msgid "Error: \"/proc/filesystems\" coul - msgid "Error: \"/proc/filesystems\" could not be read:" - msgstr "" - --#: sutil/ncpm_common.c:247 -+#: sutil/ncpm_common.c:251 - msgid "Cannot get kernel release\n" - msgstr "" - --#: sutil/ncpm_common.c:250 -+#: sutil/ncpm_common.c:254 - #, c-format - msgid "Cannot convert kernel release \"%s\" to number\n" - msgstr "" - --#: sutil/ncpm_common.c:446 sutil/ncpm_common.c:491 -+#: sutil/ncpm_common.c:392 sutil/ncpm_common.c:405 sutil/ncpm_common.c:606 -+#: sutil/ncpm_common.c:1466 sutil/ncpm_common.c:1737 -+#, c-format -+msgid "Cannot relinquish superuser rights: %s\n" -+msgstr "" -+ -+#: sutil/ncpm_common.c:498 sutil/ncpm_common.c:543 - #, c-format - msgid "Could not create pipe: %s\n" - msgstr "" - --#: sutil/ncpm_common.c:450 sutil/ncpm_common.c:497 -+#: sutil/ncpm_common.c:502 sutil/ncpm_common.c:549 - #, c-format - msgid "Could not fork: %s\n" - msgstr "" - --#: sutil/ncpm_common.c:606 -+#: sutil/ncpm_common.c:669 - #, c-format - msgid "Unsupported mount protocol version %d\n" - msgstr "" - --#: sutil/ncpm_common.c:656 -+#: sutil/ncpm_common.c:726 - msgid "" - "Remote directory is specified but kernel does not support subdir mounts\n" - msgstr "" - --#: sutil/ncpm_common.c:659 -+#: sutil/ncpm_common.c:729 - msgid "" - "Remote directory is specified but ncpmount does not support subdir mounts\n" - msgstr "" - --#: sutil/ncpm_common.c:1359 -+#: sutil/ncpm_common.c:1439 sutil/ncpm_common.c:1722 -+#, c-format -+msgid "Cannot switch to superuser: %s\n" -+msgstr "" -+ -+#: sutil/ncpm_common.c:1443 - #, c-format - msgid "Can't get %s~ lock file\n" - msgstr "" - --#: sutil/ncpm_common.c:1365 -+#: sutil/ncpm_common.c:1449 - #, c-format - msgid "Can't open %s\n" - msgstr "" - --#: sutil/ncpm_common.c:1369 -+#: sutil/ncpm_common.c:1453 - msgid "Can't write mount entry\n" - msgstr "" - --#: sutil/ncpm_common.c:1373 -+#: sutil/ncpm_common.c:1457 - #, c-format - msgid "Can't set perms on %s\n" - msgstr "" - --#: sutil/ncpm_common.c:1379 -+#: sutil/ncpm_common.c:1463 - #, c-format - msgid "Can't remove %s~\n" - msgstr "" - --#: sutil/ncpm_common.c:1397 -+#: sutil/ncpm_common.c:1484 - #, c-format - msgid "Value `%s' for option `%s' is not a number\n" - msgstr "" - --#: sutil/ncpm_common.c:1401 -+#: sutil/ncpm_common.c:1488 - #, c-format - msgid "Ignoring unneeded value for option `%s'\n" - msgstr "" - --#: sutil/ncpm_common.c:1406 -+#: sutil/ncpm_common.c:1493 - #, c-format - msgid "Required parameter for option `%s' missing\n" - msgstr "" - --#: sutil/ncpm_common.c:1426 -+#: sutil/ncpm_common.c:1517 -+msgid "You are not allowed to clear nosuid and nodev flags\n" -+msgstr "" -+ -+#: sutil/ncpm_common.c:1527 -+msgid "You are not allowed to clear noexec flag\n" -+msgstr "" -+ -+#: sutil/ncpm_common.c:1533 - msgid "Remounting not supported, sorry\n" - msgstr "" - --#: sutil/ncpm_common.c:1435 -+#: sutil/ncpm_common.c:1542 - msgid "Timeout must be between 1 and 900 secs inclusive\n" - msgstr "" - --#: sutil/ncpm_common.c:1442 -+#: sutil/ncpm_common.c:1549 - msgid "Retry count must be between 1 and 65536 inclusive\n" - msgstr "" - --#: sutil/ncpm_common.c:1473 -+#: sutil/ncpm_common.c:1580 - #, c-format - msgid "Specified server name `%s' is too long\n" - msgstr "" - --#: sutil/ncpm_common.c:1484 -+#: sutil/ncpm_common.c:1591 - #, c-format - msgid "NCP signature level must be number between 0 and 3. You specified %u\n" - msgstr "" - --#: sutil/ncpm_common.c:1491 -+#: sutil/ncpm_common.c:1598 - #, c-format - msgid "NCP cache time to live must be less than 20000 ms. You specified %u\n" - msgstr "" - --#: sutil/ncpm_common.c:1501 -+#: sutil/ncpm_common.c:1608 - #, c-format - msgid "File mode `%s' is not valid octal number\n" - msgstr "" - --#: sutil/ncpm_common.c:1510 -+#: sutil/ncpm_common.c:1617 - #, c-format - msgid "Directory mode `%s' is not valid octal number\n" - msgstr "" - --#: sutil/ncpm_common.c:1516 -+#: sutil/ncpm_common.c:1623 - #, c-format - msgid "I/O charset name `%s' is too long\n" - msgstr "" - --#: sutil/ncpm_common.c:1523 -+#: sutil/ncpm_common.c:1630 - #, c-format - msgid "Codepage name `%s' is too long\n" - msgstr "" - --#: sutil/ncpm_common.c:1598 -+#: sutil/ncpm_common.c:1705 - #, c-format - msgid "Unknown option `%s', ignoring it\n" - msgstr "" - --#: sutil/ncpm_common.c:1607 -+#: sutil/ncpm_common.c:1714 - msgid "attempt to open mount point" - msgstr "" - --#: sutil/ncpm_common.c:1627 -+#: sutil/ncpm_common.c:1742 -+#, c-format - msgid "" - "Your kernel does not support character mapping. You should upgrade to latest " - "version.\n" - msgstr "" - --#: sutil/ncpm_common.c:1629 -+#: sutil/ncpm_common.c:1744 - msgid "Warning: Unable to load NLS charsets" - msgstr "" - --#: sutil/ncpm_common.c:1636 -+#: sutil/ncpm_common.c:1751 -+#, c-format - msgid "" - "Your kernel does not support filename caching. You should upgrade to latest " - "kernel version.\n" - msgstr "" - --#: sutil/ncpm_common.c:1638 -+#: sutil/ncpm_common.c:1753 - #, c-format - msgid "Warning: Cannot enable filename caching: %s\n" - msgstr "" - --#: sutil/ncpm_common.c:1650 -+#: sutil/ncpm_common.c:1765 - #, c-format - msgid "Unable to negotiate requested security level: %s\n" - msgstr "" - --#: sutil/ncpm_common.c:1666 sutil/ncpm_common.c:1689 sutil/ncpm_common.c:1709 -+#: sutil/ncpm_common.c:1781 sutil/ncpm_common.c:1804 sutil/ncpm_common.c:1824 - msgid "opening ncp_socket" - msgstr "" - --#: sutil/ncpm_common.c:1682 sutil/ncpm_common.c:1702 -+#: sutil/ncpm_common.c:1797 sutil/ncpm_common.c:1817 - msgid "Invalid transport requested" - msgstr "" - --#: sutil/ncpm_common.c:1715 -+#: sutil/ncpm_common.c:1830 - #, c-format - msgid "%s: Could not open wdog socket: %s\n" - msgstr "" - --#: sutil/ncpm_common.c:1726 -+#: sutil/ncpm_common.c:1841 - msgid "No transport available\n" - msgstr "" - --#: sutil/ncpm_common.c:1731 -+#: sutil/ncpm_common.c:1846 - #, c-format - msgid "bind failed: %s\n" - msgstr "" - --#: sutil/ncpm_common.c:1733 -+#: sutil/ncpm_common.c:1848 -+#, c-format - msgid "" - "\n" - "Maybe you want to use \n" -@@ -1446,26 +1509,26 @@ msgid "" - "\n" - msgstr "" - --#: sutil/ncpm_common.c:1746 -+#: sutil/ncpm_common.c:1861 - msgid "getsockname ncp socketfailed" - msgstr "" - --#: sutil/ncpm_common.c:1755 -+#: sutil/ncpm_common.c:1870 - #, c-format - msgid "bind(wdog_sock, ): %s\n" - msgstr "" - --#: sutil/ncpm_common.c:1763 -+#: sutil/ncpm_common.c:1878 - #, c-format - msgid "Could not open message socket: %s\n" - msgstr "" - --#: sutil/ncpm_common.c:1771 -+#: sutil/ncpm_common.c:1886 - #, c-format - msgid "bind(message_sock, ): %s\n" - msgstr "" - --#: sutil/ncpm_common.c:1780 -+#: sutil/ncpm_common.c:1895 - #, c-format - msgid "connect(ncp_fd, ): %s\n" - msgstr "" -@@ -1483,8 +1546,9 @@ msgid "Cannot retrieve password from fil - msgid "Cannot retrieve password from file descriptor\n" - msgstr "" - --#: sutil/mount_login.c:97 util/nwauth.c:160 util/nwauth.c:169 --#: util/nwpasswd.c:141 util/nwpasswd.c:149 util/nwpasswd.c:157 -+#: sutil/mount_login.c:97 util/nwauth.c:151 util/nwauth.c:160 -+#: util/nwpasswd.c:143 util/nwpasswd.c:151 util/nwpasswd.c:159 -+#, c-format - msgid "Password too long\n" - msgstr "" - -@@ -1550,6 +1614,7 @@ msgstr "" - msgstr "" - - #: util/ipx_probe.c:58 -+#, c-format - msgid "" - "\n" - "Probe an interface for ipx networks\n" -@@ -1557,6 +1622,7 @@ msgstr "" - msgstr "" - - #: util/ipx_probe.c:62 -+#, c-format - msgid "" - "\n" - "-v Verbose output\n" -@@ -1587,6 +1653,7 @@ msgstr "" - msgstr "" - - #: util/ipx_probe.c:315 -+#, c-format - msgid "no network found\n" - msgstr "" - -@@ -1636,7 +1703,7 @@ msgid " %s [-vmMnppt] [-s amt] -r - msgid " %s [-vmMnppt] [-s amt] -r sourcedir directory\n" - msgstr "" - --#: util/ncopy.c:157 util/ncopy.c:874 -+#: util/ncopy.c:157 util/ncopy.c:877 - msgid "not a directory" - msgstr "" - -@@ -1655,7 +1722,7 @@ msgid "%s: No destination specified.\n" - msgid "%s: No destination specified.\n" - msgstr "" - --#: util/ncopy.c:250 util/ncopy.c:874 -+#: util/ncopy.c:250 util/ncopy.c:877 - #, c-format - msgid "%s: %s: %s\n" - msgstr "" -@@ -1720,178 +1787,179 @@ msgid "%s: Unable to open destination fi - msgid "%s: Unable to open destination file: %s\n" - msgstr "" - --#: util/ncopy.c:552 -+#: util/ncopy.c:555 - msgid "NetWare copy" - msgstr "" - --#: util/ncopy.c:558 util/ncopy.c:566 -+#: util/ncopy.c:561 util/ncopy.c:569 - #, c-format - msgid "%s: Close failed for %s\n" - msgstr "" - --#: util/ncopy.c:590 -+#: util/ncopy.c:593 - #, c-format - msgid "MAC namespace is not supported on source %s: %s\n" - msgstr "" - --#: util/ncopy.c:602 -+#: util/ncopy.c:605 - #, c-format - msgid "Unable to open MAC resource fork on source %s: %s\n" - msgstr "" - --#: util/ncopy.c:641 -+#: util/ncopy.c:644 - #, c-format - msgid "MAC namespace is not supported on destination %s: %s\n" - msgstr "" - --#: util/ncopy.c:651 -+#: util/ncopy.c:654 - #, c-format - msgid "Unable to create MAC resource fork on destination %s: %s\n" - msgstr "" - --#: util/ncopy.c:664 -+#: util/ncopy.c:667 - #, c-format - msgid "" - "Unable to copy MAC resource fork of %s because of %s does not support " - "resource forks\n" - msgstr "" - --#: util/ncopy.c:691 -+#: util/ncopy.c:694 - #, c-format - msgid "Unable to copy MAC resource fork: %s: %s\n" - msgstr "" - --#: util/ncopy.c:700 -+#: util/ncopy.c:703 - msgid "NetWare copy (resource fork)" - msgstr "" - --#: util/ncopy.c:732 util/ncopy.c:750 -+#: util/ncopy.c:735 util/ncopy.c:753 - #, c-format - msgid "Cannot set trustees on %s because of %s\n" - msgstr "" - --#: util/ncopy.c:734 util/ncopy.c:761 -+#: util/ncopy.c:737 util/ncopy.c:764 - msgid "not NetWare filesystem" - msgstr "" - --#: util/ncopy.c:759 util/ncopy.c:799 -+#: util/ncopy.c:762 util/ncopy.c:802 - #, c-format - msgid "Cannot set file attributes on %s because of %s\n" - msgstr "" - --#: util/ncopy.c:842 -+#: util/ncopy.c:845 - #, c-format - msgid "" - "Param Src '%s'\n" - "Param Dest '%s'\n" - msgstr "" - --#: util/ncopy.c:849 -+#: util/ncopy.c:852 - #, c-format - msgid "%s: Cannot open %s, %s\n" - msgstr "" - --#: util/ncopy.c:855 -+#: util/ncopy.c:858 - #, c-format - msgid "%s: Cannot stat %s, %s\n" - msgstr "" - --#: util/ncopy.c:881 -+#: util/ncopy.c:884 - #, c-format - msgid "%s: Cannot chmod %s: %s\n" - msgstr "" - --#: util/ncopy.c:888 -+#: util/ncopy.c:891 - #, c-format - msgid "%s: Cannot create %s: %s\n" - msgstr "" - --#: util/ncopy.c:898 util/ncopy.c:965 -+#: util/ncopy.c:901 util/ncopy.c:968 - #, c-format - msgid "%s: Cannot create %s, %s\n" - msgstr "" - --#: util/ncopy.c:911 -+#: util/ncopy.c:914 - #, c-format - msgid "%s: Cannot read %s: %s\n" - msgstr "" - --#: util/ncopy.c:938 -+#: util/ncopy.c:941 - #, c-format - msgid "%s: %s: omitting directory\n" - msgstr "" - --#: util/ncopy.c:1052 -+#: util/ncopy.c:1055 - #, c-format - msgid "%s: Reset to ignore SIGHUP signal failed: %s" - msgstr "" - --#: util/ncopy.c:1059 -+#: util/ncopy.c:1062 - #, c-format - msgid "%s: Reset to ignore SIGINT signal failed: %s" - msgstr "" - --#: util/ncopy.c:1066 -+#: util/ncopy.c:1069 - #, c-format - msgid "%s: Reset to ignore SIGQUIT signal failed: %s" - msgstr "" - --#: util/ncopy.c:1073 -+#: util/ncopy.c:1076 - #, c-format - msgid "%s: Reset to ignore SIGTERM signal failed: %s" - msgstr "" - --#: util/ncopy.c:1085 -+#: util/ncopy.c:1088 - #, c-format - msgid "%s: unclean close of output file" - msgstr "" - --#: util/ncopy.c:1104 -+#: util/ncopy.c:1107 - #, c-format - msgid "%s: Get HANGUP signal action failed: %s" - msgstr "" - --#: util/ncopy.c:1111 -+#: util/ncopy.c:1114 - #, c-format - msgid "%s: Reset HANGUP signal action failed: %s" - msgstr "" - --#: util/ncopy.c:1117 -+#: util/ncopy.c:1120 - #, c-format - msgid "%s: Get INTERRUPT signal action failed: %s" - msgstr "" - --#: util/ncopy.c:1124 -+#: util/ncopy.c:1127 - #, c-format - msgid "%s: Reset INTERRUPT signal action failed: %s" - msgstr "" - --#: util/ncopy.c:1130 -+#: util/ncopy.c:1133 - #, c-format - msgid "%s: Get QUIT signal action failed: %s" - msgstr "" - --#: util/ncopy.c:1137 -+#: util/ncopy.c:1140 - #, c-format - msgid "%s: Reset QUIT signal action failed: %s" - msgstr "" - --#: util/ncopy.c:1143 -+#: util/ncopy.c:1146 - #, c-format - msgid "%s: Get TERMINATE signal action failed: %s" - msgstr "" - --#: util/ncopy.c:1150 -+#: util/ncopy.c:1153 - #, c-format - msgid "%s: Reset TERMINATE signal action failed: %s" - msgstr "" - --#: util/ncopy.c:1181 -+#: util/ncopy.c:1184 - #, c-format - msgid "%s version %s\n" - msgstr "" - - #: util/ncptest.c:109 -+#, c-format - msgid "" - "\n" - "test_create:\n" -@@ -1903,36 +1971,44 @@ msgstr "" - msgstr "" - - #: util/ncptest.c:117 -+#, c-format - msgid "lookup public error\n" - msgstr "" - - #: util/ncptest.c:123 -+#, c-format - msgid "alloc_dir_handle error\n" - msgstr "" - - #: util/ncptest.c:129 -+#, c-format - msgid "create error\n" - msgstr "" - - #: util/ncptest.c:134 -+#, c-format - msgid "dealloc error\n" - msgstr "" - - #: util/ncptest.c:137 -+#, c-format - msgid "test_create: Passed.\n" - msgstr "" - - #: util/ncptest.c:173 -+#, c-format - msgid "" - "\n" - "test_readdir:\n" - msgstr "" - - #: util/ncptest.c:181 -+#, c-format - msgid "lookup blub error\n" - msgstr "" - - #: util/ncptest.c:186 -+#, c-format - msgid "init error\n" - msgstr "" - -@@ -1952,10 +2028,12 @@ msgstr "" - msgstr "" - - #: util/ncptest.c:222 -+#, c-format - msgid "path translation error\n" - msgstr "" - - #: util/ncptest.c:225 -+#, c-format - msgid "Search in subdir '" - msgstr "" - -@@ -1965,6 +2043,7 @@ msgstr "" - msgstr "" - - #: util/ncptest.c:231 -+#, c-format - msgid "init search2 error\n" - msgstr "" - -@@ -1974,20 +2053,24 @@ msgstr "" - msgstr "" - - #: util/ncptest.c:264 -+#, c-format - msgid "test_readdir: Passed.\n" - msgstr "" - - #: util/ncptest.c:275 -+#, c-format - msgid "" - "\n" - "test_rights:\n" - msgstr "" - - #: util/ncptest.c:283 -+#, c-format - msgid "lookup me error\n" - msgstr "" - - #: util/ncptest.c:290 -+#, c-format - msgid "get sys rights error\n" - msgstr "" - -@@ -1997,6 +2080,7 @@ msgstr "" - msgstr "" - - #: util/ncptest.c:299 -+#, c-format - msgid "get me rights error\n" - msgstr "" - -@@ -2006,6 +2090,7 @@ msgstr "" - msgstr "" - - #: util/ncptest.c:303 -+#, c-format - msgid "test_rights: Passed.\n" - msgstr "" - -@@ -2015,6 +2100,7 @@ msgstr "" - msgstr "" - - #: util/ncptest.c:319 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -2036,7 +2122,7 @@ msgid "when initializing connection" - msgid "when initializing connection" - msgstr "" - --#: util/nprint.c:110 util/pserver.c:191 -+#: util/nprint.c:110 util/nwpjmv.c:165 util/pserver.c:186 - msgid "No Description" - msgstr "" - -@@ -2084,12 +2170,13 @@ msgid "Cannot start print job: %s\n" - msgid "Cannot start print job: %s\n" - msgstr "" - --#: util/nprint.c:318 util/nprint.c:325 util/pserver.c:59 -+#: util/nprint.c:318 util/nprint.c:325 util/nwpjmv.c:61 util/pserver.c:59 - #, c-format - msgid "usage: %s [options] file\n" - msgstr "" - - #: util/nprint.c:326 -+#, c-format - msgid "" - "\n" - "-S server Server name to be used\n" -@@ -2160,6 +2247,7 @@ msgstr "" - msgstr "" - - #: util/nsend.c:121 -+#, c-format - msgid "" - "\n" - "-h Prints this help text\n" -@@ -2179,9 +2267,9 @@ msgstr "" - - #: util/nsend.c:162 util/nwbocreate.c:115 util/nwboprops.c:83 util/nwborm.c:80 - #: util/nwbpadd.c:95 util/nwbpcreate.c:119 util/nwbprm.c:83 util/nwbpset.c:91 --#: util/nwfsinfo.c:132 util/nwfstime.c:86 util/nwrights.c:102 --#: util/nwtrustee.c:98 util/nwuserlist.c:201 util/pqlist.c:176 util/pqrm.c:59 --#: util/pqstat.c:138 util/pserver.c:365 -+#: util/nwfsinfo.c:137 util/nwfstime.c:90 util/nwpjmv.c:351 util/nwpqjob.c:87 -+#: util/nwrights.c:102 util/nwtrustee.c:98 util/nwuserlist.c:205 -+#: util/pqlist.c:176 util/pqstat.c:138 util/pserver.c:360 - msgid "when initializing" - msgstr "" - -@@ -2221,6 +2309,7 @@ msgstr "" - msgstr "" - - #: util/nwauth.c:59 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -2233,15 +2322,16 @@ msgid "" - "\n" - msgstr "" - --#: util/nwauth.c:165 -+#: util/nwauth.c:156 - msgid "Enter password: " - msgstr "" - --#: util/nwauth.c:183 util/nwpasswd.c:175 -+#: util/nwauth.c:174 util/nwpasswd.c:177 - msgid "when trying to open connection" - msgstr "" - - #: util/nwbocreate.c:52 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -2292,6 +2382,7 @@ msgstr "" - msgstr "" - - #: util/nwbols.c:50 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -2315,6 +2406,7 @@ msgstr "" - msgstr "" - - #: util/nwboprops.c:47 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -2331,6 +2423,7 @@ msgstr "" - msgstr "" - - #: util/nwborm.c:47 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -2358,6 +2451,7 @@ msgstr "" - msgstr "" - - #: util/nwbpadd.c:51 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -2434,6 +2528,7 @@ msgstr "" - msgstr "" - - #: util/nwbpcreate.c:52 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -2463,6 +2558,7 @@ msgstr "" - msgstr "" - - #: util/nwbprm.c:48 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -2484,6 +2580,7 @@ msgstr "" - msgstr "" - - #: util/nwbpset.c:48 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -2497,6 +2594,7 @@ msgstr "" - - #: util/nwbpset.c:111 util/nwbpset.c:119 util/nwbpset.c:125 util/nwbpset.c:131 - #: util/nwbpset.c:139 util/nwbpset.c:235 -+#, c-format - msgid "Illegal format on stdin\n" - msgstr "" - -@@ -2514,22 +2612,27 @@ msgstr "" - msgstr "" - - #: util/nwbpset.c:164 -+#, c-format - msgid "Could not change property security\n" - msgstr "" - - #: util/nwbpset.c:175 -+#, c-format - msgid "Could not create property\n" - msgstr "" - - #: util/nwbpset.c:217 -+#, c-format - msgid "Could not write property\n" - msgstr "" - - #: util/nwbpset.c:246 -+#, c-format - msgid "Could not add object to set\n" - msgstr "" - - #: util/nwbpvalues.c:60 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -2566,139 +2669,150 @@ msgid "%s: Could not read property value - msgid "%s: Could not read property value: %s\n" - msgstr "" - --#: util/nwbpvalues.c:372 -+#: util/nwbpvalues.c:377 - #, c-format - msgid "Last Login: %x, %X" - msgstr "" - --#: util/nwbpvalues.c:376 -+#: util/nwbpvalues.c:381 -+#, c-format - msgid "Never logged in\n" - msgstr "" - --#: util/nwbpvalues.c:380 -+#: util/nwbpvalues.c:385 -+#, c-format - msgid " --- Account disabled ---\n" - msgstr "" - --#: util/nwbpvalues.c:395 -+#: util/nwbpvalues.c:400 - #, c-format - msgid "Account expires on: %x" - msgstr "" - --#: util/nwbpvalues.c:411 -+#: util/nwbpvalues.c:416 - #, c-format - msgid "Password expires on: %x" - msgstr "" - --#: util/nwbpvalues.c:413 -+#: util/nwbpvalues.c:418 - #, c-format - msgid "" - "GraceLogins left: %d\n" - "of max. : %d\n" - msgstr "" - --#: util/nwbpvalues.c:415 -+#: util/nwbpvalues.c:420 - #, c-format - msgid "PasswortChangeInterval : %d days\n" - msgstr "" - --#: util/nwbpvalues.c:420 -+#: util/nwbpvalues.c:425 -+#, c-format - msgid "New password must be different when changing\n" - msgstr "" - --#: util/nwbpvalues.c:424 -+#: util/nwbpvalues.c:429 -+#, c-format - msgid "User is not allowed to change password\n" - msgstr "" - --#: util/nwbpvalues.c:426 -+#: util/nwbpvalues.c:431 - #, c-format - msgid "Minimal password length : %d\n" - msgstr "" - --#: util/nwbpvalues.c:429 -+#: util/nwbpvalues.c:434 - #, c-format - msgid "Maximum no of connections: %d\n" - msgstr "" - --#: util/nwbpvalues.c:434 -+#: util/nwbpvalues.c:439 - #, c-format - msgid "Maximum DiskQuota : %8d blocks\n" - msgstr "" - --#: util/nwbpvalues.c:437 -+#: util/nwbpvalues.c:442 - #, c-format - msgid "Failed Logins: %5d\n" - msgstr "" - --#: util/nwbpvalues.c:441 -+#: util/nwbpvalues.c:446 - #, c-format - msgid "Account disabled still %8d seconds\n" - msgstr "" - --#: util/nwbpvalues.c:446 -+#: util/nwbpvalues.c:451 - #, c-format - msgid "Last 'intruder' address: %s\n" - msgstr "" - --#: util/nwbpvalues.c:452 -+#: util/nwbpvalues.c:457 - #, c-format - msgid "RestrictionMask : %02X\n" - msgstr "" - --#: util/nwbpvalues.c:466 -+#: util/nwbpvalues.c:471 -+#, c-format - msgid "Time restrictions: 1 1 1 1 1 1 1 1 1 1 2 2 2 2 ]\n" - msgstr "" - --#: util/nwbpvalues.c:467 -+#: util/nwbpvalues.c:472 -+#, c-format - msgid " Day [0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 ]\n" - msgstr "" - --#: util/nwbpvalues.c:507 -+#: util/nwbpvalues.c:512 - #, c-format - msgid "Segment: %03d\n" - msgstr "" - --#: util/nwdir.c:203 -+#: util/nwdir.c:203 util/nwlistsalvage.c:56 -+#, c-format - msgid "Nobody" - msgstr "" - --#: util/nwdir.c:212 -+#: util/nwdir.c:212 util/nwlistsalvage.c:65 -+#, c-format - msgid "Unknown:N/A" - msgstr "" - --#: util/nwdir.c:218 -+#: util/nwdir.c:218 util/nwlistsalvage.c:71 - #, c-format - msgid "Unknown:<%s>" - msgstr "" - --#: util/nwdir.c:223 -+#: util/nwdir.c:223 util/nwlistsalvage.c:76 -+#, c-format - msgid "User:" - msgstr "" - --#: util/nwdir.c:224 -+#: util/nwdir.c:224 util/nwlistsalvage.c:77 -+#, c-format - msgid "Group:" - msgstr "" - --#: util/nwdir.c:225 -+#: util/nwdir.c:225 util/nwlistsalvage.c:78 -+#, c-format - msgid "FileServer:" - msgstr "" - --#: util/nwdir.c:226 -+#: util/nwdir.c:226 util/nwlistsalvage.c:79 - #, c-format - msgid "Unknown(%04X):" - msgstr "" - --#: util/nwdir.c:267 -+#: util/nwdir.c:271 util/nwlistsalvage.c:120 - msgid "never" - msgstr "" - --#: util/nwdir.c:307 -+#: util/nwdir.c:311 - #, c-format - msgid "" - "Extended attributes: %u attributes\n" - " %u bytes in keys, %u bytes in data\n" - msgstr "" - --#: util/nwdir.c:323 -+#: util/nwdir.c:327 - #, c-format - msgid "" - " Key %u:\n" -@@ -2707,125 +2821,143 @@ msgid "" - " Value Length: %u\n" - msgstr "" - --#: util/nwdir.c:361 util/nwdir.c:384 -+#: util/nwdir.c:365 util/nwdir.c:388 - #, c-format - msgid " Cannot determine file size: %s\n" - msgstr "" - --#: util/nwdir.c:363 util/nwdir.c:413 -+#: util/nwdir.c:367 util/nwdir.c:417 - #, c-format - msgid " File size: %10Lu" - msgstr "" - --#: util/nwdir.c:368 util/nwdir.c:419 -+#: util/nwdir.c:372 util/nwdir.c:423 - #, c-format - msgid " (allocated %Lu)" - msgstr "" - --#: util/nwdir.c:386 -+#: util/nwdir.c:390 -+#, c-format - msgid " No datastream exist\n" - msgstr "" - --#: util/nwdir.c:410 -+#: util/nwdir.c:414 - #, c-format - msgid " Stream %3u size: %10Lu" - msgstr "" - --#: util/nwdir.c:441 -+#: util/nwdir.c:445 - #, c-format - msgid "Cannot retrieve file attributes: %s\n" - msgstr "" - --#: util/nwdir.c:447 -+#: util/nwdir.c:451 - #, c-format - msgid "Cannot retrieve file number: %s\n" - msgstr "" - --#: util/nwdir.c:453 -+#: util/nwdir.c:457 util/nwlistsalvage.c:174 - #, c-format - msgid "Cannot retrieve file name: %s\n" - msgstr "" - --#: util/nwdir.c:458 -+#: util/nwdir.c:462 -+#, c-format - msgid "Directory:\n" - msgstr "" - --#: util/nwdir.c:460 -+#: util/nwdir.c:464 -+#, c-format - msgid "File:\n" - msgstr "" - --#: util/nwdir.c:474 -+#: util/nwdir.c:478 -+#, c-format - msgid " DOS: " - msgstr "" - --#: util/nwdir.c:479 -+#: util/nwdir.c:483 -+#, c-format - msgid " OS/2: " - msgstr "" - --#: util/nwdir.c:485 -+#: util/nwdir.c:489 -+#, c-format - msgid " NFS: " - msgstr "" - --#: util/nwdir.c:491 -+#: util/nwdir.c:495 -+#, c-format - msgid " MAC: " - msgstr "" - --#: util/nwdir.c:500 -+#: util/nwdir.c:504 -+#, c-format - msgid "Rights:\n" - msgstr "" - --#: util/nwdir.c:501 -+#: util/nwdir.c:505 -+#, c-format - msgid " Inherited: " - msgstr "" - --#: util/nwdir.c:505 util/nwdir.c:524 util/nwdir.c:540 util/nwdir.c:558 --#: util/nwdir.c:566 util/nwdir.c:573 util/nwdir.c:582 -+#: util/nwdir.c:509 util/nwdir.c:528 util/nwdir.c:544 util/nwdir.c:562 -+#: util/nwdir.c:570 util/nwdir.c:577 util/nwdir.c:586 - #, c-format - msgid "Cannot determine: %s\n" - msgstr "" - --#: util/nwdir.c:522 -+#: util/nwdir.c:526 -+#, c-format - msgid " Effective: " - msgstr "" - --#: util/nwdir.c:536 -+#: util/nwdir.c:540 -+#, c-format - msgid "Owning namespace: " - msgstr "" - --#: util/nwdir.c:553 -+#: util/nwdir.c:557 -+#, c-format - msgid "Miscellaneous NetWare Information:\n" - msgstr "" - --#: util/nwdir.c:554 -+#: util/nwdir.c:558 -+#, c-format - msgid " Last update: " - msgstr "" - --#: util/nwdir.c:562 -+#: util/nwdir.c:566 -+#, c-format - msgid " Last archived: " - msgstr "" - --#: util/nwdir.c:571 -+#: util/nwdir.c:575 -+#, c-format - msgid " Last accessed: " - msgstr "" - --#: util/nwdir.c:578 -+#: util/nwdir.c:582 -+#, c-format - msgid " Created/Copied: " - msgstr "" - --#: util/nwdir.c:586 -+#: util/nwdir.c:590 - #, c-format - msgid " Flags: [%s%s%s%s]" - msgstr "" - --#: util/nwdir.c:636 -+#: util/nwdir.c:640 -+#, c-format - msgid "Trustees:\n" - msgstr "" - --#: util/nwdir.c:662 -+#: util/nwdir.c:666 -+#, c-format - msgid "File Usage:\n" - msgstr "" - --#: util/nwdir.c:663 -+#: util/nwdir.c:667 - #, c-format - msgid "" - " Use Count: %5u Open Count: %5u\n" -@@ -2834,148 +2966,151 @@ msgid "" - " Locked: %-15s Fork Count: %5u\n" - msgstr "" - --#: util/nwdir.c:670 -+#: util/nwdir.c:674 - #, c-format - msgid " Connection Count: %10u\n" - msgstr "" - --#: util/nwdir.c:674 util/nwdir.c:766 -+#: util/nwdir.c:678 util/nwdir.c:770 - #, c-format - msgid " Connection: %u/%u" - msgstr "" - --#: util/nwdir.c:677 util/nwdir.c:769 -+#: util/nwdir.c:681 util/nwdir.c:773 -+#, c-format - msgid ", " - msgstr "" - --#: util/nwdir.c:682 util/nwuserlist.c:380 -+#: util/nwdir.c:686 util/nwuserlist.c:384 - msgid "locked" - msgstr "" - --#: util/nwdir.c:682 util/nwuserlist.c:380 -+#: util/nwdir.c:686 util/nwuserlist.c:384 - msgid "open shareable" - msgstr "" - --#: util/nwdir.c:683 util/nwuserlist.c:381 -+#: util/nwdir.c:687 util/nwuserlist.c:385 - msgid "logged" - msgstr "" - --#: util/nwdir.c:683 util/nwuserlist.c:381 -+#: util/nwdir.c:687 util/nwuserlist.c:385 - msgid "open normal" - msgstr "" - --#: util/nwdir.c:684 util/nwdir.c:689 util/nwuserlist.c:382 --#: util/nwuserlist.c:387 -+#: util/nwdir.c:688 util/nwdir.c:693 util/nwuserlist.c:386 -+#: util/nwuserlist.c:391 - msgid "rsvd" - msgstr "" - --#: util/nwdir.c:685 util/nwuserlist.c:383 -+#: util/nwdir.c:689 util/nwuserlist.c:387 - msgid "TTS locked" - msgstr "" - --#: util/nwdir.c:685 util/nwuserlist.c:383 -+#: util/nwdir.c:689 util/nwuserlist.c:387 - msgid "TTS" - msgstr "" - --#: util/nwdir.c:686 util/nwuserlist.c:384 -+#: util/nwdir.c:690 util/nwuserlist.c:388 - msgid "read" - msgstr "" - --#: util/nwdir.c:686 util/nwuserlist.c:384 -+#: util/nwdir.c:690 util/nwuserlist.c:388 - msgid "write" - msgstr "" - --#: util/nwdir.c:687 util/nwuserlist.c:385 -+#: util/nwdir.c:691 util/nwuserlist.c:389 - msgid "deny read" - msgstr "" - --#: util/nwdir.c:687 util/nwuserlist.c:385 -+#: util/nwdir.c:691 util/nwuserlist.c:389 - msgid "deny write" - msgstr "" - --#: util/nwdir.c:688 util/nwuserlist.c:386 -+#: util/nwdir.c:692 util/nwuserlist.c:390 - msgid "detached" - msgstr "" - --#: util/nwdir.c:688 util/nwuserlist.c:386 -+#: util/nwdir.c:692 util/nwuserlist.c:390 - msgid "TTS holding detach" - msgstr "" - --#: util/nwdir.c:689 util/nwuserlist.c:387 -+#: util/nwdir.c:693 util/nwuserlist.c:391 - msgid "TTS holding open" - msgstr "" - --#: util/nwdir.c:710 util/nwdir.c:732 util/nwuserlist.c:409 --#: util/nwuserlist.c:432 -+#: util/nwdir.c:714 util/nwdir.c:736 util/nwuserlist.c:413 -+#: util/nwuserlist.c:436 - msgid "unlocked" - msgstr "" - --#: util/nwdir.c:713 util/nwuserlist.c:412 -+#: util/nwdir.c:717 util/nwuserlist.c:416 - msgid "Not locked" - msgstr "" - --#: util/nwdir.c:714 util/nwuserlist.c:413 -+#: util/nwdir.c:718 util/nwuserlist.c:417 - msgid "Locked by a file lock" - msgstr "" - --#: util/nwdir.c:715 util/nwuserlist.c:414 -+#: util/nwdir.c:719 util/nwuserlist.c:418 - msgid "Locked by Begin Share File Set" - msgstr "" - --#: util/nwdir.c:716 util/nwuserlist.c:415 -+#: util/nwdir.c:720 util/nwuserlist.c:419 - msgid "Unknown lock state" - msgstr "" - --#: util/nwdir.c:735 -+#: util/nwdir.c:739 - #, c-format - msgid " Lock: (%02X) %s\n" - msgstr "" - --#: util/nwdir.c:736 -+#: util/nwdir.c:740 - #, c-format - msgid " (%02X) %s\n" - msgstr "" - --#: util/nwdir.c:737 -+#: util/nwdir.c:741 - #, c-format - msgid " Access: (%02X) %s\n" - msgstr "" - --#: util/nwdir.c:739 -+#: util/nwdir.c:743 - #, c-format - msgid " Lock: %s\n" - msgstr "" - --#: util/nwdir.c:740 -+#: util/nwdir.c:744 - #, c-format - msgid " %s\n" - msgstr "" - --#: util/nwdir.c:741 -+#: util/nwdir.c:745 - #, c-format - msgid " Access: %s\n" - msgstr "" - --#: util/nwdir.c:762 -+#: util/nwdir.c:766 -+#, c-format - msgid "File Physical Locks:\n" - msgstr "" - --#: util/nwdir.c:773 -+#: util/nwdir.c:777 - #, c-format - msgid " Range: 0x%08LX-0x%08LX\n" - msgstr "" - --#: util/nwdir.c:791 -+#: util/nwdir.c:795 - #, c-format - msgid "Unable to begin scandir: 0x%04X\n" - msgstr "" - --#: util/nwdir.c:803 -+#: util/nwdir.c:807 - #, c-format - msgid "Unexpected error in NextDir: %s\n" - msgstr "" - --#: util/nwdir.c:821 -+#: util/nwdir.c:825 -+#, c-format - msgid "" - "nwdir [options] [path]\n" - "\n" -@@ -2993,31 +3128,32 @@ msgid "" - "(c) 1998 Milan Vandrovec for ncpfs-2.0.12.8\n" - msgstr "" - --#: util/nwdir.c:899 -+#: util/nwdir.c:903 - #, c-format - msgid "Unable to initialize: 0x%04X\n" - msgstr "" - --#: util/nwdir.c:932 -+#: util/nwdir.c:936 - #, c-format - msgid "Invalid path: %s\n" - msgstr "" - --#: util/nwdir.c:936 -+#: util/nwdir.c:940 -+#, c-format - msgid "Specified path is not remote\n" - msgstr "" - --#: util/nwdir.c:948 -+#: util/nwdir.c:952 - #, c-format - msgid "Directory %s\n" - msgstr "" - --#: util/nwdir.c:954 -+#: util/nwdir.c:958 - #, c-format - msgid "Path does not exist: %s\n" - msgstr "" - --#: util/nwdir.c:1002 -+#: util/nwdir.c:1006 - #, c-format - msgid "Cannot retrieve info: %s\n" - msgstr "" -@@ -3030,6 +3166,7 @@ msgstr "" - msgstr "" - - #: util/nwdpvalues.c:57 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -3053,6 +3190,7 @@ msgstr "" - msgstr "" - - #: util/nwfsctrl.c:56 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -3188,6 +3326,7 @@ msgstr "" - msgstr "" - - #: util/nwfsctrl.c:432 -+#, c-format - msgid "-p and -S are incompatible\n" - msgstr "" - -@@ -3202,10 +3341,11 @@ msgstr "" - msgstr "" - - #: util/nwfsctrl.c:452 -+#, c-format - msgid "Compatibility option entered, rest of commandline ignored\n" - msgstr "" - --#: util/nwfsctrl.c:479 -+#: util/nwfsctrl.c:479 util/nwpasswd.c:121 - #, c-format - msgid "%s: Out of memory!\n" - msgstr "" -@@ -3221,6 +3361,7 @@ msgstr "" - msgstr "" - - #: util/nwfsinfo.c:53 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -3349,35 +3490,38 @@ msgid "Large files %s\n" - msgid "Large files %s\n" - msgstr "" - --#: util/nwfsinfo.c:152 -+#: util/nwfsinfo.c:157 - msgid "could not get strings" - msgstr "" - --#: util/nwfsinfo.c:176 -+#: util/nwfsinfo.c:181 - msgid "could not get server time" - msgstr "" - --#: util/nwfsinfo.c:198 util/nwuserlist.c:257 -+#: util/nwfsinfo.c:203 util/nwuserlist.c:261 - msgid "Could not get server information" - msgstr "" - --#: util/nwfsinfo.c:219 -+#: util/nwfsinfo.c:224 -+#, c-format - msgid "" - "Installed NCP Extensions:\n" - " Name Number Version\n" - " -------------------------------------------------------\n" - msgstr "" - --#: util/nwfsinfo.c:224 -+#: util/nwfsinfo.c:229 - #, c-format - msgid " %-33s %08X %u.%u.%u\n" - msgstr "" - --#: util/nwfsinfo.c:227 -+#: util/nwfsinfo.c:232 -+#, c-format - msgid "No NCP Extensions registered\n" - msgstr "" - - #: util/nwfstime.c:54 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -3393,11 +3537,11 @@ msgid "" - "\n" - msgstr "" - --#: util/nwfstime.c:119 -+#: util/nwfstime.c:123 - msgid "when setting file server time" - msgstr "" - --#: util/nwfstime.c:129 -+#: util/nwfstime.c:133 - msgid "when getting file server time" - msgstr "" - -@@ -3409,6 +3553,7 @@ msgstr "" - msgstr "" - - #: util/nwgrant.c:66 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -3462,8 +3607,67 @@ msgid "%s: Could not add trustee rights: - msgid "%s: Could not add trustee rights: %s\n" - msgstr "" - --#: util/nwmsg.c:88 util/nwpurge.c:136 contrib/tknwmsg/nwmsg.c:88 -+#: util/nwlistsalvage.c:131 -+#, c-format -+msgid "" -+"usage: nwlistsalvage [options] [directory]\n" -+"\n" -+"-h Print this help text\n" -+"-n Namespace for file access.\n" -+" DOS\n" -+" LONG - Default\n" -+" MAC\n" -+" NFS\n" -+" FTAM\n" -+"-v Verbose\n" -+"\n" -+"directory Directory to examine for salvageable files. Default is ./\n" -+"\n" -+msgstr "" -+ -+#: util/nwlistsalvage.c:189 -+#, c-format -+msgid "Cannot retrieve creation info: %s\n" -+msgstr "" -+ -+#: util/nwlistsalvage.c:198 -+#, c-format -+msgid "Cannot retrieve modified info: %s\n" -+msgstr "" -+ -+#: util/nwlistsalvage.c:262 util/nwsalvage.c:137 -+#, c-format -+msgid "Unrecognized namespace for option '-%c'\n" -+msgstr "" -+ -+#: util/nwlistsalvage.c:268 util/nwpurge.c:125 util/nwsalvage.c:150 -+#, c-format -+msgid "Unexpected option `-%c'\n" -+msgstr "" -+ -+#: util/nwlistsalvage.c:279 util/nwmsg.c:88 util/nwpurge.c:136 -+#: util/nwsalvage.c:163 contrib/tknwmsg/nwmsg.c:88 - msgid "in ncp_open_mount" -+msgstr "" -+ -+#: util/nwlistsalvage.c:284 util/nwpurge.c:141 util/nwrights.c:107 -+#: util/nwsalvage.c:168 -+msgid "when retrieving root entry" -+msgstr "" -+ -+#: util/nwlistsalvage.c:292 -+#, c-format -+msgid "No salvageable files were found.\n" -+msgstr "" -+ -+#: util/nwlistsalvage.c:294 -+#, c-format -+msgid "1 salvageable file was found.\n" -+msgstr "" -+ -+#: util/nwlistsalvage.c:296 -+#, c-format -+msgid "%d salvageable files were found.\n" - msgstr "" - - #: util/nwmsg.c:93 contrib/tknwmsg/nwmsg.c:93 -@@ -3527,6 +3731,7 @@ msgstr "" - msgstr "" - - #: util/nwpasswd.c:47 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -3541,41 +3746,193 @@ msgid "trying to find server" - msgid "trying to find server" - msgstr "" - --#: util/nwpasswd.c:127 -+#: util/nwpasswd.c:129 - #, c-format - msgid "Changing password for user %s on server %s\n" - msgstr "" - --#: util/nwpasswd.c:132 -+#: util/nwpasswd.c:134 - msgid "Enter old password: " - msgstr "" - --#: util/nwpasswd.c:136 -+#: util/nwpasswd.c:138 - #, c-format - msgid "Enter password for %s: " - msgstr "" - --#: util/nwpasswd.c:146 -+#: util/nwpasswd.c:148 - msgid "Enter new password: " - msgstr "" - --#: util/nwpasswd.c:154 -+#: util/nwpasswd.c:156 - msgid "Re-Enter new password: " - msgstr "" - --#: util/nwpasswd.c:168 -+#: util/nwpasswd.c:170 -+#, c-format - msgid "You mistype the new password, try again\n" - msgstr "" - --#: util/nwpasswd.c:187 -+#: util/nwpasswd.c:189 - msgid "not own password" - msgstr "" - --#: util/nwpasswd.c:196 -+#: util/nwpasswd.c:198 - msgid "trying to change password" - msgstr "" - -+#: util/nwpjmv.c:69 -+#, c-format -+msgid "" -+"\n" -+"-S server Server name to be used\n" -+"-U username Print Server name sent to server\n" -+"-P password Use this password\n" -+"-n Do not use any password\n" -+"-C Don't convert password to uppercase\n" -+"-q queue name Name of the printing queue to use\n" -+"-c command Name of print command, default: 'lpr'\n" -+"-j job number ID number of job to service\n" -+"-d Debug\n" -+msgstr "" -+ -+#: util/nwpjmv.c:110 util/pserver.c:132 -+#, c-format -+msgid "Queue %s not found: %s\n" -+msgstr "" -+ -+#: util/nwpjmv.c:119 util/pserver.c:141 -+#, c-format -+msgid "Could not attach to queue %s: %s\n" -+msgstr "" -+ -+#: util/nwpjmv.c:191 -+#, c-format -+msgid "Failed to change job position: %s\n" -+msgstr "" -+ -+#: util/nwpjmv.c:201 util/pserver.c:216 -+#, c-format -+msgid "Cannot service print job: %s\n" -+msgstr "" -+ -+#: util/nwpjmv.c:211 -+#, c-format -+msgid "wrong job queued: expected %08X, got %08X\n" -+msgstr "" -+ -+#: util/nwpjmv.c:224 util/pserver.c:234 -+#, c-format -+msgid "" -+msgstr "" -+ -+#: util/nwpjmv.c:229 util/pserver.c:239 -+#, c-format -+msgid "pipe error: %m" -+msgstr "" -+ -+#: util/nwpjmv.c:234 util/pserver.c:244 -+#, c-format -+msgid "fork error: %m" -+msgstr "" -+ -+#: util/nwpjmv.c:260 util/pserver.c:270 -+#, c-format -+msgid "waitpid: %m\n" -+msgstr "" -+ -+#: util/nwpjmv.c:274 util/pserver.c:284 -+#, c-format -+msgid "dup2 error: %m\n" -+msgstr "" -+ -+#: util/nwpjmv.c:284 util/pserver.c:294 -+#, c-format -+msgid "exec error: %m\n" -+msgstr "" -+ -+#: util/nwpjmv.c:387 util/pserver.c:399 -+#, c-format -+msgid "You must specify a queue\n" -+msgstr "" -+ -+#: util/nwpjmv.c:402 util/nwpqjob.c:150 -+#, c-format -+msgid "Cannot parse \"%s\" - jobID must be hexadecimal number\n" -+msgstr "" -+ -+#: util/nwpjmv.c:408 -+#, c-format -+msgid "Could not move job %08X\n" -+msgstr "" -+ -+#: util/nwpqjob.c:50 util/nwpqjob.c:52 util/nwpqjob.c:59 -+#, c-format -+msgid "\n" -+msgstr "" -+ -+#: util/nwpqjob.c:51 -+#, c-format -+msgid "usage: %s [options] [ ...]\n" -+msgstr "" -+ -+#: util/nwpqjob.c:53 -+#, c-format -+msgid "-S server Server name to be used\n" -+msgstr "" -+ -+#: util/nwpqjob.c:54 -+#, c-format -+msgid "-U username User name\n" -+msgstr "" -+ -+#: util/nwpqjob.c:55 -+#, c-format -+msgid "-P password Use this password\n" -+msgstr "" -+ -+#: util/nwpqjob.c:56 -+#, c-format -+msgid "-n Do not use any password\n" -+msgstr "" -+ -+#: util/nwpqjob.c:57 -+#, c-format -+msgid "-d Delete job from queue (default for pqrm)\n" -+msgstr "" -+ -+#: util/nwpqjob.c:58 -+#, c-format -+msgid "-r Resume job\n" -+msgstr "" -+ -+#: util/nwpqjob.c:110 -+#, c-format -+msgid "%s: At least one of -d or -r must be specified\n" -+msgstr "" -+ -+#: util/nwpqjob.c:135 util/pqstat.c:182 -+#, c-format -+msgid "Queue \"%s\" on server %s not found.\n" -+msgstr "" -+ -+#: util/nwpqjob.c:166 -+#, c-format -+msgid "Job %08X does not exist\n" -+msgstr "" -+ -+#: util/nwpqjob.c:168 -+#, c-format -+msgid "You have not rights to cancel job %08X\n" -+msgstr "" -+ -+#: util/nwpqjob.c:170 -+#, c-format -+msgid "Cannot cancel job %08X: %s\n" -+msgstr "" -+ - #: util/nwpurge.c:38 -+#, c-format - msgid "" - "usage: nwpurge [options] [directory]\n" - "\n" -@@ -3593,20 +3950,13 @@ msgid "%8s-- failed (%s)\n" - msgid "%8s-- failed (%s)\n" - msgstr "" - --#: util/nwpurge.c:125 --#, c-format --msgid "Unexpected option `-%c'\n" --msgstr "" -- --#: util/nwpurge.c:141 util/nwrights.c:107 --msgid "when retrieving root entry" --msgstr "" -- - #: util/nwpurge.c:148 -+#, c-format - msgid "No files were purged from server.\n" - msgstr "" - - #: util/nwpurge.c:150 -+#, c-format - msgid "1 file was purged from server.\n" - msgstr "" - -@@ -3616,6 +3966,7 @@ msgstr "" - msgstr "" - - #: util/nwpurge.c:156 -+#, c-format - msgid "1 file was not purged due to error.\n" - msgstr "" - -@@ -3625,6 +3976,7 @@ msgstr "" - msgstr "" - - #: util/nwrevoke.c:58 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -3647,6 +3999,7 @@ msgstr "" - msgstr "" - - #: util/nwrights.c:52 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -3665,38 +4018,94 @@ msgstr "" - msgstr "" - - #: util/nwrights.c:125 -+#, c-format - msgid "(S): You have SUPERVISOR rights\n" - msgstr "" - - #: util/nwrights.c:129 -+#, c-format - msgid "(R): You may READ from files\n" - msgstr "" - - #: util/nwrights.c:133 -+#, c-format - msgid "(W): You may WRITE to files\n" - msgstr "" - - #: util/nwrights.c:137 -+#, c-format - msgid "(C): You may CREATE files\n" - msgstr "" - - #: util/nwrights.c:141 -+#, c-format - msgid "(E): You may ERASE files\n" - msgstr "" - - #: util/nwrights.c:145 -+#, c-format - msgid "(M): You may MODIFY directory\n" - msgstr "" - - #: util/nwrights.c:149 -+#, c-format - msgid "(F): You may SCAN for files\n" - msgstr "" - - #: util/nwrights.c:153 -+#, c-format - msgid "(A): You may change ACCESS control\n" - msgstr "" - -+#: util/nwsalvage.c:35 -+#, c-format -+msgid "" -+"usage: nwsalvage [options] directory file_id\n" -+"\n" -+"-h Print this help text.\n" -+"-s Silent mode.\n" -+"-n Namespace for accessing files.\n" -+" DOS\n" -+" LONG - Default\n" -+" MAC\n" -+" FTAM\n" -+" NFS\n" -+"-r Rename the salvaged file. 255 chars max.\n" -+"directory Directory in which salvageable file resides.\n" -+" Default is current directory.\n" -+"\n" -+"file_id The file identified by file_id will be salvaged.\n" -+" Numeric file_id is obtained from nwlistsalvage.\n" -+"\n" -+msgstr "" -+ -+#: util/nwsalvage.c:84 -+#, c-format -+msgid "%8s%d -- failed (File already exists, or path inaccessible)\n" -+msgstr "" -+ -+#: util/nwsalvage.c:86 -+#, c-format -+msgid "%8s%d %s -- failed (%s)\n" -+msgstr "" -+ -+#: util/nwsalvage.c:91 -+#, c-format -+msgid "%8s%d %s -- salvaged \n" -+msgstr "" -+ -+#: util/nwsalvage.c:98 -+#, c-format -+msgid "%8sFile with scan ID '%d' was not found." -+msgstr "" -+ -+#: util/nwsalvage.c:144 -+#, c-format -+msgid "Filename for option '-%c' has invalid length." -+msgstr "" -+ - #: util/nwtrustee.c:50 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -3728,6 +4137,7 @@ msgstr "" - msgstr "" - - #: util/nwtrustee2.c:53 -+#, c-format - msgid "" - "\n" - "-v Verbose\n" -@@ -3752,6 +4162,7 @@ msgstr "" - msgstr "" - - #: util/nwuserlist.c:82 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -3829,7 +4240,7 @@ msgid " %-21s%5llu %c%s\n" - msgid " %-21s%5llu %c%s\n" - msgstr "" - --#: util/nwuserlist.c:266 -+#: util/nwuserlist.c:270 - #, c-format - msgid "" - "\n" -@@ -3837,22 +4248,22 @@ msgid "" - "---------------------------------------------------\n" - msgstr "" - --#: util/nwuserlist.c:269 util/nwuserlist.c:277 util/nwuserlist.c:286 --#: util/nwuserlist.c:295 -+#: util/nwuserlist.c:273 util/nwuserlist.c:281 util/nwuserlist.c:290 -+#: util/nwuserlist.c:299 - msgid "Conn" - msgstr "" - --#: util/nwuserlist.c:270 util/nwuserlist.c:278 util/nwuserlist.c:288 --#: util/nwuserlist.c:297 -+#: util/nwuserlist.c:274 util/nwuserlist.c:282 util/nwuserlist.c:292 -+#: util/nwuserlist.c:301 - msgid "User name" - msgstr "" - --#: util/nwuserlist.c:271 util/nwuserlist.c:280 util/nwuserlist.c:289 --#: util/nwuserlist.c:299 -+#: util/nwuserlist.c:275 util/nwuserlist.c:284 util/nwuserlist.c:293 -+#: util/nwuserlist.c:303 - msgid "Login time" - msgstr "" - --#: util/nwuserlist.c:274 -+#: util/nwuserlist.c:278 - #, c-format - msgid "" - "\n" -@@ -3860,11 +4271,11 @@ msgid "" - "------------------------------------------------------------------------------\n" - msgstr "" - --#: util/nwuserlist.c:279 util/nwuserlist.c:298 -+#: util/nwuserlist.c:283 util/nwuserlist.c:302 - msgid "Station Address" - msgstr "" - --#: util/nwuserlist.c:283 -+#: util/nwuserlist.c:287 - #, c-format - msgid "" - "\n" -@@ -3872,11 +4283,11 @@ msgid "" - "------------------------------------------------------------\n" - msgstr "" - --#: util/nwuserlist.c:287 util/nwuserlist.c:296 -+#: util/nwuserlist.c:291 util/nwuserlist.c:300 - msgid "ObjectID" - msgstr "" - --#: util/nwuserlist.c:292 -+#: util/nwuserlist.c:296 - #, c-format - msgid "" - "\n" -@@ -3884,135 +4295,136 @@ msgid "" - "---------------------------------------------------------------------------------------\n" - msgstr "" - --#: util/nwuserlist.c:315 -+#: util/nwuserlist.c:319 - #, c-format - msgid "%4d: %08X %-20s " - msgstr "" - --#: util/nwuserlist.c:317 -+#: util/nwuserlist.c:321 - #, c-format - msgid "%4d: %-20s " - msgstr "" - --#: util/nwuserlist.c:343 -+#: util/nwuserlist.c:347 - msgid "Unknown format" - msgstr "" - --#: util/nwuserlist.c:375 -+#: util/nwuserlist.c:379 - #, c-format - msgid " File: (%02X:%08X) %s\n" - msgstr "" - --#: util/nwuserlist.c:377 -+#: util/nwuserlist.c:381 - #, c-format - msgid " File: %s\n" - msgstr "" - --#: util/nwuserlist.c:435 -+#: util/nwuserlist.c:439 - #, c-format - msgid " Task: %-5u Lock: (%02X) %s\n" - msgstr "" - --#: util/nwuserlist.c:436 -+#: util/nwuserlist.c:440 - #, c-format - msgid " Fork count: %-3u (%02X) %s\n" - msgstr "" - --#: util/nwuserlist.c:437 -+#: util/nwuserlist.c:441 - #, c-format - msgid " Namespace: (%02X) %-5s Access: (%02X) %s\n" - msgstr "" - --#: util/nwuserlist.c:439 -+#: util/nwuserlist.c:443 - #, c-format - msgid " Task: %-5u Lock: %s\n" - msgstr "" - --#: util/nwuserlist.c:440 -+#: util/nwuserlist.c:444 - #, c-format - msgid " Fork count: %-3u %s\n" - msgstr "" - --#: util/nwuserlist.c:441 -+#: util/nwuserlist.c:445 - #, c-format - msgid " Namespace: %-5s Access: %s\n" - msgstr "" - --#: util/nwuserlist.c:453 -+#: util/nwuserlist.c:457 - #, c-format - msgid " Semaphore: %s\n" - msgstr "" - --#: util/nwuserlist.c:455 -+#: util/nwuserlist.c:459 - #, c-format - msgid " Task: %-5u Value: %-5d Open Count: %-5u\n" - msgstr "" - --#: util/nwuserlist.c:467 -+#: util/nwuserlist.c:471 - #, c-format - msgid " Type: (%02X) %-9.9s Status: (%08X) %s\n" - msgstr "" - --#: util/nwuserlist.c:470 -+#: util/nwuserlist.c:474 - #, c-format - msgid " Use count: %-9u ExpTime: %08X ObjType: %08X\n" - msgstr "" - --#: util/nwuserlist.c:472 -+#: util/nwuserlist.c:476 - #, c-format - msgid " Transaction flag: %9u Filler: %18u\n" - msgstr "" - --#: util/nwuserlist.c:474 -+#: util/nwuserlist.c:478 - #, c-format - msgid " Logical lock threshold: %3u Record lock threshold: %3u\n" - msgstr "" - --#: util/nwuserlist.c:476 -+#: util/nwuserlist.c:480 - #, c-format - msgid " File write flags: 0x%02X File write state: 0x%02X\n" - msgstr "" - --#: util/nwuserlist.c:478 -+#: util/nwuserlist.c:482 - #, c-format - msgid " File lock count: %10u Record lock count: %7u\n" - msgstr "" - --#: util/nwuserlist.c:481 -+#: util/nwuserlist.c:485 - #, c-format - msgid " Type: %-14s Status: %s\n" - msgstr "" - --#: util/nwuserlist.c:485 -+#: util/nwuserlist.c:489 - msgid "Bytes read:" - msgstr "" - --#: util/nwuserlist.c:485 util/nwuserlist.c:486 util/nwuserlist.c:489 -+#: util/nwuserlist.c:489 util/nwuserlist.c:490 util/nwuserlist.c:493 -+#: util/nwuserlist.c:494 -+msgid "B" -+msgstr "" -+ - #: util/nwuserlist.c:490 --msgid "B" --msgstr "" -- --#: util/nwuserlist.c:486 - msgid "Bytes written:" - msgstr "" - --#: util/nwuserlist.c:487 -+#: util/nwuserlist.c:491 - msgid "Requests:" - msgstr "" - --#: util/nwuserlist.c:489 -+#: util/nwuserlist.c:493 - msgid "Held bytes read:" - msgstr "" - --#: util/nwuserlist.c:490 -+#: util/nwuserlist.c:494 - msgid "Held bytes written:" - msgstr "" - --#: util/nwuserlist.c:491 -+#: util/nwuserlist.c:495 - msgid "Held requests:" - msgstr "" - - #: util/nwvolinfo.c:49 -+#, c-format - msgid "" - "\n" - "-h Print this help text\n" -@@ -4090,37 +4502,8 @@ msgstr "" - msgstr "" - - #: util/pqlist.c:231 -+#, c-format - msgid "No queues found\n" --msgstr "" -- --#: util/pqrm.c:65 --#, c-format --msgid "usage: %s [ ...]\n" --msgstr "" -- --#: util/pqrm.c:85 util/pqstat.c:182 --#, c-format --msgid "Queue \"%s\" on server %s not found.\n" --msgstr "" -- --#: util/pqrm.c:99 --#, c-format --msgid "Cannot parse \"%s\" - jobID must be hexadecimal number\n" --msgstr "" -- --#: util/pqrm.c:105 --#, c-format --msgid "Job %08X does not exist\n" --msgstr "" -- --#: util/pqrm.c:107 --#, c-format --msgid "You have not rights to cancel job %08X\n" --msgstr "" -- --#: util/pqrm.c:109 --#, c-format --msgid "Cannot cancel job %08X: %s\n" - msgstr "" - - #: util/pqstat.c:113 -@@ -4167,6 +4550,7 @@ msgstr "" - msgstr "" - - #: util/pqstat.c:216 -+#, c-format - msgid "You have insufficient rights to list queue jobs\n" - msgstr "" - -@@ -4205,6 +4589,7 @@ msgstr "" - msgstr "" - - #: util/pserver.c:67 -+#, c-format - msgid "" - "\n" - "-S server Server name to be used\n" -@@ -4221,54 +4606,6 @@ msgid "" - "\n" - msgstr "" - --#: util/pserver.c:132 --#, c-format --msgid "Queue %s not found: %s\n" --msgstr "" -- --#: util/pserver.c:141 --#, c-format --msgid "Could not attach to queue %s: %s\n" --msgstr "" -- --#: util/pserver.c:221 --#, c-format --msgid "Cannot service print job: %s\n" --msgstr "" -- --#: util/pserver.c:239 --msgid "" --msgstr "" -- --#: util/pserver.c:244 --#, c-format --msgid "pipe error: %m" --msgstr "" -- --#: util/pserver.c:249 --#, c-format --msgid "fork error: %m" --msgstr "" -- --#: util/pserver.c:275 --#, c-format --msgid "waitpid: %m\n" --msgstr "" -- --#: util/pserver.c:289 --#, c-format --msgid "dup2 error: %m\n" --msgstr "" -- --#: util/pserver.c:299 --#, c-format --msgid "exec error: %m\n" --msgstr "" -- --#: util/pserver.c:404 --msgid "You must specify a queue\n" --msgstr "" -- - #: util/slist.c:68 - msgid "in ncp_open" - msgstr "" -@@ -4286,6 +4623,7 @@ msgstr "" - msgstr "" - - #: util/slist.c:107 -+#, c-format - msgid "No servers found\n" - msgstr "" - - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-437.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-437.patch deleted file mode 100644 index dd30aaa..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-437.patch +++ /dev/null @@ -1,3065 +0,0 @@ -changeset: 437:06067530cbec -user: Petr Vandrovec -date: Sun Jul 03 21:50:24 2005 +0100 -files: po/cs.gmo po/cs.po -description: -Update Czech translation. - -Add Czech translations for new messages - nwsalvage, -nwlistsalvage, nwpjmv, ... - - -diff -r 9aa9e7b516dd -r 06067530cbec po/cs.gmo -Binary file po/cs.gmo has changed -diff -r 9aa9e7b516dd -r 06067530cbec po/cs.po ---- a/po/cs.po Sun Jul 03 21:49:28 2005 +0100 -+++ b/po/cs.po Sun Jul 03 21:50:24 2005 +0100 -@@ -7,8 +7,8 @@ msgid "" - msgid "" - msgstr "" - "Project-Id-Version: cs\n" --"Report-Msgid-Bugs-To: \n" --"POT-Creation-Date: 2005-01-11 10:23+0000\n" -+"Report-Msgid-Bugs-To: vandrove@vc.cvut.cz\n" -+"POT-Creation-Date: 2005-07-03 22:05+0200\n" - "PO-Revision-Date: 2004-12-10 09:26+0100\n" - "Last-Translator: Klara Cihlarova \n" - "Language-Team: cs_CZ \n" -@@ -236,73 +236,73 @@ msgid "%s: Network %08lX is directly con - msgid "%s: Network %08lX is directly connected.\n" - msgstr "%s: Síť %08lX je pÅ™ipojena přímo.\n" - --#: lib/ncplib.c:1058 lib/ncplib.c:1089 lib/ncplib.c:1126 -+#: lib/ncplib.c:1079 lib/ncplib.c:1110 lib/ncplib.c:1147 - #, c-format - msgid "ncp_request_error: %d\n" - msgstr "ncp_request_error: %d\n" - --#: lib/ncplib.c:1657 lib/ncplib.c:3700 sutil/ncpmount.c:638 --#: sutil/ncpmount.c:662 sutil/ncplogin.c:878 sutil/ncplogin.c:896 -+#: lib/ncplib.c:1697 lib/ncplib.c:3746 sutil/ncpmount.c:655 -+#: sutil/ncpmount.c:680 sutil/ncplogin.c:876 sutil/ncplogin.c:895 - #, c-format - msgid "Your password has expired\n" - msgstr "VaÅ¡e heslo vyprÅ¡elo\n" - --#: lib/ncplib.c:2362 -+#: lib/ncplib.c:2405 - #, c-format - msgid "Logging into %s as %s\n" - msgstr "PÅ™ihlášení na server %s jako %s\n" - --#: lib/ncplib.c:2365 -+#: lib/ncplib.c:2408 - msgid "Password: " - msgstr "Vložte heslo: " - --#: lib/ncplib.c:2612 -+#: lib/ncplib.c:2658 - #, c-format - msgid "ncpfs: string too long: %s\n" - msgstr "ncpfs: Å™etÄ›zec je příliÅ¡ dlouhý: %s\n" - --#: lib/ncplib.c:3706 sutil/ncpmount.c:668 sutil/ncplogin.c:901 -+#: lib/ncplib.c:3752 sutil/ncpmount.c:686 sutil/ncplogin.c:900 - #, c-format - msgid "You have %d login attempts left\n" - msgstr "Zbývá Vám %d pokusů o pÅ™ihlášení\n" - --#: lib/ncplib.c:3827 -+#: lib/ncplib.c:3875 - msgid "Error in ncp_request\n" - msgstr "Chyba v ncp_request\n" - --#: lib/ncplib.c:3833 -+#: lib/ncplib.c:3881 - msgid "Fragment too short\n" - msgstr "PříliÅ¡ krátký fragment\n" - --#: lib/ncplib.c:3851 -+#: lib/ncplib.c:3899 - #, c-format - msgid "Fragment too large, len=%d, max=%d\n" - msgstr "PříliÅ¡ velký fragment, len=%d, max=%d\n" - --#: lib/ncplib.c:3864 -+#: lib/ncplib.c:3912 - msgid "Why next fragment?\n" - msgstr "ProÄ další fragment?\n" - --#: lib/ncplib.c:3870 -+#: lib/ncplib.c:3918 - msgid "Fragmented\n" - msgstr "Fragmentováno\n" - --#: lib/ncplib.c:3874 -+#: lib/ncplib.c:3922 - #, c-format - msgid "InBufLen after request=%d, FirstReply=%d\n" - msgstr "InBufLen po žádosti=%d, FirstReply=%d\n" - --#: lib/ncplib.c:3879 -+#: lib/ncplib.c:3927 - #, c-format - msgid "NDS error %d\n" - msgstr "NDS chyba: %d\n" - --#: lib/filemgmt.c:127 -+#: lib/filemgmt.c:131 - #, c-format - msgid "ncpfs: volume name too long: %d\n" - msgstr "ncpfs: jméno svazku je příliÅ¡ dlouhé: %d\n" - --#: lib/ndslib.c:1401 -+#: lib/ndslib.c:1402 - #, c-format - msgid "" - "User %s not found in current context.\n" -@@ -311,282 +311,208 @@ msgstr "" - "Uživatel %s nebyl nalezen v aktuálním kontextu.\n" - "Zkouším kontext serveru...\n" - --#: lib/ndslib.c:1423 -+#: lib/ndslib.c:1424 - #, c-format - msgid "error %d logging in\n" - msgstr "chyba %d pÅ™i pÅ™ihlaÅ¡ování\n" - --#: lib/ndslib.c:1431 -+#: lib/ndslib.c:1432 - #, c-format - msgid "error %d authenticating\n" - msgstr "chyba %d pÅ™i authentikaci\n" - --#. keep list sorted! Maybe I'll use bsearch someday --#. -301 - #: lib/strops.c:65 - msgid "Not enough memory" - msgstr "Nedostatek pamÄ›ti" - --#. -302 - #: lib/strops.c:67 - msgid "Bad key passed to NWDS{Get|Set}Context" - msgstr "Chybný klÃ­Ä pÅ™edaný do NWDS{Get|Set}Context" - --#. -303 - #: lib/strops.c:69 - msgid "Invalid context handle" - msgstr "Chybné handle kontextu" - --#. -304 - #: lib/strops.c:71 - msgid "Buffer full" - msgstr "Buffer pÅ™eplnÄ›n" - --#. ... --#. -306 - #: lib/strops.c:74 - msgid "Bad syntax" - msgstr "Chybná syntaxe" - --#. -307 - #: lib/strops.c:76 - msgid "Buffer empty" - msgstr "Buffer je prázdný" - --#. Buffer underflow? Buffer exhausted? --#. -308 - #: lib/strops.c:78 - msgid "Bad verb" - msgstr "Chybný povel" - --#. -309 - #: lib/strops.c:80 - msgid "Expected identifier" - msgstr "OÄekávám jméno" - --#. ... --#. -311 - #: lib/strops.c:83 - msgid "Attribute type expected" - msgstr "OÄekávám typ atributu" - --#. -312 - #: lib/strops.c:85 - msgid "Attribute type not expected" - msgstr "NeoÄekávaný typ atributu" - --#. -313 - #: lib/strops.c:87 - msgid "Filter tree empty" - msgstr "Filtr je prázdný" - --#. -314 - #: lib/strops.c:89 - msgid "Invalid object name" - msgstr "Chybné jméno objektu" - --#. -315 - #: lib/strops.c:91 - msgid "Expected RDN delimiter" - msgstr "OÄekávám oddÄ›lovaÄ RDN" - --#. -316 - #: lib/strops.c:93 - msgid "Too many tokens" - msgstr "PříliÅ¡ mnoho Äástí" - --#. -317 - #: lib/strops.c:95 - msgid "Inconsistent multiava" - msgstr "Nekonzistentní vícehodnotové pojmenování" - --#. multi attribute value?! --#. -318 - #: lib/strops.c:97 - msgid "Country name too long" - msgstr "Jméno státu je příliÅ¡ dlouhé" - --#. -319 - #: lib/strops.c:99 - msgid "System error" - msgstr "Chyba systému" - --#. ... --#. -322 - #: lib/strops.c:102 - msgid "Invalid iteration handle" - msgstr "Chybné iteraÄní handle" - --#. -323 - #: lib/strops.c:104 - msgid "Empty buffer passed to API" - msgstr "Prázdný buffer pÅ™edaný funkci" - --#. ... --#. -328 - #: lib/strops.c:107 - msgid "Cannot create context" - msgstr "Nemohu vytvoÅ™it kontext" - --#. ... --#. -330 - #: lib/strops.c:110 - msgid "Invalid server response" - msgstr "Chybná odpovÄ›Ä serveru" - --#. -331 - #: lib/strops.c:112 - msgid "NULL pointer seen" - msgstr "Ukazatel NULL" - --#. ... --#. -333 - #: lib/strops.c:115 - msgid "No connection exists" - msgstr "Žádné spojení neexistuje" - --#. -334 - #: lib/strops.c:117 - msgid "RDN too long" - msgstr "Relativní jméno je příliÅ¡ dlouhé" - --#. -335 - #: lib/strops.c:119 - msgid "Duplicate type" - msgstr "Duplikátní typ" - --#. ... --#. -337 - #: lib/strops.c:122 - msgid "Not logged in" - msgstr "NepÅ™ihlášen" - --#. -338 - #: lib/strops.c:124 - msgid "Invalid password characters" - msgstr "Chybné znaky v hesle" - --#. ... --#. -340 - #: lib/strops.c:127 - msgid "Bad transport" - msgstr "Chybný typ pÅ™enosu" - --#. -341 - #: lib/strops.c:129 - msgid "No such syntax" - msgstr "Neexistující syntaxe" - --#. -342 - #: lib/strops.c:131 - msgid "Invalid DS name" - msgstr "Chybné jméno v DS" - --#. ... --#. -348 - #: lib/strops.c:134 - msgid "Required unicode translation not available" - msgstr "Požadovaný pÅ™evod z unicode není možný" - --#. ... --#. -353 - #: lib/strops.c:137 - msgid "DN too long" - msgstr "Jméno je příliÅ¡ dlouhé" - --#. -354 - #: lib/strops.c:139 - msgid "Rename not allowed" - msgstr "PÅ™ejmenování není povoleno" - --#. ... --#. -601 - #: lib/strops.c:142 - msgid "No such entry" - msgstr "Neexistující objekt" - --#. ... --#. -603 - #: lib/strops.c:145 - msgid "No such attribute" - msgstr "Neexistující attribut" - --#. ... --#. -625 - #: lib/strops.c:148 - msgid "Transport failure" - msgstr "Selhání pÅ™enosu" - --#. -626 - #: lib/strops.c:150 - msgid "All referrals failed" - msgstr "VÅ¡echny odkazy selhaly" - --#. ... --#. -634 - #: lib/strops.c:153 - msgid "No referrals" - msgstr "Neexistují odkazy" - --#. -635 - #: lib/strops.c:155 - msgid "Remote failure" - msgstr "Vzdálen selhání" - --#. -636 - #: lib/strops.c:157 - msgid "Unreachable server" - msgstr "Nedostupný server" - --#. ... --#. -641 - #: lib/strops.c:160 - msgid "Invalid request" - msgstr "Nesrozumitelný požadavek" - --#. ... --#. -656 - #: lib/strops.c:163 - msgid "Crucial replica" - msgstr "Podstatná replika" - --#. ... --#. -659 - #: lib/strops.c:166 - msgid "Time not synchronized" - msgstr "ÄŒas není synchronizován" - --#. ... --#. -669 - #: lib/strops.c:169 - msgid "Invalid password" - msgstr "Chybné heslo" - --#. ... --#. -681 - #: lib/strops.c:172 - msgid "Alias of an alias" - msgstr "Alias aliasu" - --#. ... --#. -683 - #: lib/strops.c:175 - msgid "Invalid API version" - msgstr "Chybná verze API" - --#. -684 - #: lib/strops.c:177 - msgid "Packet signatures required" - msgstr "Vyžadovány signatury paketů" - --#. ... --#. -700 - #: lib/strops.c:180 - msgid "Obsolete API" - msgstr "Zastaralé API" - --#. ... --#. -707 - #: lib/strops.c:183 - msgid "Invalid signature" - msgstr "Chybná signatura" -@@ -595,33 +521,26 @@ msgid "Unknown NDS error" - msgid "Unknown NDS error" - msgstr "Neznámá chyba NDS" - --#. keep list sorted! Maybe I'll use bsearch someday --#. 8701 - #: lib/strops.c:209 - msgid "Invalid file mode" - msgstr "Chybná přístupová práva" - --#. 8702 - #: lib/strops.c:211 - msgid "Information not known" - msgstr "Informace není dostupná" - --#. 8703 - #: lib/strops.c:213 - msgid "Namespace information format is not valid" - msgstr "Formát informací o namespace není platný" - --#. 8704 - #: lib/strops.c:215 - msgid "Referral needed" - msgstr "Je tÅ™eba odkaz" - --#. 8705 - #: lib/strops.c:217 - msgid "Permanent connection broken" - msgstr "Trvalé spojení pÅ™eruÅ¡eno" - --#. 8706 - #: lib/strops.c:219 - msgid "Password required" - msgstr "Vyžadováno heslo" -@@ -630,83 +549,58 @@ msgid "Unknown ncpfs error" - msgid "Unknown ncpfs error" - msgstr "Neznámá chyba ncpfs" - --#. keep list sorted! Maybe I'll use bsearch someday --#. 880C - #: lib/strops.c:245 - msgid "Too many request/reply fragments" - msgstr "PříliÅ¡ mnoho fragmentů" - --#. ... --#. 880E - #: lib/strops.c:248 - msgid "Server reply too long" - msgstr "OdpovÄ›Ä serveru je příliÅ¡ dlouhá" - --#. 880F - #: lib/strops.c:250 - msgid "Connection to specified server does not exist" - msgstr "Spojení na uvedený server neexistuje" - --#. ... --#. 8812 - #: lib/strops.c:253 - msgid "Scan complete" - msgstr "Hledání ukonÄeno" - --#. 8813 - #: lib/strops.c:255 - msgid "Unsupported name format type" - msgstr "Nepodporovaný typ jména" - --#. ... --#. 8816 - #: lib/strops.c:258 - msgid "Invalid NCP packet length" - msgstr "Chybná délka NCP rámce" - --#. ... --#. 8833 - #: lib/strops.c:261 - msgid "Invalid buffer length" - msgstr "Chybná délka bufferu" - --#. 8834 - #: lib/strops.c:263 - msgid "User name is not specified" - msgstr "Uživatelské jméno nebylo uvedeno" - --#. ... --#. 8836 - #: lib/strops.c:266 - msgid "Invalid parameter" - msgstr "Chybný parametr" - --#. ... --#. 8847 - #: lib/strops.c:269 - msgid "Server not found" - msgstr "Server nenalezen" - --#. ... --#. 8861 - #: lib/strops.c:272 - msgid "Signature level conflict" - msgstr "Konflikt v úrovni podepisování rámců" - --#. ... --#. 886B - #: lib/strops.c:275 - msgid "Invalid information level" - msgstr "Chybná informaÄní úroveň" - --#. ... --#. 8870 - #: lib/strops.c:278 - msgid "Unsupported transport type" - msgstr "Nepodporovaný typ spojení" - --#. ... --#. 8873 - #: lib/strops.c:281 - msgid "Unsupported authenticator" - msgstr "Nepodporovaný typ autorizace" -@@ -715,101 +609,74 @@ msgid "Unknown Requester error" - msgid "Unknown Requester error" - msgstr "Neznámá chyba žadatele" - --#. keep list sorted! Maybe I'll use bsearch someday --#. 8998 - #: lib/strops.c:307 - msgid "Invalid volume" - msgstr "Chybný svazek" - --#. ... --#. 899B - #: lib/strops.c:310 - msgid "Invalid directory handle" - msgstr "Chybné handle adresáře" - --#. ... --#. 89C5 - #: lib/strops.c:313 - msgid "Intruder detection lockout" - msgstr "Detekován pokus o prolomení hesla" - --#. ... --#. 89D5 - #: lib/strops.c:316 - msgid "No job in queue" - msgstr "Ve frontÄ› není žádná úloha" - --#. 89D6 - #: lib/strops.c:318 - msgid "Password unencrypted" - msgstr "Nekryptované heslo" - --#. 89D7 - #: lib/strops.c:320 - msgid "Password not unique" - msgstr "Heslo není unikátní" - --#. 89D8 - #: lib/strops.c:322 - msgid "Password too short" - msgstr "Heslo je příliÅ¡ krátké" - --#. 89D9 - #: lib/strops.c:324 - msgid "Connection limit count exceeded" - msgstr "PÅ™ekroÄen povolený poÄet pÅ™ipojení" - --#. 89DA - #: lib/strops.c:326 - msgid "Unauthorized time" - msgstr "Nedovolený Äas" - --#. 89DB - #: lib/strops.c:328 - msgid "Unauthorized station" - msgstr "Neautorizovaná stanice" - --#. 89DC - #: lib/strops.c:330 - msgid "Account disabled" - msgstr "ÚÄet zakázán" - --#. ... --#. 89DE - #: lib/strops.c:333 - msgid "Password really expired" - msgstr "VaÅ¡e heslo opravdu vyprÅ¡elo" - --#. no grace logins left --#. 89DF - #: lib/strops.c:335 - msgid "Password expired" - msgstr "VaÅ¡e heslo vyprÅ¡elo" - --#. ... --#. 89E9 - #: lib/strops.c:338 - msgid "Member already exists" - msgstr "Již je Älenem" - --#. ... --#. 89FB - #: lib/strops.c:341 - msgid "NCP not supported" - msgstr "NCP není podporováno" - --#. 89FC - #: lib/strops.c:343 - msgid "Unknown user" - msgstr "Neznámý uživatel" - --#. 89FD - #: lib/strops.c:345 - msgid "Invalid connection number" - msgstr "Chybné Äíslo pÅ™ipojení" - --#. ... --#. 89FF - #: lib/strops.c:348 - msgid "Server failure" - msgstr "Selhání serveru" -@@ -823,89 +690,89 @@ msgid "Unknown error %d (0x%X)" - msgid "Unknown error %d (0x%X)" - msgstr "Neznámá chyba %d (0x%X)" - --#: sutil/ncpmount.c:137 -+#: sutil/ncpmount.c:139 - #, c-format - msgid "Specified tree name `%s' is too long\n" - msgstr "Uvedené jméno stromu `%s' je příliÅ¡ dlouhé\n" - --#: sutil/ncpmount.c:293 sutil/ncplogin.c:457 -+#: sutil/ncpmount.c:295 sutil/ncplogin.c:463 - #, c-format - msgid "Unknown namespace \"%s\"\n" - msgstr "Neznámé namespace \"%s\"\n" - --#: sutil/ncpmount.c:332 sutil/ncplogin.c:499 -+#: sutil/ncpmount.c:334 sutil/ncplogin.c:505 - #, c-format - msgid "ncpfs version %s\n" - msgstr "ncpfs verze %s\n" - --#: sutil/ncpmount.c:349 -+#: sutil/ncpmount.c:351 - msgid "Both tree and server name were specified. It is not allowed.\n" - msgstr "Jak strom tak server byly specifikovány. To není povoleno.\n" - --#: sutil/ncpmount.c:353 sutil/ncpumount.c:428 sutil/ncplogin.c:343 -+#: sutil/ncpmount.c:355 sutil/ncpumount.c:428 sutil/ncplogin.c:349 - #, c-format - msgid "%s must be installed suid root\n" - msgstr "%s musí být nainstalován suid root\n" - --#: sutil/ncpmount.c:364 sutil/ncplogin.c:705 -+#: sutil/ncpmount.c:366 sutil/ncplogin.c:711 - #, c-format - msgid "Could not find mount point %s: %s\n" - msgstr "Nemohu najít místo k pÅ™ipojení %s: %s\n" - --#: sutil/ncpmount.c:369 -+#: sutil/ncpmount.c:371 - #, c-format - msgid "Cannot to mount on %s: %s\n" - msgstr "Nemohu pÅ™ipojit na %s: %s\n" - --#: sutil/ncpmount.c:377 sutil/ncplogin.c:525 -+#: sutil/ncpmount.c:379 sutil/ncplogin.c:531 - #, c-format - msgid "Cannot impersonate as requested: %s\n" - msgstr "Nemohu zmÄ›nit identitu: %s\n" - --#: sutil/ncpmount.c:387 -+#: sutil/ncpmount.c:389 - msgid "You must specify NDS volume name if you specified tree name.\n" - msgstr "Když jste uvedli jméno stromu, musíte také uvést NDS jméno svazku.\n" - --#: sutil/ncpmount.c:391 sutil/ncpmount.c:453 -+#: sutil/ncpmount.c:393 sutil/ncpmount.c:458 - msgid "in create context" - msgstr "ve vytváření kontextu" - --#: sutil/ncpmount.c:403 -+#: sutil/ncpmount.c:405 - msgid "in tree search" - msgstr "v hledání stromu" - --#: sutil/ncpmount.c:410 sutil/ncpmount.c:628 -+#: sutil/ncpmount.c:412 sutil/ncpmount.c:644 - msgid "in nds login" - msgstr "pÅ™i NDS pÅ™ihlaÅ¡ování" - --#: sutil/ncpmount.c:420 -+#: sutil/ncpmount.c:422 - msgid "in volume search" - msgstr "v hledání svazku" - --#: sutil/ncpmount.c:437 sutil/ncplogin.c:176 -+#: sutil/ncpmount.c:441 sutil/ncplogin.c:180 - #, c-format - msgid "Volume path `%s' is invalid: `%s'\n" - msgstr "Cesta `%s' je neplatná: `%s'\n" - --#: sutil/ncpmount.c:445 sutil/ncplogin.c:184 -+#: sutil/ncpmount.c:450 sutil/ncplogin.c:190 - #, c-format - msgid "Volume name `%s' is too long\n" - msgstr "Jméno svazku `%s' je příliÅ¡ dlouhé\n" - --#: sutil/ncpmount.c:462 -+#: sutil/ncpmount.c:467 - #, c-format - msgid "opening mount %s" - msgstr "otevírá se pÅ™ipojení %s" - --#: sutil/ncpmount.c:470 -+#: sutil/ncpmount.c:475 - msgid "retrieving user name" - msgstr "vyhledává se uživateslké jméno" - --#: sutil/ncpmount.c:482 sutil/ncplogin.c:723 -+#: sutil/ncpmount.c:487 sutil/ncplogin.c:729 - msgid "in find_conn_spec" - msgstr "v find_conn_spec" - --#: sutil/ncpmount.c:524 sutil/ncpmount.c:562 -+#: sutil/ncpmount.c:529 sutil/ncpmount.c:569 - #, c-format - msgid "" - "You already have mounted server %s\n" -@@ -916,58 +783,63 @@ msgstr "" - "jste již jako uživatel %s\n" - "pÅ™ipojen v adresáři %s\n" - --#: sutil/ncpmount.c:541 sutil/ncplogin.c:766 -+#: sutil/ncpmount.c:546 sutil/ncplogin.c:772 - #, c-format - msgid "Get host address `%s': %s\n" - msgstr "ZjiÅ¡tÄ›ní adresy poÄítaÄe `%s': %s\n" - --#: sutil/ncpmount.c:573 sutil/ncplogin.c:783 sutil/ncplogin.c:791 -+#: sutil/ncpmount.c:580 sutil/ncplogin.c:791 sutil/ncplogin.c:799 - #, c-format - msgid "when trying to find %s" - msgstr "pÅ™i pokusu najít %s" - --#: sutil/ncpmount.c:600 -+#: sutil/ncpmount.c:602 sutil/ncplogin.c:816 sutil/ncplogin.c:836 -+#, c-format -+msgid "Cannot allocate memory for mtab entry: %s\n" -+msgstr "Nedostatek pamÄ›ti pro položku mtab: %s\n" -+ -+#: sutil/ncpmount.c:613 - msgid "in mount(2)" - msgstr "v mount(2)" - --#: sutil/ncpmount.c:620 -+#: sutil/ncpmount.c:636 - msgid "in authenticate connection" - msgstr "v ověřování pÅ™ipojení" - --#: sutil/ncpmount.c:629 sutil/ncplogin.c:872 -+#: sutil/ncpmount.c:645 sutil/ncplogin.c:869 - #, c-format - msgid "Login denied.\n" - msgstr "Přístup odepÅ™en.\n" - --#: sutil/ncpmount.c:652 sutil/ncplogin.c:889 -+#: sutil/ncpmount.c:669 sutil/ncplogin.c:887 - msgid "in login" - msgstr "pÅ™i pÅ™ihlaÅ¡ování" - --#: sutil/ncpmount.c:653 sutil/ncplogin.c:890 -+#: sutil/ncpmount.c:670 sutil/ncplogin.c:888 - #, c-format - msgid "Login denied\n" - msgstr "Přístup odepÅ™en\n" - --#: sutil/ncpmount.c:680 -+#: sutil/ncpmount.c:701 - msgid "in free context" - msgstr "ve volném kontextu" - --#: sutil/ncpmount.c:690 sutil/ncplogin.c:931 -+#: sutil/ncpmount.c:712 sutil/ncplogin.c:931 - #, c-format - msgid "Cannot access path \"%s\": %s\n" - msgstr "Nemohu pÅ™istupovat k \"%s\": %s\n" - --#: sutil/ncpmount.c:702 sutil/ncplogin.c:947 -+#: sutil/ncpmount.c:724 sutil/ncplogin.c:949 - #, c-format - msgid "usage: %s [options] mount-point\n" - msgstr "použití: %s [volby] adresář-k-pÅ™ipojení\n" - --#: sutil/ncpmount.c:703 sutil/ncplogin.c:951 -+#: sutil/ncpmount.c:725 sutil/ncplogin.c:953 - #, c-format - msgid "Try `%s -h' for more information\n" - msgstr "Zkuste `%s -h' k získání dalších informací\n" - --#: sutil/ncpmount.c:709 sutil/ncplogin.c:961 -+#: sutil/ncpmount.c:731 sutil/ncplogin.c:963 - #, c-format - msgid "" - "\n" -@@ -976,7 +848,7 @@ msgstr "" - "\n" - "použití: %s [volby] adresář-k-pÅ™ipojení\n" - --#: sutil/ncpmount.c:713 -+#: sutil/ncpmount.c:735 - #, c-format - msgid "" - "\n" -@@ -1035,11 +907,11 @@ msgstr "" - "-p codepage Kódová stránka použitá na svazku, vÄetnÄ› písmen `cp'\n" - "\n" - --#: sutil/ncpmount.c:742 -+#: sutil/ncpmount.c:764 - msgid "-b Force bindery login to NDS servers\n" - msgstr "-b Použij pÅ™ipojení pÅ™es bindery k NDS serverům\n" - --#: sutil/ncpmount.c:748 sutil/ncplogin.c:1003 -+#: sutil/ncpmount.c:770 sutil/ncplogin.c:1005 - msgid "" - "-i level Signature level, 0=never, 1=supported, 2=preferred, " - "3=required\n" -@@ -1047,7 +919,7 @@ msgstr "" - "-i level Podpisování rámců, 0=nikdy, 1=podporováno, 2=preferováno, " - "3=vyžadováno\n" - --#: sutil/ncpumount.c:83 sutil/ncplogin.c:949 util/ipx_probe.c:51 -+#: sutil/ncpumount.c:83 sutil/ncplogin.c:951 util/ipx_probe.c:51 - #: util/ipx_probe.c:61 util/nwauth.c:51 util/nwauth.c:58 util/nwbocreate.c:44 - #: util/nwbocreate.c:51 util/nwbols.c:49 util/nwboprops.c:39 - #: util/nwboprops.c:46 util/nwborm.c:39 util/nwbpadd.c:43 util/nwbpcreate.c:44 -@@ -1278,125 +1150,133 @@ msgid "%s: Server name too long\n" - msgid "%s: Server name too long\n" - msgstr "%s: Jméno serveru je příliÅ¡ dlouhé\n" - --#: sutil/nwsfind.c:153 util/nwauth.c:144 util/nwauth.c:150 -+#: sutil/nwsfind.c:153 util/nwauth.c:135 util/nwauth.c:141 - msgid "when trying to find server" - msgstr "pÅ™i pokusu najít server" - --#: sutil/ncplogin.c:205 -+#: sutil/ncplogin.c:174 -+msgid "Cannot allocate memory for path\n" -+msgstr "Nemohu alokovat paměť pro cestu\n" -+ -+#: sutil/ncplogin.c:211 - #, c-format - msgid "Context name `%s' is too long\n" - msgstr "Kontext `%s' je příliÅ¡ dlouhý\n" - --#: sutil/ncplogin.c:486 -+#: sutil/ncplogin.c:492 - #, c-format - msgid "invalid option: %c\n" - msgstr "chybná volba: %c\n" - --#: sutil/ncplogin.c:534 -+#: sutil/ncplogin.c:540 - msgid "You must specify a volume to mount using -V option.\n" - msgstr "Musíte uvést jméno svazku k pÅ™ipojení pomocí volby -V.\n" - --#: sutil/ncplogin.c:538 -+#: sutil/ncplogin.c:544 - msgid "Cannot have both -T tree and -S server options\n" - msgstr "Nemůžete použít zároveň volbu -T strom a -S server\n" - --#: sutil/ncplogin.c:545 -+#: sutil/ncplogin.c:551 - #, c-format - msgid "Unable to open connection to %s.\n" - msgstr "Nemohu otevřít spojení k %s.\n" - --#: sutil/ncplogin.c:550 -+#: sutil/ncplogin.c:556 - #, c-format - msgid "%s is not a NDS server, so background authentication will fail.\n" - msgstr "%s není NDS server takže pÅ™ipojení bez hesla není možné.\n" - --#: sutil/ncplogin.c:552 -+#: sutil/ncplogin.c:558 - #, c-format - msgid "%s is not a NDS server, so NDS authentication will fail.\n" - msgstr "%s není NDS server takže pÅ™ipojení NDS není možné.\n" - --#: sutil/ncplogin.c:558 sutil/ncplogin.c:591 -+#: sutil/ncplogin.c:564 sutil/ncplogin.c:597 - #, c-format - msgid "Cannot create NDS context handle: %s\n" - msgstr "Nemohu vytvoÅ™it ovladaÄ NDS kontextu: %s\n" - --#: sutil/ncplogin.c:563 -+#: sutil/ncplogin.c:569 - #, c-format - msgid "Server %s belong to tree %s and you are not authenticated to it.\n" - msgstr "Server %s patří ke stromu %s. K tomuto stromu nejste pÅ™ihlášeni.\n" - --#: sutil/ncplogin.c:568 -+#: sutil/ncplogin.c:574 - #, c-format - msgid "Server %s belong to tree %s and you are already authenticated to it.\n" - msgstr "Server %s patří ke stromu %s. K tomuto stromu jste již pÅ™ihlášeni.\n" - --#: sutil/ncplogin.c:596 -+#: sutil/ncplogin.c:602 - #, c-format - msgid "You are not authenticated to tree %s.\n" - msgstr "Nejste pÅ™ipojeni ke stromu %s.\n" - --#: sutil/ncplogin.c:601 -+#: sutil/ncplogin.c:607 - #, c-format - msgid "You are already authenticated to tree %s.\n" - msgstr "Již jste pÅ™ipojeni ke stromu %s.\n" - --#: sutil/ncplogin.c:613 -+#: sutil/ncplogin.c:619 - #, c-format - msgid "NWDSGetContext/NWDSSetContext (DCK_FLAGS) failed: %s.\n" - msgstr "NWDSGetContext/NWDSSetContext(DCK_FLAGS) selhal: %s.\n" - --#: sutil/ncplogin.c:622 -+#: sutil/ncplogin.c:628 - #, c-format - msgid "NWDSSetContext(DCK_NAME_CTX) failed: %s\n" - msgstr "NWDSSetContext(DCK_NAME_CTX) selhal: %s\n" - --#: sutil/ncplogin.c:633 -+#: sutil/ncplogin.c:639 - #, c-format - msgid "Cannot resolve volume name %s on tree %s (using context %s). Err:%s\n" - msgstr "" - "Nemohu vyhodnotit jméno svazku %s ve stromu %s (kontext %s). Chyba: %s\n" - --#: sutil/ncplogin.c:647 -+#: sutil/ncplogin.c:653 - #, c-format - msgid "Cannot attach to tree %s. Err:%s\n" - msgstr "Nemohu se pÅ™ipojit ke stromu %s: %s\n" - --#: sutil/ncplogin.c:653 -+#: sutil/ncplogin.c:659 - #, c-format - msgid "Cannot get server name from connection to tree %s. Err:%s\n" - msgstr "Nemohu zjistit jméno serveru ze spojení ke stromu %s: %s\n" - --#: sutil/ncplogin.c:671 -+#: sutil/ncplogin.c:677 - msgid "No user name found in cmd line nor in env\n" - msgstr "" - "Uživatelské jméno nebylo uvedeno na příkazové řádce, ani není v prostÅ™edí\n" - --#: sutil/ncplogin.c:696 -+#: sutil/ncplogin.c:702 - #, c-format - msgid "Could not autocreate mount point %s: %s\n" - msgstr "Nemohu vytvoÅ™it místo k pÅ™ipojení %s: %s\n" - --#: sutil/ncplogin.c:712 -+#: sutil/ncplogin.c:718 - #, c-format - msgid "Cannot mount on %s: %s\n" - msgstr "Nemohu pÅ™ipojit na %s: %s\n" - --#: sutil/ncplogin.c:841 --#, c-format --msgid "NWDSWhoAmi returned %s\n" --msgstr "NWDSWhoAmI vrátilo %s\n" -- --#. for TCL/tk to catch it --#: sutil/ncplogin.c:850 -+#: sutil/ncplogin.c:825 -+#, c-format -+msgid "Cannot retrieve user identity: %s\n" -+msgstr "Nemohu zjistit uživatelovu identitu: %s\n" -+ -+#: sutil/ncplogin.c:830 -+#, c-format -+msgid "Cannot parse user name: %s\n" -+msgstr "Nemohu rozpoznat jméno uživatele: %s\n" -+ -+#: sutil/ncplogin.c:845 - #, c-format - msgid "already mounted:%s\n" - msgstr "již pÅ™ipojeno:%s\n" - --#: sutil/ncplogin.c:852 -+#: sutil/ncplogin.c:847 - msgid "failed in mount(2)" - msgstr "chyba v mount(2)" - --#: sutil/ncplogin.c:871 -+#: sutil/ncplogin.c:868 - msgid "failed in nds login" - msgstr "chyba pÅ™i NDS pÅ™ihlaÅ¡ování" - -@@ -1410,14 +1290,14 @@ msgid "Cannot authenticate connection: % - msgid "Cannot authenticate connection: %s\n" - msgstr "Nemohu authentikovat spojení: %s\n" - --#: sutil/ncplogin.c:939 -+#: sutil/ncplogin.c:941 - #, c-format - msgid "mounted on:%s\n" - msgstr "pÅ™ipojeno na:%s\n" - --#: sutil/ncplogin.c:964 util/ncptest.c:317 util/nwborm.c:45 -+#: sutil/ncplogin.c:966 util/ncptest.c:317 util/nwborm.c:45 - #: util/nwbpcreate.c:50 util/nwbprm.c:46 util/nwbpvalues.c:58 --#: util/nwfsinfo.c:51 util/nwfstime.c:52 util/nwpasswd.c:45 -+#: util/nwfsinfo.c:51 util/nwfstime.c:52 util/nwpasswd.c:45 util/nwpjmv.c:67 - #: util/nwtrustee.c:48 util/nwuserlist.c:80 util/nwvolinfo.c:47 - #: util/pserver.c:65 - #, c-format -@@ -1428,11 +1308,11 @@ msgstr "" - "\n" - "použití: %s [volby]\n" - --#: sutil/ncplogin.c:968 -+#: sutil/ncplogin.c:970 - msgid " mount_point is optional if -a option specified\n" - msgstr " místo pÅ™ipojení je volitelné pokud je specifikováno -a\n" - --#: sutil/ncplogin.c:972 -+#: sutil/ncplogin.c:974 - #, c-format - msgid "" - "\n" -@@ -1449,7 +1329,7 @@ msgstr "" - "-X name_ctx Defaultní kontext\n" - "-E Zobraz kde byl svazek pÅ™ipojen\n" - --#: sutil/ncplogin.c:982 -+#: sutil/ncplogin.c:984 - #, c-format - msgid "" - "\n" -@@ -1476,7 +1356,7 @@ msgstr "" - " Pokud není uvedeno ani -P ani -n, budete vyzváni ke vložení\n" - " hesla.\n" - --#: sutil/ncplogin.c:995 -+#: sutil/ncplogin.c:997 - #, c-format - msgid "" - "\n" -@@ -1491,13 +1371,13 @@ msgstr "" - " nebo jméno NDS objektu pokud je použito -T\n" - "-R path Cesta na svazku která má být pÅ™ipojena\n" - --#: sutil/ncplogin.c:1008 -+#: sutil/ncplogin.c:1010 - msgid "" - "-a Autocreate mounting point if needed in ~/ncp/SERVER/VOLUME\n" - msgstr "" - "-a Automaticky vytvoÅ™ místo pÅ™ipojení v ~/ncp/SERVER/VOLUME\n" - --#: sutil/ncplogin.c:1012 -+#: sutil/ncplogin.c:1014 - #, c-format - msgid "" - "\n" -@@ -1548,142 +1428,153 @@ msgid "Cannot convert kernel release \"% - msgid "Cannot convert kernel release \"%s\" to number\n" - msgstr "Nemohu pÅ™evést verzi jádra \"%s\" na Äíslo\n" - --#: sutil/ncpm_common.c:450 sutil/ncpm_common.c:495 -+#: sutil/ncpm_common.c:392 sutil/ncpm_common.c:405 sutil/ncpm_common.c:606 -+#: sutil/ncpm_common.c:1466 sutil/ncpm_common.c:1737 -+#, c-format -+msgid "Cannot relinquish superuser rights: %s\n" -+msgstr "Nemohu odevzdat superuživatelská práva: %s\n" -+ -+#: sutil/ncpm_common.c:498 sutil/ncpm_common.c:543 - #, c-format - msgid "Could not create pipe: %s\n" - msgstr "Nemohu vytvoÅ™it rouru: %s\n" - --#: sutil/ncpm_common.c:454 sutil/ncpm_common.c:501 -+#: sutil/ncpm_common.c:502 sutil/ncpm_common.c:549 - #, c-format - msgid "Could not fork: %s\n" - msgstr "Nemohu spustit proces: %s\n" - --#: sutil/ncpm_common.c:614 -+#: sutil/ncpm_common.c:669 - #, c-format - msgid "Unsupported mount protocol version %d\n" - msgstr "Nepodporovaná verze protokolu mount %d\n" - --#: sutil/ncpm_common.c:664 -+#: sutil/ncpm_common.c:726 - msgid "" - "Remote directory is specified but kernel does not support subdir mounts\n" - msgstr "" - "Je specifikován adresář na serveru, ale jádro nepodporuje pÅ™ipojování " - "adresářů\n" - --#: sutil/ncpm_common.c:667 -+#: sutil/ncpm_common.c:729 - msgid "" - "Remote directory is specified but ncpmount does not support subdir mounts\n" - msgstr "" - "Je specifikován adresář na serveru, ale ncpmount v této konfiguraci " - "nepodporuje pÅ™ipojování adresářů\n" - --#: sutil/ncpm_common.c:1367 -+#: sutil/ncpm_common.c:1439 sutil/ncpm_common.c:1722 -+#, c-format -+msgid "Cannot switch to superuser: %s\n" -+msgstr "Nemohu se pÅ™epnout do superuživatelského režimu: %s\n" -+ -+#: sutil/ncpm_common.c:1443 - #, c-format - msgid "Can't get %s~ lock file\n" - msgstr "Nemohu vytvoÅ™it zamykací soubor %s~\n" - --#: sutil/ncpm_common.c:1373 -+#: sutil/ncpm_common.c:1449 - #, c-format - msgid "Can't open %s\n" - msgstr "Nemohu otevřít %s\n" - --#: sutil/ncpm_common.c:1377 -+#: sutil/ncpm_common.c:1453 - msgid "Can't write mount entry\n" - msgstr "Nemohu zapsat položku o pÅ™ipojení\n" - --#: sutil/ncpm_common.c:1381 -+#: sutil/ncpm_common.c:1457 - #, c-format - msgid "Can't set perms on %s\n" - msgstr "Nemohu nastavit přístupová práva k %s\n" - --#: sutil/ncpm_common.c:1387 -+#: sutil/ncpm_common.c:1463 - #, c-format - msgid "Can't remove %s~\n" - msgstr "Nemohu odstranit %s~\n" - --#: sutil/ncpm_common.c:1405 -+#: sutil/ncpm_common.c:1484 - #, c-format - msgid "Value `%s' for option `%s' is not a number\n" - msgstr "Hodnota `%s' pro volbu `%s' není Äíslo\n" - --#: sutil/ncpm_common.c:1409 -+#: sutil/ncpm_common.c:1488 - #, c-format - msgid "Ignoring unneeded value for option `%s'\n" - msgstr "Ignoruji nepotÅ™ebnou hodnotu pro volbu `%s'\n" - --#: sutil/ncpm_common.c:1414 -+#: sutil/ncpm_common.c:1493 - #, c-format - msgid "Required parameter for option `%s' missing\n" - msgstr "Není uvedena povinná hodnota pro volbu `%s'\n" - --#: sutil/ncpm_common.c:1438 -+#: sutil/ncpm_common.c:1517 - msgid "You are not allowed to clear nosuid and nodev flags\n" - msgstr "Nemáte právo nastavit vyÄistit nosuid a nodev flagy\n" - --#: sutil/ncpm_common.c:1448 -+#: sutil/ncpm_common.c:1527 - msgid "You are not allowed to clear noexec flag\n" - msgstr "Nemáte právo nastavit vyÄistit noexec flag\n" - --#: sutil/ncpm_common.c:1454 -+#: sutil/ncpm_common.c:1533 - msgid "Remounting not supported, sorry\n" - msgstr "Lituji, ale remount není podporováno\n" - --#: sutil/ncpm_common.c:1463 -+#: sutil/ncpm_common.c:1542 - msgid "Timeout must be between 1 and 900 secs inclusive\n" - msgstr "Timeout musí být mezi 1 a 900 sec vÄetnÄ›\n" - --#: sutil/ncpm_common.c:1470 -+#: sutil/ncpm_common.c:1549 - msgid "Retry count must be between 1 and 65536 inclusive\n" - msgstr "PoÄet opakování musí být mezi 1 a 65536 vÄetnÄ›\n" - --#: sutil/ncpm_common.c:1501 -+#: sutil/ncpm_common.c:1580 - #, c-format - msgid "Specified server name `%s' is too long\n" - msgstr "Uvedené jméno serveru `%s' je příliÅ¡ dlouhé\n" - --#: sutil/ncpm_common.c:1512 -+#: sutil/ncpm_common.c:1591 - #, c-format - msgid "NCP signature level must be number between 0 and 3. You specified %u\n" - msgstr "NCP signature level musí být mezi 0 a 3 vÄetnÄ›. Bylo požadováno %u\n" - --#: sutil/ncpm_common.c:1519 -+#: sutil/ncpm_common.c:1598 - #, c-format - msgid "NCP cache time to live must be less than 20000 ms. You specified %u\n" - msgstr "" - "NCP cache time to live musí být kratší než 20000 ms. Bylo požadováno %u\n" - --#: sutil/ncpm_common.c:1529 -+#: sutil/ncpm_common.c:1608 - #, c-format - msgid "File mode `%s' is not valid octal number\n" - msgstr "" - "Požadovaná přístupová práva k souborům `%s' není platné osmiÄkové Äíslo\n" - --#: sutil/ncpm_common.c:1538 -+#: sutil/ncpm_common.c:1617 - #, c-format - msgid "Directory mode `%s' is not valid octal number\n" - msgstr "" - "Požadovaná přístupová práva k adresářům `%s' není platné osmiÄkové Äislo\n" - --#: sutil/ncpm_common.c:1544 -+#: sutil/ncpm_common.c:1623 - #, c-format - msgid "I/O charset name `%s' is too long\n" - msgstr "Název V/V kódování `%s' je příliÅ¡ dlouhý\n" - --#: sutil/ncpm_common.c:1551 -+#: sutil/ncpm_common.c:1630 - #, c-format - msgid "Codepage name `%s' is too long\n" - msgstr "Název kódové stránky `%s' je příliÅ¡ dlouhý\n" - --#: sutil/ncpm_common.c:1626 -+#: sutil/ncpm_common.c:1705 - #, c-format - msgid "Unknown option `%s', ignoring it\n" - msgstr "Neznámá volba `%s', ignoruji ji\n" - --#: sutil/ncpm_common.c:1635 -+#: sutil/ncpm_common.c:1714 - msgid "attempt to open mount point" - msgstr "pokusu otevřít pÅ™ipojený adresář" - --#: sutil/ncpm_common.c:1655 -+#: sutil/ncpm_common.c:1742 - #, c-format - msgid "" - "Your kernel does not support character mapping. You should upgrade to latest " -@@ -1692,11 +1583,11 @@ msgstr "" - "Toto jádro nepodporuje konverzi znaků. Pro správnou funkci je potÅ™eba " - "provést upgrade jádra.\n" - --#: sutil/ncpm_common.c:1657 -+#: sutil/ncpm_common.c:1744 - msgid "Warning: Unable to load NLS charsets" - msgstr "Pozor: Nemohu nahrát pÅ™ekladové tabulky NLS" - --#: sutil/ncpm_common.c:1664 -+#: sutil/ncpm_common.c:1751 - #, c-format - msgid "" - "Your kernel does not support filename caching. You should upgrade to latest " -@@ -1705,39 +1596,39 @@ msgstr "" - "Toto jádro nepodporuje cacheování adresářů. Pro správnou funkci je potÅ™eba " - "provést upgrade jádra.\n" - --#: sutil/ncpm_common.c:1666 -+#: sutil/ncpm_common.c:1753 - #, c-format - msgid "Warning: Cannot enable filename caching: %s\n" - msgstr "Pozor: Nemohu povolit cacheování jmen: %s\n" - --#: sutil/ncpm_common.c:1678 -+#: sutil/ncpm_common.c:1765 - #, c-format - msgid "Unable to negotiate requested security level: %s\n" - msgstr "Nepovedlo se dohodnout na podpisování rámců: %s\n" - --#: sutil/ncpm_common.c:1694 sutil/ncpm_common.c:1717 sutil/ncpm_common.c:1737 -+#: sutil/ncpm_common.c:1781 sutil/ncpm_common.c:1804 sutil/ncpm_common.c:1824 - msgid "opening ncp_socket" - msgstr "otevírání NCP socketu" - --#: sutil/ncpm_common.c:1710 sutil/ncpm_common.c:1730 -+#: sutil/ncpm_common.c:1797 sutil/ncpm_common.c:1817 - msgid "Invalid transport requested" - msgstr "Požadován neznámý způsob pÅ™enosu" - --#: sutil/ncpm_common.c:1743 -+#: sutil/ncpm_common.c:1830 - #, c-format - msgid "%s: Could not open wdog socket: %s\n" - msgstr "%s: Nemohu otevřít sledovací spojení: %s\n" - --#: sutil/ncpm_common.c:1754 -+#: sutil/ncpm_common.c:1841 - msgid "No transport available\n" - msgstr "V této konfiguraci není k dispozici žádný způsob síťového pÅ™ipojení\n" - --#: sutil/ncpm_common.c:1759 -+#: sutil/ncpm_common.c:1846 - #, c-format - msgid "bind failed: %s\n" - msgstr "bind selhal: %s\n" - --#: sutil/ncpm_common.c:1761 -+#: sutil/ncpm_common.c:1848 - #, c-format - msgid "" - "\n" -@@ -1751,26 +1642,26 @@ msgstr "" - "ipx_configure --auto_interface=on --auto_primary=on\n" - "a zkusit to po chvíli znovu.\n" - --#: sutil/ncpm_common.c:1774 -+#: sutil/ncpm_common.c:1861 - msgid "getsockname ncp socketfailed" - msgstr "getsockname() selhalo" - --#: sutil/ncpm_common.c:1783 -+#: sutil/ncpm_common.c:1870 - #, c-format - msgid "bind(wdog_sock, ): %s\n" - msgstr "bind() selhal: %s\n" - --#: sutil/ncpm_common.c:1791 -+#: sutil/ncpm_common.c:1878 - #, c-format - msgid "Could not open message socket: %s\n" - msgstr "Nemohu otevřít spojení pro zprávy: %s\n" - --#: sutil/ncpm_common.c:1799 -+#: sutil/ncpm_common.c:1886 - #, c-format - msgid "bind(message_sock, ): %s\n" - msgstr "bind() selhal: %s\n" - --#: sutil/ncpm_common.c:1808 -+#: sutil/ncpm_common.c:1895 - #, c-format - msgid "connect(ncp_fd, ): %s\n" - msgstr "connect() selhal: %s\n" -@@ -1788,8 +1679,8 @@ msgid "Cannot retrieve password from fil - msgid "Cannot retrieve password from file descriptor\n" - msgstr "Nemohu pÅ™eÄíst heslo z popisovaÄe souboru\n" - --#: sutil/mount_login.c:97 util/nwauth.c:160 util/nwauth.c:169 --#: util/nwpasswd.c:141 util/nwpasswd.c:149 util/nwpasswd.c:157 -+#: sutil/mount_login.c:97 util/nwauth.c:151 util/nwauth.c:160 -+#: util/nwpasswd.c:143 util/nwpasswd.c:151 util/nwpasswd.c:159 - #, c-format - msgid "Password too long\n" - msgstr "Heslo je příliÅ¡ dlouhé\n" -@@ -1956,7 +1847,7 @@ msgid " %s [-vmMnppt] [-s amt] -r - msgid " %s [-vmMnppt] [-s amt] -r sourcedir directory\n" - msgstr " %s [-vmMnppt] [-s amt] -r zdrojový-adresář cílový-adresář\n" - --#: util/ncopy.c:157 util/ncopy.c:874 -+#: util/ncopy.c:157 util/ncopy.c:877 - msgid "not a directory" - msgstr "není adresářem" - -@@ -1975,8 +1866,7 @@ msgid "%s: No destination specified.\n" - msgid "%s: No destination specified.\n" - msgstr "%s: Nebyl uveden cíl.\n" - --#. last arg MUST be dir --#: util/ncopy.c:250 util/ncopy.c:874 -+#: util/ncopy.c:250 util/ncopy.c:877 - #, c-format - msgid "%s: %s: %s\n" - msgstr "%s: %s: %s\n" -@@ -2041,40 +1931,36 @@ msgid "%s: Unable to open destination fi - msgid "%s: Unable to open destination file: %s\n" - msgstr "%s: Nemohu otevřít cílový soubor: %s\n" - --#: util/ncopy.c:552 -+#: util/ncopy.c:555 - msgid "NetWare copy" - msgstr "NetWare copy" - --#: util/ncopy.c:558 util/ncopy.c:566 -+#: util/ncopy.c:561 util/ncopy.c:569 - #, c-format - msgid "%s: Close failed for %s\n" - msgstr "%s: Nepovedlo se uzavřít %s\n" - --#. it is not fatal... it is user problem... --#: util/ncopy.c:590 -+#: util/ncopy.c:593 - #, c-format - msgid "MAC namespace is not supported on source %s: %s\n" - msgstr "Soubory MAC nejsou podporovány zdrojem %s: %s\n" - --#: util/ncopy.c:602 -+#: util/ncopy.c:605 - #, c-format - msgid "Unable to open MAC resource fork on source %s: %s\n" - msgstr "Nemohu otevřít zdroje zdrojového souboru %s: %s\n" - --#. possible information loss... maybe fallback to create .rsrc/name --#: util/ncopy.c:641 -+#: util/ncopy.c:644 - #, c-format - msgid "MAC namespace is not supported on destination %s: %s\n" - msgstr "Soubory MAC nejsou podporovány cílem %s: %s\n" - --#. it is fatal... --#: util/ncopy.c:651 -+#: util/ncopy.c:654 - #, c-format - msgid "Unable to create MAC resource fork on destination %s: %s\n" - msgstr "Nemohu vytvoÅ™it soubor se zdroji %s: %s\n" - --#. try to create .rsrc/destination --#: util/ncopy.c:664 -+#: util/ncopy.c:667 - #, c-format - msgid "" - "Unable to copy MAC resource fork of %s because of %s does not support " -@@ -2082,30 +1968,30 @@ msgstr "" - msgstr "" - "Nemohu zkopírovat zdroje MAC z %s protože %s nepodporuje soubory MAC.\n" - --#: util/ncopy.c:691 -+#: util/ncopy.c:694 - #, c-format - msgid "Unable to copy MAC resource fork: %s: %s\n" - msgstr "Nemohu zkopírovat zdroje MAC %s: %s\n" - --#: util/ncopy.c:700 -+#: util/ncopy.c:703 - msgid "NetWare copy (resource fork)" - msgstr "NetWare copy (resource fork)" - --#: util/ncopy.c:732 util/ncopy.c:750 -+#: util/ncopy.c:735 util/ncopy.c:753 - #, c-format - msgid "Cannot set trustees on %s because of %s\n" - msgstr "Nemohu nastavit pověření na %s protože %s\n" - --#: util/ncopy.c:734 util/ncopy.c:761 -+#: util/ncopy.c:737 util/ncopy.c:764 - msgid "not NetWare filesystem" - msgstr "nepodporuje formát MAC" - --#: util/ncopy.c:759 util/ncopy.c:799 -+#: util/ncopy.c:762 util/ncopy.c:802 - #, c-format - msgid "Cannot set file attributes on %s because of %s\n" - msgstr "Nemohu nastavit attributy na %s protože %s\n" - --#: util/ncopy.c:842 -+#: util/ncopy.c:845 - #, c-format - msgid "" - "Param Src '%s'\n" -@@ -2114,112 +2000,107 @@ msgstr "" - "Parametr Src '%s'\n" - "Parametr Dest '%s'\n" - --#: util/ncopy.c:849 -+#: util/ncopy.c:852 - #, c-format - msgid "%s: Cannot open %s, %s\n" - msgstr "%s: Nemohu otevřít %s, %s\n" - --#: util/ncopy.c:855 -+#: util/ncopy.c:858 - #, c-format - msgid "%s: Cannot stat %s, %s\n" - msgstr "%s: Nemohu zjistit informace o %s, %s\n" - --#: util/ncopy.c:881 -+#: util/ncopy.c:884 - #, c-format - msgid "%s: Cannot chmod %s: %s\n" - msgstr "%s: Nemohu nastavit %s: %s\n" - --#: util/ncopy.c:888 -+#: util/ncopy.c:891 - #, c-format - msgid "%s: Cannot create %s: %s\n" - msgstr "%s: Nemohu vytvoÅ™it %s: %s\n" - --#: util/ncopy.c:898 util/ncopy.c:965 -+#: util/ncopy.c:901 util/ncopy.c:968 - #, c-format - msgid "%s: Cannot create %s, %s\n" - msgstr "%s: Nemohu vytvoÅ™it %s, %s\n" - --#: util/ncopy.c:911 -+#: util/ncopy.c:914 - #, c-format - msgid "%s: Cannot read %s: %s\n" - msgstr "%s: Nemohu Äíst z %s: %s\n" - --#: util/ncopy.c:938 -+#: util/ncopy.c:941 - #, c-format - msgid "%s: %s: omitting directory\n" - msgstr "%s: %s: vynechávám adresář\n" - --#: util/ncopy.c:1052 -+#: util/ncopy.c:1055 - #, c-format - msgid "%s: Reset to ignore SIGHUP signal failed: %s" - msgstr "%s: Nepovedlo se nastavit ignorování signálu SIGHUP: %s" - --#: util/ncopy.c:1059 -+#: util/ncopy.c:1062 - #, c-format - msgid "%s: Reset to ignore SIGINT signal failed: %s" - msgstr "%s: Nepovedlo se nastavit ignorování signálu SIGINT: %s" - --#: util/ncopy.c:1066 -+#: util/ncopy.c:1069 - #, c-format - msgid "%s: Reset to ignore SIGQUIT signal failed: %s" - msgstr "%s: Nepovedlo se nastavit ignorování signálu SIGQUIT: %s" - --#: util/ncopy.c:1073 -+#: util/ncopy.c:1076 - #, c-format - msgid "%s: Reset to ignore SIGTERM signal failed: %s" - msgstr "%s: Nepovedlo se nastavit ignorování signálu SIGTERM: %s" - --#: util/ncopy.c:1085 -+#: util/ncopy.c:1088 - #, c-format - msgid "%s: unclean close of output file" - msgstr "%s: nepovedlo se uzavřít výstupní soubor" - --#. init structure fields --#: util/ncopy.c:1104 -+#: util/ncopy.c:1107 - #, c-format - msgid "%s: Get HANGUP signal action failed: %s" - msgstr "%s: Nepovedlo se zjistit akci pro HANGUP: %s" - --#: util/ncopy.c:1111 -+#: util/ncopy.c:1114 - #, c-format - msgid "%s: Reset HANGUP signal action failed: %s" - msgstr "%s: Nepovedlo se nastavit akci pro HANGUP: %s" - --#. init structure fields --#: util/ncopy.c:1117 -+#: util/ncopy.c:1120 - #, c-format - msgid "%s: Get INTERRUPT signal action failed: %s" - msgstr "%s: Nepovedlo se zjistit akci pro INTERRUPT: %s" - --#: util/ncopy.c:1124 -+#: util/ncopy.c:1127 - #, c-format - msgid "%s: Reset INTERRUPT signal action failed: %s" - msgstr "%s: Nepovedlo se nastavit akci pro INTERRUPT: %s" - --#. init structure fields --#: util/ncopy.c:1130 -+#: util/ncopy.c:1133 - #, c-format - msgid "%s: Get QUIT signal action failed: %s" - msgstr "%s: Nepovedlo se zjistit akci pro QUIT: %s" - --#: util/ncopy.c:1137 -+#: util/ncopy.c:1140 - #, c-format - msgid "%s: Reset QUIT signal action failed: %s" - msgstr "%s: Nepovedlo se nastavit akci pro QUIT: %s" - --#. init structure fields --#: util/ncopy.c:1143 -+#: util/ncopy.c:1146 - #, c-format - msgid "%s: Get TERMINATE signal action failed: %s" - msgstr "%s: Nepovedlo se zjistit akci pro TERMINATE: %s" - --#: util/ncopy.c:1150 -+#: util/ncopy.c:1153 - #, c-format - msgid "%s: Reset TERMINATE signal action failed: %s" - msgstr "%s: Nepovedlo se nastavit akci pro TERMINATE: %s" - --#. only option not requiring any arguments --#: util/ncopy.c:1181 -+#: util/ncopy.c:1184 - #, c-format - msgid "%s version %s\n" - msgstr "%s verze %s\n" -@@ -2256,7 +2137,7 @@ msgstr "chyba pÅ™i vytváření\n" - #: util/ncptest.c:134 - #, c-format - msgid "dealloc error\n" --msgstr "" -+msgstr "chyba pÅ™i dealokaci" - - #: util/ncptest.c:137 - #, c-format -@@ -2402,7 +2283,7 @@ msgid "when initializing connection" - msgid "when initializing connection" - msgstr "pÅ™i inicializaci spojení" - --#: util/nprint.c:110 util/pserver.c:191 -+#: util/nprint.c:110 util/nwpjmv.c:165 util/pserver.c:186 - msgid "No Description" - msgstr "Bez popisu" - -@@ -2450,7 +2331,7 @@ msgid "Cannot start print job: %s\n" - msgid "Cannot start print job: %s\n" - msgstr "Nemohu spustit tiskovou úlohu: %s\n" - --#: util/nprint.c:318 util/nprint.c:325 util/pserver.c:59 -+#: util/nprint.c:318 util/nprint.c:325 util/nwpjmv.c:61 util/pserver.c:59 - #, c-format - msgid "usage: %s [options] file\n" - msgstr "použití: %s [volby] soubor\n" -@@ -2582,9 +2463,9 @@ msgstr "" - - #: util/nsend.c:162 util/nwbocreate.c:115 util/nwboprops.c:83 util/nwborm.c:80 - #: util/nwbpadd.c:95 util/nwbpcreate.c:119 util/nwbprm.c:83 util/nwbpset.c:91 --#: util/nwfsinfo.c:132 util/nwfstime.c:86 util/nwrights.c:102 --#: util/nwtrustee.c:98 util/nwuserlist.c:201 util/pqlist.c:176 --#: util/pqstat.c:138 util/pserver.c:365 -+#: util/nwfsinfo.c:137 util/nwfstime.c:90 util/nwpjmv.c:351 util/nwpqjob.c:87 -+#: util/nwrights.c:102 util/nwtrustee.c:98 util/nwuserlist.c:205 -+#: util/pqlist.c:176 util/pqstat.c:138 util/pserver.c:360 - msgid "when initializing" - msgstr "pÅ™i inicializaci" - -@@ -2613,7 +2494,6 @@ msgid "No connection found for %s/%08X\n - msgid "No connection found for %s/%08X\n" - msgstr "Uživatel %s/%08X není pÅ™ihlášen\n" - --#. skip NDS members :-( - #: util/nsend.c:301 - #, c-format - msgid "%s: Cannot convert member ID 0x%08lX to name: %s\n" -@@ -2647,11 +2527,11 @@ msgstr "" - "-D Autorizace pro daemony, ignoruj vlastníka procesu\n" - "\n" - --#: util/nwauth.c:165 -+#: util/nwauth.c:156 - msgid "Enter password: " - msgstr "Vložte heslo: " - --#: util/nwauth.c:183 util/nwpasswd.c:175 -+#: util/nwauth.c:174 util/nwpasswd.c:177 - msgid "when trying to open connection" - msgstr "pÅ™i pokusu otevřít spojení" - -@@ -3118,32 +2998,32 @@ msgid "%s: Could not read property value - msgid "%s: Could not read property value: %s\n" - msgstr "%s: Nemohu pÅ™eÄíst vlastnost: %s\n" - --#: util/nwbpvalues.c:372 -+#: util/nwbpvalues.c:377 - #, c-format - msgid "Last Login: %x, %X" - msgstr "Poslední pÅ™ihlášení: %x, %X" - --#: util/nwbpvalues.c:376 -+#: util/nwbpvalues.c:381 - #, c-format - msgid "Never logged in\n" - msgstr "Nikdy nepÅ™ihlášen\n" - --#: util/nwbpvalues.c:380 -+#: util/nwbpvalues.c:385 - #, c-format - msgid " --- Account disabled ---\n" - msgstr " --- ÚÄet zakázán ---\n" - --#: util/nwbpvalues.c:395 -+#: util/nwbpvalues.c:400 - #, c-format - msgid "Account expires on: %x" - msgstr "ÚÄet vyprší: %x" - --#: util/nwbpvalues.c:411 -+#: util/nwbpvalues.c:416 - #, c-format - msgid "Password expires on: %x" - msgstr "Heslo vyprší: %x" - --#: util/nwbpvalues.c:413 -+#: util/nwbpvalues.c:418 - #, c-format - msgid "" - "GraceLogins left: %d\n" -@@ -3152,111 +3032,111 @@ msgstr "" - "Zbývá GraceLogin: %d\n" - "z max. : %d\n" - --#: util/nwbpvalues.c:415 -+#: util/nwbpvalues.c:420 - #, c-format - msgid "PasswortChangeInterval : %d days\n" - msgstr "Vynucená zmÄ›na hesla : %d dní\n" - --#: util/nwbpvalues.c:420 -+#: util/nwbpvalues.c:425 - #, c-format - msgid "New password must be different when changing\n" - msgstr "PÅ™i zmÄ›nÄ› se nové heslo musí liÅ¡it od starého\n" - --#: util/nwbpvalues.c:424 -+#: util/nwbpvalues.c:429 - #, c-format - msgid "User is not allowed to change password\n" - msgstr "Uživatel nemá povoleno mÄ›nit heslo\n" - --#: util/nwbpvalues.c:426 -+#: util/nwbpvalues.c:431 - #, c-format - msgid "Minimal password length : %d\n" - msgstr "Minimální délka hesla : %d\n" - --#: util/nwbpvalues.c:429 -+#: util/nwbpvalues.c:434 - #, c-format - msgid "Maximum no of connections: %d\n" - msgstr "Maximální poÄet pÅ™ipojení: %d\n" - --#: util/nwbpvalues.c:434 -+#: util/nwbpvalues.c:439 - #, c-format - msgid "Maximum DiskQuota : %8d blocks\n" - msgstr "Max. DiskQuota : %8d bloků\n" - --#: util/nwbpvalues.c:437 -+#: util/nwbpvalues.c:442 - #, c-format - msgid "Failed Logins: %5d\n" - msgstr "Nepovedených pÅ™ihlášení: %5d\n" - --#: util/nwbpvalues.c:441 -+#: util/nwbpvalues.c:446 - #, c-format - msgid "Account disabled still %8d seconds\n" - msgstr "ÚÄet zakázán jeÅ¡tÄ› %8d sekund\n" - --#: util/nwbpvalues.c:446 -+#: util/nwbpvalues.c:451 - #, c-format - msgid "Last 'intruder' address: %s\n" - msgstr "Adresa posledního 'vetÅ™elce': %s\n" - --#: util/nwbpvalues.c:452 -+#: util/nwbpvalues.c:457 - #, c-format - msgid "RestrictionMask : %02X\n" - msgstr "Maska omezení : %02X\n" - --#: util/nwbpvalues.c:466 -+#: util/nwbpvalues.c:471 - #, c-format - msgid "Time restrictions: 1 1 1 1 1 1 1 1 1 1 2 2 2 2 ]\n" - msgstr "ÄŒasové omezení: 1 1 1 1 1 1 1 1 1 1 2 2 2 2 ]\n" - --#: util/nwbpvalues.c:467 -+#: util/nwbpvalues.c:472 - #, c-format - msgid " Day [0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 ]\n" - msgstr " Den [0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 ]\n" - --#: util/nwbpvalues.c:507 -+#: util/nwbpvalues.c:512 - #, c-format - msgid "Segment: %03d\n" - msgstr "Segment: %03d\n" - --#: util/nwdir.c:203 -+#: util/nwdir.c:203 util/nwlistsalvage.c:56 - #, c-format - msgid "Nobody" - msgstr "Nikdo" - --#: util/nwdir.c:212 -+#: util/nwdir.c:212 util/nwlistsalvage.c:65 - #, c-format - msgid "Unknown:N/A" - msgstr "Neznámý:N/A" - --#: util/nwdir.c:218 -+#: util/nwdir.c:218 util/nwlistsalvage.c:71 - #, c-format - msgid "Unknown:<%s>" - msgstr "Neznámý:<%s>" - --#: util/nwdir.c:223 -+#: util/nwdir.c:223 util/nwlistsalvage.c:76 - #, c-format - msgid "User:" - msgstr "Uživatel:" - --#: util/nwdir.c:224 -+#: util/nwdir.c:224 util/nwlistsalvage.c:77 - #, c-format - msgid "Group:" - msgstr "Skupina:" - --#: util/nwdir.c:225 -+#: util/nwdir.c:225 util/nwlistsalvage.c:78 - #, c-format - msgid "FileServer:" - msgstr "SouborovýServer:" - --#: util/nwdir.c:226 -+#: util/nwdir.c:226 util/nwlistsalvage.c:79 - #, c-format - msgid "Unknown(%04X):" - msgstr "Neznámý(%04X):" - --#: util/nwdir.c:267 -+#: util/nwdir.c:271 util/nwlistsalvage.c:120 - msgid "never" - msgstr "nikdy" - --#: util/nwdir.c:307 -+#: util/nwdir.c:311 - #, c-format - msgid "" - "Extended attributes: %u attributes\n" -@@ -3265,7 +3145,7 @@ msgstr "" - "Rozšířené attributy: %u attributů\n" - " %u bajtů v klíÄích, %u bajtů v datech\n" - --#: util/nwdir.c:323 -+#: util/nwdir.c:327 - #, c-format - msgid "" - " Key %u:\n" -@@ -3278,143 +3158,143 @@ msgstr "" - " Přístup: 0x%08X\n" - " Délka hodnoty: %u\n" - --#: util/nwdir.c:361 util/nwdir.c:384 -+#: util/nwdir.c:365 util/nwdir.c:388 - #, c-format - msgid " Cannot determine file size: %s\n" - msgstr " Nemohu zjistit velikost souboru: %s\n" - --#: util/nwdir.c:363 util/nwdir.c:413 -+#: util/nwdir.c:367 util/nwdir.c:417 - #, c-format - msgid " File size: %10Lu" - msgstr " Velikost souboru:%10Lu" - --#: util/nwdir.c:368 util/nwdir.c:419 -+#: util/nwdir.c:372 util/nwdir.c:423 - #, c-format - msgid " (allocated %Lu)" - msgstr " (alokováno %Lu)" - --#: util/nwdir.c:386 -+#: util/nwdir.c:390 - #, c-format - msgid " No datastream exist\n" - msgstr " Neexistuje žádný datový proud\n" - --#: util/nwdir.c:410 -+#: util/nwdir.c:414 - #, c-format - msgid " Stream %3u size: %10Lu" - msgstr " Velikost p. %3u: %10Lu" - --#: util/nwdir.c:441 -+#: util/nwdir.c:445 - #, c-format - msgid "Cannot retrieve file attributes: %s\n" - msgstr "Nemohu zjistit attributy: %s\n" - --#: util/nwdir.c:447 -+#: util/nwdir.c:451 - #, c-format - msgid "Cannot retrieve file number: %s\n" - msgstr "Nemohu zjistit Äíslo souboru: %s\n" - --#: util/nwdir.c:453 -+#: util/nwdir.c:457 util/nwlistsalvage.c:174 - #, c-format - msgid "Cannot retrieve file name: %s\n" - msgstr "Nemohu zjistit jméno souboru: %s\n" - --#: util/nwdir.c:458 -+#: util/nwdir.c:462 - #, c-format - msgid "Directory:\n" - msgstr "Adresář:\n" - --#: util/nwdir.c:460 -+#: util/nwdir.c:464 - #, c-format - msgid "File:\n" - msgstr "Soubor:\n" - --#: util/nwdir.c:474 -+#: util/nwdir.c:478 - #, c-format - msgid " DOS: " - msgstr " DOS: " - --#: util/nwdir.c:479 -+#: util/nwdir.c:483 - #, c-format - msgid " OS/2: " - msgstr " OS/2: " - --#: util/nwdir.c:485 -+#: util/nwdir.c:489 - #, c-format - msgid " NFS: " - msgstr " NFS: " - --#: util/nwdir.c:491 -+#: util/nwdir.c:495 - #, c-format - msgid " MAC: " - msgstr " MAC: " - --#: util/nwdir.c:500 -+#: util/nwdir.c:504 - #, c-format - msgid "Rights:\n" - msgstr "Práva:\n" - --#: util/nwdir.c:501 -+#: util/nwdir.c:505 - #, c-format - msgid " Inherited: " - msgstr " DÄ›dÄ›ná: " - --#: util/nwdir.c:505 util/nwdir.c:524 util/nwdir.c:540 util/nwdir.c:558 --#: util/nwdir.c:566 util/nwdir.c:573 util/nwdir.c:582 -+#: util/nwdir.c:509 util/nwdir.c:528 util/nwdir.c:544 util/nwdir.c:562 -+#: util/nwdir.c:570 util/nwdir.c:577 util/nwdir.c:586 - #, c-format - msgid "Cannot determine: %s\n" - msgstr "Nemohu zjistit: %s\n" - --#: util/nwdir.c:522 -+#: util/nwdir.c:526 - #, c-format - msgid " Effective: " - msgstr " Efektivní: " - --#: util/nwdir.c:536 -+#: util/nwdir.c:540 - #, c-format - msgid "Owning namespace: " - msgstr "Namespace vlast.: " - --#: util/nwdir.c:553 -+#: util/nwdir.c:557 - #, c-format - msgid "Miscellaneous NetWare Information:\n" - msgstr "Různé informace NetWare:\n" - --#: util/nwdir.c:554 -+#: util/nwdir.c:558 - #, c-format - msgid " Last update: " - msgstr " Poslední zmÄ›na: " - --#: util/nwdir.c:562 -+#: util/nwdir.c:566 - #, c-format - msgid " Last archived: " - msgstr " Posl. archiv.: " - --#: util/nwdir.c:571 -+#: util/nwdir.c:575 - #, c-format - msgid " Last accessed: " - msgstr " Posl. přístup: " - --#: util/nwdir.c:578 -+#: util/nwdir.c:582 - #, c-format - msgid " Created/Copied: " - msgstr " VytvoÅ™en/Zkop.: " - --#: util/nwdir.c:586 -+#: util/nwdir.c:590 - #, c-format - msgid " Flags: [%s%s%s%s]" - msgstr " Vlajky: [%s%s%s%s]" - --#: util/nwdir.c:636 -+#: util/nwdir.c:640 - #, c-format - msgid "Trustees:\n" - msgstr "Pověření:\n" - --#: util/nwdir.c:662 -+#: util/nwdir.c:666 - #, c-format - msgid "File Usage:\n" - msgstr "Využití souboru:\n" - --#: util/nwdir.c:663 -+#: util/nwdir.c:667 - #, c-format - msgid "" - " Use Count: %5u Open Count: %5u\n" -@@ -3427,151 +3307,150 @@ msgstr "" - " PoÄet zakázání Ätení: %5u PoÄet zakázání zápisu: %5u\n" - " Zamknuto: %-15s Fork Count: %5u\n" - --#: util/nwdir.c:670 -+#: util/nwdir.c:674 - #, c-format - msgid " Connection Count: %10u\n" - msgstr " PoÄet pÅ™ipojení: %10u\n" - --#: util/nwdir.c:674 util/nwdir.c:766 -+#: util/nwdir.c:678 util/nwdir.c:770 - #, c-format - msgid " Connection: %u/%u" - msgstr " PÅ™ipojení: %u/%u" - --#: util/nwdir.c:677 util/nwdir.c:769 -+#: util/nwdir.c:681 util/nwdir.c:773 - #, c-format - msgid ", " - msgstr ", " - --#: util/nwdir.c:682 util/nwuserlist.c:380 -+#: util/nwdir.c:686 util/nwuserlist.c:384 - msgid "locked" - msgstr "zamÄeno" - --#: util/nwdir.c:682 util/nwuserlist.c:380 -+#: util/nwdir.c:686 util/nwuserlist.c:384 - msgid "open shareable" - msgstr "otevÅ™eno ke sdílení" - --#: util/nwdir.c:683 util/nwuserlist.c:381 -+#: util/nwdir.c:687 util/nwuserlist.c:385 - msgid "logged" - msgstr "logged" - --#: util/nwdir.c:683 util/nwuserlist.c:381 -+#: util/nwdir.c:687 util/nwuserlist.c:385 - msgid "open normal" - msgstr "otevÅ™en" - --#: util/nwdir.c:684 util/nwdir.c:689 util/nwuserlist.c:382 --#: util/nwuserlist.c:387 -+#: util/nwdir.c:688 util/nwdir.c:693 util/nwuserlist.c:386 -+#: util/nwuserlist.c:391 - msgid "rsvd" - msgstr "rsvd" - --#: util/nwdir.c:685 util/nwuserlist.c:383 -+#: util/nwdir.c:689 util/nwuserlist.c:387 - msgid "TTS locked" - msgstr "zamÄeno TTS" - --#: util/nwdir.c:685 util/nwuserlist.c:383 -+#: util/nwdir.c:689 util/nwuserlist.c:387 - msgid "TTS" - msgstr "TTS" - --#: util/nwdir.c:686 util/nwuserlist.c:384 -+#: util/nwdir.c:690 util/nwuserlist.c:388 - msgid "read" - msgstr "Ätení" - --#: util/nwdir.c:686 util/nwuserlist.c:384 -+#: util/nwdir.c:690 util/nwuserlist.c:388 - msgid "write" - msgstr "zápis" - --#: util/nwdir.c:687 util/nwuserlist.c:385 -+#: util/nwdir.c:691 util/nwuserlist.c:389 - msgid "deny read" - msgstr "zákaz Ätení" - --#: util/nwdir.c:687 util/nwuserlist.c:385 -+#: util/nwdir.c:691 util/nwuserlist.c:389 - msgid "deny write" - msgstr "zákaz zápisu" - --#: util/nwdir.c:688 util/nwuserlist.c:386 -+#: util/nwdir.c:692 util/nwuserlist.c:390 - msgid "detached" - msgstr "odpojen" - --#: util/nwdir.c:688 util/nwuserlist.c:386 -+#: util/nwdir.c:692 util/nwuserlist.c:390 - msgid "TTS holding detach" - msgstr "TTS pozdržuje odpojení" - --#: util/nwdir.c:689 util/nwuserlist.c:387 -+#: util/nwdir.c:693 util/nwuserlist.c:391 - msgid "TTS holding open" - msgstr "TTS pozdržuje otevÅ™ení" - --#: util/nwdir.c:710 util/nwdir.c:732 util/nwuserlist.c:409 --#: util/nwuserlist.c:432 -+#: util/nwdir.c:714 util/nwdir.c:736 util/nwuserlist.c:413 -+#: util/nwuserlist.c:436 - msgid "unlocked" - msgstr "odemÄen" - --#: util/nwdir.c:713 util/nwuserlist.c:412 -+#: util/nwdir.c:717 util/nwuserlist.c:416 - msgid "Not locked" - msgstr "NezamÄen" - --#: util/nwdir.c:714 util/nwuserlist.c:413 -+#: util/nwdir.c:718 util/nwuserlist.c:417 - msgid "Locked by a file lock" - msgstr "UzamÄen souborovým zámkem" - --#: util/nwdir.c:715 util/nwuserlist.c:414 -+#: util/nwdir.c:719 util/nwuserlist.c:418 - msgid "Locked by Begin Share File Set" - msgstr "UzamÄen pomocí Begin Share File Set" - --#: util/nwdir.c:716 util/nwuserlist.c:415 -+#: util/nwdir.c:720 util/nwuserlist.c:419 - msgid "Unknown lock state" - msgstr "Neznámý stav uzamknutí" - --#: util/nwdir.c:735 -+#: util/nwdir.c:739 - #, c-format - msgid " Lock: (%02X) %s\n" - msgstr " Zámek: (%02X) %s\n" - --#: util/nwdir.c:736 -+#: util/nwdir.c:740 - #, c-format - msgid " (%02X) %s\n" - msgstr " (%02X) %s\n" - --#: util/nwdir.c:737 -+#: util/nwdir.c:741 - #, c-format - msgid " Access: (%02X) %s\n" - msgstr " Příst.: (%02X) %s\n" - --#: util/nwdir.c:739 -+#: util/nwdir.c:743 - #, c-format - msgid " Lock: %s\n" - msgstr " Zámek: %s\n" - --#: util/nwdir.c:740 -+#: util/nwdir.c:744 - #, c-format - msgid " %s\n" - msgstr " %s\n" - --#: util/nwdir.c:741 -+#: util/nwdir.c:745 - #, c-format - msgid " Access: %s\n" - msgstr " Příst.: %s\n" - --#: util/nwdir.c:762 -+#: util/nwdir.c:766 - #, c-format - msgid "File Physical Locks:\n" - msgstr "Fyzické zámky:\n" - --#: util/nwdir.c:773 -+#: util/nwdir.c:777 - #, c-format - msgid " Range: 0x%08LX-0x%08LX\n" - msgstr " Rozsah: 0x%08LX-0x%08LX\n" - --#: util/nwdir.c:791 -+#: util/nwdir.c:795 - #, c-format - msgid "Unable to begin scandir: 0x%04X\n" - msgstr "Nemohu zaÄít prohledávat adresář: 0x%04X\n" - --#. Non-standard error code --#: util/nwdir.c:803 -+#: util/nwdir.c:807 - #, c-format - msgid "Unexpected error in NextDir: %s\n" - msgstr "NeoÄekávaná chyba v NextDir: %s\n" - --#: util/nwdir.c:821 -+#: util/nwdir.c:825 - #, c-format - msgid "" - "nwdir [options] [path]\n" -@@ -3603,32 +3482,32 @@ msgstr "" - "\n" - "(c) 1998 Milan Vandrovec pro ncpfs-2.0.12.8\n" - --#: util/nwdir.c:899 -+#: util/nwdir.c:903 - #, c-format - msgid "Unable to initialize: 0x%04X\n" - msgstr "Nepovedla se inicializace: 0x%04X\n" - --#: util/nwdir.c:932 -+#: util/nwdir.c:936 - #, c-format - msgid "Invalid path: %s\n" - msgstr "Chybná cesta: %s\n" - --#: util/nwdir.c:936 -+#: util/nwdir.c:940 - #, c-format - msgid "Specified path is not remote\n" - msgstr "Uvedená cesta není síťová\n" - --#: util/nwdir.c:948 -+#: util/nwdir.c:952 - #, c-format - msgid "Directory %s\n" - msgstr "Adresář %s\n" - --#: util/nwdir.c:954 -+#: util/nwdir.c:958 - #, c-format - msgid "Path does not exist: %s\n" - msgstr "Cesta neexistuje: %s\n" - --#: util/nwdir.c:1002 -+#: util/nwdir.c:1006 - #, c-format - msgid "Cannot retrieve info: %s\n" - msgstr "Nemohu zjistit informace: %s\n" -@@ -3866,7 +3745,7 @@ msgid "Compatibility option entered, res - msgid "Compatibility option entered, rest of commandline ignored\n" - msgstr "Vložena stará volba, zbytek příkazové řádky je ignorován\n" - --#: util/nwfsctrl.c:479 -+#: util/nwfsctrl.c:479 util/nwpasswd.c:121 - #, c-format - msgid "%s: Out of memory!\n" - msgstr "%s: Nedostatek pamÄ›ti!\n" -@@ -3981,7 +3860,7 @@ msgstr "Verze tisku %d\n" - #: util/nwfsinfo.c:101 - #, c-format - msgid "Virt.Consolvers. %d\n" --msgstr "" -+msgstr "Virt.Consolvers. %d\n" - - #: util/nwfsinfo.c:103 - #, c-format -@@ -3996,12 +3875,12 @@ msgstr "Verze VAP %d\n" - #: util/nwfsinfo.c:106 - #, c-format - msgid "Internet Bridge %d\n" --msgstr "" -+msgstr "Mezisíťový most %d\n" - - #: util/nwfsinfo.c:107 - #, c-format - msgid "Mixed Mode Path %s\n" --msgstr "" -+msgstr "Mixované cesty %s\n" - - #: util/nwfsinfo.c:108 - #, c-format -@@ -4023,19 +3902,19 @@ msgid "Large files %s\n" - msgid "Large files %s\n" - msgstr "Max. souborů %s\n" - --#: util/nwfsinfo.c:152 -+#: util/nwfsinfo.c:157 - msgid "could not get strings" - msgstr "nemohu pÅ™eÄíst popis" - --#: util/nwfsinfo.c:176 -+#: util/nwfsinfo.c:181 - msgid "could not get server time" - msgstr "nemohu zjistit Äas serveru" - --#: util/nwfsinfo.c:198 util/nwuserlist.c:257 -+#: util/nwfsinfo.c:203 util/nwuserlist.c:261 - msgid "Could not get server information" - msgstr "Nemohu zjistit informace o serveru" - --#: util/nwfsinfo.c:219 -+#: util/nwfsinfo.c:224 - #, c-format - msgid "" - "Installed NCP Extensions:\n" -@@ -4046,12 +3925,12 @@ msgstr "" - " Jméno Číslo Verze\n" - " -------------------------------------------------------\n" - --#: util/nwfsinfo.c:224 -+#: util/nwfsinfo.c:229 - #, c-format - msgid " %-33s %08X %u.%u.%u\n" - msgstr " %-33s %08X %u.%u.%u\n" - --#: util/nwfsinfo.c:227 -+#: util/nwfsinfo.c:232 - #, c-format - msgid "No NCP Extensions registered\n" - msgstr "Žádné rozšíření NCP není instalováno\n" -@@ -4085,11 +3964,11 @@ msgstr "" - "-s Nastav Äas serveru podle lokálního Äasu\n" - "\n" - --#: util/nwfstime.c:119 -+#: util/nwfstime.c:123 - msgid "when setting file server time" - msgstr "pÅ™i nastavování Äasu na serveru" - --#: util/nwfstime.c:129 -+#: util/nwfstime.c:133 - msgid "when getting file server time" - msgstr "pÅ™i Ätení Äasu ze serveru" - -@@ -4171,9 +4050,81 @@ msgid "%s: Could not add trustee rights: - msgid "%s: Could not add trustee rights: %s\n" - msgstr "%s: Nemohu pÅ™idat pověření: %s\n" - --#: util/nwmsg.c:88 util/nwpurge.c:136 contrib/tknwmsg/nwmsg.c:88 -+#: util/nwlistsalvage.c:131 -+#, c-format -+msgid "" -+"usage: nwlistsalvage [options] [directory]\n" -+"\n" -+"-h Print this help text\n" -+"-n Namespace for file access.\n" -+" DOS\n" -+" LONG - Default\n" -+" MAC\n" -+" NFS\n" -+" FTAM\n" -+"-v Verbose\n" -+"\n" -+"directory Directory to examine for salvageable files. Default is ./\n" -+"\n" -+msgstr "" -+"použití: nwlistsalvage [volby] [adresář]\n" -+"\n" -+"-h VypiÅ¡ tuto nápovÄ›du\n" -+"-n Jmený prostor pro přístup k souborům.\n" -+" DOS\n" -+" LONG - pÅ™edvolené\n" -+" MAC\n" -+" NFS\n" -+" FTAM\n" -+"-v Detaily\n" -+"\n" -+"adresář Adresář pro obnovení souborů. Defaultní hodnota je ./\n" -+"\n" -+ -+#: util/nwlistsalvage.c:189 -+#, c-format -+msgid "Cannot retrieve creation info: %s\n" -+msgstr "Nemohu zjistit informace o vytvoÅ™ení: %s\n" -+ -+#: util/nwlistsalvage.c:198 -+#, c-format -+msgid "Cannot retrieve modified info: %s\n" -+msgstr "Nemohu zjistit informace o modifikaci: %s\n" -+ -+#: util/nwlistsalvage.c:262 util/nwsalvage.c:137 -+#, c-format -+msgid "Unrecognized namespace for option '-%c'\n" -+msgstr "Ignoruji neznámou hodnotu pro volbu `-%c'\n" -+ -+#: util/nwlistsalvage.c:268 util/nwpurge.c:125 util/nwsalvage.c:150 -+#, c-format -+msgid "Unexpected option `-%c'\n" -+msgstr "NeoÄekávaná volba `-%c'\n" -+ -+#: util/nwlistsalvage.c:279 util/nwmsg.c:88 util/nwpurge.c:136 -+#: util/nwsalvage.c:163 contrib/tknwmsg/nwmsg.c:88 - msgid "in ncp_open_mount" - msgstr "v ncp_open_mount" -+ -+#: util/nwlistsalvage.c:284 util/nwpurge.c:141 util/nwrights.c:107 -+#: util/nwsalvage.c:168 -+msgid "when retrieving root entry" -+msgstr "pÅ™i vyzvedávání koÅ™enové položky" -+ -+#: util/nwlistsalvage.c:292 -+#, c-format -+msgid "No salvageable files were found.\n" -+msgstr "Nebyly nalezeny žádné obnovitelné soubory.\n" -+ -+#: util/nwlistsalvage.c:294 -+#, c-format -+msgid "1 salvageable file was found.\n" -+msgstr "Byl nalezen 1 obnovitelný soubor.\n" -+ -+#: util/nwlistsalvage.c:296 -+#, c-format -+msgid "%d salvageable files were found.\n" -+msgstr "Bylo nalezeno %d obnovitelných souborů.\n" - - #: util/nwmsg.c:93 contrib/tknwmsg/nwmsg.c:93 - #, c-format -@@ -4261,40 +4212,200 @@ msgid "trying to find server" - msgid "trying to find server" - msgstr "pÅ™i pokusu najít server" - --#: util/nwpasswd.c:127 -+#: util/nwpasswd.c:129 - #, c-format - msgid "Changing password for user %s on server %s\n" - msgstr "MÄ›ním heslo pro uživatele %s na serveru %s\n" - --#: util/nwpasswd.c:132 -+#: util/nwpasswd.c:134 - msgid "Enter old password: " - msgstr "Vložte staré heslo: " - --#: util/nwpasswd.c:136 -+#: util/nwpasswd.c:138 - #, c-format - msgid "Enter password for %s: " - msgstr "Vložte heslo pro %s: " - --#: util/nwpasswd.c:146 -+#: util/nwpasswd.c:148 - msgid "Enter new password: " - msgstr "Vložte nové heslo: " - --#: util/nwpasswd.c:154 -+#: util/nwpasswd.c:156 - msgid "Re-Enter new password: " - msgstr "Znovu vložte nové heslo: " - --#: util/nwpasswd.c:168 -+#: util/nwpasswd.c:170 - #, c-format - msgid "You mistype the new password, try again\n" - msgstr "PÅ™eklepl jste se pÅ™i zadávání nového hesla, zkuste znovu\n" - --#: util/nwpasswd.c:187 -+#: util/nwpasswd.c:189 - msgid "not own password" - msgstr "není vaÅ¡e heslo" - --#: util/nwpasswd.c:196 -+#: util/nwpasswd.c:198 - msgid "trying to change password" - msgstr "pokusu o zmÄ›nu hesla" -+ -+#: util/nwpjmv.c:69 -+#, c-format -+msgid "" -+"\n" -+"-S server Server name to be used\n" -+"-U username Print Server name sent to server\n" -+"-P password Use this password\n" -+"-n Do not use any password\n" -+"-C Don't convert password to uppercase\n" -+"-q queue name Name of the printing queue to use\n" -+"-c command Name of print command, default: 'lpr'\n" -+"-j job number ID number of job to service\n" -+"-d Debug\n" -+msgstr "" -+"\n" -+"-S server Jméno serveru k pÅ™ipojení\n" -+"-U username Jméno tiskového serveru pro pÅ™ipojení na server\n" -+"-P password Heslo\n" -+"-n Použij prázdné heslo\n" -+"-C NepÅ™evádÄ›j heslo na velká písmena\n" -+"-q queue name Jméno používané tiskové fronty\n" -+"-c command Jméno příkazu pro tisk, normálnÄ›: 'lpr'\n" -+"-j job number Číslo tiskové úlohy\n" -+"-d Detailní informace vhodné pro ladÄ›ní\n" -+ -+#: util/nwpjmv.c:110 util/pserver.c:132 -+#, c-format -+msgid "Queue %s not found: %s\n" -+msgstr "Tisková fronta %s nebyla nalezena: %s\n" -+ -+#: util/nwpjmv.c:119 util/pserver.c:141 -+#, c-format -+msgid "Could not attach to queue %s: %s\n" -+msgstr "Nemohu se pÅ™ipojit k tiskové frontÄ› %s: %s\n" -+ -+#: util/nwpjmv.c:191 -+#, c-format -+msgid "Failed to change job position: %s\n" -+msgstr "Nepovedlo se zmÄ›nit pozici úlohy: %s\n" -+ -+#: util/nwpjmv.c:201 util/pserver.c:216 -+#, c-format -+msgid "Cannot service print job: %s\n" -+msgstr "Nemohu zpracovat tiskovou úlohu: %s\n" -+ -+#: util/nwpjmv.c:211 -+#, c-format -+msgid "wrong job queued: expected %08X, got %08X\n" -+msgstr "chybná úloha vložena do fronty: oÄekáváno %08X, obdženo %08X\n" -+ -+#: util/nwpjmv.c:224 util/pserver.c:234 -+#, c-format -+msgid "" -+msgstr "" -+ -+#: util/nwpjmv.c:229 util/pserver.c:239 -+#, c-format -+msgid "pipe error: %m" -+msgstr "Nepovedlo se vytvoÅ™it rouru: %m" -+ -+#: util/nwpjmv.c:234 util/pserver.c:244 -+#, c-format -+msgid "fork error: %m" -+msgstr "Nepovedlo se spustit podproces: %m" -+ -+#: util/nwpjmv.c:260 util/pserver.c:270 -+#, c-format -+msgid "waitpid: %m\n" -+msgstr "" -+ -+#: util/nwpjmv.c:274 util/pserver.c:284 -+#, c-format -+msgid "dup2 error: %m\n" -+msgstr "chyba dup2: %m\n" -+ -+#: util/nwpjmv.c:284 util/pserver.c:294 -+#, c-format -+msgid "exec error: %m\n" -+msgstr "nemohu spustit: %m\n" -+ -+#: util/nwpjmv.c:387 util/pserver.c:399 -+#, c-format -+msgid "You must specify a queue\n" -+msgstr "Musíte uvést název fronty\n" -+ -+#: util/nwpjmv.c:402 util/nwpqjob.c:150 -+#, c-format -+msgid "Cannot parse \"%s\" - jobID must be hexadecimal number\n" -+msgstr "Nemohu pochopit \"%s\" - Äíslo úlohy musí být Å¡estnáctkové Äíslo\n" -+ -+#: util/nwpjmv.c:408 -+#, c-format -+msgid "Could not move job %08X\n" -+msgstr "Nemohu pÅ™esunout úlohu %08X\n" -+ -+#: util/nwpqjob.c:50 util/nwpqjob.c:52 util/nwpqjob.c:59 -+#, c-format -+msgid "\n" -+msgstr "\n" -+ -+#: util/nwpqjob.c:51 -+#, c-format -+msgid "usage: %s [options] [ ...]\n" -+msgstr "použití: %s [volby] <úloha> [<úloha> ...]\n" -+ -+#: util/nwpqjob.c:53 -+#, c-format -+msgid "-S server Server name to be used\n" -+msgstr "-S server Jméno serveru\n" -+ -+#: util/nwpqjob.c:54 -+#, c-format -+msgid "-U username User name\n" -+msgstr "-U uživatel Jméno uživatele\n" -+ -+#: util/nwpqjob.c:55 -+#, c-format -+msgid "-P password Use this password\n" -+msgstr "-P heslo Heslo uživatele\n" -+ -+#: util/nwpqjob.c:56 -+#, c-format -+msgid "-n Do not use any password\n" -+msgstr "-n Použij prázdné uživatelské heslo\n" -+ -+#: util/nwpqjob.c:57 -+#, c-format -+msgid "-d Delete job from queue (default for pqrm)\n" -+msgstr "-d Odstraň úlohu z fronty (automaticky pro pqrm)\n" -+ -+#: util/nwpqjob.c:58 -+#, c-format -+msgid "-r Resume job\n" -+msgstr "-r Povol úlohu\n" -+ -+#: util/nwpqjob.c:110 -+#, c-format -+msgid "%s: At least one of -d or -r must be specified\n" -+msgstr "%s: BuÄ -d nebo -r musí být uvedeno\n" -+ -+#: util/nwpqjob.c:135 util/pqstat.c:182 -+#, c-format -+msgid "Queue \"%s\" on server %s not found.\n" -+msgstr "Tisková fronta \"%s\" nebyla na serveru %s nalezena.\n" -+ -+#: util/nwpqjob.c:166 -+#, c-format -+msgid "Job %08X does not exist\n" -+msgstr "Úloha %08X neexistuje\n" -+ -+#: util/nwpqjob.c:168 -+#, c-format -+msgid "You have not rights to cancel job %08X\n" -+msgstr "Nemáte dostatek práv na ukonÄení úlohy %08X\n" -+ -+#: util/nwpqjob.c:170 -+#, c-format -+msgid "Cannot cancel job %08X: %s\n" -+msgstr "Nemohu ukonÄit úlohu %08X: %s\n" - - #: util/nwpurge.c:38 - #, c-format -@@ -4323,15 +4434,6 @@ msgstr "" - #, c-format - msgid "%8s-- failed (%s)\n" - msgstr "%8s-- nepovedlo se (%s)\n" -- --#: util/nwpurge.c:125 --#, c-format --msgid "Unexpected option `-%c'\n" --msgstr "NeoÄekávaná volba `-%c'\n" -- --#: util/nwpurge.c:141 util/nwrights.c:107 --msgid "when retrieving root entry" --msgstr "pÅ™i vyzvedávání koÅ™enové položky" - - #: util/nwpurge.c:148 - #, c-format -@@ -4457,6 +4559,70 @@ msgstr "(F): Můžete prohledávat adres - #, c-format - msgid "(A): You may change ACCESS control\n" - msgstr "(A): Můžete mÄ›nit přístupová práva\n" -+ -+#: util/nwsalvage.c:35 -+#, c-format -+msgid "" -+"usage: nwsalvage [options] directory file_id\n" -+"\n" -+"-h Print this help text.\n" -+"-s Silent mode.\n" -+"-n Namespace for accessing files.\n" -+" DOS\n" -+" LONG - Default\n" -+" MAC\n" -+" FTAM\n" -+" NFS\n" -+"-r Rename the salvaged file. 255 chars max.\n" -+"directory Directory in which salvageable file resides.\n" -+" Default is current directory.\n" -+"\n" -+"file_id The file identified by file_id will be salvaged.\n" -+" Numeric file_id is obtained from nwlistsalvage.\n" -+"\n" -+msgstr "" -+"použití: nwsalvage [volby] adresář id_souboru\n" -+"\n" -+"-h VypiÅ¡ tuto nápovÄ›du.\n" -+"-s Nevypisuj informace o obnovených souborech.\n" -+"-n namespace Jmený prostor pro obnovení.\n" -+" DOS\n" -+" LONG - pÅ™edvoleno\n" -+" MAC\n" -+" FTAM\n" -+" NFS\n" -+"-r nové jméno PÅ™ejmenuj pÅ™i obnovení soubor. Nejvýše 255 znaků.\n" -+"adresář Adresář ve kterém je smazaný soubor.\n" -+" Defaultní hodnota je aktuální adresář.\n" -+"\n" -+"id_souboru Soubor identifikovaný pomocí id_souboru bude obnoven.\n" -+" Číselné id_souboru vypíše napÅ™. nwlistsalvage.\n" -+"\n" -+ -+#: util/nwsalvage.c:84 -+#, c-format -+msgid "%8s%d -- failed (File already exists, or path inaccessible)\n" -+msgstr "%8s%d -- nepovedlo se (Soubor již existuje, nebo není cesta přístupná)\n" -+ -+#: util/nwsalvage.c:86 -+#, c-format -+msgid "%8s%d %s -- failed (%s)\n" -+msgstr "%8s%d %s -- nepovedlo se (%s)\n" -+ -+#: util/nwsalvage.c:91 -+#, c-format -+msgid "%8s%d %s -- salvaged \n" -+msgstr "%8s%d %s -- obnoveno \n" -+ -+#: util/nwsalvage.c:98 -+#, c-format -+msgid "%8sFile with scan ID '%d' was not found." -+msgstr "%8sSoubor s Äíslem '%d' nebyl nalezen." -+ -+#: util/nwsalvage.c:144 -+#, c-format -+msgid "Filename for option '-%c' has invalid length." -+msgstr "Jméno souboru pro volbu '-%c' je příliÅ¡ dlouhé." - - #: util/nwtrustee.c:50 - #, c-format -@@ -4631,7 +4797,7 @@ msgid " %-21s%5llu %c%s\n" - msgid " %-21s%5llu %c%s\n" - msgstr " %-21s%5llu %c%s\n" - --#: util/nwuserlist.c:266 -+#: util/nwuserlist.c:270 - #, c-format - msgid "" - "\n" -@@ -4642,22 +4808,22 @@ msgstr "" - "%-6s%-21s%-12s\n" - "---------------------------------------------------\n" - --#: util/nwuserlist.c:269 util/nwuserlist.c:277 util/nwuserlist.c:286 --#: util/nwuserlist.c:295 -+#: util/nwuserlist.c:273 util/nwuserlist.c:281 util/nwuserlist.c:290 -+#: util/nwuserlist.c:299 - msgid "Conn" - msgstr "Spoj" - --#: util/nwuserlist.c:270 util/nwuserlist.c:278 util/nwuserlist.c:288 --#: util/nwuserlist.c:297 -+#: util/nwuserlist.c:274 util/nwuserlist.c:282 util/nwuserlist.c:292 -+#: util/nwuserlist.c:301 - msgid "User name" - msgstr "Uživatelské jméno" - --#: util/nwuserlist.c:271 util/nwuserlist.c:280 util/nwuserlist.c:289 --#: util/nwuserlist.c:299 -+#: util/nwuserlist.c:275 util/nwuserlist.c:284 util/nwuserlist.c:293 -+#: util/nwuserlist.c:303 - msgid "Login time" - msgstr "ÄŒas pÅ™ihlášení" - --#: util/nwuserlist.c:274 -+#: util/nwuserlist.c:278 - #, c-format - msgid "" - "\n" -@@ -4668,11 +4834,11 @@ msgstr "" - "%-6s%-21s%-27s%-12s\n" - "------------------------------------------------------------------------------\n" - --#: util/nwuserlist.c:279 util/nwuserlist.c:298 -+#: util/nwuserlist.c:283 util/nwuserlist.c:302 - msgid "Station Address" - msgstr "Adresa stanice" - --#: util/nwuserlist.c:283 -+#: util/nwuserlist.c:287 - #, c-format - msgid "" - "\n" -@@ -4683,11 +4849,11 @@ msgstr "" - "%-6s%-9s%-21s%-12s\n" - "------------------------------------------------------------\n" - --#: util/nwuserlist.c:287 util/nwuserlist.c:296 -+#: util/nwuserlist.c:291 util/nwuserlist.c:300 - msgid "ObjectID" - msgstr "ObjectID" - --#: util/nwuserlist.c:292 -+#: util/nwuserlist.c:296 - #, c-format - msgid "" - "\n" -@@ -4698,131 +4864,131 @@ msgstr "" - "%-6s%-9s%-21s%-27s%-12s\n" - "---------------------------------------------------------------------------------------\n" - --#: util/nwuserlist.c:315 -+#: util/nwuserlist.c:319 - #, c-format - msgid "%4d: %08X %-20s " - msgstr "%4d: %08X %-20s " - --#: util/nwuserlist.c:317 -+#: util/nwuserlist.c:321 - #, c-format - msgid "%4d: %-20s " - msgstr "%4d: %-20s " - --#: util/nwuserlist.c:343 -+#: util/nwuserlist.c:347 - msgid "Unknown format" - msgstr "Neznámý formát" - --#: util/nwuserlist.c:375 -+#: util/nwuserlist.c:379 - #, c-format - msgid " File: (%02X:%08X) %s\n" - msgstr " Soubor: (%02X:%08X) %s\n" - --#: util/nwuserlist.c:377 -+#: util/nwuserlist.c:381 - #, c-format - msgid " File: %s\n" - msgstr " Soubor: %s\n" - --#: util/nwuserlist.c:435 -+#: util/nwuserlist.c:439 - #, c-format - msgid " Task: %-5u Lock: (%02X) %s\n" - msgstr " Úloha: %-5u Zámek: (%02X) %s\n" - --#: util/nwuserlist.c:436 -+#: util/nwuserlist.c:440 - #, c-format - msgid " Fork count: %-3u (%02X) %s\n" --msgstr "" -- --#: util/nwuserlist.c:437 -+msgstr " PoÄet vÄ›tví: %-3u (%02X) %s\n" -+ -+#: util/nwuserlist.c:441 - #, c-format - msgid " Namespace: (%02X) %-5s Access: (%02X) %s\n" - msgstr " Namespace: (%02X) %-5s Příst.: (%02X) %s\n" - --#: util/nwuserlist.c:439 -+#: util/nwuserlist.c:443 - #, c-format - msgid " Task: %-5u Lock: %s\n" - msgstr " Úloha: %-5u Zámek: %s\n" - --#: util/nwuserlist.c:440 -+#: util/nwuserlist.c:444 - #, c-format - msgid " Fork count: %-3u %s\n" --msgstr "" -- --#: util/nwuserlist.c:441 -+msgstr " PoÄet vÄ›tví: %-3u %s\n" -+ -+#: util/nwuserlist.c:445 - #, c-format - msgid " Namespace: %-5s Access: %s\n" - msgstr " Namespace: %-5s Příst.: %s\n" - --#: util/nwuserlist.c:453 -+#: util/nwuserlist.c:457 - #, c-format - msgid " Semaphore: %s\n" - msgstr " Semafor: %s\n" - --#: util/nwuserlist.c:455 -+#: util/nwuserlist.c:459 - #, c-format - msgid " Task: %-5u Value: %-5d Open Count: %-5u\n" - msgstr " Úloha: %-5u Hodnota: %-5d PoÄet otevÅ™ení: %-5u\n" - --#: util/nwuserlist.c:467 -+#: util/nwuserlist.c:471 - #, c-format - msgid " Type: (%02X) %-9.9s Status: (%08X) %s\n" - msgstr " Typ: (%02X) %-9.9s Status: (%08X) %s\n" - --#: util/nwuserlist.c:470 -+#: util/nwuserlist.c:474 - #, c-format - msgid " Use count: %-9u ExpTime: %08X ObjType: %08X\n" - msgstr "" - --#: util/nwuserlist.c:472 -+#: util/nwuserlist.c:476 - #, c-format - msgid " Transaction flag: %9u Filler: %18u\n" - msgstr "" - --#: util/nwuserlist.c:474 -+#: util/nwuserlist.c:478 - #, c-format - msgid " Logical lock threshold: %3u Record lock threshold: %3u\n" - msgstr "" - --#: util/nwuserlist.c:476 -+#: util/nwuserlist.c:480 - #, c-format - msgid " File write flags: 0x%02X File write state: 0x%02X\n" - msgstr "" - --#: util/nwuserlist.c:478 -+#: util/nwuserlist.c:482 - #, c-format - msgid " File lock count: %10u Record lock count: %7u\n" - msgstr "" - --#: util/nwuserlist.c:481 -+#: util/nwuserlist.c:485 - #, c-format - msgid " Type: %-14s Status: %s\n" - msgstr " Typ: %-14s Status: %s\n" - --#: util/nwuserlist.c:485 -+#: util/nwuserlist.c:489 - msgid "Bytes read:" - msgstr "ÄŒtené Byty:" - --#: util/nwuserlist.c:485 util/nwuserlist.c:486 util/nwuserlist.c:489 --#: util/nwuserlist.c:490 -+#: util/nwuserlist.c:489 util/nwuserlist.c:490 util/nwuserlist.c:493 -+#: util/nwuserlist.c:494 - msgid "B" - msgstr "B" - --#: util/nwuserlist.c:486 -+#: util/nwuserlist.c:490 - msgid "Bytes written:" - msgstr "Zapsané Byty:" - --#: util/nwuserlist.c:487 -+#: util/nwuserlist.c:491 - msgid "Requests:" - msgstr "Požadavky:" - --#: util/nwuserlist.c:489 -+#: util/nwuserlist.c:493 - msgid "Held bytes read:" - msgstr "" - --#: util/nwuserlist.c:490 -+#: util/nwuserlist.c:494 - msgid "Held bytes written:" - msgstr "" - --#: util/nwuserlist.c:491 -+#: util/nwuserlist.c:495 - msgid "Held requests:" - msgstr "" - -@@ -4876,12 +5042,12 @@ msgstr "Volno : %dK\n" - #: util/nwvolinfo.c:153 - #, c-format - msgid "Purgable : %dK\n" --msgstr "" -+msgstr "Odstranit: %dK\n" - - #: util/nwvolinfo.c:154 - #, c-format - msgid "No Purg. : %dK\n" --msgstr "" -+msgstr "Neodstr. : %dK\n" - - #: util/nwvolinfo.c:155 - #, c-format -@@ -4920,38 +5086,9 @@ msgstr "ID fronty" - msgstr "ID fronty" - - #: util/pqlist.c:231 -+#, c-format - msgid "No queues found\n" - msgstr "Žádná fronta nebyla nalezena\n" -- --#: util/pqrm.c:65 --#, c-format --msgid "usage: %s [ ...]\n" --msgstr "použití: %s <úloha> [<úloha> ...]\n" -- --#: util/pqrm.c:85 util/pqstat.c:182 --#, c-format --msgid "Queue \"%s\" on server %s not found.\n" --msgstr "Tisková fronta \"%s\" nebyla na serveru %s nalezena.\n" -- --#: util/pqrm.c:99 --#, c-format --msgid "Cannot parse \"%s\" - jobID must be hexadecimal number\n" --msgstr "Nemohu pochopit \"%s\" - Äíslo úlohy musí být Å¡estnáctkové Äíslo\n" -- --#: util/pqrm.c:105 --#, c-format --msgid "Job %08X does not exist\n" --msgstr "Úloha %08X neexistuje\n" -- --#: util/pqrm.c:107 --#, c-format --msgid "You have not rights to cancel job %08X\n" --msgstr "Nemáte dostatek práv na ukonÄení úlohy %08X\n" -- --#: util/pqrm.c:109 --#, c-format --msgid "Cannot cancel job %08X: %s\n" --msgstr "Nemohu ukonÄit úlohu %08X: %s\n" - - #: util/pqstat.c:113 - #, c-format -@@ -4994,7 +5131,7 @@ msgstr "Stav" - - #: util/pqstat.c:209 - msgid "Form" --msgstr "" -+msgstr "Form" - - #: util/pqstat.c:209 - msgid "Job ID" -@@ -5070,56 +5207,6 @@ msgstr "" - "-h Vytiskni tuto nápovÄ›du\n" - "\n" - --#: util/pserver.c:132 --#, c-format --msgid "Queue %s not found: %s\n" --msgstr "Tisková fronta %s nebyla nalezena: %s\n" -- --#: util/pserver.c:141 --#, c-format --msgid "Could not attach to queue %s: %s\n" --msgstr "Nemohu se pÅ™ipojit k tiskové frontÄ› %s: %s\n" -- --#: util/pserver.c:221 --#, c-format --msgid "Cannot service print job: %s\n" --msgstr "Nemohu zpracovat tiskovou úlohu: %s\n" -- --#: util/pserver.c:239 --#, c-format --msgid "" --msgstr "" -- --#: util/pserver.c:244 --#, c-format --msgid "pipe error: %m" --msgstr "" -- --#: util/pserver.c:249 --#, c-format --msgid "fork error: %m" --msgstr "" -- --#: util/pserver.c:275 --#, c-format --msgid "waitpid: %m\n" --msgstr "" -- --#: util/pserver.c:289 --#, c-format --msgid "dup2 error: %m\n" --msgstr "chyba dup2: %m\n" -- --#: util/pserver.c:299 --#, c-format --msgid "exec error: %m\n" --msgstr "nemohu spustit: %m\n" -- --#: util/pserver.c:404 --#, c-format --msgid "You must specify a queue\n" --msgstr "Musíte uvést název fronty\n" -- - #: util/slist.c:68 - msgid "in ncp_open" - msgstr "v ncp_open" -@@ -5149,6 +5236,9 @@ msgstr "" - msgstr "" - "Zpráva ze serveru NetWare: %s\n" - "%s" -+ -+#~ msgid "NWDSWhoAmi returned %s\n" -+#~ msgstr "NWDSWhoAmI vrátilo %s\n" - - #~ msgid "close error\n" - #~ msgstr "chyba pÅ™i uzavírání\n" - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-438.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-438.patch deleted file mode 100644 index 187f915..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-438.patch +++ /dev/null @@ -1,23 +0,0 @@ -changeset: 438:e635f8099d50 -user: Petr Vandrovec -date: Sun Jul 03 22:46:56 2005 +0100 -files: po/cs.gmo po/cs.po -description: -Fix typo in Czech translations. - - -diff -r 06067530cbec -r e635f8099d50 po/cs.gmo -Binary file po/cs.gmo has changed -diff -r 06067530cbec -r e635f8099d50 po/cs.po ---- a/po/cs.po Sun Jul 03 21:50:24 2005 +0100 -+++ b/po/cs.po Sun Jul 03 22:46:56 2005 +0100 -@@ -2137,7 +2137,7 @@ msgstr "chyba pÅ™i vytváření\n" - #: util/ncptest.c:134 - #, c-format - msgid "dealloc error\n" --msgstr "chyba pÅ™i dealokaci" -+msgstr "chyba pÅ™i dealokaci\n" - - #: util/ncptest.c:137 - #, c-format - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-439.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-439.patch deleted file mode 100644 index 2b9d6ba..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-439.patch +++ /dev/null @@ -1,162 +0,0 @@ -changeset: 439:0ba24cdb345c -user: Petr Vandrovec -date: Sun Jul 03 23:57:27 2005 +0100 -files: lib/ndslib.c -description: -Convert some unsigned char* to const unsigned char* in lib/ndslib.c. - -Constify some pointers in the RSA computations, so we do not see -any ugly warnings during build. - - -diff -r e635f8099d50 -r 0ba24cdb345c lib/ndslib.c ---- a/lib/ndslib.c Sun Jul 03 22:46:56 2005 +0100 -+++ b/lib/ndslib.c Sun Jul 03 23:57:27 2005 +0100 -@@ -233,7 +233,7 @@ static void fillrandom(nuint8 *buf, size - } - #endif - --static int countbits_l(unsigned char *buf, int bufsize) { -+static int countbits_l(const unsigned char *buf, int bufsize) { - unsigned char b; - - while ((--bufsize) && (!buf[bufsize])); -@@ -253,7 +253,7 @@ static void copyfill(void *outbuf, int o - - static char keyprefix[] = {1, 0, 0, 0, 3, 0, 1, 0}; - --static int initkey(const unsigned char *key, unsigned char **keyptr, size_t *keylen) { /* 1=ok, 0=err */ -+static int initkey(const unsigned char *key, const unsigned char **keyptr, size_t *keylen) { /* 1=ok, 0=err */ - if (!memcmp(key, keyprefix, 8)) { - if (keylen) *keylen = WVAL_LH(key, 8); - if (keyptr) *keyptr = key + 10; -@@ -263,14 +263,14 @@ static int initkey(const unsigned char * - } - - static void clearkey(unsigned char *key) { -- unsigned char *keyptr; -+ const unsigned char *keyptr; - size_t keylen; - - if (initkey(key, &keyptr, &keylen)) - memset(key, 0, keylen + 10); - } - --static int findchunk(const unsigned char *keyptr, size_t keylen, const char *chunk, unsigned char **chunkptr) { -+static int findchunk(const unsigned char *keyptr, size_t keylen, const char *chunk, const unsigned char **chunkptr) { - const unsigned char *p; - - if ((p = keyptr)) { -@@ -278,7 +278,7 @@ static int findchunk(const unsigned char - if ((p[0] != chunk[0]) || (p[1] != chunk[1])) { - p += 4 + p[2] + p[3]; - } else { -- if (chunkptr) *chunkptr = (unsigned char*)p + 4; -+ if (chunkptr) *chunkptr = p + 4; - return p[2] + p[3]; - } - } -@@ -332,7 +332,7 @@ static void dumpkey(const nuint8 *key, s - - static int checkkey(const unsigned char *key) { /* 0 - wrong key, != 0 - key ok */ - unsigned char temp[8]; -- unsigned char *keyptr, *p; -+ const unsigned char *keyptr, *p; - size_t keylen; - - if ((initkey(key, &keyptr, &keylen)) && -@@ -350,12 +350,12 @@ static ncpt_mutex_t mpilock = NCPT_MUTEX - static ncpt_mutex_t mpilock = NCPT_MUTEX_INITIALIZER; - - static long modexpkey(const unsigned char *s_key, unsigned char *buf, unsigned char *outbuf, int bufsize) { -- unsigned char *s_keyptr; -+ const unsigned char *s_keyptr; - size_t s_keylen; - int i, nbits, nblocksize; - int err = -1; - unitptr nmod, nexp, nin, nout; -- unsigned char *p; -+ const unsigned char *p; - - nmod = nexp = nin = nout = NULL; - -@@ -402,7 +402,7 @@ end1: - - /* ctx must be in WCHAR_T mode, without DCV_CANONICALIZE_NAMES */ - static NWDSCCODE get_public_key(NWDSContextHandle ctx, const wchar_t* objname, nuint8 **key) { -- unsigned char *keybuf, *kptr; -+ const unsigned char *keybuf, *kptr; - NWDSCCODE err; - size_t keylen, ofs, klen; - Octet_String_T* ost; -@@ -420,12 +420,14 @@ static NWDSCCODE get_public_key(NWDSCont - goto err_exit; - } - if (key) { -- if (!(kptr = malloc(klen + 10))) { -+ unsigned char *kbuf; -+ -+ if (!(kbuf = malloc(klen + 10))) { - err = ENOMEM; - goto err_exit; - } -- memcpy(kptr, keybuf + ofs, klen + 10); -- *key = kptr; -+ memcpy(kbuf, keybuf + ofs, klen + 10); -+ *key = kbuf; - } - err = 0; - err_exit: -@@ -1073,7 +1075,8 @@ err_exit: - - static unsigned char *allocfillchunk(const unsigned char *keyptr, int keylen, - const char *chunk, int destsize) { -- unsigned char *p, *p2; -+ const unsigned char *p; -+ unsigned char *p2; - int i; - - i = findchunk(keyptr, keylen, chunk, &p); -@@ -1108,7 +1111,7 @@ static NWDSCCODE gen_auth_data( - const nuint8* authid, - nuint8 *loginstrc, - int loginstrc_len) { -- nuint8 *keyptr; -+ const unsigned char *keyptr; - size_t keylen; - int i, j; - int nbits, nblocksize, nbytes, nblocksize_nw; -@@ -1117,6 +1120,7 @@ static NWDSCCODE gen_auth_data( - unitptr n_key_dp, n_key_dq; - unitptr up, up2; - unitptr randbuf; -+ const unsigned char *pkey; - nuint8 *p; - nuint8 *tempbuf; - nuint8 hashbuf[0x42]; -@@ -1127,12 +1131,12 @@ static NWDSCCODE gen_auth_data( - ISRPrint("Initkey failed\n"); - return ERR_INVALID_SERVER_RESPONSE; - } -- i = findchunk(keyptr, keylen, "NN", &p); -- if (!p) { -+ i = findchunk(keyptr, keylen, "NN", &pkey); -+ if (!pkey) { - ISRPrint("NN chunk not found\n"); - return ERR_INVALID_SERVER_RESPONSE; - } -- nbits = countbits_l(p, i); -+ nbits = countbits_l(pkey, i); - nbytes = (nbits + 7) >> 3; - nmask = (unsigned char)(255 >> (8 - (nbits & 7))); - /* we really want (x + 31) & ~15... I'm sorry, but Novell thinks that way */ -@@ -1828,7 +1832,7 @@ NWDSCCODE __NWGenerateKeyPair( - void* privkey, - size_t* privkey_len - ) { -- nuint8 def_exp[] = { 1, 0, 1}; -+ static const nuint8 def_exp[] = { 1, 0, 1}; - struct keyparam kp; - NWDSCCODE err; - size_t bits; - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-440.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-440.patch deleted file mode 100644 index 6a0c94a..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-440.patch +++ /dev/null @@ -1,66 +0,0 @@ -changeset: 440:7f46ab032bd8 -user: Petr Vandrovec -date: Mon Jul 04 00:01:49 2005 +0100 -files: lib/ndslib.c lib/ndslib_i.h -description: -Rename exp argument to n_exp in ndslib. - -Rename exp to n_exp (and exp_len to n_exp_len) to get rid -of warning that exp argument shadows exp() mathematic -function. Although we do not use exp() function anywhere, -it is gcc builtin internal, and exists in the namespace -since compilation start. - - -diff -r 0ba24cdb345c -r 7f46ab032bd8 lib/ndslib.c ---- a/lib/ndslib.c Sun Jul 03 23:57:27 2005 +0100 -+++ b/lib/ndslib.c Mon Jul 04 00:01:49 2005 +0100 -@@ -1825,8 +1825,8 @@ static int ComputeKey(struct keyparam *k - - NWDSCCODE __NWGenerateKeyPair( - size_t key_len, -- const void* exp, -- size_t exp_len, -+ const void* n_exp, -+ size_t n_exp_len, - void* pubkey, - size_t* pubkey_len, - void* privkey, -@@ -1839,19 +1839,19 @@ NWDSCCODE __NWGenerateKeyPair( - size_t words; /* netware native units */ - - if (!pubkey || !pubkey_len || !privkey || !privkey_len) return -2; -- if (!key_len || !exp || !exp_len) { -- exp = def_exp; -- exp_len = sizeof(def_exp); -+ if (!key_len || !n_exp || !n_exp_len) { -+ n_exp = def_exp; -+ n_exp_len = sizeof(def_exp); - key_len = 420; /* well, at least 620 does work too */ - } else { -- if ((key_len > 760) || (key_len < 256) || (key_len & 1) || (exp_len > 16)) { -+ if ((key_len > 760) || (key_len < 256) || (key_len & 1) || (n_exp_len > 16)) { - return NWE_PARAM_INVALID; - } - } - memset(&kp, 0, sizeof(kp)); - kp.BA = 48; - kp.BL = key_len; -- memcpy(kp.n_exp, exp, exp_len); -+ memcpy(kp.n_exp, n_exp, n_exp_len); - ncpt_mutex_lock(&mpilock); - set_precision(bits2units(kp.BL) + SLOP_BITS); - if ((countbits(kp.n_exp) > kp.BL) || !(kp.n_exp[0] & 1)) { -diff -r 0ba24cdb345c -r 7f46ab032bd8 lib/ndslib_i.h ---- a/lib/ndslib_i.h Sun Jul 03 23:57:27 2005 +0100 -+++ b/lib/ndslib_i.h Mon Jul 04 00:01:49 2005 +0100 -@@ -38,7 +38,7 @@ NWDSCCODE NWDSGetKeys(NWDSContextHandle - /* ctx must be in wchar_t mode */ - NWDSCCODE __NWDSGetPublicKeyFromConnection(NWDSContextHandle ctx, - NWCONN_HANDLE conn, nuint8 **skey); --NWDSCCODE __NWGenerateKeyPair(size_t key_len, const void* exp, size_t exp_len, -+NWDSCCODE __NWGenerateKeyPair(size_t key_len, const void* n_exp, size_t n_exp_len, - void* pubkey, size_t* pubkey_len, - void* privkey, size_t* privkey_len); - NWDSCCODE __NWEncryptWithSK(const void* hashsrc, size_t hashsrclen, - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-441.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-441.patch deleted file mode 100644 index b35e613..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-441.patch +++ /dev/null @@ -1,977 +0,0 @@ -changeset: 441:fbfcfbb3c88d -user: Petr Vandrovec -date: Mon Jul 11 00:42:47 2005 +0100 -files: contrib/testing/dirlimit.c contrib/testing/dssearch.c contrib/testing/eaops.c contrib/testing/fileinfo.c contrib/testing/large.c contrib/testing/mkfile.c contrib/testing/nsfileinfo.c contrib/testing/nwdsgethost.c contrib/testing/nwdspartlist.c contrib/testing/pp/getconn_addr.c contrib/testing/pp/nwgetconnlist.c contrib/testing/readaddr.c contrib/testing/readadef.c contrib/testing/readcls.c contrib/testing/resint.c contrib/testing/timeinfo.c contrib/testing/wcsmbs-tst1.c ipx-1.0/Samples/ipxrcv.c ipx-1.0/Samples/ipxsend.c ipx-1.0/Samples/rip.c ipx-1.0/Samples/sap.c lib/ncplib.c lib/nwclient.c sutil/ncpm_common.c util/nwdir.c util/nwuserlist.c -description: -Fix printf argument mismatches revealed by gcc-4.0 on amd64. - - -diff -r 7f46ab032bd8 -r fbfcfbb3c88d contrib/testing/dirlimit.c ---- a/contrib/testing/dirlimit.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/contrib/testing/dirlimit.c Mon Jul 11 00:42:47 2005 +0100 -@@ -146,9 +146,9 @@ int main(int argc, char *argv[]) { - } else { - size_t c; - -- printf("%u entries returned\n", x.numEntries); -+ printf("%zu entries returned\n", x.numEntries); - for (c = 0; c < x.numEntries; c++) { -- printf("Entry %u: Level: %u\n", c, x.list[c].level); -+ printf("Entry %zu: Level: %u\n", c, x.list[c].level); - printf(" Max: %u\n", x.list[c].max); - printf(" Current: %u\n", x.list[c].current); - printf(" Used: %u\n", x.list[c].max - x.list[c].current); -diff -r 7f46ab032bd8 -r fbfcfbb3c88d contrib/testing/dssearch.c ---- a/contrib/testing/dssearch.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/contrib/testing/dssearch.c Mon Jul 11 00:42:47 2005 +0100 -@@ -163,7 +163,7 @@ static void prtattr(NWDSContextHandle ct - size_t rl = sizeof(name); - while ((rl > 0) && (name[rl - 1] == '\xEE')) rl--; - if (cs != rl) { -- printf("SYNT %d: computed: %u, real: %u\n", synt, cs, rl); -+ printf("SYNT %d: computed: %zu, real: %zu\n", synt, cs, rl); - } - } - switch (synt) { -@@ -181,7 +181,7 @@ static void prtattr(NWDSContextHandle ct - Octet_String_T* os = (Octet_String_T*)name; - size_t i; - -- printf("%s Value: length=%u\n", pref, os->length); -+ printf("%s Value: length=%zu\n", pref, os->length); - printf("%s ", pref); - for (i = 0; i < os->length; i++) - printf("%02X ", os->data[i]); -@@ -214,7 +214,7 @@ static void prtattr(NWDSContextHandle ct - size_t z; - - printf("%s Type: %u\n", pref, na->addressType); -- printf("%s Length: %u\n", pref, na->addressLength); -+ printf("%s Length: %zu\n", pref, na->addressLength); - printf("%s Data: ", pref); - for (z = 0; z < na->addressLength; z++) - printf("%02X ", na->address[z]); -@@ -231,12 +231,12 @@ static void prtattr(NWDSContextHandle ct - printf("%s Server Name: '%s'\n", pref, rp->serverName); - printf("%s Replica Type: %u\n", pref, rp->replicaType); - printf("%s Replica Number: %u\n", pref, rp->replicaNumber); -- printf("%s Address Count: %u\n", pref, rp->count); -+ printf("%s Address Count: %zu\n", pref, rp->count); - for (cntv = rp->count, qp = rp->replicaAddressHint; cntv--; qp++) { - size_t z; - - printf("%s Type: %u\n", pref, qp->addressType); -- printf("%s Length: %u\n", pref, qp->addressLength); -+ printf("%s Length: %zu\n", pref, qp->addressLength); - printf("%s Data: ", pref); - for (z = 0; z < qp->addressLength; z++) - printf("%02X ", qp->address[z]); -@@ -292,7 +292,7 @@ static void prtattr(NWDSContextHandle ct - for (; ol; ol = ol->next) { - size_t i; - -- printf("%s Value: Length: %u\n", pref, ol->length); -+ printf("%s Value: Length: %zu\n", pref, ol->length); - printf("%s ", pref); - for (i = 0; i < ol->length; i++) - printf("%02X ", ol->data[i]); -@@ -313,7 +313,7 @@ static void prtattr(NWDSContextHandle ct - Fax_Number_T* fn = (Fax_Number_T*)name; - - printf("%s Fax Number: '%s'\n", pref, fn->telephoneNumber); -- printf("%s Parameter bits: %u\n", pref, fn->parameters.numOfBits); -+ printf("%s Parameter bits: %zu\n", pref, fn->parameters.numOfBits); - } - break; - case SYN_EMAIL_ADDRESS: -diff -r 7f46ab032bd8 -r fbfcfbb3c88d contrib/testing/eaops.c ---- a/contrib/testing/eaops.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/contrib/testing/eaops.c Mon Jul 11 00:42:47 2005 +0100 -@@ -90,10 +90,10 @@ static void eaenum0(NWCONN_HANDLE conn, - fprintf(stderr, "Enumeration extended fail: %s\n", - strnwerror((winfo.errorCode & 0xFF) | NWE_SERVER_ERROR)); - } else { -- printf("Total EAs: %u\n", winfo.totalEAs); -- printf("DataSize: %u\n", winfo.totalEAsDataSize); -- printf("KeySize: %u\n", winfo.totalEAsKeySize); -- printf("New EA handle: %08X\n", winfo.newEAhandle); -+ printf("Total EAs: %lu\n", (unsigned long)winfo.totalEAs); -+ printf("DataSize: %lu\n", (unsigned long)winfo.totalEAsDataSize); -+ printf("KeySize: %lu\n", (unsigned long)winfo.totalEAsKeySize); -+ printf("New EA handle: %08lX\n", (unsigned long)winfo.newEAhandle); - } - if (winfo.newEAhandle) { - /* should not happen as we used NWEA_FL_CLOSE_IMM */ -@@ -111,7 +111,7 @@ static void eaenum1(NWCONN_HANDLE conn, - struct ncp_ea_enumerate_info winfo; - NWCCODE err; - int sawtitle = 0; -- size_t eaid = 1; -+ unsigned int eaid = 1; - - winfo.enumSequence = 0; - err = ncp_ea_enumerate(conn, -@@ -134,15 +134,15 @@ static void eaenum1(NWCONN_HANDLE conn, - } - - if (!sawtitle) { -- printf("Total EAs: %u\n", winfo.totalEAs); -- printf("DataSize: %u\n", winfo.totalEAsDataSize); -- printf("KeySize: %u\n", winfo.totalEAsKeySize); -+ printf("Total EAs: %lu\n", (unsigned long)winfo.totalEAs); -+ printf("DataSize: %lu\n", (unsigned long)winfo.totalEAsDataSize); -+ printf("KeySize: %lu\n", (unsigned long)winfo.totalEAsKeySize); - sawtitle = 1; - } -- printf("New EA handle: %08X\n", winfo.newEAhandle); -- printf("New search seq: %u\n", winfo.enumSequence); -- printf("Returned items: %u\n", winfo.returnedItems); -- printf("Size: %u\n", pos); -+ printf("New EA handle: %08lX\n", (unsigned long)winfo.newEAhandle); -+ printf("New search seq: %lu\n", (unsigned long)winfo.enumSequence); -+ printf("Returned items: %lu\n", (unsigned long)winfo.returnedItems); -+ printf("Size: %zu\n", pos); - - p = vv; - for (rinfo = 0; rinfo < winfo.returnedItems; rinfo++) { -@@ -156,8 +156,8 @@ static void eaenum1(NWCONN_HANDLE conn, - else { - printf(" Key %u:\n", eaid); - printf(" Name: %s\n", ppp.key); -- printf(" Access Flag: %08X\n", ppp.accessFlag); -- printf(" Value Length: %u\n", ppp.valueLength); -+ printf(" Access Flag: %08lX\n", (unsigned long)ppp.accessFlag); -+ printf(" Value Length: %lu\n", (unsigned long)ppp.valueLength); - } - eaid++; - } -@@ -183,7 +183,7 @@ static void eaenum6(NWCONN_HANDLE conn, - size_t pos; - struct ncp_ea_enumerate_info winfo; - NWCCODE err; -- size_t eaid = 1; -+ unsigned int eaid = 1; - - winfo.enumSequence = 0; - err = ncp_ea_enumerate(conn, -@@ -202,13 +202,13 @@ static void eaenum6(NWCONN_HANDLE conn, - size_t rinfo; - const unsigned char* p; - -- printf("Total EAs: %u\n", winfo.totalEAs); -- printf("DataSize: %u\n", winfo.totalEAsDataSize); -- printf("KeySize: %u\n", winfo.totalEAsKeySize); -- printf("New EA handle: %08X\n", winfo.newEAhandle); -- printf("New search seq: %u\n", winfo.enumSequence); -- printf("Returned items: %u\n", winfo.returnedItems); -- printf("Size: %u\n", pos); -+ printf("Total EAs: %lu\n", (unsigned long)winfo.totalEAs); -+ printf("DataSize: %lu\n", (unsigned long)winfo.totalEAsDataSize); -+ printf("KeySize: %lu\n", (unsigned long)winfo.totalEAsKeySize); -+ printf("New EA handle: %08lX\n", (unsigned long)winfo.newEAhandle); -+ printf("New search seq: %lu\n", (unsigned long)winfo.enumSequence); -+ printf("Returned items: %lu\n", (unsigned long)winfo.returnedItems); -+ printf("Size: %zu\n", pos); - - p = vv; - for (rinfo = 0; rinfo < winfo.returnedItems; rinfo++) { -@@ -222,10 +222,10 @@ static void eaenum6(NWCONN_HANDLE conn, - else { - printf(" Key %u:\n", eaid); - printf(" Name: %s\n", ppp.key); -- printf(" Access Flag: %08X\n", ppp.accessFlag); -- printf(" Value Length: %u\n", ppp.valueLength); -- printf(" Key Extants: %u\n", ppp.keyExtants); -- printf(" Value Extants: %u\n", ppp.valueExtants); -+ printf(" Access Flag: %08lX\n", (unsigned long)ppp.accessFlag); -+ printf(" Value Length: %lu\n", (unsigned long)ppp.valueLength); -+ printf(" Key Extants: %lu\n", (unsigned long)ppp.keyExtants); -+ printf(" Value Extants: %lu\n", (unsigned long)ppp.valueExtants); - } - eaid++; - } -@@ -246,7 +246,7 @@ static void eaenum7(NWCONN_HANDLE conn, - struct ncp_ea_enumerate_info winfo; - NWCCODE err; - int sawtitle = 0; -- size_t eaid = 1; -+ unsigned int eaid = 1; - - winfo.enumSequence = 0; - err = ncp_ea_enumerate(conn, -@@ -269,15 +269,15 @@ static void eaenum7(NWCONN_HANDLE conn, - } - - if (!sawtitle) { -- printf("Total EAs: %u\n", winfo.totalEAs); -- printf("DataSize: %u\n", winfo.totalEAsDataSize); -- printf("KeySize: %u\n", winfo.totalEAsKeySize); -+ printf("Total EAs: %lu\n", (unsigned long)winfo.totalEAs); -+ printf("DataSize: %lu\n", (unsigned long)winfo.totalEAsDataSize); -+ printf("KeySize: %lu\n", (unsigned long)winfo.totalEAsKeySize); - sawtitle = 1; - } -- printf("New EA handle: %08X\n", winfo.newEAhandle); -- printf("New search seq: %u\n", winfo.enumSequence); -- printf("Returned items: %u\n", winfo.returnedItems); -- printf("Size: %u\n", pos); -+ printf("New EA handle: %08lX\n", (unsigned long)winfo.newEAhandle); -+ printf("New search seq: %lu\n", (unsigned long)winfo.enumSequence); -+ printf("Returned items: %lu\n", (unsigned long)winfo.returnedItems); -+ printf("Size: %zu\n", pos); - - p = vv; - for (rinfo = 0; rinfo < winfo.returnedItems; rinfo++) { -@@ -335,13 +335,13 @@ static void eaenumX(NWCONN_HANDLE conn, - break; - } - -- printf("Total EAs: %u\n", winfo.totalEAs); -- printf("DataSize: %u\n", winfo.totalEAsDataSize); -- printf("KeySize: %u\n", winfo.totalEAsKeySize); -- printf("New EA handle: %08X\n", winfo.newEAhandle); -- printf("New search seq: %u\n", winfo.enumSequence); -- printf("Returned items: %u\n", winfo.returnedItems); -- printf("Size: %u\n", pos); -+ printf("Total EAs: %lu\n", (unsigned long)winfo.totalEAs); -+ printf("DataSize: %lu\n", (unsigned long)winfo.totalEAsDataSize); -+ printf("KeySize: %lu\n", (unsigned long)winfo.totalEAsKeySize); -+ printf("New EA handle: %08lX\n", (unsigned long)winfo.newEAhandle); -+ printf("New search seq: %lu\n", (unsigned long)winfo.enumSequence); -+ printf("Returned items: %lu\n", (unsigned long)winfo.returnedItems); -+ printf("Size: %zu\n", pos); - - printf("Returned data: "); - p = vv; -@@ -396,16 +396,16 @@ static void eawritebuf(NWCONN_HANDLE con - break; - } - if (winfo.written != tbs) { -- fprintf(stderr, "Partial write: %u instead of %u\n", -- winfo.written, tbs); -+ fprintf(stderr, "Partial write: %lu instead of %zu\n", -+ (unsigned long)winfo.written, tbs); - break; - } - cpos += winfo.written; - if (cpos >= buflen) { -- printf("Successfully written %u bytes\n", cpos); -- break; -- } -- printf("%u\r", cpos); fflush(stdout); -+ printf("Successfully written %zu bytes\n", cpos); -+ break; -+ } -+ printf("%zu\r", cpos); fflush(stdout); - - attrname = ""; - dirent = 0; -@@ -459,7 +459,7 @@ static void eawrite(NWCONN_HANDLE conn, - if (!nb) { - fprintf(stderr, "Cannot allocate memory: %s\n", - strerror(errno)); -- printf("Continuing with %u bytes read\n", -+ printf("Continuing with %zu bytes read\n", - used); - break; - } -diff -r 7f46ab032bd8 -r fbfcfbb3c88d contrib/testing/fileinfo.c ---- a/contrib/testing/fileinfo.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/contrib/testing/fileinfo.c Mon Jul 11 00:42:47 2005 +0100 -@@ -69,21 +69,21 @@ help(void) - - static void printstruct2(u_int32_t rim, struct nw_info_struct2* info) { - if (rim & RIM_SPACE_ALLOCATED) { -- printf("Space Allocated: %08LX (%Ld)\n", info->SpaceAllocated, -- info->SpaceAllocated); -+ printf("Space Allocated: %08llX (%lld)\n", (unsigned long long)info->SpaceAllocated, -+ (unsigned long long)info->SpaceAllocated); - } - if (rim & RIM_ATTRIBUTES) { - printf("Attributes: %08X\n", info->Attributes.Attributes); - printf("Flags: %04X\n", info->Attributes.Flags); - } - if (rim & (RIM_DATA_SIZE | RIM_SIZE64)) { -- printf("Data Size: %08LX (%Ld)\n", info->DataSize, -- info->DataSize); -+ printf("Data Size: %08llX (%lld)\n", (unsigned long long)info->DataSize, -+ (unsigned long long)info->DataSize); - } - if (rim & RIM_TOTAL_SIZE) { - printf("Total Size: %08X (%d)\n", info->TotalSize.TotalAllocated, - info->TotalSize.TotalAllocated); -- printf("Datastreams: %d\n", info->TotalSize.Datastreams); -+ printf("Datastreams: %zd\n", info->TotalSize.Datastreams); - } - if (rim & RIM_EXT_ATTR_INFO) { - printf("ExtAttrInfo.DataSize: %08X (%d)\n", info->ExtAttrInfo.DataSize, -diff -r 7f46ab032bd8 -r fbfcfbb3c88d contrib/testing/large.c ---- a/contrib/testing/large.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/contrib/testing/large.c Mon Jul 11 00:42:47 2005 +0100 -@@ -64,21 +64,21 @@ help(void) - - static void printstruct2(u_int32_t rim, struct nw_info_struct2* info) { - if (rim & RIM_SPACE_ALLOCATED) { -- printf("Space Allocated: %08LX (%Ld)\n", info->SpaceAllocated, -- info->SpaceAllocated); -+ printf("Space Allocated: %08llX (%lld)\n", (unsigned long long)info->SpaceAllocated, -+ (unsigned long long)info->SpaceAllocated); - } - if (rim & RIM_ATTRIBUTES) { - printf("Attributes: %08X\n", info->Attributes.Attributes); - printf("Flags: %04X\n", info->Attributes.Flags); - } - if (rim & RIM_DATA_SIZE) { -- printf("Data Size: %08LX (%Ld)\n", info->DataSize, -- info->DataSize); -+ printf("Data Size: %08llX (%lld)\n", (unsigned long long)info->DataSize, -+ (unsigned long long)info->DataSize); - } - if (rim & RIM_TOTAL_SIZE) { - printf("Total Size: %08X (%d)\n", info->TotalSize.TotalAllocated, - info->TotalSize.TotalAllocated); -- printf("Datastreams: %d\n", info->TotalSize.Datastreams); -+ printf("Datastreams: %zd\n", info->TotalSize.Datastreams); - } - if (rim & RIM_EXT_ATTR_INFO) { - printf("ExtAttrInfo.DataSize: %08X (%d)\n", info->ExtAttrInfo.DataSize, -@@ -272,7 +272,7 @@ int main(int argc, char *argv[]) { - dserr = ncp_write64(conn, fh, offs, length, databuffer, &lnw); - printf("64-bit write request done with %s\n", strnwerror(dserr)); - if (dserr == 0) { -- printf("%u bytes written\n", lnw); -+ printf("%zu bytes written\n", lnw); - } - } else if (dolen) { - u_int64_t ln; -@@ -280,7 +280,7 @@ int main(int argc, char *argv[]) { - dserr = ncp_get_file_size(conn, fh, &ln); - printf("64-bit file length request done with %s\n", strnwerror(dserr)); - if (dserr == 0) { -- printf("%llu bytes (0x%016llX)\n", ln, ln); -+ printf("%llu bytes (0x%016llX)\n", (unsigned long long)ln, (unsigned long long)ln); - } - } else { - size_t lnr; -@@ -288,7 +288,7 @@ int main(int argc, char *argv[]) { - dserr = ncp_read64(conn, fh, offs, length, databuffer, &lnr); - printf("64-bit read request done with %s\n", strnwerror(dserr)); - if (dserr == 0) { -- printf("%u bytes read\n", lnr); -+ printf("%zu bytes read\n", lnr); - #if 0 - fwrite(databuffer, 1, lnr, stdout); - #else -diff -r 7f46ab032bd8 -r fbfcfbb3c88d contrib/testing/mkfile.c ---- a/contrib/testing/mkfile.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/contrib/testing/mkfile.c Mon Jul 11 00:42:47 2005 +0100 -@@ -61,21 +61,21 @@ help(void) - - static void printstruct2(u_int32_t rim, struct nw_info_struct2* info) { - if (rim & RIM_SPACE_ALLOCATED) { -- printf("Space Allocated: %08LX (%Ld)\n", info->SpaceAllocated, -- info->SpaceAllocated); -+ printf("Space Allocated: %08llX (%lld)\n", (unsigned long long)info->SpaceAllocated, -+ (unsigned long long)info->SpaceAllocated); - } - if (rim & RIM_ATTRIBUTES) { - printf("Attributes: %08X\n", info->Attributes.Attributes); - printf("Flags: %04X\n", info->Attributes.Flags); - } - if (rim & RIM_DATA_SIZE) { -- printf("Data Size: %08LX (%Ld)\n", info->DataSize, -- info->DataSize); -+ printf("Data Size: %08llX (%lld)\n", (unsigned long long)info->DataSize, -+ (unsigned long long)info->DataSize); - } - if (rim & RIM_TOTAL_SIZE) { - printf("Total Size: %08X (%d)\n", info->TotalSize.TotalAllocated, - info->TotalSize.TotalAllocated); -- printf("Datastreams: %d\n", info->TotalSize.Datastreams); -+ printf("Datastreams: %zd\n", info->TotalSize.Datastreams); - } - if (rim & RIM_EXT_ATTR_INFO) { - printf("ExtAttrInfo.DataSize: %08X (%d)\n", info->ExtAttrInfo.DataSize, -diff -r 7f46ab032bd8 -r fbfcfbb3c88d contrib/testing/nsfileinfo.c ---- a/contrib/testing/nsfileinfo.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/contrib/testing/nsfileinfo.c Mon Jul 11 00:42:47 2005 +0100 -@@ -64,14 +64,14 @@ static void printstruct2(struct ncp_name - static void printstruct2(struct ncp_namespace_format* info) { - int i; - -- printf("Bits: Fixed: %08X, count %d\n", info->BitMask.fixed, info->BitsDefined.fixed); -- printf("Bits: Variable: %08X, count %d\n", info->BitMask.variable, info->BitsDefined.variable); -- printf("Bits: Huge: %08X, count %d\n", info->BitMask.huge, info->BitsDefined.huge); -+ printf("Bits: Fixed: %08X, count %zd\n", info->BitMask.fixed, info->BitsDefined.fixed); -+ printf("Bits: Variable: %08X, count %zd\n", info->BitMask.variable, info->BitsDefined.variable); -+ printf("Bits: Huge: %08X, count %zd\n", info->BitMask.huge, info->BitsDefined.huge); - for (i = 0; i < 32; i++) { - int prt = 0; -- int mask = 1 << i; -+ unsigned int mask = 1 << i; - -- printf("Field %02X: %d bytes (", i, info->FieldsLength[i]); -+ printf("Field %02X: %zd bytes (", i, info->FieldsLength[i]); - if (info->BitMask.fixed & mask) { - printf("fixed"); - prt = 1; -diff -r 7f46ab032bd8 -r fbfcfbb3c88d contrib/testing/nwdsgethost.c ---- a/contrib/testing/nwdsgethost.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/contrib/testing/nwdsgethost.c Mon Jul 11 00:42:47 2005 +0100 -@@ -273,7 +273,7 @@ int main(int argc, char *argv[]) { - size_t rl = sizeof(name); - while ((rl > 0) && (name[rl - 1] == '\xEE')) rl--; - if (cs != rl) { -- printf("SYNT %d: computed: %u, real: %u\n", synt, cs, rl); -+ printf("SYNT %d: computed: %zu, real: %zu\n", synt, cs, rl); - } - } - switch (synt) { -@@ -291,7 +291,7 @@ int main(int argc, char *argv[]) { - Octet_String_T* os = (Octet_String_T*)name; - size_t i; - -- printf(" Value: length=%u\n", os->length); -+ printf(" Value: length=%zu\n", os->length); - printf(" "); - for (i = 0; i < os->length; i++) - printf("%02X ", os->data[i]); -@@ -324,7 +324,7 @@ int main(int argc, char *argv[]) { - size_t z; - - printf(" Type: %u\n", na->addressType); -- printf(" Length: %u\n", na->addressLength); -+ printf(" Length: %zu\n", na->addressLength); - printf(" Data: "); - for (z = 0; z < na->addressLength; z++) - printf("%02X ", na->address[z]); -@@ -341,12 +341,12 @@ int main(int argc, char *argv[]) { - printf(" Server Name: '%s'\n", rp->serverName); - printf(" Replica Type: %u\n", rp->replicaType); - printf(" Replica Number: %u\n", rp->replicaNumber); -- printf(" Address Count: %u\n", rp->count); -+ printf(" Address Count: %zu\n", rp->count); - for (rpcnt = rp->count, qp = rp->replicaAddressHint; rpcnt--; qp++) { - size_t z; - - printf(" Type: %u\n", qp->addressType); -- printf(" Length: %u\n", qp->addressLength); -+ printf(" Length: %zu\n", qp->addressLength); - printf(" Data: "); - for (z = 0; z < qp->addressLength; z++) - printf("%02X ", qp->address[z]); -@@ -402,7 +402,7 @@ int main(int argc, char *argv[]) { - for (; ol; ol = ol->next) { - size_t i; - -- printf(" Value: Length: %u\n", ol->length); -+ printf(" Value: Length: %zu\n", ol->length); - printf(" "); - for (i = 0; i < ol->length; i++) - printf("%02X ", ol->data[i]); -@@ -423,7 +423,7 @@ int main(int argc, char *argv[]) { - Fax_Number_T* fn = (Fax_Number_T*)name; - - printf(" Fax Number: '%s'\n", fn->telephoneNumber); -- printf(" Parameter bits: %u\n", fn->parameters.numOfBits); -+ printf(" Parameter bits: %zu\n", fn->parameters.numOfBits); - } - break; - case SYN_EMAIL_ADDRESS: -diff -r 7f46ab032bd8 -r fbfcfbb3c88d contrib/testing/nwdspartlist.c ---- a/contrib/testing/nwdspartlist.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/contrib/testing/nwdspartlist.c Mon Jul 11 00:42:47 2005 +0100 -@@ -252,7 +252,7 @@ int main(int argc, char *argv[]) { - printf("Server %s holds %u partitions\n", - sn, cnt); - while (!dserr && cnt--) { -- printf("Partition #%u\n", pcnt++); -+ printf("Partition #%zu\n", pcnt++); - if (req_present) { - char* start; - char* end; -@@ -273,7 +273,7 @@ int main(int argc, char *argv[]) { - nuint32 bit; - size_t len; - -- printf(" Partition info length: %10u\n", end - start); -+ printf(" Partition info length: %10zu\n", end - start); - if (req & DSP_OUTPUT_FIELDS) { - dserr = NWDSGetPartitionExtInfo(ctx, start, end, DSP_OUTPUT_FIELDS, &len, &pt); - if (dserr) { -@@ -281,7 +281,7 @@ int main(int argc, char *argv[]) { - strnwerror(dserr)); - pt = req; - } else { -- printf(" Output fields: %08X (%u bytes)\n", pt, len); -+ printf(" Output fields: %08X (%zu bytes)\n", pt, len); - } - } else { - pt = req; -@@ -295,38 +295,38 @@ int main(int argc, char *argv[]) { - else { - switch (bit) { - case DSP_PARTITION_ID: -- printf(" Partition ID: %08X (%u bytes)\n", info.id, len); -+ printf(" Partition ID: %08X (%zu bytes)\n", info.id, len); - break; - case DSP_REPLICA_STATE: -- printf(" Replica state: %10u (%u bytes)\n", info.x32, len); -+ printf(" Replica state: %10u (%zu bytes)\n", info.x32, len); - break; - case DSP_MODIFICATION_TIMESTAMP: -- printf(" Modification timestamp: %10u.%u.%u (%u bytes)\n", -+ printf(" Modification timestamp: %10u.%u.%u (%zu bytes)\n", - info.ts.wholeSeconds, info.ts.replicaNum, - info.ts.eventID, len); - break; - case DSP_PURGE_TIME: -- printf(" Purge time: %10u (%u bytes)\n", -+ printf(" Purge time: %10u (%zu bytes)\n", - info.x32, len); - break; - case DSP_LOCAL_PARTITION_ID: -- printf(" Local partition ID: %10u (%u bytes)\n", -+ printf(" Local partition ID: %10u (%zu bytes)\n", - info.x32, len); - break; - case DSP_PARTITION_DN: -- printf(" Partition DN: %s (%u bytes)\n", -+ printf(" Partition DN: %s (%zu bytes)\n", - info.name, len); - break; - case DSP_REPLICA_TYPE: -- printf(" Replica type: %10u (%u bytes)\n", -+ printf(" Replica type: %10u (%zu bytes)\n", - info.x32, len); - break; - case DSP_PARTITION_BUSY: -- printf(" Partition busy: %10u (%u bytes)\n", -+ printf(" Partition busy: %10u (%zu bytes)\n", - info.x32, len); - break; - default: -- printf(" Unknown %08X: %10u (%u bytes)\n", -+ printf(" Unknown %08X: %10u (%zu bytes)\n", - bit, info.x32, len); - break; - } -diff -r 7f46ab032bd8 -r fbfcfbb3c88d contrib/testing/pp/getconn_addr.c ---- a/contrib/testing/pp/getconn_addr.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/contrib/testing/pp/getconn_addr.c Mon Jul 11 00:42:47 2005 +0100 -@@ -129,7 +129,7 @@ int main(int argc, char *argv[]) { - - printf (" got the following tran address: \n"); - printf ("TYPE:%d \n",ta.type); -- printf ("LEN: %d \n",ta.len); -+ printf ("LEN: %zd \n",ta.len); - for (i=0; i%s", _len, _msg); -+ printf( "len = %zd:msg->%s", _len, _msg); - for (; _len > 0; _len--, _buf++) { - putc(sym[(*_buf) >> 4],stdout); - putc(sym[(*_buf) & 0x0F],stdout); -diff -r 7f46ab032bd8 -r fbfcfbb3c88d contrib/testing/readaddr.c ---- a/contrib/testing/readaddr.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/contrib/testing/readaddr.c Mon Jul 11 00:42:47 2005 +0100 -@@ -182,7 +182,7 @@ int main(int argc, char *argv[]) { - } - p = (Net_Address_T*)malloc(len); - if (!p) { -- fprintf(stderr, "malloc(%u): Out of memory\n", -+ fprintf(stderr, "malloc(%zu): Out of memory\n", - len); - break; - } -@@ -231,7 +231,7 @@ int main(int argc, char *argv[]) { - break; - } - if (!printed) { -- printf("Address: %d, len: %d, content: ", p->addressType, p->addressLength); -+ printf("Address: %d, len: %zd, content: ", p->addressType, p->addressLength); - while (len--) { - printf("%02X ", *v++); - } -diff -r 7f46ab032bd8 -r fbfcfbb3c88d contrib/testing/readadef.c ---- a/contrib/testing/readadef.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/contrib/testing/readadef.c Mon Jul 11 00:42:47 2005 +0100 -@@ -278,7 +278,7 @@ int main(int argc, char *argv[]) { - printf(" Syntax ID: %d\n", ainfo.attrSyntaxID); - printf(" Lower boundary: %d\n", ainfo.attrLower); - printf(" Upper boundary: %d\n", ainfo.attrUpper); -- printf(" ASN1: %d chars, ", ainfo.asn1ID.length); -+ printf(" ASN1: %zd chars, ", ainfo.asn1ID.length); - for (asnp = 0; asnp < ainfo.asn1ID.length; asnp++) - printf("%02X", ainfo.asn1ID.data[asnp]); - printf("\n"); -diff -r 7f46ab032bd8 -r fbfcfbb3c88d contrib/testing/readcls.c ---- a/contrib/testing/readcls.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/contrib/testing/readcls.c Mon Jul 11 00:42:47 2005 +0100 -@@ -297,7 +297,7 @@ int main(int argc, char *argv[]) { - } - printf(" Class: '%s'\n", name); - printf(" Flags: %08X\n", cinfo.classFlags); -- printf(" ASN1: %d chars, ", cinfo.asn1ID.length); -+ printf(" ASN1: %zd chars, ", cinfo.asn1ID.length); - for (asnp = 0; asnp < cinfo.asn1ID.length; asnp++) - printf("%02X", cinfo.asn1ID.data[asnp]); - printf("\n"); -diff -r 7f46ab032bd8 -r fbfcfbb3c88d contrib/testing/resint.c ---- a/contrib/testing/resint.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/contrib/testing/resint.c Mon Jul 11 00:42:47 2005 +0100 -@@ -242,7 +242,7 @@ lll:; - buff = buffT->curPos; - l = buffT->dataend - buff; - -- printf("Resolved: %d bytes\n", l); -+ printf("Resolved: %zd bytes\n", l); - x = 0; - if (l < 4) goto dump; - val = DVAL_LH(buff, x); -diff -r 7f46ab032bd8 -r fbfcfbb3c88d contrib/testing/timeinfo.c ---- a/contrib/testing/timeinfo.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/contrib/testing/timeinfo.c Mon Jul 11 00:42:47 2005 +0100 -@@ -138,7 +138,7 @@ static void DemoGetTime(NWCONN_HANDLE co - fprintf(stderr, "NCP 114.1 failed with %s\n", strnwerror(err)); - return; - } -- printf("Returned data length (at least 28): %u\n", rp->fragSize); -+ printf("Returned data length (at least 28): %zu\n", rp->fragSize); - printf("Seconds: %u\n", *(u_int32_t*)rpbuff); - printf("Fractions: 0x%08X (%u)\n", *(u_int32_t*)(rpbuff + 4), *(u_int32_t*)(rpbuff + 4)); - printf("Flags: 0x%08X\n", *(u_int32_t*)(rpbuff + 8)); -@@ -160,7 +160,7 @@ static void DemoGetVersion(NWCONN_HANDLE - fprintf(stderr, "NCP 114.12 failed with %s\n", strnwerror(err)); - return; - } -- printf("Returned data length (at least 4): %u\n", rp->fragSize); -+ printf("Returned data length (at least 4): %zu\n", rp->fragSize); - printf("Version: 0x%08X (%u)\n", *(u_int32_t*)rpbuff, *(u_int32_t*)rpbuff); - } - -@@ -176,7 +176,7 @@ static void DemoGetGarbage(NWCONN_HANDLE - fprintf(stderr, "NCP 114.6 failed with %s\n", strnwerror(err)); - return; - } -- printf("Returned data length: %u\n", rp->fragSize); -+ printf("Returned data length: %zu\n", rp->fragSize); - printf("Data: "); - for (i = 0; i < rp->fragSize; i++) - printf(" %02X", rpbuff[i]); -diff -r 7f46ab032bd8 -r fbfcfbb3c88d contrib/testing/wcsmbs-tst1.c ---- a/contrib/testing/wcsmbs-tst1.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/contrib/testing/wcsmbs-tst1.c Mon Jul 11 00:42:47 2005 +0100 -@@ -20,7 +20,7 @@ main (void) - - pchar= setlocale (LC_ALL, ""); - printf ("locale : %s\n",pchar); -- printf ("MB_CUR_MAX %d\n", MB_CUR_MAX); -+ printf ("MB_CUR_MAX %zd\n", MB_CUR_MAX); - - puts("---- test 1 ------"); - test = mbstowcs (tmp, str, (strlen (str) + 1) * sizeof (char)); -diff -r 7f46ab032bd8 -r fbfcfbb3c88d ipx-1.0/Samples/ipxrcv.c ---- a/ipx-1.0/Samples/ipxrcv.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/ipx-1.0/Samples/ipxrcv.c Mon Jul 11 00:42:47 2005 +0100 -@@ -7,7 +7,7 @@ main(int argc, char **argv) - int s; - int result; - char msg[100]; -- int len; -+ socklen_t len; - - s = socket(AF_IPX, SOCK_DGRAM, AF_IPX); - if (s < 0) -@@ -19,7 +19,6 @@ main(int argc, char **argv) - sipx.sipx_network = 0; - sipx.sipx_port = htons(0x5000); - sipx.sipx_type = 17; -- len = sizeof(sipx); - result = bind(s, (struct sockaddr *) &sipx, sizeof(sipx)); - if (result < 0) - { -@@ -27,6 +26,7 @@ main(int argc, char **argv) - exit(-1); - } - msg[0] = '\0'; -+ len = sizeof(sipx); - result = recvfrom(s, msg, sizeof(msg), 0, (struct sockaddr *) &sipx, - &len); - if (result < 0) -diff -r 7f46ab032bd8 -r fbfcfbb3c88d ipx-1.0/Samples/ipxsend.c ---- a/ipx-1.0/Samples/ipxsend.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/ipx-1.0/Samples/ipxsend.c Mon Jul 11 00:42:47 2005 +0100 -@@ -7,7 +7,7 @@ main(int argc, char **argv) - int s; - int result; - char msg[100] = "Hi Mom"; -- int len = sizeof(sipx); -+ socklen_t len = sizeof(sipx); - - s = socket(AF_IPX, SOCK_DGRAM, AF_IPX); - if (s < 0) -diff -r 7f46ab032bd8 -r fbfcfbb3c88d ipx-1.0/Samples/rip.c ---- a/ipx-1.0/Samples/rip.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/ipx-1.0/Samples/rip.c Mon Jul 11 00:42:47 2005 +0100 -@@ -14,7 +14,6 @@ main(int argc, char **argv) - int result; - int s; - char msg[1024]; -- int len; - char *bptr; - struct rip_data *rp; - -@@ -36,6 +35,7 @@ main(int argc, char **argv) - } - while (1) - { -+ socklen_t len; - size_t rclen; - - len = sizeof(sipx); -diff -r 7f46ab032bd8 -r fbfcfbb3c88d ipx-1.0/Samples/sap.c ---- a/ipx-1.0/Samples/sap.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/ipx-1.0/Samples/sap.c Mon Jul 11 00:42:47 2005 +0100 -@@ -18,7 +18,6 @@ main(int argc, char **argv) - struct sockaddr_ipx sipx; - char msg[1024]; - long val = 0; -- int len; - char *bptr; - struct sap_data *sp; - -@@ -47,6 +46,7 @@ main(int argc, char **argv) - } - while (1) - { -+ socklen_t len; - size_t rclen; - - len = 1024; -@@ -64,7 +64,7 @@ main(int argc, char **argv) - rclen = result - 2; - bptr = msg; - printf("SAP: OP is %x %x\n", bptr[0], bptr[1]); -- printf("Length is %u\n", rclen); -+ printf("Length is %zu\n", rclen); - if (bptr[1] != 2) - continue; - -diff -r 7f46ab032bd8 -r fbfcfbb3c88d lib/ncplib.c ---- a/lib/ncplib.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/lib/ncplib.c Mon Jul 11 00:42:47 2005 +0100 -@@ -665,7 +665,7 @@ static void run_wdog(struct ncp_conn *co - default: - if (pfd[0].revents & POLLIN) { - struct sockaddr_ipx sender; -- int sizeofaddr = sizeof(struct sockaddr_ipx); -+ socklen_t sizeofaddr = sizeof(struct sockaddr_ipx); - unsigned char buf[1024]; - size_t pktsize; - NWCCODE err; -@@ -1016,7 +1016,7 @@ do_ncp_tcp_call(struct ncp_conn *conn, u - return ECONNABORTED; - } - if (ln > sizeof(conn->packet) - 2) { -- fprintf(stderr, "Too long reply: %u\n", ln); -+ fprintf(stderr, "Too long reply: %zu\n", ln); - return ECONNABORTED; - } - result = do_tcp_rcv(conn->ncp_sock, conn->packet + 2, ln); -diff -r 7f46ab032bd8 -r fbfcfbb3c88d lib/nwclient.c ---- a/lib/nwclient.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/lib/nwclient.c Mon Jul 11 00:42:47 2005 +0100 -@@ -714,7 +714,7 @@ NWDSCCODE NWCXAttachToTreeByName( NWCONN - - /* try to speed up search of all servers but first checking that treeName exists */ - { -- nuint32 scanIndex=-1; -+ nint32 scanIndex=-1; - char myTreeName [MAX_DN_CHARS+1]; - NWDSContextHandle ctx; - int found=0; -@@ -856,7 +856,7 @@ static NWDSCCODE __docopy_string (UNUSED - case SYN_FAX_NUMBER:{ - const Fax_Number_T* fn = (const Fax_Number_T*)val; - -- l = snprintf(result, maxSize, "%s,%u", fn->telephoneNumber, fn->parameters.numOfBits); -+ l = snprintf(result, maxSize, "%s,%zu", fn->telephoneNumber, fn->parameters.numOfBits); - } - break; - case SYN_EMAIL_ADDRESS:{ -@@ -923,7 +923,7 @@ static NWDSCCODE __docopy_string (UNUSED - - if (20 + (ol->length+1)*3+1 >=maxSize) - return NWE_BUFFER_OVERFLOW; -- sprintf(result, "%u", ol->length); -+ sprintf(result, "%zu", ol->length); - aux = result + strlen(result); - for (i = 0; i < ol->length; i++) { - sprintf(aux, ",%02X", ol->data[i]); -@@ -940,7 +940,7 @@ static NWDSCCODE __docopy_string (UNUSED - #endif - if (20 + (os->length+1)*3+1 >=maxSize) - return NWE_BUFFER_OVERFLOW; -- sprintf(result, "%u", os->length); -+ sprintf(result, "%zu", os->length); - aux = result + strlen(result); - for (i = 0; i < os->length; i++) { - sprintf(aux, ",%02X", os->data[i]); -@@ -956,7 +956,7 @@ static NWDSCCODE __docopy_string (UNUSED - z=na->addressLength; - if (40 + 3*(z+2)+1 >=maxSize) - return NWE_BUFFER_OVERFLOW; -- sprintf(result, "%u,%u", na->addressType, na->addressLength); -+ sprintf(result, "%u,%zu", na->addressType, na->addressLength); - aux = result + strlen(result); - for (z = 0; z < na->addressLength; z++) { - sprintf(aux, ",%02X", na->address[z]); -diff -r 7f46ab032bd8 -r fbfcfbb3c88d sutil/ncpm_common.c ---- a/sutil/ncpm_common.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/sutil/ncpm_common.c Mon Jul 11 00:42:47 2005 +0100 -@@ -219,7 +219,7 @@ static int load_ncpfs(void) - return 1; - } else if (pid == 0) - { -- char *myenv[] = { -+ const char *myenv[] = { - "PATH=/sbin:/usr/sbin:/bin:/usr/bin", - NULL - }; -@@ -875,7 +875,7 @@ static void ncp_ctl_cmd(unsigned int cmd - char xxx[1024]; /* "cmd=XXXXXXXXXXX, len=XXXXXXXXX, data:" + 3x300 chars */ - char* p; - -- sprintf(xxx, "cmd=%u, len=%u, data:", cmd, datalen); -+ sprintf(xxx, "cmd=%u, len=%zu, data:", cmd, datalen); - p = xxx + strlen(xxx); - if (datalen > 300) { - datalen = 300; -diff -r 7f46ab032bd8 -r fbfcfbb3c88d util/nwdir.c ---- a/util/nwdir.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/util/nwdir.c Mon Jul 11 00:42:47 2005 +0100 -@@ -283,7 +283,7 @@ static void eaenum(NWCONN_HANDLE conn, u - struct ncp_ea_enumerate_info winfo; - NWCCODE err; - int sawtitle = 0; -- size_t eaid = 1; -+ unsigned int eaid = 1; - - winfo.enumSequence = 0; - err = ncp_ea_enumerate(conn, -@@ -308,9 +308,9 @@ static void eaenum(NWCONN_HANDLE conn, u - if (!winfo.totalEAs) - break; - if (!sawtitle) { -- printf(_("Extended attributes: %u attributes\n" -- " %u bytes in keys, %u bytes in data\n"), -- winfo.totalEAs, winfo.totalEAsKeySize, winfo.totalEAsDataSize); -+ printf(_("Extended attributes: %lu attributes\n" -+ " %lu bytes in keys, %lu bytes in data\n"), -+ (unsigned long)winfo.totalEAs, (unsigned long)winfo.totalEAsKeySize, (unsigned long)winfo.totalEAsDataSize); - sawtitle = 1; - } - -@@ -326,10 +326,10 @@ static void eaenum(NWCONN_HANDLE conn, u - else { - printf(_(" Key %u:\n" - " Name: %s\n" -- " Access Flag: 0x%08X\n" -- " Value Length: %u\n"), -+ " Access Flag: 0x%08zX\n" -+ " Value Length: %lu\n"), - eaid, ppp.key, ppp.accessFlag, -- ppp.valueLength); -+ (unsigned long)ppp.valueLength); - } - eaid++; - } -@@ -364,12 +364,12 @@ static void dumpDataSizes(const struct n - if (err) { - printf(_(" Cannot determine file size: %s\n"), strnwerror(err)); - } else { -- printf(_(" File size: %10Lu"), off); -+ printf(_(" File size: %10llu"), (unsigned long long)off); - - err = ncp_ns_extract_info_field(info, NSIF_SPACE_ALLOCATED, - &off, sizeof(off)); - if (!err) { -- printf(_(" (allocated %Lu)"), off * 8ULL); -+ printf(_(" (allocated %llu)"), off * 8ULL); - } - printf("\n"); - } -@@ -411,16 +411,16 @@ static void dumpDataSizes(const struct n - u_int32_t num = logical->ds[i].Number; - - if (num) { -- printf(_(" Stream %3u size: %10Lu"), num, -- logical->ds[i].Size); -+ printf(_(" Stream %3u size: %10llu"), num, -+ (unsigned long long)logical->ds[i].Size); - } else { -- printf(_(" File size: %10Lu"), -- logical->ds[i].Size); -+ printf(_(" File size: %10llu"), -+ (unsigned long long)logical->ds[i].Size); - } - if (size) { - for (j = 0; j < size->NumberOfDatastreams; j++) { - if (size->ds[j].Number == num) { -- printf(_(" (allocated %Lu)"), -+ printf(_(" (allocated %llu)"), - ((ncp_off64_t)size->ds[j].FATBlockSize) * 512ULL); - break; - } -@@ -774,7 +774,7 @@ static void dumpit(NWCONN_HANDLE conn, c - doID(conn, o.object_id); - } - printf("\n"); -- printf(_(" Range: 0x%08LX-0x%08LX\n"), pl.recordStart, pl.recordEnd); -+ printf(_(" Range: 0x%08llX-0x%08llX\n"), (unsigned long long)pl.recordStart, (unsigned long long)pl.recordEnd); - } - } - if (!first) { -diff -r 7f46ab032bd8 -r fbfcfbb3c88d util/nwuserlist.c ---- a/util/nwuserlist.c Mon Jul 04 00:01:49 2005 +0100 -+++ b/util/nwuserlist.c Mon Jul 11 00:42:47 2005 +0100 -@@ -149,7 +149,7 @@ static void print_value(int format, cons - unsigned int div; - - if (format == 0) { -- printf(_(" %-21s%llu %s\n"), title, value, units); -+ printf(_(" %-21s%llu %s\n"), title, (unsigned long long)value, units); - return; - } - if (format == 1) { -@@ -163,9 +163,9 @@ static void print_value(int format, cons - unitptr++; - } - if (unitptr == si_prefixes) { -- printf(_(" %-21s%5llu %s\n"), title, value, units); -+ printf(_(" %-21s%5llu %s\n"), title, (unsigned long long)value, units); - } else { -- printf(_(" %-21s%5llu %c%s\n"), title, value, *unitptr, units); -+ printf(_(" %-21s%5llu %c%s\n"), title, (unsigned long long)value, *unitptr, units); - } - } - - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-442.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-442.patch deleted file mode 100644 index 4520c92..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-442.patch +++ /dev/null @@ -1,60 +0,0 @@ -changeset: 442:093f842dbd98 -user: Petr Vandrovec -date: Mon Jul 11 00:44:36 2005 +0100 -files: include/ncp/ipxlib.h lib/resolve.c -description: -Fix few remaining unsigned char pointer <-> signed char pointer conversion warnings. - - -diff -r fbfcfbb3c88d -r 093f842dbd98 include/ncp/ipxlib.h ---- a/include/ncp/ipxlib.h Mon Jul 11 00:42:47 2005 +0100 -+++ b/include/ncp/ipxlib.h Mon Jul 11 00:44:36 2005 +0100 -@@ -94,8 +94,8 @@ struct ipx_rip_packet - #define IPX_BROADCAST_NODE "\xff\xff\xff\xff\xff\xff" - #define IPX_THIS_NODE "\0\0\0\0\0\0" - #else --#define IPX_BROADCAST_NODE ("\xff\xff\xff\xff\xff\xff") --#define IPX_THIS_NODE ("\0\0\0\0\0\0") -+#define IPX_BROADCAST_NODE ((const u_int8_t*)"\xff\xff\xff\xff\xff\xff") -+#define IPX_THIS_NODE ((const u_int8_t*)"\0\0\0\0\0\0") - #endif - #define IPX_THIS_NET (0) - -diff -r fbfcfbb3c88d -r 093f842dbd98 lib/resolve.c ---- a/lib/resolve.c Mon Jul 11 00:42:47 2005 +0100 -+++ b/lib/resolve.c Mon Jul 11 00:44:36 2005 +0100 -@@ -429,13 +429,13 @@ static void sap_report(int fd, const str - } - } - --static int sap_name_cmp(const unsigned char *my, const unsigned char *net, size_t cmplen) { -+static int sap_name_cmp(const unsigned char *my, const char *net, size_t cmplen) { - if (memcmp(my, net, cmplen)) { - size_t ln; - - /* If it is exact match, allow trailing spaces and garbage after - terminating zero. */ -- ln = strnlen(my, cmplen); -+ ln = strnlen((const char*)my, cmplen); - if (memcmp(my, net, ln)) { - return 1; - } -@@ -635,7 +635,7 @@ static NWCCODE sap_start(void **prh, UNU - if (ln >= NW_MAX_SERVER_NAME_LEN) { - return ENAMETOOLONG; - } -- memcpy_toupper(sap_request + 4, name, ln); -+ memcpy_toupper((char*)sap_request + 4, name, ln); - if (ln < 48) { - memset(sap_request + 4 + ln, 0, 48 - ln); - } -@@ -650,7 +650,7 @@ static NWCCODE sap_start(void **prh, UNU - if (ln >= NW_MAX_SERVER_NAME_LEN) { - return ENAMETOOLONG; - } -- memcpy_toupper(sap_request + 4, name, ln); -+ memcpy_toupper((char*)sap_request + 4, name, ln); - if (ln <= 32) { - if (ln < 32) { - memset(sap_request + 4 + ln, '_', 32 - ln); - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-443.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-443.patch deleted file mode 100644 index 34252ee..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-443.patch +++ /dev/null @@ -1,128 +0,0 @@ -changeset: 443:c943b66ae2f6 -user: vana@ppc.vc.cvut.cz -date: Mon Jul 11 02:35:19 2005 +0100 -files: util/nwfsinfo.c util/nwfstime.c -description: -Use NWGetFileServerUTCTime() instead of ncp_get_file_server_time() -in nwfsinfo and nwfstime. Fixes problems when server is in different -timezone than client (on NW3.x old ncp_get_file_server_time is still -used). - - -diff -r 093f842dbd98 -r c943b66ae2f6 util/nwfsinfo.c ---- a/util/nwfsinfo.c Mon Jul 11 00:44:36 2005 +0100 -+++ b/util/nwfsinfo.c Mon Jul 11 02:35:19 2005 +0100 -@@ -33,6 +33,7 @@ - #include - #include - #include -+#include - - #include "private/libintl.h" - #define _(X) gettext(X) -@@ -175,8 +176,14 @@ main(int argc, char **argv) - { - time_t t; - int err2; -- -- err2 = ncp_get_file_server_time(conn, &t); -+ nuint32 sec; -+ -+ err2 = __NWGetFileServerUTCTime(conn, &sec, NULL, NULL, NULL, NULL, NULL, NULL); -+ if (err2) { -+ err2 = ncp_get_file_server_time(conn, &t); -+ } else { -+ t = sec; -+ } - if (err2) { - fprintf(stderr, "%s: %s\n", _("could not get server time"), - strnwerror(err2)); -diff -r 093f842dbd98 -r c943b66ae2f6 util/nwfstime.c ---- a/util/nwfstime.c Mon Jul 11 00:44:36 2005 +0100 -+++ b/util/nwfstime.c Mon Jul 11 02:35:19 2005 +0100 -@@ -33,7 +33,7 @@ - #include - #include - --#include -+#include - - #include "private/libintl.h" - #define _(X) gettext(X) -@@ -124,32 +124,51 @@ main(int argc, char **argv) - ncp_close(conn); - return 1; - } -- } else -- { int offset; -- time_t last; -+ } else { -+ unsigned int offset; -+ nuint32 sec, xsec; - -- if ((err = ncp_get_file_server_time(conn, &t)) != 0) -- { -- get_error: com_err(argv[0], err, _("when getting file server time")); -- ncp_close(conn); -- return 1; -+ err = __NWGetFileServerUTCTime(conn, &sec, &xsec, NULL, NULL, NULL, NULL, NULL); -+ if (err != 0) { -+ if ((err = ncp_get_file_server_time(conn, &t)) != 0) { -+ get_error: com_err(argv[0], err, _("when getting file server time")); -+ ncp_close(conn); -+ return 1; -+ } -+ if (accurate) { -+ time_t last; -+ -+ do { -+ if ((err = ncp_get_file_server_time(conn, &last)) != 0) -+ goto get_error; -+ } while (last == t); -+ t = last; -+ offset = 0; /* we can read the time 1000s of times a second */ -+ } else { -+ offset = 500000; /* if no accurate measure, then assume offset of 500ms */ -+ } -+ } else { -+ if (accurate) { -+ nuint32 last; -+ -+ do { -+ offset = (xsec * 1000000ULL) >> 32; -+ if (offset > 100) { -+ usleep(1000000 - offset); -+ } -+ if ((err = __NWGetFileServerUTCTime(conn, &last, &xsec, NULL, NULL, NULL, NULL, NULL)) != 0) { -+ goto get_error; -+ } -+ } while (last == sec); -+ t = last; -+ } else { -+ t = sec; -+ } -+ offset = (xsec * 1000000ULL) >> 32; - } -- -- if(accurate) -- { -- do -- { if ((err = ncp_get_file_server_time(conn, &last)) != 0) -- goto get_error; -- } while(last==t); -- t=last; -- offset=0; /* we can read the time 1000s of times a second */ -- } -- else -- offset=500; /* if no accurate measure, then assume offset of 500ms */ -- -- if(get) -- { timeval.tv_sec = t; -- timeval.tv_usec = offset*1000; -+ if (get) { -+ timeval.tv_sec = t; -+ timeval.tv_usec = offset; - settimeofday(&timeval, NULL); - } - { - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-444.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-444.patch deleted file mode 100644 index 16aea28..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-444.patch +++ /dev/null @@ -1,32 +0,0 @@ -changeset: 444:34ddb26e48fa -user: vana@ppc.vc.cvut.cz -date: Mon Jul 11 02:36:37 2005 +0100 -files: lib/ncplib.c -description: -Fix ncpfs against NW3.x servers. It was not possible to reuse -existing connection as connection to NW3.x server was never marked -as authenticated. - - -diff -r c943b66ae2f6 -r 34ddb26e48fa lib/ncplib.c ---- a/lib/ncplib.c Mon Jul 11 02:35:19 2005 +0100 -+++ b/lib/ncplib.c Mon Jul 11 02:36:37 2005 +0100 -@@ -1946,9 +1946,14 @@ static int ncp_do_open_fd(int fd, struct - #ifdef SIGNATURES - ncp_sign_init_perm(result); - #endif -- if (!ncp_get_private_key(result, NULL, &klen)) { -- if (klen > 10) { -- result->connState |= CONNECTION_AUTHENTICATED; -+ if (!ncp_get_private_key(result, NULL, &klen) && klen > 10) { -+ result->connState |= CONNECTION_AUTHENTICATED; -+ } else { -+ nuint8 level; -+ NWCCODE err = NWGetBinderyAccessLevel(result, &level, NULL); -+ -+ if (err == 0 && level != 0) { -+ result->connState |= CONNECTION_AUTHENTICATED | CONNECTION_LICENSED; - } - } - result->bcast_state = NWCC_BCAST_PERMIT_UNKNOWN; - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-445.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-445.patch deleted file mode 100644 index bbcc02d..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-445.patch +++ /dev/null @@ -1,146 +0,0 @@ -changeset: 445:66c5f4287bbb -user: Petr Vandrovec -date: Sat Jul 23 21:58:13 2005 +0100 -files: lib/strops.c -description: -Improve ncp_str_to_perms - now it accepts both [RFA] and RFA, -and you can use both nothing, space and '-' for flags which -are not set. - - -diff -r 34ddb26e48fa -r 66c5f4287bbb lib/strops.c ---- a/lib/strops.c Mon Jul 11 02:36:37 2005 +0100 -+++ b/lib/strops.c Sat Jul 23 21:58:13 2005 +0100 -@@ -44,6 +44,7 @@ - - #include - #include -+#include - - #include "private/libintl.h" - #define _(X) dgettext(NCPFS_PACKAGE, (X)) -@@ -419,56 +420,79 @@ char* ncp_perms_to_str(char r[11], const - } - - /* The following function converts a rights string of format [SRWCEMFA] -- into an integer. It will tolerate spaces, lower case and repeated -- letters, even if this takes the length well over 10 characters, but -- must be terminated with square brackets. If such a string containing -- spaces is given as a command line option it will have to be quoted. */ -+ or SRWCEMFA into an integer. It will tolerate spaces, lower case and -+ repeated letters, even if this takes the length well over 10 characters. -+ For unset rights you can use spaces or dashes. For no rights you can -+ use either empty string, '-' or '[]' (or their combination, '[-]' or '[ ]'). */ - - int ncp_str_to_perms(const char *r, u_int16_t *rights) - { - u_int16_t result = 0; -- -- if (*r == '[') { -- do { -- ++r; -- switch (*r) { -- case ' ' : -- case ']' : -- break; -- case 's' : -- case 'S' : -- result |= NCP_PERM_SUPER; break; -- case 'r' : -- case 'R' : -- result |= NCP_PERM_READ; break; -- case 'w' : -- case 'W' : -- result |= NCP_PERM_WRITE; break; -- case 'c' : -- case 'C' : -- result |= NCP_PERM_CREATE; break; -- case 'e' : -- case 'E' : -- result |= NCP_PERM_DELETE; break; -- case 'm' : -- case 'M' : -- result |= NCP_PERM_MODIFY; break; -- case 'f' : -- case 'F' : -- result |= NCP_PERM_SEARCH; break; -- case 'a' : -- case 'A' : -- result |= NCP_PERM_OWNER; break; -- default : -+ int state = 0; -+ -+ while (*r) { -+ int c = *r++; -+ -+ c = toupper(c); -+ if (isspace(c)) { -+ continue; -+ } -+ switch (c) { -+ case '[': -+ if (state != 0) { - return -1; -- } -- } while (*r != ']'); -- /* Now to be generous and ignore trailing spaces */ -- do { ++r; } while (*r == ' '); -- if (*r == '\0') { -- *rights = result; -- return 0; -+ } -+ state = 2; -+ continue; -+ case ']': -+ if (state != 2 && state != 3) { -+ return -1; -+ } -+ state = 4; -+ continue; -+ case '-': -+ break; -+ case 'S': -+ result |= NCP_PERM_SUPER; -+ break; -+ case 'R': -+ result |= NCP_PERM_READ; -+ break; -+ case 'W': -+ result |= NCP_PERM_WRITE; -+ break; -+ case 'C': -+ result |= NCP_PERM_CREATE; -+ break; -+ case 'E': -+ result |= NCP_PERM_DELETE; -+ break; -+ case 'M': -+ result |= NCP_PERM_MODIFY; -+ break; -+ case 'F': -+ result |= NCP_PERM_SEARCH; -+ break; -+ case 'A': -+ result |= NCP_PERM_OWNER; -+ break; -+ default: -+ return -1; - } -+ state |= 1; -+ } -+ /* These states are illegal: -+ state == 2 => [ -+ state == 3 => [SRWCEMFA -+ state == 5 => [SRWCEMFA]SRW -+ These states are allowed: -+ state == 0 => -+ state == 1 => SRWCEMFA -+ state == 4 => [SRWCEMFA] -+ */ -+ if (state == 0 || state == 1 || state == 4) { -+ *rights = result; -+ return 0; - } - return -1; - } - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-446.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-446.patch deleted file mode 100644 index 83d2e81..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-446.patch +++ /dev/null @@ -1,413 +0,0 @@ -changeset: 446:07b8031b5209 -user: Petr Vandrovec -date: Sat Jul 23 22:22:26 2005 +0100 -files: man/nwgrant.8 man/nwrevoke.8 util/nwgrant.c util/nwrevoke.c -description: -Add ability to specify object by its ID to nwgrant and nwrevoke. - -To make long story short, upgrade from Netware5 to Netware6 -kindly converted all rights granted to [Public] to rights -granted to non-existant object with ID 0xFFFFFFFF. And -patched nwrevoke was only tool willing to remove them. - - -diff -r 66c5f4287bbb -r 07b8031b5209 man/nwgrant.8 ---- a/man/nwgrant.8 Sat Jul 23 21:58:13 2005 +0100 -+++ b/man/nwgrant.8 Sat Jul 23 22:22:26 2005 +0100 -@@ -2,42 +2,17 @@ - .SH NAME - nwgrant \- Add Trustee Rights to a directory - .SH SYNOPSIS --.B nwgrant --[ --.B -h --] [ --.B -S --.I server --] [ --.B -U --.I user name --] [ --.B -P --.I password --| --.B -n --] [ --.B -C --] [ --.B -o --.I object name --] [ --.B -t --.I type --] [ --.B -r --.I rights --] --.B file/directory -+\fBnwgrant\fP [ \fB-h\fP ] [ \fB-S\fP \fIserver\fP ] -+[ \fB-U\fP \fIuser name\fP ] [ \fB-P\fP \fIpassword\fP | \fB-n\fP ] -+[ \fB-C\fP ] [ \fB-o\fP \fIobject name\fP | \fB-O\fP \fIobject id\fP ] -+[ \fB-t\fP \fItype\fP ] [ \fB-r\fP \fIrights\fP ] \fBfile/directory\fP - - .SH DESCRIPTION - .B nwgrant - adds the specified bindery object with the corresponding trustee - rights to the directory. - --.B nwgrant --looks up the file --.I $HOME/.nwclient -+\fBnwgrant\fP looks up the file \fI$HOME/.nwclient\fP - to find a file server, a user name and possibly a password. See - nwclient(5) for more information. Please note that the access - permissions of $HOME/.nwclient MUST be 600 for security reasons. -@@ -68,10 +43,7 @@ is the user name to use for login. - .I password - .RS 3 - .B password --is the password to use for login. If neither --.B -n --nor --.B -P -+is the password to use for login. If neither \fB-n\fP nor \fB-P\fP - are given, and the user has no open connection to the server, nwgrant - prompts for a password. - .RE -@@ -96,11 +68,16 @@ The name of the object to be added as tr - The name of the object to be added as trustee. - .RE - -+.B -O -+.I object id -+.RS 3 -+The id of the object to be added as trustee. -+.RE -+ - .B -t - .I object type - .RS 3 --The type of the object. --.I Object type -+The type of the object. \fIObject type\fP - must be specified as a decimal value. Common values are 1 for user - objects, 2 for group objects and 3 for print queues. Other values are - allowed, but are usually used for specialized applications. If you -@@ -111,18 +88,13 @@ NDS name. - .B -r - .I rights - .RS 3 --You must tell --.B nwgrant --which rights it should grant to the bindery object. --The new rights for the object is specified by --.I rights, -+You must tell \fBnwgrant\fP which rights it should grant to the bindery -+object. The new rights for the object is specified by \fIrights\fP, - which can be either a hexadecimal number representing the sum of all - the individual rights to be granted or a string containing characters --representing each right. If rights are represented in string format --then the string must be bounded with square brackets. Characters --within the brackets may be in any order and in either case. Spaces are --allowed between the brackets - in which case the entire string should be --quoted. -+representing each right. Characters within the brackets may be in -+any order and in either case. Spaces are allowed between the -+brackets - in which case the entire string should be quoted. - Hexadecimal and character values for the rights are shown in this table: - - 00 = no access -diff -r 66c5f4287bbb -r 07b8031b5209 man/nwrevoke.8 ---- a/man/nwrevoke.8 Sat Jul 23 21:58:13 2005 +0100 -+++ b/man/nwrevoke.8 Sat Jul 23 22:22:26 2005 +0100 -@@ -2,33 +2,10 @@ - .SH NAME - nwrevoke \- Revoke a Trustee Right from a directory - .SH SYNOPSIS --.B nwrevoke --[ --.B -h --] [ --.B -S --.I server --] [ --.B -U --.I user name --] [ --.B -P --.I password --| --.B -n --] [ --.B -C --] [ --.B -o --.I object name --] [ --.B -t --.I type --] [ --.B -r --.I rights --] --.B file/directory -+\fBnwrevoke\fP [ \fB-h\fP ] [ \fB-S\fP \fIserver\fP ] -+[ \fB-U\fP \fIuser name\fP ] [ \fB-P\fP \fIpassword\fP | \fB-n\fP ] -+[ \fB-C\fP ] [ \fB-o\fP \fIobject name\fP | \fB-O\fP \fIobject ID\fP ] -+[ \fB-t\fP \fItype\fP ] \fBfile/directory\fP - - .SH DESCRIPTION - .B nwrevoke -@@ -80,7 +57,12 @@ this conversion by \fB-C\fP. - - \fB-o\fP \fIobject name\fP - .RS 3 --The name of the object to be added as trustee. -+The name of the object to be revoked as trustee. -+.RE -+ -+\fB-O\fP \fIobject ID\fP -+.RS 3 -+The ID of the object to be revoked as trustee. - .RE - - \fB-t\fP \fIobject type\fP -diff -r 66c5f4287bbb -r 07b8031b5209 util/nwgrant.c ---- a/util/nwgrant.c Sat Jul 23 21:58:13 2005 +0100 -+++ b/util/nwgrant.c Sat Jul 23 22:22:26 2005 +0100 -@@ -46,6 +46,7 @@ - #include - #include - #include -+#include - - #include "private/libintl.h" - #define _(X) gettext(X) -@@ -73,6 +74,7 @@ help(void) - "\n" - "-o object_name Name of object added as trustee\n" - "-t type Object type (decimal value)\n" -+ "-O object_id Object identifier\n" - "-r rights Rights mask (see manual page)\n" - "\n" - "directory\n" -@@ -85,7 +87,6 @@ main(int argc, char *argv[]) - struct ncp_conn *conn; - char *object_name = NULL; - int object_type = -1; -- struct ncp_bindery_object o; - u_int16_t rights = ~0; - int perr = 0; - const char *path = NULL; -@@ -98,6 +99,8 @@ main(int argc, char *argv[]) - int enclen; - TRUSTEE_INFO tstinfo; - NWCCODE nwerr; -+ NWObjectID object_id; -+ int object_id_valid = 0; - - setlocale(LC_ALL, ""); - bindtextdomain(NCPFS_PACKAGE, LOCALEDIR); -@@ -109,10 +112,14 @@ main(int argc, char *argv[]) - { - useConn = 1; - } -- while ((opt = getopt(argc, argv, "h?o:t:r:")) != EOF) -+ while ((opt = getopt(argc, argv, "h?O:o:t:r:")) != EOF) - { - switch (opt) - { -+ case 'O': -+ object_id = strtoul(optarg, NULL, 0); -+ object_id_valid = 1; -+ break; - case 'o': - object_name = optarg; - str_upper(object_name); -@@ -121,10 +128,14 @@ main(int argc, char *argv[]) - object_type = atoi(optarg); - break; - case 'r': -- if (*optarg == '[') { -- perr = ncp_str_to_perms(optarg, &rights); -- } else { -- rights = strtol(optarg, NULL, 16); -+ perr = ncp_str_to_perms(optarg, &rights); -+ if (perr) { -+ char* end; -+ -+ rights = strtol(optarg, &end, 16); -+ if (!*end || isspace(*end)) { -+ perr = 0; -+ } - } - break; - case 'h': -@@ -137,12 +148,6 @@ main(int argc, char *argv[]) - } - } - -- if (object_name == NULL) -- { -- fprintf(stderr, _("%s: You must specify an object name\n"), -- argv[0]); -- goto finished; -- } - if (perr < 0) - { - fprintf(stderr, _("%s: You must give a valid rights string\n"), -@@ -181,7 +186,13 @@ main(int argc, char *argv[]) - path = volume; - } - -- if (object_type < 0) { -+ if (object_id_valid) { -+ /* nothing */ -+ } else if (object_name == NULL) { -+ fprintf(stderr, _("%s: You must specify an object name\n"), -+ argv[0]); -+ goto finished; -+ } else if (object_type < 0) { - #ifdef NDS_SUPPORT - u_int32_t flags; - NWDSContextHandle ctx; -@@ -201,7 +212,7 @@ failDS:; - flags |= DCV_XLATE_STRINGS | DCV_TYPELESS_NAMES; - NWDSSetContext(ctx, DCK_FLAGS, &flags); - } -- nwerr = NWDSMapNameToID(ctx, conn, object_name, &o.object_id); -+ nwerr = NWDSMapNameToID(ctx, conn, object_name, &object_id); - if (nwerr) { - goto failDS; - } -@@ -212,12 +223,15 @@ failDS:; - goto finished; - #endif - } else { -+ struct ncp_bindery_object o; -+ - if ((nwerr = ncp_get_bindery_object_id(conn, object_type, object_name, &o)) != 0) - { - fprintf(stderr, _("%s: Could not find object %s: %s\n"), - progname, object_name, strnwerror(nwerr)); - goto finished; - } -+ object_id = o.object_id; - } - enclen = ncp_path_to_NW_format(path, encpath, sizeof(encpath)); - if (enclen < 0) { -@@ -225,7 +239,7 @@ failDS:; - progname, strerror(-enclen)); - goto finished; - } -- tstinfo.objectID = o.object_id; -+ tstinfo.objectID = object_id; - tstinfo.objectRights = rights; - nwerr = ncp_ns_trustee_add(conn, NW_NS_DOS, SA_ALL, - NCP_DIRSTYLE_NOHANDLE, 0, 0, encpath, enclen, &tstinfo, 1, ~0); -diff -r 66c5f4287bbb -r 07b8031b5209 util/nwrevoke.c ---- a/util/nwrevoke.c Sat Jul 23 21:58:13 2005 +0100 -+++ b/util/nwrevoke.c Sat Jul 23 22:22:26 2005 +0100 -@@ -65,6 +65,7 @@ help(void) - "\n" - "-o object_name Name of object removed as trustee\n" - "-t type Object type (decimal value)\n" -+ "-O object_id Object identifier\n" - "\n" - "file/directory\n" - "\n")); -@@ -76,7 +77,6 @@ main(int argc, char *argv[]) - struct ncp_conn *conn; - char *object_name = NULL; - int object_type = -1; -- struct ncp_bindery_object o; - const char *path = NULL; - long err; - int result = 1; -@@ -87,6 +87,8 @@ main(int argc, char *argv[]) - TRUSTEE_INFO tstinfo; - int useConn = 0; - NWDSCCODE nwerr; -+ NWObjectID object_id; -+ int object_id_valid = 0; - - setlocale(LC_ALL, ""); - bindtextdomain(NCPFS_PACKAGE, LOCALEDIR); -@@ -98,10 +100,14 @@ main(int argc, char *argv[]) - { - useConn = 1; - } -- while ((opt = getopt(argc, argv, "h?o:t:")) != EOF) -+ while ((opt = getopt(argc, argv, "h?o:t:O:")) != EOF) - { - switch (opt) - { -+ case 'O': -+ object_id = strtoul(optarg, NULL, 0); -+ object_id_valid = 1; -+ break; - case 'o': - object_name = optarg; - str_upper(object_name); -@@ -119,12 +125,6 @@ main(int argc, char *argv[]) - } - } - -- if (object_name == NULL) -- { -- fprintf(stderr, _("%s: You must specify an object name\n"), -- argv[0]); -- goto finished; -- } - if (!useConn) { - if (optind != argc - 1) - { -@@ -150,7 +150,13 @@ main(int argc, char *argv[]) - strcat(volume, directory); - path = volume; - } -- if (object_type < 0) { -+ if (object_id_valid) { -+ /* nothing */ -+ } else if (object_name == NULL) { -+ fprintf(stderr, _("%s: You must specify an object name\n"), -+ argv[0]); -+ goto finished; -+ } else if (object_type < 0) { - #ifdef NDS_SUPPORT - u_int32_t flags; - NWDSContextHandle ctx; -@@ -170,7 +176,7 @@ failDS:; - if (!NWDSGetContext(ctx, DCK_FLAGS, &flags)) { - flags |= DCV_XLATE_STRINGS | DCV_TYPELESS_NAMES; - } -- nwerr = NWDSMapNameToID(ctx, conn, object_name, &o.object_id); -+ nwerr = NWDSMapNameToID(ctx, conn, object_name, &object_id); - if (nwerr) { - NWDSFreeContext(ctx); - goto failDS; -@@ -182,19 +188,22 @@ failDS:; - goto finished; - #endif - } else { -+ struct ncp_bindery_object o; -+ - nwerr = ncp_get_bindery_object_id(conn, object_type, object_name, &o); - if (nwerr != 0) { - fprintf(stderr, _("%s: Could not find object %s: %s\n"), - progname, object_name, strnwerror(nwerr)); - goto finished; - } -+ object_id = o.object_id; - } - enclen = ncp_path_to_NW_format(path, encpath, sizeof(encpath)); - if (enclen < 0) { - fprintf(stderr, _("%s: Invalid path: %s\n"), progname, strerror(-enclen)); - goto finished; - } -- tstinfo.objectID = o.object_id; -+ tstinfo.objectID = object_id; - tstinfo.objectRights = 0; - nwerr = ncp_ns_trustee_del(conn, NW_NS_DOS, 0xFF, 0, 0, - encpath, enclen, &tstinfo, 1); - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-447.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-447.patch deleted file mode 100644 index c3828d9..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-447.patch +++ /dev/null @@ -1,43 +0,0 @@ -changeset: 447:3143e61fb504 -user: Petr Vandrovec -date: Thu Sep 29 23:06:24 2005 +0200 -files: util/pserver.c -description: -Store ncp_read's result in ssize_t, otherwise errors returned from -ncp_read are treated as large positive integers. Somehow ncp_read -returns an error at the end of file on NetWare 6.5SP4. - -Also log these errors to the syslog. - - -diff -r 07b8031b5209 -r 3143e61fb504 util/pserver.c ---- a/util/pserver.c Sat Jul 23 22:22:26 2005 +0100 -+++ b/util/pserver.c Thu Sep 29 23:06:24 2005 +0200 -@@ -248,7 +248,7 @@ poll_queue(struct nw_queue *q) - { - /* parent */ - char buf[1024]; -- size_t result; -+ ssize_t result; - off_t offset = 0; - - close(fd[0]); /* close read end */ -@@ -257,9 +257,16 @@ poll_queue(struct nw_queue *q) - sizeof(buf), buf)) > 0) - { - offset += result; -- if (write(fd[1], buf, result) != (int)result) -+ if (write(fd[1], buf, result) != result) - { - goto fail; -+ } -+ } -+ if (result < 0) { -+ if (result == -1) { -+ syslog(LOG_ERR, _("ncp_read: unknown error\n")); -+ } else { -+ syslog(LOG_ERR, _("ncp_read: %m\n")); - } - } - - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-448.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-448.patch deleted file mode 100644 index 1d3d25b..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-448.patch +++ /dev/null @@ -1,4136 +0,0 @@ -changeset: 448:1a8455ed3290 -user: Patrick Pollet -date: Sun Oct 16 02:40:25 2005 +0200 -files: .hgignore contrib/ncp_nss_lib/Makefile contrib/ncp_nss_lib/ncpfs.conf contrib/ncp_nss_lib/nss_cfgfile.c contrib/ncp_nss_lib/nss_cfgfile.h contrib/ncp_nss_lib/nss_ncp.c contrib/ncp_nss_lib/nss_ncp.h contrib/ncp_nss_lib/test_ncp_nss.c -description: -Add ncp_nss_lib to the ncpfs. Originally written in 2003. - - -diff -r 3143e61fb504 -r 1a8455ed3290 .hgignore ---- a/.hgignore Thu Sep 29 23:06:24 2005 +0200 -+++ b/.hgignore Sun Oct 16 02:40:25 2005 +0200 -@@ -10,6 +10,8 @@ - ^autom4te.cache/ - ^config\.log$ - ^config\.status$ -+^contrib/ncp_nss_lib/libnss_ncp\.so\.2$ -+^contrib/ncp_nss_lib/test_ncp_nss$ - ^contrib/pam/Makefile$ - ^contrib/php/Makefile$ - ^contrib/php/Makefile\.in$ -diff -r 3143e61fb504 -r 1a8455ed3290 contrib/ncp_nss_lib/Makefile ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/contrib/ncp_nss_lib/Makefile Sun Oct 16 02:40:25 2005 +0200 -@@ -0,0 +1,111 @@ -+# -+# -+# -+ -+top_srcdir = ../.. -+top_builddir = ../.. -+this_srcdir = ${top_srcdir}/lib -+ -+include ${top_builddir}/Make.rules -+ -+VERSION_SOLIB := 2 -+VERSION_SONAME := 2.3 -+ -+vpath %.c ${this_srcdir} -+ -+LIBS := -+REENTRANT_CFLAGS := -D_REENTRANT -+VERSIONED_LINK := yes -+ -+SHARED_NSSLIB := libnss_ncp.so -+SHARED_NSSLIB_BIN := $(SHARED_NSSLIB).$(VERSION_SOLIB) -+SHARED_NSSLIB_SONAME := $(SHARED_NSSLIB).$(VERSION_SONAME) -+ -+O_UTILS1 = test_ncp_nss.o\ -+ # -+O_TMP1 = -+UTILS1 = $(O_UTILS1:%.o=%) -+ -+CCFLAGS += -I. -+PIC_FLAGS := -fPIC -+NWCOMPAT := 1 -+ -+SHARED_VLINK := -+SHARED_VLINK_CFLAGS := -+ifeq ($(VERSIONED_LINK),yes) -+SHARED_VLINK := -Wl,-version-script=${this_srcdir}/libncp.vers -+SHARED_VLINK_CFLAGS := -DMULTIVERSION -+endif -+ -+ifeq ($(HAVE_ELF),yes) -+NCP_LIB = libncp.so -+NCPLIB_DIR = ../../lib -+LIBDEP = $(NCPLIB_DIR)/$(NCP_LIB) -+else -+NCP_LIB = libncp.a -+NCPLIB_DIR = ../../lib -+LIBDEP = $(NCPLIB_DIR)/$(NCP_LIB) -+endif -+ -+STATIC_BASE_OBJ := nss_ncp.o nss_cfgfile.o -+SHARED_BASE_OBJ := $(STATIC_BASE_OBJ:.o=.do) -+ -+SHARED_O_OBJ := $(SHARED_BASE_OBJ) -+ -+BASE_CFLAGS := -DHAVE_CONFIG_H -DMAKE_NCPLIB -D_GNU_SOURCE -+ -+SHARED_CFLAGS := $(CFLAGS) $(CCFLAGS) $(REENTRANT_CFLAGS) $(PIC_FLAGS) $(SHARED_VLINK_CFLAGS) -+ -+ -+.PHONY : all dep install install-dev clean mrproper distclean -+.PHONY : install_shared install_static install_static_su -+ -+all: $(SHARED_NSSLIB) $(UTILS1) -+ -+install: install_shared -+ -+%.d: %.c %h -+ set -e; $(CC) -M $(STATIC_CFLAGS) $(CFLAGS_$(@:.d=.o)) $(BASE_CFLAGS) $< \ -+ | sed 's,\($*\)\.o[ :]*,\1.o \1.do \1.to $@ : ,g' > $@; \ -+ [ -s $@ ] || rm -f $@ -+ -+$(STATIC_BASE_OBJ): %.o: %.c %.h -+ $(CC) $(STATIC_CFLAGS) $(CFLAGS_$@) $(BASE_CFLAGS) -o $@ -c $< -+ -+ -+$(SHARED_BASE_OBJ): %.do: %.c %.h -+ $(CC) $(SHARED_CFLAGS) $(CFLAGS_$(@:.do=.o)) $(BASE_CFLAGS) -o $@ -c $< -+ -+ -+$(O_UTILS1) $(O_TMP1): %.o: %.c -+ $(CC) $(CCFLAGS) $(CFLAGS) $(CFLAGS_$@) -o $@ -c $< -+ -+$(UTILS1):: %: %.o $(O_TMP1) -+ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(addsuffix .o,$@) $(OBJS_$@) -L$(top_builddir)/lib -lnss_ncp -lncp $(LDFLAGS_$@) -+ -+ -+dep: -+ -+clean: -+ rm -f *.o *.do *.to *~ -+ -+mrproper: clean -+ rm -f $(UTILS) $(DISTFILE) -+ -+distclean: mrproper -+ -+install_shared: $(SHARED_NCPLIB_BIN) -+ $(INSTALL) -d $(DESTDIR)$(libsodir) -+ $(INSTALL) $(SHARED_NCPLIB_BIN) $(DESTDIR)$(libsodir) -+ -ldconfig -+ -+ -+$(SHARED_NSSLIB): $(SHARED_NSSLIB_BIN) -+ rm -f $@ -+ ln -sf $< $@ -+ -+$(SHARED_NSSLIB_BIN): $(SHARED_O_OBJ) ${this_srcdir}/libncp.vers -+ $(CC) -shared -o $@ -Wl,-soname=$(SHARED_NSSLIB_SONAME) $(SHARED_VLINK) $(SHARED_O_OBJ) -L$(NCPLIB_DIR) -lncp ${LIBS} -+ -+ -+ -diff -r 3143e61fb504 -r 1a8455ed3290 contrib/ncp_nss_lib/ncpfs.conf ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/contrib/ncp_nss_lib/ncpfs.conf Sun Oct 16 02:40:25 2005 +0200 -@@ -0,0 +1,29 @@ -+[Requester] -+ -+ -+[ncp_nss] -+useTree=1 -+server=INSA_ROOT -+startCtx= -+ctrlGroup= -+doPasswd=1 -+doShadow=1 -+doGroup=1 -+ -+defGid=100 -+defShell=/bin/bash -+debug=1 -+ -+fallbackUid=-1 -+fallbackGid=-1 -+ -+[pam] -+useTree=1 -+server=INSA_ROOT -+searchCtx=PC,S.PC,GCP.PC -+debug=1 -+mountLocally=1 -+createLocalHome=0 -+ -+zenOn= -+zenOff= -diff -r 3143e61fb504 -r 1a8455ed3290 contrib/ncp_nss_lib/nss_cfgfile.c ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/contrib/ncp_nss_lib/nss_cfgfile.c Sun Oct 16 02:40:25 2005 +0200 -@@ -0,0 +1,333 @@ -+/* -+ nss_cfgfile.c - Configuration file handling -+ Copyright (C) 2000 Petr Vandrovec -+ Copyright (C) 2003 Patrick Pollet -+ -+ 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 of the License, 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ -+ Revision history: -+ -+ 1.00 2003, Jan 16 Patrick Pollet -+ Initial revision, stronly inspired by ncpfs/lib/cfgfile.c -+ -+ -+ */ -+ -+#include "config.h" -+ -+ -+#include "private/libncp-lock.h" -+ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "nss_cfgfile.h" -+// temporary define (waiting for a better Makefile) -+#define GLOBALCFGFILE "/etc/ncpfs.conf" -+#ifndef GLOBALCFGFILE -+#error "GLOBALCFGFILE must be defined" -+#endif -+ -+ -+// #define DEBUG 1 -+ -+static struct nss_ncp_conf* alloc_nss_ncp_conf (){ -+ struct nss_ncp_conf * conf; -+ -+ conf= (struct nss_ncp_conf *)malloc(sizeof(*conf)); -+ if (!conf) -+ return NULL; -+ return conf; -+} -+ -+ -+void free_nss_ncp_conf (struct nss_ncp_conf *conf){ -+#define FREEFIELD(x) do if (conf->x) {free(conf->x) ; conf->x=NULL;} while (0); -+ if (conf && conf !=&defConf) { -+ FREEFIELD(server); -+ FREEFIELD(startCtx); -+ FREEFIELD(ctrlGroup); -+ FREEFIELD(defShell); -+ } -+#undef FREEFIELD -+} -+ -+ -+struct cfgFile { -+ ncpt_mutex_t mutex; -+ FILE* file; -+}; -+ -+static struct cfgFile* cfgOpenFile( -+ const char* path, -+ int writeRequired) { -+ struct cfgFile* cfg; -+ -+ cfg = (struct cfgFile*)malloc(sizeof(*cfg)); -+ if (cfg) { -+ cfg->file = fopen(path, writeRequired ? "r+" : "r"); -+ if (cfg->file) { -+ ncpt_mutex_init(&cfg->mutex); -+ } else { -+ free(cfg); -+ cfg = NULL; -+ } -+ } -+ return cfg; -+} -+ -+static void cfgClose( -+ struct cfgFile* cfg) { -+ ncpt_mutex_lock(&cfg->mutex); -+ fclose(cfg->file); -+ ncpt_mutex_destroy(&cfg->mutex); -+ free(cfg); -+} -+ -+ -+struct check { -+ const char *option; /* configuration option */ -+ int mandatory; /* can be empty or null */ -+ int found; /*set to TRUE if found in cfg file */ -+ void ** value_ptr; /* temporary storage place */ -+ int isNum; /* 1 is numeric, 0 is string*/ -+ const char* defValue; -+}; -+ -+ -+#ifdef DEBUG -+void printResults (const char * infos,struct check * results) { -+ struct check* ptr; -+ printf ("%s\n",infos); -+ for (ptr=results; ptr->option; ptr++) { -+ if (ptr->isNum) -+ printf ("option=%s mandatory=%d found=%d value=%d isNum=%d defvalue=%s\n", -+ ptr->option,ptr->mandatory,ptr->found,(int*)*ptr->value_ptr,ptr->isNum,ptr->defValue); -+ else -+ printf ("option=%s mandatory=%d found=%d value=%s isNum=%d defvalue=%s\n", -+ ptr->option,ptr->mandatory,ptr->found,(char*)*ptr->value_ptr,ptr->isNum,ptr->defValue); -+ } -+ -+} -+ -+void printConf (const char* infos,struct nss_ncp_conf * conf) { -+ printf ("%s\n",infos); -+ printf ("debug=%d useTree=%d server=%s startCtx=%s ctrlGroup=%s defGid=%d defShell=%s fallbackUid=%d fallbackGid=%d " -+ "doPassword=%d doGroup=%d doShadow=%d\n", -+ conf->debug,conf->useTree,conf->server,conf->startCtx, -+ conf->ctrlGroup,conf->defGid,conf->defShell,conf->fallbackUid,conf->fallbackGid, -+ conf->doPassword,conf->doGroup,conf->doShadow); -+} -+#endif -+ -+ -+static int process_line (char* cptr, struct check *ptr) { -+ -+ char* sptr; // start of real value -+ char* eptr; // end of real value -+ char* errPtr; // err -+ -+ char ec; -+ char cc; -+ -+ while (*cptr && isspace(*cptr)) -+ cptr++; -+ if (*cptr != '=' && *cptr != ':') -+ return 1; //no equal sign found -+ cptr++; -+ -+ while (*cptr && isspace(*cptr)) -+ cptr++; -+ -+ // space are allowed in value only if surrounded by " or ' (eg a NDS control group) -+ if (*cptr == '"' || *cptr == '\'') -+ ec = *cptr++; -+ else -+ ec = 0; -+ sptr=cptr; -+ eptr=cptr; -+ while ((cc = *cptr++) != 0) { -+ if (cc == '\n') -+ break; -+ if (!ec && isspace(cc)) -+ break; -+ if (cc == ec) -+ break; -+ eptr++; -+ } -+ *eptr = 0; -+ if (ptr->isNum) { -+ (int *)*ptr->value_ptr=strtoul (sptr,&errPtr,0); -+ ptr->found= ((*sptr) && !(*errPtr)); //not empty and no error -+ } else { -+ if (eptr>sptr) { // do not take an empty string value -+ char *v=strdup(sptr); -+ if (v) { -+ (char*) *ptr->value_ptr=v; -+ ptr->found= TRUE; -+ }else -+ return 1; -+ } -+ } -+ -+ return 0; -+} -+ -+static int fix_conf (struct check *results) { -+ struct check* ptr; -+ -+ for (ptr=results; ptr->option; ptr++) { -+ if (! ptr->found) { -+ if (ptr->mandatory) { -+ traceForce(0,LOG_ERR, "ncp_nss aborting :missing mandatory information '%s=' in config file %s ",ptr->option,GLOBALCFGFILE); -+ return 1; -+ } -+ if (ptr->isNum) { -+ (int *)*ptr->value_ptr=strtoul (ptr->defValue,NULL,0); -+ }else { -+ char * v=strdup(ptr->defValue); -+ if (v) -+ (char*) *ptr->value_ptr=v; -+ else -+ return 1; -+ } -+ } -+ } -+ return 0; -+} -+ -+ -+static struct nss_ncp_conf *read_conf_file( const char * mySection, struct cfgFile *cfg) { -+ -+ struct nss_ncp_conf *conf; -+ -+ conf=alloc_nss_ncp_conf (); -+ if (!conf) -+ return NULL; -+ { -+ struct nss_ncp_conf * pconf=conf; -+ struct check check_confs[] = { -+ /*option mandat found value_ptr isNum defValue */ -+ {"debug", FALSE,FALSE,(void**)&conf->debug, TRUE, "0"}, -+ {"useTree", FALSE,FALSE,(void**)&conf->useTree, TRUE, "0"}, -+ {"server", TRUE,FALSE, (void**)&conf->server, FALSE, ""}, -+ {"startCtx", FALSE,FALSE,(void**)&conf->startCtx, FALSE, ""}, -+ {"ctrlGroup", FALSE,FALSE,(void**)&conf->ctrlGroup, FALSE, ""}, -+ {"defGid", FALSE,FALSE,(void**)&conf->defGid, TRUE, "100"}, -+ {"defShell", FALSE,FALSE,(void**)&conf->defShell, FALSE, "/bin/bash"}, -+ {"fallbackUid", FALSE,FALSE,(void**)&conf->fallbackUid, TRUE, "-1"}, -+ {"fallbackGid", FALSE,FALSE,(void**)&conf->fallbackGid, TRUE, "-1"}, -+ {"doPasswd", FALSE,FALSE,(void**)&conf->doPassword, TRUE, "0"}, -+ {"doGroup", FALSE,FALSE,(void**)&conf->doGroup, TRUE, "0"}, -+ {"doShadow", FALSE,FALSE,(void**)&conf->doShadow, TRUE, "0"}, -+ {NULL , FALSE,FALSE,NULL, FALSE, NULL} -+ }; -+ -+ char cfgline[16384]; -+ size_t seclen = strlen(mySection); -+ -+ -+#ifdef DEBUG -+// DO NOT DO IT A a second call (using test_ncp_nss -2) coredump !!! -+// printResults("before reading CFG",check_confs); -+#endif -+ ncpt_mutex_lock(&cfg->mutex); -+ //rewind(cfg->file); -+ while (fgets(cfgline, sizeof(cfgline)-1, cfg->file)) { -+ char* cptr = cfgline; -+ struct check* ptr; -+ -+ while (*cptr && isspace(*cptr)) -+ cptr++; -+ if (*cptr != '[') -+ continue; -+sstart:; -+ if (strncasecmp(++cptr, mySection, seclen)) -+ continue; -+ if (cptr[seclen] != ']') -+ continue; -+ while (fgets(cfgline, sizeof(cfgline) - 1, cfg->file)) { -+ cptr = cfgline; -+ -+ while (*cptr && isspace(*cptr)) -+ cptr++; -+ if (!*cptr) -+ continue; //empty line -+ if (*cptr == '[') // start of another section -+ goto ssend; -+ for (ptr=check_confs; ptr->option; ptr++) { -+ size_t keylen=strlen(ptr->option); -+ if (!strncasecmp(cptr, ptr->option,keylen)) { -+ cptr += keylen; -+ process_line (cptr,ptr); -+ } -+ } -+ } -+ } -+ -+ssend: -+#ifdef DEBUG -+ printResults("after reading CFG no error",check_confs); -+#endif -+#ifdef DEBUG -+ printConf("before fixing ",conf); -+#endif -+ -+ if (!fix_conf (check_confs)) { // fill in missing values with default, -+#ifdef DEBUG -+ printConf("after fixing ",conf); -+#endif -+ ncpt_mutex_unlock(&cfg->mutex); -+ return conf; -+ } -+ -+error: -+#ifdef DEBUG -+ printResults("after reading CFG error",check_confs); -+#endif -+ ncpt_mutex_unlock(&cfg->mutex); -+ free_nss_ncp_conf(conf); -+ return NULL; -+ } -+ -+} -+ -+struct nss_ncp_conf * parse_conf (char * confFile) { -+ -+ struct cfgFile *cfg; -+ struct nss_ncp_conf *conf; -+#ifdef DEBUG -+ printf("entering parse_conf\n"); -+#endif -+ //return &defConf; -+ cfg = cfgOpenFile(GLOBALCFGFILE, FALSE); -+ if (!cfg) -+ return NULL; -+ conf=read_conf_file(NSS_SECTION,cfg); -+ cfgClose(cfg); -+#ifdef DEBUG -+ if (conf) -+ printConf("final value ",conf); -+#endif -+ -+ return conf; -+} -+ -diff -r 3143e61fb504 -r 1a8455ed3290 contrib/ncp_nss_lib/nss_cfgfile.h ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/contrib/ncp_nss_lib/nss_cfgfile.h Sun Oct 16 02:40:25 2005 +0200 -@@ -0,0 +1,30 @@ -+#ifndef HAVE_NSS_CFGFILE -+#define HAVE_NSS_CFGFILE -+ -+#define TRUE 1 -+#define FALSE 0 -+ -+#define NSS_SECTION "ncp_nss" -+struct nss_ncp_conf { -+ int debug; -+ int useTree; // use Tree connection or server connection -+ char * server; // name of server or tree -+ char * startCtx; // start searching is this context (and below) -+ char * ctrlGroup; // limit search to members of this NDS group for passwd and shadow -+ gid_t defGid; // if no primary group found in NDS use this value -+ char * defShell; // if no shell found in NDS use this value -+ uid_t fallbackUid; // if no UID found in NDS use this one (-1= skip user, NFS_NOBODY= use this UID) -+ gid_t fallbackGid; // if no GID found in NDS use this one (-1= skip group, NFS_NOBODY= use this GID) -+ int doPassword; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf -+ int doGroup; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf -+ int doShadow; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf -+}; -+ -+ -+ -+static struct nss_ncp_conf defConf ={0,TRUE,"INSA_ROOT","[Root]",NULL,100,"/bin/bash",-1,-1,TRUE,TRUE,TRUE}; -+ -+struct nss_ncp_conf * parse_conf (char * confFile); -+void free_nss_ncp_conf (struct nss_ncp_conf *conf); -+ -+#endif -diff -r 3143e61fb504 -r 1a8455ed3290 contrib/ncp_nss_lib/nss_ncp.c ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/contrib/ncp_nss_lib/nss_ncp.c Sun Oct 16 02:40:25 2005 +0200 -@@ -0,0 +1,3091 @@ -+/************************************************************************** -+ nss_ncp.c NSS module for NDS -+ -+ Copyright (C) 2002 Patrick Pollet -+ -+ 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 of the License, 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ -+ -+ Revision history: -+ -+ 1.00 2003, January 06 Patrick Pollet -+ initial release -+ 1.01 2003, January 08 Patrick Pollet -+ added conf structure and control group -+ added optional fallback UID and GID if none found in NDS (default is to skip user,group) -+ 1.02 2003, January 09 Patrick Pollet -+ added initgroups -+ 1.03 2003, January 10 Patrick Pollet -+ fixed bug in nds_user_info2 (bad structure received by nds_user_location2) -+ 1.04 2003, January 11 Patrick Pollet -+ fixed setting ndsXXX=NULL trees in case of errors in _nss_ncp_setxxent() -+ made always NAME_CONTEXT=[Root] in CreateContextAndConn -+ calling NWCCloseIteration only it some errors has occured in the search -+ 1.05 2003, January 15 Patrick Pollet -+ -Avoid multiple reading of conf file by removing recursive calls -+ in nss_ncp_getxxent_r in case a entry has no Unix infos in NDS -+ (replaced by a goto nextuser) -+ -Added missing free_nw_xxx_info when leaving nss_ncp_getxxent_r (fixed memory leaks) -+ -Added testing for failure in allocating tree structure in nss_ncp_setxxent_r -+ -if (id !=(uid_t)-1) and not if (id) in getentxx if we search by UID !!!! -+ -getentbyxx give a warning in syslog if more that one entry match the name or id search criteria -+ 1.06 2003, January 16 Patrick Pollet -+ -implemented reading of configuration file in /etc/nss_ncp.conf -+ -in case of fatal errors, force log in syslog by using calls to traceForce ( previously fatal -+ errors were only reported in debug mode, since the syslog file is not opened in normal mode) -+ 1.07 2003, January 16 Patrick Pollet -+ Speed up the search: -+ 1)config informations are stored in the internal trees structures -+ when calling nss_ncp_setxxent_r and freed by nss_ncp_endxxent_r -+ so we don't read again config file at every call to nss_ncp_getxxent_r -+ 2) group infos are really slow with big groups,so we added a flag doGroup in conf file -+ to skip the search (easier that to edit /etc/nsswitch.conf AND restarting nscd daemon). -+************************************************************************/ -+ -+ -+#include -+#include -+#include -+#include -+#include -+ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include "nss_ncp.h" -+#include "nss_cfgfile.h" -+ -+// only if logfile has been opened by nss API functions (debug mode) -+void trace (int debugMode,int err,const char * format,... ) { -+ va_list args; -+ if (debugMode) { -+ va_start(args,format); -+ vsyslog (err,format,args); -+ va_end(args); -+ } -+} -+ -+// send a message to syslog even if log file not opened (debugMode is false) -+// needed for critical errors such a bad config file or ambiguous NDS search -+void traceForce (int debugMode,int err, const char * format,... ) { -+ va_list args; -+ -+ if (!debugMode) -+ openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV); -+ va_start(args,format); -+ vsyslog (err,format,args); -+ va_end(args); -+ if (!debugMode) -+ closelog(); -+ -+} -+ -+ -+static int -+getnumber(int *val, const char **str) -+{ -+ const char *p = *str; -+ char *z; -+ -+ if (!*p) -+ return 1; -+ if (*p == ',') { -+ *str = p + 1; -+ return 1; -+ } -+ *val = strtoul(p, &z, 0); -+ if (p == z) -+ return -1; -+ if (*z == ',') -+ z++; -+ *str = z; -+ return 0; -+} -+ -+static char* copy_to_buffer (char ** buffer, size_t *buflen, char * value) { -+// copy the value to buffer , decrease buflen and return start of the value in buffer -+ size_t len=strlen(value)+1; -+ char * ptr=*buffer; -+ -+ if (len > *buflen) { -+ return NULL; -+ } -+ memcpy(*buffer, value, len); -+ *buflen -=len; -+ (*buffer) +=len; -+ return ptr; -+} -+ -+/********** -+struct nss_ncp_conf { -+ int debug; -+ int useTree; // use Tree connection or server connection -+ char * server; // name of server or tree -+ char * startCtx; // start searching is this context (and below) -+ char * ctrlGroup; // limit search to members of this NDS group for passwd and shadow -+ gid_t defGid; // if no primary group found in NDS use this value -+ char * defShell; // if no shell found in NDS use this value -+ uid_t fallbackUid; // if no UID found in NDS use this one (-1= skip user, NFS_NOBODY= use this UID) -+ gid_t fallbackGid; // if no GID found in NDS use this one (-1= skip group, NFS_NOBODY= use this GID) -+ int doPassword; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf -+ int doGroup; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf -+ int doShadow; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf -+}; -+**************/ -+ -+//one day we will read it from /etc/ncp_nss.conf -+ -+ -+/****************************************** internal structure for storing NDS user's password infos ***/ -+struct nw_user_info { -+ char * cn; -+ char * gecos; -+ char * shell; -+ char * dir; -+ char * fullName; -+ char * passwd; -+ uid_t uid; -+ gid_t gid; -+ int qflag; -+ -+ }; -+ -+static void init_nw_user_info (struct nw_user_info *ui,int qflag){ -+ ui->cn=NULL; -+ ui->gecos=NULL; -+ ui->shell=NULL; -+ ui->dir=NULL; -+ ui->fullName=NULL; -+ ui->passwd=NULL; -+ ui->uid=(uid_t)-1; -+ ui->gid=(gid_t)-1; -+ ui->qflag= qflag; -+} -+ -+static void free_nw_user_info (struct nw_user_info *ui){ -+#define FREEFIELD(x) do if (ui->x) {free(ui->x) ; ui->x=NULL;} while (0); -+ FREEFIELD(cn); -+ FREEFIELD(gecos); -+ FREEFIELD(shell); -+ FREEFIELD(dir); -+ FREEFIELD(fullName); -+ FREEFIELD(passwd); -+ ui->uid=(uid_t)-1; -+ ui->gid=(gid_t)-1; -+ ui->qflag=0; -+#undef FREEFIELD -+} -+ -+ -+static int fix_nw_user_info (struct nw_user_info *ui, struct nss_ncp_conf* conf){ -+/* fill NDS missing attributes (home, shell, gid, gecos) with default values -+ any user have a cn, and if uid was not found in NDS we consider -+ that the corresponding Unix account is not activated -+*/ -+ if (ui->cn) { -+ if (ui->uid== (uid_t)-1) -+ ui->uid=conf->fallbackUid; -+ if (ui->gid== (gid_t)-1) -+ ui->gid=conf->defGid; -+ if (!ui->gecos) { -+ ui->gecos= ui->fullName ? strdup(ui->fullName):strdup(""); -+ } -+ ui->shell= ui->shell ? ui->shell: strdup(conf->defShell); -+ ui->dir= ui->dir ? ui->dir: strdup(""); -+ ui->passwd= ui->passwd ? ui->passwd: strdup("x"); // cannot read passwd from ND -+ if (!ui->shell || !ui->dir || !ui->gecos || !ui->passwd) { -+ traceForce(conf->debug,LOG_ERR, "not enough memory when fixing nw_user_info\n ",ui->cn); -+ return 1; -+ } -+ }else { -+ ui->uid== (uid_t)-1; // unable to read CN (NDS browse rights not set) , skip it ! -+ } -+ return 0; -+} -+ -+ -+// return found info to caller in the format expected by NSS that is: -+// filling the passwd structure as pointers to the passed buffer -+ -+ -+static enum nss_status nw_user_info_to_passwd(struct nw_user_info ui,struct passwd *pwd, -+ char * buffer, size_t buflen, int * errnop, struct nss_ncp_conf *conf){ -+ -+ if (ui.uid != (uid_t)-1) { -+ pwd->pw_uid=ui.uid; -+ pwd->pw_gid=ui.gid; -+ -+ pwd->pw_name=copy_to_buffer (&buffer,&buflen,ui.cn); -+ if (!pwd->pw_name) goto outnomem; -+ pwd->pw_passwd=copy_to_buffer (&buffer,&buflen,ui.passwd); -+ if (!pwd->pw_passwd) goto outnomem; -+ pwd->pw_gecos=copy_to_buffer (&buffer,&buflen,ui.gecos); -+ if (!pwd->pw_gecos) goto outnomem; -+ pwd->pw_dir=copy_to_buffer (&buffer,&buflen,ui.dir); -+ if (!pwd->pw_dir) goto outnomem; -+ pwd->pw_shell=copy_to_buffer (&buffer,&buflen,ui.shell); -+ if (!pwd->pw_shell) goto outnomem; -+ -+ *errnop=0; -+ return NSS_STATUS_SUCCESS; -+outnomem: -+ traceForce(conf->debug,LOG_ERR, "not enough memory when copying nw_user_info to passwd for %s\n ",ui.cn); -+ *errnop=ERANGE; -+ return NSS_STATUS_TRYAGAIN; -+ } else { -+ trace(conf->debug,LOG_NOTICE, "user %s has no Unix UID in NDS\n ", ui.cn); -+ *errnop=ENOENT; -+ return NSS_STATUS_NOTFOUND; -+ } -+} -+ -+static void print_nw_user_info (struct nw_user_info ui){ -+ printf("%s:x:%d:%d:%s:%s:%s\n",ui.cn,ui.uid,ui.gid,ui.gecos,ui.dir,ui.shell); -+} -+ -+static void print_passwd (struct passwd pwd){ -+ printf("%s:%s:%d:%d:%s:%s:%s\n",pwd.pw_name,pwd.pw_passwd,pwd.pw_uid,pwd.pw_gid,pwd.pw_gecos,pwd.pw_dir,pwd.pw_shell); -+} -+ -+ -+/****************************************** internal structure for storing NDS group's infos ***/ -+struct nw_group_member { -+ struct nw_group_member* next; -+ char * member; -+}; -+ -+struct nw_group_info { -+ char * cn; -+ char * alias; -+ char * passwd; -+ gid_t gid; -+ struct nw_group_member * first; -+ struct nw_group_member * last; -+ int nbMembers; -+ int qflag; -+ }; -+ -+ -+static void init_nw_group_info (struct nw_group_info *gi,int qflag){ -+ gi->cn=NULL; -+ gi->alias=NULL; -+ gi->passwd=NULL; -+ gi->gid=(gid_t)-1; -+ gi->qflag= qflag; -+ gi->first=NULL; -+ gi->last=NULL; -+ gi->nbMembers=0; -+} -+ -+static void free_nw_group_info (struct nw_group_info *gi){ -+ -+ struct nw_group_member* p; -+ struct nw_group_member* bkp; -+#define FREEFIELD(x) do if (gi->x) {free(gi->x) ; gi->x=NULL;} while (0); -+ FREEFIELD(cn); -+ FREEFIELD(alias); -+ FREEFIELD(passwd); -+ gi->gid=(gid_t)-1; -+ gi->qflag=0; -+#undef FREEFIELD -+ for (p=gi->first; p; p=bkp) { -+ bkp=p->next; -+ free (p->member); -+ free(p); -+ } -+ gi->first=gi->last=NULL; -+ gi->nbMembers=0; -+} -+ -+ -+ -+static int fix_nw_group_info (struct nw_group_info *gi ,struct nss_ncp_conf* conf){ -+/* fill NDS missing attributes with default values -+ any group have a cn, and if gid was not found in NDS we will later consider -+ that the corresponding Unix group is not activated unless a fallback value is defined in conf -+*/ -+ if (gi->cn) { -+ if (gi->gid== (gid_t)-1) -+ gi->gid=conf->fallbackGid; -+ -+ gi->passwd= gi->passwd ? gi->passwd: strdup("x"); // cannot read passwd from NDS -+ if (!gi->passwd) { -+ traceForce(conf->debug,LOG_ERR, "not enough memory when allocating password for group %s\n ",gi->cn); -+ return 1; -+ } -+ if (gi->alias) { -+ if (gi->cn) free(gi->cn); -+ gi->cn=strdup(gi->alias); -+ if (!gi->cn) { -+ traceForce(conf->debug,LOG_ERR, "not enough memory when allocating alias for group %s\n ",gi->alias); -+ return 1; -+ } -+ } -+ }else { -+ gi->gid== (gid_t)-1; // unable to read CN (NDS browse rights not set) , skip it ! -+ } -+ return 0; -+} -+ -+ -+ -+/*********** -+return found info to caller in the format expected by NSS that is: -+filling the group structure as pointers to the passed buffer -+ -+struct group -+ { -+ char *gr_name; // Group name. -+ char *gr_passwd; // Password. -+ __gid_t gr_gid; // Group ID. -+ char **gr_mem; // Member list. -+ }; -+******************/ -+ -+static enum nss_status nw_group_info_to_group(struct nw_group_info gi,struct group *grp, -+ char * buffer, size_t buflen, int * errnop, struct nss_ncp_conf *conf){ -+ -+ if (gi.gid != (gid_t)-1) { -+ grp->gr_gid=gi.gid; -+ grp->gr_name=copy_to_buffer (&buffer,&buflen,gi.cn); -+ if (!grp->gr_name) goto outnomem; -+ grp->gr_passwd=copy_to_buffer (&buffer,&buflen,gi.passwd); -+ if (!grp->gr_passwd) goto outnomem; -+ -+ {// copy members to buffer -+ // names are stored backwards from end of buffer -+ // and adress pointers forward from start of buffer -+ // exit with NSS_STATUS_TRYAGAIN if buffer is too small -+ // code inspired from nss_mysql by Guillaume Morin -+ -+ size_t required=0; -+ char ** addPtr; -+ char * end_of_buffer,*tmp,*nm; -+ struct nw_group_member *p; -+ -+ for (p=gi.first;p;p=p->next) { -+ required += strlen(p->member)+1+sizeof(char**); -+ } -+ if (required + sizeof(char**) >=buflen) { -+ traceForce(conf->debug,LOG_ERR, "unable to copy members of group '%s' to buffer :need=%d have= %d\n",gi.cn,required,buflen); -+ goto outnomem; -+ } -+ addPtr= (char**)buffer; -+ grp->gr_mem=addPtr; -+ end_of_buffer= buffer+buflen-1; -+ p=gi.first; -+ while (p) { -+ end_of_buffer -=strlen(p->member)+1; -+ tmp=end_of_buffer; //do not change end_of_buffer when copying the new member ! -+ nm=copy_to_buffer(&tmp,&buflen,p->member); -+ if (!nm) { -+ traceForce(conf->debug,LOG_ERR, "not enough memory when copying nw_group_info to group for %s\n ",gi.cn); -+ goto outnomem; -+ } -+ *addPtr=nm; -+ //printf("%s=%s\n",p->member,*addPtr); -+ addPtr++; -+ p=p->next; -+ } -+ *addPtr=NULL; // end of table of pointers -+ } -+ *errnop=0; -+ return NSS_STATUS_SUCCESS; -+outnomem: -+ -+ *errnop=ERANGE; -+ return NSS_STATUS_TRYAGAIN; -+ } else { -+ trace(conf->debug,LOG_NOTICE, "group %s has no Unix GID in NDS\n ", gi.cn); -+ *errnop=ENOENT; -+ return NSS_STATUS_NOTFOUND; -+ } -+} -+ -+ -+static void print_nw_group_info (struct nw_group_info gi){ -+ struct nw_group_member* p; -+ -+ printf("%s:x:%d:%d members:",gi.cn,gi.gid,gi.nbMembers); -+ for (p=gi.first;p;p=p->next) { -+ printf("%s",p->member); -+ if (p->next) printf(","); -+ } -+ printf("\n"); -+} -+ -+static void print_group (struct group grp){ -+ char ** mmb; int num; -+ printf("%s:%s:%d:",grp.gr_name,grp.gr_passwd,grp.gr_gid); -+ for (mmb=grp.gr_mem,num=0;*mmb; mmb++,num++) { -+ if (num) -+ printf(","); -+ printf ("%s",*mmb); -+ -+ } -+ printf("\n"); -+ -+} -+ -+ -+/****************************************** internal structure for storing NDS user's shadow infos ***/ -+struct nw_shadow_info { -+ char * cn; -+ char * passwd; -+ long int lstchg; -+ long int sp_min; -+ long int sp_max; -+ long int sp_warn; -+ long int sp_inact; -+ long int sp_expire; -+ unsigned long sp_flag; -+ uid_t uid; -+ int qflag; -+ }; -+ -+static void init_nw_shadow_info (struct nw_shadow_info *si,int qflag){ -+ si->cn=NULL; -+ si->passwd=NULL; -+ si->lstchg=0; -+ si->sp_min=0; -+ si->sp_max=0; -+ si->sp_warn=0; -+ si->sp_inact=0; -+ si->sp_expire=0; -+ si->sp_flag=-1; -+ si->uid=(uid_t)-1; -+ si->qflag= qflag; -+} -+ -+static void free_nw_shadow_info (struct nw_shadow_info *si){ -+#define FREEFIELD(x) do if (si->x) {free(si->x) ; si->x=NULL;} while (0); -+ FREEFIELD(cn); -+ FREEFIELD(passwd); -+ si->lstchg=0; -+ si->sp_min=0; -+ si->sp_max=0; -+ si->sp_warn=0; -+ si->sp_inact=0; -+ si->sp_expire=0; -+ si->sp_flag=-1; -+ si->uid=(uid_t)-1; -+ si->qflag=0; -+#undef FREEFIELD -+} -+ -+ -+static int fix_nw_shadow_info (struct nw_shadow_info *si ,struct nss_ncp_conf *conf){ -+/* fill NDS missing attributes with default values -+ any user have a cn, and if uid was not found in NDS we will later consider -+ that the corresponding Unix account is not activated unless a fallback value is defined in conf -+*/ -+ if (si->cn) { -+ if (si->uid== (uid_t)-1) -+ si->uid=conf->fallbackUid; -+ si->lstchg= si->lstchg ? si->lstchg : time(NULL)/24/3600; -+ si->sp_min= si->sp_min ? si->sp_min: 0; -+ si->sp_max= si->sp_max ? si->sp_max: 99999; -+ si->sp_warn=si->sp_warn ? si->sp_warn: 7; -+ si->passwd= si->passwd ? si->passwd: strdup("!!"); // cannot read passwd from NDS -+ if (!si->passwd) { -+ traceForce(conf->debug,LOG_ERR, "not enough memory when allocating password for shadow user %s\n ",si->cn); -+ return 1; -+ -+ } -+ }else { -+ si->uid== (uid_t)-1; // unable to read CN (NDS browse rights not set) , skip it ! -+ } -+ return 0; -+} -+ -+/*** -+ return found info to caller in the format expected by NSS that is: -+ filling the shadow structure as pointers to the passed buffer -+ char *sp_namp; // Login nae. -+ char *sp_pwdp; // Encrypted password. -+ long int sp_lstchg; // Date of last change. -+ long int sp_min; // Minimum number of days between changes. -+ long int sp_max; // Maximum number of days between changes. -+ long int sp_warn; // Number of days to warn user to change the password. -+ long int sp_inact; // Number of days the account may be inactive. -+ long int sp_expire; // Number of days since 1970-01-01 until account expires. -+ unsigned long int sp_flag; // Reserved. -+*****/ -+ -+static enum nss_status nw_shadow_info_to_shadow(struct nw_shadow_info si,struct spwd *spw, -+ char * buffer, size_t buflen, int * errnop, struct nss_ncp_conf *conf){ -+ -+ if (si.uid != (uid_t)-1) { -+ spw->sp_namp=copy_to_buffer (&buffer,&buflen,si.cn); -+ if (!spw->sp_namp) goto outnomem; -+ spw->sp_pwdp=copy_to_buffer (&buffer,&buflen,si.passwd); -+ if (!spw->sp_pwdp) goto outnomem; -+ -+ spw->sp_lstchg=si.lstchg; -+ spw->sp_min=si.sp_min; -+ spw->sp_max=si.sp_max; -+ spw->sp_warn=si.sp_warn; -+ spw->sp_inact=si.sp_inact; -+ spw->sp_expire=si.sp_expire; -+ spw->sp_flag=si.sp_flag; -+ *errnop=0; -+ return NSS_STATUS_SUCCESS; -+outnomem: -+ traceForce(conf->debug,LOG_ERR, "not enough memory when copying nw_shadow_info to shadow for %s\n ",si.cn); -+ *errnop=ERANGE; -+ return NSS_STATUS_TRYAGAIN; -+ } else { -+ trace(conf->debug,LOG_NOTICE, "user %s has no Unix UID in NDS\n ", si.cn); -+ *errnop=ENOENT; -+ return NSS_STATUS_NOTFOUND; -+ } -+} -+ -+static void print_nw_shadow_info (struct nw_shadow_info si){ -+ -+ printf("%s[%d]:%s:%d:%d:%d:%d:%d:%d:%d\n",si.cn,si.uid,si.passwd,si.lstchg,si.sp_min,si.sp_max,si.sp_warn,si.sp_inact,si.sp_expire,si.sp_flag); -+} -+ -+static void print_shadow (struct spwd spw){ -+ printf("%s:%s:%ld:%ld:%ld:%ld:%ld:%ld:%ld\n",spw.sp_namp,spw.sp_pwdp,spw.sp_lstchg,spw.sp_min,spw.sp_max,spw.sp_warn,spw.sp_inact,spw.sp_expire,spw.sp_flag); -+} -+ -+ -+ -+/****************************************** internal structure for storing NDS user's groups infos ***/ -+struct nw_user_group_info { -+ char * cn; -+ uid_t uid; -+ gid_t* groups; -+ size_t used; -+ size_t alloc; -+ int qflag; -+ }; -+ -+ -+static void init_nw_user_group_info (struct nw_user_group_info *ui,int qflag){ -+ ui->cn=NULL; -+ ui->uid=(uid_t)-1; -+ ui->groups=NULL; -+ ui->used=0; -+ ui->alloc=0; -+ ui->qflag= qflag; -+} -+ -+static void free_nw_user_group_info (struct nw_user_group_info *ui){ -+#define FREEFIELD(x) do if (ui->x) {free(ui->x) ; ui->x=NULL;} while (0); -+ FREEFIELD(cn); -+ FREEFIELD(groups); -+ ui->used=0; -+ ui->alloc=0; -+ ui->uid=(uid_t)-1; -+ ui->qflag=0; -+#undef FREEFIELD -+} -+ -+ -+static int fix_nw_user_group_info (struct nw_user_group_info *ui ,struct nss_ncp_conf * conf){ -+/* fill NDS missing attributes with default values -+ any user have a cn, and if uid was not found in NDS we consider -+ that the corresponding Unix account is not activated unless a fallback value is defined in conf -+*/ -+ if (ui->cn) { -+ if (ui->uid== (uid_t)-1) -+ ui->uid=conf->fallbackUid; -+ }else { -+ ui->uid== (uid_t)-1; // unable to read CN (NDS browse rights not set) , skip it ! -+ } -+ return 0; -+} -+ -+ -+// return found info to caller in the format expected by NSS that is: -+// filling up groups array -+// code similar to nss_ldap -+ -+static enum nss_status nw_user_group_info_to_groups (struct nw_user_group_info ui,gid_t group, long int *start, -+ long int *size, gid_t * groups,long int limit,int *errnop,struct nss_ncp_conf * conf) { -+ -+ if (ui.uid != (uid_t)-1) { -+ int i; -+ for (i=0; idebug,LOG_ERR, "initgroups: not enough memory when reallocating group array for %s \n ",ui.cn); -+ *errnop=ERANGE; -+ return NSS_STATUS_TRYAGAIN; -+ } else { -+ trace(conf->debug,LOG_NOTICE, "user %s has no Unix UID in NDS\n ", ui.cn); -+ *errnop=ENOENT; -+ return NSS_STATUS_NOTFOUND; -+ } -+} -+ -+static void print_nw_user_group_info (struct nw_user_group_info ui){ -+ int i; -+ -+ printf("%s:%d:%d:%d:",ui.cn,ui.uid,ui.used,ui.alloc); -+ for (i=0;i attrname; ptr++) { -+ dserr = NWDSPutAttrName(ctx, attrlist, ptr->attrname); -+ if (dserr) { -+ traceForce(debugMode,LOG_WARNING, "NWDSPutAttrName(%s) failed with %s\n", ptr->attrname, strnwerror(dserr)); -+ goto bailoutbuf1; -+ } -+ } -+ dserr = NWDSAllocBuf(DEFAULT_MESSAGE_LEN, &info); -+ if (dserr) { -+ traceForce(debugMode,LOG_WARNING, "NWDSAllocBuf() failed with %s\n", strnwerror(dserr)); -+ goto bailoutbuf1; -+ } -+ iterHandle = NO_MORE_ITERATIONS; -+ do { -+ NWObjectCount attrs; -+ -+ dserr = NWDSRead(ctx, objname, DS_ATTRIBUTE_VALUES, 0, attrlist, &iterHandle, info); -+ if (dserr) { -+ if (dserr == ERR_NO_SUCH_ATTRIBUTE) -+ dserr = 0;// attribute is missing . OK -+ else -+ traceForce(debugMode,LOG_WARNING, "NWDSRead() failed for %s with %s\n", objname,strnwerror(dserr)); -+ goto bailoutbuf2; -+ } -+ dserr = NWDSGetAttrCount(ctx, info, &attrs); -+ if (dserr) { -+ traceForce(debugMode,LOG_WARNING, "NWDSGetAttrCount() failed with %s\n", strnwerror(dserr)); -+ goto bailoutcloit; -+ } -+ while (attrs--) { -+ NWDSChar attrname[MAX_SCHEMA_NAME_BYTES]; -+ enum SYNTAX synt; -+ NWObjectCount vals; -+ -+ dserr = NWDSGetAttrName(ctx, info, attrname, &vals, &synt); -+ if (dserr) { -+ traceForce(debugMode,LOG_WARNING, "NWDSGetAttrName() failed with %s\n", strnwerror(dserr)); -+ goto bailoutcloit; -+ } -+ while (vals--) { -+ size_t sz; -+ void *val; -+ -+ dserr = NWDSComputeAttrValSize(ctx, info, synt, &sz); -+ if (dserr) { -+ traceForce(debugMode,LOG_WARNING, "NWDSComputeAttrValSize() failed with %s\n", strnwerror(dserr)); -+ goto bailoutcloit; -+ } -+ val = malloc(sz); -+ if (!val) { -+ traceForce(debugMode,LOG_WARNING, "malloc() failed with %s\n", strnwerror(ENOMEM)); -+ goto bailoutcloit; -+ } -+ dserr = NWDSGetAttrVal(ctx, info, synt, val); -+ if (dserr) { -+ free(val); -+ traceForce(debugMode,LOG_WARNING, "NWDSGetAttrVal() failed with %s\n", strnwerror(dserr)); -+ goto bailoutcloit; -+ } -+ for (ptr = atlist; ptr->attrname; ptr++) { -+ if (!strcasecmp(ptr->attrname, attrname)) -+ break; -+ } -+ if (ptr->getval) { -+ if (ptr->synt != synt) { -+ traceForce(debugMode,LOG_WARNING, "Incompatible tree schema, %s has syntax %d instead of %d\n", attrname, synt, ptr->synt); -+ } else { -+ // ajout PP dserr= !!! en cas de pb mémoire -+ dserr = ptr->getval(ctx, val, arg); -+ } -+ } -+ free(val); -+ if (dserr) { -+ goto bailoutcloit; -+ } -+ } -+ } -+ } while (iterHandle != NO_MORE_ITERATIONS); -+bailoutcloit:; -+ if (iterHandle != NO_MORE_ITERATIONS) { -+ NWDSCCODE dserr2 = NWDSCloseIteration(ctx, DSV_READ, iterHandle); -+ if (dserr2) { -+ traceForce(debugMode,LOG_WARNING, "NWDSCloseIteration() failed with %s\n", strnwerror(dserr2)); -+ } -+ } -+bailoutbuf2:; -+ NWDSFreeBuf(info); -+bailoutbuf1:; -+ NWDSFreeBuf(attrlist); -+bailout:; -+ return dserr; -+} -+ -+ -+/*****************************************************GET USER INFO FROM NDS *************/ -+/************************************ helper functions to extract NDS properties ********/ -+// called as callbacks by nds_read_attrs -+ -+static NWDSCCODE nds_user_cn(NWDSContextHandle ctx, const void *val, void *arg){ -+ struct nw_user_info *ui = (struct nw_user_info *) arg; -+ -+ if (!ui->cn) { -+ char *v = strdup((const char *) val); -+ if (!v) { -+ traceForce(ui->qflag,LOG_WARNING, "Not enough memory for strdup()\n"); -+ return ENOMEM; -+ } -+ ui->cn = v; -+ trace(ui->qflag,LOG_NOTICE, "got a Unix cn %s from %s\n ", ui->cn, ATTR_CN); -+ } -+ return 0; -+} -+ -+static NWDSCCODE nds_user_unixuid(NWDSContextHandle ctx, const void *val, void *arg){ -+ struct nw_user_info *ui = (struct nw_user_info *) arg; -+ if (ui->uid == (uid_t) -1) { -+ ui->uid = *(const Integer_T *) val; -+ // talk a bit (real NDS8 attribute or dummy ?) -+ trace(ui->qflag,LOG_NOTICE, "got a Unix ID %d from %s\n ", ui->uid, ATTR_UID); -+ } -+ return 0; -+} -+ -+static NWDSCCODE nds_user_unixpgid(NWDSContextHandle ctx, const void *val, void *arg){ -+ struct nw_user_info *ui = (struct nw_user_info *) arg; -+ -+ if (ui->gid == (gid_t) -1) { -+ ui->gid = *(const Integer_T *) val; -+ // talk a bit (real NDS8 attribute or dummy ?) -+ trace(ui->qflag,LOG_NOTICE, "got a Unix PGID %d from %s\n ", ui->gid, ATTR_PGID); -+ } -+ return 0; -+} -+ -+// this is the same founction as above ??? -+// does Netware has two synonyms for the same property (UNIX:GID" -+// and UNIX:Primary GroupID??? -+static NWDSCCODE nds_user_unixgid(NWDSContextHandle ctx, const void *val, void *arg){ -+ struct nw_user_info *ui = (struct nw_user_info *) arg; -+ -+ if (ui->gid == (gid_t) -1) { -+ ui->gid = *(const Integer_T *) val; -+ // talk a bit (real NDS8 attribute or dummy ?) -+ trace(ui->qflag,LOG_NOTICE, "got a Unix GID %d from %s\n ", ui->gid, ATTR_GID); -+ } -+ return 0; -+} -+ -+static NWDSCCODE nds_user_unixhome(NWDSContextHandle ctx, const void *val, void *arg){ -+ struct nw_user_info *ui = (struct nw_user_info *) arg; -+ -+ if (!ui->dir) { -+ char *v = strdup((const char *) val); -+ if (!v) { -+ traceForce(ui->qflag,LOG_WARNING, "Not enough memory for strdup()\n"); -+ return ENOMEM; -+ } -+ ui->dir = v; -+ // talk a bit (real NDS8 attribute or dummy ?) -+ trace(ui->qflag,LOG_NOTICE, "got a Unix Home %s from %s\n ", ui->dir, ATTR_HOME); -+ } -+ return 0; -+} -+ -+static NWDSCCODE nds_user_unixshell(NWDSContextHandle ctx, const void *val, void *arg){ -+ struct nw_user_info *ui = (struct nw_user_info *) arg; -+ -+ if (!ui->shell) { -+ char *v = strdup((const char *) val); -+ if (!v) { -+ traceForce(ui->qflag,LOG_WARNING, "Not enough memory for strdup()\n"); -+ return ENOMEM; -+ } -+ ui->shell = v; -+ // talk a bit (real NDS8 attribute or dummy ?) -+ trace(ui->qflag,LOG_NOTICE, "got a Unix shell %s from %s\n ", ui->shell, ATTR_SHELL); -+ } -+ return 0; -+} -+ -+static NWDSCCODE nds_update_gecos(struct nw_user_info *ui, const char *str) { -+ char *v; -+ size_t sadd = strlen(str) + 1; -+ -+ if (ui->gecos) { // already got the name -+ size_t sold = strlen(ui->gecos); -+ trace(ui->qflag,LOG_NOTICE, "extending gecos %d %d\n",sadd,sold); -+ -+ v = realloc(ui->gecos, sold + 1 + sadd); -+ if (!v) { -+ traceForce(ui->qflag,LOG_WARNING, "Not enough memory for strdup()\n"); -+ return ENOMEM; -+ } -+ v[sold] = ','; -+ memcpy(v + sold+1, str, sadd); // bizarre sold a disparu dans pam_ncp ???? -+ } else { -+ trace(ui->qflag,LOG_NOTICE, "creating gecos %d \n",sadd); -+ v = malloc(sadd); -+ if (!v) { -+ traceForce(ui->qflag,LOG_WARNING, "Not enough memory for strdup()\n"); -+ return ENOMEM; -+ } -+ memcpy(v, str, sadd); -+ } -+ ui->gecos = v; -+ return 0; -+} -+ -+// PP we append the Comment after the full name, separated by a comma -+static NWDSCCODE nds_user_unixcomment(NWDSContextHandle ctx, const void *val, void *arg){ -+ struct nw_user_info *ui = (struct nw_user_info *) arg; -+ -+ // talk a bit (real NDS8 attribute or dummy ?) -+ trace(ui->qflag,LOG_NOTICE, "got a Unix Comment %s from %s\n ", (const char *) val, ATTR_COM); -+ return nds_update_gecos(ui, (const char *) val); -+} -+ -+// PP can be any naming attribute returning a SYN_CI_STRING see define before nds_user_info() -+// PP we add the name before any comment that can be there -+static NWDSCCODE nds_user_gecos(NWDSContextHandle ctx, const void *val, void *arg) { -+ struct nw_user_info *ui = (struct nw_user_info *) arg; -+ NWDSCCODE err; -+ -+ trace(ui->qflag,LOG_NOTICE, "before full name gecos is %s\n ", ui->gecos ? : "(null)"); -+ err = nds_update_gecos(ui, (const char *) val); -+ if (err) -+ return err; -+ trace(ui->qflag,LOG_NOTICE, "after full name gecos is %s\n ", ui->gecos); -+ return 0; -+} -+ -+// PP: id no NDS8 is present, collect the user's basic Unix informations from the location -+// strings with the format X:nnnnnnnn , X = [U,G,H,S,P,O,C,Z] upper of lower case -+// Of course, even if NDS8 IS present, we still look at these, just in case the migration -+// is not complete and to look for the user's ZENFLAG -+ -+static NWDSCCODE nds_user_location(NWDSContextHandle ctx, const void *val, void *arg){ -+ struct nw_user_info *ui = (struct nw_user_info *) arg; -+ const char *pt = (const char *) val; -+ char *v; -+ int n; -+ int err; -+ -+ trace(ui->qflag,LOG_NOTICE, "start of NW location got %s\n ", pt); -+ if (strlen(pt) > 2 && pt[1] == ':') { -+ const char *cur_pt = pt + 2; -+ switch (*pt) { -+ case 'u': //user ID leading spaces not significant -+ case 'U': -+ if (ui->uid == (uid_t) -1) { // do not overwrite a DS 8 answer -+ switch (getnumber(&n, &cur_pt)) { -+ case 0: -+ ui->uid = n; -+ break; -+ default: -+ traceForce(ui->qflag,LOG_ERR, "Invalid user ID %s\n", pt); -+ } -+ } -+ break; -+ case 'g': // primary group number GID leading spaces not significant -+ case 'G': -+ if (ui->gid == (gid_t) -1) { // do not overwrite a DS 8 answer -+ switch (getnumber(&n, &cur_pt)) { -+ case 0: -+ ui->gid = n; -+ break; -+ default: -+ traceForce(ui->qflag,LOG_ERR, "Invalid primary user GID %s\n", pt); -+ } -+ } -+ break; -+ case 'h': // home Unix all spaces significant (must have none ?) -+ case 'H': -+ if (!ui->dir) { // do not overwrite a DS 8 answer -+ v = strdup(cur_pt); -+ if (!v) { -+ traceForce(ui->qflag,LOG_WARNING, "Not enough memory for strdup()\n"); -+ return ENOMEM; -+ } -+ ui->dir = v; -+ } -+ break; -+ case 's': //shell Unix all spaces significant (must have none ?) -+ case 'S': -+ if (!ui->shell) { // do not overwrite a DS 8 answer -+ v = strdup(cur_pt); -+ if (!v) { -+ traceForce(ui->qflag,LOG_WARNING, "Not enough memory for strdup()\n"); -+ return ENOMEM; -+ } -+ ui->shell = v; -+ } -+ break; -+ case 'c': // comment all spaces significant. Will be appended to the gecos naming -+ case 'C': // attribute with a comma and set by calling chfn -f xxxx -o xxxx -+ // if comma are present in the string chfn will fails -+ trace(ui->qflag,LOG_NOTICE, "before comment gecos is %s\n ", ui->gecos); -+ err = nds_update_gecos(ui, cur_pt); -+ if (err) -+ return err; -+ trace(ui->qflag,LOG_NOTICE, "gecos %s\n ", ui->gecos); -+ break; -+ } -+ } -+ return 0; -+} -+ -+static NWDSCCODE nds_user_location2(NWDSContextHandle ctx, const void *val, void *arg){ -+ struct nw_user_info *ui = (struct nw_user_info *) arg; -+ const char *pt = (const char *) val; -+ char *v; -+ int n; -+ int err; -+ -+ trace(ui->qflag,LOG_NOTICE, "start of NW location got %s\n ", pt); -+ -+ if (strlen(pt) > 2 && pt[1] == ':') { -+ const char *cur_pt = pt + 2; -+ switch (*pt) { -+ case 'u': //user ID leading spaces not significant -+ case 'U': -+ if (ui->uid == (uid_t) -1) { // do not overwrite a DS 8 answer -+ switch (getnumber(&n, &cur_pt)) { -+ case 0: -+ ui->uid = n; -+ break; -+ default: -+ traceForce(ui->qflag,LOG_ERR, "Invalid user ID %s\n", pt); -+ } -+ } -+ } -+ -+ } -+ return 0; -+} -+ -+ -+static NWDSCCODE nds_user_info(NWDSContextHandle ctx, const NWDSChar * objname, void *ui, int modeDebug){ -+ static const struct attrop atlist[] = { -+ {ATTR_CN, nds_user_cn, SYN_CN}, -+ {ATTR_UID, nds_user_unixuid, SYN_UID}, -+ {ATTR_PGID, nds_user_unixpgid, SYN_PGID}, -+ {ATTR_GID, nds_user_unixgid, SYN_GID}, -+ {ATTR_HOME, nds_user_unixhome, SYN_HOME}, -+ {ATTR_SHELL, nds_user_unixshell, SYN_SHELL}, -+ {ATTR_COM, nds_user_unixcomment, SYN_COM}, -+ {ATTR_GECOS, nds_user_gecos, SYN_CI_STRING}, -+ {NULL, NULL, SYN_UNKNOWN} -+ }; -+ -+ static const struct attrop atlist2[] = { -+ {ATTR_LOCATION, nds_user_location, SYN_LOCATION}, -+ {NULL, NULL, SYN_UNKNOWN} -+ }; -+ -+ NWDSCCODE err; -+ -+// we must do TWO NDS queries since NDS does not return attributes in this order -+// studies of /var/log/secure showed that L attribute usually come out before the NDS8 ones ! -+ err = nds_read_attrs(ctx, objname, ui, atlist,modeDebug); -+ if (err) -+ return err; -+ return nds_read_attrs(ctx, objname, ui, atlist2,modeDebug); -+} -+ -+ -+/***************** GET limited user's information (used when searching for group members) */ -+/* we search only UID either stored in NDS8 attributes ( Real or Dummy) or in Location */ -+static NWDSCCODE nds_user_info2(NWDSContextHandle ctx, const NWDSChar * objname, void *ui,int modeDebug){ -+ static const struct attrop atlist[] = { -+ {ATTR_CN, nds_user_cn, SYN_CN}, -+ {ATTR_UID, nds_user_unixuid, SYN_UID}, -+ {NULL, NULL, SYN_UNKNOWN} -+ }; -+ -+ static const struct attrop atlist2[] = { -+ {ATTR_LOCATION, nds_user_location2, SYN_LOCATION}, -+ {NULL, NULL, SYN_UNKNOWN} -+ }; -+ -+ NWDSCCODE err; -+ -+// we must do TWO NDS queries since NDS does not return attributes in this order -+// studies of /var/log/secure showed that L attribute usually come out before the NDS8 ones ! -+ err = nds_read_attrs(ctx, objname, ui, atlist,modeDebug); -+ if (err) -+ return err; -+ return nds_read_attrs(ctx, objname, ui, atlist2,modeDebug); -+} -+ -+ -+/*****************************************************GET GROUP INFO FROM NDS *************/ -+ -+ -+/** gather Unix groups informations */ -+ -+static NWDSCCODE nds_group_cn(NWDSContextHandle ctx, const void *val, void *arg) -+{ -+ struct nw_group_info *gi = (struct nw_group_info *) arg; -+ -+ if (!gi->cn) { -+ char *v = strdup((const char *) val); -+ if (!v) { -+ traceForce(gi->qflag,LOG_WARNING, "Not enough memory for strdup()\n"); -+ return ENOMEM; -+ } -+ gi->cn = v; -+ trace(gi->qflag,LOG_NOTICE, "got a Unix cn %s from %s\n ", gi->cn, ATTR_CN); -+ } -+ return 0; -+} -+ -+ -+static NWDSCCODE nds_group_members(NWDSContextHandle ctx, const void *val, void *arg){ -+ -+ struct nw_group_info *gi = (struct nw_group_info *) arg; -+ NWDSCCODE err=0; -+ struct nw_user_info ui; -+ struct nw_group_member* newMember; -+ -+ -+ init_nw_user_info(&ui,gi->qflag); -+ //check whether member has some Unix properties -+ err=nds_user_info2(ctx, (const char *)val, &ui,gi->qflag); -+ if (!err && ui.uid !=(uid_t)-1 && ui.cn) { -+ char *v = strdup(ui.cn); -+ if (!v ) { -+ traceForce(gi->qflag,LOG_WARNING, "Not enough memory for adding member %s tp group %s\n",ui.cn,gi->cn); -+ err=ENOMEM; -+ } else { -+ newMember=malloc(sizeof(*newMember)); -+ if (newMember) { -+ newMember->member=v; -+ newMember->next=NULL; -+ if (!gi->first) gi->first=newMember; -+ else gi->last->next=newMember; -+ gi->last=newMember; -+ gi->nbMembers++; -+ trace(gi->qflag,LOG_NOTICE, "got a Unix members %s from %s\n ", ui.cn,gi->cn); -+ } else { -+ free(v); -+ traceForce(gi->qflag,LOG_WARNING, "Not enough memory for adding member %s tp group %s\n",ui.cn,gi->cn); -+ err=ENOMEM; -+ } -+ } -+ } -+ free_nw_user_info(&ui); -+ return err; -+} -+ -+ -+static NWDSCCODE nds_group_unixgid(NWDSContextHandle ctx, const void* val, void* arg) { -+ struct nw_group_info* gi = (struct nw_group_info*)arg; -+ -+ if (gi->gid == (gid_t)-1) { -+ gi->gid = *(const Integer_T*)val; -+ // talk a bit (real NDS8 attribute or dummy ?) -+ trace(gi->qflag,LOG_NOTICE, "got a Unix GID %d from %s\n ", gi->gid, ATTR_GID); -+ } -+ return 0; -+} -+ -+// PP: id no NDS8 is present, collect the group Unix ID from one of the location -+// string with the format G:nnn -+// can also used to specify a name of unix group different of the NDS'one -+// eg. everyone --> users or staff --> root -+static NWDSCCODE nds_group_location(NWDSContextHandle ctx, const void* val, void* arg) { -+ -+ struct nw_group_info* gi = (struct nw_group_info*)arg; -+ const char *pt= (const char*) val; -+ int n; -+ -+ if (strlen(pt)>2 && pt[1]==':') { -+ const char* cur_pt=pt+2; -+ switch (*pt) { -+ case 'g': -+ case 'G':if (gi->gid == (gid_t)-1) { -+ switch (getnumber(&n,&cur_pt)) { -+ case 0: gi->gid=n; break; -+ default:traceForce(gi->qflag,LOG_ERR, "Invalid group GID %s for %s\n",pt,gi->cn); -+ } -+ } -+ break; -+ case 'n': -+ case 'N': // unix equivalent name -+ if (!gi->alias) { -+ char* v = strdup(cur_pt); -+ if (!v) { -+ traceForce(gi->qflag,LOG_WARNING, "Not enough memory for strdup()\n"); -+ return ENOMEM; -+ } -+ gi->alias = v; -+ trace(gi->qflag,LOG_NOTICE, "group:got a Unix alias %s from %s\n ", gi->alias, gi->cn); -+ } -+ break; -+ } -+ } -+ return 0; -+} -+ -+ -+static NWDSCCODE nds_group_info(NWDSContextHandle ctx, const NWDSChar* objname, void * gi, int modeDebug) { -+ static const struct attrop atlist[] = { -+ { ATTR_CN, nds_group_cn, SYN_CN }, -+ { ATTR_GID, nds_group_unixgid, SYN_GID }, -+ { ATTR_MEMBERS, nds_group_members, SYN_MEMBERS}, -+ { NULL, NULL, SYN_UNKNOWN }}; -+ -+ static const struct attrop atlist2[] = { -+ {ATTR_LOCATION, nds_group_location, SYN_LOCATION}, -+ {NULL, NULL, SYN_UNKNOWN}}; -+ -+ -+ NWDSCCODE err; -+ -+// we must do TWO NDS queries since NDS does not return attributes in this order -+// studies of /var/log/secure showed that L attribute usually come out before the NDS8 ones ! -+ err = nds_read_attrs(ctx, objname, gi, atlist,modeDebug); -+ if (err) -+ return err; -+ return nds_read_attrs(ctx, objname, gi, atlist2,modeDebug); -+} -+ -+ -+/***************** GET limited group's information (used when searching for groups to which a user belongs) */ -+static NWDSCCODE nds_group_location2(NWDSContextHandle ctx, const void* val, void* arg) { -+ -+ struct nw_group_info* gi = (struct nw_group_info*)arg; -+ const char *pt= (const char*) val; -+ int n; -+ -+ if (strlen(pt)>2 && pt[1]==':') { -+ const char* cur_pt=pt+2; -+ switch (*pt) { -+ case 'g': -+ case 'G':if (gi->gid == (gid_t)-1) { -+ switch (getnumber(&n,&cur_pt)) { -+ case 0: gi->gid=n; break; -+ default:traceForce(gi->qflag,LOG_ERR, "Invalid group GID %s for %s\n",pt,gi->cn); -+ } -+ } -+ break; -+ } -+ } -+ return 0; -+} -+ -+/* we search only GID either stored in NDS8 attributes ( Real or Dummy) or in Location */ -+static NWDSCCODE nds_group_info2(NWDSContextHandle ctx, const NWDSChar* objname, void * gi, int modeDebug) { -+ -+ static const struct attrop atlist[] = { -+ { ATTR_GID, nds_group_unixgid, SYN_GID }, -+ { NULL, NULL, SYN_UNKNOWN }}; -+ -+ static const struct attrop atlist2[] = { -+ {ATTR_LOCATION, nds_group_location2, SYN_LOCATION}, -+ {NULL, NULL, SYN_UNKNOWN}}; -+ -+ -+ NWDSCCODE err; -+ -+// we must do TWO NDS queries since NDS does not return attributes in this order -+// studies of /var/log/secure showed that L attribute usually come out before the NDS8 ones ! -+ err = nds_read_attrs(ctx, objname, gi, atlist,modeDebug); -+ if (err) -+ return err; -+ return nds_read_attrs(ctx, objname, gi, atlist2,modeDebug); -+} -+ -+ -+/*****************************************************GET SHADOW INFO FROM NDS *************/ -+ -+static NWDSCCODE nds_shadow_cn(NWDSContextHandle ctx, const void *val, void *arg){ -+ -+ struct nw_shadow_info *si = (struct nw_shadow_info *) arg; -+ -+ if (!si->cn) { -+ char *v = strdup((const char *) val); -+ if (!v) { -+ traceForce(si->qflag & QF_DEBUG,LOG_WARNING, "Not enough memory for strdup()\n"); -+ return ENOMEM; -+ } -+ si->cn = v; -+ trace(si->qflag & QF_DEBUG,LOG_NOTICE, "shadow:got a Unix cn %s from %s\n ", si->cn, ATTR_CN); -+ } -+ return 0; -+} -+ -+ -+static NWDSCCODE nds_shadow_unixuid(NWDSContextHandle ctx, const void *val, void *arg){ -+ -+ struct nw_shadow_info *si = (struct nw_shadow_info *) arg; -+ if (si->uid == (uid_t) -1) { -+ si->uid = *(const Integer_T *) val; -+ // talk a bit (real NDS8 attribute or dummy ?) -+ trace(si->qflag & QF_DEBUG,LOG_NOTICE, "shadow: got a Unix ID %d from %s\n ", si->uid, ATTR_UID); -+ } -+ return 0; -+} -+ -+ -+// PP: id no NDS8 is present, collect the user's basic Unix informations from the location -+// strings with the format X:nnnnnnnn , X = [U,G,H,S,P,O,C,Z] upper of lower case -+// Of course, even if NDS8 IS present, we still look at these, just in case the migration -+// is not complete and to look for the user's ZENFLAG -+ -+static NWDSCCODE nds_shadow_location(NWDSContextHandle ctx, const void *val, void *arg){ -+ -+ struct nw_shadow_info *si = (struct nw_shadow_info *) arg; -+ const char *pt = (const char *) val; -+ char *v; -+ int n; -+ int err; -+ -+ trace(si->qflag & QF_DEBUG,LOG_NOTICE, "shadow: start of NW location got %s\n ", pt); -+ -+ if (strlen(pt) > 2 && pt[1] == ':') { -+ const char *cur_pt = pt + 2; -+ switch (*pt) { -+ case 'u': //user ID leading spaces not significant -+ case 'U': -+ if (si->uid == (uid_t) -1) { // do not overwrite a DS 8 answer -+ switch (getnumber(&n, &cur_pt)) { -+ case 0: -+ si->uid = n; -+ break; -+ default: -+ traceForce(si->qflag & QF_DEBUG,LOG_ERR, "shadow:Invalid user ID %s\n", pt); -+ } -+ } -+ break; -+ } -+ -+ } -+ return 0; -+} -+ -+static NWDSCCODE nds_shadow_pwd_expire(NWDSContextHandle ctx, const void *val, void *arg){ -+ struct nw_shadow_info *si = (struct nw_shadow_info *) arg; -+ si->sp_expire = *(const Time_T *) val/3600/24; -+ return 0; -+} -+ -+static NWDSCCODE nds_shadow_int_pwd_expire(NWDSContextHandle ctx, const void *val, void *arg){ -+ struct nw_shadow_info *si = (struct nw_shadow_info *) arg; -+ si->sp_min = *(const Integer_T *) val/3600/24; -+ si->sp_max = *(const Integer_T *) val/3600/24; -+ return 0; -+} -+ -+static NWDSCCODE nds_shadow_acct_expire(NWDSContextHandle ctx, const void *val, void *arg){ -+ struct nw_shadow_info *si = (struct nw_shadow_info *) arg; -+ si->sp_inact = *(const Time_T *) val/3600/24; -+ return 0; -+} -+ -+static NWDSCCODE nds_shadow_grace_pwd_expire (NWDSContextHandle ctx, const void *val, void *arg) { -+// in NDS it is the number of grace login, in Unix the number of DAYS -+ struct nw_shadow_info *si = (struct nw_shadow_info *) arg; -+ si->sp_warn = *(const Integer_T *) val; -+ return 0; -+} -+ -+ -+/*****************************************************GET USER SHADOW INFOS FROM NDS *************/ -+ -+static NWDSCCODE nds_shadow_info(NWDSContextHandle ctx, const NWDSChar * objname, void *si,int modeDebug){ -+ static const struct attrop atlist[] = { -+ {ATTR_CN, nds_shadow_cn, SYN_CN}, -+ {ATTR_UID, nds_shadow_unixuid, SYN_UID}, -+ {ATTR_DATE_PWD_EXPIRE,nds_shadow_pwd_expire,SYN_TIME}, -+ {ATTR_DATE_ACCT_EXPIRE,nds_shadow_acct_expire,SYN_TIME}, -+ {ATTR_INT_PWD_EXPIRE,nds_shadow_int_pwd_expire,SYN_INTERVAL}, -+ {ATTR_GRACE_LIMIT,nds_shadow_grace_pwd_expire,SYN_INTEGER}, -+ {NULL, NULL, SYN_UNKNOWN} -+ }; -+ -+ static const struct attrop atlist2[] = { -+ {ATTR_LOCATION, nds_shadow_location, SYN_LOCATION}, -+ {NULL, NULL, SYN_UNKNOWN} -+ }; -+ -+ NWDSCCODE err; -+ -+// we must do TWO NDS queries since NDS does not return attributes in this order -+// studies of /var/log/secure showed that L attribute usually come out before the NDS8 ones ! -+ err = nds_read_attrs(ctx, objname, si, atlist,modeDebug); -+ if (err) -+ return err; -+ return nds_read_attrs(ctx, objname, si, atlist2,modeDebug); -+} -+ -+ -+/***************get all group id of groups userName belongs to *********************/ -+ -+static NWDSCCODE nds_user_cn2(NWDSContextHandle ctx, const void *val, void *arg){ -+ -+ struct nw_user_group_info *ui = (struct nw_user_group_info *) arg; -+ if (!ui->cn) { -+ char *v = strdup((const char *) val); -+ if (!v) { -+ traceForce(ui->qflag,LOG_WARNING, "Not enough memory for strdup()\n"); -+ return ENOMEM; -+ } -+ ui->cn = v; -+ trace(ui->qflag & QF_DEBUG,LOG_NOTICE, "got a Unix cn %s from %s\n ", ui->cn, ATTR_CN); -+ } -+ return 0; -+} -+ -+ -+ -+static NWDSCCODE nds_user_unixuid2(NWDSContextHandle ctx, const void *val, void *arg){ -+ struct nw_user_group_info *ui = (struct nw_user_group_info *) arg; -+ if (ui->uid == (uid_t) -1) { -+ ui->uid = *(const Integer_T *) val; -+ // talk a bit (real NDS8 attribute or dummy ?) -+ trace(ui->qflag & QF_DEBUG,LOG_NOTICE, "got a Unix ID %d from %s\n ", ui->uid, ATTR_UID); -+ } -+ return 0; -+} -+ -+ -+static NWDSCCODE nds_user_location3(NWDSContextHandle ctx, const void *val, void *arg){ -+ struct nw_user_group_info *ui = (struct nw_user_group_info *) arg; -+ const char *pt = (const char *) val; -+ char *v; -+ int n; -+ int err; -+ -+ -+ trace(ui->qflag & QF_DEBUG,LOG_NOTICE, "start of NW location got %s\n ", pt); -+ -+ if (strlen(pt) > 2 && pt[1] == ':') { -+ const char *cur_pt = pt + 2; -+ switch (*pt) { -+ case 'u': //user ID leading spaces not significant -+ case 'U': -+ if (ui->uid == (uid_t) -1) { // do not overwrite a DS 8 answer -+ switch (getnumber(&n, &cur_pt)) { -+ case 0: -+ ui->uid = n; -+ break; -+ default: -+ traceForce(ui->qflag & QF_DEBUG,LOG_ERR, "Invalid user ID %s\n", pt); -+ } -+ } -+ break; -+ } -+ -+ } -+ return 0; -+} -+ -+static NWDSCCODE nds_get_one_user_group(NWDSContextHandle ctx, const void *val, void *arg){ -+ struct nw_user_group_info *ui = (struct nw_user_group_info *) arg; -+ struct nw_group_info gi; -+ NWDSCCODE ccode; -+ -+ init_nw_group_info(&gi,ui->qflag); -+ //check whether group has some Unix properties -+ trace(ui->qflag & QF_DEBUG,LOG_NOTICE, "found group %s for user %s\n ", (const char*)val, ui->cn); -+ ccode=nds_group_info2(ctx,(const char *)val,&gi,ui->qflag); -+ // found a real GID , no fallback here else all groups would have the same number !!!! -+ if (!ccode && gi.gid != (gid_t) -1) { -+ trace(ui->qflag & QF_DEBUG,LOG_NOTICE, "found group GID %d for user %s\n ", gi.gid, ui->cn); -+ if (ui->used >=ui->alloc) { -+ gid_t* np; -+ size_t ns; -+ if (ui->groups) { -+ ns=ui->alloc +8; -+ np=(gid_t*)realloc (ui->groups,ns*sizeof(gid_t)); -+ }else { -+ ns=8; -+ np=(gid_t*)malloc (ns*sizeof(gid_t)); -+ } -+ if (!np) { -+ traceForce(ui->qflag & QF_DEBUG,LOG_WARNING, "Not enough memory for allocating GID table\n"); -+ return ENOMEM; -+ } -+ ui->groups=np; -+ ui->alloc=ns; -+ } -+ ui->groups[ui->used++]=gi.gid; -+ } -+ free_nw_group_info(&gi); -+ return ccode; -+} -+ -+ -+static NWDSCCODE nds_get_user_groups(NWDSContextHandle ctx, const NWDSChar * objname, void *ui, int modeDebug){ -+// get all groups of userName -+static const struct attrop atlist[] = { -+ {ATTR_CN, nds_user_cn2, SYN_CN}, -+ {ATTR_UID, nds_user_unixuid2, SYN_UID}, -+ {ATTR_GRP_MBS, nds_get_one_user_group, SYN_GRP_MBS}, -+ {NULL, NULL, SYN_UNKNOWN} -+ }; -+ -+ static const struct attrop atlist2[] = { -+ {ATTR_LOCATION, nds_user_location3, SYN_LOCATION}, -+ {NULL, NULL, SYN_UNKNOWN} -+ }; -+ -+ NWDSCCODE err; -+ -+// we must do TWO NDS queries since NDS does not return attributes in this order -+// studies of /var/log/secure showed that L attribute usually come out before the NDS8 ones ! -+ err = nds_read_attrs(ctx, objname, ui, atlist,modeDebug); -+ if (err) -+ return err; -+ return nds_read_attrs(ctx, objname, ui, atlist2,modeDebug); -+ -+} -+ -+/*******************************************************************************************************************/ -+static NWDSCCODE CreateContextAndConn ( NWDSContextHandle *context,NWCONN_HANDLE *conn, struct nss_ncp_conf* conf) { -+ NWDSCCODE ccode; -+ nuint32 contextFlags; -+ -+ trace(conf->debug, LOG_NOTICE,"Entering create context and conn"); -+ -+ ccode = NWDSCreateContextHandle(context); -+ if(ccode) { -+ traceForce(conf->debug,LOG_WARNING,"Error creating context.\n"); -+ goto Exit1; -+ } -+ -+ trace(conf->debug, LOG_NOTICE,"CreateContextHandle OK"); -+ -+ //ccode=NWDSSetContext(*context, DCK_NAME_CONTEXT, conf->startCtx); -+ -+ ccode=NWDSSetContext(*context, DCK_NAME_CONTEXT, "[Root]"); -+ if(ccode){ -+ traceForce(conf->debug,LOG_WARNING,"Error NWDSSetContext(): %d\n",ccode); -+ goto Exit2; -+ } -+ -+ trace(conf->debug, LOG_NOTICE,"SetContext OK"); -+ -+ ccode= NWDSGetContext(*context, DCK_FLAGS, &contextFlags); -+ if( ccode){ -+ traceForce(conf->debug,LOG_WARNING,"NWDSGetContext (DCK_FLAGS) failed, returns %d\n", ccode); -+ goto Exit2; -+ } -+ -+ trace(conf->debug, LOG_NOTICE,"GetContext OK"); -+ -+ contextFlags|= DCV_TYPELESS_NAMES; -+ ccode= NWDSSetContext( *context, DCK_FLAGS, &contextFlags); -+ if( ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSSetContext (DCK_FLAGS DCV_TYPELESS_NAMES) failed, returns %d\n", ccode); -+ goto Exit2; -+ } -+ -+ trace(conf->debug, LOG_NOTICE,"SetContext OK"); -+ trace(conf->debug, LOG_NOTICE,"calling NWCCOpenConnByName ..."); -+ -+ if (conf->server[0] == '/') //using a permanent connection -+ ccode = ncp_open_mount(conf->server, conn); -+ else { -+ -+ if (!conf->useTree) -+ ccode = NWCCOpenConnByName(NULL, conf->server, NWCC_NAME_FORMAT_BIND, 0, 0, conn); -+ else -+ //ccode=NWCXAttachToTreeByName( conn, conf->server); -+ ccode = NWCCOpenConnByName(NULL, conf->server, NWCC_NAME_FORMAT_NDS_TREE, 0, 0, conn); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"Error: NWCCOpenConnByName failed %s\n",strnwerror(ccode)); -+ goto Exit2; -+ } -+ } -+ -+ trace(conf->debug, LOG_NOTICE,"NWCCOpenConnByName OK"); -+ -+ ccode= NWDSAddConnection(*context, *conn); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"Error: NWCCOpenConnByName failed %s\n",strnwerror(ccode)); -+ goto Exit2; -+ } -+ -+ trace(conf->debug, LOG_NOTICE,"AddConnection OK"); -+ -+ if (conf->debug & QF_DEBUG) { -+ char aux[512]; -+ aux[0] = 0; -+ if (!conf->useTree) { -+ NWCCGetConnInfo(*conn, NWCC_INFO_TREE_NAME, sizeof (aux), aux); -+ trace(conf->debug, LOG_DEBUG, "sucessful connection to tree %s by server %s \n",aux,conf->server); -+ }else { -+ NWCCGetConnInfo(*conn, NWCC_INFO_SERVER_NAME, sizeof (aux), aux); -+ trace(conf->debug,LOG_DEBUG, "successful connection by NDS server %s on tree %s\n", aux,conf->server); -+ } -+ } -+ -+Exit2: -+ if (ccode) { -+ trace(conf->debug, LOG_NOTICE,"Closing context and conn due to errors"); -+ if(conn) NWCCCloseConn (*conn); -+ if (context) NWDSFreeContext(*context); -+ *context=NULL; -+ *conn=NULL; -+ } -+Exit1: -+ trace(conf->debug, LOG_NOTICE,"leaving CreateContextAndConn"); -+ return ccode; -+} -+ -+ -+/**** PP TreeScaning routines ***********************/ -+ -+struct TreeNode { -+ struct TreeNode* left; -+ struct TreeNode* right; -+ struct TreeNode* next; -+ struct TreeNode** pprev; -+ size_t cnt; -+ char name [MAX_DN_CHARS+1]; -+}; -+ -+struct ObjectList { -+ struct TreeNode* first; -+ struct TreeNode* lin; -+ struct TreeNode* curr; -+ int dups; -+ size_t uniqueObjects; -+ size_t remainObjects; -+ size_t totalObjects; -+ NWDSContextHandle context; -+ NWCONN_HANDLE conn; -+ struct nss_ncp_conf * conf; -+}; -+ -+static struct ObjectList* __allocTree(int dups,struct nss_ncp_conf * conf) { -+ struct ObjectList* t; -+ -+ t = (struct ObjectList*)malloc(sizeof(*t)); -+ if (t) { -+ t->first = NULL; -+ t->lin = NULL; -+ t->curr = NULL; -+ t->dups = dups; -+ t->uniqueObjects = 0; -+ t->conf=conf; -+ } -+ return t; -+} -+ -+static void __freeNode(struct TreeNode* n) { -+ while (n) { -+ struct TreeNode* tmp; -+ -+ __freeNode(n->left); -+ tmp = n; -+ n = n->right; -+ free(tmp); -+ } -+} -+ -+static void __freeTree(struct ObjectList* t) { -+ if (t) { -+ struct TreeNode* n = t->first; -+ if (t->conf) -+ free_nss_ncp_conf(t->conf); -+ free(t); -+ __freeNode(n); -+ } -+} -+ -+static NWDSCCODE __allocNode(struct TreeNode** pn, const char* objectName) { -+ struct TreeNode* n; -+ size_t len=strlen(objectName); -+ -+ if (len > MAX_DN_CHARS) -+ return NWE_BUFFER_OVERFLOW; -+ n = (struct TreeNode*)malloc(sizeof(*n)); -+ if (!n) -+ return ERR_NOT_ENOUGH_MEMORY; -+ n->left = n->right = NULL; -+ n->cnt = 1; -+ memcpy(n->name, objectName, len + 1); -+ *pn = n; -+ return 0; -+} -+ -+static NWDSCCODE __insertNode(struct ObjectList* t, const char* objectName) { -+ struct TreeNode** p; -+ struct TreeNode* n; -+ NWDSCCODE err; -+ -+ p = &t->first; -+ while ((n = *p) != NULL) { -+ int cmp = strcasecmp(objectName, n->name); -+ if (cmp < 0) { -+ p = &n->left; -+ if (!*p) { -+ err = __allocNode(p, objectName); -+ if (!err) { -+ struct TreeNode* q = *p; -+ -+ q->next = n; -+ q->pprev = n->pprev; -+ n->pprev = &q->next; -+ *(q->pprev) = q; -+ t->uniqueObjects++; -+ t->totalObjects++; -+ } -+ return err; -+ } -+ } else if (cmp > 0) { -+ p = &n->right; -+ if (!*p) { -+ err = __allocNode(p, objectName); -+ if (!err) { -+ struct TreeNode* q = *p; -+ -+ q->next = n->next; -+ if (q->next) -+ q->next->pprev = &q->next; -+ n->next = q; -+ q->pprev = &n->next; -+ t->uniqueObjects++; -+ t->totalObjects++; -+ } -+ return err; -+ } -+ } else { -+ if (t->dups) { -+ n->cnt++; -+ t->totalObjects++; -+ return 0; -+ } else { -+ return EINVAL; // no dups allowed and one found -+ } -+ } -+ } -+ err = __allocNode(p, objectName); -+ if (!err) { -+ struct TreeNode* q = *p; -+ t->lin = q; -+ q->next = NULL; -+ q->pprev = &t->lin; -+ t->uniqueObjects++; -+ t->totalObjects++; -+ } -+ return err; -+} -+ -+static void print_nodes(struct TreeNode* n, int crlf) { -+ if (n) { -+ print_nodes(n->left,crlf); -+ if (crlf) -+ printf ("%s [%d]\n",n->name,n->cnt); -+ else -+ printf ("%s [%d]",n->name,n->cnt); -+ print_nodes(n->right,crlf); -+ } -+} -+ -+static void print_tree(struct ObjectList* t, int crlf) { -+ printf("total:%d unique:%d\n",t->totalObjects,t->uniqueObjects); -+ print_nodes (t->first,crlf); -+} -+ -+ -+// callback for getallentxx() -+static NWDSCCODE -+nds_insert_info(NWDSContextHandle ctx, const NWDSChar * objectName, void *tree, int modeDebug){ -+ return __insertNode((struct ObjectList*)tree, objectName); -+} -+ -+/* eot*/ -+ -+ -+/*** collecting in a tree every member of a group, if his UID defined in NDS */ -+ -+static NWDSCCODE -+nds_get_group_members(NWDSContextHandle ctx, const void *val, void *arg){ -+ -+ struct ObjectList *tree = (struct ObjectList *) arg; -+ NWDSCCODE ccode=0; -+ struct nw_user_info ui; -+ -+ init_nw_user_info(&ui,0); -+ //check whether member has some Unix properties -+ ccode=nds_user_info2(ctx, (const char *)val, &ui,tree->conf->debug); -+ // found a UID real (no fallback otherwise all users would have the same UID) -+ if (!ccode && ui.uid !=(uid_t)-1) { -+ ccode=__insertNode(tree,(const char *)val); -+ } -+ free_nw_user_info(&ui); -+ return ccode; -+} -+ -+ -+static NWDSCCODE -+getgroupmembers(NWDSContextHandle *context,NWCONN_HANDLE *conn, -+ const char* groupName,struct ObjectList * tree, struct nss_ncp_conf* conf){ -+// get all members of a group -+ -+ NWDSCCODE ccode; -+ -+ static const struct attrop atlist[] = { -+ { ATTR_MEMBERS, nds_get_group_members, SYN_MEMBERS}, -+ { NULL, NULL, SYN_UNKNOWN }}; -+ -+ NWDSCCODE err; -+ trace(conf->debug, LOG_NOTICE,"entering getgroupmembers for group %s",groupName); -+ ccode=CreateContextAndConn ( context,conn,conf); -+ if (ccode) -+ return ccode; -+ ccode=nds_read_attrs(*context, groupName, tree, atlist,conf->debug); -+ trace(conf->debug, LOG_NOTICE,"leaving getgroupmembers for group %s err=%s",groupName,strnwerror(ccode)); -+ return ccode; -+} -+ -+ -+// static lists. Allocated by nss_ncp_setxxent_r, used buy nss_ncp_getxxent_r and released by nss_ncp_endxxent_r -+// TODO :mutex and threads needed as in nss_ldap or nss_mysql ??? -+ -+static struct ObjectList* ndsUsers=NULL; -+static struct ObjectList* ndsGroups=NULL; -+static struct ObjectList* ndsShadows=NULL; -+ -+// description of a NDS class to be searched by getentbyxx -+struct class_info { -+ char * className; -+ char * nds8Attribute; //name of ID attribute in NDS8 -+ char * LID1; // markers in L attribute for ID (U: or G:) -+ char * LID2; // markers in L attribute for ID (u: or g:), may be in lower case -+ char * LAlias1;// markers in L attribute for alias (N:) -+ char * LAlias2; // markers in L attribute for alias (n:) may be in lower case -+ -+}; -+ -+// we care only about user's and group classes -+static struct class_info USER_CLASS = {"User", ATTR_UID,"U:","u:","N:","n:"}; -+static struct class_info GROUP_CLASS= {"Group",ATTR_GID,"G:","g:","N:","n:"}; -+ -+ -+/*protoptype of callback functions used in getentbyxx*/ -+ -+struct infoop { -+ NWDSCCODE (*getinfo) (NWDSContextHandle ctx , const NWDSChar * objectName, void * info, int debug); -+}; -+/* -+ currently match -+ nds_user_info(context,objectName,ui,modeDebug); -+ nds_user_info2(context,objectName,ui,modeDebug); -+ nds_group_info(context,objectName,gi,modeDebug); -+ nds_group_info2(context,objectName,gi,modeDebug); -+ nds_shadow_info(context,objectName,si,modeDebug); -+ nds_insert_info(context,objectName,tree,modeDebug): -+*/ -+ -+ -+// generic NDS search routine -+static NWDSCCODE getentbyxx( -+ NWDSContextHandle *retContext, // context to return (NULL= close when leaving) -+ NWCONN_HANDLE *retConn, // connexion to return (NULL= close when leaving) -+ struct class_info classType, // class to search (User of Group) -+ void *info, // structure to fill (can be nw_user_info,nw_shadow_info,nw_group_info or a ObjectList) -+ const struct infoop callBack, // routine to call for all found NDS objects -+ const char *unixName, // Unix objet name to find in NDS (if NULL search by ID) -+ uid_t id, // Unix ID to find in NDS , if -1 search by unixName) -+ int allEntries, // Ignore unixName and id and return all entries belonging to classType.className -+ struct nss_ncp_conf *conf) { // configuration record (debug...) -+ -+ NWDSContextHandle context; -+ NWCONN_HANDLE conn; -+ NWDSCCODE ccode; -+ nint32 iterationHandle= NO_MORE_ITERATIONS; // to be set as such at Exit4 -+ nint32 countObjectsSearched; -+ nuint32 objCntr,attrCntr,valCntr; -+ nuint32 objCount; -+ nuint32 attrCount; -+ char objectName[MAX_DN_CHARS+1]; -+ char attrName[MAX_SCHEMA_NAME_CHARS+1]; -+ nuint32 attrValCount; -+ nuint32 syntaxID; -+ nuint32 attrValSize; -+ char* attrVal; -+ -+ // buffers -+ pBuf_T searchFilter=NULL; // search filter -+ pBuf_T retBuf=NULL; // result buffer for NWDSSearch -+ pBuf_T attrNames=NULL; // specify which attribute values to return -+ Filter_Cursor_T* cur=NULL; // search expression tree temporary buffer -+ Object_Info_T objectInfo; -+ -+ -+ //few checks -+ -+ if (!allEntries) { -+ if (unixName && id !=(uid_t)-1) -+ return EINVAL; -+ if (!unixName && id ==(uid_t)-1) -+ return EINVAL; -+ } -+ -+ trace(conf->debug, LOG_NOTICE,"entering getentbyxx"); -+ -+ ccode=CreateContextAndConn ( &context,&conn,conf); -+ if (ccode) -+ return ccode; -+ -+ trace(conf->debug, LOG_NOTICE,"context and conn OK"); -+ /* -+ In order to search, we need: -+ A Filter Cursor (to build the search expression) -+ A Filter Buffer (to store the expression; used by NWDSSearch) -+ A Buffer to store which attributes we need information on -+ A Result Buffer (to store the search results) -+ */ -+ ccode = NWDSAllocBuf(DEFAULT_MESSAGE_LEN,&searchFilter); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAllocBuf returned: %d\n", ccode); -+ goto Exit3; -+ } -+ trace(conf->debug, LOG_NOTICE,"NWDSAllocBuf searchFilter OK"); -+ // Initialize the searchFilter buffer -+ ccode = NWDSInitBuf(context,DSV_SEARCH_FILTER,searchFilter); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSInitBuf returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ trace(conf->debug, LOG_NOTICE, "NWDSInitBuf searchFilter OK"); -+ -+ // Allocate a filter cursor to put the search expression -+ ccode = NWDSAllocFilter(&cur); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAllocFilter returned: %d\n", ccode); -+ goto Exit4; -+ } -+ trace(conf->debug, LOG_NOTICE,"NWDSAllocFilter cur OK"); -+ // Build the expression tree in cur, then place into searchFilter -+ // Object Class = User -+ ccode = NWDSAddFilterToken(cur,FTOK_ANAME,"Object Class",SYN_CLASS_NAME); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken OBJECTCLASS returned: %d\n", ccode); -+ goto Exit4; -+ } -+ ccode = NWDSAddFilterToken(cur,FTOK_EQ,NULL,0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_EQ returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ ccode = NWDSAddFilterToken(cur,FTOK_AVAL,classType.className,SYN_CLASS_NAME); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_AVAL User returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ trace(conf->debug, LOG_NOTICE,"AddFilter for classname OK"); -+ -+ if (!allEntries) { -+ ccode = NWDSAddFilterToken(cur,FTOK_AND,NULL,0); -+ if (ccode ) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_AND returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ if (unixName) { -+ /* search for the CN or an alias in location strings */ -+ /* CN=unixName or L=N:unixNname or l=n:unixName */ -+ char buf1[255]; -+ char buf2[255]; -+ -+ if (strlen(unixName)+3 >sizeof(buf1)) { -+ //buffer overflow !!! -+ ccode=EINVAL; -+ traceForce(conf->debug,LOG_WARNING,"unixName %s is too long !!!!\n", unixName); -+ goto Exit4; -+ } -+ sprintf (buf1,"%s%s",classType.LAlias1,unixName); -+ sprintf (buf2,"%s%s",classType.LAlias2,unixName); -+ -+ ccode = NWDSAddFilterToken(cur,FTOK_LPAREN,NULL,0); -+ if (ccode ) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_RPAREN returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ ccode = NWDSAddFilterToken(cur,FTOK_ANAME,"CN",0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_ANAME CN returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ ccode = NWDSAddFilterToken(cur,FTOK_EQ,NULL,0); -+ if (ccode ) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_EQ returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ ccode = NWDSAddFilterToken(cur,FTOK_AVAL,unixName,SYN_CI_STRING); -+ if (ccode ) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_AVAL %s returned: %d\n", unixName,ccode); -+ goto Exit4; -+ } -+ ccode = NWDSAddFilterToken(cur,FTOK_OR,NULL,0); -+ if (ccode ) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_OR returned: %d\n", ccode); -+ goto Exit4; -+ } -+ ccode = NWDSAddFilterToken(cur,FTOK_ANAME,"L",0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_ANAME L returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ ccode = NWDSAddFilterToken(cur,FTOK_EQ,NULL,0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_EQ returned: %d\n", ccode); -+ goto Exit4; -+ } -+ ccode = NWDSAddFilterToken(cur,FTOK_AVAL,buf1,SYN_CI_STRING); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_VAL %s returned: %d\n", buf1,ccode); -+ goto Exit4; -+ } -+ ccode = NWDSAddFilterToken(cur,FTOK_OR,NULL,0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_OR returned: %d\n", ccode); -+ goto Exit4; -+ } -+ ccode = NWDSAddFilterToken(cur,FTOK_ANAME,"L",0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_ANAME returned: %d\n", ccode); -+ goto Exit4; -+ } -+ ccode = NWDSAddFilterToken(cur,FTOK_EQ,NULL,0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_END returned: %d\n", ccode); -+ goto Exit4; -+ } -+ ccode = NWDSAddFilterToken(cur,FTOK_AVAL,buf2,SYN_CI_STRING); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_AVAL %s returned: %d\n", buf2,ccode); -+ goto Exit4; -+ } -+ ccode = NWDSAddFilterToken(cur,FTOK_RPAREN,NULL,0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_RPAREN returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ } else { -+ if (id !=(uid_t)-1) { -+ /* search by UID.or GID -+ AND (L="U:xxxxx" OR L="u:xxxx" OR UNIX:UID = xxxx) for users -+ AND (L="G:xxxxx" OR L="g:xxxx" OR UNIX:GID = xxxx) for groups -+ */ -+ char buf1[80]; -+ char buf2[80]; -+ -+ sprintf (buf1,"%s%d",classType.LID1,id); -+ sprintf (buf2,"%s%d",classType.LID2,id); -+ -+ ccode = NWDSAddFilterToken(cur,FTOK_LPAREN,NULL,0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_LPAREN returned: %d\n", ccode); -+ goto Exit4; -+ } -+ ccode = NWDSAddFilterToken(cur,FTOK_ANAME,"L",0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_ANAME L returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ ccode = NWDSAddFilterToken(cur,FTOK_EQ,NULL,0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_EQ returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ ccode = NWDSAddFilterToken(cur,FTOK_AVAL,buf1,SYN_CI_STRING); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_VAL %s returned: %d\n", buf1,ccode); -+ goto Exit4; -+ } -+ ccode = NWDSAddFilterToken(cur,FTOK_OR,NULL,0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_OR returned: %d\n", ccode); -+ goto Exit4; -+ } -+ ccode = NWDSAddFilterToken(cur,FTOK_ANAME,"L",0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_ANAME returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ ccode = NWDSAddFilterToken(cur,FTOK_EQ,NULL,0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_END returned: %d\n", ccode); -+ goto Exit4; -+ } -+ ccode = NWDSAddFilterToken(cur,FTOK_AVAL,buf2,SYN_CI_STRING); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_AVAL %s returned: %d\n", buf2,ccode); -+ goto Exit4; -+ } -+ ccode = NWDSAddFilterToken(cur,FTOK_OR,NULL,0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_OR returned: %d\n", ccode); -+ goto Exit4; -+ } -+ ccode = NWDSAddFilterToken(cur,FTOK_ANAME,classType.nds8Attribute,0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_ANAME returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ ccode = NWDSAddFilterToken(cur,FTOK_EQ,NULL,0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_END returned: %d\n", ccode); -+ goto Exit4; -+ } -+ ccode = NWDSAddFilterToken(cur,FTOK_AVAL,&buf1[2],SYN_INTEGER); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_AVAL %s returned: %d\n", buf2,ccode); -+ goto Exit4; -+ } -+ ccode = NWDSAddFilterToken(cur,FTOK_RPAREN,NULL,0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_RPAREN returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ } -+ } -+ } -+ ccode = NWDSAddFilterToken(cur,FTOK_END,NULL,0); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAddFilterToken FTOK_END returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ trace(conf->debug, LOG_NOTICE,"AddFilterToken FTOK_END OK"); -+ -+ // now place the cursor into the searchFilter buffer -+ // NWDSPutFilter frees the expression tree filter (cur) -+ // so if it succeeds, set cur to NULL so it won't be freed below -+ ccode = NWDSPutFilter(context,searchFilter,cur,NULL); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSPutFilter returned: %d\n", ccode); -+ goto Exit4; -+ } -+ else -+ cur=NULL; -+ -+ trace(conf->debug, LOG_NOTICE,"PutFilter OK"); -+ -+ // allocate and initialize the attrNames buffer (not used , needed ???) -+ ccode = NWDSAllocBuf(DEFAULT_MESSAGE_LEN,&attrNames); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAllocBuf returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ trace(conf->debug, LOG_NOTICE,"AllocBuf attrNamesOK"); -+ -+ ccode = NWDSInitBuf(context,DSV_SEARCH,attrNames); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSInitBuf returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ trace(conf->debug, LOG_NOTICE,"InitBuf attrNames OK"); -+ -+ // Allocate a result buffer -+ ccode = NWDSAllocBuf(65500,&retBuf); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSAllocBuf returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ trace(conf->debug, LOG_NOTICE,"AllocBuf retBuf OK, start searching..."); -+ -+ // PP 11-01-2003 -+ // with NCP_DEBUG=cleanup, if we exit here, usecount of the connection is still 1 (OK) -+ // so usecount is augmented below -+ //ccode=-1; -+ //goto Exit4; -+ -+ iterationHandle = NO_MORE_ITERATIONS; -+ // while NWDSSearch still can get some objects...( I expect 0 or 1) -+ do { -+ ccode = NWDSSearch(context, -+ //"[Root]", -+ conf->startCtx, -+ DS_SEARCH_SUBTREE, -+ FALSE, // don't dereference aliases -+ searchFilter, -+ FALSE, // we want ONLY attributes names -+ FALSE, // only want information in attrNames -+ attrNames, -+ &iterationHandle, -+ 0, // reserved -+ &countObjectsSearched, -+ retBuf); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSSearch returned: %s\n", strnwerror(ccode)); -+ goto Exit4; -+ } -+ // PP 11-01-2003 -+ // with NCP_DEBUG=cleanup, if we exit here, usecount of the connection is now 2 (bad) -+ // so it is NWDSSearch that augmented usecount !!!! -+ //ccode=-1; -+ //goto Exit4; -+ -+ -+ trace(conf->debug, LOG_NOTICE,"NWDSearch OK"); -+ // count the object returned in the buffer -+ ccode = NWDSGetObjectCount(context,retBuf,&objCount); -+ if (ccode) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSGetObjectCount returned: %d\n", ccode); -+ goto Exit4; -+ } -+ if (objCount <= 0) { -+ ccode=-1; -+ goto Exit4; -+ } -+ if ( !allEntries && (objCount >1)) { -+ if (unixName) -+ traceForce(conf->debug,LOG_WARNING,"more than one NDS entry match the name=%s criteria. ",unixName); -+ else -+ traceForce(conf->debug,LOG_WARNING,"more than one NDS entry match the id=%d criteria. ",id); -+ } -+ trace(conf->debug, LOG_NOTICE,"GetObjectCount OK"); -+ // for the number of objects returned... -+ // for nss it should be only one !!! -+ for (objCntr=0;objCntrdebug,LOG_WARNING,"NWDSGetObjectName returned: %d\n", ccode); -+ goto Exit4; -+ } -+ -+ trace(conf->debug, LOG_NOTICE,"GetObjectName OK"); -+ -+ if (callBack.getinfo) { -+ ccode= callBack.getinfo(context,objectName,info,conf->debug); -+ if (ccode) -+ goto Exit4; -+ } -+ } -+ trace(conf->debug, LOG_NOTICE,"callback return OK"); -+ } while ((nuint32)iterationHandle != NO_MORE_ITERATIONS); -+ -+ trace(conf->debug, LOG_NOTICE,"End of iteration attrNamesOK"); -+ -+Exit4: -+ if ((nuint32)iterationHandle != NO_MORE_ITERATIONS){ -+ NWDSCCODE ccode2; -+ if (ccode2=NWDSCloseIteration(context,iterationHandle,DSV_SEARCH)) { -+ traceForce(conf->debug,LOG_WARNING,"NWDSCloseIteration returned: %d\n", ccode2); -+ } -+ } -+ if (retBuf) -+ NWDSFreeBuf(retBuf); -+ if (cur) -+ NWDSFreeFilter(cur, NULL); -+ if (searchFilter) -+ NWDSFreeBuf(searchFilter); -+ if (attrNames) -+ NWDSFreeBuf(attrNames); -+ -+ trace(conf->debug, LOG_NOTICE,"All buffers cleaned OK"); -+ -+Exit3: -+ if (ccode || !retConn){ -+ NWDSCCODE ccode2; -+ trace(conf->debug,LOG_NOTICE,"Closing connection %lx",conn); -+ ccode2=NWCCCloseConn (conn); -+ if (ccode2) -+ traceForce(conf->debug,LOG_WARNING,"NWCCloseConnection returned: %d %s\n", ccode,strnwerror(ccode2)); -+ }else -+ if (retConn) -+ *retConn=conn; -+Exit2: -+ if (ccode || !retContext) { -+ NWDSCCODE ccode2=NWDSFreeContext(context); -+ trace(conf->debug, LOG_NOTICE,"Freeing context"); -+ if (ccode2) -+ traceForce(conf->debug,LOG_WARNING,"NWDSFreeContext returned: %d %s\n", ccode,strnwerror(ccode2)); -+ }else -+ if (retContext) -+ *retContext=context; -+Exit1: -+ trace(conf->debug, LOG_NOTICE,"Leaving ..."); -+ return ccode; -+} -+ -+ -+ -+ -+static NWDSCCODE -+getpwdentbyxx(struct nw_user_info *ui, const char* userName, uid_t userId, struct nss_ncp_conf *conf){ -+ -+static const struct infoop getInfo={nds_user_info}; -+ -+return getentbyxx( -+ NULL, // context to return (NULL= close when leaving) -+ NULL, // connexion to return (NULL= close when leaving) -+ USER_CLASS, // class to search (User of Group) -+ ui, // structure to fill (can be nw_user_info,nw_shadow_info,nw_group_info) -+ getInfo, // routine to call for all found NDS objects -+ userName, // Unix objet name to find in NDS (if NULL search by ID) -+ userId, // Unix ID to find in NDS , if -1 search by unixName) -+ FALSE, // Ignore objectName and id and return all entries belonging to className -+ conf); // debug flag -+} -+ -+ -+static NWDSCCODE -+getgrpentbyxx(struct nw_group_info *gi, const char* groupName, gid_t groupId, struct nss_ncp_conf *conf){ -+ -+ static const struct infoop getInfo={nds_group_info}; -+ -+ return getentbyxx( -+ NULL, // context to return (NULL= close when leaving) -+ NULL, // connexion to return (NULL= close when leaving) -+ GROUP_CLASS, // class to search (User of Group) -+ gi, // structure to fill (can be nw_user_info,nw_shadow_info,nw_group_info) -+ getInfo, // routine to call for all found NDS objects -+ groupName, // Unix objet name to find in NDS (if NULL search by ID) -+ groupId, // Unix ID to find in NDS , if -1 search by unixName) -+ FALSE, // Ignore objectName and id and return all entries belonging to className -+ conf); // debug flag -+} -+ -+ -+ -+ -+static NWDSCCODE -+getspentbyxx(struct nw_shadow_info *si, const char* userName, struct nss_ncp_conf *conf){ -+// in shadow we search only by userName -+ static const struct infoop getInfo={nds_shadow_info}; -+ -+ return getentbyxx( -+ NULL, // context to return (NULL= close when leaving) -+ NULL, // connexion to return (NULL= close when leaving) -+ USER_CLASS, // class to search (User of Group) -+ si, // structure to fill (can be nw_user_info,nw_shadow_info,nw_group_info) -+ getInfo, // routine to call for all found NDS objects -+ userName, // Unix objet name to find in NDS (if NULL search by ID) -+ (uid_t)-1, // Unix ID to find in NDS , if -1 search by unixName) -+ FALSE, // Ignore objectName and id and return all entries belonging to className -+ conf); // debug flag -+} -+ -+static NWDSCCODE -+getusergroupsbyxx(struct nw_user_group_info *ui, const char* userName, uid_t userId, struct nss_ncp_conf *conf){ -+ -+static const struct infoop getInfo={nds_get_user_groups}; -+ -+ return getentbyxx( -+ NULL, // context to return (NULL= close when leaving) -+ NULL, // connexion to return (NULL= close when leaving) -+ USER_CLASS, // class to search (User of Group) -+ ui, // structure to fill (can be nw_user_info,nw_shadow_info,nw_group_info) -+ getInfo, // routine to call for all found NDS objects -+ userName, // Unix objet name to find in NDS (if NULL search by ID) -+ userId, // Unix ID to find in NDS , if -1 search by unixName) -+ FALSE, // Ignore objectName and id and return all entries belonging to className -+ conf); // debug flag -+} -+ -+ -+ -+static NWDSCCODE -+getallents(NWDSContextHandle *context,NWCONN_HANDLE *conn, -+ const struct class_info classType, struct ObjectList * tree, struct nss_ncp_conf *conf){ -+// called by all setxxent() if not control group is present in conf -+// get all entries by className -+// and add them to a sorted tree in memory -+// return context and conncetion for later use by -+ -+static const struct infoop getInfo={nds_insert_info}; -+ -+ return getentbyxx( -+ context, // context to return (NULL= close when leaving) -+ conn, // connexion to return (NULL= close when leaving) -+ classType, // class to search (User of Group) -+ tree, // structure to fill (can be nw_user_info,nw_shadow_info,nw_group_info) -+ getInfo, // routine to call for all found NDS objects -+ NULL, // Unix objet name to find in NDS (if NULL search by ID) -+ (uid_t)-1, // Unix ID to find in NDS , if -1 search by unixName) -+ TRUE, // Ignore objectName and id and return all entries belonging to className -+ conf); // debug flag -+} -+ -+/*******************************************************************************/ -+ -+ -+ -+/******************************* NSS API ***************************************/ -+ -+ -+enum nss_status _nss_ncp_initgroups (const char *userName, gid_t group, -+ long int *start, long int *size, gid_t * groups, -+ long int limit,int *errnop) { -+ -+ struct nw_user_group_info inf; -+ NWDSCCODE err; -+ struct nss_ncp_conf *conf= parse_conf(CNF_FILE); -+ -+ if (!conf || !conf->doGroup) -+ return NSS_STATUS_UNAVAIL; -+ if (conf->debug) { -+ openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV); -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_initgroups entering"); -+ } -+ -+ init_nw_user_group_info(&inf,conf->debug); -+ err= getusergroupsbyxx(&inf, userName, (uid_t)-1,conf); -+ switch (err) { -+ case 0: -+ if (conf->debug &QF_VERBOSE) -+ print_nw_user_group_info(inf); -+ if (!fix_nw_user_group_info(&inf,conf)) -+ err=nw_user_group_info_to_groups(inf,group,start,size,groups,limit,errnop,conf); -+ else err=NSS_STATUS_UNAVAIL; -+ break; -+ case -1: // NOT FOUND IN NDS -+ err=NSS_STATUS_NOTFOUND; -+ *errnop=ENOENT; -+ break; -+ default: // NDS error -+ err=NSS_STATUS_UNAVAIL; -+ *errnop=ENOENT; -+ break; -+ -+ } -+ free_nw_user_group_info(&inf); -+ if (conf->debug) { -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_initgroups leaving"); -+ closelog(); -+ } -+ return err; -+} -+ -+ -+enum nss_status _nss_ncp_getpwnam_r (const char* name, struct passwd *pwd, -+ char * buffer, size_t buflen, int * errnop) { -+ -+ struct nw_user_info inf; -+ NWDSCCODE err; -+ struct nss_ncp_conf *conf= parse_conf(CNF_FILE); -+ -+ if (!conf || !conf->doPassword) -+ return NSS_STATUS_UNAVAIL; -+ -+ if (conf->debug) { -+ openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV); -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_getpwnam entering"); -+ } -+ init_nw_user_info(&inf,conf->debug); -+ err= getpwdentbyxx(&inf, name, (uid_t)-1,conf); -+ switch (err) { -+ case 0: -+ if (conf->debug &QF_VERBOSE) -+ print_nw_user_info(inf); -+ if (!fix_nw_user_info(&inf,conf)) -+ err=nw_user_info_to_passwd(inf,pwd,buffer,buflen,errnop,conf); -+ else err=NSS_STATUS_UNAVAIL; -+ break; -+ case -1: // NOT FOUND IN NDS -+ err=NSS_STATUS_NOTFOUND; -+ *errnop=ENOENT; -+ break; -+ default: // NDS error -+ err=NSS_STATUS_UNAVAIL; -+ *errnop=ENOENT; -+ break; -+ -+ } -+ free_nw_user_info(&inf); -+ if (conf->debug) { -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_getpwnam leaving"); -+ closelog(); -+ } -+ return err; -+} -+ -+ -+enum nss_status _nss_ncp_getpwuid_r (uid_t uid, struct passwd *pwd, -+ char * buffer, size_t buflen, int * errnop) { -+ -+ struct nw_user_info inf; -+ NWDSCCODE err; -+ struct nss_ncp_conf *conf= parse_conf(CNF_FILE); -+ -+ if (!conf || !conf->doPassword) -+ return NSS_STATUS_UNAVAIL; -+ -+ if (conf->debug) { -+ openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV); -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_getpwuid entering"); -+ } -+ init_nw_user_info(&inf,conf->debug); -+ err= getpwdentbyxx(&inf, NULL, uid,conf); -+ switch (err) { -+ case 0: -+ if (conf->debug &QF_VERBOSE) -+ print_nw_user_info(inf); -+ if (!fix_nw_user_info(&inf,conf)) -+ err=nw_user_info_to_passwd(inf,pwd,buffer,buflen,errnop,conf); -+ else err=NSS_STATUS_UNAVAIL; -+ break; -+ case -1: // NOT FOUND IN NDS -+ err=NSS_STATUS_NOTFOUND; -+ *errnop=ENOENT; -+ break; -+ default: // NDS error -+ err=NSS_STATUS_UNAVAIL; -+ *errnop=ENOENT; -+ break; -+ -+ } -+ free_nw_user_info(&inf); -+ if (conf->debug) { -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_getpwuid leaving"); -+ closelog(); -+ } -+ return err; -+} -+ -+ -+enum nss_status _nss_ncp_getgrnam_r (const char* name, struct group *grp, -+ char * buffer, size_t buflen, int * errnop) { -+ -+ struct nw_group_info inf; -+ NWDSCCODE err; -+ struct nss_ncp_conf *conf= parse_conf(CNF_FILE); -+ -+ if (!conf || !conf->doGroup) -+ return NSS_STATUS_UNAVAIL; -+ -+ if (conf->debug) { -+ openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV); -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_getgrnam entering"); -+ } -+ init_nw_group_info(&inf,conf->debug); -+ err= getgrpentbyxx(&inf, name, (gid_t)-1,conf); -+ switch (err) { -+ case 0: -+ if (conf->debug &QF_VERBOSE) -+ print_nw_group_info(inf); -+ if (!fix_nw_group_info(&inf,conf)) -+ err=nw_group_info_to_group(inf,grp,buffer,buflen,errnop,conf); -+ else err=NSS_STATUS_UNAVAIL; -+ break; -+ case -1: // NOT FOUND IN NDS -+ err=NSS_STATUS_NOTFOUND; -+ *errnop=ENOENT; -+ break; -+ default: // NDS error -+ err=NSS_STATUS_UNAVAIL; -+ *errnop=ENOENT; -+ break; -+ -+ } -+ free_nw_group_info(&inf); -+ if (conf->debug) { -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_getgrnam leaving"); -+ closelog(); -+ } -+ return err; -+} -+ -+ -+enum nss_status _nss_ncp_getspnam_r (const char * name, struct spwd *spw, -+ char *buffer, size_t buflen,int * errnop) { -+ struct nw_shadow_info inf; -+ NWDSCCODE err; -+ struct nss_ncp_conf *conf= parse_conf(CNF_FILE); -+ -+ if (!conf || !conf->doShadow) -+ return NSS_STATUS_UNAVAIL; -+ -+ if (conf->debug) { -+ openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV); -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_getspnam entering"); -+ } -+ init_nw_shadow_info(&inf,conf->debug); -+ err= getspentbyxx(&inf, name,conf); -+ switch (err) { -+ case 0: -+ if (conf->debug &QF_VERBOSE) -+ print_nw_shadow_info(inf); -+ if (!fix_nw_shadow_info(&inf,conf)) -+ err=nw_shadow_info_to_shadow(inf,spw,buffer,buflen,errnop,conf); -+ else err=NSS_STATUS_UNAVAIL; -+ break; -+ case -1: // NOT FOUND IN NDS -+ err=NSS_STATUS_NOTFOUND; -+ *errnop=ENOENT; -+ break; -+ default: // NDS error -+ err=NSS_STATUS_UNAVAIL; -+ *errnop=ENOENT; -+ break; -+ -+ } -+ free_nw_shadow_info(&inf); -+ if (conf->debug) { -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_getspnam leaving"); -+ closelog(); -+ } -+ return err; -+ -+} -+ -+ -+enum nss_status _nss_ncp_getgrgid_r (gid_t gid, struct group *grp, -+ char * buffer, size_t buflen, int * errnop) { -+ struct nw_group_info inf; -+ NWDSCCODE err; -+ struct nss_ncp_conf *conf= parse_conf(CNF_FILE); -+ -+ if (!conf || !conf->doGroup) -+ return NSS_STATUS_UNAVAIL; -+ -+ if (conf->debug) { -+ openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV); -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_getgrgid entering"); -+ } -+ init_nw_group_info(&inf,conf->debug); -+ err= getgrpentbyxx(&inf, NULL, gid,conf); -+ switch (err) { -+ case 0: -+ if (conf->debug &QF_VERBOSE) -+ print_nw_group_info(inf); -+ if (!fix_nw_group_info(&inf,conf)) -+ err=nw_group_info_to_group(inf,grp,buffer,buflen,errnop,conf); -+ else err=NSS_STATUS_UNAVAIL; -+ break; -+ case -1: // NOT FOUND IN NDS -+ err=NSS_STATUS_NOTFOUND; -+ *errnop=ENOENT; -+ break; -+ default: // NDS error -+ err=NSS_STATUS_UNAVAIL; -+ *errnop=ENOENT; -+ break; -+ -+ } -+ free_nw_group_info(&inf); -+ if (conf->debug) { -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_getgrid leaving"); -+ closelog(); -+ } -+ return err; -+} -+ -+ -+enum nss_status _nss_ncp_setpwent(void) { -+ NWDSContextHandle context; -+ NWCONN_HANDLE conn; -+ NWDSCCODE ccode; -+ struct nss_ncp_conf *conf= parse_conf(CNF_FILE); -+ -+ if (!conf || !conf->doPassword) -+ return NSS_STATUS_UNAVAIL; -+ -+ if (conf->debug) { -+ openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV); -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_setpwent entering"); -+ } -+ ndsUsers= __allocTree(FALSE,conf); -+ if (ndsUsers) { -+ if (conf->ctrlGroup && conf->ctrlGroup[0]) // caution if empty string from conf or default -+ ccode=getgroupmembers(&context,&conn,conf->ctrlGroup,ndsUsers,conf); -+ else -+ ccode=getallents(&context,&conn,USER_CLASS,ndsUsers,conf); -+ -+ if (!ccode) { -+ ndsUsers->context=context; -+ ndsUsers->conn=conn; -+ ndsUsers->curr = ndsUsers->lin; -+ ndsUsers->remainObjects = ndsUsers->uniqueObjects; -+ ccode= NSS_STATUS_SUCCESS; -+ } else { -+ __freeTree(ndsUsers); -+ ndsUsers=NULL; -+ ccode= NSS_STATUS_UNAVAIL; -+ } -+ }else -+ ccode= NSS_STATUS_UNAVAIL; -+ -+ if (conf->debug) { -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_setpwent leaving"); -+ closelog(); -+ } -+ return ccode; -+ -+} -+ -+enum nss_status _nss_ncp_setgrent(void) { -+ NWDSContextHandle context; -+ NWCONN_HANDLE conn; -+ enum nss_status ccode; -+ struct nss_ncp_conf *conf= parse_conf(CNF_FILE); -+ -+ if (!conf || !conf->doGroup) -+ return NSS_STATUS_UNAVAIL; -+ -+ if (conf->debug) { -+ openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV); -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_setgrent entering"); -+ } -+ ndsGroups= __allocTree(FALSE,conf); -+ if (ndsGroups) { -+ if (! getallents(&context,&conn,GROUP_CLASS,ndsGroups,conf)) { -+ ndsGroups->context=context; -+ ndsGroups->conn=conn; -+ ndsGroups->curr = ndsGroups->lin; -+ ndsGroups->remainObjects = ndsGroups->uniqueObjects; -+ ccode=NSS_STATUS_SUCCESS; -+ } else { -+ __freeTree(ndsGroups); -+ ndsGroups=NULL; -+ ccode=NSS_STATUS_UNAVAIL; -+ } -+ }else -+ ccode= NSS_STATUS_UNAVAIL; -+ -+ if (conf->debug) { -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_setgrent leaving"); -+ closelog(); -+ } -+ return ccode; -+ -+} -+ -+ -+enum nss_status _nss_ncp_setspent (void) { -+ NWDSContextHandle context; -+ NWCONN_HANDLE conn; -+ NWDSCCODE ccode; -+ struct nss_ncp_conf *conf= parse_conf(CNF_FILE); -+ -+ if (!conf || !conf->doShadow) -+ return NSS_STATUS_UNAVAIL; -+ -+ if (conf->debug) { -+ openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV); -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_setspent entering"); -+ } -+ ndsShadows= __allocTree(FALSE,conf); -+ if (ndsShadows) { -+ if (conf->ctrlGroup && conf->ctrlGroup[0]) // caution if empty string from conf or default -+ ccode=getgroupmembers(&context,&conn,conf->ctrlGroup,ndsShadows,conf); -+ else -+ ccode=getallents(&context,&conn,USER_CLASS,ndsShadows,conf); -+ -+ if (!ccode) { -+ ndsShadows->context=context; -+ ndsShadows->conn=conn; -+ ndsShadows->curr = ndsShadows->lin; -+ ndsShadows->remainObjects = ndsShadows->uniqueObjects; -+ ccode=NSS_STATUS_SUCCESS; -+ } else { -+ __freeTree(ndsShadows); -+ ndsShadows=NULL; -+ ccode=NSS_STATUS_UNAVAIL; -+ } -+ }else -+ ccode= NSS_STATUS_UNAVAIL; -+ -+ if (conf->debug) { -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_setspent leaving"); -+ closelog(); -+ } -+ return ccode; -+ -+} -+ -+ -+enum nss_status _nss_ncp_endpwent(void) { -+ enum nss_status ccode; -+ -+ -+ if (ndsUsers) { -+ struct nss_ncp_conf *conf=ndsUsers->conf; -+ -+ if (conf->debug) { -+ openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV); -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_endpwent entering"); -+ } -+ NWCCCloseConn (ndsUsers->conn); -+ NWDSFreeContext(ndsUsers->context); -+ __freeTree(ndsUsers); -+ ndsUsers=NULL; -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_setpwent all cleaned up OK"); -+ if (conf->debug) { -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_setpwent leaving"); -+ closelog(); -+ } -+ ccode=NSS_STATUS_SUCCESS; -+ }else { -+ trace (QF_DEBUG, LOG_ERR,"nss_ncp_endpwent called without a previous nss_ncp_setpwent: nothing to cleanup"); -+ ccode=NSS_STATUS_UNAVAIL; -+ } -+ return ccode; -+} -+ -+ -+enum nss_status _nss_ncp_endgrent(void) { -+ enum nss_status ccode; -+ -+ -+ if (ndsGroups) { -+ struct nss_ncp_conf *conf=ndsGroups->conf; -+ -+ if (conf->debug) { -+ openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV); -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_endgrent entering"); -+ } -+ NWCCCloseConn (ndsGroups->conn); -+ NWDSFreeContext(ndsGroups->context); -+ __freeTree(ndsGroups); -+ ndsGroups=NULL; -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_endgrent all cleaned up OK"); -+ if (conf->debug) { -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_endpwent leaving"); -+ closelog(); -+ } -+ ccode=NSS_STATUS_SUCCESS; -+ }else { -+ trace (QF_DEBUG, LOG_ERR,"nss_ncp_endgrent called without a previous nss_ncp_setgrent : nothing to cleanup"); -+ ccode=NSS_STATUS_UNAVAIL; -+ } -+ return ccode; -+} -+ -+ -+enum nss_status _nss_ncp_endspent (void) { -+ enum nss_status ccode; -+ -+ -+ if (ndsShadows) { -+ struct nss_ncp_conf *conf=ndsShadows->conf; -+ if (conf->debug) { -+ openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV); -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_endspent entering"); -+ } -+ -+ NWCCCloseConn (ndsShadows->conn); -+ NWDSFreeContext(ndsShadows->context); -+ __freeTree(ndsShadows); -+ ndsShadows=NULL; -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_endspent all cleaned up up OK"); -+ if (conf->debug) { -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_endspent leaving"); -+ closelog(); -+ } -+ ccode=NSS_STATUS_SUCCESS; -+ }else { -+ trace (QF_DEBUG, LOG_ERR,"nss_ncp_endspent called without a previous nss_ncp_setspent : nothing to cleanup"); -+ ccode=NSS_STATUS_UNAVAIL; -+ } -+ return ccode; -+} -+ -+enum nss_status _nss_ncp_getpwent_r(struct passwd *pwd, -+ char * buffer, size_t buflen, int * errnop) { -+ enum nss_status err; -+ -+ if (ndsUsers) { -+ struct TreeNode* n; -+ NWDSCCODE ccode; -+ struct nw_user_info ui; -+ struct nss_ncp_conf *conf=ndsUsers->conf; -+ const char* ndsName; -+ if (conf->debug) { -+ openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV); -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_getpwent entering"); -+ } -+ -+next_user:; // avoid a recursive call -+ n = ndsUsers->curr; -+ if (!n) { -+ //ready to scan again from the beginning (a good idea ??) -+ ndsUsers->curr = ndsUsers->lin; -+ ndsUsers->remainObjects = ndsUsers->uniqueObjects; -+ err= NSS_STATUS_NOTFOUND; -+ } else { -+ ndsName=n->name; -+ init_nw_user_info(&ui,conf->debug); -+ ccode=nds_user_info(ndsUsers->context,n->name,&ui,conf->debug); -+ -+ if (ccode) { -+ free_nw_user_info(&ui); -+ err=NSS_STATUS_NOTFOUND; -+ goto exit; -+ } -+ if (conf->debug &QF_VERBOSE) -+ print_nw_user_info(ui); -+ if (!fix_nw_user_info(&ui,conf)) -+ err=nw_user_info_to_passwd(ui,pwd,buffer,buflen,&errno,conf); -+ else err=NSS_STATUS_UNAVAIL; -+ free_nw_user_info(&ui); -+ switch (err) { -+ case NSS_STATUS_TRYAGAIN: -+ // buffer was too small -+ // do not advance to next user -+ // and let nss to try again with a bigger buffer; -+ break; -+ default: -+ // move to next user -+ if (!--n->cnt) { -+ ndsUsers->curr = n->next; -+ ndsUsers->remainObjects--; -+ } -+ if (err==NSS_STATUS_NOTFOUND) {// user has no unix property, skip -+ trace (conf->debug, LOG_NOTICE,"user %s has not Unix properties in NDS,skipping",ndsName); -+ goto next_user; -+ }else -+ err=NSS_STATUS_SUCCESS; -+ } -+ } -+exit: -+ if (conf->debug) { -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_getpwent leaving"); -+ closelog(); -+ } -+ -+ }else { -+ err=NSS_STATUS_UNAVAIL; -+ } -+ return err; -+ -+} -+ -+ -+enum nss_status _nss_ncp_getgrent_r(struct group *grp, -+ char * buffer, size_t buflen, int * errnop) { -+ enum nss_status err; -+ -+ if (ndsGroups) { -+ struct TreeNode* n; -+ NWDSCCODE ccode; -+ const char* ndsName; -+ struct nw_group_info gi; -+ struct nss_ncp_conf *conf=ndsGroups->conf; -+ -+ if (conf->debug) { -+ openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV); -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_getgrent entering"); -+ } -+next_group:; // avoid a recursive call -+ n = ndsGroups->curr; -+ if (!n) { -+ //ready to scan again from the beginning (a good idea ??) -+ ndsGroups->curr = ndsGroups->lin; -+ ndsGroups->remainObjects = ndsGroups->uniqueObjects; -+ err= NSS_STATUS_NOTFOUND; -+ -+ }else { -+ ndsName=n->name; -+ init_nw_group_info(&gi,conf->debug); -+ ccode=nds_group_info(ndsGroups->context,n->name,&gi,conf->debug); -+ if (ccode) { -+ free_nw_group_info(&gi); -+ err= NSS_STATUS_NOTFOUND; -+ goto exit; -+ } -+ if (conf->debug &QF_VERBOSE) -+ print_nw_group_info(gi); -+ if (!fix_nw_group_info(&gi,conf)) -+ err=nw_group_info_to_group(gi,grp,buffer,buflen,&errno,conf); -+ else err=NSS_STATUS_UNAVAIL; -+ free_nw_group_info(&gi); -+ switch (err) { -+ case NSS_STATUS_TRYAGAIN: -+ // buffer was too small -+ // do not advance to next group -+ // and let nss to try again with a bigger buffer -+ break; -+ default: -+ // move to next group -+ if (!--n->cnt) { -+ ndsGroups->curr = n->next; -+ ndsGroups->remainObjects--; -+ } -+ if (err==NSS_STATUS_NOTFOUND) {// group has no unix property, skip -+ trace (conf->debug, LOG_NOTICE,"group %s has not Unix properties in NDS,skipping",ndsName); -+ goto next_group; -+ } else -+ err=NSS_STATUS_SUCCESS; -+ } -+ } -+exit: -+ if (conf->debug) { -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_getgrent leaving"); -+ closelog(); -+ } -+ -+ }else { -+ err= NSS_STATUS_UNAVAIL; -+ } -+ return err; -+} -+ -+ -+enum nss_status _nss_ncp_getspent_r (struct spwd *spw, -+ char * buffer, size_t buflen,int * errnop) { -+ enum nss_status err; -+ -+ -+ if (ndsShadows) { -+ struct TreeNode* n; -+ NWDSCCODE ccode; -+ const char* ndsName; -+ struct nw_shadow_info si; -+ struct nss_ncp_conf *conf=ndsShadows->conf; -+ -+ if (conf->debug) { -+ openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV); -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_getgrent entering"); -+ } -+next_user:; // avoid a recursive call -+ n = ndsShadows->curr; -+ if (!n) { -+ //ready to scan again from the beginning (a good idea ??) -+ ndsShadows->curr = ndsShadows->lin; -+ ndsShadows->remainObjects = ndsShadows->uniqueObjects; -+ err= NSS_STATUS_NOTFOUND; -+ }else { -+ ndsName=n->name; -+ init_nw_shadow_info(&si,conf->debug); -+ ccode=nds_shadow_info(ndsShadows->context,n->name,&si,conf->debug); -+ if (ccode) { -+ free_nw_shadow_info(&si); -+ err=NSS_STATUS_NOTFOUND; -+ goto exit; -+ } -+ if (conf->debug &QF_VERBOSE) -+ print_nw_shadow_info(si); -+ if (!fix_nw_shadow_info(&si,conf)) -+ err=nw_shadow_info_to_shadow(si,spw,buffer,buflen,&errno,conf); -+ else err=NSS_STATUS_UNAVAIL; -+ free_nw_shadow_info(&si); -+ switch (err) { -+ case NSS_STATUS_TRYAGAIN: -+ // buffer was too small -+ // do not advance to next user -+ // and let nss to try again with a bigger buffer; -+ break; -+ default: -+ // move to next user -+ if (!--n->cnt) { -+ ndsShadows->curr = n->next; -+ ndsShadows->remainObjects--; -+ } -+ if (err==NSS_STATUS_NOTFOUND) {// user has no unix property, skip -+ trace (conf->debug, LOG_NOTICE,"user %s has not Unix properties in NDS,skipping",ndsName); -+ goto next_user; -+ } -+ else -+ err=NSS_STATUS_SUCCESS; -+ } -+ } -+exit: -+ if (conf->debug) { -+ trace (conf->debug, LOG_NOTICE,"nss_ncp_getspent leaving"); -+ closelog(); -+ } -+ }else { -+ return NSS_STATUS_UNAVAIL; -+ } -+ return err; -+ -+} -+ -diff -r 3143e61fb504 -r 1a8455ed3290 contrib/ncp_nss_lib/nss_ncp.h ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/contrib/ncp_nss_lib/nss_ncp.h Sun Oct 16 02:40:25 2005 +0200 -@@ -0,0 +1,175 @@ -+/************************************************************************** -+ nss_ncp.h header for NSS for NDS -+ -+ Copyright (C) 2002 Patrick Pollet -+ -+ 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 of the License, 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ -+ -+ Revision history: -+ -+ 1.00 2003, January 06 Patrick Pollet -+ initial release -+ -+************************************************************************/ -+#ifndef HAVE_NSS_NCP_H -+#define HAVE_NSS_NCP_H -+ -+#define TRUE 1 -+#define FALSE 0 -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include -+ -+ -+ -+// USE_DUMMY_ATTRibutes must be set in the Makefile -+//#define USING_DUMMY_ATTRIBUTES -+ -+#ifndef USING_DUMMY_ATTRIBUTES -+// the real ones -+#define ATTR_UID "UNIX:UID" -+#define ATTR_PGNAME "UNIX:Primary GroupName" -+#define ATTR_PGID "UNIX:Primary GroupID" -+#define ATTR_GID "UNIX:GID" -+#define ATTR_SHELL "UNIX:Login Shell" -+#define ATTR_COM "UNIX:Comments" -+#define ATTR_HOME "UNIX:Home Directory" -+#else -+// dummy attributes for testing -+// created with Schemax with the same syntax -+// and associated to user class and group class -+#define ATTR_UID "LINUX:UID" -+#define ATTR_PGNAME "LINUX:Primary GroupName" -+#define ATTR_PGID "LINUX:Primary GroupID" -+#define ATTR_GID "LINUX:GID" -+#define ATTR_SHELL "LINUX:Login Shell" -+#define ATTR_COM "LINUX:Comments" -+#define ATTR_HOME "LINUX:Home Directory" -+#endif -+ -+// the attribute used to test presence of NDS8 -+// either real or dummy (not used yet) -+#define ATTR_NDS8 ATTR_UID -+ -+// other attributes used -+// absent NDS8 attributes are searched in L attribute -+// also new properties ( Zenux Flags, Other group...) -+ -+#define ATTR_CN "CN" -+#define ATTR_LOCATION "L" -+ -+#define ATTR_GRP_MBS "Group Membership" -+#define ATTR_MEMBERS "Member" -+#define ATTR_FULL_NAME "Full Name" -+ -+#define ATTR_DATE_PWD_EXPIRE "Password Expiration Time" -+#define ATTR_INT_PWD_EXPIRE "Password Expiration Interval" -+#define ATTR_GRACE_LIMIT "Login Grace Limit" -+#define ATTR_DATE_ACCT_EXPIRE "Login Expiration Time" -+ -+ -+// the proper naming attribute may be customized here (must be a CI_STRING ) -+#define ATTR_GECOS ATTR_FULL_NAME -+ -+// syntaxes of the used attributes -+#define SYN_CN SYN_CI_STRING -+#define SYN_LOCATION SYN_CI_STRING -+#define SYN_UID SYN_INTEGER -+#define SYN_PGNAME SYN_DIST_NAME -+#define SYN_PGID SYN_INTEGER -+#define SYN_GID SYN_INTEGER -+#define SYN_SHELL SYN_CE_STRING -+#define SYN_COM SYN_CI_STRING -+#define SYN_HOME SYN_CE_STRING -+#define SYN_GRP_MBS SYN_DIST_NAME -+#define SYN_MEMBERS SYN_DIST_NAME -+ -+ -+ -+#define QF_DEBUG 0x0001 -+#define QF_VERBOSE 0x0002 -+ -+#define NFS_NOBODY = 65534 -+#define CNF_FILE "/etc/nss_ncp.conf" -+ -+ -+ -+ -+/******************************* NSS API ***************************************/ -+ -+ -+enum nss_status _nss_ncp_initgroups (const char *userName, gid_t group, -+ long int *start, long int *size, gid_t * groups, -+ long int limit,int *errnop); -+ -+ -+enum nss_status _nss_ncp_getpwnam_r (const char* name, struct passwd *pwd, -+ char * buffer, size_t buflen, int * errnop); -+ -+ -+ -+enum nss_status _nss_ncp_getpwuid_r (uid_t uid, struct passwd *pwd, -+ char * buffer, size_t buflen, int * errnop); -+ -+ -+enum nss_status _nss_ncp_getgrnam_r (const char* name, struct group *grp, -+ char * buffer, size_t buflen, int * errnop); -+ -+ -+ -+enum nss_status _nss_ncp_getspnam_r (const char * name, struct spwd *spw, -+ char *buffer, size_t buflen,int * errnop); -+ -+ -+enum nss_status _nss_ncp_getgrgid_r (gid_t gid, struct group *grp, -+ char * buffer, size_t buflen, int * errnop); -+ -+ -+ -+enum nss_status _nss_ncp_setpwent(void); -+ -+enum nss_status _nss_ncp_setgrent(void); -+ -+enum nss_status _nss_ncp_setspent (void); -+ -+enum nss_status _nss_ncp_endpwent(void); -+ -+enum nss_status _nss_ncp_endgrent(void); -+ -+enum nss_status _nss_ncp_endspent (void); -+ -+enum nss_status _nss_ncp_getpwent_r(struct passwd *pwd, char * buffer, size_t buflen, int * errnop); -+ -+enum nss_status _nss_ncp_getgrent_r(struct group *grp,char * buffer, size_t buflen, int * errnop); -+ -+ -+enum nss_status _nss_ncp_getspent_r (struct spwd *spw,char * buffer, size_t buflen,int * errnop); -+ -+#endif -diff -r 3143e61fb504 -r 1a8455ed3290 contrib/ncp_nss_lib/test_ncp_nss.c ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/contrib/ncp_nss_lib/test_ncp_nss.c Sun Oct 16 02:40:25 2005 +0200 -@@ -0,0 +1,318 @@ -+/************************************************************************** -+ getpwduid.c:test program for NSS for NDS -+ -+ Copyright (C) 2002 Patrick Pollet -+ -+ 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 of the License, 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 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ -+ -+ Revision history: -+ -+ 1.00 2003, January 06 Patrick Pollet -+ initial release -+ 1.01 2003, January 08 Patrick Pollet -+ added conf structure and control group -+ added optional fallback UID and GID if none found in NDS (default is to skip user,group) -+ 1.02 2003, January 09 Patrick Pollet -+ added initgroups -+ 1.03 2003, January 10 Patrick Pollet -+ fixed bug in nds_user_info2 (bad structure received by nds_user_location2) -+ 1.04 2003, January 11 Patrick Pollet -+ fixed setting ndsXXX=NULL trees in case of errors in _nss_ncp_setxxent() -+ made always NAME_CONTEXT=[Root] in CreateContextAndConn -+ calling NWCCloseIteration only it some errors has occured in the search -+ 1.05 -+ modified to use nss_ncp.so -+************************************************************************/ -+ -+ -+#define TRUE 1 -+#define FALSE 0 -+ -+#include -+#include -+#include -+#include -+ -+#ifdef VERBOSE -+#include -+#endif -+#include -+#include -+#include -+#include -+ -+#include "private/libintl.h" -+ -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include "nss_ncp.h" -+#include "nss_cfgfile.h" -+ -+ -+ -+/**************** TESTING ******************/ -+ -+static void print_passwd (struct passwd pwd){ -+ printf("%s:%s:%d:%d:%s:%s:%s\n",pwd.pw_name,pwd.pw_passwd,pwd.pw_uid,pwd.pw_gid,pwd.pw_gecos,pwd.pw_dir,pwd.pw_shell); -+} -+ -+static void print_group (struct group grp){ -+ char ** mmb; int num; -+ printf("%s:%s:%d:",grp.gr_name,grp.gr_passwd,grp.gr_gid); -+ for (mmb=grp.gr_mem,num=0;*mmb; mmb++,num++) { -+ if (num) -+ printf(","); -+ printf ("%s",*mmb); -+ -+ } -+ printf("\n"); -+ -+} -+ -+static void print_shadow (struct spwd spw){ -+ printf("%s:%s:%ld:%ld:%ld:%ld:%ld:%ld:%ld\n",spw.sp_namp,spw.sp_pwdp,spw.sp_lstchg,spw.sp_min,spw.sp_max,spw.sp_warn,spw.sp_inact,spw.sp_expire,spw.sp_flag); -+} -+ -+ -+static void print_user_groups(gid_t * groups, long int start, long int size){ -+ int i; -+ printf("start=%d size=%d\n",start,size); -+ for (i=0; i -date: Sun Oct 16 02:44:08 2005 +0200 -files: contrib/ncp_nss_lib/Makefile -description: -Update 'make clean' rule in ncp_nss_lib to remove all build products. - - -diff -r 1a8455ed3290 -r 20cdebe39580 contrib/ncp_nss_lib/Makefile ---- a/contrib/ncp_nss_lib/Makefile Sun Oct 16 02:40:25 2005 +0200 -+++ b/contrib/ncp_nss_lib/Makefile Sun Oct 16 02:44:08 2005 +0200 -@@ -87,7 +87,7 @@ dep: - dep: - - clean: -- rm -f *.o *.do *.to *~ -+ rm -f *.o *.do *.to $(SHARED_NSSLIB) $(SHARED_NSSLIB_BIN) $(UTILS1) *~ - - mrproper: clean - rm -f $(UTILS) $(DISTFILE) - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-450.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-450.patch deleted file mode 100644 index 88c7931..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-450.patch +++ /dev/null @@ -1,94 +0,0 @@ -changeset: 450:f18f9f05b9b8 -user: Petr Vandrovec -date: Sun Oct 16 02:52:35 2005 +0200 -files: .hgignore contrib/ncp_nss_lib/Makefile contrib/ncp_nss_lib/nss_cfgfile.c -description: -Get ncp_nss_lib to build with gcc4.0. Also fix build process - libnss_ncp.so -is needed for development, libnss_ncp.so.2 is soname, and libnss_ncp.so.2.3 is -library version. - - -diff -r 20cdebe39580 -r f18f9f05b9b8 .hgignore ---- a/.hgignore Sun Oct 16 02:44:08 2005 +0200 -+++ b/.hgignore Sun Oct 16 02:52:35 2005 +0200 -@@ -10,7 +10,7 @@ - ^autom4te.cache/ - ^config\.log$ - ^config\.status$ --^contrib/ncp_nss_lib/libnss_ncp\.so\.2$ -+^contrib/ncp_nss_lib/libnss_ncp\.so\. - ^contrib/ncp_nss_lib/test_ncp_nss$ - ^contrib/pam/Makefile$ - ^contrib/php/Makefile$ -diff -r 20cdebe39580 -r f18f9f05b9b8 contrib/ncp_nss_lib/Makefile ---- a/contrib/ncp_nss_lib/Makefile Sun Oct 16 02:44:08 2005 +0200 -+++ b/contrib/ncp_nss_lib/Makefile Sun Oct 16 02:52:35 2005 +0200 -@@ -8,8 +8,8 @@ this_srcdir = ${top_srcdir}/lib - - include ${top_builddir}/Make.rules - --VERSION_SOLIB := 2 --VERSION_SONAME := 2.3 -+VERSION_SOLIB := 2.3 -+VERSION_SONAME := 2 - - vpath %.c ${this_srcdir} - -@@ -80,8 +80,8 @@ install: install_shared - $(O_UTILS1) $(O_TMP1): %.o: %.c - $(CC) $(CCFLAGS) $(CFLAGS) $(CFLAGS_$@) -o $@ -c $< - --$(UTILS1):: %: %.o $(O_TMP1) -- $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(addsuffix .o,$@) $(OBJS_$@) -L$(top_builddir)/lib -lnss_ncp -lncp $(LDFLAGS_$@) -+$(UTILS1):: %: %.o $(O_TMP1) $(SHARED_NSSLIB) -+ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(addsuffix .o,$@) $(OBJS_$@) -L. -lnss_ncp -L$(top_builddir)/lib -lncp $(LDFLAGS_$@) - - - dep: -@@ -100,8 +100,11 @@ install_shared: $(SHARED_NCPLIB_BIN) - -ldconfig - - --$(SHARED_NSSLIB): $(SHARED_NSSLIB_BIN) -+$(SHARED_NSSLIB): $(SHARED_NSSLIB_SONAME) - rm -f $@ -+ ln -sf $< $@ -+ -+$(SHARED_NSSLIB_SONAME): $(SHARED_NSSLIB_BIN) - ln -sf $< $@ - - $(SHARED_NSSLIB_BIN): $(SHARED_O_OBJ) ${this_srcdir}/libncp.vers -diff -r 20cdebe39580 -r f18f9f05b9b8 contrib/ncp_nss_lib/nss_cfgfile.c ---- a/contrib/ncp_nss_lib/nss_cfgfile.c Sun Oct 16 02:44:08 2005 +0200 -+++ b/contrib/ncp_nss_lib/nss_cfgfile.c Sun Oct 16 02:52:35 2005 +0200 -@@ -175,13 +175,13 @@ static int process_line (char* cptr, str - } - *eptr = 0; - if (ptr->isNum) { -- (int *)*ptr->value_ptr=strtoul (sptr,&errPtr,0); -+ *(int**)ptr->value_ptr=strtoul (sptr,&errPtr,0); - ptr->found= ((*sptr) && !(*errPtr)); //not empty and no error - } else { - if (eptr>sptr) { // do not take an empty string value - char *v=strdup(sptr); - if (v) { -- (char*) *ptr->value_ptr=v; -+ *(char**)ptr->value_ptr=v; - ptr->found= TRUE; - }else - return 1; -@@ -201,11 +201,11 @@ static int fix_conf (struct check *resul - return 1; - } - if (ptr->isNum) { -- (int *)*ptr->value_ptr=strtoul (ptr->defValue,NULL,0); -+ *(int**)ptr->value_ptr=strtoul (ptr->defValue,NULL,0); - }else { - char * v=strdup(ptr->defValue); - if (v) -- (char*) *ptr->value_ptr=v; -+ *(char**)ptr->value_ptr=v; - else - return 1; - } - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-451.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-451.patch deleted file mode 100644 index 6c6a6cd..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-451.patch +++ /dev/null @@ -1,557 +0,0 @@ -changeset: 451:4d7bb63d7050 -user: Petr Vandrovec -date: Sun Oct 16 04:07:06 2005 +0200 -files: contrib/ncp_nss_lib/nss_cfgfile.c contrib/ncp_nss_lib/nss_cfgfile.h contrib/ncp_nss_lib/nss_ncp.c contrib/ncp_nss_lib/nss_ncp.h contrib/ncp_nss_lib/test_ncp_nss.c -description: -Fix warnings in the nss module. Tweak some functions to not take useless -arguments. Fix some bugs where long ints are printed by %d... - - -diff -r f18f9f05b9b8 -r 4d7bb63d7050 contrib/ncp_nss_lib/nss_cfgfile.c ---- a/contrib/ncp_nss_lib/nss_cfgfile.c Sun Oct 16 02:52:35 2005 +0200 -+++ b/contrib/ncp_nss_lib/nss_cfgfile.c Sun Oct 16 04:07:06 2005 +0200 -@@ -40,6 +40,7 @@ - #include - - #include "nss_cfgfile.h" -+#include "nss_ncp.h" - // temporary define (waiting for a better Makefile) - #define GLOBALCFGFILE "/etc/ncpfs.conf" - #ifndef GLOBALCFGFILE -@@ -49,7 +50,7 @@ - - // #define DEBUG 1 - --static struct nss_ncp_conf* alloc_nss_ncp_conf (){ -+static struct nss_ncp_conf* alloc_nss_ncp_conf (void){ - struct nss_ncp_conf * conf; - - conf= (struct nss_ncp_conf *)malloc(sizeof(*conf)); -@@ -61,7 +62,7 @@ static struct nss_ncp_conf* alloc_nss_nc - - void free_nss_ncp_conf (struct nss_ncp_conf *conf){ - #define FREEFIELD(x) do if (conf->x) {free(conf->x) ; conf->x=NULL;} while (0); -- if (conf && conf !=&defConf) { -+ if (conf) { - FREEFIELD(server); - FREEFIELD(startCtx); - FREEFIELD(ctrlGroup); -@@ -107,7 +108,7 @@ struct check { - const char *option; /* configuration option */ - int mandatory; /* can be empty or null */ - int found; /*set to TRUE if found in cfg file */ -- void ** value_ptr; /* temporary storage place */ -+ char ** value_ptr; /* temporary storage place */ - int isNum; /* 1 is numeric, 0 is string*/ - const char* defValue; - }; -@@ -120,10 +121,10 @@ void printResults (const char * infos,st - for (ptr=results; ptr->option; ptr++) { - if (ptr->isNum) - printf ("option=%s mandatory=%d found=%d value=%d isNum=%d defvalue=%s\n", -- ptr->option,ptr->mandatory,ptr->found,(int*)*ptr->value_ptr,ptr->isNum,ptr->defValue); -+ ptr->option,ptr->mandatory,ptr->found,*(int**)ptr->value_ptr,ptr->isNum,ptr->defValue); - else - printf ("option=%s mandatory=%d found=%d value=%s isNum=%d defvalue=%s\n", -- ptr->option,ptr->mandatory,ptr->found,(char*)*ptr->value_ptr,ptr->isNum,ptr->defValue); -+ ptr->option,ptr->mandatory,ptr->found,*ptr->value_ptr,ptr->isNum,ptr->defValue); - } - - } -@@ -175,13 +176,13 @@ static int process_line (char* cptr, str - } - *eptr = 0; - if (ptr->isNum) { -- *(int**)ptr->value_ptr=strtoul (sptr,&errPtr,0); -+ *(int*)ptr->value_ptr=strtoul (sptr,&errPtr,0); - ptr->found= ((*sptr) && !(*errPtr)); //not empty and no error - } else { - if (eptr>sptr) { // do not take an empty string value - char *v=strdup(sptr); - if (v) { -- *(char**)ptr->value_ptr=v; -+ *ptr->value_ptr=v; - ptr->found= TRUE; - }else - return 1; -@@ -201,11 +202,11 @@ static int fix_conf (struct check *resul - return 1; - } - if (ptr->isNum) { -- *(int**)ptr->value_ptr=strtoul (ptr->defValue,NULL,0); -+ *(int*)ptr->value_ptr=strtoul (ptr->defValue,NULL,0); - }else { - char * v=strdup(ptr->defValue); - if (v) -- *(char**)ptr->value_ptr=v; -+ *ptr->value_ptr=v; - else - return 1; - } -@@ -223,22 +224,21 @@ static struct nss_ncp_conf *read_conf_fi - if (!conf) - return NULL; - { -- struct nss_ncp_conf * pconf=conf; - struct check check_confs[] = { - /*option mandat found value_ptr isNum defValue */ -- {"debug", FALSE,FALSE,(void**)&conf->debug, TRUE, "0"}, -- {"useTree", FALSE,FALSE,(void**)&conf->useTree, TRUE, "0"}, -- {"server", TRUE,FALSE, (void**)&conf->server, FALSE, ""}, -- {"startCtx", FALSE,FALSE,(void**)&conf->startCtx, FALSE, ""}, -- {"ctrlGroup", FALSE,FALSE,(void**)&conf->ctrlGroup, FALSE, ""}, -- {"defGid", FALSE,FALSE,(void**)&conf->defGid, TRUE, "100"}, -- {"defShell", FALSE,FALSE,(void**)&conf->defShell, FALSE, "/bin/bash"}, -- {"fallbackUid", FALSE,FALSE,(void**)&conf->fallbackUid, TRUE, "-1"}, -- {"fallbackGid", FALSE,FALSE,(void**)&conf->fallbackGid, TRUE, "-1"}, -- {"doPasswd", FALSE,FALSE,(void**)&conf->doPassword, TRUE, "0"}, -- {"doGroup", FALSE,FALSE,(void**)&conf->doGroup, TRUE, "0"}, -- {"doShadow", FALSE,FALSE,(void**)&conf->doShadow, TRUE, "0"}, -- {NULL , FALSE,FALSE,NULL, FALSE, NULL} -+ {"debug", FALSE,FALSE,(char**)&conf->debug, TRUE, "0"}, -+ {"useTree", FALSE,FALSE,(char**)&conf->useTree, TRUE, "0"}, -+ {"server", TRUE, FALSE, &conf->server, FALSE, ""}, -+ {"startCtx", FALSE,FALSE, &conf->startCtx, FALSE, ""}, -+ {"ctrlGroup", FALSE,FALSE, &conf->ctrlGroup, FALSE, ""}, -+ {"defGid", FALSE,FALSE,(char**)&conf->defGid, TRUE, "100"}, -+ {"defShell", FALSE,FALSE, &conf->defShell, FALSE, "/bin/bash"}, -+ {"fallbackUid", FALSE,FALSE,(char**)&conf->fallbackUid, TRUE, "-1"}, -+ {"fallbackGid", FALSE,FALSE,(char**)&conf->fallbackGid, TRUE, "-1"}, -+ {"doPasswd", FALSE,FALSE,(char**)&conf->doPassword, TRUE, "0"}, -+ {"doGroup", FALSE,FALSE,(char**)&conf->doGroup, TRUE, "0"}, -+ {"doShadow", FALSE,FALSE,(char**)&conf->doShadow, TRUE, "0"}, -+ {NULL , FALSE,FALSE, NULL, FALSE, NULL} - }; - - char cfgline[16384]; -@@ -259,7 +259,6 @@ static struct nss_ncp_conf *read_conf_fi - cptr++; - if (*cptr != '[') - continue; --sstart:; - if (strncasecmp(++cptr, mySection, seclen)) - continue; - if (cptr[seclen] != ']') -@@ -299,7 +298,6 @@ ssend: - return conf; - } - --error: - #ifdef DEBUG - printResults("after reading CFG error",check_confs); - #endif -@@ -310,14 +308,12 @@ error: - - } - --struct nss_ncp_conf * parse_conf (char * confFile) { -- -+struct nss_ncp_conf* parse_conf(void) { - struct cfgFile *cfg; - struct nss_ncp_conf *conf; - #ifdef DEBUG - printf("entering parse_conf\n"); - #endif -- //return &defConf; - cfg = cfgOpenFile(GLOBALCFGFILE, FALSE); - if (!cfg) - return NULL; -diff -r f18f9f05b9b8 -r 4d7bb63d7050 contrib/ncp_nss_lib/nss_cfgfile.h ---- a/contrib/ncp_nss_lib/nss_cfgfile.h Sun Oct 16 02:52:35 2005 +0200 -+++ b/contrib/ncp_nss_lib/nss_cfgfile.h Sun Oct 16 04:07:06 2005 +0200 -@@ -20,11 +20,7 @@ struct nss_ncp_conf { - int doShadow; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf - }; - -- -- --static struct nss_ncp_conf defConf ={0,TRUE,"INSA_ROOT","[Root]",NULL,100,"/bin/bash",-1,-1,TRUE,TRUE,TRUE}; -- --struct nss_ncp_conf * parse_conf (char * confFile); --void free_nss_ncp_conf (struct nss_ncp_conf *conf); -+struct nss_ncp_conf* parse_conf(void); -+void free_nss_ncp_conf(struct nss_ncp_conf *conf); - - #endif -diff -r f18f9f05b9b8 -r 4d7bb63d7050 contrib/ncp_nss_lib/nss_ncp.c ---- a/contrib/ncp_nss_lib/nss_ncp.c Sun Oct 16 02:52:35 2005 +0200 -+++ b/contrib/ncp_nss_lib/nss_ncp.c Sun Oct 16 04:07:06 2005 +0200 -@@ -77,7 +77,7 @@ - #include "nss_cfgfile.h" - - // only if logfile has been opened by nss API functions (debug mode) --void trace (int debugMode,int err,const char * format,... ) { -+static void trace (int debugMode,int err,const char * format,... ) { - va_list args; - if (debugMode) { - va_start(args,format); -@@ -219,7 +219,7 @@ static int fix_nw_user_info (struct nw_u - return 1; - } - }else { -- ui->uid== (uid_t)-1; // unable to read CN (NDS browse rights not set) , skip it ! -+ ui->uid = (uid_t)-1; // unable to read CN (NDS browse rights not set) , skip it ! - } - return 0; - } -@@ -343,7 +343,7 @@ static int fix_nw_group_info (struct nw_ - } - } - }else { -- gi->gid== (gid_t)-1; // unable to read CN (NDS browse rights not set) , skip it ! -+ gi->gid = (gid_t)-1; // unable to read CN (NDS browse rights not set) , skip it ! - } - return 0; - } -@@ -514,7 +514,7 @@ static int fix_nw_shadow_info (struct nw - - } - }else { -- si->uid== (uid_t)-1; // unable to read CN (NDS browse rights not set) , skip it ! -+ si->uid = (uid_t)-1; // unable to read CN (NDS browse rights not set) , skip it ! - } - return 0; - } -@@ -564,7 +564,7 @@ outnomem: - - static void print_nw_shadow_info (struct nw_shadow_info si){ - -- printf("%s[%d]:%s:%d:%d:%d:%d:%d:%d:%d\n",si.cn,si.uid,si.passwd,si.lstchg,si.sp_min,si.sp_max,si.sp_warn,si.sp_inact,si.sp_expire,si.sp_flag); -+ printf("%s[%d]:%s:%ld:%ld:%ld:%ld:%ld:%ld:%ld\n",si.cn,si.uid,si.passwd,si.lstchg,si.sp_min,si.sp_max,si.sp_warn,si.sp_inact,si.sp_expire,si.sp_flag); - } - - static void print_shadow (struct spwd spw){ -@@ -579,8 +579,8 @@ struct nw_user_group_info { - uid_t uid; - gid_t* groups; - size_t used; -- size_t alloc; -- int qflag; -+ size_t alloc; -+ int qflag; - }; - - -@@ -614,7 +614,7 @@ static int fix_nw_user_group_info (struc - if (ui->uid== (uid_t)-1) - ui->uid=conf->fallbackUid; - }else { -- ui->uid== (uid_t)-1; // unable to read CN (NDS browse rights not set) , skip it ! -+ ui->uid = (uid_t)-1; // unable to read CN (NDS browse rights not set) , skip it ! - } - return 0; - } -@@ -628,11 +628,11 @@ static enum nss_status nw_user_group_inf - long int *size, gid_t * groups,long int limit,int *errnop,struct nss_ncp_conf * conf) { - - if (ui.uid != (uid_t)-1) { -- int i; -- for (i=0; iqflag,LOG_NOTICE, "start of NW location got %s\n ", pt); - -@@ -1318,9 +1317,7 @@ static NWDSCCODE nds_shadow_location(NWD - - struct nw_shadow_info *si = (struct nw_shadow_info *) arg; - const char *pt = (const char *) val; -- char *v; - int n; -- int err; - - trace(si->qflag & QF_DEBUG,LOG_NOTICE, "shadow: start of NW location got %s\n ", pt); - -@@ -1434,10 +1431,7 @@ static NWDSCCODE nds_user_location3(NWDS - static NWDSCCODE nds_user_location3(NWDSContextHandle ctx, const void *val, void *arg){ - struct nw_user_group_info *ui = (struct nw_user_group_info *) arg; - const char *pt = (const char *) val; -- char *v; - int n; -- int err; -- - - trace(ui->qflag & QF_DEBUG,LOG_NOTICE, "start of NW location got %s\n ", pt); - -@@ -1814,7 +1808,6 @@ getgroupmembers(NWDSContextHandle *conte - { ATTR_MEMBERS, nds_get_group_members, SYN_MEMBERS}, - { NULL, NULL, SYN_UNKNOWN }}; - -- NWDSCCODE err; - trace(conf->debug, LOG_NOTICE,"entering getgroupmembers for group %s",groupName); - ccode=CreateContextAndConn ( context,conn,conf); - if (ccode) -@@ -1834,12 +1827,12 @@ static struct ObjectList* ndsShadows=NUL - - // description of a NDS class to be searched by getentbyxx - struct class_info { -- char * className; -- char * nds8Attribute; //name of ID attribute in NDS8 -- char * LID1; // markers in L attribute for ID (U: or G:) -- char * LID2; // markers in L attribute for ID (u: or g:), may be in lower case -- char * LAlias1;// markers in L attribute for alias (N:) -- char * LAlias2; // markers in L attribute for alias (n:) may be in lower case -+ const char * className; -+ const char * nds8Attribute; // name of ID attribute in NDS8 -+ const char * LID1; // markers in L attribute for ID (U: or G:) -+ const char * LID2; // markers in L attribute for ID (u: or g:), may be in lower case -+ const char * LAlias1; // markers in L attribute for alias (N:) -+ const char * LAlias2; // markers in L attribute for alias (n:) may be in lower case - - }; - -@@ -1879,17 +1872,12 @@ static NWDSCCODE getentbyxx( - NWDSContextHandle context; - NWCONN_HANDLE conn; - NWDSCCODE ccode; -- nint32 iterationHandle= NO_MORE_ITERATIONS; // to be set as such at Exit4 -- nint32 countObjectsSearched; -- nuint32 objCntr,attrCntr,valCntr; -+ nuint32 iterationHandle = NO_MORE_ITERATIONS; // to be set as such at Exit4 -+ nuint32 countObjectsSearched; -+ nuint32 objCntr; - nuint32 objCount; - nuint32 attrCount; - char objectName[MAX_DN_CHARS+1]; -- char attrName[MAX_SCHEMA_NAME_CHARS+1]; -- nuint32 attrValCount; -- nuint32 syntaxID; -- nuint32 attrValSize; -- char* attrVal; - - // buffers - pBuf_T searchFilter=NULL; // search filter -@@ -2259,14 +2247,14 @@ static NWDSCCODE getentbyxx( - } - } - trace(conf->debug, LOG_NOTICE,"callback return OK"); -- } while ((nuint32)iterationHandle != NO_MORE_ITERATIONS); -+ } while (iterationHandle != NO_MORE_ITERATIONS); - - trace(conf->debug, LOG_NOTICE,"End of iteration attrNamesOK"); - - Exit4: -- if ((nuint32)iterationHandle != NO_MORE_ITERATIONS){ -+ if (iterationHandle != NO_MORE_ITERATIONS){ - NWDSCCODE ccode2; -- if (ccode2=NWDSCloseIteration(context,iterationHandle,DSV_SEARCH)) { -+ if ((ccode2=NWDSCloseIteration(context,iterationHandle,DSV_SEARCH)) != 0) { - traceForce(conf->debug,LOG_WARNING,"NWDSCloseIteration returned: %d\n", ccode2); - } - } -@@ -2291,7 +2279,6 @@ Exit3: - }else - if (retConn) - *retConn=conn; --Exit2: - if (ccode || !retContext) { - NWDSCCODE ccode2=NWDSFreeContext(context); - trace(conf->debug, LOG_NOTICE,"Freeing context"); -@@ -2300,7 +2287,6 @@ Exit2: - }else - if (retContext) - *retContext=context; --Exit1: - trace(conf->debug, LOG_NOTICE,"Leaving ..."); - return ccode; - } -@@ -2417,7 +2403,7 @@ enum nss_status _nss_ncp_initgroups (con - - struct nw_user_group_info inf; - NWDSCCODE err; -- struct nss_ncp_conf *conf= parse_conf(CNF_FILE); -+ struct nss_ncp_conf* conf = parse_conf(); - - if (!conf || !conf->doGroup) - return NSS_STATUS_UNAVAIL; -@@ -2460,7 +2446,7 @@ enum nss_status _nss_ncp_getpwnam_r (con - - struct nw_user_info inf; - NWDSCCODE err; -- struct nss_ncp_conf *conf= parse_conf(CNF_FILE); -+ struct nss_ncp_conf* conf = parse_conf(); - - if (!conf || !conf->doPassword) - return NSS_STATUS_UNAVAIL; -@@ -2503,7 +2489,7 @@ enum nss_status _nss_ncp_getpwuid_r (uid - - struct nw_user_info inf; - NWDSCCODE err; -- struct nss_ncp_conf *conf= parse_conf(CNF_FILE); -+ struct nss_ncp_conf* conf = parse_conf(); - - if (!conf || !conf->doPassword) - return NSS_STATUS_UNAVAIL; -@@ -2546,7 +2532,7 @@ enum nss_status _nss_ncp_getgrnam_r (con - - struct nw_group_info inf; - NWDSCCODE err; -- struct nss_ncp_conf *conf= parse_conf(CNF_FILE); -+ struct nss_ncp_conf* conf = parse_conf(); - - if (!conf || !conf->doGroup) - return NSS_STATUS_UNAVAIL; -@@ -2588,7 +2574,7 @@ enum nss_status _nss_ncp_getspnam_r (con - char *buffer, size_t buflen,int * errnop) { - struct nw_shadow_info inf; - NWDSCCODE err; -- struct nss_ncp_conf *conf= parse_conf(CNF_FILE); -+ struct nss_ncp_conf* conf = parse_conf(); - - if (!conf || !conf->doShadow) - return NSS_STATUS_UNAVAIL; -@@ -2631,7 +2617,7 @@ enum nss_status _nss_ncp_getgrgid_r (gid - char * buffer, size_t buflen, int * errnop) { - struct nw_group_info inf; - NWDSCCODE err; -- struct nss_ncp_conf *conf= parse_conf(CNF_FILE); -+ struct nss_ncp_conf* conf = parse_conf(); - - if (!conf || !conf->doGroup) - return NSS_STATUS_UNAVAIL; -@@ -2673,7 +2659,7 @@ enum nss_status _nss_ncp_setpwent(void) - NWDSContextHandle context; - NWCONN_HANDLE conn; - NWDSCCODE ccode; -- struct nss_ncp_conf *conf= parse_conf(CNF_FILE); -+ struct nss_ncp_conf* conf = parse_conf(); - - if (!conf || !conf->doPassword) - return NSS_STATUS_UNAVAIL; -@@ -2715,7 +2701,7 @@ enum nss_status _nss_ncp_setgrent(void) - NWDSContextHandle context; - NWCONN_HANDLE conn; - enum nss_status ccode; -- struct nss_ncp_conf *conf= parse_conf(CNF_FILE); -+ struct nss_ncp_conf* conf = parse_conf(); - - if (!conf || !conf->doGroup) - return NSS_STATUS_UNAVAIL; -@@ -2753,7 +2739,7 @@ enum nss_status _nss_ncp_setspent (void) - NWDSContextHandle context; - NWCONN_HANDLE conn; - NWDSCCODE ccode; -- struct nss_ncp_conf *conf= parse_conf(CNF_FILE); -+ struct nss_ncp_conf* conf = parse_conf(); - - if (!conf || !conf->doShadow) - return NSS_STATUS_UNAVAIL; -diff -r f18f9f05b9b8 -r 4d7bb63d7050 contrib/ncp_nss_lib/nss_ncp.h ---- a/contrib/ncp_nss_lib/nss_ncp.h Sun Oct 16 02:52:35 2005 +0200 -+++ b/contrib/ncp_nss_lib/nss_ncp.h Sun Oct 16 04:07:06 2005 +0200 -@@ -121,6 +121,7 @@ - - - -+void traceForce(int debugMode, int err, const char* format, ...); - - /******************************* NSS API ***************************************/ - -diff -r f18f9f05b9b8 -r 4d7bb63d7050 contrib/ncp_nss_lib/test_ncp_nss.c ---- a/contrib/ncp_nss_lib/test_ncp_nss.c Sun Oct 16 02:52:35 2005 +0200 -+++ b/contrib/ncp_nss_lib/test_ncp_nss.c Sun Oct 16 04:07:06 2005 +0200 -@@ -67,6 +67,7 @@ - #include "nss_cfgfile.h" - - -+static struct nss_ncp_conf defConf ={0, TRUE, NULL, NULL, NULL, 100, NULL, -1, -1, TRUE, TRUE, TRUE}; - - /**************** TESTING ******************/ - -@@ -94,13 +95,13 @@ static void print_shadow (struct spwd sp - - static void print_user_groups(gid_t * groups, long int start, long int size){ - int i; -- printf("start=%d size=%d\n",start,size); -+ printf("start=%ld size=%ld\n",start,size); - for (i=0; i -date: Sun Oct 16 04:14:27 2005 +0200 -files: contrib/ncp_nss_lib/nss_ncp.c -description: -Use %zd format when printing size_t arguments. Revealed on 64bit host. - - -diff -r 4d7bb63d7050 -r b2ec015c1689 contrib/ncp_nss_lib/nss_ncp.c ---- a/contrib/ncp_nss_lib/nss_ncp.c Sun Oct 16 04:07:06 2005 +0200 -+++ b/contrib/ncp_nss_lib/nss_ncp.c Sun Oct 16 04:14:27 2005 +0200 -@@ -666,7 +666,7 @@ static void print_nw_user_group_info (st - static void print_nw_user_group_info (struct nw_user_group_info ui){ - size_t i; - -- printf("%s:%d:%d:%d:",ui.cn,ui.uid,ui.used,ui.alloc); -+ printf("%s:%d:%zd:%zd:",ui.cn,ui.uid,ui.used,ui.alloc); - for (i=0;i left,crlf); - if (crlf) -- printf ("%s [%d]\n",n->name,n->cnt); -+ printf ("%s [%zd]\n",n->name,n->cnt); - else -- printf ("%s [%d]",n->name,n->cnt); -+ printf ("%s [%zd]",n->name,n->cnt); - print_nodes(n->right,crlf); - } - } - - static void print_tree(struct ObjectList* t, int crlf) { -- printf("total:%d unique:%d\n",t->totalObjects,t->uniqueObjects); -+ printf("total:%zd unique:%zd\n",t->totalObjects,t->uniqueObjects); - print_nodes (t->first,crlf); - } - - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-453.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-453.patch deleted file mode 100644 index b2d29dd..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-453.patch +++ /dev/null @@ -1,29 +0,0 @@ -changeset: 453:329b32c7d8a6 -user: Petr Vandrovec -date: Thu Apr 13 19:59:28 2006 +0200 -files: lib/ndslib.c -description: -Fix nds_beginauth2 on Fedora - -nds_beginauth2 was aliging pointer to be multiple of 4 bytes, instead of -aligning offset from start of buffer to the pointer to be multiple of 4 -bytes. This was not problem before, as buffer itself was 4 byte aligned, -but Fedora's compiler has options which can misalign it... - -See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=186683. - - -diff -r b2ec015c1689 -r 329b32c7d8a6 lib/ndslib.c ---- a/lib/ndslib.c Sun Oct 16 04:14:27 2005 +0200 -+++ b/lib/ndslib.c Thu Apr 13 19:59:28 2006 +0200 -@@ -1026,7 +1026,8 @@ static NWDSCCODE nds_beginauth2( - goto err_exit; - } - copyfill(n_temp, n1, p, n3a); -- p = (void*)(((unsigned long)k1end + 3) & ~3); -+ /* align p to the first 4 byte boundary beyond k1end */ -+ p = k1end + ((p - k1end) & 3); - err = modexpkey(s_key, n_temp, n_temp, n1); - if (err) { - ISRPrint("modexpkey failed\n"); - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-454.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-454.patch deleted file mode 100644 index 57b113f..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-454.patch +++ /dev/null @@ -1,313 +0,0 @@ -changeset: 454:7783da47228e -user: Petr Vandrovec -date: Thu Apr 13 22:53:06 2006 +0200 -files: include/ncp/ipxlib.h include/ncp/kernel/ncp.h include/ncp/ncp.h include/ncp/ncplib.h ipx-1.0/ipx_cmd.c lib/ncplib.c -description: -gcc-4.1 does not like packed characters/character arrays - -gcc-4.1 does not like when element which itself is aligned -at 1 byte is tagged again with __attribute__((packed)). So -let's remove this attribute, it should not break older gcc... - - -diff -r 329b32c7d8a6 -r 7783da47228e include/ncp/ipxlib.h ---- a/include/ncp/ipxlib.h Thu Apr 13 19:59:28 2006 +0200 -+++ b/include/ncp/ipxlib.h Thu Apr 13 22:53:06 2006 +0200 -@@ -64,12 +64,12 @@ struct sap_server_ident - struct sap_server_ident - { - u_int16_t server_type __attribute__((packed)); -- char server_name[48] __attribute__((packed)); -+ char server_name[48]; - IPXNet server_network __attribute__((packed)); - #ifdef SWIG - u_int8_t server_node[6] __attribute__((packed)); - #else -- IPXNode server_node __attribute__((packed)); -+ IPXNode server_node; - #endif - IPXPort server_port __attribute__((packed)); - u_int16_t intermediate_network __attribute__((packed)); -@@ -87,7 +87,7 @@ struct ipx_rip_packet - struct ipx_rip_packet - { - u_int16_t operation __attribute__((packed)); -- struct ipx_rt_def rt[1] __attribute__((packed)); -+ struct ipx_rt_def rt[1]; - } __attribute__((packed)); - - #ifdef SWIG -diff -r 329b32c7d8a6 -r 7783da47228e include/ncp/kernel/ncp.h ---- a/include/ncp/kernel/ncp.h Thu Apr 13 19:59:28 2006 +0200 -+++ b/include/ncp/kernel/ncp.h Thu Apr 13 22:53:06 2006 +0200 -@@ -53,12 +53,12 @@ - - struct ncp_request_header { - u_int16_t type __attribute__((packed)); -- u_int8_t sequence __attribute__((packed)); -- u_int8_t conn_low __attribute__((packed)); -- u_int8_t task __attribute__((packed)); -- u_int8_t conn_high __attribute__((packed)); -- u_int8_t function __attribute__((packed)); -- u_int8_t data[0] __attribute__((packed)); -+ u_int8_t sequence; -+ u_int8_t conn_low; -+ u_int8_t task; -+ u_int8_t conn_high; -+ u_int8_t function; -+ u_int8_t data[0]; - } __attribute__((packed)); - - #define NCP_REPLY (0x3333) -@@ -66,13 +66,13 @@ struct ncp_request_header { - - struct ncp_reply_header { - u_int16_t type __attribute__((packed)); -- u_int8_t sequence __attribute__((packed)); -- u_int8_t conn_low __attribute__((packed)); -- u_int8_t task __attribute__((packed)); -- u_int8_t conn_high __attribute__((packed)); -- u_int8_t completion_code __attribute__((packed)); -- u_int8_t connection_state __attribute__((packed)); -- u_int8_t data[0] __attribute__((packed)); -+ u_int8_t sequence; -+ u_int8_t conn_low; -+ u_int8_t task; -+ u_int8_t conn_high; -+ u_int8_t completion_code; -+ u_int8_t connection_state; -+ u_int8_t data[0]; - } __attribute__((packed)); - - #define NCP_VOLNAME_LEN (16) -@@ -230,8 +230,8 @@ struct nw_info_struct { - u_int32_t EAKeyCount __attribute__((packed)); - u_int32_t EAKeySize __attribute__((packed)); - u_int32_t NSCreator __attribute__((packed)); -- u_int8_t nameLen __attribute__((packed)); -- u_int8_t entryName[256] __attribute__((packed)); -+ u_int8_t nameLen; -+ u_int8_t entryName[256]; - } __attribute__((packed)); - #endif - -@@ -282,13 +282,13 @@ struct nw_file_info { - int opened; - int access; - u_int32_t server_file_handle __attribute__((packed)); -- u_int8_t open_create_action __attribute__((packed)); -- u_int8_t file_handle[6] __attribute__((packed)); -+ u_int8_t open_create_action; -+ u_int8_t file_handle[6]; - } __attribute__((packed)); - #endif - - struct nw_search_sequence { -- u_int8_t volNumber __attribute__((packed)); -+ u_int8_t volNumber; - u_int32_t dirBase __attribute__((packed)); - u_int32_t sequence __attribute__((packed)); - } __attribute__((packed)); -diff -r 329b32c7d8a6 -r 7783da47228e include/ncp/ncp.h ---- a/include/ncp/ncp.h Thu Apr 13 19:59:28 2006 +0200 -+++ b/include/ncp/ncp.h Thu Apr 13 22:53:06 2006 +0200 -@@ -95,7 +95,7 @@ struct prop_net_address { - #ifdef SWIG - fixedArray node[IPX_NODE_LEN]; - #else -- u_int8_t node[IPX_NODE_LEN] __attribute__((packed)); -+ u_int8_t node[IPX_NODE_LEN]; - #endif - u_int16_t port __attribute__((packed)); - }; -@@ -163,20 +163,20 @@ struct nw_queue_job_entry { - u_int32_t ClientTask __attribute__((packed)); - u_int32_t ClientObjectID __attribute__((packed)); - u_int32_t TargetServerID __attribute__((packed)); -- u_int8_t TargetExecTime[6] __attribute__((packed)); -- u_int8_t JobEntryTime[6] __attribute__((packed)); -+ u_int8_t TargetExecTime[6]; -+ u_int8_t JobEntryTime[6]; - u_int32_t JobNumber __attribute__((packed)); - u_int16_t JobType __attribute__((packed)); - u_int16_t JobPosition __attribute__((packed)); - u_int16_t JobControlFlags __attribute__((packed)); -- u_int8_t FileNameLen __attribute__((packed)); -- char JobFileName[13] __attribute__((packed)); -+ u_int8_t FileNameLen; -+ char JobFileName[13]; - u_int32_t JobFileHandle __attribute__((packed)); - u_int32_t ServerStation __attribute__((packed)); - u_int32_t ServerTaskNumber __attribute__((packed)); - u_int32_t ServerObjectID __attribute__((packed)); -- char JobTextDescription[50] __attribute__((packed)); -- char ClientRecordArea[152] __attribute__((packed)); -+ char JobTextDescription[50]; -+ char ClientRecordArea[152]; - }; - - struct queue_job { -@@ -217,18 +217,18 @@ struct print_job_record { - }; - #else - struct print_job_record { -- u_int8_t Version __attribute__((packed)); -- u_int8_t TabSize __attribute__((packed)); -+ u_int8_t Version; -+ u_int8_t TabSize; - u_int16_t Copies __attribute__((packed)); - u_int16_t CtrlFlags __attribute__((packed)); - u_int16_t Lines __attribute__((packed)); - u_int16_t Rows __attribute__((packed)); -- char FormName[16] __attribute__((packed)); -- u_int8_t Reserved[6] __attribute__((packed)); -- char BannerName[13] __attribute__((packed)); -- char FnameBanner[13] __attribute__((packed)); -- char FnameHeader[14] __attribute__((packed)); -- char Path[80] __attribute__((packed)); -+ char FormName[16]; -+ u_int8_t Reserved[6]; -+ char BannerName[13]; -+ char FnameBanner[13]; -+ char FnameHeader[14]; -+ char Path[80]; - }; - #endif - -diff -r 329b32c7d8a6 -r 7783da47228e include/ncp/ncplib.h ---- a/include/ncp/ncplib.h Thu Apr 13 19:59:28 2006 +0200 -+++ b/include/ncp/ncplib.h Thu Apr 13 22:53:06 2006 +0200 -@@ -477,24 +477,24 @@ struct ncp_file_server_info - #else - struct ncp_file_server_info - { -- char ServerName[48] __attribute__((packed)); -- u_int8_t FileServiceVersion __attribute__((packed)); -- u_int8_t FileServiceSubVersion __attribute__((packed)); -+ char ServerName[48]; -+ u_int8_t FileServiceVersion; -+ u_int8_t FileServiceSubVersion; - u_int16_t MaximumServiceConnections __attribute__((packed)); - u_int16_t ConnectionsInUse __attribute__((packed)); - u_int16_t NumberMountedVolumes __attribute__((packed)); -- u_int8_t Revision __attribute__((packed)); -- u_int8_t SFTLevel __attribute__((packed)); -- u_int8_t TTSLevel __attribute__((packed)); -+ u_int8_t Revision; -+ u_int8_t SFTLevel; -+ u_int8_t TTSLevel; - u_int16_t MaxConnectionsEverUsed __attribute__((packed)); -- u_int8_t AccountVersion __attribute__((packed)); -- u_int8_t VAPVersion __attribute__((packed)); -- u_int8_t QueueVersion __attribute__((packed)); -- u_int8_t PrintVersion __attribute__((packed)); -- u_int8_t VirtualConsoleVersion __attribute__((packed)); -- u_int8_t RestrictionLevel __attribute__((packed)); -- u_int8_t InternetBridge __attribute__((packed)); -- u_int8_t Reserved[60] __attribute__((packed)); -+ u_int8_t AccountVersion; -+ u_int8_t VAPVersion; -+ u_int8_t QueueVersion; -+ u_int8_t PrintVersion; -+ u_int8_t VirtualConsoleVersion; -+ u_int8_t RestrictionLevel; -+ u_int8_t InternetBridge; -+ u_int8_t Reserved[60]; - } __attribute__((packed)); - #endif - -@@ -607,7 +607,7 @@ struct ncp_station_addr - #ifdef SWIG - fixedArray Node[6]; - #else -- u_int8_t Node[6] __attribute__((packed)); -+ u_int8_t Node[6]; - #endif - u_int16_t Socket __attribute__((packed)); - } __attribute__((packed)); -@@ -617,32 +617,32 @@ struct ncp_prop_login_control - #ifdef SWIG - fixedArray AccountExpireDate[3]; - #else -- u_int8_t AccountExpireDate[3] __attribute__((packed)); -+ u_int8_t AccountExpireDate[3]; - #endif -- u_int8_t Disabled __attribute__((packed)); -+ u_int8_t Disabled; - #ifdef SWIG - fixedArray PasswordExpireDate[3]; - #else -- u_int8_t PasswordExpireDate[3] __attribute__((packed)); -+ u_int8_t PasswordExpireDate[3]; - #endif -- u_int8_t GraceLogins __attribute__((packed)); -+ u_int8_t GraceLogins; - u_int16_t PasswordExpireInterval __attribute__((packed)); -- u_int8_t MaxGraceLogins __attribute__((packed)); -- u_int8_t MinPasswordLength __attribute__((packed)); -+ u_int8_t MaxGraceLogins; -+ u_int8_t MinPasswordLength; - u_int16_t MaxConnections __attribute__((packed)); - #ifdef SWIG - fixedArray ConnectionTimeMask[42] __attribute__((packed)); - fixedArray LastLogin[6] __attribute__((packed)); - #else -- u_int8_t ConnectionTimeMask[42] __attribute__((packed)); -- u_int8_t LastLogin[6] __attribute__((packed)); -+ u_int8_t ConnectionTimeMask[42]; -+ u_int8_t LastLogin[6]; - #endif -- u_int8_t RestrictionMask __attribute__((packed)); -- u_int8_t reserved __attribute__((packed)); -+ u_int8_t RestrictionMask; -+ u_int8_t reserved; - u_int32_t MaxDiskUsage __attribute__((packed)); - u_int16_t BadLoginCount __attribute__((packed)); - u_int32_t BadLoginCountDown __attribute__((packed)); -- struct ncp_station_addr LastIntruder __attribute__((packed)); -+ struct ncp_station_addr LastIntruder; - } __attribute__((packed)); - - NWCCODE NWReadPropertyValue(NWCONN_HANDLE conn, const char *objName, -diff -r 329b32c7d8a6 -r 7783da47228e ipx-1.0/ipx_cmd.c ---- a/ipx-1.0/ipx_cmd.c Thu Apr 13 19:59:28 2006 +0200 -+++ b/ipx-1.0/ipx_cmd.c Thu Apr 13 22:53:06 2006 +0200 -@@ -63,10 +63,10 @@ - /* we are doing EthernetII... Any objections? */ - struct { - u_int16_t unknown __attribute__((packed)); -- u_int8_t dst[6] __attribute__((packed)); -- u_int8_t src[6] __attribute__((packed)); -+ u_int8_t dst[6]; -+ u_int8_t src[6]; - u_int16_t type __attribute__((packed)); -- u_int8_t ipx[16384] __attribute__((packed)); -+ u_int8_t ipx[16384]; - } __attribute__((packed)) buffer; - - static int getiflist(int fd, struct ifconf* ifc) { -diff -r 329b32c7d8a6 -r 7783da47228e lib/ncplib.c ---- a/lib/ncplib.c Thu Apr 13 19:59:28 2006 +0200 -+++ b/lib/ncplib.c Thu Apr 13 22:53:06 2006 +0200 -@@ -2627,13 +2627,13 @@ ncp_request(struct ncp_conn *conn, int f - - struct nw_time_buffer - { -- u_int8_t year __attribute__((packed)); -- u_int8_t month __attribute__((packed)); -- u_int8_t day __attribute__((packed)); -- u_int8_t hour __attribute__((packed)); -- u_int8_t minute __attribute__((packed)); -- u_int8_t second __attribute__((packed)); -- u_int8_t wday __attribute__((packed)); -+ u_int8_t year; -+ u_int8_t month; -+ u_int8_t day; -+ u_int8_t hour; -+ u_int8_t minute; -+ u_int8_t second; -+ u_int8_t wday; - } __attribute__((packed)); - - static time_t - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-455.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-455.patch deleted file mode 100644 index b7c84c8..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-455.patch +++ /dev/null @@ -1,72 +0,0 @@ -changeset: 455:69f23e25cc66 -user: Petr Vandrovec -date: Sat Apr 15 04:25:06 2006 +0200 -files: lib/ds/filter.c lib/nwnet.c util/nwdir.c -description: -Fix some more gcc-4.1 warnings - -gcc-4.1 is even more stupid than gcc-4.0 was when it comes to uninitialized -variables - if function either returns an error, or returns success and -modifies its argument, you can be almost 100% sure that gcc-4.1 will tag -this with warning if you call some other function between this one, before -you'll test function's return value. Just crap, probably it is time to -disable all warnings, as they are more than useless. - - -diff -r 7783da47228e -r 69f23e25cc66 lib/ds/filter.c ---- a/lib/ds/filter.c Thu Apr 13 22:53:06 2006 +0200 -+++ b/lib/ds/filter.c Sat Apr 15 04:25:06 2006 +0200 -@@ -303,7 +303,7 @@ static void _PutFilterFirstPass( - } else { - /* different operand: go to next node in created - chain */ -- last_q = (struct _filter_node**)&q->value; -+ last_q = (struct _filter_node**)(void*)&q->value; - q = q->value; - } - } -diff -r 7783da47228e -r 69f23e25cc66 lib/nwnet.c ---- a/lib/nwnet.c Thu Apr 13 22:53:06 2006 +0200 -+++ b/lib/nwnet.c Sat Apr 15 04:25:06 2006 +0200 -@@ -1696,7 +1696,7 @@ restartLoop:; - NWCONN_HANDLE conn = list_entry(current, struct ncp_conn, nds_ring); - NWObjectCount connaddresses; - nuint8* conndata; -- NWCCODE err2; -+ NWDSCCODE err2; - /* compare addresses */ - - ncpt_mutex_unlock(&nds_ring_lock); -@@ -2808,6 +2808,8 @@ static NWDSCCODE NWDSGetAttrVal_OBJECT_A - if (err) - return err; - err = NWDSBufGetLE32(buffer, &priv); -+ if (err) -+ return err; - oacl->privileges = priv; - return err; - } -@@ -4149,6 +4151,8 @@ NWDSCCODE NWDSGetServerName(NWDSContextH - if (err) - return err; - err = NWDSBufGetLE32(buffer, &le32); -+ if (err) -+ return err; - if (partcount) - *partcount = le32; - return 0; -diff -r 7783da47228e -r 69f23e25cc66 util/nwdir.c ---- a/util/nwdir.c Thu Apr 13 22:53:06 2006 +0200 -+++ b/util/nwdir.c Sat Apr 15 04:25:06 2006 +0200 -@@ -521,7 +521,9 @@ static void dumpit(NWCONN_HANDLE conn, c - - err = NWNSGetEffectiveRights(conn, - dir.volNumber, dir.DosDirNum, &eff); -- eff32 = eff; -+ if (!err) { -+ eff32 = eff; -+ } - } - printf(_(" Effective: ")); - if (err) { - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-456.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-456.patch deleted file mode 100644 index 36e7b87..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-456.patch +++ /dev/null @@ -1,135 +0,0 @@ -changeset: 456:260a30abdb81 -user: Petr Vandrovec -date: Sat Apr 15 04:41:06 2006 +0200 -files: contrib/ncp_nss_lib/nss_cfgfile.c contrib/ncp_nss_lib/nss_cfgfile.h -description: -Fix nss_ncp strict aliasing problems - -It is bad idea to convert pointer to integer to pointer to char pointer, -and in addition this is also unnecessary. And removal of this typecast -revealed that we believe that 'int' and 'gid_t' and 'uid_t' have same -width. This is unreasonable assumption, I personally remember time -when uid_t was 16bit, while int was 32bit... - - -diff -r 69f23e25cc66 -r 260a30abdb81 contrib/ncp_nss_lib/nss_cfgfile.c ---- a/contrib/ncp_nss_lib/nss_cfgfile.c Sat Apr 15 04:25:06 2006 +0200 -+++ b/contrib/ncp_nss_lib/nss_cfgfile.c Sat Apr 15 04:41:06 2006 +0200 -@@ -108,9 +108,9 @@ struct check { - const char *option; /* configuration option */ - int mandatory; /* can be empty or null */ - int found; /*set to TRUE if found in cfg file */ -- char ** value_ptr; /* temporary storage place */ -- int isNum; /* 1 is numeric, 0 is string*/ -- const char* defValue; -+ char ** char_ptr; /* where to store string value */ -+ int * int_ptr; /* where to store integer value */ -+ const char* defValue; /* default value */ - }; - - -@@ -119,12 +119,12 @@ void printResults (const char * infos,st - struct check* ptr; - printf ("%s\n",infos); - for (ptr=results; ptr->option; ptr++) { -- if (ptr->isNum) -- printf ("option=%s mandatory=%d found=%d value=%d isNum=%d defvalue=%s\n", -- ptr->option,ptr->mandatory,ptr->found,*(int**)ptr->value_ptr,ptr->isNum,ptr->defValue); -+ if (ptr->int_ptr) -+ printf ("option=%s mandatory=%d found=%d value=%d defvalue=%s\n", -+ ptr->option,ptr->mandatory,ptr->found,*ptr->int_ptr,ptr->defValue); - else -- printf ("option=%s mandatory=%d found=%d value=%s isNum=%d defvalue=%s\n", -- ptr->option,ptr->mandatory,ptr->found,*ptr->value_ptr,ptr->isNum,ptr->defValue); -+ printf ("option=%s mandatory=%d found=%d value=%s defvalue=%s\n", -+ ptr->option,ptr->mandatory,ptr->found,*ptr->char_ptr,ptr->defValue); - } - - } -@@ -175,14 +175,14 @@ static int process_line (char* cptr, str - eptr++; - } - *eptr = 0; -- if (ptr->isNum) { -- *(int*)ptr->value_ptr=strtoul (sptr,&errPtr,0); -+ if (ptr->int_ptr) { -+ *ptr->int_ptr=strtoul (sptr,&errPtr,0); - ptr->found= ((*sptr) && !(*errPtr)); //not empty and no error - } else { - if (eptr>sptr) { // do not take an empty string value - char *v=strdup(sptr); - if (v) { -- *ptr->value_ptr=v; -+ *ptr->char_ptr=v; - ptr->found= TRUE; - }else - return 1; -@@ -201,12 +201,12 @@ static int fix_conf (struct check *resul - traceForce(0,LOG_ERR, "ncp_nss aborting :missing mandatory information '%s=' in config file %s ",ptr->option,GLOBALCFGFILE); - return 1; - } -- if (ptr->isNum) { -- *(int*)ptr->value_ptr=strtoul (ptr->defValue,NULL,0); -+ if (ptr->int_ptr) { -+ *ptr->int_ptr=strtoul (ptr->defValue,NULL,0); - }else { - char * v=strdup(ptr->defValue); - if (v) -- *ptr->value_ptr=v; -+ *ptr->char_ptr=v; - else - return 1; - } -@@ -225,20 +225,20 @@ static struct nss_ncp_conf *read_conf_fi - return NULL; - { - struct check check_confs[] = { -- /*option mandat found value_ptr isNum defValue */ -- {"debug", FALSE,FALSE,(char**)&conf->debug, TRUE, "0"}, -- {"useTree", FALSE,FALSE,(char**)&conf->useTree, TRUE, "0"}, -- {"server", TRUE, FALSE, &conf->server, FALSE, ""}, -- {"startCtx", FALSE,FALSE, &conf->startCtx, FALSE, ""}, -- {"ctrlGroup", FALSE,FALSE, &conf->ctrlGroup, FALSE, ""}, -- {"defGid", FALSE,FALSE,(char**)&conf->defGid, TRUE, "100"}, -- {"defShell", FALSE,FALSE, &conf->defShell, FALSE, "/bin/bash"}, -- {"fallbackUid", FALSE,FALSE,(char**)&conf->fallbackUid, TRUE, "-1"}, -- {"fallbackGid", FALSE,FALSE,(char**)&conf->fallbackGid, TRUE, "-1"}, -- {"doPasswd", FALSE,FALSE,(char**)&conf->doPassword, TRUE, "0"}, -- {"doGroup", FALSE,FALSE,(char**)&conf->doGroup, TRUE, "0"}, -- {"doShadow", FALSE,FALSE,(char**)&conf->doShadow, TRUE, "0"}, -- {NULL , FALSE,FALSE, NULL, FALSE, NULL} -+ /*option mandat found char_ptr int_ptr defValue */ -+ {"debug", FALSE,FALSE, NULL, &conf->debug, "0"}, -+ {"useTree", FALSE,FALSE, NULL, &conf->useTree, "0"}, -+ {"server", TRUE, FALSE, &conf->server, NULL, ""}, -+ {"startCtx", FALSE,FALSE, &conf->startCtx, NULL, ""}, -+ {"ctrlGroup", FALSE,FALSE, &conf->ctrlGroup, NULL, ""}, -+ {"defGid", FALSE,FALSE, NULL, &conf->defGid, "100"}, -+ {"defShell", FALSE,FALSE, &conf->defShell, NULL, "/bin/bash"}, -+ {"fallbackUid", FALSE,FALSE, NULL, &conf->fallbackUid, "-1"}, -+ {"fallbackGid", FALSE,FALSE, NULL, &conf->fallbackGid, "-1"}, -+ {"doPasswd", FALSE,FALSE, NULL, &conf->doPassword, "0"}, -+ {"doGroup", FALSE,FALSE, NULL, &conf->doGroup, "0"}, -+ {"doShadow", FALSE,FALSE, NULL, &conf->doShadow, "0"}, -+ {NULL , FALSE,FALSE, NULL, NULL, NULL} - }; - - char cfgline[16384]; -diff -r 69f23e25cc66 -r 260a30abdb81 contrib/ncp_nss_lib/nss_cfgfile.h ---- a/contrib/ncp_nss_lib/nss_cfgfile.h Sat Apr 15 04:25:06 2006 +0200 -+++ b/contrib/ncp_nss_lib/nss_cfgfile.h Sat Apr 15 04:41:06 2006 +0200 -@@ -11,10 +11,10 @@ struct nss_ncp_conf { - char * server; // name of server or tree - char * startCtx; // start searching is this context (and below) - char * ctrlGroup; // limit search to members of this NDS group for passwd and shadow -- gid_t defGid; // if no primary group found in NDS use this value -+ int defGid; // if no primary group found in NDS use this value - char * defShell; // if no shell found in NDS use this value -- uid_t fallbackUid; // if no UID found in NDS use this one (-1= skip user, NFS_NOBODY= use this UID) -- gid_t fallbackGid; // if no GID found in NDS use this one (-1= skip group, NFS_NOBODY= use this GID) -+ int fallbackUid; // if no UID found in NDS use this one (-1= skip user, NFS_NOBODY= use this UID) -+ int fallbackGid; // if no GID found in NDS use this one (-1= skip group, NFS_NOBODY= use this GID) - int doPassword; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf - int doGroup; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf - int doShadow; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-457.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-457.patch deleted file mode 100644 index 03505c4..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-457.patch +++ /dev/null @@ -1,366 +0,0 @@ -changeset: 457:0e4dca2d0b0d -user: Petr Vandrovec -date: Sat Apr 15 05:02:48 2006 +0200 -files: contrib/ncp_nss_lib/nss_cfgfile.c -description: -Fix nss_cfgfile.c formatting - -Fix nss_cfgfile.c formatting a bit. And make some constant -arguments constant. - - -diff -r 260a30abdb81 -r 0e4dca2d0b0d contrib/ncp_nss_lib/nss_cfgfile.c ---- a/contrib/ncp_nss_lib/nss_cfgfile.c Sat Apr 15 04:41:06 2006 +0200 -+++ b/contrib/ncp_nss_lib/nss_cfgfile.c Sat Apr 15 05:02:48 2006 +0200 -@@ -50,18 +50,22 @@ - - // #define DEBUG 1 - --static struct nss_ncp_conf* alloc_nss_ncp_conf (void){ -+static struct nss_ncp_conf* -+alloc_nss_ncp_conf(void) -+{ - struct nss_ncp_conf * conf; - -- conf= (struct nss_ncp_conf *)malloc(sizeof(*conf)); -+ conf = malloc(sizeof(*conf)); - if (!conf) - return NULL; - return conf; - } - - --void free_nss_ncp_conf (struct nss_ncp_conf *conf){ --#define FREEFIELD(x) do if (conf->x) {free(conf->x) ; conf->x=NULL;} while (0); -+void -+free_nss_ncp_conf(struct nss_ncp_conf *conf) -+{ -+#define FREEFIELD(x) do if (conf->x) { free(conf->x); conf->x = NULL; } while (0); - if (conf) { - FREEFIELD(server); - FREEFIELD(startCtx); -@@ -77,12 +81,13 @@ struct cfgFile { - FILE* file; - }; - --static struct cfgFile* cfgOpenFile( -- const char* path, -- int writeRequired) { -+static struct cfgFile* -+cfgOpenFile(const char* path, -+ int writeRequired) -+{ - struct cfgFile* cfg; - -- cfg = (struct cfgFile*)malloc(sizeof(*cfg)); -+ cfg = malloc(sizeof(*cfg)); - if (cfg) { - cfg->file = fopen(path, writeRequired ? "r+" : "r"); - if (cfg->file) { -@@ -95,8 +100,9 @@ static struct cfgFile* cfgOpenFile( - return cfg; - } - --static void cfgClose( -- struct cfgFile* cfg) { -+static void -+cfgClose(struct cfgFile* cfg) -+{ - ncpt_mutex_lock(&cfg->mutex); - fclose(cfg->file); - ncpt_mutex_destroy(&cfg->mutex); -@@ -105,46 +111,52 @@ static void cfgClose( - - - struct check { -- const char *option; /* configuration option */ -- int mandatory; /* can be empty or null */ -- int found; /*set to TRUE if found in cfg file */ -- char ** char_ptr; /* where to store string value */ -- int * int_ptr; /* where to store integer value */ -- const char* defValue; /* default value */ -+ const char *option; /* configuration option */ -+ int mandatory; /* can be empty or null */ -+ int found; /* set to TRUE if found in cfg file */ -+ char **char_ptr; /* where to store string value */ -+ int *int_ptr; /* where to store integer value */ -+ const char *defValue; /* default value */ - }; - - - #ifdef DEBUG --void printResults (const char * infos,struct check * results) { -- struct check* ptr; -- printf ("%s\n",infos); -- for (ptr=results; ptr->option; ptr++) { -+void -+printResults(const char *infos, const struct check *results) -+{ -+ const struct check *ptr; -+ -+ printf ("%s\n", infos); -+ for (ptr = results; ptr->option; ptr++) { - if (ptr->int_ptr) - printf ("option=%s mandatory=%d found=%d value=%d defvalue=%s\n", -- ptr->option,ptr->mandatory,ptr->found,*ptr->int_ptr,ptr->defValue); -+ ptr->option, ptr->mandatory, ptr->found, *ptr->int_ptr, ptr->defValue); - else - printf ("option=%s mandatory=%d found=%d value=%s defvalue=%s\n", -- ptr->option,ptr->mandatory,ptr->found,*ptr->char_ptr,ptr->defValue); -- } -- --} -- --void printConf (const char* infos,struct nss_ncp_conf * conf) { -- printf ("%s\n",infos); -- printf ("debug=%d useTree=%d server=%s startCtx=%s ctrlGroup=%s defGid=%d defShell=%s fallbackUid=%d fallbackGid=%d " -+ ptr->option, ptr->mandatory, ptr->found, *ptr->char_ptr, ptr->defValue); -+ } -+ -+} -+ -+void -+printConf(const char *infos, const struct nss_ncp_conf *conf) -+{ -+ printf ("%s\n", infos); -+ printf ("debug=%d useTree=%d server=%s startCtx=%s ctrlGroup=%s defGid=%u defShell=%s fallbackUid=%u fallbackGid=%u " - "doPassword=%d doGroup=%d doShadow=%d\n", -- conf->debug,conf->useTree,conf->server,conf->startCtx, -- conf->ctrlGroup,conf->defGid,conf->defShell,conf->fallbackUid,conf->fallbackGid, -- conf->doPassword,conf->doGroup,conf->doShadow); --} --#endif -- -- --static int process_line (char* cptr, struct check *ptr) { -- -- char* sptr; // start of real value -- char* eptr; // end of real value -- char* errPtr; // err -+ conf->debug, conf->useTree, conf->server, conf->startCtx, -+ conf->ctrlGroup, conf->defGid, conf->defShell, conf->fallbackUid, conf->fallbackGid, -+ conf->doPassword, conf->doGroup, conf->doShadow); -+} -+#endif -+ -+ -+static int -+process_line(const char *cptr, struct check *ptr) -+{ -+ -+ const char* sptr; // start of real value -+ const char* eptr; // end of real value - - char ec; - char cc; -@@ -163,8 +175,8 @@ static int process_line (char* cptr, str - ec = *cptr++; - else - ec = 0; -- sptr=cptr; -- eptr=cptr; -+ sptr = cptr; -+ eptr = cptr; - while ((cc = *cptr++) != 0) { - if (cc == '\n') - break; -@@ -174,39 +186,43 @@ static int process_line (char* cptr, str - break; - eptr++; - } -- *eptr = 0; -- if (ptr->int_ptr) { -- *ptr->int_ptr=strtoul (sptr,&errPtr,0); -- ptr->found= ((*sptr) && !(*errPtr)); //not empty and no error -- } else { -- if (eptr>sptr) { // do not take an empty string value -- char *v=strdup(sptr); -+ if (eptr != sptr) { -+ if (ptr->int_ptr) { -+ char* errPtr; // err -+ -+ *ptr->int_ptr = strtoul(sptr, &errPtr, 0); -+ ptr->found = errPtr == eptr; -+ } else { -+ char *v = malloc(eptr - sptr + 1); - if (v) { -- *ptr->char_ptr=v; -- ptr->found= TRUE; -- }else -+ memcpy(v, sptr, eptr - sptr); -+ v[eptr - sptr] = 0; -+ *ptr->char_ptr = v; -+ ptr->found = TRUE; -+ } else - return 1; - } - } -- - return 0; - } - --static int fix_conf (struct check *results) { -+static int -+fix_conf(struct check *results) -+{ - struct check* ptr; - -- for (ptr=results; ptr->option; ptr++) { -- if (! ptr->found) { -- if (ptr->mandatory) { -- traceForce(0,LOG_ERR, "ncp_nss aborting :missing mandatory information '%s=' in config file %s ",ptr->option,GLOBALCFGFILE); -+ for (ptr = results; ptr->option; ptr++) { -+ if (!ptr->found) { -+ if (ptr->mandatory) { -+ traceForce(0, LOG_ERR, "ncp_nss aborting :missing mandatory information '%s=' in config file %s", ptr->option, GLOBALCFGFILE); - return 1; - } - if (ptr->int_ptr) { -- *ptr->int_ptr=strtoul (ptr->defValue,NULL,0); -- }else { -- char * v=strdup(ptr->defValue); -+ *ptr->int_ptr = strtoul(ptr->defValue, NULL, 0); -+ } else { -+ char *v = strdup(ptr->defValue); - if (v) -- *ptr->char_ptr=v; -+ *ptr->char_ptr = v; - else - return 1; - } -@@ -216,38 +232,38 @@ static int fix_conf (struct check *resul - } - - --static struct nss_ncp_conf *read_conf_file( const char * mySection, struct cfgFile *cfg) { -- -+static struct nss_ncp_conf * -+read_conf_file(const char * mySection, struct cfgFile *cfg) -+{ - struct nss_ncp_conf *conf; - -- conf=alloc_nss_ncp_conf (); -+ conf = alloc_nss_ncp_conf(); - if (!conf) - return NULL; - { - struct check check_confs[] = { -- /*option mandat found char_ptr int_ptr defValue */ -- {"debug", FALSE,FALSE, NULL, &conf->debug, "0"}, -- {"useTree", FALSE,FALSE, NULL, &conf->useTree, "0"}, -- {"server", TRUE, FALSE, &conf->server, NULL, ""}, -- {"startCtx", FALSE,FALSE, &conf->startCtx, NULL, ""}, -- {"ctrlGroup", FALSE,FALSE, &conf->ctrlGroup, NULL, ""}, -- {"defGid", FALSE,FALSE, NULL, &conf->defGid, "100"}, -- {"defShell", FALSE,FALSE, &conf->defShell, NULL, "/bin/bash"}, -- {"fallbackUid", FALSE,FALSE, NULL, &conf->fallbackUid, "-1"}, -- {"fallbackGid", FALSE,FALSE, NULL, &conf->fallbackGid, "-1"}, -- {"doPasswd", FALSE,FALSE, NULL, &conf->doPassword, "0"}, -- {"doGroup", FALSE,FALSE, NULL, &conf->doGroup, "0"}, -- {"doShadow", FALSE,FALSE, NULL, &conf->doShadow, "0"}, -- {NULL , FALSE,FALSE, NULL, NULL, NULL} -+ /*option mandati found char_ptr int_ptr defValue */ -+ {"debug", FALSE, FALSE, NULL, &conf->debug, "0"}, -+ {"useTree", FALSE, FALSE, NULL, &conf->useTree, "0"}, -+ {"server", TRUE, FALSE, &conf->server, NULL, ""}, -+ {"startCtx", FALSE, FALSE, &conf->startCtx, NULL, ""}, -+ {"ctrlGroup", FALSE, FALSE, &conf->ctrlGroup, NULL, ""}, -+ {"defGid", FALSE, FALSE, NULL, &conf->defGid, "100"}, -+ {"defShell", FALSE, FALSE, &conf->defShell, NULL, "/bin/bash"}, -+ {"fallbackUid", FALSE, FALSE, NULL, &conf->fallbackUid, "-1"}, -+ {"fallbackGid", FALSE, FALSE, NULL, &conf->fallbackGid, "-1"}, -+ {"doPasswd", FALSE, FALSE, NULL, &conf->doPassword, "0"}, -+ {"doGroup", FALSE, FALSE, NULL, &conf->doGroup, "0"}, -+ {"doShadow", FALSE, FALSE, NULL, &conf->doShadow, "0"}, -+ {NULL, FALSE, FALSE, NULL, NULL, NULL} - }; - - char cfgline[16384]; - size_t seclen = strlen(mySection); - -- - #ifdef DEBUG - // DO NOT DO IT A a second call (using test_ncp_nss -2) coredump !!! --// printResults("before reading CFG",check_confs); -+// printResults("before reading CFG", check_confs); - #endif - ncpt_mutex_lock(&cfg->mutex); - //rewind(cfg->file); -@@ -270,13 +286,13 @@ static struct nss_ncp_conf *read_conf_fi - cptr++; - if (!*cptr) - continue; //empty line -- if (*cptr == '[') // start of another section -+ if (*cptr == '[') // start of another section - goto ssend; -- for (ptr=check_confs; ptr->option; ptr++) { -- size_t keylen=strlen(ptr->option); -- if (!strncasecmp(cptr, ptr->option,keylen)) { -+ for (ptr = check_confs; ptr->option; ptr++) { -+ size_t keylen = strlen(ptr->option); -+ if (!strncasecmp(cptr, ptr->option, keylen)) { - cptr += keylen; -- process_line (cptr,ptr); -+ process_line(cptr, ptr); - } - } - } -@@ -284,22 +300,22 @@ static struct nss_ncp_conf *read_conf_fi - - ssend: - #ifdef DEBUG -- printResults("after reading CFG no error",check_confs); --#endif --#ifdef DEBUG -- printConf("before fixing ",conf); --#endif -- -- if (!fix_conf (check_confs)) { // fill in missing values with default, --#ifdef DEBUG -- printConf("after fixing ",conf); -+ printResults("after reading CFG no error", check_confs); -+#endif -+#ifdef DEBUG -+ printConf("before fixing ", conf); -+#endif -+ -+ if (!fix_conf (check_confs)) { // fill in missing values with default, -+#ifdef DEBUG -+ printConf("after fixing ", conf); - #endif - ncpt_mutex_unlock(&cfg->mutex); - return conf; - } - - #ifdef DEBUG -- printResults("after reading CFG error",check_confs); -+ printResults("after reading CFG error", check_confs); - #endif - ncpt_mutex_unlock(&cfg->mutex); - free_nss_ncp_conf(conf); -@@ -308,7 +324,9 @@ ssend: - - } - --struct nss_ncp_conf* parse_conf(void) { -+struct nss_ncp_conf* -+parse_conf(void) -+{ - struct cfgFile *cfg; - struct nss_ncp_conf *conf; - #ifdef DEBUG -@@ -317,11 +335,11 @@ struct nss_ncp_conf* parse_conf(void) { - cfg = cfgOpenFile(GLOBALCFGFILE, FALSE); - if (!cfg) - return NULL; -- conf=read_conf_file(NSS_SECTION,cfg); -+ conf = read_conf_file(NSS_SECTION, cfg); - cfgClose(cfg); - #ifdef DEBUG - if (conf) -- printConf("final value ",conf); -+ printConf("final value ", conf); - #endif - - return conf; - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-458.patch b/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-458.patch deleted file mode 100644 index fbff075..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs-hg-commit-458.patch +++ /dev/null @@ -1,230 +0,0 @@ -changeset: 458:92f2133262a8 -parent: 455:69f23e25cc66 -user: Rodrigo Rubira Branco -date: Wed Jun 21 23:24:15 2006 +0200 -files: man/Makefile.in man/ncplogin.8 man/ncpmap.8 -description: -Add ncpmap and ncplogin manpages - -Provide manpages for ncpmap and ncplogin. - - -diff -r 69f23e25cc66 -r 92f2133262a8 man/Makefile.in ---- a/man/Makefile.in Sat Apr 15 04:25:06 2006 +0200 -+++ b/man/Makefile.in Wed Jun 21 23:24:15 2006 +0200 -@@ -24,7 +24,7 @@ MAN8 := nwbocreate.8 nwborm.8 nwbpadd.8 - nwgrant.8 nwrevoke.8 - ifeq ($(USE_KERNEL),1) - MAN1 += ncopy.1 --MAN8 += ncpmount.8 ncpumount.8 -+MAN8 += ncpmount.8 ncpumount.8 ncplogin.8 ncpmap.8 - endif - MAN8 += nwmsg.8 - -diff -r 69f23e25cc66 -r 92f2133262a8 man/ncplogin.8 ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/man/ncplogin.8 Wed Jun 21 23:24:15 2006 +0200 -@@ -0,0 +1,104 @@ -+.\" Copyright (c) International Business Machines Corp., 2006 -+.\" -+.\" This file is distributed in the hope that it will be useful, -+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of -+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See -+.\" the GNU General Public License for more details. -+.\" -+.\" You should have received a copy of the GNU General Public License -+.\" along with this file; if not, write to the Free Software -+.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+.\" MA 02111-1307 USA -+.\" -+.\" HISTORY: -+.\" 2006-06-01, created by Rodrigo Rubira Branco -+.TH ncplogin 8 "Jun, 01 2006" "NCPFS" "NCPFS" -+.SH NAME -+ncplogin \- establishes identity to the Netware server or tree -+.SH SYNOPSIS -+.nf -+.fam C -+\fBncplogin [OPTIONS]\fP -+.fam T -+.fi -+.SH DESCRIPTION -+\fBncplogin\fP and \fBncpmap\fP provide a way for you to split the ncpmount operation into halves, with \fBncplogin\fP establishing your identity to the server or tree. \fBncpmap\fP mounts it later. -+.SH OPTIONS -+.B -T tree -+Tree name to be used. -+ -+.B -S server -+Server name to be used. The -S and -T options are mutually exclusive. -+ -+\fB-X name_ctx\fP -+Default name context to be used. -+ -+\fB-E\fP -+Echoes the value of final mount_point. -+ -+\fB-U username\fP -+Username sent to server. -+ -+\fB-u uid\fP -+Uid given the mounted files. -+ -+\fB-g gid\fP -+Gid given the mounted files. -+ -+\fB-c uid\fP -+Uid to identify the connection on which to mount. Only appropriate for root. -+ -+\fB-C\fP -+Do not convert password to uppercase. -+ -+\fB-P password\fP -+Use this password. -+ -+\fB-n\fP -+Do not use any password. -+If neither -P nor -n is given, you are asked for a password. -+ -+\fB-f mode\fP -+Permission given the files, in octal notation. -+ -+\fB-d mode\fP -+Permission given the directories, in octal notation. -+ -+\fB-t time_out\fP -+Time, in 1/100s of a second, to wait for an answer from the server. Default is 60. -+ -+\fB-r retry_count\fP -+Number of retry attempts. Default is 5. -+ -+\fB-s\fP -+Enable renaming and deletion of read-only files. -+ -+\fB-h\fP -+Print the help text. -+ -+\fB-v\fP -+Print ncpfs version number. -+ -+\fB-i level\fP -+Signature level. 0 = never, 1 = supported, 2 = preferred, 3 = required. -+ -+\fB-N os2,nfs\fP -+Do not use the specified namespaces on mounted volume. -+ -+\fB-y charset\fP -+Character set used for input and display. -+ -+\fB-p codepage\fP -+Codepage used on volume, including letters "cp." -+ -+\fB-B bcast\fP -+Broadcast mode. 0 = all 1 = console 2 = none. Default is all. -+ -+\fB-l\fP -+Autocreate mounting point if needed in /mnt/ncp/SERVER/VOLUME. -+.SH SECURITY -+\fBncplogin\fP must be setuid to permit non-root users use of it. In these cases, mounting ncpfs will enforce nodev and nosetuid mount options. -+.SH SEE ALSO -+\fBncpmap\fP(1), \fBncpmount\fP(8) -+.SH AUTHOR -+Manpage written by Rodrigo Rubira Branco with help from Petr Vandrovec . -diff -r 69f23e25cc66 -r 92f2133262a8 man/ncpmap.8 ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/man/ncpmap.8 Wed Jun 21 23:24:15 2006 +0200 -@@ -0,0 +1,94 @@ -+.\" Copyright (c) International Business Machines Corp., 2006 -+.\" -+.\" This file is distributed in the hope that it will be useful, -+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of -+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See -+.\" the GNU General Public License for more details. -+.\" -+.\" You should have received a copy of the GNU General Public License -+.\" along with this file; if not, write to the Free Software -+.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+.\" MA 02111-1307 USA -+.\" -+.\" HISTORY: -+.\" 2006-06-01, created by Rodrigo Rubira Branco -+.TH ncpmap 8 "Jun, 01 2006" "NCPFS" "NCPFS" -+.SH NAME -+ncpmap \- mounts some resource from Netware server or tree previously connected with ncplogin -+.SH SYNOPSIS -+.nf -+.fam C -+\fBncpmap [OPTIONS] [-a] [mount-point]\fP -+.fam T -+.fi -+.SH DESCRIPTION -+\fBncplogin\fP and \fBncpmap\fP provide a way to split the ncpmount operation into halves, with \fBncpmap\fP mounting the resource previously authenticated with \fBncplogin\fP. -+.SH OPTIONS -+\fBmount_point\fP is optional if you specify the -a option. -+ -+\fB-T tree\fP -+Tree name to be used. -+ -+\fB-S server\fP -+Server name to be used. The -T and -S options are mutually exclusive. -+ -+\fB-X name_ctx\fP -+Default name context to be used. -+ -+\fB-E\fP -+Echo value of final mount_point. -+ -+\fB-V volume\fP -+Volume to mount. This must be in binary format if -S server, or in NDS format if -T tree. -+ -+\fB-R path\fP -+Path in volume to "map root." -+ -+\fB-f mode\fP -+Permission given the files, in octal notation. -+ -+\fB-d mode\fP -+Permission given the directories, in octal notation. -+ -+\fB-t time_out\fP -+Waiting time, in 1/100s of a second, to wait for an answer from the server. Default is 60. -+ -+\fB-r retry_count\fP -+Number of retry attempts. Default is 5. -+ -+\fB-s\fP -+Enable renaming or deletion of read-only files. -+ -+\fB-h\fP -+Print help text. -+ -+\fB-v\fP -+Print ncpfs version number. -+ -+\fB-i level\fP -+Signature level. 0 = never, 1 = supported, 2 = preferred, and 3 = required. -+ -+\fB-N os2,nfs\fP -+Do not use specified namespaces on mounted volume. -+ -+\fB-y charset\fP -+Character set used for input and display. -+ -+\fB-p codepage\fP -+Codepage used on volume, including letters "cp." -+ -+\fB-B bcast\fP -+Broadcast mode. 0 = all, 1 = console, and 2 = none. Default is all. -+ -+\fB-a\fP -+Autocreate mounting point if needed in ~/ncp/SERVER/VOLUME. -+ -+\fB-l\fP -+Autocreate mounting point if needed in /mnt/ncp/SERVER/VOLUME. -+ -+.SH SECURITY -+\fBncpmap\fP must be setuid to permit non-root users use of it. In these cases, it will enforce nodev and nosetuid mount options. -+.SH SEE ALSO -+\fBncplogin\fP(1), \fBncpmount\fP(8) -+.SH AUTHOR -+Manpage written by Rodrigo Rubira Branco with Petr Vandrovec . - diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs.LDFLAGS.patch b/.patches/ncpfs-2.2.6-r6/ncpfs.LDFLAGS.patch deleted file mode 100644 index 45c9caf..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs.LDFLAGS.patch +++ /dev/null @@ -1,80 +0,0 @@ - lib/Makefile.in | 5 +++-- - sutil/Makefile.in | 11 +++++++---- - 2 files changed, 10 insertions(+), 6 deletions(-) - ---- ncpfs-2.2.6.orig/lib/Makefile.in -+++ ncpfs-2.2.6/lib/Makefile.in -@@ -21,6 +21,7 @@ STATIC_NCPLIB := libncp.$(libext) - STATIC_NCPLIB_BIN := $(STATIC_NCPLIB) - - CCFLAGS += -I. -+PIE_FLAGS := -fpie - PIC_FLAGS := -fPIC - NWCOMPAT := 1 - -@@ -57,7 +58,7 @@ NDS_CFLAGS := $(BASE_CFLAGS) -DPORTABLE - CFLAGS_ncplib.o := -DNWSFIND=\"$(bindir)/nwsfind\" - CFLAGS_cfgfile.o := -DGLOBALCFGFILE=\"$(sysconfdir)/ncpfs.conf\" - --STATIC_CFLAGS := $(CFLAGS) $(CCFLAGS) $(REENTRANT_CFLAGS) @FFUNCTION_SECTIONS@ -+STATIC_CFLAGS := $(CFLAGS) $(CCFLAGS) $(REENTRANT_CFLAGS) $(PIE_FLAGS) @FFUNCTION_SECTIONS@ - SHARED_CFLAGS := $(CFLAGS) $(CCFLAGS) $(REENTRANT_CFLAGS) $(PIC_FLAGS) $(SHARED_VLINK_CFLAGS) - - .PHONY : all dep install install-dev clean mrproper distclean -@@ -127,7 +128,7 @@ $(SHARED_NCPLIB): $(SHARED_NCPLIB_BIN) - ln -sf $< $@ - - $(SHARED_NCPLIB_BIN): $(SHARED_O_OBJ) ${this_srcdir}/libncp.vers -- $(CC) -shared -o $@ -Wl,-soname=$(SHARED_NCPLIB_SONAME) $(SHARED_VLINK) $(SHARED_O_OBJ) ${LIBS} -lc -+ $(CC) -shared -o $@ -Wl,-soname=$(SHARED_NCPLIB_SONAME) $(SHARED_VLINK) $(SHARED_O_OBJ) ${LIBS} - - install_static: $(STATIC_NCPLIB_BIN) - $(INSTALL) -d $(DESTDIR)$(libadir) ---- ncpfs-2.2.6.orig/sutil/Makefile.in -+++ ncpfs-2.2.6/sutil/Makefile.in -@@ -18,6 +18,9 @@ LIBS = @INTLLIBS@ @LIBICONV@ @LIBS@ - # environ in ncpmount - CCFLAGS += -D_GNU_SOURCE - -+PIE_CFLAGS = -fpie -+PIE_LDFLAGS = -pie -+ - O_UTILS := nwsfind.o - ifeq ($(USE_KERNEL),1) - O_UTILS += ncpmount.o ncpumount.o -@@ -58,7 +61,7 @@ endif - install-dev: - - $(O_UTILS): %.o: %.c -- $(CC) $(CFLAGS) $(CCFLAGS) $(CFLAGS_$@) -o $@ -c $< -+ $(CC) $(CFLAGS) $(CCFLAGS) $(CFLAGS_$@) $(PIE_CFLAGS) -o $@ -c $< - - $(O_UTILS:.o=.d): %.d: %.c - set -e; $(CC) -M $(CFLAGS) $(CCFLAGS) $(CFLAGS_$(@:.d=.o)) $< \ -@@ -70,7 +73,7 @@ ncplogin: ncpm_common.o mount_login.o - ncpmap: ncpm_common.o - - ncpmap.o: %.o: ncplogin.c -- $(CC) $(CFLAGS) $(CCFLAGS) $(CFLAGS_$@) -o $@ -c $< -+ $(CC) $(CFLAGS) $(CCFLAGS) $(CFLAGS_$@) $(PIE_CFLAGS) -o $@ -c $< - - ncpmap.d: %.d: ncplogin.c - set -e; $(CC) -M $(CFLAGS) $(CCFLAGS) $(CFLAGS_$(@:.d=.o)) $< \ -@@ -78,7 +81,7 @@ ncpmap.d: %.d: ncplogin.c - [ -s $@ ] || rm -f $@ - - ncpm_common.o mount_login.o: %.o: %.c -- $(CC) $(CFLAGS) $(CCFLAGS) $(CFLAGS_$@) -o $@ -c $< -+ $(CC) $(CFLAGS) $(CCFLAGS) $(CFLAGS_$@) $(PIE_CFLAGS) -o $@ -c $< - - ncpm_common.d mount_login.d: %.d: %.c - set -e; $(CC) -M $(CFLAGS) $(CCFLAGS) $(CFLAGS_$(@:.d=.o)) $< \ -@@ -86,7 +89,7 @@ ncpm_common.d mount_login.d: %.d: %.c - [ -s $@ ] || rm -f $@ - - $(UTILS): %: %.o ../lib/libncp.$(libext) -- $(CC) @GC_SECTIONS@-o $@ $^ ${LIBS} -+ $(CC) @GC_SECTIONS@-o $@ $^ $(PIE_LDFLAGS) ${LIBS} - - ../lib/libncp.$(libext): - make -C ../lib libncp.$(libext) diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs.mount_hang.patch b/.patches/ncpfs-2.2.6-r6/ncpfs.mount_hang.patch deleted file mode 100644 index c346ab1..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs.mount_hang.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -ru ncpfs-2.2.6.orig/lib/ncplib.c ncpfs-2.2.6/lib/ncplib.c ---- ncpfs-2.2.6.orig/lib/ncplib.c 2005-01-27 10:35:59.000000000 -0700 -+++ ncpfs-2.2.6/lib/ncplib.c 2009-10-19 14:27:14.019898870 -0600 -@@ -188,7 +188,7 @@ - #define NCP_MAX_BUFSIZE 1024 - - #ifdef SIGNATURES --int in_options = 2; -+int in_options = 1; /* signatures supported - sign packets if NCP server requests it */ - #else - int in_options = 0; - #endif -@@ -1255,7 +1255,6 @@ - static NWCCODE ncp_finish_connect(struct ncp_conn *conn) { - NWCCODE err; - -- conn->sequence = 0; - conn->i.connection = get_conn_from_reply(conn->ncp_reply); - conn->is_connected = CONN_TEMPORARY; - -@@ -1321,7 +1320,7 @@ - conn->ncp_sock = ncp_sock; - conn->wdog_sock = wdog_sock; - -- conn->sequence = 0; -+ conn->sequence = 255; - conn->addr.ipx = *target; - conn->nt = NT_IPX; - -@@ -1400,7 +1399,7 @@ - conn->ncp_sock = ncp_sock; - conn->wdog_sock = -1; - -- conn->sequence = 0; -+ conn->sequence = 255; - memcpy(&conn->addr, target, sizeof(*target)); - - conn->nt = NT_UDP; -@@ -1459,7 +1458,7 @@ - conn->ncp_sock = ncp_sock; - conn->wdog_sock = -1; - -- conn->sequence = 0; -+ conn->sequence = 255; - memcpy(&conn->addr, target, sizeof(*target)); - - conn->nt = NT_TCP; -@@ -1578,7 +1577,7 @@ - conn->ncp_sock = ncp_sock; - conn->wdog_sock = -1; - -- conn->sequence = 0; -+ conn->sequence = 255; - memset(&conn->addr, 0, sizeof(conn->addr)); - - #if 0 diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs.offsetof.patch b/.patches/ncpfs-2.2.6-r6/ncpfs.offsetof.patch deleted file mode 100644 index 7a83f64..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs.offsetof.patch +++ /dev/null @@ -1,17 +0,0 @@ -linux/stddef.h was included by accident. use private offsetof macro - ---- - sutil/ncpm_common.h | 1 + - 1 file changed, 1 insertion(+) - -Index: ncpfs-2.2.6/sutil/ncpm_common.h -=================================================================== ---- ncpfs-2.2.6.orig/sutil/ncpm_common.h -+++ ncpfs-2.2.6/sutil/ncpm_common.h -@@ -122,5 +122,6 @@ int proc_aftermount(const struct ncp_mou - int proc_ncpm_umount(const char* dir); - - #define UNUSED(x) x __attribute__((unused)) -+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) - - #endif /* __NCPM_COMMON_H__ */ diff --git a/.patches/ncpfs-2.2.6-r6/ncpfs.pam_ncp_auth.syslog.patch b/.patches/ncpfs-2.2.6-r6/ncpfs.pam_ncp_auth.syslog.patch deleted file mode 100644 index 246c269..0000000 --- a/.patches/ncpfs-2.2.6-r6/ncpfs.pam_ncp_auth.syslog.patch +++ /dev/null @@ -1,19 +0,0 @@ -pam_ncp_auth.c: In function 'nw_cleanup_conn': -pam_ncp_auth.c:284: warning: implicit declaration of function 'syslog' -pam_ncp_auth.c:284: error: 'LOG_NOTICE' undeclared (first use in this function) - - contrib/pam/pam_ncp_auth.c | 1 + - 1 files changed, 1 insertion(+) - -Index: ncpfs-2.2.6/contrib/pam/pam_ncp_auth.c -=================================================================== ---- ncpfs-2.2.6.orig/contrib/pam/pam_ncp_auth.c -+++ ncpfs-2.2.6/contrib/pam/pam_ncp_auth.c -@@ -266,6 +266,7 @@ - #include - #include - #include -+#include - - #include "support.h" -