From 0586dc8b6d9d3d9f4b36e35aa9f3b4f76dc48538 Mon Sep 17 00:00:00 2001 From: albert <> Date: Thu, 23 Sep 2004 13:41:33 +0000 Subject: [PATCH] fix warnings; put CFLAGS on lib link command --- Makefile | 10 +++++++++- proc/devname.c | 1 + proc/ksym.c | 2 +- proc/module.mk | 4 +++- proc/readproc.h | 14 +++++++------- ps/sortformat.c | 5 +++++ 6 files changed, 26 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 0c2837ee..11240f8e 100644 --- a/Makefile +++ b/Makefile @@ -103,6 +103,7 @@ ALL_LDFLAGS := $(PKG_LDFLAGS) $(LDFLAGS) ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),tar) ifneq ($(MAKECMDGOALS),extratar) +ifneq ($(MAKECMDGOALS),beta) # Unlike the kernel one, this check_gcc goes all the way to # producing an executable. There might be a -m64 that works @@ -139,6 +140,7 @@ ALL_CFLAGS += $(call check_gcc,-fno-inline-functions,) endif endif endif +endif ############ misc. @@ -148,7 +150,7 @@ endif .SUFFIXES: .SUFFIXES: .a .o .c .s .h -.PHONY: all clean do_all install tar extratar +.PHONY: all clean do_all install tar extratar beta ALL := $(notdir $(BINFILES)) @@ -197,6 +199,12 @@ extratar: $(_TARFILES) tar cf extra-$(TARVERSION).tar procps-$(TARVERSION) gzip -9 extra-$(TARVERSION).tar +beta: $(TARFILES) $(_TARFILES) + mkdir beta-$(TARVERSION) + (tar cf - $(TARFILES) $(_TARFILES)) | (cd beta-$(TARVERSION) && tar xf -) + tar cf beta-$(TARVERSION).tar beta-$(TARVERSION) + gzip -9 beta-$(TARVERSION).tar + clean: rm -f $(CLEAN) diff --git a/proc/devname.c b/proc/devname.c index 202df62d..a80313c7 100644 --- a/proc/devname.c +++ b/proc/devname.c @@ -141,6 +141,7 @@ static const char low_density_names[][4] = { "DB0", "DB1", "DB2", "DB3", "DB4", "DB5", "DB6", "DB7", "SG0", "SMX0", "SMX1", "SMX2", +"MM0", "MM1", }; /* Try to guess the device name (useful until /proc/PID/tty is added) */ diff --git a/proc/ksym.c b/proc/ksym.c index 83b27a40..72ec3a50 100644 --- a/proc/ksym.c +++ b/proc/ksym.c @@ -105,8 +105,8 @@ */ typedef struct symb { - const char *name; unsigned KLONG addr; + const char *name; } symb; /* These mostly rely on POSIX to make them zero. */ diff --git a/proc/module.mk b/proc/module.mk index 48c87e45..af203348 100644 --- a/proc/module.mk +++ b/proc/module.mk @@ -76,7 +76,7 @@ proc/$(ANAME): $(LIBOBJ) #proc/$(SONAME): proc/library.map proc/$(SONAME): $(LIBOBJ) - $(CC) -shared -Wl,-soname,$(SONAME) -Wl,--version-script=proc/library.map -o $@ $^ -lc + $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -shared -Wl,-soname,$(SONAME) -Wl,--version-script=proc/library.map -o $@ $^ -lc # AUTOMATIC DEPENDENCY GENERATION -- GCC AND GNUMAKE DEPENDENT @@ -86,10 +86,12 @@ proc/.depend: $(LIBSRC) $(LIBHDR) ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),tar) ifneq ($(MAKECMDGOALS),extratar) +ifneq ($(MAKECMDGOALS),beta) -include proc/.depend endif endif endif +endif #################### install rules ########################### diff --git a/proc/readproc.h b/proc/readproc.h index c45a1c01..ae44c0a1 100644 --- a/proc/readproc.h +++ b/proc/readproc.h @@ -70,6 +70,13 @@ typedef struct proc_t { sigignore, // status mask of ignored signals sigcatch; // status mask of caught signals #endif + unsigned KLONG + start_code, // stat address of beginning of code segment + end_code, // stat address of end of code segment + start_stack, // stat address of the bottom of stack for the process + kstk_esp, // stat kernel stack pointer + kstk_eip, // stat kernel instruction pointer + wchan; // stat (special) address of kernel wait channel proc is sleeping in long priority, // stat kernel scheduling priority nice, // stat standard unix nice level of process @@ -100,13 +107,6 @@ typedef struct proc_t { maj_flt, // stat number of major page faults since process start cmin_flt, // stat cumulative min_flt of process and child processes cmaj_flt; // stat cumulative maj_flt of process and child processes - unsigned KLONG - start_code, // stat address of beginning of code segment - end_code, // stat address of end of code segment - start_stack, // stat address of the bottom of stack for the process - kstk_esp, // stat kernel stack pointer - kstk_eip, // stat kernel instruction pointer - wchan; // stat (special) address of kernel wait channel proc is sleeping in char **environ, // (special) environment string vector (/proc/#/environ) **cmdline; // (special) command line string vector (/proc/#/cmdline) diff --git a/ps/sortformat.c b/ps/sortformat.c index 4dbae84c..7b21c0f7 100644 --- a/ps/sortformat.c +++ b/ps/sortformat.c @@ -708,8 +708,13 @@ static const char *generate_sysv_list(void){ }else if(format_flags & FF_Ul){ PUSH("ni"); PUSH("opri"); } + + // FIXME TODO XXX -- this is a serious problem + // These somehow got flipped around. + // The bug is in procps-3.1.1, procps-990211, prior too? if((thread_flags & TF_U_L) && (format_flags & FF_Uf)) PUSH("nlwp"); if( (format_flags & (FF_Uf|FF_Ul)) && !(format_modifiers & FM_c) ) PUSH("c"); + if(format_modifiers & FM_P) PUSH("psr"); if(thread_flags & TF_U_L) PUSH("lwp"); if(format_modifiers & FM_j){ -- 2.40.0