diff options
| author | Roger A. Faulkner <Roger.Faulkner@Oracle.COM> | 2010-08-12 14:55:22 -0700 |
|---|---|---|
| committer | Roger A. Faulkner <Roger.Faulkner@Oracle.COM> | 2010-08-12 14:55:22 -0700 |
| commit | 23a1ccea6aac035f084a7a4cdc968687d1b02daf (patch) | |
| tree | 6ed5e310ce6dd96f997b0c0f9735805d513d898a /usr/src/cmd/mailx | |
| parent | 29c3196fe2acc65721d8b9b5ea708d3a87facde0 (diff) | |
| download | illumos-joyent-23a1ccea6aac035f084a7a4cdc968687d1b02daf.tar.gz | |
PSARC 2010/299 GNU/Linux/BSD compatibility functions
6960818 add get_nprocs(), getline(), strdupa(), strndup() to libc
6901783 strndup would be nice
6824404 libc should provide ffsl() & ffsll()
6793969 RFE: Add|stpcpy|to libc
6735446 Want a __progname symbol for BSD-style source compatibility
6421095 Solaris should provide strcasestr
6275498 Provide string compare functions wcscasecmp,wcsncasecmp in solaris like linux
--HG--
rename : usr/src/lib/libc/port/gen/strcasecmp.c => usr/src/lib/libc/port/gen/ascii_strcasecmp.c
rename : usr/src/lib/libc/port/gen/strncasecmp.c => usr/src/lib/libc/port/gen/ascii_strncasecmp.c
rename : usr/src/lib/libc/sparc/gen/strcasecmp.s => usr/src/lib/libc/sparc/gen/ascii_strcasecmp.s
rename : usr/src/lib/libc/sparcv9/gen/strcasecmp.s => usr/src/lib/libc/sparcv9/gen/ascii_strcasecmp.s
Diffstat (limited to 'usr/src/cmd/mailx')
| -rw-r--r-- | usr/src/cmd/mailx/collect.c | 16 | ||||
| -rw-r--r-- | usr/src/cmd/mailx/hdr/def.h | 7 | ||||
| -rw-r--r-- | usr/src/cmd/mailx/send.c | 12 |
3 files changed, 12 insertions, 23 deletions
diff --git a/usr/src/cmd/mailx/collect.c b/usr/src/cmd/mailx/collect.c index e05a586bb6..980e4f4355 100644 --- a/usr/src/cmd/mailx/collect.c +++ b/usr/src/cmd/mailx/collect.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,14 @@ * * CDDL HEADER END */ + /* - * Copyright 1998 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1985, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - /* * University Copyright- Copyright (c) 1982, 1986, 1988 * The Regents of the University of California @@ -38,8 +36,6 @@ * contributors. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * mailx -- a modified version of a University of California at Berkeley * mail program @@ -244,7 +240,7 @@ collect(struct header *hp) hdrs = 0; continue; } - if ((nread = getline(linebuf,LINESIZE,stdin,&hasnulls)) == NULL) { + if ((nread = getaline(linebuf,LINESIZE,stdin,&hasnulls)) == NULL) { if (intty && value("ignoreeof") != NOSTR) { if (++eof > 35) break; @@ -1227,7 +1223,7 @@ intack(int s) passed must be 1 larger than "size" for the trailing NUL byte. */ int -getline(char *line, int size, FILE *f, int *hasnulls) +getaline(char *line, int size, FILE *f, int *hasnulls) { register int i, ch; for (i = 0; (i < size) && ((ch=getc(f)) != EOF); ) { diff --git a/usr/src/cmd/mailx/hdr/def.h b/usr/src/cmd/mailx/hdr/def.h index 53a9fe9842..d0e48820ea 100644 --- a/usr/src/cmd/mailx/hdr/def.h +++ b/usr/src/cmd/mailx/hdr/def.h @@ -20,8 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1985, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ @@ -40,8 +39,6 @@ #ifndef _MAILX_DEF_H #define _MAILX_DEF_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -474,7 +471,7 @@ extern int from(int *msgvec); extern off_t fsize(FILE *iob); extern int getfold(char *name); extern int gethfield(register FILE *f, char linebuf[], register long rem); -extern int getline(char *line, int size, FILE *f, int *hasnulls); +extern int getaline(char *line, int size, FILE *f, int *hasnulls); extern int getmessage(char *buf, int *vector, int flags); extern int getmsglist(char *buf, int *vector, int flags); extern int getname(uid_t uid, char namebuf[]); diff --git a/usr/src/cmd/mailx/send.c b/usr/src/cmd/mailx/send.c index 6979cbe522..ca2b6a3b93 100644 --- a/usr/src/cmd/mailx/send.c +++ b/usr/src/cmd/mailx/send.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,8 +20,7 @@ */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1985, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ @@ -38,8 +36,6 @@ * contributors. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "rcv.h" #include <locale.h> @@ -96,7 +92,7 @@ msend( lc = 0; clearerr(obuf); while (c > 0L) { - nread = getline(line, LINESIZE, ibuf, &unused); + nread = getaline(line, LINESIZE, ibuf, &unused); c -= nread; lc++; if (ishead) { |
