wangzhengquan
2020-07-29 e68463e61597798594611b2bfb2925da00e8d4fb
Merge branch 'master' of https://g/wangzhengquan/shmqueue

?是将一个更新后的上游分支
2个文件已修改
25 ■■■■ 已修改文件
Make.defines.macos 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/queue/include/array_lock_free_queue.h 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Make.defines.macos
@@ -3,17 +3,28 @@
# Definitions required in all program directories to compile and link
# C programs using gcc.
CC=gcc
CC=g++
COMPILE.c=$(CC) $(CFLAGS) $(CPPFLAGS) -c
LINK.c=$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
LDFLAGS=
LDDIR=-L$(ROOT)/lib
LDLIBS=$(LDDIR) -lapue $(EXTRALIBS)
CFLAGS=-ansi -I$(ROOT)/include -std=c++11 -Wall -DMACOS -D_DARWIN_C_SOURCE $(EXTRA)
LDDIR += -L$(ROOT)/lib
LDLIBS += $(LDDIR) $(EXTRALIBS)
INCLUDE += -I. -I./include -I$(ROOT)/include -I$(ROOT)/include/usgcommon
ifeq ($(DEBUG),y)
  DEBFLAGS = -O -g # "-O" is needed to expand inlines
else
  DEBFLAGS = -O2
endif
CFLAGS=-ansi -mcx16 $(INCLUDE) $(DEBFLAGS)  -std=c++11 -Wall -DMACOS -D_DARWIN_C_SOURCE $(EXTRA)
RANLIB=ranlib
AR=ar
AWK=awk
LIBAPUE=$(ROOT)/lib/libapue.a
# Common temp files to delete from each directory.
TEMPFILES=core core.* *.o temp.* *.out
TEMPFILES=core core.*  **/*.o temp.* *.out *.a *.so
%:    %.c
    $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(LDLIBS)
src/queue/include/array_lock_free_queue.h
@@ -311,7 +311,7 @@
{
    int currentCount = m_count;
    uint32_t currentReadIndex = m_readIndex;
    if (i < 0 || i >= currentCount)
    if (i >= currentCount)
    {
        std::cerr << "ArrayLockFreeQueue<ELEM_T, Allocator>::operator[] , Error in array limits: " << i << " is out of range\n";
        std::exit(EXIT_FAILURE);