* corrige un probleme dans l'edition de lien (librt)

This commit is contained in:
glenux 2004-02-17 21:53:14 +00:00
parent 23f454bbe1
commit c0f54a11cb
6 changed files with 30 additions and 31 deletions

View file

@ -7,9 +7,9 @@
#LIBS=
CC=gcc
CFLAGS=-ggdb -O2 -Wall
USER_CLASSPATH:=../bin:../lib
JFLAGS=-d ../bin -g -deprecation
CFLAGS=-ggdb -Wall
#-O2
#LIBS=-lrt
#-verbose
PRJNAME=Libnazgul
GDATE := $(shell date +"-%Y-%m-%d_r%H")
@ -32,5 +32,5 @@ clean:
@rm -f *.o
%.o : %.c
$(CC) $(CFLAGS) $(INCLUDES) $(LIBINC) $(LIBS) -c $< -o $*.o
$(CC) $(CFLAGS) -c $< $(INCLUDES) $(LIBINC) $(LIBS) -o $*.o

View file

@ -1,12 +1,8 @@
#include <unistd.h> /* POSIX et al */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h> /* pour O_RDWR */
#include <sys/types.h>
#include <sys/mman.h> /* shm_open */
#include "nzg_global.h"
#include "nzg_iface.h"
#include "nzg_proto.h"
#include <sys/types.h>
#include <sys/mman.h>
/*
* spaceId : identifiant externe de l'espace de msg
@ -57,7 +53,7 @@ msgSpace * msgSpaceOpen(msgSpaceId spaceId){
}
void msgSpaceDelete(msgSpaceId spaceId){
int shmId;
//int shmId;
msgSpaceId nzgId=msgSp2nzgId(spaceId);
int er;
if ((er=shm_unlink(nzgId))<0){

View file

@ -1,3 +1,9 @@
#include <unistd.h>
#include <unistd.h> /* POSIX et al */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h> /* pour O_RDWR */
#include <sys/types.h>
#include <sys/mman.h> /* shm_open */
#define PAGESIZE sysconf(_SC_PAGESIZE)

View file

@ -1,13 +1,6 @@
char **msgSpaceIdList(void);
msgSpace * msgSpaceCreate(
msgSpaceId spaceId, // identifiant externe de l'espace de msg
int queueNb, // nombre de files de messages
int poolNb, // nombre de pool de buffers
msgPool * queueNbCar // tableau de caracteristiques des different pool
);
void * msgAllocate(
msgSpace * space, //espace de message concerné
int pool, //numéro de pool ou réaliser l'allocation
@ -17,7 +10,10 @@ void * msgAllocate(
/* nzg_create.c */
msgSpace *msgSpaceCreate(msgSpaceId spaceId, int queueNb, int poolNb, msgPool *queueNbCar);
msgSpace *msgSpaceCreate(
msgSpaceId spaceId, int queueNb, int poolNb, msgPool *queueNbCar
);
msgSpace *msgSpaceOpen(msgSpaceId spaceId);
void msgSpaceDelete(msgSpaceId spaceId);
msgSpaceId msgSp2nzgId(msgSpaceId spaceId);

View file

@ -7,19 +7,16 @@
#LIBS=
CC=gcc
CFLAGS=-ggdb -O2 -Wall
INCLUDES=-I../src
CFLAGS=-Wall --static
#-O2 -ggdb
INCLUDES=-I ../src/
LIBINC=-L ../src
LIBS=-lnazgul
LIBS=-lnazgul -lrt
USER_CLASSPATH:=../bin:../lib
JFLAGS=-d ../bin -g -deprecation
#-verbose
PRJNAME=Libnazgul
GDATE := $(shell date +"-%Y-%m-%d_r%H")
GFILENAME := ../$(PRJNAME)$(GDATE).tar.bz2
LOCALDIR = $(shell pwd)
BINDIR=../bin
CFILES := $(shell ls *.c)
#OFILES := $(patsubst %.c,%.o,$(CFILES))
FILES := $(patsubst %.c,%,$(CFILES))
@ -35,5 +32,5 @@ clean:
@rm -f $(FILES)
% : %.c
$(CC) $(CFLAGS) $(INCLUDES) $(LIBINC) $(LIBS) $< -o $*
$(CC) $(CFLAGS) $< -o $* $(INCLUDES) $(LIBINC) $(LIBS)

View file

@ -1,8 +1,12 @@
#include "nzg_global.h"
#include "nzg_iface.h"
#include "nzg_proto.h"
int main(void) {
// msgSpaceId mSID=msgSpaceIdGet(""); //renvoie un ID propre au programme
// msgSpace mS=0;
msgSpaceId testId=(msgSpaceId)"test";
//msgSpace * mSPAC=msgSpaceCreate(testId,0,0,NULL);
msgSpaceDelete(testId);
return 0;
}