do not cast retval to char*; declare functions correctly before
(req'd for alpha64)
--- a/Unix.st Sat Mar 07 14:39:10 1998 +0100
+++ b/Unix.st Sat Mar 07 16:37:36 1998 +0100
@@ -3269,6 +3269,7 @@
char **argv;
int nargs, i, id;
OBJ arg;
+ extern char *malloc();
if (__isString(aCommandPath) &&
((argArray == nil) || __isArray(argArray)) &&
@@ -7696,6 +7697,7 @@
%{ /* NOCONTEXT */
char *env;
+ extern char *getenv();
if (__isString(aStringOrSymbol) || __isSymbol(aStringOrSymbol)) {
#ifdef WIN32
@@ -7708,7 +7710,7 @@
env = buff;
}
#else
- env = (char *)getenv(__stringVal(aStringOrSymbol));
+ env = getenv(__stringVal(aStringOrSymbol));
#endif
if (env) {
RETURN ( __MKSTRING(env) );
@@ -9795,15 +9797,17 @@
%{ /* NOCONTEXT */
static char cachedName[64];
static firstCall = 1;
+ extern char *getenv();
+ extern char *getlogin();
char *name = (char *)0;
#ifdef UNIX_LIKE
# ifndef __openVMS__
if (firstCall) {
- name = (char *)getlogin();
+ name = getlogin();
if (! name || (name[0] == 0)) {
- name = (char *)getenv("LOGNAME");
+ name = getenv("LOGNAME");
}
if (name && (strlen(name) < sizeof(cachedName))) {
strcpy(cachedName, name);
@@ -9832,11 +9836,11 @@
* try a few common environment variables ...
*/
if (! name || (name[0] == 0) ) {
- name = (char *)getenv("LOGIN");
+ name = getenv("LOGIN");
if (! name || (name[0] == 0) ) {
- name = (char *)getenv("LOGNAME");
+ name = getenv("LOGNAME");
if (! name || (name[0] == 0) ) {
- name = (char *)getenv("USER");
+ name = getenv("USER");
}
}
}
@@ -11121,6 +11125,6 @@
!OperatingSystem class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Attic/Unix.st,v 1.283 1998-03-04 15:48:17 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Attic/Unix.st,v 1.284 1998-03-07 15:37:36 cg Exp $'
! !
OperatingSystem initialize!