From 9d8525f2a152bb949053b52e91ccae0562a0cbb8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Jan 2000 05:28:22 +0000 Subject: Update. 2000-01-07 Andreas Jaeger Add support for Berkeley db 3.0.x and merge db support: * nss/nss_db/dummy-db.h (struct db30): New. (struct dbc30): New. Added DB30* flags. * nss/makedb.c: Move all database routines to db-open.c. (main): Adjust to interface changes. Load database early to initialize version dependend variables. * nss/db-open.c: Merge database routines from makedb.c. Define version dependend constansts as variables. (load_db): Check also for db 3. (internal_setent): Call dbopen. (db_cursor): New function from makedb; handles db 3 now. (dbopen): New function from makedb; handles db 3. * nss/nss_db/db-XXX.c: Use db_notfound since the value is different in different DB versions. * nss/nss_db/nss_db.h: Add version dependend constants as variables, add exportet interfaces from db-open.c. * nss/Makefile ($(objpfx)makedb): Link against db-open. 2000-01-07 Ulrich Drepper * misc/error.c: Don't use `defined _LIBC', only `_LIBC'. Reported by Jim Meyering. * time/strftime.c: Pretty printing. 2000-01-07 Andreas Jaeger * manual/socket.texi (Host Names): Fix example. Reported by Marco Budde . --- manual/socket.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'manual') diff --git a/manual/socket.texi b/manual/socket.texi index ab94f29..02a50be 100644 --- a/manual/socket.texi +++ b/manual/socket.texi @@ -1310,6 +1310,7 @@ gethostname (char *host) int herr; hstbuflen = 1024; + /* Allocate buffer, remember to free it to avoid a memory leakage. */ tmphstbuf = malloc (hstbuflen); while ((res = gethostbyname_r (host, &hostbuf, tmphstbuf, hstbuflen, @@ -1322,7 +1323,7 @@ gethostname (char *host) /* Check for errors. */ if (res || hp == NULL) return NULL; - return hp->h_name; + return hp; @} @end smallexample @end deftypefun -- cgit v1.1