OSDN Git Service

Grr. I should learn to compile stuff before committing
authorEric Andersen <andersen@codepoet.org>
Sat, 2 Feb 2002 11:00:37 +0000 (11:00 -0000)
committerEric Andersen <andersen@codepoet.org>
Sat, 2 Feb 2002 11:00:37 +0000 (11:00 -0000)
Makefile
libc/inet/Makefile
libc/inet/herror.c

index f1e74b9..359bcd8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@ include Rules.mak
 
 DIRS = extra ldso libc libcrypt libresolv libutil libm #libpthread
 
-all: headers uClibc_config.h subdirs shared done
+all: headers uClibc_config.h subdirs shared finished
 
 Config:
        @echo
@@ -58,7 +58,7 @@ else
        @echo
 endif
 
-done: shared
+finished: shared
        @echo
        @echo Finally finished compiling...
        @echo
@@ -182,7 +182,7 @@ $(patsubst %, _dir_%, $(DIRS)) : dummy
 tags:
        ctags -R
 
-install: install_dev install_runtime install_toolchain install_utils
+install: install_dev install_runtime install_toolchain install_utils finished2
 
 
 # Installs header files and development library links.
@@ -273,6 +273,12 @@ ifeq ($(strip $(HAVE_SHARED)),true)
        fi;
 endif
 
+finished2:
+       @echo
+       @echo Finished installing...
+       @echo
+
+
 distclean clean:
        @rm -rf tmp lib include/bits/uClibc_config.h uClibc_config.h
        - find include -type l -exec rm -f {} \;
index 8ca4006..54ef000 100644 (file)
@@ -49,15 +49,12 @@ MOBJ3= accept.o bind.o connect.o getpeername.o getsockname.o getsockopt.o \
        listen.o recv.o recvfrom.o recvmsg.o send.o sendmsg.o sendto.o \
        setsockopt.o shutdown.o socket.o socketpair.o 
 
-MSRC4=herror.c
-MOBJ4=herror.o hstrerror.o
-
 CSRC =getservice.c getproto.c hostid.c getnetent.c getnetbynm.c getnetbyad.c \
-       inet_net.c ntop.c
+       inet_net.c ntop.c herror.c
 
 COBJS=$(patsubst %.c,%.o, $(CSRC))
 
-OBJS=$(MOBJ) $(MOBJ2) $(MOBJ3) $(MOBJ4) $(COBJS)
+OBJS=$(MOBJ) $(MOBJ2) $(MOBJ3) $(COBJS)
 
 
 all: $(OBJS) $(LIBC)
@@ -79,10 +76,6 @@ $(MOBJ3): $(MSRC3)
        $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
        $(STRIPTOOL) -x -R .note -R .comment $*.o
 
-$(MOBJ4): $(MSRC4)
-       $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
-       $(STRIPTOOL) -x -R .note -R .comment $*.o
-
 $(COBJS): %.o : %.c
        $(CC) $(CFLAGS) -c $< -o $@
        $(STRIPTOOL) -x -R .note -R .comment $*.o
index cb89be1..79b8408 100644 (file)
@@ -23,8 +23,7 @@
 #include <string.h>
 #include <netdb.h>
 
-#ifdef L_herror
-
+static const char *error_msg = "Resolver error";
 static const char *const h_errlist[] = {
        "Error 0",
        "Unknown host",                     /* 1 HOST_NOT_FOUND */
@@ -47,19 +46,16 @@ void herror(const char *s)
        if (!s || !*s) {
                c += 2;
        }
-       p = "Resolver error";
+       p = error_msg;
        if ((h_errno >= 0) && (h_errno < h_nerr)) {
            p = h_errlist[h_errno];
        }
        fprintf(stderr, "%s%s%s\n", s, c, p);
 }
 
-#endif
 
-#ifdef L_hstrerror
 const char *hstrerror(int err)
 {
-    const char *error_msg = "Resolver error";
     if (err < 0) {
        return(error_msg);
     } else if (err < h_nerr) {
@@ -67,4 +63,3 @@ const char *hstrerror(int err)
     }
     return(error_msg);
 }
-#endif